antd-mobile
Version:
<div align="center">
1,535 lines • 645 kB
JavaScript
import * as D from "react";
import s, { useContext as at, useRef as W, useMemo as me, useEffect as J, useState as X, useCallback as Qe, useLayoutEffect as Ja, forwardRef as Ee, useImperativeHandle as _e, memo as Ue, version as fm, isValidElement as bn, createContext as ul, cloneElement as dm } from "react";
import Fa, { unstable_batchedUpdates as Mf, createPortal as mm } from "react-dom";
const Ar = !!(typeof window < "u" && typeof document < "u" && window.document && window.document.createElement);
Ar && document.addEventListener("touchstart", () => {
}, !0);
var Ra = function() {
return Ra = Object.assign || function(e) {
for (var n, r = 1, i = arguments.length; r < i; r++) {
n = arguments[r];
for (var a in n)
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
}
return e;
}, Ra.apply(this, arguments);
};
function dn(t, e) {
var n = {};
for (var r in t)
Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
if (t != null && typeof Object.getOwnPropertySymbols == "function")
for (var i = 0, r = Object.getOwnPropertySymbols(t); i < r.length; i++)
e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[i]) && (n[r[i]] = t[r[i]]);
return n;
}
function Ae(t, e, n, r) {
function i(a) {
return a instanceof n ? a : new n(function(o) {
o(a);
});
}
return new (n || (n = Promise))(function(a, o) {
function l(f) {
try {
u(r.next(f));
} catch (d) {
o(d);
}
}
function c(f) {
try {
u(r.throw(f));
} catch (d) {
o(d);
}
}
function u(f) {
f.done ? a(f.value) : i(f.value).then(l, c);
}
u((r = r.apply(t, e || [])).next());
});
}
function hm(t, e) {
var n = { label: 0, sent: function() {
if (a[0] & 1)
throw a[1];
return a[1];
}, trys: [], ops: [] }, r, i, a, o;
return o = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
return this;
}), o;
function l(u) {
return function(f) {
return c([u, f]);
};
}
function c(u) {
if (r)
throw new TypeError("Generator is already executing.");
for (; o && (o = 0, u[0] && (n = 0)), n; )
try {
if (r = 1, i && (a = u[0] & 2 ? i.return : u[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, u[1])).done)
return a;
switch (i = 0, a && (u = [u[0] & 2, a.value]), u[0]) {
case 0:
case 1:
a = u;
break;
case 4:
return n.label++, { value: u[1], done: !1 };
case 5:
n.label++, i = u[1], u = [0];
continue;
case 7:
u = n.ops.pop(), n.trys.pop();
continue;
default:
if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (u[0] === 6 || u[0] === 2)) {
n = 0;
continue;
}
if (u[0] === 3 && (!a || u[1] > a[0] && u[1] < a[3])) {
n.label = u[1];
break;
}
if (u[0] === 6 && n.label < a[1]) {
n.label = a[1], a = u;
break;
}
if (a && n.label < a[2]) {
n.label = a[2], n.ops.push(u);
break;
}
a[2] && n.ops.pop(), n.trys.pop();
continue;
}
u = e.call(t, n);
} catch (f) {
u = [6, f], i = 0;
} finally {
r = a = 0;
}
if (u[0] & 5)
throw u[1];
return { value: u[0] ? u[1] : void 0, done: !0 };
}
}
function vm(t) {
var e = typeof Symbol == "function" && Symbol.iterator, n = e && t[e], r = 0;
if (n)
return n.call(t);
if (t && typeof t.length == "number")
return {
next: function() {
return t && r >= t.length && (t = void 0), { value: t && t[r++], done: !t };
}
};
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function Lt(t, e) {
var n = typeof Symbol == "function" && t[Symbol.iterator];
if (!n)
return t;
var r = n.call(t), i, a = [], o;
try {
for (; (e === void 0 || e-- > 0) && !(i = r.next()).done; )
a.push(i.value);
} catch (l) {
o = { error: l };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (o)
throw o.error;
}
}
return a;
}
function fl(t, e, n) {
if (n || arguments.length === 2)
for (var r = 0, i = e.length, a; r < i; r++)
(a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
return t.concat(a || Array.prototype.slice.call(e));
}
const Je = "${label}不是一个有效的${type}", pm = {
locale: "zh-CH",
common: {
confirm: "确定",
cancel: "取消",
loading: "加载中",
close: "关闭"
},
Calendar: {
title: "日期选择",
confirm: "确认",
start: "开始",
end: "结束",
startAndEnd: "开始/结束",
today: "今日",
markItems: ["一", "二", "三", "四", "五", "六", "日"],
yearAndMonth: "${year}年${month}月"
},
Cascader: {
placeholder: "请选择"
},
Dialog: {
ok: "我知道了"
},
DatePicker: {
tillNow: "至今"
},
ErrorBlock: {
default: {
title: "页面遇到一些小问题",
description: "待会来试试"
},
busy: {
title: "前方拥堵",
description: "刷新试试"
},
disconnected: {
title: "网络有点忙",
description: "动动手指帮忙修复"
},
empty: {
title: "没有找到你需要的东西",
description: "找找其他的吧"
}
},
Form: {
required: "必填",
optional: "选填",
defaultValidateMessages: {
default: "字段验证错误${label}",
required: "请输入${label}",
enum: "${label}必须是其中一个[${enum}]",
whitespace: "${label}不能为空字符",
date: {
format: "${label}日期格式无效",
parse: "${label}不能转换为日期",
invalid: "${label}是一个无效日期"
},
types: {
string: Je,
method: Je,
array: Je,
object: Je,
number: Je,
date: Je,
boolean: Je,
integer: Je,
float: Je,
regexp: Je,
email: Je,
url: Je,
hex: Je
},
string: {
len: "${label}须为${len}个字符",
min: "${label}最少${min}个字符",
max: "${label}最多${max}个字符",
range: "${label}须在${min}-${max}字符之间"
},
number: {
len: "${label}必须等于${len}",
min: "${label}最小值为${min}",
max: "${label}最大值为${max}",
range: "${label}须在${min}-${max}之间"
},
array: {
len: "须为${len}个${label}",
min: "最少${min}个${label}",
max: "最多${max}个${label}",
range: "${label}数量须在${min}-${max}之间"
},
pattern: {
mismatch: "${label}与模式不匹配${pattern}"
}
}
},
ImageUploader: {
uploading: "上传中...",
upload: "上传"
},
InfiniteScroll: {
noMore: "没有更多了",
failedToLoad: "加载失败",
retry: "重新加载"
},
Input: {
clear: "清除"
},
Mask: {
name: "背景蒙层"
},
Modal: {
ok: "我知道了"
},
PasscodeInput: {
name: "密码输入框"
},
PullToRefresh: {
pulling: "下拉刷新",
canRelease: "释放立即刷新",
complete: "刷新成功"
},
SearchBar: {
name: "搜索框"
},
Slider: {
name: "滑动输入条"
},
Stepper: {
decrease: "减少",
increase: "增加"
},
Switch: {
name: "开关"
},
Selector: {
name: "选择组"
}
}, gm = pm, Af = {
current: {
locale: gm
}
};
function W9(t) {
Af.current = t;
}
function Ai() {
return Af.current;
}
const Tf = s.createContext(null), Z9 = (t) => {
const {
children: e
} = t, n = dn(t, ["children"]), r = de();
return s.createElement(Tf.Provider, {
value: Object.assign(Object.assign({}, r), n)
}, e);
};
function de() {
var t;
return (t = at(Tf)) !== null && t !== void 0 ? t : Ai();
}
function pe(t, e) {
const n = t;
for (const r in e)
e.hasOwnProperty(r) && (n[r] = e[r]);
return n;
}
var ht = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function St(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var If = { exports: {} };
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
(function(t) {
(function() {
var e = {}.hasOwnProperty;
function n() {
for (var r = [], i = 0; i < arguments.length; i++) {
var a = arguments[i];
if (a) {
var o = typeof a;
if (o === "string" || o === "number")
r.push(a);
else if (Array.isArray(a)) {
if (a.length) {
var l = n.apply(null, a);
l && r.push(l);
}
} else if (o === "object") {
if (a.toString !== Object.prototype.toString && !a.toString.toString().includes("[native code]")) {
r.push(a.toString());
continue;
}
for (var c in a)
e.call(a, c) && a[c] && r.push(c);
}
}
}
return r.join(" ");
}
t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
})();
})(If);
var ym = If.exports;
const Z = /* @__PURE__ */ St(ym);
function H(t, e) {
const n = Object.assign({}, e.props);
t.className && (n.className = Z(e.props.className, t.className)), t.style && (n.style = Object.assign(Object.assign({}, n.style), t.style)), t.tabIndex !== void 0 && (n.tabIndex = t.tabIndex);
for (const r in t)
t.hasOwnProperty(r) && (r.startsWith("data-") || r.startsWith("aria-")) && (n[r] = t[r]);
return s.cloneElement(e, n);
}
function G(...t) {
const e = {};
return t.forEach((n) => {
n && Object.keys(n).forEach((r) => {
n[r] !== void 0 && (e[r] = n[r]);
});
}), e;
}
function En(t, ...e) {
for (let n = e.length - 1; n >= 0; n -= 1)
if (e[n] !== void 0)
return e[n];
return t;
}
var Lf = function(t) {
return function(e, n) {
var r = W(!1);
t(function() {
return function() {
r.current = !1;
};
}, []), t(function() {
if (!r.current)
r.current = !0;
else
return e();
}, n);
};
}, Tr = function(t) {
return typeof t == "function";
}, bm = function(t) {
return typeof t == "number";
}, Em = !1;
const Ti = Em;
function Gt(t) {
Ti && (Tr(t) || console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof t)));
var e = W(t);
e.current = me(function() {
return t;
}, [t]);
var n = W();
return n.current || (n.current = function() {
for (var r = [], i = 0; i < arguments.length; i++)
r[i] = arguments[i];
return e.current.apply(this, r);
}), n.current;
}
const dl = Lf(J);
function Sc(t, e) {
if (t === e)
return !0;
for (var n = 0; n < t.length; n++)
if (!Object.is(t[n], e[n]))
return !1;
return !0;
}
function eo(t) {
var e = W(t);
return e.current = t, e;
}
var wm = function(t) {
Ti && (Tr(t) || console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));
var e = eo(t);
J(function() {
return function() {
e.current();
};
}, []);
};
const Ii = wm;
function Cm(t) {
var e = typeof t;
return t != null && (e == "object" || e == "function");
}
var ml = Cm, xm = typeof ht == "object" && ht && ht.Object === Object && ht, km = xm, _m = km, $m = typeof self == "object" && self && self.Object === Object && self, Sm = _m || $m || Function("return this")(), Df = Sm, Om = Df, Fm = function() {
return Om.Date.now();
}, Rm = Fm, Nm = /\s/;
function Pm(t) {
for (var e = t.length; e-- && Nm.test(t.charAt(e)); )
;
return e;
}
var Mm = Pm, Am = Mm, Tm = /^\s+/;
function Im(t) {
return t && t.slice(0, Am(t) + 1).replace(Tm, "");
}
var Lm = Im, Dm = Df, Vm = Dm.Symbol, Vf = Vm, Oc = Vf, jf = Object.prototype, jm = jf.hasOwnProperty, Bm = jf.toString, Hr = Oc ? Oc.toStringTag : void 0;
function Wm(t) {
var e = jm.call(t, Hr), n = t[Hr];
try {
t[Hr] = void 0;
var r = !0;
} catch {
}
var i = Bm.call(t);
return r && (e ? t[Hr] = n : delete t[Hr]), i;
}
var Zm = Wm, qm = Object.prototype, Hm = qm.toString;
function Um(t) {
return Hm.call(t);
}
var zm = Um, Fc = Vf, Km = Zm, Ym = zm, Gm = "[object Null]", Xm = "[object Undefined]", Rc = Fc ? Fc.toStringTag : void 0;
function Qm(t) {
return t == null ? t === void 0 ? Xm : Gm : Rc && Rc in Object(t) ? Km(t) : Ym(t);
}
var Jm = Qm;
function eh(t) {
return t != null && typeof t == "object";
}
var th = eh, nh = Jm, rh = th, ih = "[object Symbol]";
function ah(t) {
return typeof t == "symbol" || rh(t) && nh(t) == ih;
}
var oh = ah, sh = Lm, Nc = ml, lh = oh, Pc = NaN, ch = /^[-+]0x[0-9a-f]+$/i, uh = /^0b[01]+$/i, fh = /^0o[0-7]+$/i, dh = parseInt;
function mh(t) {
if (typeof t == "number")
return t;
if (lh(t))
return Pc;
if (Nc(t)) {
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
t = Nc(e) ? e + "" : e;
}
if (typeof t != "string")
return t === 0 ? t : +t;
t = sh(t);
var n = uh.test(t);
return n || fh.test(t) ? dh(t.slice(2), n ? 2 : 8) : ch.test(t) ? Pc : +t;
}
var hh = mh, vh = ml, Do = Rm, Mc = hh, ph = "Expected a function", gh = Math.max, yh = Math.min;
function bh(t, e, n) {
var r, i, a, o, l, c, u = 0, f = !1, d = !1, m = !0;
if (typeof t != "function")
throw new TypeError(ph);
e = Mc(e) || 0, vh(n) && (f = !!n.leading, d = "maxWait" in n, a = d ? gh(Mc(n.maxWait) || 0, e) : a, m = "trailing" in n ? !!n.trailing : m);
function v(C) {
var k = r, O = i;
return r = i = void 0, u = C, o = t.apply(O, k), o;
}
function b(C) {
return u = C, l = setTimeout(h, e), f ? v(C) : o;
}
function y(C) {
var k = C - c, O = C - u, P = e - k;
return d ? yh(P, a - O) : P;
}
function g(C) {
var k = C - c, O = C - u;
return c === void 0 || k >= e || k < 0 || d && O >= a;
}
function h() {
var C = Do();
if (g(C))
return x(C);
l = setTimeout(h, y(C));
}
function x(C) {
return l = void 0, m && r ? v(C) : (r = i = void 0, o);
}
function p() {
l !== void 0 && clearTimeout(l), u = 0, r = c = i = l = void 0;
}
function E() {
return l === void 0 ? o : x(Do());
}
function w() {
var C = Do(), k = g(C);
if (r = arguments, i = this, c = C, k) {
if (l === void 0)
return b(c);
if (d)
return clearTimeout(l), l = setTimeout(h, e), v(c);
}
return l === void 0 && (l = setTimeout(h, e)), o;
}
return w.cancel = p, w.flush = E, w;
}
var Bf = bh;
const Eh = /* @__PURE__ */ St(Bf);
var wh = !!(typeof window < "u" && window.document && window.document.createElement);
const hl = wh;
var Ch = Bf, xh = ml, kh = "Expected a function";
function _h(t, e, n) {
var r = !0, i = !0;
if (typeof t != "function")
throw new TypeError(kh);
return xh(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), Ch(t, e, {
leading: r,
maxWait: e,
trailing: i
});
}
var $h = _h;
const Sh = /* @__PURE__ */ St($h);
var Oh = function(t) {
Ti && (Tr(t) || console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t, '".'))), J(function() {
t == null || t();
}, []);
};
const Fh = Oh;
var Rh = function() {
var t = Lt(X({}), 2), e = t[1];
return Qe(function() {
return e({});
}, []);
};
const Wf = Rh;
function mn(t, e) {
if (hl) {
if (!t)
return e;
var n;
return Tr(t) ? n = t() : "current" in t ? n = t.current : n = t, n;
}
}
var Nh = function(t) {
return t.every(function(e) {
var n = mn(e);
if (!n)
return !1;
if (n.getRootNode() instanceof ShadowRoot)
return !0;
});
}, Ph = function(t) {
return t ? t.getRootNode() : document;
}, Mh = function(t) {
if (!t || !document.getRootNode)
return document;
var e = Array.isArray(t) ? t : [t];
return Nh(e) ? Ph(mn(e[0])) : document;
};
const Ah = Mh;
var Th = function(t) {
var e = function(n, r, i) {
var a = W(!1), o = W([]), l = W([]), c = W();
t(function() {
var u, f = Array.isArray(i) ? i : [i], d = f.map(function(m) {
return mn(m);
});
if (!a.current) {
a.current = !0, o.current = d, l.current = r, c.current = n();
return;
}
(d.length !== o.current.length || !Sc(d, o.current) || !Sc(r, l.current)) && ((u = c.current) === null || u === void 0 || u.call(c), o.current = d, l.current = r, c.current = n());
}), Ii(function() {
var u;
(u = c.current) === null || u === void 0 || u.call(c), a.current = !1;
});
};
return e;
};
const Zf = Th;
var Ih = Zf(J);
const vl = Ih;
function qf(t, e, n) {
n === void 0 && (n = "click");
var r = eo(t);
vl(function() {
var i = function(l) {
var c = Array.isArray(e) ? e : [e];
c.some(function(u) {
var f = mn(u);
return !f || f.contains(l.target);
}) || r.current(l);
}, a = Ah(e), o = Array.isArray(n) ? n : [n];
return o.forEach(function(l) {
return a.addEventListener(l, i);
}), function() {
o.forEach(function(l) {
return a.removeEventListener(l, i);
});
};
}, Array.isArray(n) ? n : [n], e);
}
var Hf = { exports: {} };
(function(t, e) {
(function(n, r) {
t.exports = r();
})(ht, function() {
var n = 1e3, r = 6e4, i = 36e5, a = "millisecond", o = "second", l = "minute", c = "hour", u = "day", f = "week", d = "month", m = "quarter", v = "year", b = "date", y = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
var R = ["th", "st", "nd", "rd"], T = M % 100;
return "[" + M + (R[(T - 20) % 10] || R[T] || R[0]) + "]";
} }, p = function(M, R, T) {
var N = String(M);
return !N || N.length >= R ? M : "" + Array(R + 1 - N.length).join(T) + M;
}, E = { s: p, z: function(M) {
var R = -M.utcOffset(), T = Math.abs(R), N = Math.floor(T / 60), $ = T % 60;
return (R <= 0 ? "+" : "-") + p(N, 2, "0") + ":" + p($, 2, "0");
}, m: function M(R, T) {
if (R.date() < T.date())
return -M(T, R);
var N = 12 * (T.year() - R.year()) + (T.month() - R.month()), $ = R.clone().add(N, d), A = T - $ < 0, _ = R.clone().add(N + (A ? -1 : 1), d);
return +(-(N + (T - $) / (A ? $ - _ : _ - $)) || 0);
}, a: function(M) {
return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
}, p: function(M) {
return { M: d, y: v, w: f, d: u, D: b, h: c, m: l, s: o, ms: a, Q: m }[M] || String(M || "").toLowerCase().replace(/s$/, "");
}, u: function(M) {
return M === void 0;
} }, w = "en", C = {};
C[w] = x;
var k = function(M) {
return M instanceof V;
}, O = function M(R, T, N) {
var $;
if (!R)
return w;
if (typeof R == "string") {
var A = R.toLowerCase();
C[A] && ($ = A), T && (C[A] = T, $ = A);
var _ = R.split("-");
if (!$ && _.length > 1)
return M(_[0]);
} else {
var F = R.name;
C[F] = R, $ = F;
}
return !N && $ && (w = $), $ || !N && w;
}, P = function(M, R) {
if (k(M))
return M.clone();
var T = typeof R == "object" ? R : {};
return T.date = M, T.args = arguments, new V(T);
}, S = E;
S.l = O, S.i = k, S.w = function(M, R) {
return P(M, { locale: R.$L, utc: R.$u, x: R.$x, $offset: R.$offset });
};
var V = function() {
function M(T) {
this.$L = O(T.locale, null, !0), this.parse(T);
}
var R = M.prototype;
return R.parse = function(T) {
this.$d = function(N) {
var $ = N.date, A = N.utc;
if ($ === null)
return /* @__PURE__ */ new Date(NaN);
if (S.u($))
return /* @__PURE__ */ new Date();
if ($ instanceof Date)
return new Date($);
if (typeof $ == "string" && !/Z$/i.test($)) {
var _ = $.match(g);
if (_) {
var F = _[2] - 1 || 0, L = (_[7] || "0").substring(0, 3);
return A ? new Date(Date.UTC(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, L)) : new Date(_[1], F, _[3] || 1, _[4] || 0, _[5] || 0, _[6] || 0, L);
}
}
return new Date($);
}(T), this.$x = T.x || {}, this.init();
}, R.init = function() {
var T = this.$d;
this.$y = T.getFullYear(), this.$M = T.getMonth(), this.$D = T.getDate(), this.$W = T.getDay(), this.$H = T.getHours(), this.$m = T.getMinutes(), this.$s = T.getSeconds(), this.$ms = T.getMilliseconds();
}, R.$utils = function() {
return S;
}, R.isValid = function() {
return this.$d.toString() !== y;
}, R.isSame = function(T, N) {
var $ = P(T);
return this.startOf(N) <= $ && $ <= this.endOf(N);
}, R.isAfter = function(T, N) {
return P(T) < this.startOf(N);
}, R.isBefore = function(T, N) {
return this.endOf(N) < P(T);
}, R.$g = function(T, N, $) {
return S.u(T) ? this[N] : this.set($, T);
}, R.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, R.valueOf = function() {
return this.$d.getTime();
}, R.startOf = function(T, N) {
var $ = this, A = !!S.u(N) || N, _ = S.p(T), F = function(ce, re) {
var Y = S.w($.$u ? Date.UTC($.$y, re, ce) : new Date($.$y, re, ce), $);
return A ? Y : Y.endOf(u);
}, L = function(ce, re) {
return S.w($.toDate()[ce].apply($.toDate("s"), (A ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(re)), $);
}, B = this.$W, j = this.$M, q = this.$D, z = "set" + (this.$u ? "UTC" : "");
switch (_) {
case v:
return A ? F(1, 0) : F(31, 11);
case d:
return A ? F(1, j) : F(0, j + 1);
case f:
var U = this.$locale().weekStart || 0, ne = (B < U ? B + 7 : B) - U;
return F(A ? q - ne : q + (6 - ne), j);
case u:
case b:
return L(z + "Hours", 0);
case c:
return L(z + "Minutes", 1);
case l:
return L(z + "Seconds", 2);
case o:
return L(z + "Milliseconds", 3);
default:
return this.clone();
}
}, R.endOf = function(T) {
return this.startOf(T, !1);
}, R.$set = function(T, N) {
var $, A = S.p(T), _ = "set" + (this.$u ? "UTC" : ""), F = ($ = {}, $[u] = _ + "Date", $[b] = _ + "Date", $[d] = _ + "Month", $[v] = _ + "FullYear", $[c] = _ + "Hours", $[l] = _ + "Minutes", $[o] = _ + "Seconds", $[a] = _ + "Milliseconds", $)[A], L = A === u ? this.$D + (N - this.$W) : N;
if (A === d || A === v) {
var B = this.clone().set(b, 1);
B.$d[F](L), B.init(), this.$d = B.set(b, Math.min(this.$D, B.daysInMonth())).$d;
} else
F && this.$d[F](L);
return this.init(), this;
}, R.set = function(T, N) {
return this.clone().$set(T, N);
}, R.get = function(T) {
return this[S.p(T)]();
}, R.add = function(T, N) {
var $, A = this;
T = Number(T);
var _ = S.p(N), F = function(j) {
var q = P(A);
return S.w(q.date(q.date() + Math.round(j * T)), A);
};
if (_ === d)
return this.set(d, this.$M + T);
if (_ === v)
return this.set(v, this.$y + T);
if (_ === u)
return F(1);
if (_ === f)
return F(7);
var L = ($ = {}, $[l] = r, $[c] = i, $[o] = n, $)[_] || 1, B = this.$d.getTime() + T * L;
return S.w(B, this);
}, R.subtract = function(T, N) {
return this.add(-1 * T, N);
}, R.format = function(T) {
var N = this, $ = this.$locale();
if (!this.isValid())
return $.invalidDate || y;
var A = T || "YYYY-MM-DDTHH:mm:ssZ", _ = S.z(this), F = this.$H, L = this.$m, B = this.$M, j = $.weekdays, q = $.months, z = $.meridiem, U = function(re, Y, te, ee) {
return re && (re[Y] || re(N, A)) || te[Y].slice(0, ee);
}, ne = function(re) {
return S.s(F % 12 || 12, re, "0");
}, ce = z || function(re, Y, te) {
var ee = re < 12 ? "AM" : "PM";
return te ? ee.toLowerCase() : ee;
};
return A.replace(h, function(re, Y) {
return Y || function(te) {
switch (te) {
case "YY":
return String(N.$y).slice(-2);
case "YYYY":
return S.s(N.$y, 4, "0");
case "M":
return B + 1;
case "MM":
return S.s(B + 1, 2, "0");
case "MMM":
return U($.monthsShort, B, q, 3);
case "MMMM":
return U(q, B);
case "D":
return N.$D;
case "DD":
return S.s(N.$D, 2, "0");
case "d":
return String(N.$W);
case "dd":
return U($.weekdaysMin, N.$W, j, 2);
case "ddd":
return U($.weekdaysShort, N.$W, j, 3);
case "dddd":
return j[N.$W];
case "H":
return String(F);
case "HH":
return S.s(F, 2, "0");
case "h":
return ne(1);
case "hh":
return ne(2);
case "a":
return ce(F, L, !0);
case "A":
return ce(F, L, !1);
case "m":
return String(L);
case "mm":
return S.s(L, 2, "0");
case "s":
return String(N.$s);
case "ss":
return S.s(N.$s, 2, "0");
case "SSS":
return S.s(N.$ms, 3, "0");
case "Z":
return _;
}
return null;
}(re) || _.replace(":", "");
});
}, R.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, R.diff = function(T, N, $) {
var A, _ = this, F = S.p(N), L = P(T), B = (L.utcOffset() - this.utcOffset()) * r, j = this - L, q = function() {
return S.m(_, L);
};
switch (F) {
case v:
A = q() / 12;
break;
case d:
A = q();
break;
case m:
A = q() / 3;
break;
case f:
A = (j - B) / 6048e5;
break;
case u:
A = (j - B) / 864e5;
break;
case c:
A = j / i;
break;
case l:
A = j / r;
break;
case o:
A = j / n;
break;
default:
A = j;
}
return $ ? A : S.a(A);
}, R.daysInMonth = function() {
return this.endOf(d).$D;
}, R.$locale = function() {
return C[this.$L];
}, R.locale = function(T, N) {
if (!T)
return this.$L;
var $ = this.clone(), A = O(T, N, !0);
return A && ($.$L = A), $;
}, R.clone = function() {
return S.w(this.$d, this);
}, R.toDate = function() {
return new Date(this.valueOf());
}, R.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, R.toISOString = function() {
return this.$d.toISOString();
}, R.toString = function() {
return this.$d.toUTCString();
}, M;
}(), I = V.prototype;
return P.prototype = I, [["$ms", a], ["$s", o], ["$m", l], ["$H", c], ["$W", u], ["$M", d], ["$y", v], ["$D", b]].forEach(function(M) {
I[M[1]] = function(R) {
return this.$g(R, M[0], M[1]);
};
}), P.extend = function(M, R) {
return M.$i || (M(R, V, P), M.$i = !0), P;
}, P.locale = O, P.isDayjs = k, P.unix = function(M) {
return P(1e3 * M);
}, P.en = C[w], P.Ls = C, P.p = {}, P;
});
})(Hf);
var Lh = Hf.exports;
const se = /* @__PURE__ */ St(Lh);
function Dh(t, e) {
var n;
Ti && (Tr(t) || console.error("useDebounceFn expected parameter is a function, got ".concat(typeof t)));
var r = eo(t), i = (n = e == null ? void 0 : e.wait) !== null && n !== void 0 ? n : 1e3, a = me(function() {
return Eh(function() {
for (var o = [], l = 0; l < arguments.length; l++)
o[l] = arguments[l];
return r.current.apply(r, fl([], Lt(o), !1));
}, i, e);
}, []);
return Ii(function() {
a.cancel();
}), {
run: a,
cancel: a.cancel,
flush: a.flush
};
}
function Vh(t, e, n) {
var r = Lt(X({}), 2), i = r[0], a = r[1], o = Dh(function() {
a({});
}, n).run;
J(function() {
return o();
}, e), dl(t, [i]);
}
function jh(t) {
var e = Lt(X(t), 2), n = e[0], r = e[1], i = W(n);
i.current = n;
var a = Qe(function() {
return i.current;
}, []);
return [n, r, a];
}
(function() {
if (typeof window != "object")
return;
if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) {
"isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty(
window.IntersectionObserverEntry.prototype,
"isIntersecting",
{
get: function() {
return this.intersectionRatio > 0;
}
}
);
return;
}
function t(p) {
try {
return p.defaultView && p.defaultView.frameElement || null;
} catch {
return null;
}
}
var e = function(p) {
for (var E = p, w = t(E); w; )
E = w.ownerDocument, w = t(E);
return E;
}(window.document), n = [], r = null, i = null;
function a(p) {
this.time = p.time, this.target = p.target, this.rootBounds = b(p.rootBounds), this.boundingClientRect = b(p.boundingClientRect), this.intersectionRect = b(p.intersectionRect || v()), this.isIntersecting = !!p.intersectionRect;
var E = this.boundingClientRect, w = E.width * E.height, C = this.intersectionRect, k = C.width * C.height;
w ? this.intersectionRatio = Number((k / w).toFixed(4)) : this.intersectionRatio = this.isIntersecting ? 1 : 0;
}
function o(p, E) {
var w = E || {};
if (typeof p != "function")
throw new Error("callback must be a function");
if (w.root && w.root.nodeType != 1 && w.root.nodeType != 9)
throw new Error("root must be a Document or Element");
this._checkForIntersections = c(
this._checkForIntersections.bind(this),
this.THROTTLE_TIMEOUT
), this._callback = p, this._observationTargets = [], this._queuedEntries = [], this._rootMarginValues = this._parseRootMargin(w.rootMargin), this.thresholds = this._initThresholds(w.threshold), this.root = w.root || null, this.rootMargin = this._rootMarginValues.map(function(C) {
return C.value + C.unit;
}).join(" "), this._monitoringDocuments = [], this._monitoringUnsubscribes = [];
}
o.prototype.THROTTLE_TIMEOUT = 100, o.prototype.POLL_INTERVAL = null, o.prototype.USE_MUTATION_OBSERVER = !0, o._setupCrossOriginUpdater = function() {
return r || (r = function(p, E) {
!p || !E ? i = v() : i = y(p, E), n.forEach(function(w) {
w._checkForIntersections();
});
}), r;
}, o._resetCrossOriginUpdater = function() {
r = null, i = null;
}, o.prototype.observe = function(p) {
var E = this._observationTargets.some(function(w) {
return w.element == p;
});
if (!E) {
if (!(p && p.nodeType == 1))
throw new Error("target must be an Element");
this._registerInstance(), this._observationTargets.push({ element: p, entry: null }), this._monitorIntersections(p.ownerDocument), this._checkForIntersections();
}
}, o.prototype.unobserve = function(p) {
this._observationTargets = this._observationTargets.filter(function(E) {
return E.element != p;
}), this._unmonitorIntersections(p.ownerDocument), this._observationTargets.length == 0 && this._unregisterInstance();
}, o.prototype.disconnect = function() {
this._observationTargets = [], this._unmonitorAllIntersections(), this._unregisterInstance();
}, o.prototype.takeRecords = function() {
var p = this._queuedEntries.slice();
return this._queuedEntries = [], p;
}, o.prototype._initThresholds = function(p) {
var E = p || [0];
return Array.isArray(E) || (E = [E]), E.sort().filter(function(w, C, k) {
if (typeof w != "number" || isNaN(w) || w < 0 || w > 1)
throw new Error("threshold must be a number between 0 and 1 inclusively");
return w !== k[C - 1];
});
}, o.prototype._parseRootMargin = function(p) {
var E = p || "0px", w = E.split(/\s+/).map(function(C) {
var k = /^(-?\d*\.?\d+)(px|%)$/.exec(C);
if (!k)
throw new Error("rootMargin must be specified in pixels or percent");
return { value: parseFloat(k[1]), unit: k[2] };
});
return w[1] = w[1] || w[0], w[2] = w[2] || w[0], w[3] = w[3] || w[1], w;
}, o.prototype._monitorIntersections = function(p) {
var E = p.defaultView;
if (E && this._monitoringDocuments.indexOf(p) == -1) {
var w = this._checkForIntersections, C = null, k = null;
this.POLL_INTERVAL ? C = E.setInterval(w, this.POLL_INTERVAL) : (u(E, "resize", w, !0), u(p, "scroll", w, !0), this.USE_MUTATION_OBSERVER && "MutationObserver" in E && (k = new E.MutationObserver(w), k.observe(p, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
}))), this._monitoringDocuments.push(p), this._monitoringUnsubscribes.push(function() {
var S = p.defaultView;
S && (C && S.clearInterval(C), f(S, "resize", w, !0)), f(p, "scroll", w, !0), k && k.disconnect();
});
var O = this.root && (this.root.ownerDocument || this.root) || e;
if (p != O) {
var P = t(p);
P && this._monitorIntersections(P.ownerDocument);
}
}
}, o.prototype._unmonitorIntersections = function(p) {
var E = this._monitoringDocuments.indexOf(p);
if (E != -1) {
var w = this.root && (this.root.ownerDocument || this.root) || e, C = this._observationTargets.some(function(P) {
var S = P.element.ownerDocument;
if (S == p)
return !0;
for (; S && S != w; ) {
var V = t(S);
if (S = V && V.ownerDocument, S == p)
return !0;
}
return !1;
});
if (!C) {
var k = this._monitoringUnsubscribes[E];
if (this._monitoringDocuments.splice(E, 1), this._monitoringUnsubscribes.splice(E, 1), k(), p != w) {
var O = t(p);
O && this._unmonitorIntersections(O.ownerDocument);
}
}
}
}, o.prototype._unmonitorAllIntersections = function() {
var p = this._monitoringUnsubscribes.slice(0);
this._monitoringDocuments.length = 0, this._monitoringUnsubscribes.length = 0;
for (var E = 0; E < p.length; E++)
p[E]();
}, o.prototype._checkForIntersections = function() {
if (!(!this.root && r && !i)) {
var p = this._rootIsInDom(), E = p ? this._getRootRect() : v();
this._observationTargets.forEach(function(w) {
var C = w.element, k = m(C), O = this._rootContainsTarget(C), P = w.entry, S = p && O && this._computeTargetAndRootIntersection(C, k, E), V = null;
this._rootContainsTarget(C) ? (!r || this.root) && (V = E) : V = v();
var I = w.entry = new a({
time: l(),
target: C,
boundingClientRect: k,
rootBounds: V,
intersectionRect: S
});
P ? p && O ? this._hasCrossedThreshold(P, I) && this._queuedEntries.push(I) : P && P.isIntersecting && this._queuedEntries.push(I) : this._queuedEntries.push(I);
}, this), this._queuedEntries.length && this._callback(this.takeRecords(), this);
}
}, o.prototype._computeTargetAndRootIntersection = function(p, E, w) {
if (window.getComputedStyle(p).display != "none") {
for (var C = E, k = h(p), O = !1; !O && k; ) {
var P = null, S = k.nodeType == 1 ? window.getComputedStyle(k) : {};
if (S.display == "none")
return null;
if (k == this.root || k.nodeType == /* DOCUMENT */
9)
if (O = !0, k == this.root || k == e)
r && !this.root ? !i || i.width == 0 && i.height == 0 ? (k = null, P = null, C = null) : P = i : P = w;
else {
var V = h(k), I = V && m(V), M = V && this._computeTargetAndRootIntersection(V, I, w);
I && M ? (k = V, P = y(I, M)) : (k = null, C = null);
}
else {
var R = k.ownerDocument;
k != R.body && k != R.documentElement && S.overflow != "visible" && (P = m(k));
}
if (P && (C = d(P, C)), !C)
break;
k = k && h(k);
}
return C;
}
}, o.prototype._getRootRect = function() {
var p;
if (this.root && !x(this.root))
p = m(this.root);
else {
var E = x(this.root) ? this.root : e, w = E.documentElement, C = E.body;
p = {
top: 0,
left: 0,
right: w.clientWidth || C.clientWidth,
width: w.clientWidth || C.clientWidth,
bottom: w.clientHeight || C.clientHeight,
height: w.clientHeight || C.clientHeight
};
}
return this._expandRectByRootMargin(p);
}, o.prototype._expandRectByRootMargin = function(p) {
var E = this._rootMarginValues.map(function(C, k) {
return C.unit == "px" ? C.value : C.value * (k % 2 ? p.width : p.height) / 100;
}), w = {
top: p.top - E[0],
right: p.right + E[1],
bottom: p.bottom + E[2],
left: p.left - E[3]
};
return w.width = w.right - w.left, w.height = w.bottom - w.top, w;
}, o.prototype._hasCrossedThreshold = function(p, E) {
var w = p && p.isIntersecting ? p.intersectionRatio || 0 : -1, C = E.isIntersecting ? E.intersectionRatio || 0 : -1;
if (w !== C)
for (var k = 0; k < this.thresholds.length; k++) {
var O = this.thresholds[k];
if (O == w || O == C || O < w != O < C)
return !0;
}
}, o.prototype._rootIsInDom = function() {
return !this.root || g(e, this.root);
}, o.prototype._rootContainsTarget = function(p) {
var E = this.root && (this.root.ownerDocument || this.root) || e;
return g(E, p) && (!this.root || E == p.ownerDocument);
}, o.prototype._registerInstance = function() {
n.indexOf(this) < 0 && n.push(this);
}, o.prototype._unregisterInstance = function() {
var p = n.indexOf(this);
p != -1 && n.splice(p, 1);
};
function l() {
return window.performance && performance.now && performance.now();
}
function c(p, E) {
var w = null;
return function() {
w || (w = setTimeout(function() {
p(), w = null;
}, E));
};
}
function u(p, E, w, C) {
typeof p.addEventListener == "function" ? p.addEventListener(E, w, C || !1) : typeof p.attachEvent == "function" && p.attachEvent("on" + E, w);
}
function f(p, E, w, C) {
typeof p.removeEventListener == "function" ? p.removeEventListener(E, w, C || !1) : typeof p.detachEvent == "function" && p.detachEvent("on" + E, w);
}
function d(p, E) {
var w = Math.max(p.top, E.top), C = Math.min(p.bottom, E.bottom), k = Math.max(p.left, E.left), O = Math.min(p.right, E.right), P = O - k, S = C - w;
return P >= 0 && S >= 0 && {
top: w,
bottom: C,
left: k,
right: O,
width: P,
height: S
} || null;
}
function m(p) {
var E;
try {
E = p.getBoundingClientRect();
} catch {
}
return E ? (E.width && E.height || (E = {
top: E.top,
right: E.right,
bottom: E.bottom,
left: E.left,
width: E.right - E.left,
height: E.bottom - E.top
}), E) : v();
}
function v() {
return {
top: 0,
bottom: 0,
left: 0,
right: 0,
width: 0,
height: 0
};
}
function b(p) {
return !p || "x" in p ? p : {
top: p.top,
y: p.top,
bottom: p.bottom,
left: p.left,
x: p.left,
right: p.right,
width: p.width,
height: p.height
};
}
function y(p, E) {
var w = E.top - p.top, C = E.left - p.left;
return {
top: w,
left: C,
height: E.height,
width: E.width,
bottom: w + E.height,
right: C + E.width
};
}
function g(p, E) {
for (var w = E; w; ) {
if (w == p)
return !0;
w = h(w);
}
return !1;
}
function h(p) {
var E = p.parentNode;
return p.nodeType == /* DOCUMENT */
9 && p != e ? t(p) : (E && E.assignedSlot && (E = E.assignedSlot.parentNode), E && E.nodeType == 11 && E.host ? E.host : E);
}
function x(p) {
return p && p.nodeType === 9;
}
window.IntersectionObserver = o, window.IntersectionObserverEntry = a;
})();
function Bh(t, e) {
var n = Lt(X(), 2), r = n[0], i = n[1], a = Lt(X(), 2), o = a[0], l = a[1];
return vl(function() {
var c = mn(t);
if (c) {
var u = new IntersectionObserver(function(f) {
var d, m;
try {
for (var v = vm(f), b = v.next(); !b.done; b = v.next()) {
var y = b.value;
l(y.intersectionRatio), i(y.isIntersecting);
}
} catch (g) {
d = {
error: g
};
} finally {
try {
b && !b.done && (m = v.return) && m.call(v);
} finally {
if (d)
throw d.error;
}
}
}, Ra(Ra({}, e), {
root: mn(e == null ? void 0 : e.root)
}));
return u.observe(c), function() {
u.disconnect();
};
}
}, [e == null ? void 0 : e.rootMargin, e == null ? void 0 : e.threshold], t), [r, o];
}
var Wh = hl ? Ja : J;
const De = Wh;
function Zh(t) {
var e = this, n = W(!1);
return Qe(function() {
for (var r = [], i = 0; i < arguments.length; i++)
r[i] = arguments[i];
return Ae(e, void 0, void 0, function() {
var a, o;
return hm(this, function(l) {
switch (l.label) {
case 0:
if (n.current)
return [
2
/*return*/
];
n.current = !0, l.label = 1;
case 1:
return l.trys.push([1, 3, , 4]), [4, t.apply(void 0, fl([], Lt(r), !1))];
case 2:
return a = l.sent(), n.current = !1, [2, a];
case 3:
throw o = l.sent(), n.current = !1, o;
case 4:
return [
2
/*return*/
];
}
});
});
}, [t]);
}
function qh(t) {
var e = W(0), n = Lt(X(t), 2), r = n[0], i = n[1], a = Qe(function(o) {
cancelAnimationFrame(e.current), e.current = requestAnimationFrame(function() {
i(o);
});
}, []);
return Ii(function() {
cancelAnimationFrame(e.current);
}), [r, a];
}
var Hh = function() {
var t = W(!1);
return J(function() {
return t.current = !1, function() {
t.current = !0;
};
}, []), t;
};
const pl = Hh;
var Uf = function() {
if (typeof Map < "u")
return Map;
function t(e, n) {
var r = -1;
return e.some(function(i, a) {
return i[0] === n ? (r = a, !0) : !1;
}), r;
}
return (
/** @class */
function() {
function e() {
this.__entries__ = [];
}
return Object.defineProperty(e.prototype, "size", {
/**
* @returns {boolean}
*/
get: function() {
return this.__entries__.length;
},
enumerable: !0,
configurable: !0
}), e.prototype.get = function(n) {
var r = t(this.__entries__, n), i = this.__entries__[r];
return i && i[1];
}, e.prototype.set = function(n, r) {
var i = t(this.__entries__, n);
~i ? this.__entries__[i][1] = r : this.__entries__.push([n, r]);
}, e.prototype.delete = function(n) {
var r = this.__entries__, i = t(r, n);
~i && r.splice(i, 1);
}, e.prototype.has = function(n) {
return !!~t(this.__entries__, n);
}, e.prototype.clear = function() {
this.__entries__.splice(0);
}, e.prototype.forEach = function(n, r) {
r === void 0 && (r = null);
for (var i = 0, a = this.__entries__; i < a.length; i++) {
var o = a[i];
n.call(r, o[1], o[0]);
}
}, e;
}()
);
}(), ds = typeof window < "u" && typeof document < "u" && window.document === document, Na = function() {
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
}(), Uh = function() {
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Na) : function(t) {
return setTimeout(function() {
return t(Date.now());
}, 1e3 / 60);
};
}(), zh = 2;
function Kh(t, e) {
var n = !1, r = !1, i = 0;
function a() {
n && (n = !1, t()), r && l();
}
function o() {
Uh(a);
}
function l() {
var c = Date.now();
if (n) {
if (c - i < zh)
return;
r = !0;
} else
n = !0, r = !1, setTimeout(o, e);
i = c;
}
return l;
}
var Yh = 20, Gh = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Xh = typeof MutationObserver < "u", Qh = (
/** @class */
function() {
function t() {
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Kh(this.refresh.bind(this), Yh);
}
return t.prototype.addObserver = function(e) {
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
}, t.prototype.removeObserver = function(e) {
var n = this.observers_, r = n.indexOf(e);
~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
}, t.prototype.refresh = function() {
var e = this.updateObservers_();
e && this.refresh();
}, t.prototype.updateObservers_ = function() {
var e = this.observers_.filter(function(n) {
return n.gatherActive(), n.hasActive();
});
return e.forEach(function(n) {
return n.broadcastActive();
}), e.length > 0;
}, t.prototype.connect_ = function() {
!ds || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Xh ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
}, t.prototype.disconnect_ = function() {
!ds || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
}, t.prototype.onTransitionEnd_ = function(e) {
var n = e.propertyName, r = n === void 0 ? "" : n, i = Gh.some(function(a) {
return !!~r.indexOf(a);
});
i && this.refresh();
}, t.getInstance = function() {
return this.instance_ || (this.instance_ = new t()), this.instance_;
}, t.instance_ = null, t;
}()
), zf = function(t, e) {
for (var n = 0, r = Object.keys(e); n < r.length; n++) {
var i = r[n];
Object.defineProperty(t, i, {
value: e[i],
enumerable: !1,
writable: !1,
configurable: !0
});
}
return t;
}, _r = function(t) {
var e = t && t.ownerDocument && t.ownerDocument.defaultView;
return e || Na;
}, Kf = to(0, 0, 0, 0);
function Pa(t) {
return parseFloat(t) || 0;
}
function Ac(t) {
for (var e = [], n = 1; n < arguments.length; n++)
e[n - 1] = arguments[n];
return e.reduce(function(r, i) {
var a = t["border-" + i + "-width"];
return r + Pa(a);
}, 0);
}
function Jh(t) {
for (var e = ["top", "right", "bottom", "left"], n = {}, r = 0, i = e; r < i.length; r++) {
var a = i[r], o = t["padding-" + a];
n[a] = Pa(o);
}
return n;
}
function ev(t) {
var e = t.getBBox();
return to(0, 0, e.width, e.height);
}
function tv(t) {
var e = t.clientWidth, n = t.clientHeight;
if (!e && !n)
return Kf;
var r = _r(t).getComputedStyle(t), i = Jh(r), a = i.left + i.right, o = i.top + i.bottom, l = Pa(r.width), c = Pa(r.height);
if (r.boxSizing === "border-box" && (Math.round(l + a) !== e && (l -= Ac(r, "left", "right") + a), Math.round(c + o) !== n && (c -= Ac(r, "top", "bottom") + o)), !rv(t)) {
var u = Math.round(l + a) - e, f = Math.round(c + o) - n;
Math.abs(u) !== 1 && (l -= u), Math.abs(f) !== 1 && (c -= f);
}
return to(i.left, i.top, l, c);
}
var nv = /* @__PURE__ */ function() {
return typeof SVGGraphicsElement < "u" ? function(t) {
return t instanceof _r(t).SVGGraphicsElement;
} : function(t) {
return t instanceof _r(t).SVGElement && typeof t.getBBox == "fun