import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, t as s, u as c } from "./toConsumableArray-BOK-Gx2p.js";
import { t as l } from "./utils-CHlhTiFC.js";
import { t as u } from "./dist-C2Jrcfwk.js";
import * as d from "react";
import { useMemo as f } from "react";
import { jsx as p, jsxs as m } from "react/jsx-runtime";
import { flushSync as h } from "react-dom";
//#endregion
//#region node_modules/rc-util/es/hooks/useEvent.js
var g = /* @__PURE__ */ c((/* @__PURE__ */ r(((e, t) => {
	(function() {
		var e = {}.hasOwnProperty;
		function n() {
			for (var e = "", t = 0; t < arguments.length; t++) {
				var n = arguments[t];
				n && (e = i(e, r(n)));
			}
			return e;
		}
		function r(t) {
			if (typeof t == "string" || typeof t == "number") return t;
			if (typeof t != "object") return "";
			if (Array.isArray(t)) return n.apply(null, t);
			if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) return t.toString();
			var r = "";
			for (var a in t) e.call(t, a) && t[a] && (r = i(r, a));
			return r;
		}
		function i(e, t) {
			return t ? e ? e + " " + t : e + t : e;
		}
		t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
			return n;
		}) : window.classNames = n;
	})();
})))());
function _(e) {
	var t = d.useRef();
	return t.current = e, d.useCallback(function() {
		var e, n = [...arguments];
		return (e = t.current)?.call.apply(e, [t].concat(n));
	}, []);
}
//#endregion
//#region node_modules/rc-util/es/Dom/canUseDom.js
function v() {
	return !!(typeof window < "u" && window.document && window.document.createElement);
}
//#endregion
//#region node_modules/rc-util/es/hooks/useLayoutEffect.js
var y = process.env.NODE_ENV !== "test" && v() ? d.useLayoutEffect : d.useEffect, b = function(e, t) {
	var n = d.useRef(!0);
	y(function() {
		return e(n.current);
	}, t), y(function() {
		return n.current = !1, function() {
			n.current = !0;
		};
	}, []);
}, x = function(e, t) {
	b(function(t) {
		if (!t) return e();
	}, t);
};
//#endregion
//#region node_modules/rc-util/es/hooks/useState.js
function S(e) {
	var t = d.useRef(!1), r = n(d.useState(e), 2), i = r[0], a = r[1];
	d.useEffect(function() {
		return t.current = !1, function() {
			t.current = !0;
		};
	}, []);
	function o(e, n) {
		n && t.current || a(e);
	}
	return [i, o];
}
//#endregion
//#region node_modules/rc-util/es/hooks/useMergedState.js
function C(e) {
	return e !== void 0;
}
function w(e, t) {
	var r = t || {}, i = r.defaultValue, a = r.value, o = r.onChange, s = r.postState, c = n(S(function() {
		return C(a) ? a : C(i) ? typeof i == "function" ? i() : i : typeof e == "function" ? e() : e;
	}), 2), l = c[0], u = c[1], d = a === void 0 ? l : a, f = s ? s(d) : d, p = _(o), m = n(S([d]), 2), h = m[0], g = m[1];
	return x(function() {
		var e = h[0];
		l !== e && p(l, e);
	}, [h]), x(function() {
		C(a) || u(a);
	}, [a]), [f, _(function(e, t) {
		u(e, t), g([d], t);
	})];
}
//#endregion
//#region node_modules/rc-util/es/warning.js
var T = {}, E = [], D = function(e) {
	E.push(e);
};
function O(e, t) {
	if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
		var n = E.reduce(function(e, t) {
			return t(e ?? "", "warning");
		}, t);
		n && console.error(`Warning: ${n}`);
	}
}
function k(e, t) {
	if (process.env.NODE_ENV !== "production" && !e && console !== void 0) {
		var n = E.reduce(function(e, t) {
			return t(e ?? "", "note");
		}, t);
		n && console.warn(`Note: ${n}`);
	}
}
function A() {
	T = {};
}
function j(e, t, n) {
	!t && !T[n] && (e(!1, n), T[n] = !0);
}
function M(e, t) {
	j(O, e, t);
}
function N(e, t) {
	j(k, e, t);
}
M.preMessage = D, M.resetWarned = A, M.noteOnce = N;
//#endregion
//#region node_modules/rc-util/es/isEqual.js
function ee(e, n) {
	var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, i = /* @__PURE__ */ new Set();
	function a(e, n) {
		var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, s = i.has(e);
		if (M(!s, "Warning: There may be circular references"), s) return !1;
		if (e === n) return !0;
		if (r && o > 1) return !1;
		i.add(e);
		var c = o + 1;
		if (Array.isArray(e)) {
			if (!Array.isArray(n) || e.length !== n.length) return !1;
			for (var l = 0; l < e.length; l++) if (!a(e[l], n[l], c)) return !1;
			return !0;
		}
		if (e && n && t(e) === "object" && t(n) === "object") {
			var u = Object.keys(e);
			return u.length === Object.keys(n).length ? u.every(function(t) {
				return a(e[t], n[t], c);
			}) : !1;
		}
		return !1;
	}
	return a(e, n);
}
//#endregion
//#region node_modules/rc-slider/es/util.js
function P(e, t, n) {
	return (e - t) / (n - t);
}
function F(e, t, n, r) {
	var i = P(t, n, r), a = {};
	switch (e) {
		case "rtl":
			a.right = `${i * 100}%`, a.transform = "translateX(50%)";
			break;
		case "btt":
			a.bottom = `${i * 100}%`, a.transform = "translateY(50%)";
			break;
		case "ttb":
			a.top = `${i * 100}%`, a.transform = "translateY(-50%)";
			break;
		default:
			a.left = `${i * 100}%`, a.transform = "translateX(-50%)";
			break;
	}
	return a;
}
function I(e, t) {
	return Array.isArray(e) ? e[t] : e;
}
//#endregion
//#region node_modules/rc-util/es/KeyCode.js
var L = {
	MAC_ENTER: 3,
	BACKSPACE: 8,
	TAB: 9,
	NUM_CENTER: 12,
	ENTER: 13,
	SHIFT: 16,
	CTRL: 17,
	ALT: 18,
	PAUSE: 19,
	CAPS_LOCK: 20,
	ESC: 27,
	SPACE: 32,
	PAGE_UP: 33,
	PAGE_DOWN: 34,
	END: 35,
	HOME: 36,
	LEFT: 37,
	UP: 38,
	RIGHT: 39,
	DOWN: 40,
	PRINT_SCREEN: 44,
	INSERT: 45,
	DELETE: 46,
	ZERO: 48,
	ONE: 49,
	TWO: 50,
	THREE: 51,
	FOUR: 52,
	FIVE: 53,
	SIX: 54,
	SEVEN: 55,
	EIGHT: 56,
	NINE: 57,
	QUESTION_MARK: 63,
	A: 65,
	B: 66,
	C: 67,
	D: 68,
	E: 69,
	F: 70,
	G: 71,
	H: 72,
	I: 73,
	J: 74,
	K: 75,
	L: 76,
	M: 77,
	N: 78,
	O: 79,
	P: 80,
	Q: 81,
	R: 82,
	S: 83,
	T: 84,
	U: 85,
	V: 86,
	W: 87,
	X: 88,
	Y: 89,
	Z: 90,
	META: 91,
	WIN_KEY_RIGHT: 92,
	CONTEXT_MENU: 93,
	NUM_ZERO: 96,
	NUM_ONE: 97,
	NUM_TWO: 98,
	NUM_THREE: 99,
	NUM_FOUR: 100,
	NUM_FIVE: 101,
	NUM_SIX: 102,
	NUM_SEVEN: 103,
	NUM_EIGHT: 104,
	NUM_NINE: 105,
	NUM_MULTIPLY: 106,
	NUM_PLUS: 107,
	NUM_MINUS: 109,
	NUM_PERIOD: 110,
	NUM_DIVISION: 111,
	F1: 112,
	F2: 113,
	F3: 114,
	F4: 115,
	F5: 116,
	F6: 117,
	F7: 118,
	F8: 119,
	F9: 120,
	F10: 121,
	F11: 122,
	F12: 123,
	NUMLOCK: 144,
	SEMICOLON: 186,
	DASH: 189,
	EQUALS: 187,
	COMMA: 188,
	PERIOD: 190,
	SLASH: 191,
	APOSTROPHE: 192,
	SINGLE_QUOTE: 222,
	OPEN_SQUARE_BRACKET: 219,
	BACKSLASH: 220,
	CLOSE_SQUARE_BRACKET: 221,
	WIN_KEY: 224,
	MAC_FF_META: 224,
	WIN_IME: 229,
	isTextModifyingKeyEvent: function(e) {
		var t = e.keyCode;
		if (e.altKey && !e.ctrlKey || e.metaKey || t >= L.F1 && t <= L.F12) return !1;
		switch (t) {
			case L.ALT:
			case L.CAPS_LOCK:
			case L.CONTEXT_MENU:
			case L.CTRL:
			case L.DOWN:
			case L.END:
			case L.ESC:
			case L.HOME:
			case L.INSERT:
			case L.LEFT:
			case L.MAC_FF_META:
			case L.META:
			case L.NUMLOCK:
			case L.NUM_CENTER:
			case L.PAGE_DOWN:
			case L.PAGE_UP:
			case L.PAUSE:
			case L.PRINT_SCREEN:
			case L.RIGHT:
			case L.SHIFT:
			case L.UP:
			case L.WIN_KEY:
			case L.WIN_KEY_RIGHT: return !1;
			default: return !0;
		}
	},
	isCharacterKey: function(e) {
		if (e >= L.ZERO && e <= L.NINE || e >= L.NUM_ZERO && e <= L.NUM_MULTIPLY || e >= L.A && e <= L.Z || window.navigator.userAgent.indexOf("WebKit") !== -1 && e === 0) return !0;
		switch (e) {
			case L.SPACE:
			case L.QUESTION_MARK:
			case L.NUM_PLUS:
			case L.NUM_MINUS:
			case L.NUM_PERIOD:
			case L.NUM_DIVISION:
			case L.SEMICOLON:
			case L.DASH:
			case L.EQUALS:
			case L.COMMA:
			case L.PERIOD:
			case L.SLASH:
			case L.APOSTROPHE:
			case L.SINGLE_QUOTE:
			case L.OPEN_SQUARE_BRACKET:
			case L.BACKSLASH:
			case L.CLOSE_SQUARE_BRACKET: return !0;
			default: return !1;
		}
	}
}, R = /* @__PURE__ */ d.createContext({
	min: 0,
	max: 0,
	direction: "ltr",
	step: 1,
	includedStart: 0,
	includedEnd: 0,
	tabIndex: 0,
	keyboard: !0,
	styles: {},
	classNames: {}
}), z = /* @__PURE__ */ d.createContext({}), te = [
	"prefixCls",
	"value",
	"valueIndex",
	"onStartMove",
	"onDelete",
	"style",
	"render",
	"dragging",
	"draggingDelete",
	"onOffsetChange",
	"onChangeComplete",
	"onFocus",
	"onMouseEnter"
], B = /* @__PURE__ */ d.forwardRef(function(t, n) {
	var r = t.prefixCls, s = t.value, c = t.valueIndex, l = t.onStartMove, u = t.onDelete, f = t.style, p = t.render, m = t.dragging, h = t.draggingDelete, _ = t.onOffsetChange, v = t.onChangeComplete, y = t.onFocus, b = t.onMouseEnter, x = o(t, te), S = d.useContext(R), C = S.min, w = S.max, T = S.direction, E = S.disabled, D = S.keyboard, O = S.range, k = S.tabIndex, A = S.ariaLabelForHandle, j = S.ariaLabelledByForHandle, M = S.ariaRequired, N = S.ariaValueTextFormatterForHandle, ee = S.styles, P = S.classNames, z = `${r}-handle`, B = function(e) {
		E || l(e, c);
	}, ne = function(e) {
		y?.(e, c);
	}, re = function(e) {
		b(e, c);
	}, ie = function(e) {
		if (!E && D) {
			var t = null;
			switch (e.which || e.keyCode) {
				case L.LEFT:
					t = T === "ltr" || T === "btt" ? -1 : 1;
					break;
				case L.RIGHT:
					t = T === "ltr" || T === "btt" ? 1 : -1;
					break;
				case L.UP:
					t = T === "ttb" ? -1 : 1;
					break;
				case L.DOWN:
					t = T === "ttb" ? 1 : -1;
					break;
				case L.HOME:
					t = "min";
					break;
				case L.END:
					t = "max";
					break;
				case L.PAGE_UP:
					t = 2;
					break;
				case L.PAGE_DOWN:
					t = -2;
					break;
				case L.BACKSPACE:
				case L.DELETE:
					u?.(c);
					break;
			}
			t !== null && (e.preventDefault(), _(t, c));
		}
	}, ae = function(e) {
		switch (e.which || e.keyCode) {
			case L.LEFT:
			case L.RIGHT:
			case L.UP:
			case L.DOWN:
			case L.HOME:
			case L.END:
			case L.PAGE_UP:
			case L.PAGE_DOWN:
				v?.();
				break;
		}
	}, V = F(T, s, C, w), oe = {};
	c !== null && (oe = {
		tabIndex: E ? null : I(k, c),
		role: "slider",
		"aria-valuemin": C,
		"aria-valuemax": w,
		"aria-valuenow": s,
		"aria-disabled": E,
		"aria-label": I(A, c),
		"aria-labelledby": I(j, c),
		"aria-required": I(M, c),
		"aria-valuetext": I(N, c)?.(s),
		"aria-orientation": T === "ltr" || T === "rtl" ? "horizontal" : "vertical",
		onMouseDown: B,
		onTouchStart: B,
		onFocus: ne,
		onMouseEnter: re,
		onKeyDown: ie,
		onKeyUp: ae
	});
	var H = /* @__PURE__ */ d.createElement("div", i({
		ref: n,
		className: (0, g.default)(z, a(a(a({}, `${z}-${c + 1}`, c !== null && O), `${z}-dragging`, m), `${z}-dragging-delete`, h), P.handle),
		style: e(e(e({}, V), f), ee.handle)
	}, oe, x));
	return p && (H = p(H, {
		index: c,
		prefixCls: r,
		value: s,
		dragging: m,
		draggingDelete: h
	})), H;
});
process.env.NODE_ENV !== "production" && (B.displayName = "Handle");
//#endregion
//#region node_modules/rc-slider/es/Handles/index.js
var ne = [
	"prefixCls",
	"style",
	"onStartMove",
	"onOffsetChange",
	"values",
	"handleRender",
	"activeHandleRender",
	"draggingIndex",
	"draggingDelete",
	"onFocus"
], re = /* @__PURE__ */ d.forwardRef(function(t, r) {
	var a = t.prefixCls, s = t.style, c = t.onStartMove, l = t.onOffsetChange, u = t.values, f = t.handleRender, p = t.activeHandleRender, m = t.draggingIndex, g = t.draggingDelete, _ = t.onFocus, v = o(t, ne), y = d.useRef({}), b = n(d.useState(!1), 2), x = b[0], S = b[1], C = n(d.useState(-1), 2), w = C[0], T = C[1], E = function(e) {
		T(e), S(!0);
	}, D = function(e, t) {
		E(t), _?.(e);
	}, O = function(e, t) {
		E(t);
	};
	d.useImperativeHandle(r, function() {
		return {
			focus: function(e) {
				var t;
				(t = y.current[e]) == null || t.focus();
			},
			hideHelp: function() {
				h(function() {
					S(!1);
				});
			}
		};
	});
	var k = e({
		prefixCls: a,
		onStartMove: c,
		onOffsetChange: l,
		render: f,
		onFocus: D,
		onMouseEnter: O
	}, v);
	return /* @__PURE__ */ d.createElement(d.Fragment, null, u.map(function(e, t) {
		var n = m === t;
		return /* @__PURE__ */ d.createElement(B, i({
			ref: function(e) {
				e ? y.current[t] = e : delete y.current[t];
			},
			dragging: n,
			draggingDelete: n && g,
			style: I(s, t),
			key: t,
			value: e,
			valueIndex: t
		}, k));
	}), p && x && /* @__PURE__ */ d.createElement(B, i({ key: "a11y" }, k, {
		value: u[w],
		valueIndex: null,
		dragging: m !== -1,
		draggingDelete: g,
		render: p,
		style: { pointerEvents: "none" },
		tabIndex: null,
		"aria-hidden": !0
	})));
});
process.env.NODE_ENV !== "production" && (re.displayName = "Handles");
//#endregion
//#region node_modules/rc-slider/es/Marks/Mark.js
var ie = function(t) {
	var n = t.prefixCls, r = t.style, i = t.children, o = t.value, s = t.onClick, c = d.useContext(R), l = c.min, u = c.max, f = c.direction, p = c.includedStart, m = c.includedEnd, h = c.included, _ = `${n}-text`, v = F(f, o, l, u);
	return /* @__PURE__ */ d.createElement("span", {
		className: (0, g.default)(_, a({}, `${_}-active`, h && p <= o && o <= m)),
		style: e(e({}, v), r),
		onMouseDown: function(e) {
			e.stopPropagation();
		},
		onClick: function() {
			s(o);
		}
	}, i);
}, ae = function(e) {
	var t = e.prefixCls, n = e.marks, r = e.onClick, i = `${t}-mark`;
	return n.length ? /* @__PURE__ */ d.createElement("div", { className: i }, n.map(function(e) {
		var t = e.value, n = e.style, a = e.label;
		return /* @__PURE__ */ d.createElement(ie, {
			key: t,
			prefixCls: i,
			style: n,
			value: t,
			onClick: r
		}, a);
	})) : null;
}, V = function(t) {
	var n = t.prefixCls, r = t.value, i = t.style, o = t.activeStyle, s = d.useContext(R), c = s.min, l = s.max, u = s.direction, f = s.included, p = s.includedStart, m = s.includedEnd, h = `${n}-dot`, _ = f && p <= r && r <= m, v = e(e({}, F(u, r, c, l)), typeof i == "function" ? i(r) : i);
	return _ && (v = e(e({}, v), typeof o == "function" ? o(r) : o)), /* @__PURE__ */ d.createElement("span", {
		className: (0, g.default)(h, a({}, `${h}-active`, _)),
		style: v
	});
}, oe = function(e) {
	var t = e.prefixCls, n = e.marks, r = e.dots, i = e.style, a = e.activeStyle, o = d.useContext(R), s = o.min, c = o.max, l = o.step, u = d.useMemo(function() {
		var e = /* @__PURE__ */ new Set();
		if (n.forEach(function(t) {
			e.add(t.value);
		}), r && l !== null) for (var t = s; t <= c;) e.add(t), t += l;
		return Array.from(e);
	}, [
		s,
		c,
		l,
		r,
		n
	]);
	return /* @__PURE__ */ d.createElement("div", { className: `${t}-step` }, u.map(function(e) {
		return /* @__PURE__ */ d.createElement(V, {
			prefixCls: t,
			key: e,
			value: e,
			style: i,
			activeStyle: a
		});
	}));
}, H = function(t) {
	var n = t.prefixCls, r = t.style, i = t.start, o = t.end, s = t.index, c = t.onStartMove, l = t.replaceCls, u = d.useContext(R), f = u.direction, p = u.min, m = u.max, h = u.disabled, _ = u.range, v = u.classNames, y = `${n}-track`, b = P(i, p, m), x = P(o, p, m), S = function(e) {
		!h && c && c(e, -1);
	}, C = {};
	switch (f) {
		case "rtl":
			C.right = `${b * 100}%`, C.width = `${x * 100 - b * 100}%`;
			break;
		case "btt":
			C.bottom = `${b * 100}%`, C.height = `${x * 100 - b * 100}%`;
			break;
		case "ttb":
			C.top = `${b * 100}%`, C.height = `${x * 100 - b * 100}%`;
			break;
		default: C.left = `${b * 100}%`, C.width = `${x * 100 - b * 100}%`;
	}
	var w = l || (0, g.default)(y, a(a({}, `${y}-${s + 1}`, s !== null && _), `${n}-track-draggable`, c), v.track);
	return /* @__PURE__ */ d.createElement("div", {
		className: w,
		style: e(e({}, C), r),
		onMouseDown: S,
		onTouchStart: S
	});
}, se = function(t) {
	var n = t.prefixCls, r = t.style, i = t.values, a = t.startPoint, o = t.onStartMove, s = d.useContext(R), c = s.included, l = s.range, u = s.min, f = s.styles, p = s.classNames, m = d.useMemo(function() {
		if (!l) {
			if (i.length === 0) return [];
			var e = a ?? u, t = i[0];
			return [{
				start: Math.min(e, t),
				end: Math.max(e, t)
			}];
		}
		for (var n = [], r = 0; r < i.length - 1; r += 1) n.push({
			start: i[r],
			end: i[r + 1]
		});
		return n;
	}, [
		i,
		l,
		a,
		u
	]);
	if (!c) return null;
	var h = m != null && m.length && (p.tracks || f.tracks) ? /* @__PURE__ */ d.createElement(H, {
		index: null,
		prefixCls: n,
		start: m[0].start,
		end: m[m.length - 1].end,
		replaceCls: (0, g.default)(p.tracks, `${n}-tracks`),
		style: f.tracks
	}) : null;
	return /* @__PURE__ */ d.createElement(d.Fragment, null, h, m.map(function(t, i) {
		var a = t.start, s = t.end;
		return /* @__PURE__ */ d.createElement(H, {
			index: i,
			prefixCls: n,
			style: e(e({}, I(r, i)), f.track),
			start: a,
			end: s,
			key: i,
			onStartMove: o
		});
	}));
}, U = 130;
function ce(e) {
	var t = "targetTouches" in e ? e.targetTouches[0] : e;
	return {
		pageX: t.pageX,
		pageY: t.pageY
	};
}
function le(e, t, r, i, a, o, c, l, u, f, p) {
	var m = n(d.useState(null), 2), h = m[0], g = m[1], v = n(d.useState(-1), 2), y = v[0], x = v[1], S = n(d.useState(!1), 2), C = S[0], w = S[1], T = n(d.useState(r), 2), E = T[0], D = T[1], O = n(d.useState(r), 2), k = O[0], A = O[1], j = d.useRef(null), M = d.useRef(null), N = d.useRef(null), ee = d.useContext(z), P = ee.onDragStart, F = ee.onDragChange;
	b(function() {
		y === -1 && D(r);
	}, [r, y]), d.useEffect(function() {
		return function() {
			document.removeEventListener("mousemove", j.current), document.removeEventListener("mouseup", M.current), N.current && (N.current.removeEventListener("touchmove", j.current), N.current.removeEventListener("touchend", M.current));
		};
	}, []);
	var I = function(e, t, n) {
		t !== void 0 && g(t), D(e);
		var r = e;
		n && (r = e.filter(function(e, t) {
			return t !== y;
		})), c(r), F && F({
			rawValues: e,
			deleteIndex: n ? y : -1,
			draggingIndex: y,
			draggingValue: t
		});
	}, L = _(function(e, t, n) {
		if (e === -1) {
			var r = k[0], c = k[k.length - 1], l = i - r, d = a - c, f = t * (a - i);
			f = Math.max(f, l), f = Math.min(f, d), f = o(r + f) - r, I(k.map(function(e) {
				return e + f;
			}));
		} else {
			var p = (a - i) * t, m = s(E);
			m[e] = k[e];
			var h = u(m, p, e, "dist");
			I(h.values, h.value, n);
		}
	});
	return [
		y,
		h,
		C,
		d.useMemo(function() {
			var e = s(r).sort(function(e, t) {
				return e - t;
			}), t = s(E).sort(function(e, t) {
				return e - t;
			}), n = {};
			t.forEach(function(e) {
				n[e] = (n[e] || 0) + 1;
			}), e.forEach(function(e) {
				n[e] = (n[e] || 0) - 1;
			});
			var i = +!!f;
			return Object.values(n).reduce(function(e, t) {
				return e + Math.abs(t);
			}, 0) <= i ? E : r;
		}, [
			r,
			E,
			f
		]),
		function(n, i, a) {
			n.stopPropagation();
			var o = a || r, s = o[i];
			x(i), g(s), A(o), D(o), w(!1);
			var c = ce(n), u = c.pageX, d = c.pageY, m = !1;
			P && P({
				rawValues: o,
				draggingIndex: i,
				draggingValue: s
			});
			var h = function(n) {
				n.preventDefault();
				var r = ce(n), a = r.pageX, o = r.pageY, s = a - u, c = o - d, l = e.current.getBoundingClientRect(), h = l.width, g = l.height, _, v;
				switch (t) {
					case "btt":
						_ = -c / g, v = s;
						break;
					case "ttb":
						_ = c / g, v = s;
						break;
					case "rtl":
						_ = -s / h, v = c;
						break;
					default: _ = s / h, v = c;
				}
				m = f ? Math.abs(v) > U && p < E.length : !1, w(m), L(i, _, m);
			}, _ = function e(t) {
				t.preventDefault(), document.removeEventListener("mouseup", e), document.removeEventListener("mousemove", h), N.current && (N.current.removeEventListener("touchmove", j.current), N.current.removeEventListener("touchend", M.current)), j.current = null, M.current = null, N.current = null, l(m), x(-1), w(!1);
			};
			document.addEventListener("mouseup", _), document.addEventListener("mousemove", h), n.currentTarget.addEventListener("touchend", _), n.currentTarget.addEventListener("touchmove", h), j.current = h, M.current = _, N.current = n.currentTarget;
		}
	];
}
//#endregion
//#region node_modules/rc-slider/es/hooks/useOffset.js
function ue(e, t, n, r, i, a) {
	var o = d.useCallback(function(n) {
		return Math.max(e, Math.min(t, n));
	}, [e, t]), c = d.useCallback(function(r) {
		if (n !== null) {
			var i = e + Math.round((o(r) - e) / n) * n, a = function(e) {
				return (String(e).split(".")[1] || "").length;
			}, s = Math.max(a(n), a(t), a(e)), c = Number(i.toFixed(s));
			return e <= c && c <= t ? c : null;
		}
		return null;
	}, [
		n,
		e,
		t,
		o
	]), l = d.useCallback(function(i) {
		var a = o(i), s = r.map(function(e) {
			return e.value;
		});
		n !== null && s.push(c(i)), s.push(e, t);
		var l = s[0], u = t - e;
		return s.forEach(function(e) {
			var t = Math.abs(a - e);
			t <= u && (l = e, u = t);
		}), l;
	}, [
		e,
		t,
		r,
		n,
		o,
		c
	]), u = function i(a, o, l) {
		var u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit";
		if (typeof o == "number") {
			var d, f = a[l], p = f + o, m = [];
			r.forEach(function(e) {
				m.push(e.value);
			}), m.push(e, t), m.push(c(f));
			var h = o > 0 ? 1 : -1;
			u === "unit" ? m.push(c(f + h * n)) : m.push(c(p)), m = m.filter(function(e) {
				return e !== null;
			}).filter(function(e) {
				return o < 0 ? e <= f : e >= f;
			}), u === "unit" && (m = m.filter(function(e) {
				return e !== f;
			}));
			var g = u === "unit" ? f : p;
			d = m[0];
			var _ = Math.abs(d - g);
			if (m.forEach(function(e) {
				var t = Math.abs(e - g);
				t < _ && (d = e, _ = t);
			}), d === void 0) return o < 0 ? e : t;
			if (u === "dist") return d;
			if (Math.abs(o) > 1) {
				var v = s(a);
				return v[l] = d, i(v, o - h, l, u);
			}
			return d;
		} else if (o === "min") return e;
		else if (o === "max") return t;
	}, f = function(e, t, n) {
		var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", i = e[n], a = u(e, t, n, r);
		return {
			value: a,
			changed: a !== i
		};
	}, p = function(e) {
		return a === null && e === 0 || typeof a == "number" && e < a;
	};
	return [l, function(e, t, n) {
		var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "unit", o = e.map(l), s = o[n];
		if (o[n] = u(o, t, n, r), i === !1) {
			var c = a || 0;
			n > 0 && o[n - 1] !== s && (o[n] = Math.max(o[n], o[n - 1] + c)), n < o.length - 1 && o[n + 1] !== s && (o[n] = Math.min(o[n], o[n + 1] - c));
		} else if (typeof a == "number" || a === null) {
			for (var d = n + 1; d < o.length; d += 1) for (var m = !0; p(o[d] - o[d - 1]) && m;) {
				var h = f(o, 1, d);
				o[d] = h.value, m = h.changed;
			}
			for (var g = n; g > 0; --g) for (var _ = !0; p(o[g] - o[g - 1]) && _;) {
				var v = f(o, -1, g - 1);
				o[g - 1] = v.value, _ = v.changed;
			}
			for (var y = o.length - 1; y > 0; --y) for (var b = !0; p(o[y] - o[y - 1]) && b;) {
				var x = f(o, -1, y - 1);
				o[y - 1] = x.value, b = x.changed;
			}
			for (var S = 0; S < o.length - 1; S += 1) for (var C = !0; p(o[S + 1] - o[S]) && C;) {
				var w = f(o, 1, S + 1);
				o[S + 1] = w.value, C = w.changed;
			}
		}
		return {
			value: o[n],
			values: o
		};
	}];
}
//#endregion
//#region node_modules/rc-slider/es/hooks/useRange.js
function de(e) {
	return f(function() {
		if (e === !0 || !e) return [
			!!e,
			!1,
			!1,
			0
		];
		var t = e.editable, n = e.draggableTrack, r = e.minCount, i = e.maxCount;
		return process.env.NODE_ENV !== "production" && O(!t || !n, "`editable` can not work with `draggableTrack`."), [
			!0,
			t,
			!t && n,
			r || 0,
			i
		];
	}, [e]);
}
//#endregion
//#region node_modules/rc-slider/es/Slider.js
var fe = /* @__PURE__ */ d.forwardRef(function(r, i) {
	var o = r.prefixCls, c = o === void 0 ? "rc-slider" : o, l = r.className, u = r.style, f = r.classNames, p = r.styles, m = r.id, h = r.disabled, v = h === void 0 ? !1 : h, y = r.keyboard, b = y === void 0 ? !0 : y, x = r.autoFocus, S = r.onFocus, C = r.onBlur, T = r.min, E = T === void 0 ? 0 : T, D = r.max, O = D === void 0 ? 100 : D, k = r.step, A = k === void 0 ? 1 : k, j = r.value, N = r.defaultValue, P = r.range, F = r.count, I = r.onChange, L = r.onBeforeChange, z = r.onAfterChange, te = r.onChangeComplete, B = r.allowCross, ne = B === void 0 ? !0 : B, ie = r.pushable, V = ie === void 0 ? !1 : ie, H = r.reverse, U = r.vertical, ce = r.included, fe = ce === void 0 ? !0 : ce, pe = r.startPoint, me = r.trackStyle, he = r.handleStyle, ge = r.railStyle, _e = r.dotStyle, ve = r.activeDotStyle, ye = r.marks, be = r.dots, xe = r.handleRender, Se = r.activeHandleRender, Ce = r.track, we = r.tabIndex, Te = we === void 0 ? 0 : we, Ee = r.ariaLabelForHandle, De = r.ariaLabelledByForHandle, Oe = r.ariaRequired, ke = r.ariaValueTextFormatterForHandle, W = d.useRef(null), Ae = d.useRef(null), je = d.useMemo(function() {
		return U ? H ? "ttb" : "btt" : H ? "rtl" : "ltr";
	}, [H, U]), G = n(de(P), 5), K = G[0], Me = G[1], Ne = G[2], Pe = G[3], Fe = G[4], q = d.useMemo(function() {
		return isFinite(E) ? E : 0;
	}, [E]), J = d.useMemo(function() {
		return isFinite(O) ? O : 100;
	}, [O]), Y = d.useMemo(function() {
		return A !== null && A <= 0 ? 1 : A;
	}, [A]), Ie = d.useMemo(function() {
		return typeof V == "boolean" ? V ? Y : !1 : V >= 0 ? V : !1;
	}, [V, Y]), Le = d.useMemo(function() {
		return Object.keys(ye || {}).map(function(e) {
			var n = ye[e], r = { value: Number(e) };
			return n && t(n) === "object" && !/* @__PURE__ */ d.isValidElement(n) && ("label" in n || "style" in n) ? (r.style = n.style, r.label = n.label) : r.label = n, r;
		}).filter(function(e) {
			var t = e.label;
			return t || typeof t == "number";
		}).sort(function(e, t) {
			return e.value - t.value;
		});
	}, [ye]), Re = n(ue(q, J, Y, Le, ne, Ie), 2), ze = Re[0], Be = Re[1], Ve = n(w(N, { value: j }), 2), X = Ve[0], He = Ve[1], Z = d.useMemo(function() {
		var e = X == null ? [] : Array.isArray(X) ? X : [X], t = n(e, 1)[0], r = X === null ? [] : [t === void 0 ? q : t];
		if (K) {
			if (r = s(e), F || X === void 0) {
				var i = F >= 0 ? F + 1 : 2;
				for (r = r.slice(0, i); r.length < i;) r.push(r[r.length - 1] ?? q);
			}
			r.sort(function(e, t) {
				return e - t;
			});
		}
		return r.forEach(function(e, t) {
			r[t] = ze(e);
		}), r;
	}, [
		X,
		K,
		q,
		F,
		ze
	]), Q = function(e) {
		return K ? e : e[0];
	}, Ue = _(function(e) {
		var t = s(e).sort(function(e, t) {
			return e - t;
		});
		I && !ee(t, Z, !0) && I(Q(t)), He(t);
	}), We = _(function(e) {
		e && W.current.hideHelp();
		var t = Q(Z);
		z?.(t), M(!z, "[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."), te?.(t);
	}), Ge = function(e) {
		if (!(v || !Me || Z.length <= Pe)) {
			var t = s(Z);
			t.splice(e, 1), L?.(Q(t)), Ue(t);
			var n = Math.max(0, e - 1);
			W.current.hideHelp(), W.current.focus(n);
		}
	}, $ = n(le(Ae, je, Z, q, J, ze, Ue, We, Be, Me, Pe), 5), Ke = $[0], qe = $[1], Je = $[2], Ye = $[3], Xe = $[4], Ze = function(e, t) {
		if (!v) {
			var n = s(Z), r = 0, i = 0, a = J - q;
			Z.forEach(function(t, n) {
				var o = Math.abs(e - t);
				o <= a && (a = o, r = n), t < e && (i = n);
			});
			var o = r;
			Me && a !== 0 && (!Fe || Z.length < Fe) ? (n.splice(i + 1, 0, e), o = i + 1) : n[r] = e, K && !Z.length && F === void 0 && n.push(e);
			var c = Q(n);
			if (L?.(c), Ue(n), t) {
				var l, u;
				(l = document.activeElement) == null || (u = l.blur) == null || u.call(l), W.current.focus(o), Xe(t, o, n);
			} else z?.(c), M(!z, "[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."), te?.(c);
		}
	}, Qe = function(e) {
		e.preventDefault();
		var t = Ae.current.getBoundingClientRect(), n = t.width, r = t.height, i = t.left, a = t.top, o = t.bottom, s = t.right, c = e.clientX, l = e.clientY, u;
		switch (je) {
			case "btt":
				u = (o - l) / r;
				break;
			case "ttb":
				u = (l - a) / r;
				break;
			case "rtl":
				u = (s - c) / n;
				break;
			default: u = (c - i) / n;
		}
		Ze(ze(q + u * (J - q)), e);
	}, $e = n(d.useState(null), 2), et = $e[0], tt = $e[1], nt = function(e, t) {
		if (!v) {
			var n = Be(Z, e, t);
			L?.(Q(Z)), Ue(n.values), tt(n.value);
		}
	};
	d.useEffect(function() {
		if (et !== null) {
			var e = Z.indexOf(et);
			e >= 0 && W.current.focus(e);
		}
		tt(null);
	}, [et]);
	var rt = d.useMemo(function() {
		return Ne && Y === null ? (process.env.NODE_ENV !== "production" && M(!1, "`draggableTrack` is not supported when `step` is `null`."), !1) : Ne;
	}, [Ne, Y]), it = _(function(e, t) {
		Xe(e, t), L?.(Q(Z));
	}), at = Ke !== -1;
	d.useEffect(function() {
		if (!at) {
			var e = Z.lastIndexOf(qe);
			W.current.focus(e);
		}
	}, [at]);
	var ot = d.useMemo(function() {
		return s(Ye).sort(function(e, t) {
			return e - t;
		});
	}, [Ye]), st = n(d.useMemo(function() {
		return K ? [ot[0], ot[ot.length - 1]] : [q, ot[0]];
	}, [
		ot,
		K,
		q
	]), 2), ct = st[0], lt = st[1];
	d.useImperativeHandle(i, function() {
		return {
			focus: function() {
				W.current.focus(0);
			},
			blur: function() {
				var e, t = document.activeElement;
				(e = Ae.current) != null && e.contains(t) && t?.blur();
			}
		};
	}), d.useEffect(function() {
		x && W.current.focus(0);
	}, []);
	var ut = d.useMemo(function() {
		return {
			min: q,
			max: J,
			direction: je,
			disabled: v,
			keyboard: b,
			step: Y,
			included: fe,
			includedStart: ct,
			includedEnd: lt,
			range: K,
			tabIndex: Te,
			ariaLabelForHandle: Ee,
			ariaLabelledByForHandle: De,
			ariaRequired: Oe,
			ariaValueTextFormatterForHandle: ke,
			styles: p || {},
			classNames: f || {}
		};
	}, [
		q,
		J,
		je,
		v,
		b,
		Y,
		fe,
		ct,
		lt,
		K,
		Te,
		Ee,
		De,
		Oe,
		ke,
		p,
		f
	]);
	return /* @__PURE__ */ d.createElement(R.Provider, { value: ut }, /* @__PURE__ */ d.createElement("div", {
		ref: Ae,
		className: (0, g.default)(c, l, a(a(a(a({}, `${c}-disabled`, v), `${c}-vertical`, U), `${c}-horizontal`, !U), `${c}-with-marks`, Le.length)),
		style: u,
		onMouseDown: Qe,
		id: m
	}, /* @__PURE__ */ d.createElement("div", {
		className: (0, g.default)(`${c}-rail`, f?.rail),
		style: e(e({}, ge), p?.rail)
	}), Ce !== !1 && /* @__PURE__ */ d.createElement(se, {
		prefixCls: c,
		style: me,
		values: Z,
		startPoint: pe,
		onStartMove: rt ? it : void 0
	}), /* @__PURE__ */ d.createElement(oe, {
		prefixCls: c,
		marks: Le,
		dots: be,
		style: _e,
		activeStyle: ve
	}), /* @__PURE__ */ d.createElement(re, {
		ref: W,
		prefixCls: c,
		style: he,
		values: Ye,
		draggingIndex: Ke,
		draggingDelete: Je,
		onStartMove: it,
		onOffsetChange: nt,
		onFocus: S,
		onBlur: C,
		handleRender: xe,
		activeHandleRender: Se,
		onChangeComplete: We,
		onDelete: Me ? Ge : void 0
	}), /* @__PURE__ */ d.createElement(ae, {
		prefixCls: c,
		marks: Le,
		onClick: Ze
	})));
});
process.env.NODE_ENV !== "production" && (fe.displayName = "Slider");
//#endregion
//#region node_modules/rc-slider/es/index.js
var pe = fe, me = u("h-1", {
	variants: { variant: {
		red: "bg-accent-red!",
		blue: "bg-primary-blue-400!",
		black: "bg-primary-gray-600! dark:bg-primary-gray-200!",
		custom: "bg-custom-color-400!"
	} },
	defaultVariants: { variant: "red" }
}), he = u("rounded-full border-2 opacity-100!", {
	variants: { variant: {
		red: "border-accent-red! bg-accent-red!",
		blue: "border-primary-blue-600! bg-primary-blue-600!",
		black: "border-primary-gray-600! bg-primary-gray-600! dark:border-primary-gray-200! dark:bg-primary-gray-200!",
		custom: "bg-custom-color-600! border-custom-color-600!"
	} },
	defaultVariants: { variant: "red" }
});
function ge(e) {
	let { min: t = 0, max: n = 100, disabled: r, trackClassName: i, className: a, railClassName: o, sliderClassName: s, handleClassName: c, variant: u, showHandleValue: d = !1 } = e;
	return /* @__PURE__ */ p("div", {
		className: l("w-full py-6 px-4", a),
		children: /* @__PURE__ */ p(pe, {
			...e,
			min: t,
			max: n,
			handleRender: (e, t) => /* @__PURE__ */ m("div", { children: [e, d ? /* @__PURE__ */ p("div", {
				className: "px-1 bg-primary-gray-200 text-primary-black dark:text-primary-white dark:bg-primary-gray-650 border border-primary-gray-200 dark:border-primary-gray-600 text-sm mb-4",
				style: {
					left: e.props.style?.left,
					position: "absolute",
					textAlign: "center",
					transform: "translateX(-50%) translateY(calc(-100% - 12px))"
				},
				children: t.value
			}) : null] }),
			className: l("h-2", r ? "opacity-50 cursor-not-allowed" : "cursor-pointer", s),
			classNames: {
				rail: l("bg-primary-gray-300! h-1 dark:bg-primary-gray-550!", o),
				track: l(me({ variant: u }), i),
				handle: l(he({ variant: u }), c)
			},
			dotStyle: { borderColor: "var(--gray-400)" },
			activeDotStyle: { borderColor: u === "blue" ? "var(--blue-400)" : u === "black" ? "var(--gray-550)" : "var(--red)" }
		})
	});
}
//#endregion
export { ge as t };

//# sourceMappingURL=slider-Co1IepdM.js.map