var Wf = (e,t,n)=>{
if (!t.has(e))
throw TypeError("Cannot " + n)
}
;
var G = (e,t,n)=>(Wf(e, t, "read from private field"),
n ? n.call(e) : t.get(e))
, xe = (e,t,n)=>{
if (t.has(e))
throw TypeError("Cannot add the same private member more than once");
t instanceof WeakSet ? t.add(e) : t.set(e, n)
}
, he = (e,t,n,r)=>(Wf(e, t, "write to private field"),
r ? r.call(e, n) : t.set(e, n),
n);
var Iu = (e,t,n,r)=>({
set _(i) {
he(e, t, i, n)
},
get _() {
return G(e, t, r)
}
})
, Ie = (e,t,n)=>(Wf(e, t, "access private method"),
n);
function ob(e, t) {
for (var n = 0; n < t.length; n++) {
const r = t[n];
if (typeof r != "string" && !Array.isArray(r)) {
for (const i in r)
if (i !== "default" && !(i in e)) {
const s = Object.getOwnPropertyDescriptor(r, i);
s && Object.defineProperty(e, i, s.get ? s : {
enumerable: !0,
get: ()=>r[i]
})
}
}
}
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}))
}
(function() {
const t = document.createElement("link").relList;
if (t && t.supports && t.supports("modulepreload"))
return;
for (const i of document.querySelectorAll('link[rel="modulepreload"]'))
r(i);
new MutationObserver(i=>{
for (const s of i)
if (s.type === "childList")
for (const o of s.addedNodes)
o.tagName === "LINK" && o.rel === "modulepreload" && r(o)
}
).observe(document, {
childList: !0,
subtree: !0
});
function n(i) {
const s = {};
return i.integrity && (s.integrity = i.integrity),
i.referrerPolicy && (s.referrerPolicy = i.referrerPolicy),
i.crossOrigin === "use-credentials" ? s.credentials = "include" : i.crossOrigin === "anonymous" ? s.credentials = "omit" : s.credentials = "same-origin",
s
}
function r(i) {
if (i.ep)
return;
i.ep = !0;
const s = n(i);
fetch(i.href, s)
}
}
)();
var Fu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function pu(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
}
function cR(e) {
if (e.__esModule)
return e;
var t = e.default;
if (typeof t == "function") {
var n = function r() {
return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments)
};
n.prototype = t.prototype
} else
n = {};
return Object.defineProperty(n, "__esModule", {
value: !0
}),
Object.keys(e).forEach(function(r) {
var i = Object.getOwnPropertyDescriptor(e, r);
Object.defineProperty(n, r, i.get ? i : {
enumerable: !0,
get: function() {
return e[r]
}
})
}),
n
}
var ab = {
exports: {}
}
, Xd = {}
, lb = {
exports: {}
}
, ze = {};
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var mu = Symbol.for("react.element")
, dR = Symbol.for("react.portal")
, fR = Symbol.for("react.fragment")
, hR = Symbol.for("react.strict_mode")
, pR = Symbol.for("react.profiler")
, mR = Symbol.for("react.provider")
, gR = Symbol.for("react.context")
, vR = Symbol.for("react.forward_ref")
, yR = Symbol.for("react.suspense")
, wR = Symbol.for("react.memo")
, xR = Symbol.for("react.lazy")
, jy = Symbol.iterator;
function bR(e) {
return e === null || typeof e != "object" ? null : (e = jy && e[jy] || e["@@iterator"],
typeof e == "function" ? e : null)
}
var ub = {
isMounted: function() {
return !1
},
enqueueForceUpdate: function() {},
enqueueReplaceState: function() {},
enqueueSetState: function() {}
}
, cb = Object.assign
, db = {};
function da(e, t, n) {
this.props = e,
this.context = t,
this.refs = db,
this.updater = n || ub
}
da.prototype.isReactComponent = {};
da.prototype.setState = function(e, t) {
if (typeof e != "object" && typeof e != "function" && e != null)
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, e, t, "setState")
}
;
da.prototype.forceUpdate = function(e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}
;
function fb() {}
fb.prototype = da.prototype;
function yg(e, t, n) {
this.props = e,
this.context = t,
this.refs = db,
this.updater = n || ub
}
var wg = yg.prototype = new fb;
wg.constructor = yg;
cb(wg, da.prototype);
wg.isPureReactComponent = !0;
var $y = Array.isArray
, hb = Object.prototype.hasOwnProperty
, xg = {
current: null
}
, pb = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function mb(e, t, n) {
var r, i = {}, s = null, o = null;
if (t != null)
for (r in t.ref !== void 0 && (o = t.ref),
t.key !== void 0 && (s = "" + t.key),
t)
hb.call(t, r) && !pb.hasOwnProperty(r) && (i[r] = t[r]);
var a = arguments.length - 2;
if (a === 1)
i.children = n;
else if (1 < a) {
for (var l = Array(a), u = 0; u < a; u++)
l[u] = arguments[u + 2];
i.children = l
}
if (e && e.defaultProps)
for (r in a = e.defaultProps,
a)
i[r] === void 0 && (i[r] = a[r]);
return {
$$typeof: mu,
type: e,
key: s,
ref: o,
props: i,
_owner: xg.current
}
}
function SR(e, t) {
return {
$$typeof: mu,
type: e.type,
key: t,
ref: e.ref,
props: e.props,
_owner: e._owner
}
}
function bg(e) {
return typeof e == "object" && e !== null && e.$$typeof === mu
}
function ER(e) {
var t = {
"=": "=0",
":": "=2"
};
return "$" + e.replace(/[=:]/g, function(n) {
return t[n]
})
}
var Iy = /\/+/g;
function Gf(e, t) {
return typeof e == "object" && e !== null && e.key != null ? ER("" + e.key) : t.toString(36)
}
function xc(e, t, n, r, i) {
var s = typeof e;
(s === "undefined" || s === "boolean") && (e = null);
var o = !1;
if (e === null)
o = !0;
else
switch (s) {
case "string":
case "number":
o = !0;
break;
case "object":
switch (e.$$typeof) {
case mu:
case dR:
o = !0
}
}
if (o)
return o = e,
i = i(o),
e = r === "" ? "." + Gf(o, 0) : r,
$y(i) ? (n = "",
e != null && (n = e.replace(Iy, "$&/") + "/"),
xc(i, t, n, "", function(u) {
return u
})) : i != null && (bg(i) && (i = SR(i, n + (!i.key || o && o.key === i.key ? "" : ("" + i.key).replace(Iy, "$&/") + "/") + e)),
t.push(i)),
1;
if (o = 0,
r = r === "" ? "." : r + ":",
$y(e))
for (var a = 0; a < e.length; a++) {
s = e[a];
var l = r + Gf(s, a);
o += xc(s, t, n, l, i)
}
else if (l = bR(e),
typeof l == "function")
for (e = l.call(e),
a = 0; !(s = e.next()).done; )
s = s.value,
l = r + Gf(s, a++),
o += xc(s, t, n, l, i);
else if (s === "object")
throw t = String(e),
Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
return o
}
function Vu(e, t, n) {
if (e == null)
return e;
var r = []
, i = 0;
return xc(e, r, "", "", function(s) {
return t.call(n, s, i++)
}),
r
}
function CR(e) {
if (e._status === -1) {
var t = e._result;
t = t(),
t.then(function(n) {
(e._status === 0 || e._status === -1) && (e._status = 1,
e._result = n)
}, function(n) {
(e._status === 0 || e._status === -1) && (e._status = 2,
e._result = n)
}),
e._status === -1 && (e._status = 0,
e._result = t)
}
if (e._status === 1)
return e._result.default;
throw e._result
}
var pn = {
current: null
}
, bc = {
transition: null
}
, PR = {
ReactCurrentDispatcher: pn,
ReactCurrentBatchConfig: bc,
ReactCurrentOwner: xg
};
function gb() {
throw Error("act(...) is not supported in production builds of React.")
}
ze.Children = {
map: Vu,
forEach: function(e, t, n) {
Vu(e, function() {
t.apply(this, arguments)
}, n)
},
count: function(e) {
var t = 0;
return Vu(e, function() {
t++
}),
t
},
toArray: function(e) {
return Vu(e, function(t) {
return t
}) || []
},
only: function(e) {
if (!bg(e))
throw Error("React.Children.only expected to receive a single React element child.");
return e
}
};
ze.Component = da;
ze.Fragment = fR;
ze.Profiler = pR;
ze.PureComponent = yg;
ze.StrictMode = hR;
ze.Suspense = yR;
ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = PR;
ze.act = gb;
ze.cloneElement = function(e, t, n) {
if (e == null)
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
var r = cb({}, e.props)
, i = e.key
, s = e.ref
, o = e._owner;
if (t != null) {
if (t.ref !== void 0 && (s = t.ref,
o = xg.current),
t.key !== void 0 && (i = "" + t.key),
e.type && e.type.defaultProps)
var a = e.type.defaultProps;
for (l in t)
hb.call(t, l) && !pb.hasOwnProperty(l) && (r[l] = t[l] === void 0 && a !== void 0 ? a[l] : t[l])
}
var l = arguments.length - 2;
if (l === 1)
r.children = n;
else if (1 < l) {
a = Array(l);
for (var u = 0; u < l; u++)
a[u] = arguments[u + 2];
r.children = a
}
return {
$$typeof: mu,
type: e.type,
key: i,
ref: s,
props: r,
_owner: o
}
}
;
ze.createContext = function(e) {
return e = {
$$typeof: gR,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
_defaultValue: null,
_globalName: null
},
e.Provider = {
$$typeof: mR,
_context: e
},
e.Consumer = e
}
;
ze.createElement = mb;
ze.createFactory = function(e) {
var t = mb.bind(null, e);
return t.type = e,
t
}
;
ze.createRef = function() {
return {
current: null
}
}
;
ze.forwardRef = function(e) {
return {
$$typeof: vR,
render: e
}
}
;
ze.isValidElement = bg;
ze.lazy = function(e) {
return {
$$typeof: xR,
_payload: {
_status: -1,
_result: e
},
_init: CR
}
}
;
ze.memo = function(e, t) {
return {
$$typeof: wR,
type: e,
compare: t === void 0 ? null : t
}
}
;
ze.startTransition = function(e) {
var t = bc.transition;
bc.transition = {};
try {
e()
} finally {
bc.transition = t
}
}
;
ze.unstable_act = gb;
ze.useCallback = function(e, t) {
return pn.current.useCallback(e, t)
}
;
ze.useContext = function(e) {
return pn.current.useContext(e)
}
;
ze.useDebugValue = function() {}
;
ze.useDeferredValue = function(e) {
return pn.current.useDeferredValue(e)
}
;
ze.useEffect = function(e, t) {
return pn.current.useEffect(e, t)
}
;
ze.useId = function() {
return pn.current.useId()
}
;
ze.useImperativeHandle = function(e, t, n) {
return pn.current.useImperativeHandle(e, t, n)
}
;
ze.useInsertionEffect = function(e, t) {
return pn.current.useInsertionEffect(e, t)
}
;
ze.useLayoutEffect = function(e, t) {
return pn.current.useLayoutEffect(e, t)
}
;
ze.useMemo = function(e, t) {
return pn.current.useMemo(e, t)
}
;
ze.useReducer = function(e, t, n) {
return pn.current.useReducer(e, t, n)
}
;
ze.useRef = function(e) {
return pn.current.useRef(e)
}
;
ze.useState = function(e) {
return pn.current.useState(e)
}
;
ze.useSyncExternalStore = function(e, t, n) {
return pn.current.useSyncExternalStore(e, t, n)
}
;
ze.useTransition = function() {
return pn.current.useTransition()
}
;
ze.version = "18.3.1";
lb.exports = ze;
var y = lb.exports;
const ce = pu(y)
, vb = ob({
__proto__: null,
default: ce
}, [y]);
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var TR = y
, RR = Symbol.for("react.element")
, OR = Symbol.for("react.fragment")
, kR = Object.prototype.hasOwnProperty
, _R = TR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner
, AR = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function yb(e, t, n) {
var r, i = {}, s = null, o = null;
n !== void 0 && (s = "" + n),
t.key !== void 0 && (s = "" + t.key),
t.ref !== void 0 && (o = t.ref);
for (r in t)
kR.call(t, r) && !AR.hasOwnProperty(r) && (i[r] = t[r]);
if (e && e.defaultProps)
for (r in t = e.defaultProps,
t)
i[r] === void 0 && (i[r] = t[r]);
return {
$$typeof: RR,
type: e,
key: s,
ref: o,
props: i,
_owner: _R.current
}
}
Xd.Fragment = OR;
Xd.jsx = yb;
Xd.jsxs = yb;
ab.exports = Xd;
var x = ab.exports;
const wb = ()=>{
var e;
return typeof window < "u" && (e = window) != null && (e = e.Telegram) != null && e.WebApp ? window.Telegram.WebApp : null
}
, xb = y.createContext(wb())
, bb = {
smoothButtonsTransition: !1,
smoothButtonsTransitionMs: 10
}
, DR = y.createContext(bb)
, LR = ()=>({
MainButton: {
current: null
},
BackButton: {
current: null
}
})
, NR = y.createContext({
MainButton: {
current: null
},
BackButton: {
current: null
}
})
, MR = ()=>y.useContext(xb)
, jR = ()=>{
const e = MR()
, t = e == null ? void 0 : e.HapticFeedback;
return [y.useCallback((...n)=>t == null ? void 0 : t.impactOccurred(...n), [t]), y.useCallback((...n)=>t == null ? void 0 : t.notificationOccurred(...n), [t]), y.useCallback((...n)=>t == null ? void 0 : t.selectionChanged(...n), [t])]
}
;
function cp() {
return cp = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
cp.apply(this, arguments)
}
const $R = ({children: e, options: t})=>{
const n = (o=>{
const [a,l] = y.useState(!1);
return y.useEffect(()=>{
var u;
if (!o)
return;
if ((u = window.Telegram) != null && u.WebApp)
return void l(!0);
const c = typeof window < "u" && window.TelegramWebviewProxy && window.TelegramWebviewProxy.postEvent;
window.TelegramWebviewProxy ? window.TelegramWebviewProxy.postEvent = (...d)=>{
var f;
c == null || c(...d),
(f = window.Telegram) != null && f.WebApp && (l(!0),
window.TelegramWebviewProxy.postEvent = c)
}
: window.TelegramWebviewProxy = {
postEvent: (...d)=>{
var f;
c == null || c(...d),
(f = window.Telegram) != null && f.WebApp && (l(!0),
delete window.TelegramWebviewProxy)
}
}
}
, [o]),
a
}
)(!(t == null || !t.async))
, r = y.useMemo(()=>cp({}, bb, t), [t])
, i = y.useMemo(LR, [])
, s = y.useMemo(wb, [n]);
return y.useEffect(()=>{
if (t == null || !t.smoothButtonsTransition)
return;
const o = ()=>{
var a, l;
s == null || (a = s.MainButton) == null || a.hide(),
s == null || (l = s.BackButton) == null || l.hide()
}
;
return window.addEventListener("beforeunload", o),
()=>window.removeEventListener("beforeunload", o)
}
, [s, t == null ? void 0 : t.smoothButtonsTransition]),
ce.createElement(NR.Provider, {
value: i
}, ce.createElement(xb.Provider, {
value: s
}, ce.createElement(DR.Provider, {
value: r
}, e)))
}
;
var dp = {}
, Sb = {
exports: {}
}
, jn = {}
, Eb = {
exports: {}
}
, Cb = {};
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function(e) {
function t(R, z) {
var Y = R.length;
R.push(z);
e: for (; 0 < Y; ) {
var te = Y - 1 >>> 1
, ue = R[te];
if (0 < i(ue, z))
R[te] = z,
R[Y] = ue,
Y = te;
else
break e
}
}
function n(R) {
return R.length === 0 ? null : R[0]
}
function r(R) {
if (R.length === 0)
return null;
var z = R[0]
, Y = R.pop();
if (Y !== z) {
R[0] = Y;
e: for (var te = 0, ue = R.length, X = ue >>> 1; te < X; ) {
var S = 2 * (te + 1) - 1
, j = R[S]
, N = S + 1
, I = R[N];
if (0 > i(j, Y))
N < ue && 0 > i(I, j) ? (R[te] = I,
R[N] = Y,
te = N) : (R[te] = j,
R[S] = Y,
te = S);
else if (N < ue && 0 > i(I, Y))
R[te] = I,
R[N] = Y,
te = N;
else
break e
}
}
return z
}
function i(R, z) {
var Y = R.sortIndex - z.sortIndex;
return Y !== 0 ? Y : R.id - z.id
}
if (typeof performance == "object" && typeof performance.now == "function") {
var s = performance;
e.unstable_now = function() {
return s.now()
}
} else {
var o = Date
, a = o.now();
e.unstable_now = function() {
return o.now() - a
}
}
var l = []
, u = []
, c = 1
, d = null
, f = 3
, h = !1
, m = !1
, p = !1
, b = typeof setTimeout == "function" ? setTimeout : null
, v = typeof clearTimeout == "function" ? clearTimeout : null
, g = typeof setImmediate < "u" ? setImmediate : null;
typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
function w(R) {
for (var z = n(u); z !== null; ) {
if (z.callback === null)
r(u);
else if (z.startTime <= R)
r(u),
z.sortIndex = z.expirationTime,
t(l, z);
else
break;
z = n(u)
}
}
function E(R) {
if (p = !1,
w(R),
!m)
if (n(l) !== null)
m = !0,
_(D);
else {
var z = n(u);
z !== null && O(E, z.startTime - R)
}
}
function D(R, z) {
m = !1,
p && (p = !1,
v(P),
P = -1),
h = !0;
var Y = f;
try {
for (w(z),
d = n(l); d !== null && (!(d.expirationTime > z) || R && !Q()); ) {
var te = d.callback;
if (typeof te == "function") {
d.callback = null,
f = d.priorityLevel;
var ue = te(d.expirationTime <= z);
z = e.unstable_now(),
typeof ue == "function" ? d.callback = ue : d === n(l) && r(l),
w(z)
} else
r(l);
d = n(l)
}
if (d !== null)
var X = !0;
else {
var S = n(u);
S !== null && O(E, S.startTime - z),
X = !1
}
return X
} finally {
d = null,
f = Y,
h = !1
}
}
var V = !1
, C = null
, P = -1
, A = 5
, B = -1;
function Q() {
return !(e.unstable_now() - B < A)
}
function Z() {
if (C !== null) {
var R = e.unstable_now();
B = R;
var z = !0;
try {
z = C(!0, R)
} finally {
z ? F() : (V = !1,
C = null)
}
} else
V = !1
}
var F;
if (typeof g == "function")
F = function() {
g(Z)
}
;
else if (typeof MessageChannel < "u") {
var k = new MessageChannel
, T = k.port2;
k.port1.onmessage = Z,
F = function() {
T.postMessage(null)
}
} else
F = function() {
b(Z, 0)
}
;
function _(R) {
C = R,
V || (V = !0,
F())
}
function O(R, z) {
P = b(function() {
R(e.unstable_now())
}, z)
}
e.unstable_IdlePriority = 5,
e.unstable_ImmediatePriority = 1,
e.unstable_LowPriority = 4,
e.unstable_NormalPriority = 3,
e.unstable_Profiling = null,
e.unstable_UserBlockingPriority = 2,
e.unstable_cancelCallback = function(R) {
R.callback = null
}
,
e.unstable_continueExecution = function() {
m || h || (m = !0,
_(D))
}
,
e.unstable_forceFrameRate = function(R) {
0 > R || 125 < R ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : A = 0 < R ? Math.floor(1e3 / R) : 5
}
,
e.unstable_getCurrentPriorityLevel = function() {
return f
}
,
e.unstable_getFirstCallbackNode = function() {
return n(l)
}
,
e.unstable_next = function(R) {
switch (f) {
case 1:
case 2:
case 3:
var z = 3;
break;
default:
z = f
}
var Y = f;
f = z;
try {
return R()
} finally {
f = Y
}
}
,
e.unstable_pauseExecution = function() {}
,
e.unstable_requestPaint = function() {}
,
e.unstable_runWithPriority = function(R, z) {
switch (R) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
R = 3
}
var Y = f;
f = R;
try {
return z()
} finally {
f = Y
}
}
,
e.unstable_scheduleCallback = function(R, z, Y) {
var te = e.unstable_now();
switch (typeof Y == "object" && Y !== null ? (Y = Y.delay,
Y = typeof Y == "number" && 0 < Y ? te + Y : te) : Y = te,
R) {
case 1:
var ue = -1;
break;
case 2:
ue = 250;
break;
case 5:
ue = 1073741823;
break;
case 4:
ue = 1e4;
break;
default:
ue = 5e3
}
return ue = Y + ue,
R = {
id: c++,
callback: z,
priorityLevel: R,
startTime: Y,
expirationTime: ue,
sortIndex: -1
},
Y > te ? (R.sortIndex = Y,
t(u, R),
n(l) === null && R === n(u) && (p ? (v(P),
P = -1) : p = !0,
O(E, Y - te))) : (R.sortIndex = ue,
t(l, R),
m || h || (m = !0,
_(D))),
R
}
,
e.unstable_shouldYield = Q,
e.unstable_wrapCallback = function(R) {
var z = f;
return function() {
var Y = f;
f = z;
try {
return R.apply(this, arguments)
} finally {
f = Y
}
}
}
}
)(Cb);
Eb.exports = Cb;
var IR = Eb.exports;
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var FR = y
, Dn = IR;
function oe(e) {
for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
t += "&args[]=" + encodeURIComponent(arguments[n]);
return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
}
var Pb = new Set
, vl = {};
function Fs(e, t) {
qo(e, t),
qo(e + "Capture", t)
}
function qo(e, t) {
for (vl[e] = t,
e = 0; e < t.length; e++)
Pb.add(t[e])
}
var qr = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u")
, fp = Object.prototype.hasOwnProperty
, VR = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/
, Fy = {}
, Vy = {};
function zR(e) {
return fp.call(Vy, e) ? !0 : fp.call(Fy, e) ? !1 : VR.test(e) ? Vy[e] = !0 : (Fy[e] = !0,
!1)
}
function UR(e, t, n, r) {
if (n !== null && n.type === 0)
return !1;
switch (typeof t) {
case "function":
case "symbol":
return !0;
case "boolean":
return r ? !1 : n !== null ? !n.acceptsBooleans : (e = e.toLowerCase().slice(0, 5),
e !== "data-" && e !== "aria-");
default:
return !1
}
}
function BR(e, t, n, r) {
if (t === null || typeof t > "u" || UR(e, t, n, r))
return !0;
if (r)
return !1;
if (n !== null)
switch (n.type) {
case 3:
return !t;
case 4:
return t === !1;
case 5:
return isNaN(t);
case 6:
return isNaN(t) || 1 > t
}
return !1
}
function mn(e, t, n, r, i, s, o) {
this.acceptsBooleans = t === 2 || t === 3 || t === 4,
this.attributeName = r,
this.attributeNamespace = i,
this.mustUseProperty = n,
this.propertyName = e,
this.type = t,
this.sanitizeURL = s,
this.removeEmptyString = o
}
var Xt = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
Xt[e] = new mn(e,0,!1,e,null,!1,!1)
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
var t = e[0];
Xt[t] = new mn(t,1,!1,e[1],null,!1,!1)
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
Xt[e] = new mn(e,2,!1,e.toLowerCase(),null,!1,!1)
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
Xt[e] = new mn(e,2,!1,e,null,!1,!1)
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) {
Xt[e] = new mn(e,3,!1,e.toLowerCase(),null,!1,!1)
});
["checked", "multiple", "muted", "selected"].forEach(function(e) {
Xt[e] = new mn(e,3,!0,e,null,!1,!1)
});
["capture", "download"].forEach(function(e) {
Xt[e] = new mn(e,4,!1,e,null,!1,!1)
});
["cols", "rows", "size", "span"].forEach(function(e) {
Xt[e] = new mn(e,6,!1,e,null,!1,!1)
});
["rowSpan", "start"].forEach(function(e) {
Xt[e] = new mn(e,5,!1,e.toLowerCase(),null,!1,!1)
});
var Sg = /[\-:]([a-z])/g;
function Eg(e) {
return e[1].toUpperCase()
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) {
var t = e.replace(Sg, Eg);
Xt[t] = new mn(t,1,!1,e,null,!1,!1)
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) {
var t = e.replace(Sg, Eg);
Xt[t] = new mn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)
});
["xml:base", "xml:lang", "xml:space"].forEach(function(e) {
var t = e.replace(Sg, Eg);
Xt[t] = new mn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)
});
["tabIndex", "crossOrigin"].forEach(function(e) {
Xt[e] = new mn(e,1,!1,e.toLowerCase(),null,!1,!1)
});
Xt.xlinkHref = new mn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);
["src", "href", "action", "formAction"].forEach(function(e) {
Xt[e] = new mn(e,1,!1,e.toLowerCase(),null,!0,!0)
});
function Cg(e, t, n, r) {
var i = Xt.hasOwnProperty(t) ? Xt[t] : null;
(i !== null ? i.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (BR(t, n, i, r) && (n = null),
r || i === null ? zR(t) && (n === null ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : i.mustUseProperty ? e[i.propertyName] = n === null ? i.type === 3 ? !1 : "" : n : (t = i.attributeName,
r = i.attributeNamespace,
n === null ? e.removeAttribute(t) : (i = i.type,
n = i === 3 || i === 4 && n === !0 ? "" : "" + n,
r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))))
}
var ti = FR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
, zu = Symbol.for("react.element")
, io = Symbol.for("react.portal")
, so = Symbol.for("react.fragment")
, Pg = Symbol.for("react.strict_mode")
, hp = Symbol.for("react.profiler")
, Tb = Symbol.for("react.provider")
, Rb = Symbol.for("react.context")
, Tg = Symbol.for("react.forward_ref")
, pp = Symbol.for("react.suspense")
, mp = Symbol.for("react.suspense_list")
, Rg = Symbol.for("react.memo")
, di = Symbol.for("react.lazy")
, Ob = Symbol.for("react.offscreen")
, zy = Symbol.iterator;
function Ea(e) {
return e === null || typeof e != "object" ? null : (e = zy && e[zy] || e["@@iterator"],
typeof e == "function" ? e : null)
}
var xt = Object.assign, Kf;
function Ha(e) {
if (Kf === void 0)
try {
throw Error()
} catch (n) {
var t = n.stack.trim().match(/\n( *(at )?)/);
Kf = t && t[1] || ""
}
return `
` + Kf + e
}
var qf = !1;
function Qf(e, t) {
if (!e || qf)
return "";
qf = !0;
var n = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
if (t)
if (t = function() {
throw Error()
}
,
Object.defineProperty(t.prototype, "props", {
set: function() {
throw Error()
}
}),
typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(t, [])
} catch (u) {
var r = u
}
Reflect.construct(e, [], t)
} else {
try {
t.call()
} catch (u) {
r = u
}
e.call(t.prototype)
}
else {
try {
throw Error()
} catch (u) {
r = u
}
e()
}
} catch (u) {
if (u && r && typeof u.stack == "string") {
for (var i = u.stack.split(`
`), s = r.stack.split(`
`), o = i.length - 1, a = s.length - 1; 1 <= o && 0 <= a && i[o] !== s[a]; )
a--;
for (; 1 <= o && 0 <= a; o--,
a--)
if (i[o] !== s[a]) {
if (o !== 1 || a !== 1)
do
if (o--,
a--,
0 > a || i[o] !== s[a]) {
var l = `
` + i[o].replace(" at new ", " at ");
return e.displayName && l.includes("<anonymous>") && (l = l.replace("<anonymous>", e.displayName)),
l
}
while (1 <= o && 0 <= a);
break
}
}
} finally {
qf = !1,
Error.prepareStackTrace = n
}
return (e = e ? e.displayName || e.name : "") ? Ha(e) : ""
}
function HR(e) {
switch (e.tag) {
case 5:
return Ha(e.type);
case 16:
return Ha("Lazy");
case 13:
return Ha("Suspense");
case 19:
return Ha("SuspenseList");
case 0:
case 2:
case 15:
return e = Qf(e.type, !1),
e;
case 11:
return e = Qf(e.type.render, !1),
e;
case 1:
return e = Qf(e.type, !0),
e;
default:
return ""
}
}
function gp(e) {
if (e == null)
return null;
if (typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case so:
return "Fragment";
case io:
return "Portal";
case hp:
return "Profiler";
case Pg:
return "StrictMode";
case pp:
return "Suspense";
case mp:
return "SuspenseList"
}
if (typeof e == "object")
switch (e.$$typeof) {
case Rb:
return (e.displayName || "Context") + ".Consumer";
case Tb:
return (e._context.displayName || "Context") + ".Provider";
case Tg:
var t = e.render;
return e = e.displayName,
e || (e = t.displayName || t.name || "",
e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"),
e;
case Rg:
return t = e.displayName || null,
t !== null ? t : gp(e.type) || "Memo";
case di:
t = e._payload,
e = e._init;
try {
return gp(e(t))
} catch {}
}
return null
}
function WR(e) {
var t = e.type;
switch (e.tag) {
case 24:
return "Cache";
case 9:
return (t.displayName || "Context") + ".Consumer";
case 10:
return (t._context.displayName || "Context") + ".Provider";
case 18:
return "DehydratedFragment";
case 11:
return e = t.render,
e = e.displayName || e.name || "",
t.displayName || (e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef");
case 7:
return "Fragment";
case 5:
return t;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return gp(t);
case 8:
return t === Pg ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if (typeof t == "function")
return t.displayName || t.name || null;
if (typeof t == "string")
return t
}
return null
}
function Ii(e) {
switch (typeof e) {
case "boolean":
case "number":
case "string":
case "undefined":
return e;
case "object":
return e;
default:
return ""
}
}
function kb(e) {
var t = e.type;
return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio")
}
function GR(e) {
var t = kb(e) ? "checked" : "value"
, n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t)
, r = "" + e[t];
if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") {
var i = n.get
, s = n.set;
return Object.defineProperty(e, t, {
configurable: !0,
get: function() {
return i.call(this)
},
set: function(o) {
r = "" + o,
s.call(this, o)
}
}),
Object.defineProperty(e, t, {
enumerable: n.enumerable
}),
{
getValue: function() {
return r
},
setValue: function(o) {
r = "" + o
},
stopTracking: function() {
e._valueTracker = null,
delete e[t]
}
}
}
}
function Uu(e) {
e._valueTracker || (e._valueTracker = GR(e))
}
function _b(e) {
if (!e)
return !1;
var t = e._valueTracker;
if (!t)
return !0;
var n = t.getValue()
, r = "";
return e && (r = kb(e) ? e.checked ? "true" : "false" : e.value),
e = r,
e !== n ? (t.setValue(e),
!0) : !1
}
function Kc(e) {
if (e = e || (typeof document < "u" ? document : void 0),
typeof e > "u")
return null;
try {
return e.activeElement || e.body
} catch {
return e.body
}
}
function vp(e, t) {
var n = t.checked;
return xt({}, t, {
defaultChecked: void 0,
defaultValue: void 0,
value: void 0,
checked: n ?? e._wrapperState.initialChecked
})
}
function Uy(e, t) {
var n = t.defaultValue == null ? "" : t.defaultValue
, r = t.checked != null ? t.checked : t.defaultChecked;
n = Ii(t.value != null ? t.value : n),
e._wrapperState = {
initialChecked: r,
initialValue: n,
controlled: t.type === "checkbox" || t.type === "radio" ? t.checked != null : t.value != null
}
}
function Ab(e, t) {
t = t.checked,
t != null && Cg(e, "checked", t, !1)
}
function yp(e, t) {
Ab(e, t);
var n = Ii(t.value)
, r = t.type;
if (n != null)
r === "number" ? (n === 0 && e.value === "" || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n);
else if (r === "submit" || r === "reset") {
e.removeAttribute("value");
return
}
t.hasOwnProperty("value") ? wp(e, t.type, n) : t.hasOwnProperty("defaultValue") && wp(e, t.type, Ii(t.defaultValue)),
t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked)
}
function By(e, t, n) {
if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
var r = t.type;
if (!(r !== "submit" && r !== "reset" || t.value !== void 0 && t.value !== null))
return;
t = "" + e._wrapperState.initialValue,
n || t === e.value || (e.value = t),
e.defaultValue = t
}
n = e.name,
n !== "" && (e.name = ""),
e.defaultChecked = !!e._wrapperState.initialChecked,
n !== "" && (e.name = n)
}
function wp(e, t, n) {
(t !== "number" || Kc(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n))
}
var Wa = Array.isArray;
function Po(e, t, n, r) {
if (e = e.options,
t) {
t = {};
for (var i = 0; i < n.length; i++)
t["$" + n[i]] = !0;
for (n = 0; n < e.length; n++)
i = t.hasOwnProperty("$" + e[n].value),
e[n].selected !== i && (e[n].selected = i),
i && r && (e[n].defaultSelected = !0)
} else {
for (n = "" + Ii(n),
t = null,
i = 0; i < e.length; i++) {
if (e[i].value === n) {
e[i].selected = !0,
r && (e[i].defaultSelected = !0);
return
}
t !== null || e[i].disabled || (t = e[i])
}
t !== null && (t.selected = !0)
}
}
function xp(e, t) {
if (t.dangerouslySetInnerHTML != null)
throw Error(oe(91));
return xt({}, t, {
value: void 0,
defaultValue: void 0,
children: "" + e._wrapperState.initialValue
})
}
function Hy(e, t) {
var n = t.value;
if (n == null) {
if (n = t.children,
t = t.defaultValue,
n != null) {
if (t != null)
throw Error(oe(92));
if (Wa(n)) {
if (1 < n.length)
throw Error(oe(93));
n = n[0]
}
t = n
}
t == null && (t = ""),
n = t
}
e._wrapperState = {
initialValue: Ii(n)
}
}
function Db(e, t) {
var n = Ii(t.value)
, r = Ii(t.defaultValue);
n != null && (n = "" + n,
n !== e.value && (e.value = n),
t.defaultValue == null && e.defaultValue !== n && (e.defaultValue = n)),
r != null && (e.defaultValue = "" + r)
}
function Wy(e) {
var t = e.textContent;
t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t)
}
function Lb(e) {
switch (e) {
case "svg":
return "http://www.w3.org/2000/svg";
case "math":
return "http://www.w3.org/1998/Math/MathML";
default:
return "http://www.w3.org/1999/xhtml"
}
}
function bp(e, t) {
return e == null || e === "http://www.w3.org/1999/xhtml" ? Lb(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e
}
var Bu, Nb = function(e) {
return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(t, n, r, i) {
MSApp.execUnsafeLocalFunction(function() {
return e(t, n, r, i)
})
}
: e
}(function(e, t) {
if (e.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML"in e)
e.innerHTML = t;
else {
for (Bu = Bu || document.createElement("div"),
Bu.innerHTML = "<svg>" + t.valueOf().toString() + "</svg>",
t = Bu.firstChild; e.firstChild; )
e.removeChild(e.firstChild);
for (; t.firstChild; )
e.appendChild(t.firstChild)
}
});
function yl(e, t) {
if (t) {
var n = e.firstChild;
if (n && n === e.lastChild && n.nodeType === 3) {
n.nodeValue = t;
return
}
}
e.textContent = t
}
var Ja = {
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
columns: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridArea: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowSpan: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnSpan: !0,
gridColumnStart: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
}
, KR = ["Webkit", "ms", "Moz", "O"];
Object.keys(Ja).forEach(function(e) {
KR.forEach(function(t) {
t = t + e.charAt(0).toUpperCase() + e.substring(1),
Ja[t] = Ja[e]
})
});
function Mb(e, t, n) {
return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || Ja.hasOwnProperty(e) && Ja[e] ? ("" + t).trim() : t + "px"
}
function jb(e, t) {
e = e.style;
for (var n in t)
if (t.hasOwnProperty(n)) {
var r = n.indexOf("--") === 0
, i = Mb(n, t[n], r);
n === "float" && (n = "cssFloat"),
r ? e.setProperty(n, i) : e[n] = i
}
}
var qR = xt({
menuitem: !0
}, {
area: !0,
base: !0,
br: !0,
col: !0,
embed: !0,
hr: !0,
img: !0,
input: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
});
function Sp(e, t) {
if (t) {
if (qR[e] && (t.children != null || t.dangerouslySetInnerHTML != null))
throw Error(oe(137, e));
if (t.dangerouslySetInnerHTML != null) {
if (t.children != null)
throw Error(oe(60));
if (typeof t.dangerouslySetInnerHTML != "object" || !("__html"in t.dangerouslySetInnerHTML))
throw Error(oe(61))
}
if (t.style != null && typeof t.style != "object")
throw Error(oe(62))
}
}
function Ep(e, t) {
if (e.indexOf("-") === -1)
return typeof t.is == "string";
switch (e) {
case "annotation-xml":
case "color-profile":
case "font-face":
case "font-face-src":
case "font-face-uri":
case "font-face-format":
case "font-face-name":
case "missing-glyph":
return !1;
default:
return !0
}
}
var Cp = null;
function Og(e) {
return e = e.target || e.srcElement || window,
e.correspondingUseElement && (e = e.correspondingUseElement),
e.nodeType === 3 ? e.parentNode : e
}
var Pp = null
, To = null
, Ro = null;
function Gy(e) {
if (e = yu(e)) {
if (typeof Pp != "function")
throw Error(oe(280));
var t = e.stateNode;
t && (t = nf(t),
Pp(e.stateNode, e.type, t))
}
}
function $b(e) {
To ? Ro ? Ro.push(e) : Ro = [e] : To = e
}
function Ib() {
if (To) {
var e = To
, t = Ro;
if (Ro = To = null,
Gy(e),
t)
for (e = 0; e < t.length; e++)
Gy(t[e])
}
}
function Fb(e, t) {
return e(t)
}
function Vb() {}
var Yf = !1;
function zb(e, t, n) {
if (Yf)
return e(t, n);
Yf = !0;
try {
return Fb(e, t, n)
} finally {
Yf = !1,
(To !== null || Ro !== null) && (Vb(),
Ib())
}
}
function wl(e, t) {
var n = e.stateNode;
if (n === null)
return null;
var r = nf(n);
if (r === null)
return null;
n = r[t];
e: switch (t) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
case "onMouseEnter":
(r = !r.disabled) || (e = e.type,
r = !(e === "button" || e === "input" || e === "select" || e === "textarea")),
e = !r;
break e;
default:
e = !1
}
if (e)
return null;
if (n && typeof n != "function")
throw Error(oe(231, t, typeof n));
return n
}
var Tp = !1;
if (qr)
try {
var Ca = {};
Object.defineProperty(Ca, "passive", {
get: function() {
Tp = !0
}
}),
window.addEventListener("test", Ca, Ca),
window.removeEventListener("test", Ca, Ca)
} catch {
Tp = !1
}
function QR(e, t, n, r, i, s, o, a, l) {
var u = Array.prototype.slice.call(arguments, 3);
try {
t.apply(n, u)
} catch (c) {
this.onError(c)
}
}
var Za = !1
, qc = null
, Qc = !1
, Rp = null
, YR = {
onError: function(e) {
Za = !0,
qc = e
}
};
function XR(e, t, n, r, i, s, o, a, l) {
Za = !1,
qc = null,
QR.apply(YR, arguments)
}
function JR(e, t, n, r, i, s, o, a, l) {
if (XR.apply(this, arguments),
Za) {
if (Za) {
var u = qc;
Za = !1,
qc = null
} else
throw Error(oe(198));
Qc || (Qc = !0,
Rp = u)
}
}
function Vs(e) {
var t = e
, n = e;
if (e.alternate)
for (; t.return; )
t = t.return;
else {
e = t;
do
t = e,
t.flags & 4098 && (n = t.return),
e = t.return;
while (e)
}
return t.tag === 3 ? n : null
}
function Ub(e) {
if (e.tag === 13) {
var t = e.memoizedState;
if (t === null && (e = e.alternate,
e !== null && (t = e.memoizedState)),
t !== null)
return t.dehydrated
}
return null
}
function Ky(e) {
if (Vs(e) !== e)
throw Error(oe(188))
}
function ZR(e) {
var t = e.alternate;
if (!t) {
if (t = Vs(e),
t === null)
throw Error(oe(188));
return t !== e ? null : e
}
for (var n = e, r = t; ; ) {
var i = n.return;
if (i === null)
break;
var s = i.alternate;
if (s === null) {
if (r = i.return,
r !== null) {
n = r;
continue
}
break
}
if (i.child === s.child) {
for (s = i.child; s; ) {
if (s === n)
return Ky(i),
e;
if (s === r)
return Ky(i),
t;
s = s.sibling
}
throw Error(oe(188))
}
if (n.return !== r.return)
n = i,
r = s;
else {
for (var o = !1, a = i.child; a; ) {
if (a === n) {
o = !0,
n = i,
r = s;
break
}
if (a === r) {
o = !0,
r = i,
n = s;
break
}
a = a.sibling
}
if (!o) {
for (a = s.child; a; ) {
if (a === n) {
o = !0,
n = s,
r = i;
break
}
if (a === r) {
o = !0,
r = s,
n = i;
break
}
a = a.sibling
}
if (!o)
throw Error(oe(189))
}
}
if (n.alternate !== r)
throw Error(oe(190))
}
if (n.tag !== 3)
throw Error(oe(188));
return n.stateNode.current === n ? e : t
}
function Bb(e) {
return e = ZR(e),
e !== null ? Hb(e) : null
}
function Hb(e) {
if (e.tag === 5 || e.tag === 6)
return e;
for (e = e.child; e !== null; ) {
var t = Hb(e);
if (t !== null)
return t;
e = e.sibling
}
return null
}
var Wb = Dn.unstable_scheduleCallback
, qy = Dn.unstable_cancelCallback
, eO = Dn.unstable_shouldYield
, tO = Dn.unstable_requestPaint
, Pt = Dn.unstable_now
, nO = Dn.unstable_getCurrentPriorityLevel
, kg = Dn.unstable_ImmediatePriority
, Gb = Dn.unstable_UserBlockingPriority
, Yc = Dn.unstable_NormalPriority
, rO = Dn.unstable_LowPriority
, Kb = Dn.unstable_IdlePriority
, Jd = null
, Or = null;
function iO(e) {
if (Or && typeof Or.onCommitFiberRoot == "function")
try {
Or.onCommitFiberRoot(Jd, e, void 0, (e.current.flags & 128) === 128)
} catch {}
}
var ur = Math.clz32 ? Math.clz32 : aO
, sO = Math.log
, oO = Math.LN2;
function aO(e) {
return e >>>= 0,
e === 0 ? 32 : 31 - (sO(e) / oO | 0) | 0
}
var Hu = 64
, Wu = 4194304;
function Ga(e) {
switch (e & -e) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return e & 4194240;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
return e & 130023424;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 1073741824;
default:
return e
}
}
function Xc(e, t) {
var n = e.pendingLanes;
if (n === 0)
return 0;
var r = 0
, i = e.suspendedLanes
, s = e.pingedLanes
, o = n & 268435455;
if (o !== 0) {
var a = o & ~i;
a !== 0 ? r = Ga(a) : (s &= o,
s !== 0 && (r = Ga(s)))
} else
o = n & ~i,
o !== 0 ? r = Ga(o) : s !== 0 && (r = Ga(s));
if (r === 0)
return 0;
if (t !== 0 && t !== r && !(t & i) && (i = r & -r,
s = t & -t,
i >= s || i === 16 && (s & 4194240) !== 0))
return t;
if (r & 4 && (r |= n & 16),
t = e.entangledLanes,
t !== 0)
for (e = e.entanglements,
t &= r; 0 < t; )
n = 31 - ur(t),
i = 1 << n,
r |= e[n],
t &= ~i;
return r
}
function lO(e, t) {
switch (e) {
case 1:
case 2:
case 4:
return t + 250;
case 8:
case 16:
case 32:
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return t + 5e3;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
return -1;
case 134217728:
case 268435456:
case 536870912:
case 1073741824:
return -1;
default:
return -1
}
}
function uO(e, t) {
for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, s = e.pendingLanes; 0 < s; ) {
var o = 31 - ur(s)
, a = 1 << o
, l = i[o];
l === -1 ? (!(a & n) || a & r) && (i[o] = lO(a, t)) : l <= t && (e.expiredLanes |= a),
s &= ~a
}
}
function Op(e) {
return e = e.pendingLanes & -1073741825,
e !== 0 ? e : e & 1073741824 ? 1073741824 : 0
}
function qb() {
var e = Hu;
return Hu <<= 1,
!(Hu & 4194240) && (Hu = 64),
e
}
function Xf(e) {
for (var t = [], n = 0; 31 > n; n++)
t.push(e);
return t
}
function gu(e, t, n) {
e.pendingLanes |= t,
t !== 536870912 && (e.suspendedLanes = 0,
e.pingedLanes = 0),
e = e.eventTimes,
t = 31 - ur(t),
e[t] = n
}
function cO(e, t) {
var n = e.pendingLanes & ~t;
e.pendingLanes = t,
e.suspendedLanes = 0,
e.pingedLanes = 0,
e.expiredLanes &= t,
e.mutableReadLanes &= t,
e.entangledLanes &= t,
t = e.entanglements;
var r = e.eventTimes;
for (e = e.expirationTimes; 0 < n; ) {
var i = 31 - ur(n)
, s = 1 << i;
t[i] = 0,
r[i] = -1,
e[i] = -1,
n &= ~s
}
}
function _g(e, t) {
var n = e.entangledLanes |= t;
for (e = e.entanglements; n; ) {
var r = 31 - ur(n)
, i = 1 << r;
i & t | e[r] & t && (e[r] |= t),
n &= ~i
}
}
var Je = 0;
function Qb(e) {
return e &= -e,
1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1
}
var Yb, Ag, Xb, Jb, Zb, kp = !1, Gu = [], Ri = null, Oi = null, ki = null, xl = new Map, bl = new Map, pi = [], dO = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
function Qy(e, t) {
switch (e) {
case "focusin":
case "focusout":
Ri = null;
break;
case "dragenter":
case "dragleave":
Oi = null;
break;
case "mouseover":
case "mouseout":
ki = null;
break;
case "pointerover":
case "pointerout":
xl.delete(t.pointerId);
break;
case "gotpointercapture":
case "lostpointercapture":
bl.delete(t.pointerId)
}
}
function Pa(e, t, n, r, i, s) {
return e === null || e.nativeEvent !== s ? (e = {
blockedOn: t,
domEventName: n,
eventSystemFlags: r,
nativeEvent: s,
targetContainers: [i]
},
t !== null && (t = yu(t),
t !== null && Ag(t)),
e) : (e.eventSystemFlags |= r,
t = e.targetContainers,
i !== null && t.indexOf(i) === -1 && t.push(i),
e)
}
function fO(e, t, n, r, i) {
switch (t) {
case "focusin":
return Ri = Pa(Ri, e, t, n, r, i),
!0;
case "dragenter":
return Oi = Pa(Oi, e, t, n, r, i),
!0;
case "mouseover":
return ki = Pa(ki, e, t, n, r, i),
!0;
case "pointerover":
var s = i.pointerId;
return xl.set(s, Pa(xl.get(s) || null, e, t, n, r, i)),
!0;
case "gotpointercapture":
return s = i.pointerId,
bl.set(s, Pa(bl.get(s) || null, e, t, n, r, i)),
!0
}
return !1
}
function eS(e) {
var t = as(e.target);
if (t !== null) {
var n = Vs(t);
if (n !== null) {
if (t = n.tag,
t === 13) {
if (t = Ub(n),
t !== null) {
e.blockedOn = t,
Zb(e.priority, function() {
Xb(n)
});
return
}
} else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) {
e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null;
return
}
}
}
e.blockedOn = null
}
function Sc(e) {
if (e.blockedOn !== null)
return !1;
for (var t = e.targetContainers; 0 < t.length; ) {
var n = _p(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
if (n === null) {
n = e.nativeEvent;
var r = new n.constructor(n.type,n);
Cp = r,
n.target.dispatchEvent(r),
Cp = null
} else
return t = yu(n),
t !== null && Ag(t),
e.blockedOn = n,
!1;
t.shift()
}
return !0
}
function Yy(e, t, n) {
Sc(e) && n.delete(t)
}
function hO() {
kp = !1,
Ri !== null && Sc(Ri) && (Ri = null),
Oi !== null && Sc(Oi) && (Oi = null),
ki !== null && Sc(ki) && (ki = null),
xl.forEach(Yy),
bl.forEach(Yy)
}
function Ta(e, t) {
e.blockedOn === t && (e.blockedOn = null,
kp || (kp = !0,
Dn.unstable_scheduleCallback(Dn.unstable_NormalPriority, hO)))
}
function Sl(e) {
function t(i) {
return Ta(i, e)
}
if (0 < Gu.length) {
Ta(Gu[0], e);
for (var n = 1; n < Gu.length; n++) {
var r = Gu[n];
r.blockedOn === e && (r.blockedOn = null)
}
}
for (Ri !== null && Ta(Ri, e),
Oi !== null && Ta(Oi, e),
ki !== null && Ta(ki, e),
xl.forEach(t),
bl.forEach(t),
n = 0; n < pi.length; n++)
r = pi[n],
r.blockedOn === e && (r.blockedOn = null);
for (; 0 < pi.length && (n = pi[0],
n.blockedOn === null); )
eS(n),
n.blockedOn === null && pi.shift()
}
var Oo = ti.ReactCurrentBatchConfig
, Jc = !0;
function pO(e, t, n, r) {
var i = Je
, s = Oo.transition;
Oo.transition = null;
try {
Je = 1,
Dg(e, t, n, r)
} finally {
Je = i,
Oo.transition = s
}
}
function mO(e, t, n, r) {
var i = Je
, s = Oo.transition;
Oo.transition = null;
try {
Je = 4,
Dg(e, t, n, r)
} finally {
Je = i,
Oo.transition = s
}
}
function Dg(e, t, n, r) {
if (Jc) {
var i = _p(e, t, n, r);
if (i === null)
ah(e, t, r, Zc, n),
Qy(e, r);
else if (fO(i, e, t, n, r))
r.stopPropagation();
else if (Qy(e, r),
t & 4 && -1 < dO.indexOf(e)) {
for (; i !== null; ) {
var s = yu(i);
if (s !== null && Yb(s),
s = _p(e, t, n, r),
s === null && ah(e, t, r, Zc, n),
s === i)
break;
i = s
}
i !== null && r.stopPropagation()
} else
ah(e, t, r, null, n)
}
}
var Zc = null;
function _p(e, t, n, r) {
if (Zc = null,
e = Og(r),
e = as(e),
e !== null)
if (t = Vs(e),
t === null)
e = null;
else if (n = t.tag,
n === 13) {
if (e = Ub(t),
e !== null)
return e;
e = null
} else if (n === 3) {
if (t.stateNode.current.memoizedState.isDehydrated)
return t.tag === 3 ? t.stateNode.containerInfo : null;
e = null
} else
t !== e && (e = null);
return Zc = e,
null
}
function tS(e) {
switch (e) {
case "cancel":
case "click":
case "close":
case "contextmenu":
case "copy":
case "cut":
case "auxclick":
case "dblclick":
case "dragend":
case "dragstart":
case "drop":
case "focusin":
case "focusout":
case "input":
case "invalid":
case "keydown":
case "keypress":
case "keyup":
case "mousedown":
case "mouseup":
case "paste":
case "pause":
case "play":
case "pointercancel":
case "pointerdown":
case "pointerup":
case "ratechange":
case "reset":
case "resize":
case "seeked":
case "submit":
case "touchcancel":
case "touchend":
case "touchstart":
case "volumechange":
case "change":
case "selectionchange":
case "textInput":
case "compositionstart":
case "compositionend":
case "compositionupdate":
case "beforeblur":
case "afterblur":
case "beforeinput":
case "blur":
case "fullscreenchange":
case "focus":
case "hashchange":
case "popstate":
case "select":
case "selectstart":
return 1;
case "drag":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "mousemove":
case "mouseout":
case "mouseover":
case "pointermove":
case "pointerout":
case "pointerover":
case "scroll":
case "toggle":
case "touchmove":
case "wheel":
case "mouseenter":
case "mouseleave":
case "pointerenter":
case "pointerleave":
return 4;
case "message":
switch (nO()) {
case kg:
return 1;
case Gb:
return 4;
case Yc:
case rO:
return 16;
case Kb:
return 536870912;
default:
return 16
}
default:
return 16
}
}
var Pi = null
, Lg = null
, Ec = null;
function nS() {
if (Ec)
return Ec;
var e, t = Lg, n = t.length, r, i = "value"in Pi ? Pi.value : Pi.textContent, s = i.length;
for (e = 0; e < n && t[e] === i[e]; e++)
;
var o = n - e;
for (r = 1; r <= o && t[n - r] === i[s - r]; r++)
;
return Ec = i.slice(e, 1 < r ? 1 - r : void 0)
}
function Cc(e) {
var t = e.keyCode;
return "charCode"in e ? (e = e.charCode,
e === 0 && t === 13 && (e = 13)) : e = t,
e === 10 && (e = 13),
32 <= e || e === 13 ? e : 0
}
function Ku() {
return !0
}
function Xy() {
return !1
}
function $n(e) {
function t(n, r, i, s, o) {
this._reactName = n,
this._targetInst = i,
this.type = r,
this.nativeEvent = s,
this.target = o,
this.currentTarget = null;
for (var a in e)
e.hasOwnProperty(a) && (n = e[a],
this[a] = n ? n(s) : s[a]);
return this.isDefaultPrevented = (s.defaultPrevented != null ? s.defaultPrevented : s.returnValue === !1) ? Ku : Xy,
this.isPropagationStopped = Xy,
this
}
return xt(t.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var n = this.nativeEvent;
n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1),
this.isDefaultPrevented = Ku)
},
stopPropagation: function() {
var n = this.nativeEvent;
n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0),
this.isPropagationStopped = Ku)
},
persist: function() {},
isPersistent: Ku
}),
t
}
var fa = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function(e) {
return e.timeStamp || Date.now()
},
defaultPrevented: 0,
isTrusted: 0
}, Ng = $n(fa), vu = xt({}, fa, {
view: 0,
detail: 0
}), gO = $n(vu), Jf, Zf, Ra, Zd = xt({}, vu, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: Mg,
button: 0,
buttons: 0,
relatedTarget: function(e) {
return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget
},
movementX: function(e) {
return "movementX"in e ? e.movementX : (e !== Ra && (Ra && e.type === "mousemove" ? (Jf = e.screenX - Ra.screenX,
Zf = e.screenY - Ra.screenY) : Zf = Jf = 0,
Ra = e),
Jf)
},
movementY: function(e) {
return "movementY"in e ? e.movementY : Zf
}
}), Jy = $n(Zd), vO = xt({}, Zd, {
dataTransfer: 0
}), yO = $n(vO), wO = xt({}, vu, {
relatedTarget: 0
}), eh = $n(wO), xO = xt({}, fa, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
}), bO = $n(xO), SO = xt({}, fa, {
clipboardData: function(e) {
return "clipboardData"in e ? e.clipboardData : window.clipboardData
}
}), EO = $n(SO), CO = xt({}, fa, {
data: 0
}), Zy = $n(CO), PO = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, TO = {
8: "Backspace",
9: "Tab",
12: "Clear",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
45: "Insert",
46: "Delete",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
144: "NumLock",
145: "ScrollLock",
224: "Meta"
}, RO = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
function OO(e) {
var t = this.nativeEvent;
return t.getModifierState ? t.getModifierState(e) : (e = RO[e]) ? !!t[e] : !1
}
function Mg() {
return OO
}
var kO = xt({}, vu, {
key: function(e) {
if (e.key) {
var t = PO[e.key] || e.key;
if (t !== "Unidentified")
return t
}
return e.type === "keypress" ? (e = Cc(e),
e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? TO[e.keyCode] || "Unidentified" : ""
},
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: Mg,
charCode: function(e) {
return e.type === "keypress" ? Cc(e) : 0
},
keyCode: function(e) {
return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0
},
which: function(e) {
return e.type === "keypress" ? Cc(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0
}
})
, _O = $n(kO)
, AO = xt({}, Zd, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
})
, e0 = $n(AO)
, DO = xt({}, vu, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: Mg
})
, LO = $n(DO)
, NO = xt({}, fa, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
})
, MO = $n(NO)
, jO = xt({}, Zd, {
deltaX: function(e) {
return "deltaX"in e ? e.deltaX : "wheelDeltaX"in e ? -e.wheelDeltaX : 0
},
deltaY: function(e) {
return "deltaY"in e ? e.deltaY : "wheelDeltaY"in e ? -e.wheelDeltaY : "wheelDelta"in e ? -e.wheelDelta : 0
},
deltaZ: 0,
deltaMode: 0
})
, $O = $n(jO)
, IO = [9, 13, 27, 32]
, jg = qr && "CompositionEvent"in window
, el = null;
qr && "documentMode"in document && (el = document.documentMode);
var FO = qr && "TextEvent"in window && !el
, rS = qr && (!jg || el && 8 < el && 11 >= el)
, t0 = " "
, n0 = !1;
function iS(e, t) {
switch (e) {
case "keyup":
return IO.indexOf(t.keyCode) !== -1;
case "keydown":
return t.keyCode !== 229;
case "keypress":
case "mousedown":
case "focusout":
return !0;
default:
return !1
}
}
function sS(e) {
return e = e.detail,
typeof e == "object" && "data"in e ? e.data : null
}
var oo = !1;
function VO(e, t) {
switch (e) {
case "compositionend":
return sS(t);
case "keypress":
return t.which !== 32 ? null : (n0 = !0,
t0);
case "textInput":
return e = t.data,
e === t0 && n0 ? null : e;
default:
return null
}
}
function zO(e, t) {
if (oo)
return e === "compositionend" || !jg && iS(e, t) ? (e = nS(),
Ec = Lg = Pi = null,
oo = !1,
e) : null;
switch (e) {
case "paste":
return null;
case "keypress":
if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
if (t.char && 1 < t.char.length)
return t.char;
if (t.which)
return String.fromCharCode(t.which)
}
return null;
case "compositionend":
return rS && t.locale !== "ko" ? null : t.data;
default:
return null
}
}
var UO = {
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
password: !0,
range: !0,
search: !0,
tel: !0,
text: !0,
time: !0,
url: !0,
week: !0
};
function r0(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t === "input" ? !!UO[e.type] : t === "textarea"
}
function oS(e, t, n, r) {
$b(r),
t = ed(t, "onChange"),
0 < t.length && (n = new Ng("onChange","change",null,n,r),
e.push({
event: n,
listeners: t
}))
}
var tl = null
, El = null;
function BO(e) {
vS(e, 0)
}
function ef(e) {
var t = uo(e);
if (_b(t))
return e
}
function HO(e, t) {
if (e === "change")
return t
}
var aS = !1;
if (qr) {
var th;
if (qr) {
var nh = "oninput"in document;
if (!nh) {
var i0 = document.createElement("div");
i0.setAttribute("oninput", "return;"),
nh = typeof i0.oninput == "function"
}
th = nh
} else
th = !1;
aS = th && (!document.documentMode || 9 < document.documentMode)
}
function s0() {
tl && (tl.detachEvent("onpropertychange", lS),
El = tl = null)
}
function lS(e) {
if (e.propertyName === "value" && ef(El)) {
var t = [];
oS(t, El, e, Og(e)),
zb(BO, t)
}
}
function WO(e, t, n) {
e === "focusin" ? (s0(),
tl = t,
El = n,
tl.attachEvent("onpropertychange", lS)) : e === "focusout" && s0()
}
function GO(e) {
if (e === "selectionchange" || e === "keyup" || e === "keydown")
return ef(El)
}
function KO(e, t) {
if (e === "click")
return ef(t)
}
function qO(e, t) {
if (e === "input" || e === "change")
return ef(t)
}
function QO(e, t) {
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t
}
var pr = typeof Object.is == "function" ? Object.is : QO;
function Cl(e, t) {
if (pr(e, t))
return !0;
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
return !1;
var n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
for (r = 0; r < n.length; r++) {
var i = n[r];
if (!fp.call(t, i) || !pr(e[i], t[i]))
return !1
}
return !0
}
function o0(e) {
for (; e && e.firstChild; )
e = e.firstChild;
return e
}
function a0(e, t) {
var n = o0(e);
e = 0;
for (var r; n; ) {
if (n.nodeType === 3) {
if (r = e + n.textContent.length,
e <= t && r >= t)
return {
node: n,
offset: t - e
};
e = r
}
e: {
for (; n; ) {
if (n.nextSibling) {
n = n.nextSibling;
break e
}
n = n.parentNode
}
n = void 0
}
n = o0(n)
}
}
function uS(e, t) {
return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? uS(e, t.parentNode) : "contains"in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1
}
function cS() {
for (var e = window, t = Kc(); t instanceof e.HTMLIFrameElement; ) {
try {
var n = typeof t.contentWindow.location.href == "string"
} catch {
n = !1
}
if (n)
e = t.contentWindow;
else
break;
t = Kc(e.document)
}
return t
}
function $g(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true")
}
function YO(e) {
var t = cS()
, n = e.focusedElem
, r = e.selectionRange;
if (t !== n && n && n.ownerDocument && uS(n.ownerDocument.documentElement, n)) {
if (r !== null && $g(n)) {
if (t = r.start,
e = r.end,
e === void 0 && (e = t),
"selectionStart"in n)
n.selectionStart = t,
n.selectionEnd = Math.min(e, n.value.length);
else if (e = (t = n.ownerDocument || document) && t.defaultView || window,
e.getSelection) {
e = e.getSelection();
var i = n.textContent.length
, s = Math.min(r.start, i);
r = r.end === void 0 ? s : Math.min(r.end, i),
!e.extend && s > r && (i = r,
r = s,
s = i),
i = a0(n, s);
var o = a0(n, r);
i && o && (e.rangeCount !== 1 || e.anchorNode !== i.node || e.anchorOffset !== i.offset || e.focusNode !== o.node || e.focusOffset !== o.offset) && (t = t.createRange(),
t.setStart(i.node, i.offset),
e.removeAllRanges(),
s > r ? (e.addRange(t),
e.extend(o.node, o.offset)) : (t.setEnd(o.node, o.offset),
e.addRange(t)))
}
}
for (t = [],
e = n; e = e.parentNode; )
e.nodeType === 1 && t.push({
element: e,
left: e.scrollLeft,
top: e.scrollTop
});
for (typeof n.focus == "function" && n.focus(),
n = 0; n < t.length; n++)
e = t[n],
e.element.scrollLeft = e.left,
e.element.scrollTop = e.top
}
}
var XO = qr && "documentMode"in document && 11 >= document.documentMode
, ao = null
, Ap = null
, nl = null
, Dp = !1;
function l0(e, t, n) {
var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
Dp || ao == null || ao !== Kc(r) || (r = ao,
"selectionStart"in r && $g(r) ? r = {
start: r.selectionStart,
end: r.selectionEnd
} : (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection(),
r = {
anchorNode: r.anchorNode,
anchorOffset: r.anchorOffset,
focusNode: r.focusNode,
focusOffset: r.focusOffset
}),
nl && Cl(nl, r) || (nl = r,
r = ed(Ap, "onSelect"),
0 < r.length && (t = new Ng("onSelect","select",null,t,n),
e.push({
event: t,
listeners: r
}),
t.target = ao)))
}
function qu(e, t) {
var n = {};
return n[e.toLowerCase()] = t.toLowerCase(),
n["Webkit" + e] = "webkit" + t,
n["Moz" + e] = "moz" + t,
n
}
var lo = {
animationend: qu("Animation", "AnimationEnd"),
animationiteration: qu("Animation", "AnimationIteration"),
animationstart: qu("Animation", "AnimationStart"),
transitionend: qu("Transition", "TransitionEnd")
}
, rh = {}
, dS = {};
qr && (dS = document.createElement("div").style,
"AnimationEvent"in window || (delete lo.animationend.animation,
delete lo.animationiteration.animation,
delete lo.animationstart.animation),
"TransitionEvent"in window || delete lo.transitionend.transition);
function tf(e) {
if (rh[e])
return rh[e];
if (!lo[e])
return e;
var t = lo[e], n;
for (n in t)
if (t.hasOwnProperty(n) && n in dS)
return rh[e] = t[n];
return e
}
var fS = tf("animationend")
, hS = tf("animationiteration")
, pS = tf("animationstart")
, mS = tf("transitionend")
, gS = new Map
, u0 = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
function Hi(e, t) {
gS.set(e, t),
Fs(t, [e])
}
for (var ih = 0; ih < u0.length; ih++) {
var sh = u0[ih]
, JO = sh.toLowerCase()
, ZO = sh[0].toUpperCase() + sh.slice(1);
Hi(JO, "on" + ZO)
}
Hi(fS, "onAnimationEnd");
Hi(hS, "onAnimationIteration");
Hi(pS, "onAnimationStart");
Hi("dblclick", "onDoubleClick");
Hi("focusin", "onFocus");
Hi("focusout", "onBlur");
Hi(mS, "onTransitionEnd");
qo("onMouseEnter", ["mouseout", "mouseover"]);
qo("onMouseLeave", ["mouseout", "mouseover"]);
qo("onPointerEnter", ["pointerout", "pointerover"]);
qo("onPointerLeave", ["pointerout", "pointerover"]);
Fs("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
Fs("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
Fs("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
Fs("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
Fs("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
Fs("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var Ka = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" ")
, ek = new Set("cancel close invalid load scroll toggle".split(" ").concat(Ka));
function c0(e, t, n) {
var r = e.type || "unknown-event";
e.currentTarget = n,
JR(r, t, void 0, e),
e.currentTarget = null
}
function vS(e, t) {
t = (t & 4) !== 0;
for (var n = 0; n < e.length; n++) {
var r = e[n]
, i = r.event;
r = r.listeners;
e: {
var s = void 0;
if (t)
for (var o = r.length - 1; 0 <= o; o--) {
var a = r[o]
, l = a.instance
, u = a.currentTarget;
if (a = a.listener,
l !== s && i.isPropagationStopped())
break e;
c0(i, a, u),
s = l
}
else
for (o = 0; o < r.length; o++) {
if (a = r[o],
l = a.instance,
u = a.currentTarget,
a = a.listener,
l !== s && i.isPropagationStopped())
break e;
c0(i, a, u),
s = l
}
}
}
if (Qc)
throw e = Rp,
Qc = !1,
Rp = null,
e
}
function at(e, t) {
var n = t[$p];
n === void 0 && (n = t[$p] = new Set);
var r = e + "__bubble";
n.has(r) || (yS(t, e, 2, !1),
n.add(r))
}
function oh(e, t, n) {
var r = 0;
t && (r |= 4),
yS(n, e, r, t)
}
var Qu = "_reactListening" + Math.random().toString(36).slice(2);
function Pl(e) {
if (!e[Qu]) {
e[Qu] = !0,
Pb.forEach(function(n) {
n !== "selectionchange" && (ek.has(n) || oh(n, !1, e),
oh(n, !0, e))
});
var t = e.nodeType === 9 ? e : e.ownerDocument;
t === null || t[Qu] || (t[Qu] = !0,
oh("selectionchange", !1, t))
}
}
function yS(e, t, n, r) {
switch (tS(t)) {
case 1:
var i = pO;
break;
case 4:
i = mO;
break;
default:
i = Dg
}
n = i.bind(null, t, n, e),
i = void 0,
!Tp || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (i = !0),
r ? i !== void 0 ? e.addEventListener(t, n, {
capture: !0,
passive: i
}) : e.addEventListener(t, n, !0) : i !== void 0 ? e.addEventListener(t, n, {
passive: i
}) : e.addEventListener(t, n, !1)
}
function ah(e, t, n, r, i) {
var s = r;
if (!(t & 1) && !(t & 2) && r !== null)
e: for (; ; ) {
if (r === null)
return;
var o = r.tag;
if (o === 3 || o === 4) {
var a = r.stateNode.containerInfo;
if (a === i || a.nodeType === 8 && a.parentNode === i)
break;
if (o === 4)
for (o = r.return; o !== null; ) {
var l = o.tag;
if ((l === 3 || l === 4) && (l = o.stateNode.containerInfo,
l === i || l.nodeType === 8 && l.parentNode === i))
return;
o = o.return
}
for (; a !== null; ) {
if (o = as(a),
o === null)
return;
if (l = o.tag,
l === 5 || l === 6) {
r = s = o;
continue e
}
a = a.parentNode
}
}
r = r.return
}
zb(function() {
var u = s
, c = Og(n)
, d = [];
e: {
var f = gS.get(e);
if (f !== void 0) {
var h = Ng
, m = e;
switch (e) {
case "keypress":
if (Cc(n) === 0)
break e;
case "keydown":
case "keyup":
h = _O;
break;
case "focusin":
m = "focus",
h = eh;
break;
case "focusout":
m = "blur",
h = eh;
break;
case "beforeblur":
case "afterblur":
h = eh;
break;
case "click":
if (n.button === 2)
break e;
case "auxclick":
case "dblclick":
case "mousedown":
case "mousemove":
case "mouseup":
case "mouseout":
case "mouseover":
case "contextmenu":
h = Jy;
break;
case "drag":
case "dragend":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "dragstart":
case "drop":
h = yO;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
h = LO;
break;
case fS:
case hS:
case pS:
h = bO;
break;
case mS:
h = MO;
break;
case "scroll":
h = gO;
break;
case "wheel":
h = $O;
break;
case "copy":
case "cut":
case "paste":
h = EO;
break;
case "gotpointercapture":
case "lostpointercapture":
case "pointercancel":
case "pointerdown":
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerup":
h = e0
}
var p = (t & 4) !== 0
, b = !p && e === "scroll"
, v = p ? f !== null ? f + "Capture" : null : f;
p = [];
for (var g = u, w; g !== null; ) {
w = g;
var E = w.stateNode;
if (w.tag === 5 && E !== null && (w = E,
v !== null && (E = wl(g, v),
E != null && p.push(Tl(g, E, w)))),
b)
break;
g = g.return
}
0 < p.length && (f = new h(f,m,null,n,c),
d.push({
event: f,
listeners: p
}))
}
}
if (!(t & 7)) {
e: {
if (f = e === "mouseover" || e === "pointerover",
h = e === "mouseout" || e === "pointerout",
f && n !== Cp && (m = n.relatedTarget || n.fromElement) && (as(m) || m[Qr]))
break e;
if ((h || f) && (f = c.window === c ? c : (f = c.ownerDocument) ? f.defaultView || f.parentWindow : window,
h ? (m = n.relatedTarget || n.toElement,
h = u,
m = m ? as(m) : null,
m !== null && (b = Vs(m),
m !== b || m.tag !== 5 && m.tag !== 6) && (m = null)) : (h = null,
m = u),
h !== m)) {
if (p = Jy,
E = "onMouseLeave",
v = "onMouseEnter",
g = "mouse",
(e === "pointerout" || e === "pointerover") && (p = e0,
E = "onPointerLeave",
v = "onPointerEnter",
g = "pointer"),
b = h == null ? f : uo(h),
w = m == null ? f : uo(m),
f = new p(E,g + "leave",h,n,c),
f.target = b,
f.relatedTarget = w,
E = null,
as(c) === u && (p = new p(v,g + "enter",m,n,c),
p.target = w,
p.relatedTarget = b,
E = p),
b = E,
h && m)
t: {
for (p = h,
v = m,
g = 0,
w = p; w; w = Qs(w))
g++;
for (w = 0,
E = v; E; E = Qs(E))
w++;
for (; 0 < g - w; )
p = Qs(p),
g--;
for (; 0 < w - g; )
v = Qs(v),
w--;
for (; g--; ) {
if (p === v || v !== null && p === v.alternate)
break t;
p = Qs(p),
v = Qs(v)
}
p = null
}
else
p = null;
h !== null && d0(d, f, h, p, !1),
m !== null && b !== null && d0(d, b, m, p, !0)
}
}
e: {
if (f = u ? uo(u) : window,
h = f.nodeName && f.nodeName.toLowerCase(),
h === "select" || h === "input" && f.type === "file")
var D = HO;
else if (r0(f))
if (aS)
D = qO;
else {
D = GO;
var V = WO
}
else
(h = f.nodeName) && h.toLowerCase() === "input" && (f.type === "checkbox" || f.type === "radio") && (D = KO);
if (D && (D = D(e, u))) {
oS(d, D, n, c);
break e
}
V && V(e, f, u),
e === "focusout" && (V = f._wrapperState) && V.controlled && f.type === "number" && wp(f, "number", f.value)
}
switch (V = u ? uo(u) : window,
e) {
case "focusin":
(r0(V) || V.contentEditable === "true") && (ao = V,
Ap = u,
nl = null);
break;
case "focusout":
nl = Ap = ao = null;
break;
case "mousedown":
Dp = !0;
break;
case "contextmenu":
case "mouseup":
case "dragend":
Dp = !1,
l0(d, n, c);
break;
case "selectionchange":
if (XO)
break;
case "keydown":
case "keyup":
l0(d, n, c)
}
var C;
if (jg)
e: {
switch (e) {
case "compositionstart":
var P = "onCompositionStart";
break e;
case "compositionend":
P = "onCompositionEnd";
break e;
case "compositionupdate":
P = "onCompositionUpdate";
break e
}
P = void 0
}
else
oo ? iS(e, n) && (P = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (P = "onCompositionStart");
P && (rS && n.locale !== "ko" && (oo || P !== "onCompositionStart" ? P === "onCompositionEnd" && oo && (C = nS()) : (Pi = c,
Lg = "value"in Pi ? Pi.value : Pi.textContent,
oo = !0)),
V = ed(u, P),
0 < V.length && (P = new Zy(P,e,null,n,c),
d.push({
event: P,
listeners: V
}),
C ? P.data = C : (C = sS(n),
C !== null && (P.data = C)))),
(C = FO ? VO(e, n) : zO(e, n)) && (u = ed(u, "onBeforeInput"),
0 < u.length && (c = new Zy("onBeforeInput","beforeinput",null,n,c),
d.push({
event: c,
listeners: u
}),
c.data = C))
}
vS(d, t)
})
}
function Tl(e, t, n) {
return {
instance: e,
listener: t,
currentTarget: n
}
}
function ed(e, t) {
for (var n = t + "Capture", r = []; e !== null; ) {
var i = e
, s = i.stateNode;
i.tag === 5 && s !== null && (i = s,
s = wl(e, n),
s != null && r.unshift(Tl(e, s, i)),
s = wl(e, t),
s != null && r.push(Tl(e, s, i))),
e = e.return
}
return r
}
function Qs(e) {
if (e === null)
return null;
do
e = e.return;
while (e && e.tag !== 5);
return e || null
}
function d0(e, t, n, r, i) {
for (var s = t._reactName, o = []; n !== null && n !== r; ) {
var a = n
, l = a.alternate
, u = a.stateNode;
if (l !== null && l === r)
break;
a.tag === 5 && u !== null && (a = u,
i ? (l = wl(n, s),
l != null && o.unshift(Tl(n, l, a))) : i || (l = wl(n, s),
l != null && o.push(Tl(n, l, a)))),
n = n.return
}
o.length !== 0 && e.push({
event: t,
listeners: o
})
}
var tk = /\r\n?/g
, nk = /\u0000|\uFFFD/g;
function f0(e) {
return (typeof e == "string" ? e : "" + e).replace(tk, `
`).replace(nk, "")
}
function Yu(e, t, n) {
if (t = f0(t),
f0(e) !== t && n)
throw Error(oe(425))
}
function td() {}
var Lp = null
, Np = null;
function Mp(e, t) {
return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null
}
var jp = typeof setTimeout == "function" ? setTimeout : void 0
, rk = typeof clearTimeout == "function" ? clearTimeout : void 0
, h0 = typeof Promise == "function" ? Promise : void 0
, ik = typeof queueMicrotask == "function" ? queueMicrotask : typeof h0 < "u" ? function(e) {
return h0.resolve(null).then(e).catch(sk)
}
: jp;
function sk(e) {
setTimeout(function() {
throw e
})
}
function lh(e, t) {
var n = t
, r = 0;
do {
var i = n.nextSibling;
if (e.removeChild(n),
i && i.nodeType === 8)
if (n = i.data,
n === "/$") {
if (r === 0) {
e.removeChild(i),
Sl(t);
return
}
r--
} else
n !== "$" && n !== "$?" && n !== "$!" || r++;
n = i
} while (n);
Sl(t)
}
function _i(e) {
for (; e != null; e = e.nextSibling) {
var t = e.nodeType;
if (t === 1 || t === 3)
break;
if (t === 8) {
if (t = e.data,
t === "$" || t === "$!" || t === "$?")
break;
if (t === "/$")
return null
}
}
return e
}
function p0(e) {
e = e.previousSibling;
for (var t = 0; e; ) {
if (e.nodeType === 8) {
var n = e.data;
if (n === "$" || n === "$!" || n === "$?") {
if (t === 0)
return e;
t--
} else
n === "/$" && t++
}
e = e.previousSibling
}
return null
}
var ha = Math.random().toString(36).slice(2)
, Pr = "__reactFiber$" + ha
, Rl = "__reactProps$" + ha
, Qr = "__reactContainer$" + ha
, $p = "__reactEvents$" + ha
, ok = "__reactListeners$" + ha
, ak = "__reactHandles$" + ha;
function as(e) {
var t = e[Pr];
if (t)
return t;
for (var n = e.parentNode; n; ) {
if (t = n[Qr] || n[Pr]) {
if (n = t.alternate,
t.child !== null || n !== null && n.child !== null)
for (e = p0(e); e !== null; ) {
if (n = e[Pr])
return n;
e = p0(e)
}
return t
}
e = n,
n = e.parentNode
}
return null
}
function yu(e) {
return e = e[Pr] || e[Qr],
!e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e
}
function uo(e) {
if (e.tag === 5 || e.tag === 6)
return e.stateNode;
throw Error(oe(33))
}
function nf(e) {
return e[Rl] || null
}
var Ip = []
, co = -1;
function Wi(e) {
return {
current: e
}
}
function ut(e) {
0 > co || (e.current = Ip[co],
Ip[co] = null,
co--)
}
function rt(e, t) {
co++,
Ip[co] = e.current,
e.current = t
}
var Fi = {}
, an = Wi(Fi)
, Sn = Wi(!1)
, Ts = Fi;
function Qo(e, t) {
var n = e.type.contextTypes;
if (!n)
return Fi;
var r = e.stateNode;
if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
return r.__reactInternalMemoizedMaskedChildContext;
var i = {}, s;
for (s in n)
i[s] = t[s];
return r && (e = e.stateNode,
e.__reactInternalMemoizedUnmaskedChildContext = t,
e.__reactInternalMemoizedMaskedChildContext = i),
i
}
function En(e) {
return e = e.childContextTypes,
e != null
}
function nd() {
ut(Sn),
ut(an)
}
function m0(e, t, n) {
if (an.current !== Fi)
throw Error(oe(168));
rt(an, t),
rt(Sn, n)
}
function wS(e, t, n) {
var r = e.stateNode;
if (t = t.childContextTypes,
typeof r.getChildContext != "function")
return n;
r = r.getChildContext();
for (var i in r)
if (!(i in t))
throw Error(oe(108, WR(e) || "Unknown", i));
return xt({}, n, r)
}
function rd(e) {
return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Fi,
Ts = an.current,
rt(an, e),
rt(Sn, Sn.current),
!0
}
function g0(e, t, n) {
var r = e.stateNode;
if (!r)
throw Error(oe(169));
n ? (e = wS(e, t, Ts),
r.__reactInternalMemoizedMergedChildContext = e,
ut(Sn),
ut(an),
rt(an, e)) : ut(Sn),
rt(Sn, n)
}
var jr = null
, rf = !1
, uh = !1;
function xS(e) {
jr === null ? jr = [e] : jr.push(e)
}
function lk(e) {
rf = !0,
xS(e)
}
function Gi() {
if (!uh && jr !== null) {
uh = !0;
var e = 0
, t = Je;
try {
var n = jr;
for (Je = 1; e < n.length; e++) {
var r = n[e];
do
r = r(!0);
while (r !== null)
}
jr = null,
rf = !1
} catch (i) {
throw jr !== null && (jr = jr.slice(e + 1)),
Wb(kg, Gi),
i
} finally {
Je = t,
uh = !1
}
}
return null
}
var fo = []
, ho = 0
, id = null
, sd = 0
, Hn = []
, Wn = 0
, Rs = null
, Ir = 1
, Fr = "";
function es(e, t) {
fo[ho++] = sd,
fo[ho++] = id,
id = e,
sd = t
}
function bS(e, t, n) {
Hn[Wn++] = Ir,
Hn[Wn++] = Fr,
Hn[Wn++] = Rs,
Rs = e;
var r = Ir;
e = Fr;
var i = 32 - ur(r) - 1;
r &= ~(1 << i),
n += 1;
var s = 32 - ur(t) + i;
if (30 < s) {
var o = i - i % 5;
s = (r & (1 << o) - 1).toString(32),
r >>= o,
i -= o,
Ir = 1 << 32 - ur(t) + i | n << i | r,
Fr = s + e
} else
Ir = 1 << s | n << i | r,
Fr = e
}
function Ig(e) {
e.return !== null && (es(e, 1),
bS(e, 1, 0))
}
function Fg(e) {
for (; e === id; )
id = fo[--ho],
fo[ho] = null,
sd = fo[--ho],
fo[ho] = null;
for (; e === Rs; )
Rs = Hn[--Wn],
Hn[Wn] = null,
Fr = Hn[--Wn],
Hn[Wn] = null,
Ir = Hn[--Wn],
Hn[Wn] = null
}
var An = null
, kn = null
, ht = !1
, or = null;
function SS(e, t) {
var n = Qn(5, null, null, 0);
n.elementType = "DELETED",
n.stateNode = t,
n.return = e,
t = e.deletions,
t === null ? (e.deletions = [n],
e.flags |= 16) : t.push(n)
}
function v0(e, t) {
switch (e.tag) {
case 5:
var n = e.type;
return t = t.nodeType !== 1 || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t,
t !== null ? (e.stateNode = t,
An = e,
kn = _i(t.firstChild),
!0) : !1;
case 6:
return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t,
t !== null ? (e.stateNode = t,
An = e,
kn = null,
!0) : !1;
case 13:
return t = t.nodeType !== 8 ? null : t,
t !== null ? (n = Rs !== null ? {
id: Ir,
overflow: Fr
} : null,
e.memoizedState = {
dehydrated: t,
treeContext: n,
retryLane: 1073741824
},
n = Qn(18, null, null, 0),
n.stateNode = t,
n.return = e,
e.child = n,
An = e,
kn = null,
!0) : !1;
default:
return !1
}
}
function Fp(e) {
return (e.mode & 1) !== 0 && (e.flags & 128) === 0
}
function Vp(e) {
if (ht) {
var t = kn;
if (t) {
var n = t;
if (!v0(e, t)) {
if (Fp(e))
throw Error(oe(418));
t = _i(n.nextSibling);
var r = An;
t && v0(e, t) ? SS(r, n) : (e.flags = e.flags & -4097 | 2,
ht = !1,
An = e)
}
} else {
if (Fp(e))
throw Error(oe(418));
e.flags = e.flags & -4097 | 2,
ht = !1,
An = e
}
}
}
function y0(e) {
for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; )
e = e.return;
An = e
}
function Xu(e) {
if (e !== An)
return !1;
if (!ht)
return y0(e),
ht = !0,
!1;
var t;
if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type,
t = t !== "head" && t !== "body" && !Mp(e.type, e.memoizedProps)),
t && (t = kn)) {
if (Fp(e))
throw ES(),
Error(oe(418));
for (; t; )
SS(e, t),
t = _i(t.nextSibling)
}
if (y0(e),
e.tag === 13) {
if (e = e.memoizedState,
e = e !== null ? e.dehydrated : null,
!e)
throw Error(oe(317));
e: {
for (e = e.nextSibling,
t = 0; e; ) {
if (e.nodeType === 8) {
var n = e.data;
if (n === "/$") {
if (t === 0) {
kn = _i(e.nextSibling);
break e
}
t--
} else
n !== "$" && n !== "$!" && n !== "$?" || t++
}
e = e.nextSibling
}
kn = null
}
} else
kn = An ? _i(e.stateNode.nextSibling) : null;
return !0
}
function ES() {
for (var e = kn; e; )
e = _i(e.nextSibling)
}
function Yo() {
kn = An = null,
ht = !1
}
function Vg(e) {
or === null ? or = [e] : or.push(e)
}
var uk = ti.ReactCurrentBatchConfig;
function Oa(e, t, n) {
if (e = n.ref,
e !== null && typeof e != "function" && typeof e != "object") {
if (n._owner) {
if (n = n._owner,
n) {
if (n.tag !== 1)
throw Error(oe(309));
var r = n.stateNode
}
if (!r)
throw Error(oe(147, e));
var i = r
, s = "" + e;
return t !== null && t.ref !== null && typeof t.ref == "function" && t.ref._stringRef === s ? t.ref : (t = function(o) {
var a = i.refs;
o === null ? delete a[s] : a[s] = o
}
,
t._stringRef = s,
t)
}
if (typeof e != "string")
throw Error(oe(284));
if (!n._owner)
throw Error(oe(290, e))
}
return e
}
function Ju(e, t) {
throw e = Object.prototype.toString.call(t),
Error(oe(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e))
}
function w0(e) {
var t = e._init;
return t(e._payload)
}
function CS(e) {
function t(v, g) {
if (e) {
var w = v.deletions;
w === null ? (v.deletions = [g],
v.flags |= 16) : w.push(g)
}
}
function n(v, g) {
if (!e)
return null;
for (; g !== null; )
t(v, g),
g = g.sibling;
return null
}
function r(v, g) {
for (v = new Map; g !== null; )
g.key !== null ? v.set(g.key, g) : v.set(g.index, g),
g = g.sibling;
return v
}
function i(v, g) {
return v = Ni(v, g),
v.index = 0,
v.sibling = null,
v
}
function s(v, g, w) {
return v.index = w,
e ? (w = v.alternate,
w !== null ? (w = w.index,
w < g ? (v.flags |= 2,
g) : w) : (v.flags |= 2,
g)) : (v.flags |= 1048576,
g)
}
function o(v) {
return e && v.alternate === null && (v.flags |= 2),
v
}
function a(v, g, w, E) {
return g === null || g.tag !== 6 ? (g = gh(w, v.mode, E),
g.return = v,
g) : (g = i(g, w),
g.return = v,
g)
}
function l(v, g, w, E) {
var D = w.type;
return D === so ? c(v, g, w.props.children, E, w.key) : g !== null && (g.elementType === D || typeof D == "object" && D !== null && D.$$typeof === di && w0(D) === g.type) ? (E = i(g, w.props),
E.ref = Oa(v, g, w),
E.return = v,
E) : (E = Ac(w.type, w.key, w.props, null, v.mode, E),
E.ref = Oa(v, g, w),
E.return = v,
E)
}
function u(v, g, w, E) {
return g === null || g.tag !== 4 || g.stateNode.containerInfo !== w.containerInfo || g.stateNode.implementation !== w.implementation ? (g = vh(w, v.mode, E),
g.return = v,
g) : (g = i(g, w.children || []),
g.return = v,
g)
}
function c(v, g, w, E, D) {
return g === null || g.tag !== 7 ? (g = Es(w, v.mode, E, D),
g.return = v,
g) : (g = i(g, w),
g.return = v,
g)
}
function d(v, g, w) {
if (typeof g == "string" && g !== "" || typeof g == "number")
return g = gh("" + g, v.mode, w),
g.return = v,
g;
if (typeof g == "object" && g !== null) {
switch (g.$$typeof) {
case zu:
return w = Ac(g.type, g.key, g.props, null, v.mode, w),
w.ref = Oa(v, null, g),
w.return = v,
w;
case io:
return g = vh(g, v.mode, w),
g.return = v,
g;
case di:
var E = g._init;
return d(v, E(g._payload), w)
}
if (Wa(g) || Ea(g))
return g = Es(g, v.mode, w, null),
g.return = v,
g;
Ju(v, g)
}
return null
}
function f(v, g, w, E) {
var D = g !== null ? g.key : null;
if (typeof w == "string" && w !== "" || typeof w == "number")
return D !== null ? null : a(v, g, "" + w, E);
if (typeof w == "object" && w !== null) {
switch (w.$$typeof) {
case zu:
return w.key === D ? l(v, g, w, E) : null;
case io:
return w.key === D ? u(v, g, w, E) : null;
case di:
return D = w._init,
f(v, g, D(w._payload), E)
}
if (Wa(w) || Ea(w))
return D !== null ? null : c(v, g, w, E, null);
Ju(v, w)
}
return null
}
function h(v, g, w, E, D) {
if (typeof E == "string" && E !== "" || typeof E == "number")
return v = v.get(w) || null,
a(g, v, "" + E, D);
if (typeof E == "object" && E !== null) {
switch (E.$$typeof) {
case zu:
return v = v.get(E.key === null ? w : E.key) || null,
l(g, v, E, D);
case io:
return v = v.get(E.key === null ? w : E.key) || null,
u(g, v, E, D);
case di:
var V = E._init;
return h(v, g, w, V(E._payload), D)
}
if (Wa(E) || Ea(E))
return v = v.get(w) || null,
c(g, v, E, D, null);
Ju(g, E)
}
return null
}
function m(v, g, w, E) {
for (var D = null, V = null, C = g, P = g = 0, A = null; C !== null && P < w.length; P++) {
C.index > P ? (A = C,
C = null) : A = C.sibling;
var B = f(v, C, w[P], E);
if (B === null) {
C === null && (C = A);
break
}
e && C && B.alternate === null && t(v, C),
g = s(B, g, P),
V === null ? D = B : V.sibling = B,
V = B,
C = A
}
if (P === w.length)
return n(v, C),
ht && es(v, P),
D;
if (C === null) {
for (; P < w.length; P++)
C = d(v, w[P], E),
C !== null && (g = s(C, g, P),
V === null ? D = C : V.sibling = C,
V = C);
return ht && es(v, P),
D
}
for (C = r(v, C); P < w.length; P++)
A = h(C, v, P, w[P], E),
A !== null && (e && A.alternate !== null && C.delete(A.key === null ? P : A.key),
g = s(A, g, P),
V === null ? D = A : V.sibling = A,
V = A);
return e && C.forEach(function(Q) {
return t(v, Q)
}),
ht && es(v, P),
D
}
function p(v, g, w, E) {
var D = Ea(w);
if (typeof D != "function")
throw Error(oe(150));
if (w = D.call(w),
w == null)
throw Error(oe(151));
for (var V = D = null, C = g, P = g = 0, A = null, B = w.next(); C !== null && !B.done; P++,
B = w.next()) {
C.index > P ? (A = C,
C = null) : A = C.sibling;
var Q = f(v, C, B.value, E);
if (Q === null) {
C === null && (C = A);
break
}
e && C && Q.alternate === null && t(v, C),
g = s(Q, g, P),
V === null ? D = Q : V.sibling = Q,
V = Q,
C = A
}
if (B.done)
return n(v, C),
ht && es(v, P),
D;
if (C === null) {
for (; !B.done; P++,
B = w.next())
B = d(v, B.value, E),
B !== null && (g = s(B, g, P),
V === null ? D = B : V.sibling = B,
V = B);
return ht && es(v, P),
D
}
for (C = r(v, C); !B.done; P++,
B = w.next())
B = h(C, v, P, B.value, E),
B !== null && (e && B.alternate !== null && C.delete(B.key === null ? P : B.key),
g = s(B, g, P),
V === null ? D = B : V.sibling = B,
V = B);
return e && C.forEach(function(Z) {
return t(v, Z)
}),
ht && es(v, P),
D
}
function b(v, g, w, E) {
if (typeof w == "object" && w !== null && w.type === so && w.key === null && (w = w.props.children),
typeof w == "object" && w !== null) {
switch (w.$$typeof) {
case zu:
e: {
for (var D = w.key, V = g; V !== null; ) {
if (V.key === D) {
if (D = w.type,
D === so) {
if (V.tag === 7) {
n(v, V.sibling),
g = i(V, w.props.children),
g.return = v,
v = g;
break e
}
} else if (V.elementType === D || typeof D == "object" && D !== null && D.$$typeof === di && w0(D) === V.type) {
n(v, V.sibling),
g = i(V, w.props),
g.ref = Oa(v, V, w),
g.return = v,
v = g;
break e
}
n(v, V);
break
} else
t(v, V);
V = V.sibling
}
w.type === so ? (g = Es(w.props.children, v.mode, E, w.key),
g.return = v,
v = g) : (E = Ac(w.type, w.key, w.props, null, v.mode, E),
E.ref = Oa(v, g, w),
E.return = v,
v = E)
}
return o(v);
case io:
e: {
for (V = w.key; g !== null; ) {
if (g.key === V)
if (g.tag === 4 && g.stateNode.containerInfo === w.containerInfo && g.stateNode.implementation === w.implementation) {
n(v, g.sibling),
g = i(g, w.children || []),
g.return = v,
v = g;
break e
} else {
n(v, g);
break
}
else
t(v, g);
g = g.sibling
}
g = vh(w, v.mode, E),
g.return = v,
v = g
}
return o(v);
case di:
return V = w._init,
b(v, g, V(w._payload), E)
}
if (Wa(w))
return m(v, g, w, E);
if (Ea(w))
return p(v, g, w, E);
Ju(v, w)
}
return typeof w == "string" && w !== "" || typeof w == "number" ? (w = "" + w,
g !== null && g.tag === 6 ? (n(v, g.sibling),
g = i(g, w),
g.return = v,
v = g) : (n(v, g),
g = gh(w, v.mode, E),
g.return = v,
v = g),
o(v)) : n(v, g)
}
return b
}
var Xo = CS(!0)
, PS = CS(!1)
, od = Wi(null)
, ad = null
, po = null
, zg = null;
function Ug() {
zg = po = ad = null
}
function Bg(e) {
var t = od.current;
ut(od),
e._currentValue = t
}
function zp(e, t, n) {
for (; e !== null; ) {
var r = e.alternate;
if ((e.childLanes & t) !== t ? (e.childLanes |= t,
r !== null && (r.childLanes |= t)) : r !== null && (r.childLanes & t) !== t && (r.childLanes |= t),
e === n)
break;
e = e.return
}
}
function ko(e, t) {
ad = e,
zg = po = null,
e = e.dependencies,
e !== null && e.firstContext !== null && (e.lanes & t && (bn = !0),
e.firstContext = null)
}
function Jn(e) {
var t = e._currentValue;
if (zg !== e)
if (e = {
context: e,
memoizedValue: t,
next: null
},
po === null) {
if (ad === null)
throw Error(oe(308));
po = e,
ad.dependencies = {
lanes: 0,
firstContext: e
}
} else
po = po.next = e;
return t
}
var ls = null;
function Hg(e) {
ls === null ? ls = [e] : ls.push(e)
}
function TS(e, t, n, r) {
var i = t.interleaved;
return i === null ? (n.next = n,
Hg(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n,
Yr(e, r)
}
function Yr(e, t) {
e.lanes |= t;
var n = e.alternate;
for (n !== null && (n.lanes |= t),
n = e,
e = e.return; e !== null; )
e.childLanes |= t,
n = e.alternate,
n !== null && (n.childLanes |= t),
n = e,
e = e.return;
return n.tag === 3 ? n.stateNode : null
}
var fi = !1;
function Wg(e) {
e.updateQueue = {
baseState: e.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: 0
},
effects: null
}
}
function RS(e, t) {
e = e.updateQueue,
t.updateQueue === e && (t.updateQueue = {
baseState: e.baseState,
firstBaseUpdate: e.firstBaseUpdate,
lastBaseUpdate: e.lastBaseUpdate,
shared: e.shared,
effects: e.effects
})
}
function Ur(e, t) {
return {
eventTime: e,
lane: t,
tag: 0,
payload: null,
callback: null,
next: null
}
}
function Ai(e, t, n) {
var r = e.updateQueue;
if (r === null)
return null;
if (r = r.shared,
He & 2) {
var i = r.pending;
return i === null ? t.next = t : (t.next = i.next,
i.next = t),
r.pending = t,
Yr(e, n)
}
return i = r.interleaved,
i === null ? (t.next = t,
Hg(r)) : (t.next = i.next,
i.next = t),
r.interleaved = t,
Yr(e, n)
}
function Pc(e, t, n) {
if (t = t.updateQueue,
t !== null && (t = t.shared,
(n & 4194240) !== 0)) {
var r = t.lanes;
r &= e.pendingLanes,
n |= r,
t.lanes = n,
_g(e, n)
}
}
function x0(e, t) {
var n = e.updateQueue
, r = e.alternate;
if (r !== null && (r = r.updateQueue,
n === r)) {
var i = null
, s = null;
if (n = n.firstBaseUpdate,
n !== null) {
do {
var o = {
eventTime: n.eventTime,
lane: n.lane,
tag: n.tag,
payload: n.payload,
callback: n.callback,
next: null
};
s === null ? i = s = o : s = s.next = o,
n = n.next
} while (n !== null);
s === null ? i = s = t : s = s.next = t
} else
i = s = t;
n = {
baseState: r.baseState,
firstBaseUpdate: i,
lastBaseUpdate: s,
shared: r.shared,
effects: r.effects
},
e.updateQueue = n;
return
}
e = n.lastBaseUpdate,
e === null ? n.firstBaseUpdate = t : e.next = t,
n.lastBaseUpdate = t
}
function ld(e, t, n, r) {
var i = e.updateQueue;
fi = !1;
var s = i.firstBaseUpdate
, o = i.lastBaseUpdate
, a = i.shared.pending;
if (a !== null) {
i.shared.pending = null;
var l = a
, u = l.next;
l.next = null,
o === null ? s = u : o.next = u,
o = l;
var c = e.alternate;
c !== null && (c = c.updateQueue,
a = c.lastBaseUpdate,
a !== o && (a === null ? c.firstBaseUpdate = u : a.next = u,
c.lastBaseUpdate = l))
}
if (s !== null) {
var d = i.baseState;
o = 0,
c = u = l = null,
a = s;
do {
var f = a.lane
, h = a.eventTime;
if ((r & f) === f) {
c !== null && (c = c.next = {
eventTime: h,
lane: 0,
tag: a.tag,
payload: a.payload,
callback: a.callback,
next: null
});
e: {
var m = e
, p = a;
switch (f = t,
h = n,
p.tag) {
case 1:
if (m = p.payload,
typeof m == "function") {
d = m.call(h, d, f);
break e
}
d = m;
break e;
case 3:
m.flags = m.flags & -65537 | 128;
case 0:
if (m = p.payload,
f = typeof m == "function" ? m.call(h, d, f) : m,
f == null)
break e;
d = xt({}, d, f);
break e;
case 2:
fi = !0
}
}
a.callback !== null && a.lane !== 0 && (e.flags |= 64,
f = i.effects,
f === null ? i.effects = [a] : f.push(a))
} else
h = {
eventTime: h,
lane: f,
tag: a.tag,
payload: a.payload,
callback: a.callback,
next: null
},
c === null ? (u = c = h,
l = d) : c = c.next = h,
o |= f;
if (a = a.next,
a === null) {
if (a = i.shared.pending,
a === null)
break;
f = a,
a = f.next,
f.next = null,
i.lastBaseUpdate = f,
i.shared.pending = null
}
} while (!0);
if (c === null && (l = d),
i.baseState = l,
i.firstBaseUpdate = u,
i.lastBaseUpdate = c,
t = i.shared.interleaved,
t !== null) {
i = t;
do
o |= i.lane,
i = i.next;
while (i !== t)
} else
s === null && (i.shared.lanes = 0);
ks |= o,
e.lanes = o,
e.memoizedState = d
}
}
function b0(e, t, n) {
if (e = t.effects,
t.effects = null,
e !== null)
for (t = 0; t < e.length; t++) {
var r = e[t]
, i = r.callback;
if (i !== null) {
if (r.callback = null,
r = n,
typeof i != "function")
throw Error(oe(191, i));
i.call(r)
}
}
}
var wu = {}
, kr = Wi(wu)
, Ol = Wi(wu)
, kl = Wi(wu);
function us(e) {
if (e === wu)
throw Error(oe(174));
return e
}
function Gg(e, t) {
switch (rt(kl, t),
rt(Ol, e),
rt(kr, wu),
e = t.nodeType,
e) {
case 9:
case 11:
t = (t = t.documentElement) ? t.namespaceURI : bp(null, "");
break;
default:
e = e === 8 ? t.parentNode : t,
t = e.namespaceURI || null,
e = e.tagName,
t = bp(t, e)
}
ut(kr),
rt(kr, t)
}
function Jo() {
ut(kr),
ut(Ol),
ut(kl)
}
function OS(e) {
us(kl.current);
var t = us(kr.current)
, n = bp(t, e.type);
t !== n && (rt(Ol, e),
rt(kr, n))
}
function Kg(e) {
Ol.current === e && (ut(kr),
ut(Ol))
}
var gt = Wi(0);
function ud(e) {
for (var t = e; t !== null; ) {
if (t.tag === 13) {
var n = t.memoizedState;
if (n !== null && (n = n.dehydrated,
n === null || n.data === "$?" || n.data === "$!"))
return t
} else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) {
if (t.flags & 128)
return t
} else if (t.child !== null) {
t.child.return = t,
t = t.child;
continue
}
if (t === e)
break;
for (; t.sibling === null; ) {
if (t.return === null || t.return === e)
return null;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
return null
}
var ch = [];
function qg() {
for (var e = 0; e < ch.length; e++)
ch[e]._workInProgressVersionPrimary = null;
ch.length = 0
}
var Tc = ti.ReactCurrentDispatcher
, dh = ti.ReactCurrentBatchConfig
, Os = 0
, yt = null
, At = null
, $t = null
, cd = !1
, rl = !1
, _l = 0
, ck = 0;
function Zt() {
throw Error(oe(321))
}
function Qg(e, t) {
if (t === null)
return !1;
for (var n = 0; n < t.length && n < e.length; n++)
if (!pr(e[n], t[n]))
return !1;
return !0
}
function Yg(e, t, n, r, i, s) {
if (Os = s,
yt = t,
t.memoizedState = null,
t.updateQueue = null,
t.lanes = 0,
Tc.current = e === null || e.memoizedState === null ? pk : mk,
e = n(r, i),
rl) {
s = 0;
do {
if (rl = !1,
_l = 0,
25 <= s)
throw Error(oe(301));
s += 1,
$t = At = null,
t.updateQueue = null,
Tc.current = gk,
e = n(r, i)
} while (rl)
}
if (Tc.current = dd,
t = At !== null && At.next !== null,
Os = 0,
$t = At = yt = null,
cd = !1,
t)
throw Error(oe(300));
return e
}
function Xg() {
var e = _l !== 0;
return _l = 0,
e
}
function wr() {
var e = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
return $t === null ? yt.memoizedState = $t = e : $t = $t.next = e,
$t
}
function Zn() {
if (At === null) {
var e = yt.alternate;
e = e !== null ? e.memoizedState : null
} else
e = At.next;
var t = $t === null ? yt.memoizedState : $t.next;
if (t !== null)
$t = t,
At = e;
else {
if (e === null)
throw Error(oe(310));
At = e,
e = {
memoizedState: At.memoizedState,
baseState: At.baseState,
baseQueue: At.baseQueue,
queue: At.queue,
next: null
},
$t === null ? yt.memoizedState = $t = e : $t = $t.next = e
}
return $t
}
function Al(e, t) {
return typeof t == "function" ? t(e) : t
}
function fh(e) {
var t = Zn()
, n = t.queue;
if (n === null)
throw Error(oe(311));
n.lastRenderedReducer = e;
var r = At
, i = r.baseQueue
, s = n.pending;
if (s !== null) {
if (i !== null) {
var o = i.next;
i.next = s.next,
s.next = o
}
r.baseQueue = i = s,
n.pending = null
}
if (i !== null) {
s = i.next,
r = r.baseState;
var a = o = null
, l = null
, u = s;
do {
var c = u.lane;
if ((Os & c) === c)
l !== null && (l = l.next = {
lane: 0,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
}),
r = u.hasEagerState ? u.eagerState : e(r, u.action);
else {
var d = {
lane: c,
action: u.action,
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
};
l === null ? (a = l = d,
o = r) : l = l.next = d,
yt.lanes |= c,
ks |= c
}
u = u.next
} while (u !== null && u !== s);
l === null ? o = r : l.next = a,
pr(r, t.memoizedState) || (bn = !0),
t.memoizedState = r,
t.baseState = o,
t.baseQueue = l,
n.lastRenderedState = r
}
if (e = n.interleaved,
e !== null) {
i = e;
do
s = i.lane,
yt.lanes |= s,
ks |= s,
i = i.next;
while (i !== e)
} else
i === null && (n.lanes = 0);
return [t.memoizedState, n.dispatch]
}
function hh(e) {
var t = Zn()
, n = t.queue;
if (n === null)
throw Error(oe(311));
n.lastRenderedReducer = e;
var r = n.dispatch
, i = n.pending
, s = t.memoizedState;
if (i !== null) {
n.pending = null;
var o = i = i.next;
do
s = e(s, o.action),
o = o.next;
while (o !== i);
pr(s, t.memoizedState) || (bn = !0),
t.memoizedState = s,
t.baseQueue === null && (t.baseState = s),
n.lastRenderedState = s
}
return [s, r]
}
function kS() {}
function _S(e, t) {
var n = yt
, r = Zn()
, i = t()
, s = !pr(r.memoizedState, i);
if (s && (r.memoizedState = i,
bn = !0),
r = r.queue,
Jg(LS.bind(null, n, r, e), [e]),
r.getSnapshot !== t || s || $t !== null && $t.memoizedState.tag & 1) {
if (n.flags |= 2048,
Dl(9, DS.bind(null, n, r, i, t), void 0, null),
Ft === null)
throw Error(oe(349));
Os & 30 || AS(n, t, i)
}
return i
}
function AS(e, t, n) {
e.flags |= 16384,
e = {
getSnapshot: t,
value: n
},
t = yt.updateQueue,
t === null ? (t = {
lastEffect: null,
stores: null
},
yt.updateQueue = t,
t.stores = [e]) : (n = t.stores,
n === null ? t.stores = [e] : n.push(e))
}
function DS(e, t, n, r) {
t.value = n,
t.getSnapshot = r,
NS(t) && MS(e)
}
function LS(e, t, n) {
return n(function() {
NS(t) && MS(e)
})
}
function NS(e) {
var t = e.getSnapshot;
e = e.value;
try {
var n = t();
return !pr(e, n)
} catch {
return !0
}
}
function MS(e) {
var t = Yr(e, 1);
t !== null && cr(t, e, 1, -1)
}
function S0(e) {
var t = wr();
return typeof e == "function" && (e = e()),
t.memoizedState = t.baseState = e,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: Al,
lastRenderedState: e
},
t.queue = e,
e = e.dispatch = hk.bind(null, yt, e),
[t.memoizedState, e]
}
function Dl(e, t, n, r) {
return e = {
tag: e,
create: t,
destroy: n,
deps: r,
next: null
},
t = yt.updateQueue,
t === null ? (t = {
lastEffect: null,
stores: null
},
yt.updateQueue = t,
t.lastEffect = e.next = e) : (n = t.lastEffect,
n === null ? t.lastEffect = e.next = e : (r = n.next,
n.next = e,
e.next = r,
t.lastEffect = e)),
e
}
function jS() {
return Zn().memoizedState
}
function Rc(e, t, n, r) {
var i = wr();
yt.flags |= e,
i.memoizedState = Dl(1 | t, n, void 0, r === void 0 ? null : r)
}
function sf(e, t, n, r) {
var i = Zn();
r = r === void 0 ? null : r;
var s = void 0;
if (At !== null) {
var o = At.memoizedState;
if (s = o.destroy,
r !== null && Qg(r, o.deps)) {
i.memoizedState = Dl(t, n, s, r);
return
}
}
yt.flags |= e,
i.memoizedState = Dl(1 | t, n, s, r)
}
function E0(e, t) {
return Rc(8390656, 8, e, t)
}
function Jg(e, t) {
return sf(2048, 8, e, t)
}
function $S(e, t) {
return sf(4, 2, e, t)
}
function IS(e, t) {
return sf(4, 4, e, t)
}
function FS(e, t) {
if (typeof t == "function")
return e = e(),
t(e),
function() {
t(null)
}
;
if (t != null)
return e = e(),
t.current = e,
function() {
t.current = null
}
}
function VS(e, t, n) {
return n = n != null ? n.concat([e]) : null,
sf(4, 4, FS.bind(null, t, e), n)
}
function Zg() {}
function zS(e, t) {
var n = Zn();
t = t === void 0 ? null : t;
var r = n.memoizedState;
return r !== null && t !== null && Qg(t, r[1]) ? r[0] : (n.memoizedState = [e, t],
e)
}
function US(e, t) {
var n = Zn();
t = t === void 0 ? null : t;
var r = n.memoizedState;
return r !== null && t !== null && Qg(t, r[1]) ? r[0] : (e = e(),
n.memoizedState = [e, t],
e)
}
function BS(e, t, n) {
return Os & 21 ? (pr(n, t) || (n = qb(),
yt.lanes |= n,
ks |= n,
e.baseState = !0),
t) : (e.baseState && (e.baseState = !1,
bn = !0),
e.memoizedState = n)
}
function dk(e, t) {
var n = Je;
Je = n !== 0 && 4 > n ? n : 4,
e(!0);
var r = dh.transition;
dh.transition = {};
try {
e(!1),
t()
} finally {
Je = n,
dh.transition = r
}
}
function HS() {
return Zn().memoizedState
}
function fk(e, t, n) {
var r = Li(e);
if (n = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
},
WS(e))
GS(t, n);
else if (n = TS(e, t, n, r),
n !== null) {
var i = hn();
cr(n, e, r, i),
KS(n, t, r)
}
}
function hk(e, t, n) {
var r = Li(e)
, i = {
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (WS(e))
GS(t, i);
else {
var s = e.alternate;
if (e.lanes === 0 && (s === null || s.lanes === 0) && (s = t.lastRenderedReducer,
s !== null))
try {
var o = t.lastRenderedState
, a = s(o, n);
if (i.hasEagerState = !0,
i.eagerState = a,
pr(a, o)) {
var l = t.interleaved;
l === null ? (i.next = i,
Hg(t)) : (i.next = l.next,
l.next = i),
t.interleaved = i;
return
}
} catch {} finally {}
n = TS(e, t, i, r),
n !== null && (i = hn(),
cr(n, e, r, i),
KS(n, t, r))
}
}
function WS(e) {
var t = e.alternate;
return e === yt || t !== null && t === yt
}
function GS(e, t) {
rl = cd = !0;
var n = e.pending;
n === null ? t.next = t : (t.next = n.next,
n.next = t),
e.pending = t
}
function KS(e, t, n) {
if (n & 4194240) {
var r = t.lanes;
r &= e.pendingLanes,
n |= r,
t.lanes = n,
_g(e, n)
}
}
var dd = {
readContext: Jn,
useCallback: Zt,
useContext: Zt,
useEffect: Zt,
useImperativeHandle: Zt,
useInsertionEffect: Zt,
useLayoutEffect: Zt,
useMemo: Zt,
useReducer: Zt,
useRef: Zt,
useState: Zt,
useDebugValue: Zt,
useDeferredValue: Zt,
useTransition: Zt,
useMutableSource: Zt,
useSyncExternalStore: Zt,
useId: Zt,
unstable_isNewReconciler: !1
}
, pk = {
readContext: Jn,
useCallback: function(e, t) {
return wr().memoizedState = [e, t === void 0 ? null : t],
e
},
useContext: Jn,
useEffect: E0,
useImperativeHandle: function(e, t, n) {
return n = n != null ? n.concat([e]) : null,
Rc(4194308, 4, FS.bind(null, t, e), n)
},
useLayoutEffect: function(e, t) {
return Rc(4194308, 4, e, t)
},
useInsertionEffect: function(e, t) {
return Rc(4, 2, e, t)
},
useMemo: function(e, t) {
var n = wr();
return t = t === void 0 ? null : t,
e = e(),
n.memoizedState = [e, t],
e
},
useReducer: function(e, t, n) {
var r = wr();
return t = n !== void 0 ? n(t) : t,
r.memoizedState = r.baseState = t,
e = {
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: e,
lastRenderedState: t
},
r.queue = e,
e = e.dispatch = fk.bind(null, yt, e),
[r.memoizedState, e]
},
useRef: function(e) {
var t = wr();
return e = {
current: e
},
t.memoizedState = e
},
useState: S0,
useDebugValue: Zg,
useDeferredValue: function(e) {
return wr().memoizedState = e
},
useTransition: function() {
var e = S0(!1)
, t = e[0];
return e = dk.bind(null, e[1]),
wr().memoizedState = e,
[t, e]
},
useMutableSource: function() {},
useSyncExternalStore: function(e, t, n) {
var r = yt
, i = wr();
if (ht) {
if (n === void 0)
throw Error(oe(407));
n = n()
} else {
if (n = t(),
Ft === null)
throw Error(oe(349));
Os & 30 || AS(r, t, n)
}
i.memoizedState = n;
var s = {
value: n,
getSnapshot: t
};
return i.queue = s,
E0(LS.bind(null, r, s, e), [e]),
r.flags |= 2048,
Dl(9, DS.bind(null, r, s, n, t), void 0, null),
n
},
useId: function() {
var e = wr()
, t = Ft.identifierPrefix;
if (ht) {
var n = Fr
, r = Ir;
n = (r & ~(1 << 32 - ur(r) - 1)).toString(32) + n,
t = ":" + t + "R" + n,
n = _l++,
0 < n && (t += "H" + n.toString(32)),
t += ":"
} else
n = ck++,
t = ":" + t + "r" + n.toString(32) + ":";
return e.memoizedState = t
},
unstable_isNewReconciler: !1
}
, mk = {
readContext: Jn,
useCallback: zS,
useContext: Jn,
useEffect: Jg,
useImperativeHandle: VS,
useInsertionEffect: $S,
useLayoutEffect: IS,
useMemo: US,
useReducer: fh,
useRef: jS,
useState: function() {
return fh(Al)
},
useDebugValue: Zg,
useDeferredValue: function(e) {
var t = Zn();
return BS(t, At.memoizedState, e)
},
useTransition: function() {
var e = fh(Al)[0]
, t = Zn().memoizedState;
return [e, t]
},
useMutableSource: kS,
useSyncExternalStore: _S,
useId: HS,
unstable_isNewReconciler: !1
}
, gk = {
readContext: Jn,
useCallback: zS,
useContext: Jn,
useEffect: Jg,
useImperativeHandle: VS,
useInsertionEffect: $S,
useLayoutEffect: IS,
useMemo: US,
useReducer: hh,
useRef: jS,
useState: function() {
return hh(Al)
},
useDebugValue: Zg,
useDeferredValue: function(e) {
var t = Zn();
return At === null ? t.memoizedState = e : BS(t, At.memoizedState, e)
},
useTransition: function() {
var e = hh(Al)[0]
, t = Zn().memoizedState;
return [e, t]
},
useMutableSource: kS,
useSyncExternalStore: _S,
useId: HS,
unstable_isNewReconciler: !1
};
function tr(e, t) {
if (e && e.defaultProps) {
t = xt({}, t),
e = e.defaultProps;
for (var n in e)
t[n] === void 0 && (t[n] = e[n]);
return t
}
return t
}
function Up(e, t, n, r) {
t = e.memoizedState,
n = n(r, t),
n = n == null ? t : xt({}, t, n),
e.memoizedState = n,
e.lanes === 0 && (e.updateQueue.baseState = n)
}
var of = {
isMounted: function(e) {
return (e = e._reactInternals) ? Vs(e) === e : !1
},
enqueueSetState: function(e, t, n) {
e = e._reactInternals;
var r = hn()
, i = Li(e)
, s = Ur(r, i);
s.payload = t,
n != null && (s.callback = n),
t = Ai(e, s, i),
t !== null && (cr(t, e, i, r),
Pc(t, e, i))
},
enqueueReplaceState: function(e, t, n) {
e = e._reactInternals;
var r = hn()
, i = Li(e)
, s = Ur(r, i);
s.tag = 1,
s.payload = t,
n != null && (s.callback = n),
t = Ai(e, s, i),
t !== null && (cr(t, e, i, r),
Pc(t, e, i))
},
enqueueForceUpdate: function(e, t) {
e = e._reactInternals;
var n = hn()
, r = Li(e)
, i = Ur(n, r);
i.tag = 2,
t != null && (i.callback = t),
t = Ai(e, i, r),
t !== null && (cr(t, e, r, n),
Pc(t, e, r))
}
};
function C0(e, t, n, r, i, s, o) {
return e = e.stateNode,
typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, s, o) : t.prototype && t.prototype.isPureReactComponent ? !Cl(n, r) || !Cl(i, s) : !0
}
function qS(e, t, n) {
var r = !1
, i = Fi
, s = t.contextType;
return typeof s == "object" && s !== null ? s = Jn(s) : (i = En(t) ? Ts : an.current,
r = t.contextTypes,
s = (r = r != null) ? Qo(e, i) : Fi),
t = new t(n,s),
e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null,
t.updater = of,
e.stateNode = t,
t._reactInternals = e,
r && (e = e.stateNode,
e.__reactInternalMemoizedUnmaskedChildContext = i,
e.__reactInternalMemoizedMaskedChildContext = s),
t
}
function P0(e, t, n, r) {
e = t.state,
typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r),
typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r),
t.state !== e && of.enqueueReplaceState(t, t.state, null)
}
function Bp(e, t, n, r) {
var i = e.stateNode;
i.props = n,
i.state = e.memoizedState,
i.refs = {},
Wg(e);
var s = t.contextType;
typeof s == "object" && s !== null ? i.context = Jn(s) : (s = En(t) ? Ts : an.current,
i.context = Qo(e, s)),
i.state = e.memoizedState,
s = t.getDerivedStateFromProps,
typeof s == "function" && (Up(e, t, s, n),
i.state = e.memoizedState),
typeof t.getDerivedStateFromProps == "function" || typeof i.getSnapshotBeforeUpdate == "function" || typeof i.UNSAFE_componentWillMount != "function" && typeof i.componentWillMount != "function" || (t = i.state,
typeof i.componentWillMount == "function" && i.componentWillMount(),
typeof i.UNSAFE_componentWillMount == "function" && i.UNSAFE_componentWillMount(),
t !== i.state && of.enqueueReplaceState(i, i.state, null),
ld(e, n, i, r),
i.state = e.memoizedState),
typeof i.componentDidMount == "function" && (e.flags |= 4194308)
}
function Zo(e, t) {
try {
var n = ""
, r = t;
do
n += HR(r),
r = r.return;
while (r);
var i = n
} catch (s) {
i = `
Error generating stack: ` + s.message + `
` + s.stack
}
return {
value: e,
source: t,
stack: i,
digest: null
}
}
function ph(e, t, n) {
return {
value: e,
source: null,
stack: n ?? null,
digest: t ?? null
}
}
function Hp(e, t) {
try {
console.error(t.value)
} catch (n) {
setTimeout(function() {
throw n
})
}
}
var vk = typeof WeakMap == "function" ? WeakMap : Map;
function QS(e, t, n) {
n = Ur(-1, n),
n.tag = 3,
n.payload = {
element: null
};
var r = t.value;
return n.callback = function() {
hd || (hd = !0,
em = r),
Hp(e, t)
}
,
n
}
function YS(e, t, n) {
n = Ur(-1, n),
n.tag = 3;
var r = e.type.getDerivedStateFromError;
if (typeof r == "function") {
var i = t.value;
n.payload = function() {
return r(i)
}
,
n.callback = function() {
Hp(e, t)
}
}
var s = e.stateNode;
return s !== null && typeof s.componentDidCatch == "function" && (n.callback = function() {
Hp(e, t),
typeof r != "function" && (Di === null ? Di = new Set([this]) : Di.add(this));
var o = t.stack;
this.componentDidCatch(t.value, {
componentStack: o !== null ? o : ""
})
}
),
n
}
function T0(e, t, n) {
var r = e.pingCache;
if (r === null) {
r = e.pingCache = new vk;
var i = new Set;
r.set(t, i)
} else
i = r.get(t),
i === void 0 && (i = new Set,
r.set(t, i));
i.has(n) || (i.add(n),
e = Ak.bind(null, e, t, n),
t.then(e, e))
}
function R0(e) {
do {
var t;
if ((t = e.tag === 13) && (t = e.memoizedState,
t = t !== null ? t.dehydrated !== null : !0),
t)
return e;
e = e.return
} while (e !== null);
return null
}
function O0(e, t, n, r, i) {
return e.mode & 1 ? (e.flags |= 65536,
e.lanes = i,
e) : (e === t ? e.flags |= 65536 : (e.flags |= 128,
n.flags |= 131072,
n.flags &= -52805,
n.tag === 1 && (n.alternate === null ? n.tag = 17 : (t = Ur(-1, 1),
t.tag = 2,
Ai(n, t, 1))),
n.lanes |= 1),
e)
}
var yk = ti.ReactCurrentOwner
, bn = !1;
function fn(e, t, n, r) {
t.child = e === null ? PS(t, null, n, r) : Xo(t, e.child, n, r)
}
function k0(e, t, n, r, i) {
n = n.render;
var s = t.ref;
return ko(t, i),
r = Yg(e, t, n, r, s, i),
n = Xg(),
e !== null && !bn ? (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Xr(e, t, i)) : (ht && n && Ig(t),
t.flags |= 1,
fn(e, t, r, i),
t.child)
}
function _0(e, t, n, r, i) {
if (e === null) {
var s = n.type;
return typeof s == "function" && !av(s) && s.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15,
t.type = s,
XS(e, t, s, r, i)) : (e = Ac(n.type, null, r, t, t.mode, i),
e.ref = t.ref,
e.return = t,
t.child = e)
}
if (s = e.child,
!(e.lanes & i)) {
var o = s.memoizedProps;
if (n = n.compare,
n = n !== null ? n : Cl,
n(o, r) && e.ref === t.ref)
return Xr(e, t, i)
}
return t.flags |= 1,
e = Ni(s, r),
e.ref = t.ref,
e.return = t,
t.child = e
}
function XS(e, t, n, r, i) {
if (e !== null) {
var s = e.memoizedProps;
if (Cl(s, r) && e.ref === t.ref)
if (bn = !1,
t.pendingProps = r = s,
(e.lanes & i) !== 0)
e.flags & 131072 && (bn = !0);
else
return t.lanes = e.lanes,
Xr(e, t, i)
}
return Wp(e, t, n, r, i)
}
function JS(e, t, n) {
var r = t.pendingProps
, i = r.children
, s = e !== null ? e.memoizedState : null;
if (r.mode === "hidden")
if (!(t.mode & 1))
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
rt(go, On),
On |= n;
else {
if (!(n & 1073741824))
return e = s !== null ? s.baseLanes | n : n,
t.lanes = t.childLanes = 1073741824,
t.memoizedState = {
baseLanes: e,
cachePool: null,
transitions: null
},
t.updateQueue = null,
rt(go, On),
On |= e,
null;
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
r = s !== null ? s.baseLanes : n,
rt(go, On),
On |= r
}
else
s !== null ? (r = s.baseLanes | n,
t.memoizedState = null) : r = n,
rt(go, On),
On |= r;
return fn(e, t, i, n),
t.child
}
function ZS(e, t) {
var n = t.ref;
(e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512,
t.flags |= 2097152)
}
function Wp(e, t, n, r, i) {
var s = En(n) ? Ts : an.current;
return s = Qo(t, s),
ko(t, i),
n = Yg(e, t, n, r, s, i),
r = Xg(),
e !== null && !bn ? (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Xr(e, t, i)) : (ht && r && Ig(t),
t.flags |= 1,
fn(e, t, n, i),
t.child)
}
function A0(e, t, n, r, i) {
if (En(n)) {
var s = !0;
rd(t)
} else
s = !1;
if (ko(t, i),
t.stateNode === null)
Oc(e, t),
qS(t, n, r),
Bp(t, n, r, i),
r = !0;
else if (e === null) {
var o = t.stateNode
, a = t.memoizedProps;
o.props = a;
var l = o.context
, u = n.contextType;
typeof u == "object" && u !== null ? u = Jn(u) : (u = En(n) ? Ts : an.current,
u = Qo(t, u));
var c = n.getDerivedStateFromProps
, d = typeof c == "function" || typeof o.getSnapshotBeforeUpdate == "function";
d || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== r || l !== u) && P0(t, o, r, u),
fi = !1;
var f = t.memoizedState;
o.state = f,
ld(t, r, o, i),
l = t.memoizedState,
a !== r || f !== l || Sn.current || fi ? (typeof c == "function" && (Up(t, n, c, r),
l = t.memoizedState),
(a = fi || C0(t, n, a, r, f, l, u)) ? (d || typeof o.UNSAFE_componentWillMount != "function" && typeof o.componentWillMount != "function" || (typeof o.componentWillMount == "function" && o.componentWillMount(),
typeof o.UNSAFE_componentWillMount == "function" && o.UNSAFE_componentWillMount()),
typeof o.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308),
t.memoizedProps = r,
t.memoizedState = l),
o.props = r,
o.state = l,
o.context = u,
r = a) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308),
r = !1)
} else {
o = t.stateNode,
RS(e, t),
a = t.memoizedProps,
u = t.type === t.elementType ? a : tr(t.type, a),
o.props = u,
d = t.pendingProps,
f = o.context,
l = n.contextType,
typeof l == "object" && l !== null ? l = Jn(l) : (l = En(n) ? Ts : an.current,
l = Qo(t, l));
var h = n.getDerivedStateFromProps;
(c = typeof h == "function" || typeof o.getSnapshotBeforeUpdate == "function") || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== d || f !== l) && P0(t, o, r, l),
fi = !1,
f = t.memoizedState,
o.state = f,
ld(t, r, o, i);
var m = t.memoizedState;
a !== d || f !== m || Sn.current || fi ? (typeof h == "function" && (Up(t, n, h, r),
m = t.memoizedState),
(u = fi || C0(t, n, u, r, f, m, l) || !1) ? (c || typeof o.UNSAFE_componentWillUpdate != "function" && typeof o.componentWillUpdate != "function" || (typeof o.componentWillUpdate == "function" && o.componentWillUpdate(r, m, l),
typeof o.UNSAFE_componentWillUpdate == "function" && o.UNSAFE_componentWillUpdate(r, m, l)),
typeof o.componentDidUpdate == "function" && (t.flags |= 4),
typeof o.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4),
typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024),
t.memoizedProps = r,
t.memoizedState = m),
o.props = r,
o.state = m,
o.context = l,
r = u) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4),
typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024),
r = !1)
}
return Gp(e, t, n, r, s, i)
}
function Gp(e, t, n, r, i, s) {
ZS(e, t);
var o = (t.flags & 128) !== 0;
if (!r && !o)
return i && g0(t, n, !1),
Xr(e, t, s);
r = t.stateNode,
yk.current = t;
var a = o && typeof n.getDerivedStateFromError != "function" ? null : r.render();
return t.flags |= 1,
e !== null && o ? (t.child = Xo(t, e.child, null, s),
t.child = Xo(t, null, a, s)) : fn(e, t, a, s),
t.memoizedState = r.state,
i && g0(t, n, !0),
t.child
}
function eE(e) {
var t = e.stateNode;
t.pendingContext ? m0(e, t.pendingContext, t.pendingContext !== t.context) : t.context && m0(e, t.context, !1),
Gg(e, t.containerInfo)
}
function D0(e, t, n, r, i) {
return Yo(),
Vg(i),
t.flags |= 256,
fn(e, t, n, r),
t.child
}
var Kp = {
dehydrated: null,
treeContext: null,
retryLane: 0
};
function qp(e) {
return {
baseLanes: e,
cachePool: null,
transitions: null
}
}
function tE(e, t, n) {
var r = t.pendingProps, i = gt.current, s = !1, o = (t.flags & 128) !== 0, a;
if ((a = o) || (a = e !== null && e.memoizedState === null ? !1 : (i & 2) !== 0),
a ? (s = !0,
t.flags &= -129) : (e === null || e.memoizedState !== null) && (i |= 1),
rt(gt, i & 1),
e === null)
return Vp(t),
e = t.memoizedState,
e !== null && (e = e.dehydrated,
e !== null) ? (t.mode & 1 ? e.data === "$!" ? t.lanes = 8 : t.lanes = 1073741824 : t.lanes = 1,
null) : (o = r.children,
e = r.fallback,
s ? (r = t.mode,
s = t.child,
o = {
mode: "hidden",
children: o
},
!(r & 1) && s !== null ? (s.childLanes = 0,
s.pendingProps = o) : s = uf(o, r, 0, null),
e = Es(e, r, n, null),
s.return = t,
e.return = t,
s.sibling = e,
t.child = s,
t.child.memoizedState = qp(n),
t.memoizedState = Kp,
e) : ev(t, o));
if (i = e.memoizedState,
i !== null && (a = i.dehydrated,
a !== null))
return wk(e, t, o, r, a, i, n);
if (s) {
s = r.fallback,
o = t.mode,
i = e.child,
a = i.sibling;
var l = {
mode: "hidden",
children: r.children
};
return !(o & 1) && t.child !== i ? (r = t.child,
r.childLanes = 0,
r.pendingProps = l,
t.deletions = null) : (r = Ni(i, l),
r.subtreeFlags = i.subtreeFlags & 14680064),
a !== null ? s = Ni(a, s) : (s = Es(s, o, n, null),
s.flags |= 2),
s.return = t,
r.return = t,
r.sibling = s,
t.child = r,
r = s,
s = t.child,
o = e.child.memoizedState,
o = o === null ? qp(n) : {
baseLanes: o.baseLanes | n,
cachePool: null,
transitions: o.transitions
},
s.memoizedState = o,
s.childLanes = e.childLanes & ~n,
t.memoizedState = Kp,
r
}
return s = e.child,
e = s.sibling,
r = Ni(s, {
mode: "visible",
children: r.children
}),
!(t.mode & 1) && (r.lanes = n),
r.return = t,
r.sibling = null,
e !== null && (n = t.deletions,
n === null ? (t.deletions = [e],
t.flags |= 16) : n.push(e)),
t.child = r,
t.memoizedState = null,
r
}
function ev(e, t) {
return t = uf({
mode: "visible",
children: t
}, e.mode, 0, null),
t.return = e,
e.child = t
}
function Zu(e, t, n, r) {
return r !== null && Vg(r),
Xo(t, e.child, null, n),
e = ev(t, t.pendingProps.children),
e.flags |= 2,
t.memoizedState = null,
e
}
function wk(e, t, n, r, i, s, o) {
if (n)
return t.flags & 256 ? (t.flags &= -257,
r = ph(Error(oe(422))),
Zu(e, t, o, r)) : t.memoizedState !== null ? (t.child = e.child,
t.flags |= 128,
null) : (s = r.fallback,
i = t.mode,
r = uf({
mode: "visible",
children: r.children
}, i, 0, null),
s = Es(s, i, o, null),
s.flags |= 2,
r.return = t,
s.return = t,
r.sibling = s,
t.child = r,
t.mode & 1 && Xo(t, e.child, null, o),
t.child.memoizedState = qp(o),
t.memoizedState = Kp,
s);
if (!(t.mode & 1))
return Zu(e, t, o, null);
if (i.data === "$!") {
if (r = i.nextSibling && i.nextSibling.dataset,
r)
var a = r.dgst;
return r = a,
s = Error(oe(419)),
r = ph(s, r, void 0),
Zu(e, t, o, r)
}
if (a = (o & e.childLanes) !== 0,
bn || a) {
if (r = Ft,
r !== null) {
switch (o & -o) {
case 4:
i = 2;
break;
case 16:
i = 8;
break;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
i = 32;
break;
case 536870912:
i = 268435456;
break;
default:
i = 0
}
i = i & (r.suspendedLanes | o) ? 0 : i,
i !== 0 && i !== s.retryLane && (s.retryLane = i,
Yr(e, i),
cr(r, e, i, -1))
}
return ov(),
r = ph(Error(oe(421))),
Zu(e, t, o, r)
}
return i.data === "$?" ? (t.flags |= 128,
t.child = e.child,
t = Dk.bind(null, e),
i._reactRetry = t,
null) : (e = s.treeContext,
kn = _i(i.nextSibling),
An = t,
ht = !0,
or = null,
e !== null && (Hn[Wn++] = Ir,
Hn[Wn++] = Fr,
Hn[Wn++] = Rs,
Ir = e.id,
Fr = e.overflow,
Rs = t),
t = ev(t, r.children),
t.flags |= 4096,
t)
}
function L0(e, t, n) {
e.lanes |= t;
var r = e.alternate;
r !== null && (r.lanes |= t),
zp(e.return, t, n)
}
function mh(e, t, n, r, i) {
var s = e.memoizedState;
s === null ? e.memoizedState = {
isBackwards: t,
rendering: null,
renderingStartTime: 0,
last: r,
tail: n,
tailMode: i
} : (s.isBackwards = t,
s.rendering = null,
s.renderingStartTime = 0,
s.last = r,
s.tail = n,
s.tailMode = i)
}
function nE(e, t, n) {
var r = t.pendingProps
, i = r.revealOrder
, s = r.tail;
if (fn(e, t, r.children, n),
r = gt.current,
r & 2)
r = r & 1 | 2,
t.flags |= 128;
else {
if (e !== null && e.flags & 128)
e: for (e = t.child; e !== null; ) {
if (e.tag === 13)
e.memoizedState !== null && L0(e, n, t);
else if (e.tag === 19)
L0(e, n, t);
else if (e.child !== null) {
e.child.return = e,
e = e.child;
continue
}
if (e === t)
break e;
for (; e.sibling === null; ) {
if (e.return === null || e.return === t)
break e;
e = e.return
}
e.sibling.return = e.return,
e = e.sibling
}
r &= 1
}
if (rt(gt, r),
!(t.mode & 1))
t.memoizedState = null;
else
switch (i) {
case "forwards":
for (n = t.child,
i = null; n !== null; )
e = n.alternate,
e !== null && ud(e) === null && (i = n),
n = n.sibling;
n = i,
n === null ? (i = t.child,
t.child = null) : (i = n.sibling,
n.sibling = null),
mh(t, !1, i, n, s);
break;
case "backwards":
for (n = null,
i = t.child,
t.child = null; i !== null; ) {
if (e = i.alternate,
e !== null && ud(e) === null) {
t.child = i;
break
}
e = i.sibling,
i.sibling = n,
n = i,
i = e
}
mh(t, !0, n, null, s);
break;
case "together":
mh(t, !1, null, null, void 0);
break;
default:
t.memoizedState = null
}
return t.child
}
function Oc(e, t) {
!(t.mode & 1) && e !== null && (e.alternate = null,
t.alternate = null,
t.flags |= 2)
}
function Xr(e, t, n) {
if (e !== null && (t.dependencies = e.dependencies),
ks |= t.lanes,
!(n & t.childLanes))
return null;
if (e !== null && t.child !== e.child)
throw Error(oe(153));
if (t.child !== null) {
for (e = t.child,
n = Ni(e, e.pendingProps),
t.child = n,
n.return = t; e.sibling !== null; )
e = e.sibling,
n = n.sibling = Ni(e, e.pendingProps),
n.return = t;
n.sibling = null
}
return t.child
}
function xk(e, t, n) {
switch (t.tag) {
case 3:
eE(t),
Yo();
break;
case 5:
OS(t);
break;
case 1:
En(t.type) && rd(t);
break;
case 4:
Gg(t, t.stateNode.containerInfo);
break;
case 10:
var r = t.type._context
, i = t.memoizedProps.value;
rt(od, r._currentValue),
r._currentValue = i;
break;
case 13:
if (r = t.memoizedState,
r !== null)
return r.dehydrated !== null ? (rt(gt, gt.current & 1),
t.flags |= 128,
null) : n & t.child.childLanes ? tE(e, t, n) : (rt(gt, gt.current & 1),
e = Xr(e, t, n),
e !== null ? e.sibling : null);
rt(gt, gt.current & 1);
break;
case 19:
if (r = (n & t.childLanes) !== 0,
e.flags & 128) {
if (r)
return nE(e, t, n);
t.flags |= 128
}
if (i = t.memoizedState,
i !== null && (i.rendering = null,
i.tail = null,
i.lastEffect = null),
rt(gt, gt.current),
r)
break;
return null;
case 22:
case 23:
return t.lanes = 0,
JS(e, t, n)
}
return Xr(e, t, n)
}
var rE, Qp, iE, sE;
rE = function(e, t) {
for (var n = t.child; n !== null; ) {
if (n.tag === 5 || n.tag === 6)
e.appendChild(n.stateNode);
else if (n.tag !== 4 && n.child !== null) {
n.child.return = n,
n = n.child;
continue
}
if (n === t)
break;
for (; n.sibling === null; ) {
if (n.return === null || n.return === t)
return;
n = n.return
}
n.sibling.return = n.return,
n = n.sibling
}
}
;
Qp = function() {}
;
iE = function(e, t, n, r) {
var i = e.memoizedProps;
if (i !== r) {
e = t.stateNode,
us(kr.current);
var s = null;
switch (n) {
case "input":
i = vp(e, i),
r = vp(e, r),
s = [];
break;
case "select":
i = xt({}, i, {
value: void 0
}),
r = xt({}, r, {
value: void 0
}),
s = [];
break;
case "textarea":
i = xp(e, i),
r = xp(e, r),
s = [];
break;
default:
typeof i.onClick != "function" && typeof r.onClick == "function" && (e.onclick = td)
}
Sp(n, r);
var o;
n = null;
for (u in i)
if (!r.hasOwnProperty(u) && i.hasOwnProperty(u) && i[u] != null)
if (u === "style") {
var a = i[u];
for (o in a)
a.hasOwnProperty(o) && (n || (n = {}),
n[o] = "")
} else
u !== "dangerouslySetInnerHTML" && u !== "children" && u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && u !== "autoFocus" && (vl.hasOwnProperty(u) ? s || (s = []) : (s = s || []).push(u, null));
for (u in r) {
var l = r[u];
if (a = i != null ? i[u] : void 0,
r.hasOwnProperty(u) && l !== a && (l != null || a != null))
if (u === "style")
if (a) {
for (o in a)
!a.hasOwnProperty(o) || l && l.hasOwnProperty(o) || (n || (n = {}),
n[o] = "");
for (o in l)
l.hasOwnProperty(o) && a[o] !== l[o] && (n || (n = {}),
n[o] = l[o])
} else
n || (s || (s = []),
s.push(u, n)),
n = l;
else
u === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0,
a = a ? a.__html : void 0,
l != null && a !== l && (s = s || []).push(u, l)) : u === "children" ? typeof l != "string" && typeof l != "number" || (s = s || []).push(u, "" + l) : u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && (vl.hasOwnProperty(u) ? (l != null && u === "onScroll" && at("scroll", e),
s || a === l || (s = [])) : (s = s || []).push(u, l))
}
n && (s = s || []).push("style", n);
var u = s;
(t.updateQueue = u) && (t.flags |= 4)
}
}
;
sE = function(e, t, n, r) {
n !== r && (t.flags |= 4)
}
;
function ka(e, t) {
if (!ht)
switch (e.tailMode) {
case "hidden":
t = e.tail;
for (var n = null; t !== null; )
t.alternate !== null && (n = t),
t = t.sibling;
n === null ? e.tail = null : n.sibling = null;
break;
case "collapsed":
n = e.tail;
for (var r = null; n !== null; )
n.alternate !== null && (r = n),
n = n.sibling;
r === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : r.sibling = null
}
}
function en(e) {
var t = e.alternate !== null && e.alternate.child === e.child
, n = 0
, r = 0;
if (t)
for (var i = e.child; i !== null; )
n |= i.lanes | i.childLanes,
r |= i.subtreeFlags & 14680064,
r |= i.flags & 14680064,
i.return = e,
i = i.sibling;
else
for (i = e.child; i !== null; )
n |= i.lanes | i.childLanes,
r |= i.subtreeFlags,
r |= i.flags,
i.return = e,
i = i.sibling;
return e.subtreeFlags |= r,
e.childLanes = n,
t
}
function bk(e, t, n) {
var r = t.pendingProps;
switch (Fg(t),
t.tag) {
case 2:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return en(t),
null;
case 1:
return En(t.type) && nd(),
en(t),
null;
case 3:
return r = t.stateNode,
Jo(),
ut(Sn),
ut(an),
qg(),
r.pendingContext && (r.context = r.pendingContext,
r.pendingContext = null),
(e === null || e.child === null) && (Xu(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024,
or !== null && (rm(or),
or = null))),
Qp(e, t),
en(t),
null;
case 5:
Kg(t);
var i = us(kl.current);
if (n = t.type,
e !== null && t.stateNode != null)
iE(e, t, n, r, i),
e.ref !== t.ref && (t.flags |= 512,
t.flags |= 2097152);
else {
if (!r) {
if (t.stateNode === null)
throw Error(oe(166));
return en(t),
null
}
if (e = us(kr.current),
Xu(t)) {
r = t.stateNode,
n = t.type;
var s = t.memoizedProps;
switch (r[Pr] = t,
r[Rl] = s,
e = (t.mode & 1) !== 0,
n) {
case "dialog":
at("cancel", r),
at("close", r);
break;
case "iframe":
case "object":
case "embed":
at("load", r);
break;
case "video":
case "audio":
for (i = 0; i < Ka.length; i++)
at(Ka[i], r);
break;
case "source":
at("error", r);
break;
case "img":
case "image":
case "link":
at("error", r),
at("load", r);
break;
case "details":
at("toggle", r);
break;
case "input":
Uy(r, s),
at("invalid", r);
break;
case "select":
r._wrapperState = {
wasMultiple: !!s.multiple
},
at("invalid", r);
break;
case "textarea":
Hy(r, s),
at("invalid", r)
}
Sp(n, s),
i = null;
for (var o in s)
if (s.hasOwnProperty(o)) {
var a = s[o];
o === "children" ? typeof a == "string" ? r.textContent !== a && (s.suppressHydrationWarning !== !0 && Yu(r.textContent, a, e),
i = ["children", a]) : typeof a == "number" && r.textContent !== "" + a && (s.suppressHydrationWarning !== !0 && Yu(r.textContent, a, e),
i = ["children", "" + a]) : vl.hasOwnProperty(o) && a != null && o === "onScroll" && at("scroll", r)
}
switch (n) {
case "input":
Uu(r),
By(r, s, !0);
break;
case "textarea":
Uu(r),
Wy(r);
break;
case "select":
case "option":
break;
default:
typeof s.onClick == "function" && (r.onclick = td)
}
r = i,
t.updateQueue = r,
r !== null && (t.flags |= 4)
} else {
o = i.nodeType === 9 ? i : i.ownerDocument,
e === "http://www.w3.org/1999/xhtml" && (e = Lb(n)),
e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = o.createElement("div"),
e.innerHTML = "<script><\/script>",
e = e.removeChild(e.firstChild)) : typeof r.is == "string" ? e = o.createElement(n, {
is: r.is
}) : (e = o.createElement(n),
n === "select" && (o = e,
r.multiple ? o.multiple = !0 : r.size && (o.size = r.size))) : e = o.createElementNS(e, n),
e[Pr] = t,
e[Rl] = r,
rE(e, t, !1, !1),
t.stateNode = e;
e: {
switch (o = Ep(n, r),
n) {
case "dialog":
at("cancel", e),
at("close", e),
i = r;
break;
case "iframe":
case "object":
case "embed":
at("load", e),
i = r;
break;
case "video":
case "audio":
for (i = 0; i < Ka.length; i++)
at(Ka[i], e);
i = r;
break;
case "source":
at("error", e),
i = r;
break;
case "img":
case "image":
case "link":
at("error", e),
at("load", e),
i = r;
break;
case "details":
at("toggle", e),
i = r;
break;
case "input":
Uy(e, r),
i = vp(e, r),
at("invalid", e);
break;
case "option":
i = r;
break;
case "select":
e._wrapperState = {
wasMultiple: !!r.multiple
},
i = xt({}, r, {
value: void 0
}),
at("invalid", e);
break;
case "textarea":
Hy(e, r),
i = xp(e, r),
at("invalid", e);
break;
default:
i = r
}
Sp(n, i),
a = i;
for (s in a)
if (a.hasOwnProperty(s)) {
var l = a[s];
s === "style" ? jb(e, l) : s === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0,
l != null && Nb(e, l)) : s === "children" ? typeof l == "string" ? (n !== "textarea" || l !== "") && yl(e, l) : typeof l == "number" && yl(e, "" + l) : s !== "suppressContentEditableWarning" && s !== "suppressHydrationWarning" && s !== "autoFocus" && (vl.hasOwnProperty(s) ? l != null && s === "onScroll" && at("scroll", e) : l != null && Cg(e, s, l, o))
}
switch (n) {
case "input":
Uu(e),
By(e, r, !1);
break;
case "textarea":
Uu(e),
Wy(e);
break;
case "option":
r.value != null && e.setAttribute("value", "" + Ii(r.value));
break;
case "select":
e.multiple = !!r.multiple,
s = r.value,
s != null ? Po(e, !!r.multiple, s, !1) : r.defaultValue != null && Po(e, !!r.multiple, r.defaultValue, !0);
break;
default:
typeof i.onClick == "function" && (e.onclick = td)
}
switch (n) {
case "button":
case "input":
case "select":
case "textarea":
r = !!r.autoFocus;
break e;
case "img":
r = !0;
break e;
default:
r = !1
}
}
r && (t.flags |= 4)
}
t.ref !== null && (t.flags |= 512,
t.flags |= 2097152)
}
return en(t),
null;
case 6:
if (e && t.stateNode != null)
sE(e, t, e.memoizedProps, r);
else {
if (typeof r != "string" && t.stateNode === null)
throw Error(oe(166));
if (n = us(kl.current),
us(kr.current),
Xu(t)) {
if (r = t.stateNode,
n = t.memoizedProps,
r[Pr] = t,
(s = r.nodeValue !== n) && (e = An,
e !== null))
switch (e.tag) {
case 3:
Yu(r.nodeValue, n, (e.mode & 1) !== 0);
break;
case 5:
e.memoizedProps.suppressHydrationWarning !== !0 && Yu(r.nodeValue, n, (e.mode & 1) !== 0)
}
s && (t.flags |= 4)
} else
r = (n.nodeType === 9 ? n : n.ownerDocument).createTextNode(r),
r[Pr] = t,
t.stateNode = r
}
return en(t),
null;
case 13:
if (ut(gt),
r = t.memoizedState,
e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
if (ht && kn !== null && t.mode & 1 && !(t.flags & 128))
ES(),
Yo(),
t.flags |= 98560,
s = !1;
else if (s = Xu(t),
r !== null && r.dehydrated !== null) {
if (e === null) {
if (!s)
throw Error(oe(318));
if (s = t.memoizedState,
s = s !== null ? s.dehydrated : null,
!s)
throw Error(oe(317));
s[Pr] = t
} else
Yo(),
!(t.flags & 128) && (t.memoizedState = null),
t.flags |= 4;
en(t),
s = !1
} else
or !== null && (rm(or),
or = null),
s = !0;
if (!s)
return t.flags & 65536 ? t : null
}
return t.flags & 128 ? (t.lanes = n,
t) : (r = r !== null,
r !== (e !== null && e.memoizedState !== null) && r && (t.child.flags |= 8192,
t.mode & 1 && (e === null || gt.current & 1 ? Nt === 0 && (Nt = 3) : ov())),
t.updateQueue !== null && (t.flags |= 4),
en(t),
null);
case 4:
return Jo(),
Qp(e, t),
e === null && Pl(t.stateNode.containerInfo),
en(t),
null;
case 10:
return Bg(t.type._context),
en(t),
null;
case 17:
return En(t.type) && nd(),
en(t),
null;
case 19:
if (ut(gt),
s = t.memoizedState,
s === null)
return en(t),
null;
if (r = (t.flags & 128) !== 0,
o = s.rendering,
o === null)
if (r)
ka(s, !1);
else {
if (Nt !== 0 || e !== null && e.flags & 128)
for (e = t.child; e !== null; ) {
if (o = ud(e),
o !== null) {
for (t.flags |= 128,
ka(s, !1),
r = o.updateQueue,
r !== null && (t.updateQueue = r,
t.flags |= 4),
t.subtreeFlags = 0,
r = n,
n = t.child; n !== null; )
s = n,
e = r,
s.flags &= 14680066,
o = s.alternate,
o === null ? (s.childLanes = 0,
s.lanes = e,
s.child = null,
s.subtreeFlags = 0,
s.memoizedProps = null,
s.memoizedState = null,
s.updateQueue = null,
s.dependencies = null,
s.stateNode = null) : (s.childLanes = o.childLanes,
s.lanes = o.lanes,
s.child = o.child,
s.subtreeFlags = 0,
s.deletions = null,
s.memoizedProps = o.memoizedProps,
s.memoizedState = o.memoizedState,
s.updateQueue = o.updateQueue,
s.type = o.type,
e = o.dependencies,
s.dependencies = e === null ? null : {
lanes: e.lanes,
firstContext: e.firstContext
}),
n = n.sibling;
return rt(gt, gt.current & 1 | 2),
t.child
}
e = e.sibling
}
s.tail !== null && Pt() > ea && (t.flags |= 128,
r = !0,
ka(s, !1),
t.lanes = 4194304)
}
else {
if (!r)
if (e = ud(o),
e !== null) {
if (t.flags |= 128,
r = !0,
n = e.updateQueue,
n !== null && (t.updateQueue = n,
t.flags |= 4),
ka(s, !0),
s.tail === null && s.tailMode === "hidden" && !o.alternate && !ht)
return en(t),
null
} else
2 * Pt() - s.renderingStartTime > ea && n !== 1073741824 && (t.flags |= 128,
r = !0,
ka(s, !1),
t.lanes = 4194304);
s.isBackwards ? (o.sibling = t.child,
t.child = o) : (n = s.last,
n !== null ? n.sibling = o : t.child = o,
s.last = o)
}
return s.tail !== null ? (t = s.tail,
s.rendering = t,
s.tail = t.sibling,
s.renderingStartTime = Pt(),
t.sibling = null,
n = gt.current,
rt(gt, r ? n & 1 | 2 : n & 1),
t) : (en(t),
null);
case 22:
case 23:
return sv(),
r = t.memoizedState !== null,
e !== null && e.memoizedState !== null !== r && (t.flags |= 8192),
r && t.mode & 1 ? On & 1073741824 && (en(t),
t.subtreeFlags & 6 && (t.flags |= 8192)) : en(t),
null;
case 24:
return null;
case 25:
return null
}
throw Error(oe(156, t.tag))
}
function Sk(e, t) {
switch (Fg(t),
t.tag) {
case 1:
return En(t.type) && nd(),
e = t.flags,
e & 65536 ? (t.flags = e & -65537 | 128,
t) : null;
case 3:
return Jo(),
ut(Sn),
ut(an),
qg(),
e = t.flags,
e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128,
t) : null;
case 5:
return Kg(t),
null;
case 13:
if (ut(gt),
e = t.memoizedState,
e !== null && e.dehydrated !== null) {
if (t.alternate === null)
throw Error(oe(340));
Yo()
}
return e = t.flags,
e & 65536 ? (t.flags = e & -65537 | 128,
t) : null;
case 19:
return ut(gt),
null;
case 4:
return Jo(),
null;
case 10:
return Bg(t.type._context),
null;
case 22:
case 23:
return sv(),
null;
case 24:
return null;
default:
return null
}
}
var ec = !1
, rn = !1
, Ek = typeof WeakSet == "function" ? WeakSet : Set
, pe = null;
function mo(e, t) {
var n = e.ref;
if (n !== null)
if (typeof n == "function")
try {
n(null)
} catch (r) {
St(e, t, r)
}
else
n.current = null
}
function Yp(e, t, n) {
try {
n()
} catch (r) {
St(e, t, r)
}
}
var N0 = !1;
function Ck(e, t) {
if (Lp = Jc,
e = cS(),
$g(e)) {
if ("selectionStart"in e)
var n = {
start: e.selectionStart,
end: e.selectionEnd
};
else
e: {
n = (n = e.ownerDocument) && n.defaultView || window;
var r = n.getSelection && n.getSelection();
if (r && r.rangeCount !== 0) {
n = r.anchorNode;
var i = r.anchorOffset
, s = r.focusNode;
r = r.focusOffset;
try {
n.nodeType,
s.nodeType
} catch {
n = null;
break e
}
var o = 0
, a = -1
, l = -1
, u = 0
, c = 0
, d = e
, f = null;
t: for (; ; ) {
for (var h; d !== n || i !== 0 && d.nodeType !== 3 || (a = o + i),
d !== s || r !== 0 && d.nodeType !== 3 || (l = o + r),
d.nodeType === 3 && (o += d.nodeValue.length),
(h = d.firstChild) !== null; )
f = d,
d = h;
for (; ; ) {
if (d === e)
break t;
if (f === n && ++u === i && (a = o),
f === s && ++c === r && (l = o),
(h = d.nextSibling) !== null)
break;
d = f,
f = d.parentNode
}
d = h
}
n = a === -1 || l === -1 ? null : {
start: a,
end: l
}
} else
n = null
}
n = n || {
start: 0,
end: 0
}
} else
n = null;
for (Np = {
focusedElem: e,
selectionRange: n
},
Jc = !1,
pe = t; pe !== null; )
if (t = pe,
e = t.child,
(t.subtreeFlags & 1028) !== 0 && e !== null)
e.return = t,
pe = e;
else
for (; pe !== null; ) {
t = pe;
try {
var m = t.alternate;
if (t.flags & 1024)
switch (t.tag) {
case 0:
case 11:
case 15:
break;
case 1:
if (m !== null) {
var p = m.memoizedProps
, b = m.memoizedState
, v = t.stateNode
, g = v.getSnapshotBeforeUpdate(t.elementType === t.type ? p : tr(t.type, p), b);
v.__reactInternalSnapshotBeforeUpdate = g
}
break;
case 3:
var w = t.stateNode.containerInfo;
w.nodeType === 1 ? w.textContent = "" : w.nodeType === 9 && w.documentElement && w.removeChild(w.documentElement);
break;
case 5:
case 6:
case 4:
case 17:
break;
default:
throw Error(oe(163))
}
} catch (E) {
St(t, t.return, E)
}
if (e = t.sibling,
e !== null) {
e.return = t.return,
pe = e;
break
}
pe = t.return
}
return m = N0,
N0 = !1,
m
}
function il(e, t, n) {
var r = t.updateQueue;
if (r = r !== null ? r.lastEffect : null,
r !== null) {
var i = r = r.next;
do {
if ((i.tag & e) === e) {
var s = i.destroy;
i.destroy = void 0,
s !== void 0 && Yp(t, n, s)
}
i = i.next
} while (i !== r)
}
}
function af(e, t) {
if (t = t.updateQueue,
t = t !== null ? t.lastEffect : null,
t !== null) {
var n = t = t.next;
do {
if ((n.tag & e) === e) {
var r = n.create;
n.destroy = r()
}
n = n.next
} while (n !== t)
}
}
function Xp(e) {
var t = e.ref;
if (t !== null) {
var n = e.stateNode;
switch (e.tag) {
case 5:
e = n;
break;
default:
e = n
}
typeof t == "function" ? t(e) : t.current = e
}
}
function oE(e) {
var t = e.alternate;
t !== null && (e.alternate = null,
oE(t)),
e.child = null,
e.deletions = null,
e.sibling = null,
e.tag === 5 && (t = e.stateNode,
t !== null && (delete t[Pr],
delete t[Rl],
delete t[$p],
delete t[ok],
delete t[ak])),
e.stateNode = null,
e.return = null,
e.dependencies = null,
e.memoizedProps = null,
e.memoizedState = null,
e.pendingProps = null,
e.stateNode = null,
e.updateQueue = null
}
function aE(e) {
return e.tag === 5 || e.tag === 3 || e.tag === 4
}
function M0(e) {
e: for (; ; ) {
for (; e.sibling === null; ) {
if (e.return === null || aE(e.return))
return null;
e = e.return
}
for (e.sibling.return = e.return,
e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; ) {
if (e.flags & 2 || e.child === null || e.tag === 4)
continue e;
e.child.return = e,
e = e.child
}
if (!(e.flags & 2))
return e.stateNode
}
}
function Jp(e, t, n) {
var r = e.tag;
if (r === 5 || r === 6)
e = e.stateNode,
t ? n.nodeType === 8 ? n.parentNode.insertBefore(e, t) : n.insertBefore(e, t) : (n.nodeType === 8 ? (t = n.parentNode,
t.insertBefore(e, n)) : (t = n,
t.appendChild(e)),
n = n._reactRootContainer,
n != null || t.onclick !== null || (t.onclick = td));
else if (r !== 4 && (e = e.child,
e !== null))
for (Jp(e, t, n),
e = e.sibling; e !== null; )
Jp(e, t, n),
e = e.sibling
}
function Zp(e, t, n) {
var r = e.tag;
if (r === 5 || r === 6)
e = e.stateNode,
t ? n.insertBefore(e, t) : n.appendChild(e);
else if (r !== 4 && (e = e.child,
e !== null))
for (Zp(e, t, n),
e = e.sibling; e !== null; )
Zp(e, t, n),
e = e.sibling
}
var Gt = null
, ir = !1;
function ri(e, t, n) {
for (n = n.child; n !== null; )
lE(e, t, n),
n = n.sibling
}
function lE(e, t, n) {
if (Or && typeof Or.onCommitFiberUnmount == "function")
try {
Or.onCommitFiberUnmount(Jd, n)
} catch {}
switch (n.tag) {
case 5:
rn || mo(n, t);
case 6:
var r = Gt
, i = ir;
Gt = null,
ri(e, t, n),
Gt = r,
ir = i,
Gt !== null && (ir ? (e = Gt,
n = n.stateNode,
e.nodeType === 8 ? e.parentNode.removeChild(n) : e.removeChild(n)) : Gt.removeChild(n.stateNode));
break;
case 18:
Gt !== null && (ir ? (e = Gt,
n = n.stateNode,
e.nodeType === 8 ? lh(e.parentNode, n) : e.nodeType === 1 && lh(e, n),
Sl(e)) : lh(Gt, n.stateNode));
break;
case 4:
r = Gt,
i = ir,
Gt = n.stateNode.containerInfo,
ir = !0,
ri(e, t, n),
Gt = r,
ir = i;
break;
case 0:
case 11:
case 14:
case 15:
if (!rn && (r = n.updateQueue,
r !== null && (r = r.lastEffect,
r !== null))) {
i = r = r.next;
do {
var s = i
, o = s.destroy;
s = s.tag,
o !== void 0 && (s & 2 || s & 4) && Yp(n, t, o),
i = i.next
} while (i !== r)
}
ri(e, t, n);
break;
case 1:
if (!rn && (mo(n, t),
r = n.stateNode,
typeof r.componentWillUnmount == "function"))
try {
r.props = n.memoizedProps,
r.state = n.memoizedState,
r.componentWillUnmount()
} catch (a) {
St(n, t, a)
}
ri(e, t, n);
break;
case 21:
ri(e, t, n);
break;
case 22:
n.mode & 1 ? (rn = (r = rn) || n.memoizedState !== null,
ri(e, t, n),
rn = r) : ri(e, t, n);
break;
default:
ri(e, t, n)
}
}
function j0(e) {
var t = e.updateQueue;
if (t !== null) {
e.updateQueue = null;
var n = e.stateNode;
n === null && (n = e.stateNode = new Ek),
t.forEach(function(r) {
var i = Lk.bind(null, e, r);
n.has(r) || (n.add(r),
r.then(i, i))
})
}
}
function er(e, t) {
var n = t.deletions;
if (n !== null)
for (var r = 0; r < n.length; r++) {
var i = n[r];
try {
var s = e
, o = t
, a = o;
e: for (; a !== null; ) {
switch (a.tag) {
case 5:
Gt = a.stateNode,
ir = !1;
break e;
case 3:
Gt = a.stateNode.containerInfo,
ir = !0;
break e;
case 4:
Gt = a.stateNode.containerInfo,
ir = !0;
break e
}
a = a.return
}
if (Gt === null)
throw Error(oe(160));
lE(s, o, i),
Gt = null,
ir = !1;
var l = i.alternate;
l !== null && (l.return = null),
i.return = null
} catch (u) {
St(i, t, u)
}
}
if (t.subtreeFlags & 12854)
for (t = t.child; t !== null; )
uE(t, e),
t = t.sibling
}
function uE(e, t) {
var n = e.alternate
, r = e.flags;
switch (e.tag) {
case 0:
case 11:
case 14:
case 15:
if (er(t, e),
yr(e),
r & 4) {
try {
il(3, e, e.return),
af(3, e)
} catch (p) {
St(e, e.return, p)
}
try {
il(5, e, e.return)
} catch (p) {
St(e, e.return, p)
}
}
break;
case 1:
er(t, e),
yr(e),
r & 512 && n !== null && mo(n, n.return);
break;
case 5:
if (er(t, e),
yr(e),
r & 512 && n !== null && mo(n, n.return),
e.flags & 32) {
var i = e.stateNode;
try {
yl(i, "")
} catch (p) {
St(e, e.return, p)
}
}
if (r & 4 && (i = e.stateNode,
i != null)) {
var s = e.memoizedProps
, o = n !== null ? n.memoizedProps : s
, a = e.type
, l = e.updateQueue;
if (e.updateQueue = null,
l !== null)
try {
a === "input" && s.type === "radio" && s.name != null && Ab(i, s),
Ep(a, o);
var u = Ep(a, s);
for (o = 0; o < l.length; o += 2) {
var c = l[o]
, d = l[o + 1];
c === "style" ? jb(i, d) : c === "dangerouslySetInnerHTML" ? Nb(i, d) : c === "children" ? yl(i, d) : Cg(i, c, d, u)
}
switch (a) {
case "input":
yp(i, s);
break;
case "textarea":
Db(i, s);
break;
case "select":
var f = i._wrapperState.wasMultiple;
i._wrapperState.wasMultiple = !!s.multiple;
var h = s.value;
h != null ? Po(i, !!s.multiple, h, !1) : f !== !!s.multiple && (s.defaultValue != null ? Po(i, !!s.multiple, s.defaultValue, !0) : Po(i, !!s.multiple, s.multiple ? [] : "", !1))
}
i[Rl] = s
} catch (p) {
St(e, e.return, p)
}
}
break;
case 6:
if (er(t, e),
yr(e),
r & 4) {
if (e.stateNode === null)
throw Error(oe(162));
i = e.stateNode,
s = e.memoizedProps;
try {
i.nodeValue = s
} catch (p) {
St(e, e.return, p)
}
}
break;
case 3:
if (er(t, e),
yr(e),
r & 4 && n !== null && n.memoizedState.isDehydrated)
try {
Sl(t.containerInfo)
} catch (p) {
St(e, e.return, p)
}
break;
case 4:
er(t, e),
yr(e);
break;
case 13:
er(t, e),
yr(e),
i = e.child,
i.flags & 8192 && (s = i.memoizedState !== null,
i.stateNode.isHidden = s,
!s || i.alternate !== null && i.alternate.memoizedState !== null || (rv = Pt())),
r & 4 && j0(e);
break;
case 22:
if (c = n !== null && n.memoizedState !== null,
e.mode & 1 ? (rn = (u = rn) || c,
er(t, e),
rn = u) : er(t, e),
yr(e),
r & 8192) {
if (u = e.memoizedState !== null,
(e.stateNode.isHidden = u) && !c && e.mode & 1)
for (pe = e,
c = e.child; c !== null; ) {
for (d = pe = c; pe !== null; ) {
switch (f = pe,
h = f.child,
f.tag) {
case 0:
case 11:
case 14:
case 15:
il(4, f, f.return);
break;
case 1:
mo(f, f.return);
var m = f.stateNode;
if (typeof m.componentWillUnmount == "function") {
r = f,
n = f.return;
try {
t = r,
m.props = t.memoizedProps,
m.state = t.memoizedState,
m.componentWillUnmount()
} catch (p) {
St(r, n, p)
}
}
break;
case 5:
mo(f, f.return);
break;
case 22:
if (f.memoizedState !== null) {
I0(d);
continue
}
}
h !== null ? (h.return = f,
pe = h) : I0(d)
}
c = c.sibling
}
e: for (c = null,
d = e; ; ) {
if (d.tag === 5) {
if (c === null) {
c = d;
try {
i = d.stateNode,
u ? (s = i.style,
typeof s.setProperty == "function" ? s.setProperty("display", "none", "important") : s.display = "none") : (a = d.stateNode,
l = d.memoizedProps.style,
o = l != null && l.hasOwnProperty("display") ? l.display : null,
a.style.display = Mb("display", o))
} catch (p) {
St(e, e.return, p)
}
}
} else if (d.tag === 6) {
if (c === null)
try {
d.stateNode.nodeValue = u ? "" : d.memoizedProps
} catch (p) {
St(e, e.return, p)
}
} else if ((d.tag !== 22 && d.tag !== 23 || d.memoizedState === null || d === e) && d.child !== null) {
d.child.return = d,
d = d.child;
continue
}
if (d === e)
break e;
for (; d.sibling === null; ) {
if (d.return === null || d.return === e)
break e;
c === d && (c = null),
d = d.return
}
c === d && (c = null),
d.sibling.return = d.return,
d = d.sibling
}
}
break;
case 19:
er(t, e),
yr(e),
r & 4 && j0(e);
break;
case 21:
break;
default:
er(t, e),
yr(e)
}
}
function yr(e) {
var t = e.flags;
if (t & 2) {
try {
e: {
for (var n = e.return; n !== null; ) {
if (aE(n)) {
var r = n;
break e
}
n = n.return
}
throw Error(oe(160))
}
switch (r.tag) {
case 5:
var i = r.stateNode;
r.flags & 32 && (yl(i, ""),
r.flags &= -33);
var s = M0(e);
Zp(e, s, i);
break;
case 3:
case 4:
var o = r.stateNode.containerInfo
, a = M0(e);
Jp(e, a, o);
break;
default:
throw Error(oe(161))
}
} catch (l) {
St(e, e.return, l)
}
e.flags &= -3
}
t & 4096 && (e.flags &= -4097)
}
function Pk(e, t, n) {
pe = e,
cE(e)
}
function cE(e, t, n) {
for (var r = (e.mode & 1) !== 0; pe !== null; ) {
var i = pe
, s = i.child;
if (i.tag === 22 && r) {
var o = i.memoizedState !== null || ec;
if (!o) {
var a = i.alternate
, l = a !== null && a.memoizedState !== null || rn;
a = ec;
var u = rn;
if (ec = o,
(rn = l) && !u)
for (pe = i; pe !== null; )
o = pe,
l = o.child,
o.tag === 22 && o.memoizedState !== null ? F0(i) : l !== null ? (l.return = o,
pe = l) : F0(i);
for (; s !== null; )
pe = s,
cE(s),
s = s.sibling;
pe = i,
ec = a,
rn = u
}
$0(e)
} else
i.subtreeFlags & 8772 && s !== null ? (s.return = i,
pe = s) : $0(e)
}
}
function $0(e) {
for (; pe !== null; ) {
var t = pe;
if (t.flags & 8772) {
var n = t.alternate;
try {
if (t.flags & 8772)
switch (t.tag) {
case 0:
case 11:
case 15:
rn || af(5, t);
break;
case 1:
var r = t.stateNode;
if (t.flags & 4 && !rn)
if (n === null)
r.componentDidMount();
else {
var i = t.elementType === t.type ? n.memoizedProps : tr(t.type, n.memoizedProps);
r.componentDidUpdate(i, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate)
}
var s = t.updateQueue;
s !== null && b0(t, s, r);
break;
case 3:
var o = t.updateQueue;
if (o !== null) {
if (n = null,
t.child !== null)
switch (t.child.tag) {
case 5:
n = t.child.stateNode;
break;
case 1:
n = t.child.stateNode
}
b0(t, o, n)
}
break;
case 5:
var a = t.stateNode;
if (n === null && t.flags & 4) {
n = a;
var l = t.memoizedProps;
switch (t.type) {
case "button":
case "input":
case "select":
case "textarea":
l.autoFocus && n.focus();
break;
case "img":
l.src && (n.src = l.src)
}
}
break;
case 6:
break;
case 4:
break;
case 12:
break;
case 13:
if (t.memoizedState === null) {
var u = t.alternate;
if (u !== null) {
var c = u.memoizedState;
if (c !== null) {
var d = c.dehydrated;
d !== null && Sl(d)
}
}
}
break;
case 19:
case 17:
case 21:
case 22:
case 23:
case 25:
break;
default:
throw Error(oe(163))
}
rn || t.flags & 512 && Xp(t)
} catch (f) {
St(t, t.return, f)
}
}
if (t === e) {
pe = null;
break
}
if (n = t.sibling,
n !== null) {
n.return = t.return,
pe = n;
break
}
pe = t.return
}
}
function I0(e) {
for (; pe !== null; ) {
var t = pe;
if (t === e) {
pe = null;
break
}
var n = t.sibling;
if (n !== null) {
n.return = t.return,
pe = n;
break
}
pe = t.return
}
}
function F0(e) {
for (; pe !== null; ) {
var t = pe;
try {
switch (t.tag) {
case 0:
case 11:
case 15:
var n = t.return;
try {
af(4, t)
} catch (l) {
St(t, n, l)
}
break;
case 1:
var r = t.stateNode;
if (typeof r.componentDidMount == "function") {
var i = t.return;
try {
r.componentDidMount()
} catch (l) {
St(t, i, l)
}
}
var s = t.return;
try {
Xp(t)
} catch (l) {
St(t, s, l)
}
break;
case 5:
var o = t.return;
try {
Xp(t)
} catch (l) {
St(t, o, l)
}
}
} catch (l) {
St(t, t.return, l)
}
if (t === e) {
pe = null;
break
}
var a = t.sibling;
if (a !== null) {
a.return = t.return,
pe = a;
break
}
pe = t.return
}
}
var Tk = Math.ceil
, fd = ti.ReactCurrentDispatcher
, tv = ti.ReactCurrentOwner
, Yn = ti.ReactCurrentBatchConfig
, He = 0
, Ft = null
, kt = null
, qt = 0
, On = 0
, go = Wi(0)
, Nt = 0
, Ll = null
, ks = 0
, lf = 0
, nv = 0
, sl = null
, xn = null
, rv = 0
, ea = 1 / 0
, Mr = null
, hd = !1
, em = null
, Di = null
, tc = !1
, Ti = null
, pd = 0
, ol = 0
, tm = null
, kc = -1
, _c = 0;
function hn() {
return He & 6 ? Pt() : kc !== -1 ? kc : kc = Pt()
}
function Li(e) {
return e.mode & 1 ? He & 2 && qt !== 0 ? qt & -qt : uk.transition !== null ? (_c === 0 && (_c = qb()),
_c) : (e = Je,
e !== 0 || (e = window.event,
e = e === void 0 ? 16 : tS(e.type)),
e) : 1
}
function cr(e, t, n, r) {
if (50 < ol)
throw ol = 0,
tm = null,
Error(oe(185));
gu(e, n, r),
(!(He & 2) || e !== Ft) && (e === Ft && (!(He & 2) && (lf |= n),
Nt === 4 && mi(e, qt)),
Cn(e, r),
n === 1 && He === 0 && !(t.mode & 1) && (ea = Pt() + 500,
rf && Gi()))
}
function Cn(e, t) {
var n = e.callbackNode;
uO(e, t);
var r = Xc(e, e === Ft ? qt : 0);
if (r === 0)
n !== null && qy(n),
e.callbackNode = null,
e.callbackPriority = 0;
else if (t = r & -r,
e.callbackPriority !== t) {
if (n != null && qy(n),
t === 1)
e.tag === 0 ? lk(V0.bind(null, e)) : xS(V0.bind(null, e)),
ik(function() {
!(He & 6) && Gi()
}),
n = null;
else {
switch (Qb(r)) {
case 1:
n = kg;
break;
case 4:
n = Gb;
break;
case 16:
n = Yc;
break;
case 536870912:
n = Kb;
break;
default:
n = Yc
}
n = yE(n, dE.bind(null, e))
}
e.callbackPriority = t,
e.callbackNode = n
}
}
function dE(e, t) {
if (kc = -1,
_c = 0,
He & 6)
throw Error(oe(327));
var n = e.callbackNode;
if (_o() && e.callbackNode !== n)
return null;
var r = Xc(e, e === Ft ? qt : 0);
if (r === 0)
return null;
if (r & 30 || r & e.expiredLanes || t)
t = md(e, r);
else {
t = r;
var i = He;
He |= 2;
var s = hE();
(Ft !== e || qt !== t) && (Mr = null,
ea = Pt() + 500,
Ss(e, t));
do
try {
kk();
break
} catch (a) {
fE(e, a)
}
while (!0);
Ug(),
fd.current = s,
He = i,
kt !== null ? t = 0 : (Ft = null,
qt = 0,
t = Nt)
}
if (t !== 0) {
if (t === 2 && (i = Op(e),
i !== 0 && (r = i,
t = nm(e, i))),
t === 1)
throw n = Ll,
Ss(e, 0),
mi(e, r),
Cn(e, Pt()),
n;
if (t === 6)
mi(e, r);
else {
if (i = e.current.alternate,
!(r & 30) && !Rk(i) && (t = md(e, r),
t === 2 && (s = Op(e),
s !== 0 && (r = s,
t = nm(e, s))),
t === 1))
throw n = Ll,
Ss(e, 0),
mi(e, r),
Cn(e, Pt()),
n;
switch (e.finishedWork = i,
e.finishedLanes = r,
t) {
case 0:
case 1:
throw Error(oe(345));
case 2:
ts(e, xn, Mr);
break;
case 3:
if (mi(e, r),
(r & 130023424) === r && (t = rv + 500 - Pt(),
10 < t)) {
if (Xc(e, 0) !== 0)
break;
if (i = e.suspendedLanes,
(i & r) !== r) {
hn(),
e.pingedLanes |= e.suspendedLanes & i;
break
}
e.timeoutHandle = jp(ts.bind(null, e, xn, Mr), t);
break
}
ts(e, xn, Mr);
break;
case 4:
if (mi(e, r),
(r & 4194240) === r)
break;
for (t = e.eventTimes,
i = -1; 0 < r; ) {
var o = 31 - ur(r);
s = 1 << o,
o = t[o],
o > i && (i = o),
r &= ~s
}
if (r = i,
r = Pt() - r,
r = (120 > r ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * Tk(r / 1960)) - r,
10 < r) {
e.timeoutHandle = jp(ts.bind(null, e, xn, Mr), r);
break
}
ts(e, xn, Mr);
break;
case 5:
ts(e, xn, Mr);
break;
default:
throw Error(oe(329))
}
}
}
return Cn(e, Pt()),
e.callbackNode === n ? dE.bind(null, e) : null
}
function nm(e, t) {
var n = sl;
return e.current.memoizedState.isDehydrated && (Ss(e, t).flags |= 256),
e = md(e, t),
e !== 2 && (t = xn,
xn = n,
t !== null && rm(t)),
e
}
function rm(e) {
xn === null ? xn = e : xn.push.apply(xn, e)
}
function Rk(e) {
for (var t = e; ; ) {
if (t.flags & 16384) {
var n = t.updateQueue;
if (n !== null && (n = n.stores,
n !== null))
for (var r = 0; r < n.length; r++) {
var i = n[r]
, s = i.getSnapshot;
i = i.value;
try {
if (!pr(s(), i))
return !1
} catch {
return !1
}
}
}
if (n = t.child,
t.subtreeFlags & 16384 && n !== null)
n.return = t,
t = n;
else {
if (t === e)
break;
for (; t.sibling === null; ) {
if (t.return === null || t.return === e)
return !0;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
}
return !0
}
function mi(e, t) {
for (t &= ~nv,
t &= ~lf,
e.suspendedLanes |= t,
e.pingedLanes &= ~t,
e = e.expirationTimes; 0 < t; ) {
var n = 31 - ur(t)
, r = 1 << n;
e[n] = -1,
t &= ~r
}
}
function V0(e) {
if (He & 6)
throw Error(oe(327));
_o();
var t = Xc(e, 0);
if (!(t & 1))
return Cn(e, Pt()),
null;
var n = md(e, t);
if (e.tag !== 0 && n === 2) {
var r = Op(e);
r !== 0 && (t = r,
n = nm(e, r))
}
if (n === 1)
throw n = Ll,
Ss(e, 0),
mi(e, t),
Cn(e, Pt()),
n;
if (n === 6)
throw Error(oe(345));
return e.finishedWork = e.current.alternate,
e.finishedLanes = t,
ts(e, xn, Mr),
Cn(e, Pt()),
null
}
function iv(e, t) {
var n = He;
He |= 1;
try {
return e(t)
} finally {
He = n,
He === 0 && (ea = Pt() + 500,
rf && Gi())
}
}
function _s(e) {
Ti !== null && Ti.tag === 0 && !(He & 6) && _o();
var t = He;
He |= 1;
var n = Yn.transition
, r = Je;
try {
if (Yn.transition = null,
Je = 1,
e)
return e()
} finally {
Je = r,
Yn.transition = n,
He = t,
!(He & 6) && Gi()
}
}
function sv() {
On = go.current,
ut(go)
}
function Ss(e, t) {
e.finishedWork = null,
e.finishedLanes = 0;
var n = e.timeoutHandle;
if (n !== -1 && (e.timeoutHandle = -1,
rk(n)),
kt !== null)
for (n = kt.return; n !== null; ) {
var r = n;
switch (Fg(r),
r.tag) {
case 1:
r = r.type.childContextTypes,
r != null && nd();
break;
case 3:
Jo(),
ut(Sn),
ut(an),
qg();
break;
case 5:
Kg(r);
break;
case 4:
Jo();
break;
case 13:
ut(gt);
break;
case 19:
ut(gt);
break;
case 10:
Bg(r.type._context);
break;
case 22:
case 23:
sv()
}
n = n.return
}
if (Ft = e,
kt = e = Ni(e.current, null),
qt = On = t,
Nt = 0,
Ll = null,
nv = lf = ks = 0,
xn = sl = null,
ls !== null) {
for (t = 0; t < ls.length; t++)
if (n = ls[t],
r = n.interleaved,
r !== null) {
n.interleaved = null;
var i = r.next
, s = n.pending;
if (s !== null) {
var o = s.next;
s.next = i,
r.next = o
}
n.pending = r
}
ls = null
}
return e
}
function fE(e, t) {
do {
var n = kt;
try {
if (Ug(),
Tc.current = dd,
cd) {
for (var r = yt.memoizedState; r !== null; ) {
var i = r.queue;
i !== null && (i.pending = null),
r = r.next
}
cd = !1
}
if (Os = 0,
$t = At = yt = null,
rl = !1,
_l = 0,
tv.current = null,
n === null || n.return === null) {
Nt = 1,
Ll = t,
kt = null;
break
}
e: {
var s = e
, o = n.return
, a = n
, l = t;
if (t = qt,
a.flags |= 32768,
l !== null && typeof l == "object" && typeof l.then == "function") {
var u = l
, c = a
, d = c.tag;
if (!(c.mode & 1) && (d === 0 || d === 11 || d === 15)) {
var f = c.alternate;
f ? (c.updateQueue = f.updateQueue,
c.memoizedState = f.memoizedState,
c.lanes = f.lanes) : (c.updateQueue = null,
c.memoizedState = null)
}
var h = R0(o);
if (h !== null) {
h.flags &= -257,
O0(h, o, a, s, t),
h.mode & 1 && T0(s, u, t),
t = h,
l = u;
var m = t.updateQueue;
if (m === null) {
var p = new Set;
p.add(l),
t.updateQueue = p
} else
m.add(l);
break e
} else {
if (!(t & 1)) {
T0(s, u, t),
ov();
break e
}
l = Error(oe(426))
}
} else if (ht && a.mode & 1) {
var b = R0(o);
if (b !== null) {
!(b.flags & 65536) && (b.flags |= 256),
O0(b, o, a, s, t),
Vg(Zo(l, a));
break e
}
}
s = l = Zo(l, a),
Nt !== 4 && (Nt = 2),
sl === null ? sl = [s] : sl.push(s),
s = o;
do {
switch (s.tag) {
case 3:
s.flags |= 65536,
t &= -t,
s.lanes |= t;
var v = QS(s, l, t);
x0(s, v);
break e;
case 1:
a = l;
var g = s.type
, w = s.stateNode;
if (!(s.flags & 128) && (typeof g.getDerivedStateFromError == "function" || w !== null && typeof w.componentDidCatch == "function" && (Di === null || !Di.has(w)))) {
s.flags |= 65536,
t &= -t,
s.lanes |= t;
var E = YS(s, a, t);
x0(s, E);
break e
}
}
s = s.return
} while (s !== null)
}
mE(n)
} catch (D) {
t = D,
kt === n && n !== null && (kt = n = n.return);
continue
}
break
} while (!0)
}
function hE() {
var e = fd.current;
return fd.current = dd,
e === null ? dd : e
}
function ov() {
(Nt === 0 || Nt === 3 || Nt === 2) && (Nt = 4),
Ft === null || !(ks & 268435455) && !(lf & 268435455) || mi(Ft, qt)
}
function md(e, t) {
var n = He;
He |= 2;
var r = hE();
(Ft !== e || qt !== t) && (Mr = null,
Ss(e, t));
do
try {
Ok();
break
} catch (i) {
fE(e, i)
}
while (!0);
if (Ug(),
He = n,
fd.current = r,
kt !== null)
throw Error(oe(261));
return Ft = null,
qt = 0,
Nt
}
function Ok() {
for (; kt !== null; )
pE(kt)
}
function kk() {
for (; kt !== null && !eO(); )
pE(kt)
}
function pE(e) {
var t = vE(e.alternate, e, On);
e.memoizedProps = e.pendingProps,
t === null ? mE(e) : kt = t,
tv.current = null
}
function mE(e) {
var t = e;
do {
var n = t.alternate;
if (e = t.return,
t.flags & 32768) {
if (n = Sk(n, t),
n !== null) {
n.flags &= 32767,
kt = n;
return
}
if (e !== null)
e.flags |= 32768,
e.subtreeFlags = 0,
e.deletions = null;
else {
Nt = 6,
kt = null;
return
}
} else if (n = bk(n, t, On),
n !== null) {
kt = n;
return
}
if (t = t.sibling,
t !== null) {
kt = t;
return
}
kt = t = e
} while (t !== null);
Nt === 0 && (Nt = 5)
}
function ts(e, t, n) {
var r = Je
, i = Yn.transition;
try {
Yn.transition = null,
Je = 1,
_k(e, t, n, r)
} finally {
Yn.transition = i,
Je = r
}
return null
}
function _k(e, t, n, r) {
do
_o();
while (Ti !== null);
if (He & 6)
throw Error(oe(327));
n = e.finishedWork;
var i = e.finishedLanes;
if (n === null)
return null;
if (e.finishedWork = null,
e.finishedLanes = 0,
n === e.current)
throw Error(oe(177));
e.callbackNode = null,
e.callbackPriority = 0;
var s = n.lanes | n.childLanes;
if (cO(e, s),
e === Ft && (kt = Ft = null,
qt = 0),
!(n.subtreeFlags & 2064) && !(n.flags & 2064) || tc || (tc = !0,
yE(Yc, function() {
return _o(),
null
})),
s = (n.flags & 15990) !== 0,
n.subtreeFlags & 15990 || s) {
s = Yn.transition,
Yn.transition = null;
var o = Je;
Je = 1;
var a = He;
He |= 4,
tv.current = null,
Ck(e, n),
uE(n, e),
YO(Np),
Jc = !!Lp,
Np = Lp = null,
e.current = n,
Pk(n),
tO(),
He = a,
Je = o,
Yn.transition = s
} else
e.current = n;
if (tc && (tc = !1,
Ti = e,
pd = i),
s = e.pendingLanes,
s === 0 && (Di = null),
iO(n.stateNode),
Cn(e, Pt()),
t !== null)
for (r = e.onRecoverableError,
n = 0; n < t.length; n++)
i = t[n],
r(i.value, {
componentStack: i.stack,
digest: i.digest
});
if (hd)
throw hd = !1,
e = em,
em = null,
e;
return pd & 1 && e.tag !== 0 && _o(),
s = e.pendingLanes,
s & 1 ? e === tm ? ol++ : (ol = 0,
tm = e) : ol = 0,
Gi(),
null
}
function _o() {
if (Ti !== null) {
var e = Qb(pd)
, t = Yn.transition
, n = Je;
try {
if (Yn.transition = null,
Je = 16 > e ? 16 : e,
Ti === null)
var r = !1;
else {
if (e = Ti,
Ti = null,
pd = 0,
He & 6)
throw Error(oe(331));
var i = He;
for (He |= 4,
pe = e.current; pe !== null; ) {
var s = pe
, o = s.child;
if (pe.flags & 16) {
var a = s.deletions;
if (a !== null) {
for (var l = 0; l < a.length; l++) {
var u = a[l];
for (pe = u; pe !== null; ) {
var c = pe;
switch (c.tag) {
case 0:
case 11:
case 15:
il(8, c, s)
}
var d = c.child;
if (d !== null)
d.return = c,
pe = d;
else
for (; pe !== null; ) {
c = pe;
var f = c.sibling
, h = c.return;
if (oE(c),
c === u) {
pe = null;
break
}
if (f !== null) {
f.return = h,
pe = f;
break
}
pe = h
}
}
}
var m = s.alternate;
if (m !== null) {
var p = m.child;
if (p !== null) {
m.child = null;
do {
var b = p.sibling;
p.sibling = null,
p = b
} while (p !== null)
}
}
pe = s
}
}
if (s.subtreeFlags & 2064 && o !== null)
o.return = s,
pe = o;
else
e: for (; pe !== null; ) {
if (s = pe,
s.flags & 2048)
switch (s.tag) {
case 0:
case 11:
case 15:
il(9, s, s.return)
}
var v = s.sibling;
if (v !== null) {
v.return = s.return,
pe = v;
break e
}
pe = s.return
}
}
var g = e.current;
for (pe = g; pe !== null; ) {
o = pe;
var w = o.child;
if (o.subtreeFlags & 2064 && w !== null)
w.return = o,
pe = w;
else
e: for (o = g; pe !== null; ) {
if (a = pe,
a.flags & 2048)
try {
switch (a.tag) {
case 0:
case 11:
case 15:
af(9, a)
}
} catch (D) {
St(a, a.return, D)
}
if (a === o) {
pe = null;
break e
}
var E = a.sibling;
if (E !== null) {
E.return = a.return,
pe = E;
break e
}
pe = a.return
}
}
if (He = i,
Gi(),
Or && typeof Or.onPostCommitFiberRoot == "function")
try {
Or.onPostCommitFiberRoot(Jd, e)
} catch {}
r = !0
}
return r
} finally {
Je = n,
Yn.transition = t
}
}
return !1
}
function z0(e, t, n) {
t = Zo(n, t),
t = QS(e, t, 1),
e = Ai(e, t, 1),
t = hn(),
e !== null && (gu(e, 1, t),
Cn(e, t))
}
function St(e, t, n) {
if (e.tag === 3)
z0(e, e, n);
else
for (; t !== null; ) {
if (t.tag === 3) {
z0(t, e, n);
break
} else if (t.tag === 1) {
var r = t.stateNode;
if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (Di === null || !Di.has(r))) {
e = Zo(n, e),
e = YS(t, e, 1),
t = Ai(t, e, 1),
e = hn(),
t !== null && (gu(t, 1, e),
Cn(t, e));
break
}
}
t = t.return
}
}
function Ak(e, t, n) {
var r = e.pingCache;
r !== null && r.delete(t),
t = hn(),
e.pingedLanes |= e.suspendedLanes & n,
Ft === e && (qt & n) === n && (Nt === 4 || Nt === 3 && (qt & 130023424) === qt && 500 > Pt() - rv ? Ss(e, 0) : nv |= n),
Cn(e, t)
}
function gE(e, t) {
t === 0 && (e.mode & 1 ? (t = Wu,
Wu <<= 1,
!(Wu & 130023424) && (Wu = 4194304)) : t = 1);
var n = hn();
e = Yr(e, t),
e !== null && (gu(e, t, n),
Cn(e, n))
}
function Dk(e) {
var t = e.memoizedState
, n = 0;
t !== null && (n = t.retryLane),
gE(e, n)
}
function Lk(e, t) {
var n = 0;
switch (e.tag) {
case 13:
var r = e.stateNode
, i = e.memoizedState;
i !== null && (n = i.retryLane);
break;
case 19:
r = e.stateNode;
break;
default:
throw Error(oe(314))
}
r !== null && r.delete(t),
gE(e, n)
}
var vE;
vE = function(e, t, n) {
if (e !== null)
if (e.memoizedProps !== t.pendingProps || Sn.current)
bn = !0;
else {
if (!(e.lanes & n) && !(t.flags & 128))
return bn = !1,
xk(e, t, n);
bn = !!(e.flags & 131072)
}
else
bn = !1,
ht && t.flags & 1048576 && bS(t, sd, t.index);
switch (t.lanes = 0,
t.tag) {
case 2:
var r = t.type;
Oc(e, t),
e = t.pendingProps;
var i = Qo(t, an.current);
ko(t, n),
i = Yg(null, t, r, e, i, n);
var s = Xg();
return t.flags |= 1,
typeof i == "object" && i !== null && typeof i.render == "function" && i.$$typeof === void 0 ? (t.tag = 1,
t.memoizedState = null,
t.updateQueue = null,
En(r) ? (s = !0,
rd(t)) : s = !1,
t.memoizedState = i.state !== null && i.state !== void 0 ? i.state : null,
Wg(t),
i.updater = of,
t.stateNode = i,
i._reactInternals = t,
Bp(t, r, e, n),
t = Gp(null, t, r, !0, s, n)) : (t.tag = 0,
ht && s && Ig(t),
fn(null, t, i, n),
t = t.child),
t;
case 16:
r = t.elementType;
e: {
switch (Oc(e, t),
e = t.pendingProps,
i = r._init,
r = i(r._payload),
t.type = r,
i = t.tag = Mk(r),
e = tr(r, e),
i) {
case 0:
t = Wp(null, t, r, e, n);
break e;
case 1:
t = A0(null, t, r, e, n);
break e;
case 11:
t = k0(null, t, r, e, n);
break e;
case 14:
t = _0(null, t, r, tr(r.type, e), n);
break e
}
throw Error(oe(306, r, ""))
}
return t;
case 0:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : tr(r, i),
Wp(e, t, r, i, n);
case 1:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : tr(r, i),
A0(e, t, r, i, n);
case 3:
e: {
if (eE(t),
e === null)
throw Error(oe(387));
r = t.pendingProps,
s = t.memoizedState,
i = s.element,
RS(e, t),
ld(t, r, null, n);
var o = t.memoizedState;
if (r = o.element,
s.isDehydrated)
if (s = {
element: r,
isDehydrated: !1,
cache: o.cache,
pendingSuspenseBoundaries: o.pendingSuspenseBoundaries,
transitions: o.transitions
},
t.updateQueue.baseState = s,
t.memoizedState = s,
t.flags & 256) {
i = Zo(Error(oe(423)), t),
t = D0(e, t, r, n, i);
break e
} else if (r !== i) {
i = Zo(Error(oe(424)), t),
t = D0(e, t, r, n, i);
break e
} else
for (kn = _i(t.stateNode.containerInfo.firstChild),
An = t,
ht = !0,
or = null,
n = PS(t, null, r, n),
t.child = n; n; )
n.flags = n.flags & -3 | 4096,
n = n.sibling;
else {
if (Yo(),
r === i) {
t = Xr(e, t, n);
break e
}
fn(e, t, r, n)
}
t = t.child
}
return t;
case 5:
return OS(t),
e === null && Vp(t),
r = t.type,
i = t.pendingProps,
s = e !== null ? e.memoizedProps : null,
o = i.children,
Mp(r, i) ? o = null : s !== null && Mp(r, s) && (t.flags |= 32),
ZS(e, t),
fn(e, t, o, n),
t.child;
case 6:
return e === null && Vp(t),
null;
case 13:
return tE(e, t, n);
case 4:
return Gg(t, t.stateNode.containerInfo),
r = t.pendingProps,
e === null ? t.child = Xo(t, null, r, n) : fn(e, t, r, n),
t.child;
case 11:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : tr(r, i),
k0(e, t, r, i, n);
case 7:
return fn(e, t, t.pendingProps, n),
t.child;
case 8:
return fn(e, t, t.pendingProps.children, n),
t.child;
case 12:
return fn(e, t, t.pendingProps.children, n),
t.child;
case 10:
e: {
if (r = t.type._context,
i = t.pendingProps,
s = t.memoizedProps,
o = i.value,
rt(od, r._currentValue),
r._currentValue = o,
s !== null)
if (pr(s.value, o)) {
if (s.children === i.children && !Sn.current) {
t = Xr(e, t, n);
break e
}
} else
for (s = t.child,
s !== null && (s.return = t); s !== null; ) {
var a = s.dependencies;
if (a !== null) {
o = s.child;
for (var l = a.firstContext; l !== null; ) {
if (l.context === r) {
if (s.tag === 1) {
l = Ur(-1, n & -n),
l.tag = 2;
var u = s.updateQueue;
if (u !== null) {
u = u.shared;
var c = u.pending;
c === null ? l.next = l : (l.next = c.next,
c.next = l),
u.pending = l
}
}
s.lanes |= n,
l = s.alternate,
l !== null && (l.lanes |= n),
zp(s.return, n, t),
a.lanes |= n;
break
}
l = l.next
}
} else if (s.tag === 10)
o = s.type === t.type ? null : s.child;
else if (s.tag === 18) {
if (o = s.return,
o === null)
throw Error(oe(341));
o.lanes |= n,
a = o.alternate,
a !== null && (a.lanes |= n),
zp(o, n, t),
o = s.sibling
} else
o = s.child;
if (o !== null)
o.return = s;
else
for (o = s; o !== null; ) {
if (o === t) {
o = null;
break
}
if (s = o.sibling,
s !== null) {
s.return = o.return,
o = s;
break
}
o = o.return
}
s = o
}
fn(e, t, i.children, n),
t = t.child
}
return t;
case 9:
return i = t.type,
r = t.pendingProps.children,
ko(t, n),
i = Jn(i),
r = r(i),
t.flags |= 1,
fn(e, t, r, n),
t.child;
case 14:
return r = t.type,
i = tr(r, t.pendingProps),
i = tr(r.type, i),
_0(e, t, r, i, n);
case 15:
return XS(e, t, t.type, t.pendingProps, n);
case 17:
return r = t.type,
i = t.pendingProps,
i = t.elementType === r ? i : tr(r, i),
Oc(e, t),
t.tag = 1,
En(r) ? (e = !0,
rd(t)) : e = !1,
ko(t, n),
qS(t, r, i),
Bp(t, r, i, n),
Gp(null, t, r, !0, e, n);
case 19:
return nE(e, t, n);
case 22:
return JS(e, t, n)
}
throw Error(oe(156, t.tag))
}
;
function yE(e, t) {
return Wb(e, t)
}
function Nk(e, t, n, r) {
this.tag = e,
this.key = n,
this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null,
this.index = 0,
this.ref = null,
this.pendingProps = t,
this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null,
this.mode = r,
this.subtreeFlags = this.flags = 0,
this.deletions = null,
this.childLanes = this.lanes = 0,
this.alternate = null
}
function Qn(e, t, n, r) {
return new Nk(e,t,n,r)
}
function av(e) {
return e = e.prototype,
!(!e || !e.isReactComponent)
}
function Mk(e) {
if (typeof e == "function")
return av(e) ? 1 : 0;
if (e != null) {
if (e = e.$$typeof,
e === Tg)
return 11;
if (e === Rg)
return 14
}
return 2
}
function Ni(e, t) {
var n = e.alternate;
return n === null ? (n = Qn(e.tag, t, e.key, e.mode),
n.elementType = e.elementType,
n.type = e.type,
n.stateNode = e.stateNode,
n.alternate = e,
e.alternate = n) : (n.pendingProps = t,
n.type = e.type,
n.flags = 0,
n.subtreeFlags = 0,
n.deletions = null),
n.flags = e.flags & 14680064,
n.childLanes = e.childLanes,
n.lanes = e.lanes,
n.child = e.child,
n.memoizedProps = e.memoizedProps,
n.memoizedState = e.memoizedState,
n.updateQueue = e.updateQueue,
t = e.dependencies,
n.dependencies = t === null ? null : {
lanes: t.lanes,
firstContext: t.firstContext
},
n.sibling = e.sibling,
n.index = e.index,
n.ref = e.ref,
n
}
function Ac(e, t, n, r, i, s) {
var o = 2;
if (r = e,
typeof e == "function")
av(e) && (o = 1);
else if (typeof e == "string")
o = 5;
else
e: switch (e) {
case so:
return Es(n.children, i, s, t);
case Pg:
o = 8,
i |= 8;
break;
case hp:
return e = Qn(12, n, t, i | 2),
e.elementType = hp,
e.lanes = s,
e;
case pp:
return e = Qn(13, n, t, i),
e.elementType = pp,
e.lanes = s,
e;
case mp:
return e = Qn(19, n, t, i),
e.elementType = mp,
e.lanes = s,
e;
case Ob:
return uf(n, i, s, t);
default:
if (typeof e == "object" && e !== null)
switch (e.$$typeof) {
case Tb:
o = 10;
break e;
case Rb:
o = 9;
break e;
case Tg:
o = 11;
break e;
case Rg:
o = 14;
break e;
case di:
o = 16,
r = null;
break e
}
throw Error(oe(130, e == null ? e : typeof e, ""))
}
return t = Qn(o, n, t, i),
t.elementType = e,
t.type = r,
t.lanes = s,
t
}
function Es(e, t, n, r) {
return e = Qn(7, e, r, t),
e.lanes = n,
e
}
function uf(e, t, n, r) {
return e = Qn(22, e, r, t),
e.elementType = Ob,
e.lanes = n,
e.stateNode = {
isHidden: !1
},
e
}
function gh(e, t, n) {
return e = Qn(6, e, null, t),
e.lanes = n,
e
}
function vh(e, t, n) {
return t = Qn(4, e.children !== null ? e.children : [], e.key, t),
t.lanes = n,
t.stateNode = {
containerInfo: e.containerInfo,
pendingChildren: null,
implementation: e.implementation
},
t
}
function jk(e, t, n, r, i) {
this.tag = t,
this.containerInfo = e,
this.finishedWork = this.pingCache = this.current = this.pendingChildren = null,
this.timeoutHandle = -1,
this.callbackNode = this.pendingContext = this.context = null,
this.callbackPriority = 0,
this.eventTimes = Xf(0),
this.expirationTimes = Xf(-1),
this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0,
this.entanglements = Xf(0),
this.identifierPrefix = r,
this.onRecoverableError = i,
this.mutableSourceEagerHydrationData = null
}
function lv(e, t, n, r, i, s, o, a, l) {
return e = new jk(e,t,n,a,l),
t === 1 ? (t = 1,
s === !0 && (t |= 8)) : t = 0,
s = Qn(3, null, null, t),
e.current = s,
s.stateNode = e,
s.memoizedState = {
element: r,
isDehydrated: n,
cache: null,
transitions: null,
pendingSuspenseBoundaries: null
},
Wg(s),
e
}
function $k(e, t, n) {
var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
return {
$$typeof: io,
key: r == null ? null : "" + r,
children: e,
containerInfo: t,
implementation: n
}
}
function wE(e) {
if (!e)
return Fi;
e = e._reactInternals;
e: {
if (Vs(e) !== e || e.tag !== 1)
throw Error(oe(170));
var t = e;
do {
switch (t.tag) {
case 3:
t = t.stateNode.context;
break e;
case 1:
if (En(t.type)) {
t = t.stateNode.__reactInternalMemoizedMergedChildContext;
break e
}
}
t = t.return
} while (t !== null);
throw Error(oe(171))
}
if (e.tag === 1) {
var n = e.type;
if (En(n))
return wS(e, n, t)
}
return t
}
function xE(e, t, n, r, i, s, o, a, l) {
return e = lv(n, r, !0, e, i, s, o, a, l),
e.context = wE(null),
n = e.current,
r = hn(),
i = Li(n),
s = Ur(r, i),
s.callback = t ?? null,
Ai(n, s, i),
e.current.lanes = i,
gu(e, i, r),
Cn(e, r),
e
}
function cf(e, t, n, r) {
var i = t.current
, s = hn()
, o = Li(i);
return n = wE(n),
t.context === null ? t.context = n : t.pendingContext = n,
t = Ur(s, o),
t.payload = {
element: e
},
r = r === void 0 ? null : r,
r !== null && (t.callback = r),
e = Ai(i, t, o),
e !== null && (cr(e, i, o, s),
Pc(e, i, o)),
o
}
function gd(e) {
if (e = e.current,
!e.child)
return null;
switch (e.child.tag) {
case 5:
return e.child.stateNode;
default:
return e.child.stateNode
}
}
function U0(e, t) {
if (e = e.memoizedState,
e !== null && e.dehydrated !== null) {
var n = e.retryLane;
e.retryLane = n !== 0 && n < t ? n : t
}
}
function uv(e, t) {
U0(e, t),
(e = e.alternate) && U0(e, t)
}
function Ik() {
return null
}
var bE = typeof reportError == "function" ? reportError : function(e) {
console.error(e)
}
;
function cv(e) {
this._internalRoot = e
}
df.prototype.render = cv.prototype.render = function(e) {
var t = this._internalRoot;
if (t === null)
throw Error(oe(409));
cf(e, t, null, null)
}
;
df.prototype.unmount = cv.prototype.unmount = function() {
var e = this._internalRoot;
if (e !== null) {
this._internalRoot = null;
var t = e.containerInfo;
_s(function() {
cf(null, e, null, null)
}),
t[Qr] = null
}
}
;
function df(e) {
this._internalRoot = e
}
df.prototype.unstable_scheduleHydration = function(e) {
if (e) {
var t = Jb();
e = {
blockedOn: null,
target: e,
priority: t
};
for (var n = 0; n < pi.length && t !== 0 && t < pi[n].priority; n++)
;
pi.splice(n, 0, e),
n === 0 && eS(e)
}
}
;
function dv(e) {
return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11)
}
function ff(e) {
return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11 && (e.nodeType !== 8 || e.nodeValue !== " react-mount-point-unstable "))
}
function B0() {}
function Fk(e, t, n, r, i) {
if (i) {
if (typeof r == "function") {
var s = r;
r = function() {
var u = gd(o);
s.call(u)
}
}
var o = xE(t, r, e, 0, null, !1, !1, "", B0);
return e._reactRootContainer = o,
e[Qr] = o.current,
Pl(e.nodeType === 8 ? e.parentNode : e),
_s(),
o
}
for (; i = e.lastChild; )
e.removeChild(i);
if (typeof r == "function") {
var a = r;
r = function() {
var u = gd(l);
a.call(u)
}
}
var l = lv(e, 0, !1, null, null, !1, !1, "", B0);
return e._reactRootContainer = l,
e[Qr] = l.current,
Pl(e.nodeType === 8 ? e.parentNode : e),
_s(function() {
cf(t, l, n, r)
}),
l
}
function hf(e, t, n, r, i) {
var s = n._reactRootContainer;
if (s) {
var o = s;
if (typeof i == "function") {
var a = i;
i = function() {
var l = gd(o);
a.call(l)
}
}
cf(t, o, e, i)
} else
o = Fk(n, t, e, i, r);
return gd(o)
}
Yb = function(e) {
switch (e.tag) {
case 3:
var t = e.stateNode;
if (t.current.memoizedState.isDehydrated) {
var n = Ga(t.pendingLanes);
n !== 0 && (_g(t, n | 1),
Cn(t, Pt()),
!(He & 6) && (ea = Pt() + 500,
Gi()))
}
break;
case 13:
_s(function() {
var r = Yr(e, 1);
if (r !== null) {
var i = hn();
cr(r, e, 1, i)
}
}),
uv(e, 1)
}
}
;
Ag = function(e) {
if (e.tag === 13) {
var t = Yr(e, 134217728);
if (t !== null) {
var n = hn();
cr(t, e, 134217728, n)
}
uv(e, 134217728)
}
}
;
Xb = function(e) {
if (e.tag === 13) {
var t = Li(e)
, n = Yr(e, t);
if (n !== null) {
var r = hn();
cr(n, e, t, r)
}
uv(e, t)
}
}
;
Jb = function() {
return Je
}
;
Zb = function(e, t) {
var n = Je;
try {
return Je = e,
t()
} finally {
Je = n
}
}
;
Pp = function(e, t, n) {
switch (t) {
case "input":
if (yp(e, n),
t = n.name,
n.type === "radio" && t != null) {
for (n = e; n.parentNode; )
n = n.parentNode;
for (n = n.querySelectorAll("input[name=" + JSON.stringify("" + t) + '][type="radio"]'),
t = 0; t < n.length; t++) {
var r = n[t];
if (r !== e && r.form === e.form) {
var i = nf(r);
if (!i)
throw Error(oe(90));
_b(r),
yp(r, i)
}
}
}
break;
case "textarea":
Db(e, n);
break;
case "select":
t = n.value,
t != null && Po(e, !!n.multiple, t, !1)
}
}
;
Fb = iv;
Vb = _s;
var Vk = {
usingClientEntryPoint: !1,
Events: [yu, uo, nf, $b, Ib, iv]
}
, _a = {
findFiberByHostInstance: as,
bundleType: 0,
version: "18.3.1",
rendererPackageName: "react-dom"
}
, zk = {
bundleType: _a.bundleType,
version: _a.version,
rendererPackageName: _a.rendererPackageName,
rendererConfig: _a.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
overrideProps: null,
overridePropsDeletePath: null,
overridePropsRenamePath: null,
setErrorHandler: null,
setSuspenseHandler: null,
scheduleUpdate: null,
currentDispatcherRef: ti.ReactCurrentDispatcher,
findHostInstanceByFiber: function(e) {
return e = Bb(e),
e === null ? null : e.stateNode
},
findFiberByHostInstance: _a.findFiberByHostInstance || Ik,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.1-next-f1338f8080-20240426"
};
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
var nc = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (!nc.isDisabled && nc.supportsFiber)
try {
Jd = nc.inject(zk),
Or = nc
} catch {}
}
jn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Vk;
jn.createPortal = function(e, t) {
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
if (!dv(t))
throw Error(oe(200));
return $k(e, t, null, n)
}
;
jn.createRoot = function(e, t) {
if (!dv(e))
throw Error(oe(299));
var n = !1
, r = ""
, i = bE;
return t != null && (t.unstable_strictMode === !0 && (n = !0),
t.identifierPrefix !== void 0 && (r = t.identifierPrefix),
t.onRecoverableError !== void 0 && (i = t.onRecoverableError)),
t = lv(e, 1, !1, null, null, n, !1, r, i),
e[Qr] = t.current,
Pl(e.nodeType === 8 ? e.parentNode : e),
new cv(t)
}
;
jn.findDOMNode = function(e) {
if (e == null)
return null;
if (e.nodeType === 1)
return e;
var t = e._reactInternals;
if (t === void 0)
throw typeof e.render == "function" ? Error(oe(188)) : (e = Object.keys(e).join(","),
Error(oe(268, e)));
return e = Bb(t),
e = e === null ? null : e.stateNode,
e
}
;
jn.flushSync = function(e) {
return _s(e)
}
;
jn.hydrate = function(e, t, n) {
if (!ff(t))
throw Error(oe(200));
return hf(null, e, t, !0, n)
}
;
jn.hydrateRoot = function(e, t, n) {
if (!dv(e))
throw Error(oe(405));
var r = n != null && n.hydratedSources || null
, i = !1
, s = ""
, o = bE;
if (n != null && (n.unstable_strictMode === !0 && (i = !0),
n.identifierPrefix !== void 0 && (s = n.identifierPrefix),
n.onRecoverableError !== void 0 && (o = n.onRecoverableError)),
t = xE(t, null, e, 1, n ?? null, i, !1, s, o),
e[Qr] = t.current,
Pl(e),
r)
for (e = 0; e < r.length; e++)
n = r[e],
i = n._getVersion,
i = i(n._source),
t.mutableSourceEagerHydrationData == null ? t.mutableSourceEagerHydrationData = [n, i] : t.mutableSourceEagerHydrationData.push(n, i);
return new df(t)
}
;
jn.render = function(e, t, n) {
if (!ff(t))
throw Error(oe(200));
return hf(null, e, t, !1, n)
}
;
jn.unmountComponentAtNode = function(e) {
if (!ff(e))
throw Error(oe(40));
return e._reactRootContainer ? (_s(function() {
hf(null, null, e, !1, function() {
e._reactRootContainer = null,
e[Qr] = null
})
}),
!0) : !1
}
;
jn.unstable_batchedUpdates = iv;
jn.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
if (!ff(n))
throw Error(oe(200));
if (e == null || e._reactInternals === void 0)
throw Error(oe(38));
return hf(e, t, n, !1, r)
}
;
jn.version = "18.3.1-next-f1338f8080-20240426";
function SE() {
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
try {
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(SE)
} catch (e) {
console.error(e)
}
}
SE(),
Sb.exports = jn;
var xu = Sb.exports;
const EE = pu(xu)
, Uk = ob({
__proto__: null,
default: EE
}, [xu]);
var H0 = xu;
dp.createRoot = H0.createRoot,
dp.hydrateRoot = H0.hydrateRoot;
/**
* @remix-run/router v1.16.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
function mt() {
return mt = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
mt.apply(this, arguments)
}
var Ot;
(function(e) {
e.Pop = "POP",
e.Push = "PUSH",
e.Replace = "REPLACE"
}
)(Ot || (Ot = {}));
const W0 = "popstate";
function Bk(e) {
e === void 0 && (e = {});
function t(r, i) {
let {pathname: s, search: o, hash: a} = r.location;
return Nl("", {
pathname: s,
search: o,
hash: a
}, i.state && i.state.usr || null, i.state && i.state.key || "default")
}
function n(r, i) {
return typeof i == "string" ? i : As(i)
}
return Wk(t, n, null, e)
}
function Fe(e, t) {
if (e === !1 || e === null || typeof e > "u")
throw new Error(t)
}
function ta(e, t) {
if (!e) {
typeof console < "u" && console.warn(t);
try {
throw new Error(t)
} catch {}
}
}
function Hk() {
return Math.random().toString(36).substr(2, 8)
}
function G0(e, t) {
return {
usr: e.state,
key: e.key,
idx: t
}
}
function Nl(e, t, n, r) {
return n === void 0 && (n = null),
mt({
pathname: typeof e == "string" ? e : e.pathname,
search: "",
hash: ""
}, typeof t == "string" ? Ki(t) : t, {
state: n,
key: t && t.key || r || Hk()
})
}
function As(e) {
let {pathname: t="/", search: n="", hash: r=""} = e;
return n && n !== "?" && (t += n.charAt(0) === "?" ? n : "?" + n),
r && r !== "#" && (t += r.charAt(0) === "#" ? r : "#" + r),
t
}
function Ki(e) {
let t = {};
if (e) {
let n = e.indexOf("#");
n >= 0 && (t.hash = e.substr(n),
e = e.substr(0, n));
let r = e.indexOf("?");
r >= 0 && (t.search = e.substr(r),
e = e.substr(0, r)),
e && (t.pathname = e)
}
return t
}
function Wk(e, t, n, r) {
r === void 0 && (r = {});
let {window: i=document.defaultView, v5Compat: s=!1} = r
, o = i.history
, a = Ot.Pop
, l = null
, u = c();
u == null && (u = 0,
o.replaceState(mt({}, o.state, {
idx: u
}), ""));
function c() {
return (o.state || {
idx: null
}).idx
}
function d() {
a = Ot.Pop;
let b = c()
, v = b == null ? null : b - u;
u = b,
l && l({
action: a,
location: p.location,
delta: v
})
}
function f(b, v) {
a = Ot.Push;
let g = Nl(p.location, b, v);
u = c() + 1;
let w = G0(g, u)
, E = p.createHref(g);
try {
o.pushState(w, "", E)
} catch (D) {
if (D instanceof DOMException && D.name === "DataCloneError")
throw D;
i.location.assign(E)
}
s && l && l({
action: a,
location: p.location,
delta: 1
})
}
function h(b, v) {
a = Ot.Replace;
let g = Nl(p.location, b, v);
u = c();
let w = G0(g, u)
, E = p.createHref(g);
o.replaceState(w, "", E),
s && l && l({
action: a,
location: p.location,
delta: 0
})
}
function m(b) {
let v = i.location.origin !== "null" ? i.location.origin : i.location.href
, g = typeof b == "string" ? b : As(b);
return g = g.replace(/ $/, "%20"),
Fe(v, "No window.location.(origin|href) available to create URL for href: " + g),
new URL(g,v)
}
let p = {
get action() {
return a
},
get location() {
return e(i, o)
},
listen(b) {
if (l)
throw new Error("A history only accepts one active listener");
return i.addEventListener(W0, d),
l = b,
()=>{
i.removeEventListener(W0, d),
l = null
}
},
createHref(b) {
return t(i, b)
},
createURL: m,
encodeLocation(b) {
let v = m(b);
return {
pathname: v.pathname,
search: v.search,
hash: v.hash
}
},
push: f,
replace: h,
go(b) {
return o.go(b)
}
};
return p
}
var ft;
(function(e) {
e.data = "data",
e.deferred = "deferred",
e.redirect = "redirect",
e.error = "error"
}
)(ft || (ft = {}));
const Gk = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
function Kk(e) {
return e.index === !0
}
function im(e, t, n, r) {
return n === void 0 && (n = []),
r === void 0 && (r = {}),
e.map((i,s)=>{
let o = [...n, s]
, a = typeof i.id == "string" ? i.id : o.join("-");
if (Fe(i.index !== !0 || !i.children, "Cannot specify children on an index route"),
Fe(!r[a], 'Found a route id collision on id "' + a + `". Route id's must be globally unique within Data Router usages`),
Kk(i)) {
let l = mt({}, i, t(i), {
id: a
});
return r[a] = l,
l
} else {
let l = mt({}, i, t(i), {
id: a,
children: void 0
});
return r[a] = l,
i.children && (l.children = im(i.children, t, o, r)),
l
}
}
)
}
function vo(e, t, n) {
n === void 0 && (n = "/");
let r = typeof t == "string" ? Ki(t) : t
, i = pa(r.pathname || "/", n);
if (i == null)
return null;
let s = CE(e);
Qk(s);
let o = null;
for (let a = 0; o == null && a < s.length; ++a) {
let l = a_(i);
o = i_(s[a], l)
}
return o
}
function qk(e, t) {
let {route: n, pathname: r, params: i} = e;
return {
id: n.id,
pathname: r,
params: i,
data: t[n.id],
handle: n.handle
}
}
function CE(e, t, n, r) {
t === void 0 && (t = []),
n === void 0 && (n = []),
r === void 0 && (r = "");
let i = (s,o,a)=>{
let l = {
relativePath: a === void 0 ? s.path || "" : a,
caseSensitive: s.caseSensitive === !0,
childrenIndex: o,
route: s
};
l.relativePath.startsWith("/") && (Fe(l.relativePath.startsWith(r), 'Absolute route path "' + l.relativePath + '" nested under path ' + ('"' + r + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."),
l.relativePath = l.relativePath.slice(r.length));
let u = Br([r, l.relativePath])
, c = n.concat(l);
s.children && s.children.length > 0 && (Fe(s.index !== !0, "Index routes must not have child routes. Please remove " + ('all child routes from route path "' + u + '".')),
CE(s.children, t, c, u)),
!(s.path == null && !s.index) && t.push({
path: u,
score: n_(u, s.index),
routesMeta: c
})
}
;
return e.forEach((s,o)=>{
var a;
if (s.path === "" || !((a = s.path) != null && a.includes("?")))
i(s, o);
else
for (let l of PE(s.path))
i(s, o, l)
}
),
t
}
function PE(e) {
let t = e.split("/");
if (t.length === 0)
return [];
let[n,...r] = t
, i = n.endsWith("?")
, s = n.replace(/\?$/, "");
if (r.length === 0)
return i ? [s, ""] : [s];
let o = PE(r.join("/"))
, a = [];
return a.push(...o.map(l=>l === "" ? s : [s, l].join("/"))),
i && a.push(...o),
a.map(l=>e.startsWith("/") && l === "" ? "/" : l)
}
function Qk(e) {
e.sort((t,n)=>t.score !== n.score ? n.score - t.score : r_(t.routesMeta.map(r=>r.childrenIndex), n.routesMeta.map(r=>r.childrenIndex)))
}
const Yk = /^:[\w-]+$/
, Xk = 3
, Jk = 2
, Zk = 1
, e_ = 10
, t_ = -2
, K0 = e=>e === "*";
function n_(e, t) {
let n = e.split("/")
, r = n.length;
return n.some(K0) && (r += t_),
t && (r += Jk),
n.filter(i=>!K0(i)).reduce((i,s)=>i + (Yk.test(s) ? Xk : s === "" ? Zk : e_), r)
}
function r_(e, t) {
return e.length === t.length && e.slice(0, -1).every((r,i)=>r === t[i]) ? e[e.length - 1] - t[t.length - 1] : 0
}
function i_(e, t) {
let {routesMeta: n} = e
, r = {}
, i = "/"
, s = [];
for (let o = 0; o < n.length; ++o) {
let a = n[o]
, l = o === n.length - 1
, u = i === "/" ? t : t.slice(i.length) || "/"
, c = s_({
path: a.relativePath,
caseSensitive: a.caseSensitive,
end: l
}, u);
if (!c)
return null;
Object.assign(r, c.params);
let d = a.route;
s.push({
params: r,
pathname: Br([i, c.pathname]),
pathnameBase: c_(Br([i, c.pathnameBase])),
route: d
}),
c.pathnameBase !== "/" && (i = Br([i, c.pathnameBase]))
}
return s
}
function s_(e, t) {
typeof e == "string" && (e = {
path: e,
caseSensitive: !1,
end: !0
});
let[n,r] = o_(e.path, e.caseSensitive, e.end)
, i = t.match(n);
if (!i)
return null;
let s = i[0]
, o = s.replace(/(.)\/+$/, "$1")
, a = i.slice(1);
return {
params: r.reduce((u,c,d)=>{
let {paramName: f, isOptional: h} = c;
if (f === "*") {
let p = a[d] || "";
o = s.slice(0, s.length - p.length).replace(/(.)\/+$/, "$1")
}
const m = a[d];
return h && !m ? u[f] = void 0 : u[f] = (m || "").replace(/%2F/g, "/"),
u
}
, {}),
pathname: s,
pathnameBase: o,
pattern: e
}
}
function o_(e, t, n) {
t === void 0 && (t = !1),
n === void 0 && (n = !0),
ta(e === "*" || !e.endsWith("*") || e.endsWith("/*"), 'Route path "' + e + '" will be treated as if it were ' + ('"' + e.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + e.replace(/\*$/, "/*") + '".'));
let r = []
, i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (o,a,l)=>(r.push({
paramName: a,
isOptional: l != null
}),
l ? "/?([^\\/]+)?" : "/([^\\/]+)"));
return e.endsWith("*") ? (r.push({
paramName: "*"
}),
i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"),
[new RegExp(i,t ? void 0 : "i"), r]
}
function a_(e) {
try {
return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g, "%2F")).join("/")
} catch (t) {
return ta(!1, 'The URL path "' + e + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + t + ").")),
e
}
}
function pa(e, t) {
if (t === "/")
return e;
if (!e.toLowerCase().startsWith(t.toLowerCase()))
return null;
let n = t.endsWith("/") ? t.length - 1 : t.length
, r = e.charAt(n);
return r && r !== "/" ? null : e.slice(n) || "/"
}
function l_(e, t) {
t === void 0 && (t = "/");
let {pathname: n, search: r="", hash: i=""} = typeof e == "string" ? Ki(e) : e;
return {
pathname: n ? n.startsWith("/") ? n : u_(n, t) : t,
search: d_(r),
hash: f_(i)
}
}
function u_(e, t) {
let n = t.replace(/\/+$/, "").split("/");
return e.split("/").forEach(i=>{
i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i)
}
),
n.length > 1 ? n.join("/") : "/"
}
function yh(e, t, n, r) {
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(r) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.'
}
function TE(e) {
return e.filter((t,n)=>n === 0 || t.route.path && t.route.path.length > 0)
}
function fv(e, t) {
let n = TE(e);
return t ? n.map((r,i)=>i === e.length - 1 ? r.pathname : r.pathnameBase) : n.map(r=>r.pathnameBase)
}
function hv(e, t, n, r) {
r === void 0 && (r = !1);
let i;
typeof e == "string" ? i = Ki(e) : (i = mt({}, e),
Fe(!i.pathname || !i.pathname.includes("?"), yh("?", "pathname", "search", i)),
Fe(!i.pathname || !i.pathname.includes("#"), yh("#", "pathname", "hash", i)),
Fe(!i.search || !i.search.includes("#"), yh("#", "search", "hash", i)));
let s = e === "" || i.pathname === "", o = s ? "/" : i.pathname, a;
if (o == null)
a = n;
else {
let d = t.length - 1;
if (!r && o.startsWith("..")) {
let f = o.split("/");
for (; f[0] === ".."; )
f.shift(),
d -= 1;
i.pathname = f.join("/")
}
a = d >= 0 ? t[d] : "/"
}
let l = l_(i, a)
, u = o && o !== "/" && o.endsWith("/")
, c = (s || o === ".") && n.endsWith("/");
return !l.pathname.endsWith("/") && (u || c) && (l.pathname += "/"),
l
}
const Br = e=>e.join("/").replace(/\/\/+/g, "/")
, c_ = e=>e.replace(/\/+$/, "").replace(/^\/*/, "/")
, d_ = e=>!e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e
, f_ = e=>!e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
class pv {
constructor(t, n, r, i) {
i === void 0 && (i = !1),
this.status = t,
this.statusText = n || "",
this.internal = i,
r instanceof Error ? (this.data = r.toString(),
this.error = r) : this.data = r
}
}
function mv(e) {
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data"in e
}
const RE = ["post", "put", "patch", "delete"]
, h_ = new Set(RE)
, p_ = ["get", ...RE]
, m_ = new Set(p_)
, g_ = new Set([301, 302, 303, 307, 308])
, v_ = new Set([307, 308])
, wh = {
state: "idle",
location: void 0,
formMethod: void 0,
formAction: void 0,
formEncType: void 0,
formData: void 0,
json: void 0,
text: void 0
}
, y_ = {
state: "idle",
data: void 0,
formMethod: void 0,
formAction: void 0,
formEncType: void 0,
formData: void 0,
json: void 0,
text: void 0
}
, Aa = {
state: "unblocked",
proceed: void 0,
reset: void 0,
location: void 0
}
, gv = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i
, w_ = e=>({
hasErrorBoundary: !!e.hasErrorBoundary
})
, OE = "remix-router-transitions";
function x_(e) {
const t = e.window ? e.window : typeof window < "u" ? window : void 0
, n = typeof t < "u" && typeof t.document < "u" && typeof t.document.createElement < "u"
, r = !n;
Fe(e.routes.length > 0, "You must provide a non-empty routes array to createRouter");
let i;
if (e.mapRouteProperties)
i = e.mapRouteProperties;
else if (e.detectErrorBoundary) {
let K = e.detectErrorBoundary;
i = ee=>({
hasErrorBoundary: K(ee)
})
} else
i = w_;
let s = {}, o = im(e.routes, i, void 0, s), a, l = e.basename || "/", u = e.unstable_dataStrategy || C_, c = mt({
v7_fetcherPersist: !1,
v7_normalizeFormMethod: !1,
v7_partialHydration: !1,
v7_prependBasename: !1,
v7_relativeSplatPath: !1,
unstable_skipActionErrorRevalidation: !1
}, e.future), d = null, f = new Set, h = null, m = null, p = null, b = e.hydrationData != null, v = vo(o, e.history.location, l), g = null;
if (v == null) {
let K = Un(404, {
pathname: e.history.location.pathname
})
, {matches: ee, route: ie} = r1(o);
v = ee,
g = {
[ie.id]: K
}
}
let w, E = v.some(K=>K.route.lazy), D = v.some(K=>K.route.loader);
if (E)
w = !1;
else if (!D)
w = !0;
else if (c.v7_partialHydration) {
let K = e.hydrationData ? e.hydrationData.loaderData : null
, ee = e.hydrationData ? e.hydrationData.errors : null
, ie = le=>le.route.loader ? typeof le.route.loader == "function" && le.route.loader.hydrate === !0 ? !1 : K && K[le.route.id] !== void 0 || ee && ee[le.route.id] !== void 0 : !0;
if (ee) {
let le = v.findIndex(ge=>ee[ge.route.id] !== void 0);
w = v.slice(0, le + 1).every(ie)
} else
w = v.every(ie)
} else
w = e.hydrationData != null;
let V, C = {
historyAction: e.history.action,
location: e.history.location,
matches: v,
initialized: w,
navigation: wh,
restoreScrollPosition: e.hydrationData != null ? !1 : null,
preventScrollReset: !1,
revalidation: "idle",
loaderData: e.hydrationData && e.hydrationData.loaderData || {},
actionData: e.hydrationData && e.hydrationData.actionData || null,
errors: e.hydrationData && e.hydrationData.errors || g,
fetchers: new Map,
blockers: new Map
}, P = Ot.Pop, A = !1, B, Q = !1, Z = new Map, F = null, k = !1, T = !1, _ = [], O = [], R = new Map, z = 0, Y = -1, te = new Map, ue = new Set, X = new Map, S = new Map, j = new Set, N = new Map, I = new Map, U = !1;
function H() {
if (d = e.history.listen(K=>{
let {action: ee, location: ie, delta: le} = K;
if (U) {
U = !1;
return
}
ta(I.size === 0 || le != null, "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");
let ge = Re({
currentLocation: C.location,
nextLocation: ie,
historyAction: ee
});
if (ge && le != null) {
U = !0,
e.history.go(le * -1),
Be(ge, {
state: "blocked",
location: ie,
proceed() {
Be(ge, {
state: "proceeding",
proceed: void 0,
reset: void 0,
location: ie
}),
e.history.go(le)
},
reset() {
let Le = new Map(C.blockers);
Le.set(ge, Aa),
L({
blockers: Le
})
}
});
return
}
return se(ee, ie)
}
),
n) {
j_(t, Z);
let K = ()=>$_(t, Z);
t.addEventListener("pagehide", K),
F = ()=>t.removeEventListener("pagehide", K)
}
return C.initialized || se(Ot.Pop, C.location, {
initialHydration: !0
}),
V
}
function q() {
d && d(),
F && F(),
f.clear(),
B && B.abort(),
C.fetchers.forEach((K,ee)=>Te(ee)),
C.blockers.forEach((K,ee)=>Ce(ee))
}
function $(K) {
return f.add(K),
()=>f.delete(K)
}
function L(K, ee) {
ee === void 0 && (ee = {}),
C = mt({}, C, K);
let ie = []
, le = [];
c.v7_fetcherPersist && C.fetchers.forEach((ge,Le)=>{
ge.state === "idle" && (j.has(Le) ? le.push(Le) : ie.push(Le))
}
),
[...f].forEach(ge=>ge(C, {
deletedFetchers: le,
unstable_viewTransitionOpts: ee.viewTransitionOpts,
unstable_flushSync: ee.flushSync === !0
})),
c.v7_fetcherPersist && (ie.forEach(ge=>C.fetchers.delete(ge)),
le.forEach(ge=>Te(ge)))
}
function M(K, ee, ie) {
var le, ge;
let {flushSync: Le} = ie === void 0 ? {} : ie, Pe = C.actionData != null && C.navigation.formMethod != null && sr(C.navigation.formMethod) && C.navigation.state === "loading" && ((le = K.state) == null ? void 0 : le._isRedirect) !== !0, ve;
ee.actionData ? Object.keys(ee.actionData).length > 0 ? ve = ee.actionData : ve = null : Pe ? ve = C.actionData : ve = null;
let je = ee.loaderData ? t1(C.loaderData, ee.loaderData, ee.matches || [], ee.errors) : C.loaderData
, De = C.blockers;
De.size > 0 && (De = new Map(De),
De.forEach((_e,ct)=>De.set(ct, Aa)));
let Bt = A === !0 || C.navigation.formMethod != null && sr(C.navigation.formMethod) && ((ge = K.state) == null ? void 0 : ge._isRedirect) !== !0;
a && (o = a,
a = void 0),
k || P === Ot.Pop || (P === Ot.Push ? e.history.push(K, K.state) : P === Ot.Replace && e.history.replace(K, K.state));
let Ht;
if (P === Ot.Pop) {
let _e = Z.get(C.location.pathname);
_e && _e.has(K.pathname) ? Ht = {
currentLocation: C.location,
nextLocation: K
} : Z.has(K.pathname) && (Ht = {
currentLocation: K,
nextLocation: C.location
})
} else if (Q) {
let _e = Z.get(C.location.pathname);
_e ? _e.add(K.pathname) : (_e = new Set([K.pathname]),
Z.set(C.location.pathname, _e)),
Ht = {
currentLocation: C.location,
nextLocation: K
}
}
L(mt({}, ee, {
actionData: ve,
loaderData: je,
historyAction: P,
location: K,
initialized: !0,
navigation: wh,
revalidation: "idle",
restoreScrollPosition: _t(K, ee.matches || C.matches),
preventScrollReset: Bt,
blockers: De
}), {
viewTransitionOpts: Ht,
flushSync: Le === !0
}),
P = Ot.Pop,
A = !1,
Q = !1,
k = !1,
T = !1,
_ = [],
O = []
}
async function W(K, ee) {
if (typeof K == "number") {
e.history.go(K);
return
}
let ie = sm(C.location, C.matches, l, c.v7_prependBasename, K, c.v7_relativeSplatPath, ee == null ? void 0 : ee.fromRouteId, ee == null ? void 0 : ee.relative)
, {path: le, submission: ge, error: Le} = q0(c.v7_normalizeFormMethod, !1, ie, ee)
, Pe = C.location
, ve = Nl(C.location, le, ee && ee.state);
ve = mt({}, ve, e.history.encodeLocation(ve));
let je = ee && ee.replace != null ? ee.replace : void 0
, De = Ot.Push;
je === !0 ? De = Ot.Replace : je === !1 || ge != null && sr(ge.formMethod) && ge.formAction === C.location.pathname + C.location.search && (De = Ot.Replace);
let Bt = ee && "preventScrollReset"in ee ? ee.preventScrollReset === !0 : void 0
, Ht = (ee && ee.unstable_flushSync) === !0
, _e = Re({
currentLocation: Pe,
nextLocation: ve,
historyAction: De
});
if (_e) {
Be(_e, {
state: "blocked",
location: ve,
proceed() {
Be(_e, {
state: "proceeding",
proceed: void 0,
reset: void 0,
location: ve
}),
W(K, ee)
},
reset() {
let ct = new Map(C.blockers);
ct.set(_e, Aa),
L({
blockers: ct
})
}
});
return
}
return await se(De, ve, {
submission: ge,
pendingError: Le,
preventScrollReset: Bt,
replace: ee && ee.replace,
enableViewTransition: ee && ee.unstable_viewTransition,
flushSync: Ht
})
}
function J() {
if (we(),
L({
revalidation: "loading"
}),
C.navigation.state !== "submitting") {
if (C.navigation.state === "idle") {
se(C.historyAction, C.location, {
startUninterruptedRevalidation: !0
});
return
}
se(P || C.historyAction, C.navigation.location, {
overrideNavigation: C.navigation
})
}
}
async function se(K, ee, ie) {
B && B.abort(),
B = null,
P = K,
k = (ie && ie.startUninterruptedRevalidation) === !0,
Jt(C.location, C.matches),
A = (ie && ie.preventScrollReset) === !0,
Q = (ie && ie.enableViewTransition) === !0;
let le = a || o
, ge = ie && ie.overrideNavigation
, Le = vo(le, ee, l)
, Pe = (ie && ie.flushSync) === !0;
if (!Le) {
let _e = Un(404, {
pathname: ee.pathname
})
, {matches: ct, route: Mt} = r1(le);
We(),
M(ee, {
matches: ct,
loaderData: {},
errors: {
[Mt.id]: _e
}
}, {
flushSync: Pe
});
return
}
if (C.initialized && !T && __(C.location, ee) && !(ie && ie.submission && sr(ie.submission.formMethod))) {
M(ee, {
matches: Le
}, {
flushSync: Pe
});
return
}
B = new AbortController;
let ve = Ys(e.history, ee, B.signal, ie && ie.submission), je;
if (ie && ie.pendingError)
je = [al(Le).route.id, {
type: ft.error,
error: ie.pendingError
}];
else if (ie && ie.submission && sr(ie.submission.formMethod)) {
let _e = await ae(ve, ee, ie.submission, Le, {
replace: ie.replace,
flushSync: Pe
});
if (_e.shortCircuited)
return;
je = _e.pendingActionResult,
ge = xh(ee, ie.submission),
Pe = !1,
ve = Ys(e.history, ve.url, ve.signal)
}
let {shortCircuited: De, loaderData: Bt, errors: Ht} = await ne(ve, ee, Le, ge, ie && ie.submission, ie && ie.fetcherSubmission, ie && ie.replace, ie && ie.initialHydration === !0, Pe, je);
De || (B = null,
M(ee, mt({
matches: Le
}, n1(je), {
loaderData: Bt,
errors: Ht
})))
}
async function ae(K, ee, ie, le, ge) {
ge === void 0 && (ge = {}),
we();
let Le = N_(ee, ie);
L({
navigation: Le
}, {
flushSync: ge.flushSync === !0
});
let Pe, ve = am(le, ee);
if (!ve.route.action && !ve.route.lazy)
Pe = {
type: ft.error,
error: Un(405, {
method: K.method,
pathname: ee.pathname,
routeId: ve.route.id
})
};
else if (Pe = (await fe("action", K, [ve], le))[0],
K.signal.aborted)
return {
shortCircuited: !0
};
if (ds(Pe)) {
let je;
return ge && ge.replace != null ? je = ge.replace : je = J0(Pe.response.headers.get("Location"), new URL(K.url), l) === C.location.pathname + C.location.search,
await Me(K, Pe, {
submission: ie,
replace: je
}),
{
shortCircuited: !0
}
}
if (cs(Pe))
throw Un(400, {
type: "defer-action"
});
if (Gn(Pe)) {
let je = al(le, ve.route.id);
return (ge && ge.replace) !== !0 && (P = Ot.Push),
{
pendingActionResult: [je.route.id, Pe]
}
}
return {
pendingActionResult: [ve.route.id, Pe]
}
}
async function ne(K, ee, ie, le, ge, Le, Pe, ve, je, De) {
let Bt = le || xh(ee, ge)
, Ht = ge || Le || o1(Bt)
, _e = a || o
, [ct,Mt] = Q0(e.history, C, ie, Ht, ee, c.v7_partialHydration && ve === !0, c.unstable_skipActionErrorRevalidation, T, _, O, j, X, ue, _e, l, De);
if (We(Ue=>!(ie && ie.some(un=>un.route.id === Ue)) || ct && ct.some(un=>un.route.id === Ue)),
Y = ++z,
ct.length === 0 && Mt.length === 0) {
let Ue = nt();
return M(ee, mt({
matches: ie,
loaderData: {},
errors: De && Gn(De[1]) ? {
[De[0]]: De[1].error
} : null
}, n1(De), Ue ? {
fetchers: new Map(C.fetchers)
} : {}), {
flushSync: je
}),
{
shortCircuited: !0
}
}
if (!k && (!c.v7_partialHydration || !ve)) {
Mt.forEach(un=>{
let In = C.fetchers.get(un.key)
, Wt = Da(void 0, In ? In.data : void 0);
C.fetchers.set(un.key, Wt)
}
);
let Ue;
De && !Gn(De[1]) ? Ue = {
[De[0]]: De[1].data
} : C.actionData && (Object.keys(C.actionData).length === 0 ? Ue = null : Ue = C.actionData),
L(mt({
navigation: Bt
}, Ue !== void 0 ? {
actionData: Ue
} : {}, Mt.length > 0 ? {
fetchers: new Map(C.fetchers)
} : {}), {
flushSync: je
})
}
Mt.forEach(Ue=>{
R.has(Ue.key) && ke(Ue.key),
Ue.controller && R.set(Ue.key, Ue.controller)
}
);
let ba = ()=>Mt.forEach(Ue=>ke(Ue.key));
B && B.signal.addEventListener("abort", ba);
let {loaderResults: ni, fetcherResults: Gs} = await Ee(C.matches, ie, ct, Mt, K);
if (K.signal.aborted)
return {
shortCircuited: !0
};
B && B.signal.removeEventListener("abort", ba),
Mt.forEach(Ue=>R.delete(Ue.key));
let Ks = i1([...ni, ...Gs]);
if (Ks) {
if (Ks.idx >= ct.length) {
let Ue = Mt[Ks.idx - ct.length].key;
ue.add(Ue)
}
return await Me(K, Ks.result, {
replace: Pe
}),
{
shortCircuited: !0
}
}
let {loaderData: qs, errors: vr} = e1(C, ie, ct, ni, De, Mt, Gs, N);
N.forEach((Ue,un)=>{
Ue.subscribe(In=>{
(In || Ue.done) && N.delete(un)
}
)
}
),
c.v7_partialHydration && ve && C.errors && Object.entries(C.errors).filter(Ue=>{
let[un] = Ue;
return !ct.some(In=>In.route.id === un)
}
).forEach(Ue=>{
let[un,In] = Ue;
vr = Object.assign(vr || {}, {
[un]: In
})
}
);
let Mu = nt()
, ju = it(Y)
, $u = Mu || ju || Mt.length > 0;
return mt({
loaderData: qs,
errors: vr
}, $u ? {
fetchers: new Map(C.fetchers)
} : {})
}
function de(K, ee, ie, le) {
if (r)
throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");
R.has(K) && ke(K);
let ge = (le && le.unstable_flushSync) === !0
, Le = a || o
, Pe = sm(C.location, C.matches, l, c.v7_prependBasename, ie, c.v7_relativeSplatPath, ee, le == null ? void 0 : le.relative)
, ve = vo(Le, Pe, l);
if (!ve) {
Ge(K, ee, Un(404, {
pathname: Pe
}), {
flushSync: ge
});
return
}
let {path: je, submission: De, error: Bt} = q0(c.v7_normalizeFormMethod, !0, Pe, le);
if (Bt) {
Ge(K, ee, Bt, {
flushSync: ge
});
return
}
let Ht = am(ve, je);
if (A = (le && le.preventScrollReset) === !0,
De && sr(De.formMethod)) {
ye(K, ee, je, Ht, ve, ge, De);
return
}
X.set(K, {
routeId: ee,
path: je
}),
be(K, ee, je, Ht, ve, ge, De)
}
async function ye(K, ee, ie, le, ge, Le, Pe) {
if (we(),
X.delete(K),
!le.route.action && !le.route.lazy) {
let Wt = Un(405, {
method: Pe.formMethod,
pathname: ie,
routeId: ee
});
Ge(K, ee, Wt, {
flushSync: Le
});
return
}
let ve = C.fetchers.get(K);
Se(K, M_(Pe, ve), {
flushSync: Le
});
let je = new AbortController
, De = Ys(e.history, ie, je.signal, Pe);
R.set(K, je);
let Bt = z
, _e = (await fe("action", De, [le], ge))[0];
if (De.signal.aborted) {
R.get(K) === je && R.delete(K);
return
}
if (c.v7_fetcherPersist && j.has(K)) {
if (ds(_e) || Gn(_e)) {
Se(K, ai(void 0));
return
}
} else {
if (ds(_e))
if (R.delete(K),
Y > Bt) {
Se(K, ai(void 0));
return
} else
return ue.add(K),
Se(K, Da(Pe)),
Me(De, _e, {
fetcherSubmission: Pe
});
if (Gn(_e)) {
Ge(K, ee, _e.error);
return
}
}
if (cs(_e))
throw Un(400, {
type: "defer-action"
});
let ct = C.navigation.location || C.location
, Mt = Ys(e.history, ct, je.signal)
, ba = a || o
, ni = C.navigation.state !== "idle" ? vo(ba, C.navigation.location, l) : C.matches;
Fe(ni, "Didn't find any matches after fetcher action");
let Gs = ++z;
te.set(K, Gs);
let Ks = Da(Pe, _e.data);
C.fetchers.set(K, Ks);
let[qs,vr] = Q0(e.history, C, ni, Pe, ct, !1, c.unstable_skipActionErrorRevalidation, T, _, O, j, X, ue, ba, l, [le.route.id, _e]);
vr.filter(Wt=>Wt.key !== K).forEach(Wt=>{
let Sa = Wt.key
, My = C.fetchers.get(Sa)
, uR = Da(void 0, My ? My.data : void 0);
C.fetchers.set(Sa, uR),
R.has(Sa) && ke(Sa),
Wt.controller && R.set(Sa, Wt.controller)
}
),
L({
fetchers: new Map(C.fetchers)
});
let Mu = ()=>vr.forEach(Wt=>ke(Wt.key));
je.signal.addEventListener("abort", Mu);
let {loaderResults: ju, fetcherResults: $u} = await Ee(C.matches, ni, qs, vr, Mt);
if (je.signal.aborted)
return;
je.signal.removeEventListener("abort", Mu),
te.delete(K),
R.delete(K),
vr.forEach(Wt=>R.delete(Wt.key));
let Ue = i1([...ju, ...$u]);
if (Ue) {
if (Ue.idx >= qs.length) {
let Wt = vr[Ue.idx - qs.length].key;
ue.add(Wt)
}
return Me(Mt, Ue.result)
}
let {loaderData: un, errors: In} = e1(C, C.matches, qs, ju, void 0, vr, $u, N);
if (C.fetchers.has(K)) {
let Wt = ai(_e.data);
C.fetchers.set(K, Wt)
}
it(Gs),
C.navigation.state === "loading" && Gs > Y ? (Fe(P, "Expected pending action"),
B && B.abort(),
M(C.navigation.location, {
matches: ni,
loaderData: un,
errors: In,
fetchers: new Map(C.fetchers)
})) : (L({
errors: In,
loaderData: t1(C.loaderData, un, ni, In),
fetchers: new Map(C.fetchers)
}),
T = !1)
}
async function be(K, ee, ie, le, ge, Le, Pe) {
let ve = C.fetchers.get(K);
Se(K, Da(Pe, ve ? ve.data : void 0), {
flushSync: Le
});
let je = new AbortController
, De = Ys(e.history, ie, je.signal);
R.set(K, je);
let Bt = z
, _e = (await fe("loader", De, [le], ge))[0];
if (cs(_e) && (_e = await DE(_e, De.signal, !0) || _e),
R.get(K) === je && R.delete(K),
!De.signal.aborted) {
if (j.has(K)) {
Se(K, ai(void 0));
return
}
if (ds(_e))
if (Y > Bt) {
Se(K, ai(void 0));
return
} else {
ue.add(K),
await Me(De, _e);
return
}
if (Gn(_e)) {
Ge(K, ee, _e.error);
return
}
Fe(!cs(_e), "Unhandled fetcher deferred data"),
Se(K, ai(_e.data))
}
}
async function Me(K, ee, ie) {
let {submission: le, fetcherSubmission: ge, replace: Le} = ie === void 0 ? {} : ie;
ee.response.headers.has("X-Remix-Revalidate") && (T = !0);
let Pe = ee.response.headers.get("Location");
Fe(Pe, "Expected a Location header on the redirect Response"),
Pe = J0(Pe, new URL(K.url), l);
let ve = Nl(C.location, Pe, {
_isRedirect: !0
});
if (n) {
let ct = !1;
if (ee.response.headers.has("X-Remix-Reload-Document"))
ct = !0;
else if (gv.test(Pe)) {
const Mt = e.history.createURL(Pe);
ct = Mt.origin !== t.location.origin || pa(Mt.pathname, l) == null
}
if (ct) {
Le ? t.location.replace(Pe) : t.location.assign(Pe);
return
}
}
B = null;
let je = Le === !0 ? Ot.Replace : Ot.Push
, {formMethod: De, formAction: Bt, formEncType: Ht} = C.navigation;
!le && !ge && De && Bt && Ht && (le = o1(C.navigation));
let _e = le || ge;
if (v_.has(ee.response.status) && _e && sr(_e.formMethod))
await se(je, ve, {
submission: mt({}, _e, {
formAction: Pe
}),
preventScrollReset: A
});
else {
let ct = xh(ve, le);
await se(je, ve, {
overrideNavigation: ct,
fetcherSubmission: ge,
preventScrollReset: A
})
}
}
async function fe(K, ee, ie, le) {
try {
let ge = await P_(u, K, ee, ie, le, s, i);
return await Promise.all(ge.map((Le,Pe)=>{
if (A_(Le)) {
let ve = Le.result;
return {
type: ft.redirect,
response: O_(ve, ee, ie[Pe].route.id, le, l, c.v7_relativeSplatPath)
}
}
return R_(Le)
}
))
} catch (ge) {
return ie.map(()=>({
type: ft.error,
error: ge
}))
}
}
async function Ee(K, ee, ie, le, ge) {
let[Le,...Pe] = await Promise.all([ie.length ? fe("loader", ge, ie, ee) : [], ...le.map(ve=>{
if (ve.matches && ve.match && ve.controller) {
let je = Ys(e.history, ve.path, ve.controller.signal);
return fe("loader", je, [ve.match], ve.matches).then(De=>De[0])
} else
return Promise.resolve({
type: ft.error,
error: Un(404, {
pathname: ve.path
})
})
}
)]);
return await Promise.all([s1(K, ie, Le, Le.map(()=>ge.signal), !1, C.loaderData), s1(K, le.map(ve=>ve.match), Pe, le.map(ve=>ve.controller ? ve.controller.signal : null), !0)]),
{
loaderResults: Le,
fetcherResults: Pe
}
}
function we() {
T = !0,
_.push(...We()),
X.forEach((K,ee)=>{
R.has(ee) && (O.push(ee),
ke(ee))
}
)
}
function Se(K, ee, ie) {
ie === void 0 && (ie = {}),
C.fetchers.set(K, ee),
L({
fetchers: new Map(C.fetchers)
}, {
flushSync: (ie && ie.flushSync) === !0
})
}
function Ge(K, ee, ie, le) {
le === void 0 && (le = {});
let ge = al(C.matches, ee);
Te(K),
L({
errors: {
[ge.route.id]: ie
},
fetchers: new Map(C.fetchers)
}, {
flushSync: (le && le.flushSync) === !0
})
}
function Ve(K) {
return c.v7_fetcherPersist && (S.set(K, (S.get(K) || 0) + 1),
j.has(K) && j.delete(K)),
C.fetchers.get(K) || y_
}
function Te(K) {
let ee = C.fetchers.get(K);
R.has(K) && !(ee && ee.state === "loading" && te.has(K)) && ke(K),
X.delete(K),
te.delete(K),
ue.delete(K),
j.delete(K),
C.fetchers.delete(K)
}
function Ke(K) {
if (c.v7_fetcherPersist) {
let ee = (S.get(K) || 0) - 1;
ee <= 0 ? (S.delete(K),
j.add(K)) : S.set(K, ee)
} else
Te(K);
L({
fetchers: new Map(C.fetchers)
})
}
function ke(K) {
let ee = R.get(K);
Fe(ee, "Expected fetch controller: " + K),
ee.abort(),
R.delete(K)
}
function Qe(K) {
for (let ee of K) {
let ie = Ve(ee)
, le = ai(ie.data);
C.fetchers.set(ee, le)
}
}
function nt() {
let K = []
, ee = !1;
for (let ie of ue) {
let le = C.fetchers.get(ie);
Fe(le, "Expected fetcher: " + ie),
le.state === "loading" && (ue.delete(ie),
K.push(ie),
ee = !0)
}
return Qe(K),
ee
}
function it(K) {
let ee = [];
for (let[ie,le] of te)
if (le < K) {
let ge = C.fetchers.get(ie);
Fe(ge, "Expected fetcher: " + ie),
ge.state === "loading" && (ke(ie),
te.delete(ie),
ee.push(ie))
}
return Qe(ee),
ee.length > 0
}
function me(K, ee) {
let ie = C.blockers.get(K) || Aa;
return I.get(K) !== ee && I.set(K, ee),
ie
}
function Ce(K) {
C.blockers.delete(K),
I.delete(K)
}
function Be(K, ee) {
let ie = C.blockers.get(K) || Aa;
Fe(ie.state === "unblocked" && ee.state === "blocked" || ie.state === "blocked" && ee.state === "blocked" || ie.state === "blocked" && ee.state === "proceeding" || ie.state === "blocked" && ee.state === "unblocked" || ie.state === "proceeding" && ee.state === "unblocked", "Invalid blocker state transition: " + ie.state + " -> " + ee.state);
let le = new Map(C.blockers);
le.set(K, ee),
L({
blockers: le
})
}
function Re(K) {
let {currentLocation: ee, nextLocation: ie, historyAction: le} = K;
if (I.size === 0)
return;
I.size > 1 && ta(!1, "A router only supports one blocker at a time");
let ge = Array.from(I.entries())
, [Le,Pe] = ge[ge.length - 1]
, ve = C.blockers.get(Le);
if (!(ve && ve.state === "proceeding") && Pe({
currentLocation: ee,
nextLocation: ie,
historyAction: le
}))
return Le
}
function We(K) {
let ee = [];
return N.forEach((ie,le)=>{
(!K || K(le)) && (ie.cancel(),
ee.push(le),
N.delete(le))
}
),
ee
}
function et(K, ee, ie) {
if (h = K,
p = ee,
m = ie || null,
!b && C.navigation === wh) {
b = !0;
let le = _t(C.location, C.matches);
le != null && L({
restoreScrollPosition: le
})
}
return ()=>{
h = null,
p = null,
m = null
}
}
function st(K, ee) {
return m && m(K, ee.map(le=>qk(le, C.loaderData))) || K.key
}
function Jt(K, ee) {
if (h && p) {
let ie = st(K, ee);
h[ie] = p()
}
}
function _t(K, ee) {
if (h) {
let ie = st(K, ee)
, le = h[ie];
if (typeof le == "number")
return le
}
return null
}
function vn(K) {
s = {},
a = im(K, i, void 0, s)
}
return V = {
get basename() {
return l
},
get future() {
return c
},
get state() {
return C
},
get routes() {
return o
},
get window() {
return t
},
initialize: H,
subscribe: $,
enableScrollRestoration: et,
navigate: W,
fetch: de,
revalidate: J,
createHref: K=>e.history.createHref(K),
encodeLocation: K=>e.history.encodeLocation(K),
getFetcher: Ve,
deleteFetcher: Ke,
dispose: q,
getBlocker: me,
deleteBlocker: Ce,
_internalFetchControllers: R,
_internalActiveDeferreds: N,
_internalSetRoutes: vn
},
V
}
function b_(e) {
return e != null && ("formData"in e && e.formData != null || "body"in e && e.body !== void 0)
}
function sm(e, t, n, r, i, s, o, a) {
let l, u;
if (o) {
l = [];
for (let d of t)
if (l.push(d),
d.route.id === o) {
u = d;
break
}
} else
l = t,
u = t[t.length - 1];
let c = hv(i || ".", fv(l, s), pa(e.pathname, n) || e.pathname, a === "path");
return i == null && (c.search = e.search,
c.hash = e.hash),
(i == null || i === "" || i === ".") && u && u.route.index && !vv(c.search) && (c.search = c.search ? c.search.replace(/^\?/, "?index&") : "?index"),
r && n !== "/" && (c.pathname = c.pathname === "/" ? n : Br([n, c.pathname])),
As(c)
}
function q0(e, t, n, r) {
if (!r || !b_(r))
return {
path: n
};
if (r.formMethod && !L_(r.formMethod))
return {
path: n,
error: Un(405, {
method: r.formMethod
})
};
let i = ()=>({
path: n,
error: Un(400, {
type: "invalid-body"
})
})
, s = r.formMethod || "get"
, o = e ? s.toUpperCase() : s.toLowerCase()
, a = _E(n);
if (r.body !== void 0) {
if (r.formEncType === "text/plain") {
if (!sr(o))
return i();
let f = typeof r.body == "string" ? r.body : r.body instanceof FormData || r.body instanceof URLSearchParams ? Array.from(r.body.entries()).reduce((h,m)=>{
let[p,b] = m;
return "" + h + p + "=" + b + `
`
}
, "") : String(r.body);
return {
path: n,
submission: {
formMethod: o,
formAction: a,
formEncType: r.formEncType,
formData: void 0,
json: void 0,
text: f
}
}
} else if (r.formEncType === "application/json") {
if (!sr(o))
return i();
try {
let f = typeof r.body == "string" ? JSON.parse(r.body) : r.body;
return {
path: n,
submission: {
formMethod: o,
formAction: a,
formEncType: r.formEncType,
formData: void 0,
json: f,
text: void 0
}
}
} catch {
return i()
}
}
}
Fe(typeof FormData == "function", "FormData is not available in this environment");
let l, u;
if (r.formData)
l = om(r.formData),
u = r.formData;
else if (r.body instanceof FormData)
l = om(r.body),
u = r.body;
else if (r.body instanceof URLSearchParams)
l = r.body,
u = Z0(l);
else if (r.body == null)
l = new URLSearchParams,
u = new FormData;
else
try {
l = new URLSearchParams(r.body),
u = Z0(l)
} catch {
return i()
}
let c = {
formMethod: o,
formAction: a,
formEncType: r && r.formEncType || "application/x-www-form-urlencoded",
formData: u,
json: void 0,
text: void 0
};
if (sr(c.formMethod))
return {
path: n,
submission: c
};
let d = Ki(n);
return t && d.search && vv(d.search) && l.append("index", ""),
d.search = "?" + l,
{
path: As(d),
submission: c
}
}
function S_(e, t) {
let n = e;
if (t) {
let r = e.findIndex(i=>i.route.id === t);
r >= 0 && (n = e.slice(0, r))
}
return n
}
function Q0(e, t, n, r, i, s, o, a, l, u, c, d, f, h, m, p) {
let b = p ? Gn(p[1]) ? p[1].error : p[1].data : void 0
, v = e.createURL(t.location)
, g = e.createURL(i)
, w = p && Gn(p[1]) ? p[0] : void 0
, E = w ? S_(n, w) : n
, D = p ? p[1].statusCode : void 0
, V = o && D && D >= 400
, C = E.filter((A,B)=>{
let {route: Q} = A;
if (Q.lazy)
return !0;
if (Q.loader == null)
return !1;
if (s)
return typeof Q.loader != "function" || Q.loader.hydrate ? !0 : t.loaderData[Q.id] === void 0 && (!t.errors || t.errors[Q.id] === void 0);
if (E_(t.loaderData, t.matches[B], A) || l.some(k=>k === A.route.id))
return !0;
let Z = t.matches[B]
, F = A;
return Y0(A, mt({
currentUrl: v,
currentParams: Z.params,
nextUrl: g,
nextParams: F.params
}, r, {
actionResult: b,
unstable_actionStatus: D,
defaultShouldRevalidate: V ? !1 : a || v.pathname + v.search === g.pathname + g.search || v.search !== g.search || kE(Z, F)
}))
}
)
, P = [];
return d.forEach((A,B)=>{
if (s || !n.some(T=>T.route.id === A.routeId) || c.has(B))
return;
let Q = vo(h, A.path, m);
if (!Q) {
P.push({
key: B,
routeId: A.routeId,
path: A.path,
matches: null,
match: null,
controller: null
});
return
}
let Z = t.fetchers.get(B)
, F = am(Q, A.path)
, k = !1;
f.has(B) ? k = !1 : u.includes(B) ? k = !0 : Z && Z.state !== "idle" && Z.data === void 0 ? k = a : k = Y0(F, mt({
currentUrl: v,
currentParams: t.matches[t.matches.length - 1].params,
nextUrl: g,
nextParams: n[n.length - 1].params
}, r, {
actionResult: b,
unstable_actionStatus: D,
defaultShouldRevalidate: V ? !1 : a
})),
k && P.push({
key: B,
routeId: A.routeId,
path: A.path,
matches: Q,
match: F,
controller: new AbortController
})
}
),
[C, P]
}
function E_(e, t, n) {
let r = !t || n.route.id !== t.route.id
, i = e[n.route.id] === void 0;
return r || i
}
function kE(e, t) {
let n = e.route.path;
return e.pathname !== t.pathname || n != null && n.endsWith("*") && e.params["*"] !== t.params["*"]
}
function Y0(e, t) {
if (e.route.shouldRevalidate) {
let n = e.route.shouldRevalidate(t);
if (typeof n == "boolean")
return n
}
return t.defaultShouldRevalidate
}
async function X0(e, t, n) {
if (!e.lazy)
return;
let r = await e.lazy();
if (!e.lazy)
return;
let i = n[e.id];
Fe(i, "No route found in manifest");
let s = {};
for (let o in r) {
let l = i[o] !== void 0 && o !== "hasErrorBoundary";
ta(!l, 'Route "' + i.id + '" has a static property "' + o + '" defined but its lazy function is also returning a value for this property. ' + ('The lazy route property "' + o + '" will be ignored.')),
!l && !Gk.has(o) && (s[o] = r[o])
}
Object.assign(i, s),
Object.assign(i, mt({}, t(i), {
lazy: void 0
}))
}
function C_(e) {
return Promise.all(e.matches.map(t=>t.resolve()))
}
async function P_(e, t, n, r, i, s, o, a) {
let l = r.reduce((d,f)=>d.add(f.route.id), new Set)
, u = new Set
, c = await e({
matches: i.map(d=>{
let f = l.has(d.route.id);
return mt({}, d, {
shouldLoad: f,
resolve: m=>(u.add(d.route.id),
f ? T_(t, n, d, s, o, m, a) : Promise.resolve({
type: ft.data,
result: void 0
}))
})
}
),
request: n,
params: i[0].params,
context: a
});
return i.forEach(d=>Fe(u.has(d.route.id), '`match.resolve()` was not called for route id "' + d.route.id + '". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),
c.filter((d,f)=>l.has(i[f].route.id))
}
async function T_(e, t, n, r, i, s, o) {
let a, l, u = c=>{
let d, f = new Promise((p,b)=>d = b);
l = ()=>d(),
t.signal.addEventListener("abort", l);
let h = p=>typeof c != "function" ? Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ('"' + e + '" [routeId: ' + n.route.id + "]"))) : c({
request: t,
params: n.params,
context: o
}, ...p !== void 0 ? [p] : []), m;
return s ? m = s(p=>h(p)) : m = (async()=>{
try {
return {
type: "data",
result: await h()
}
} catch (p) {
return {
type: "error",
result: p
}
}
}
)(),
Promise.race([m, f])
}
;
try {
let c = n.route[e];
if (n.route.lazy)
if (c) {
let d, [f] = await Promise.all([u(c).catch(h=>{
d = h
}
), X0(n.route, i, r)]);
if (d !== void 0)
throw d;
a = f
} else if (await X0(n.route, i, r),
c = n.route[e],
c)
a = await u(c);
else if (e === "action") {
let d = new URL(t.url)
, f = d.pathname + d.search;
throw Un(405, {
method: t.method,
pathname: f,
routeId: n.route.id
})
} else
return {
type: ft.data,
result: void 0
};
else if (c)
a = await u(c);
else {
let d = new URL(t.url)
, f = d.pathname + d.search;
throw Un(404, {
pathname: f
})
}
Fe(a.result !== void 0, "You defined " + (e === "action" ? "an action" : "a loader") + " for route " + ('"' + n.route.id + "\" but didn't return anything from your `" + e + "` ") + "function. Please return a value or `null`.")
} catch (c) {
return {
type: ft.error,
result: c
}
} finally {
l && t.signal.removeEventListener("abort", l)
}
return a
}
async function R_(e) {
let {result: t, type: n, status: r} = e;
if (AE(t)) {
let o;
try {
let a = t.headers.get("Content-Type");
a && /\bapplication\/json\b/.test(a) ? t.body == null ? o = null : o = await t.json() : o = await t.text()
} catch (a) {
return {
type: ft.error,
error: a
}
}
return n === ft.error ? {
type: ft.error,
error: new pv(t.status,t.statusText,o),
statusCode: t.status,
headers: t.headers
} : {
type: ft.data,
data: o,
statusCode: t.status,
headers: t.headers
}
}
if (n === ft.error)
return {
type: ft.error,
error: t,
statusCode: mv(t) ? t.status : r
};
if (D_(t)) {
var i, s;
return {
type: ft.deferred,
deferredData: t,
statusCode: (i = t.init) == null ? void 0 : i.status,
headers: ((s = t.init) == null ? void 0 : s.headers) && new Headers(t.init.headers)
}
}
return {
type: ft.data,
data: t,
statusCode: r
}
}
function O_(e, t, n, r, i, s) {
let o = e.headers.get("Location");
if (Fe(o, "Redirects returned/thrown from loaders/actions must have a Location header"),
!gv.test(o)) {
let a = r.slice(0, r.findIndex(l=>l.route.id === n) + 1);
o = sm(new URL(t.url), a, i, !0, o, s),
e.headers.set("Location", o)
}
return e
}
function J0(e, t, n) {
if (gv.test(e)) {
let r = e
, i = r.startsWith("//") ? new URL(t.protocol + r) : new URL(r)
, s = pa(i.pathname, n) != null;
if (i.origin === t.origin && s)
return i.pathname + i.search + i.hash
}
return e
}
function Ys(e, t, n, r) {
let i = e.createURL(_E(t)).toString()
, s = {
signal: n
};
if (r && sr(r.formMethod)) {
let {formMethod: o, formEncType: a} = r;
s.method = o.toUpperCase(),
a === "application/json" ? (s.headers = new Headers({
"Content-Type": a
}),
s.body = JSON.stringify(r.json)) : a === "text/plain" ? s.body = r.text : a === "application/x-www-form-urlencoded" && r.formData ? s.body = om(r.formData) : s.body = r.formData
}
return new Request(i,s)
}
function om(e) {
let t = new URLSearchParams;
for (let[n,r] of e.entries())
t.append(n, typeof r == "string" ? r : r.name);
return t
}
function Z0(e) {
let t = new FormData;
for (let[n,r] of e.entries())
t.append(n, r);
return t
}
function k_(e, t, n, r, i, s) {
let o = {}, a = null, l, u = !1, c = {}, d = r && Gn(r[1]) ? r[1].error : void 0;
return n.forEach((f,h)=>{
let m = t[h].route.id;
if (Fe(!ds(f), "Cannot handle redirect results in processLoaderData"),
Gn(f)) {
let p = f.error;
d !== void 0 && (p = d,
d = void 0),
a = a || {};
{
let b = al(e, m);
a[b.route.id] == null && (a[b.route.id] = p)
}
o[m] = void 0,
u || (u = !0,
l = mv(f.error) ? f.error.status : 500),
f.headers && (c[m] = f.headers)
} else
cs(f) ? (i.set(m, f.deferredData),
o[m] = f.deferredData.data,
f.statusCode != null && f.statusCode !== 200 && !u && (l = f.statusCode),
f.headers && (c[m] = f.headers)) : (o[m] = f.data,
f.statusCode && f.statusCode !== 200 && !u && (l = f.statusCode),
f.headers && (c[m] = f.headers))
}
),
d !== void 0 && r && (a = {
[r[0]]: d
},
o[r[0]] = void 0),
{
loaderData: o,
errors: a,
statusCode: l || 200,
loaderHeaders: c
}
}
function e1(e, t, n, r, i, s, o, a) {
let {loaderData: l, errors: u} = k_(t, n, r, i, a);
for (let c = 0; c < s.length; c++) {
let {key: d, match: f, controller: h} = s[c];
Fe(o !== void 0 && o[c] !== void 0, "Did not find corresponding fetcher result");
let m = o[c];
if (!(h && h.signal.aborted))
if (Gn(m)) {
let p = al(e.matches, f == null ? void 0 : f.route.id);
u && u[p.route.id] || (u = mt({}, u, {
[p.route.id]: m.error
})),
e.fetchers.delete(d)
} else if (ds(m))
Fe(!1, "Unhandled fetcher revalidation redirect");
else if (cs(m))
Fe(!1, "Unhandled fetcher deferred data");
else {
let p = ai(m.data);
e.fetchers.set(d, p)
}
}
return {
loaderData: l,
errors: u
}
}
function t1(e, t, n, r) {
let i = mt({}, t);
for (let s of n) {
let o = s.route.id;
if (t.hasOwnProperty(o) ? t[o] !== void 0 && (i[o] = t[o]) : e[o] !== void 0 && s.route.loader && (i[o] = e[o]),
r && r.hasOwnProperty(o))
break
}
return i
}
function n1(e) {
return e ? Gn(e[1]) ? {
actionData: {}
} : {
actionData: {
[e[0]]: e[1].data
}
} : {}
}
function al(e, t) {
return (t ? e.slice(0, e.findIndex(r=>r.route.id === t) + 1) : [...e]).reverse().find(r=>r.route.hasErrorBoundary === !0) || e[0]
}
function r1(e) {
let t = e.length === 1 ? e[0] : e.find(n=>n.index || !n.path || n.path === "/") || {
id: "__shim-error-route__"
};
return {
matches: [{
params: {},
pathname: "",
pathnameBase: "",
route: t
}],
route: t
}
}
function Un(e, t) {
let {pathname: n, routeId: r, method: i, type: s} = t === void 0 ? {} : t
, o = "Unknown Server Error"
, a = "Unknown @remix-run/router error";
return e === 400 ? (o = "Bad Request",
i && n && r ? a = "You made a " + i + ' request to "' + n + '" but ' + ('did not provide a `loader` for route "' + r + '", ') + "so there is no way to handle the request." : s === "defer-action" ? a = "defer() is not supported in actions" : s === "invalid-body" && (a = "Unable to encode submission body")) : e === 403 ? (o = "Forbidden",
a = 'Route "' + r + '" does not match URL "' + n + '"') : e === 404 ? (o = "Not Found",
a = 'No route matches URL "' + n + '"') : e === 405 && (o = "Method Not Allowed",
i && n && r ? a = "You made a " + i.toUpperCase() + ' request to "' + n + '" but ' + ('did not provide an `action` for route "' + r + '", ') + "so there is no way to handle the request." : i && (a = 'Invalid request method "' + i.toUpperCase() + '"')),
new pv(e || 500,o,new Error(a),!0)
}
function i1(e) {
for (let t = e.length - 1; t >= 0; t--) {
let n = e[t];
if (ds(n))
return {
result: n,
idx: t
}
}
}
function _E(e) {
let t = typeof e == "string" ? Ki(e) : e;
return As(mt({}, t, {
hash: ""
}))
}
function __(e, t) {
return e.pathname !== t.pathname || e.search !== t.search ? !1 : e.hash === "" ? t.hash !== "" : e.hash === t.hash ? !0 : t.hash !== ""
}
function A_(e) {
return AE(e.result) && g_.has(e.result.status)
}
function cs(e) {
return e.type === ft.deferred
}
function Gn(e) {
return e.type === ft.error
}
function ds(e) {
return (e && e.type) === ft.redirect
}
function D_(e) {
let t = e;
return t && typeof t == "object" && typeof t.data == "object" && typeof t.subscribe == "function" && typeof t.cancel == "function" && typeof t.resolveData == "function"
}
function AE(e) {
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.headers == "object" && typeof e.body < "u"
}
function L_(e) {
return m_.has(e.toLowerCase())
}
function sr(e) {
return h_.has(e.toLowerCase())
}
async function s1(e, t, n, r, i, s) {
for (let o = 0; o < n.length; o++) {
let a = n[o]
, l = t[o];
if (!l)
continue;
let u = e.find(d=>d.route.id === l.route.id)
, c = u != null && !kE(u, l) && (s && s[l.route.id]) !== void 0;
if (cs(a) && (i || c)) {
let d = r[o];
Fe(d, "Expected an AbortSignal for revalidating fetcher deferred result"),
await DE(a, d, i).then(f=>{
f && (n[o] = f || n[o])
}
)
}
}
}
async function DE(e, t, n) {
if (n === void 0 && (n = !1),
!await e.deferredData.resolveData(t)) {
if (n)
try {
return {
type: ft.data,
data: e.deferredData.unwrappedData
}
} catch (i) {
return {
type: ft.error,
error: i
}
}
return {
type: ft.data,
data: e.deferredData.data
}
}
}
function vv(e) {
return new URLSearchParams(e).getAll("index").some(t=>t === "")
}
function am(e, t) {
let n = typeof t == "string" ? Ki(t).search : t.search;
if (e[e.length - 1].route.index && vv(n || ""))
return e[e.length - 1];
let r = TE(e);
return r[r.length - 1]
}
function o1(e) {
let {formMethod: t, formAction: n, formEncType: r, text: i, formData: s, json: o} = e;
if (!(!t || !n || !r)) {
if (i != null)
return {
formMethod: t,
formAction: n,
formEncType: r,
formData: void 0,
json: void 0,
text: i
};
if (s != null)
return {
formMethod: t,
formAction: n,
formEncType: r,
formData: s,
json: void 0,
text: void 0
};
if (o !== void 0)
return {
formMethod: t,
formAction: n,
formEncType: r,
formData: void 0,
json: o,
text: void 0
}
}
}
function xh(e, t) {
return t ? {
state: "loading",
location: e,
formMethod: t.formMethod,
formAction: t.formAction,
formEncType: t.formEncType,
formData: t.formData,
json: t.json,
text: t.text
} : {
state: "loading",
location: e,
formMethod: void 0,
formAction: void 0,
formEncType: void 0,
formData: void 0,
json: void 0,
text: void 0
}
}
function N_(e, t) {
return {
state: "submitting",
location: e,
formMethod: t.formMethod,
formAction: t.formAction,
formEncType: t.formEncType,
formData: t.formData,
json: t.json,
text: t.text
}
}
function Da(e, t) {
return e ? {
state: "loading",
formMethod: e.formMethod,
formAction: e.formAction,
formEncType: e.formEncType,
formData: e.formData,
json: e.json,
text: e.text,
data: t
} : {
state: "loading",
formMethod: void 0,
formAction: void 0,
formEncType: void 0,
formData: void 0,
json: void 0,
text: void 0,
data: t
}
}
function M_(e, t) {
return {
state: "submitting",
formMethod: e.formMethod,
formAction: e.formAction,
formEncType: e.formEncType,
formData: e.formData,
json: e.json,
text: e.text,
data: t ? t.data : void 0
}
}
function ai(e) {
return {
state: "idle",
formMethod: void 0,
formAction: void 0,
formEncType: void 0,
formData: void 0,
json: void 0,
text: void 0,
data: e
}
}
function j_(e, t) {
try {
let n = e.sessionStorage.getItem(OE);
if (n) {
let r = JSON.parse(n);
for (let[i,s] of Object.entries(r || {}))
s && Array.isArray(s) && t.set(i, new Set(s || []))
}
} catch {}
}
function $_(e, t) {
if (t.size > 0) {
let n = {};
for (let[r,i] of t)
n[r] = [...i];
try {
e.sessionStorage.setItem(OE, JSON.stringify(n))
} catch (r) {
ta(!1, "Failed to save applied view transitions in sessionStorage (" + r + ").")
}
}
}
/**
* React Router v6.23.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
function vd() {
return vd = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
vd.apply(this, arguments)
}
const pf = y.createContext(null)
, LE = y.createContext(null)
, zs = y.createContext(null)
, yv = y.createContext(null)
, qi = y.createContext({
outlet: null,
matches: [],
isDataRoute: !1
})
, NE = y.createContext(null);
function I_(e, t) {
let {relative: n} = t === void 0 ? {} : t;
bu() || Fe(!1);
let {basename: r, navigator: i} = y.useContext(zs)
, {hash: s, pathname: o, search: a} = jE(e, {
relative: n
})
, l = o;
return r !== "/" && (l = o === "/" ? r : Br([r, o])),
i.createHref({
pathname: l,
search: a,
hash: s
})
}
function bu() {
return y.useContext(yv) != null
}
function Qi() {
return bu() || Fe(!1),
y.useContext(yv).location
}
function ME(e) {
y.useContext(zs).static || y.useLayoutEffect(e)
}
function wv() {
let {isDataRoute: e} = y.useContext(qi);
return e ? X_() : F_()
}
function F_() {
bu() || Fe(!1);
let e = y.useContext(pf)
, {basename: t, future: n, navigator: r} = y.useContext(zs)
, {matches: i} = y.useContext(qi)
, {pathname: s} = Qi()
, o = JSON.stringify(fv(i, n.v7_relativeSplatPath))
, a = y.useRef(!1);
return ME(()=>{
a.current = !0
}
),
y.useCallback(function(u, c) {
if (c === void 0 && (c = {}),
!a.current)
return;
if (typeof u == "number") {
r.go(u);
return
}
let d = hv(u, JSON.parse(o), s, c.relative === "path");
e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : Br([t, d.pathname])),
(c.replace ? r.replace : r.push)(d, c.state, c)
}, [t, r, o, s, e])
}
const V_ = y.createContext(null);
function z_(e) {
let t = y.useContext(qi).outlet;
return t && y.createElement(V_.Provider, {
value: e
}, t)
}
function jE(e, t) {
let {relative: n} = t === void 0 ? {} : t
, {future: r} = y.useContext(zs)
, {matches: i} = y.useContext(qi)
, {pathname: s} = Qi()
, o = JSON.stringify(fv(i, r.v7_relativeSplatPath));
return y.useMemo(()=>hv(e, JSON.parse(o), s, n === "path"), [e, o, s, n])
}
function U_(e, t, n, r) {
bu() || Fe(!1);
let {navigator: i} = y.useContext(zs)
, {matches: s} = y.useContext(qi)
, o = s[s.length - 1]
, a = o ? o.params : {};
o && o.pathname;
let l = o ? o.pathnameBase : "/";
o && o.route;
let u = Qi(), c;
c = u;
let d = c.pathname || "/"
, f = d;
if (l !== "/") {
let p = l.replace(/^\//, "").split("/");
f = "/" + d.replace(/^\//, "").split("/").slice(p.length).join("/")
}
let h = vo(e, {
pathname: f
});
return K_(h && h.map(p=>Object.assign({}, p, {
params: Object.assign({}, a, p.params),
pathname: Br([l, i.encodeLocation ? i.encodeLocation(p.pathname).pathname : p.pathname]),
pathnameBase: p.pathnameBase === "/" ? l : Br([l, i.encodeLocation ? i.encodeLocation(p.pathnameBase).pathname : p.pathnameBase])
})), s, n, r)
}
function B_() {
let e = FE()
, t = mv(e) ? e.status + " " + e.statusText : e instanceof Error ? e.message : JSON.stringify(e)
, n = e instanceof Error ? e.stack : null
, i = {
padding: "0.5rem",
backgroundColor: "rgba(200,200,200, 0.5)"
};
return y.createElement(y.Fragment, null, y.createElement("h2", null, "Unexpected Application Error!"), y.createElement("h3", {
style: {
fontStyle: "italic"
}
}, t), n ? y.createElement("pre", {
style: i
}, n) : null, null)
}
const H_ = y.createElement(B_, null);
class W_ extends y.Component {
constructor(t) {
super(t),
this.state = {
location: t.location,
revalidation: t.revalidation,
error: t.error
}
}
static getDerivedStateFromError(t) {
return {
error: t
}
}
static getDerivedStateFromProps(t, n) {
return n.location !== t.location || n.revalidation !== "idle" && t.revalidation === "idle" ? {
error: t.error,
location: t.location,
revalidation: t.revalidation
} : {
error: t.error !== void 0 ? t.error : n.error,
location: n.location,
revalidation: t.revalidation || n.revalidation
}
}
componentDidCatch(t, n) {
console.error("React Router caught the following error during render", t, n)
}
render() {
return this.state.error !== void 0 ? y.createElement(qi.Provider, {
value: this.props.routeContext
}, y.createElement(NE.Provider, {
value: this.state.error,
children: this.props.component
})) : this.props.children
}
}
function G_(e) {
let {routeContext: t, match: n, children: r} = e
, i = y.useContext(pf);
return i && i.static && i.staticContext && (n.route.errorElement || n.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = n.route.id),
y.createElement(qi.Provider, {
value: t
}, r)
}
function K_(e, t, n, r) {
var i;
if (t === void 0 && (t = []),
n === void 0 && (n = null),
r === void 0 && (r = null),
e == null) {
var s;
if ((s = n) != null && s.errors)
e = n.matches;
else
return null
}
let o = e
, a = (i = n) == null ? void 0 : i.errors;
if (a != null) {
let c = o.findIndex(d=>d.route.id && (a == null ? void 0 : a[d.route.id]) !== void 0);
c >= 0 || Fe(!1),
o = o.slice(0, Math.min(o.length, c + 1))
}
let l = !1
, u = -1;
if (n && r && r.v7_partialHydration)
for (let c = 0; c < o.length; c++) {
let d = o[c];
if ((d.route.HydrateFallback || d.route.hydrateFallbackElement) && (u = c),
d.route.id) {
let {loaderData: f, errors: h} = n
, m = d.route.loader && f[d.route.id] === void 0 && (!h || h[d.route.id] === void 0);
if (d.route.lazy || m) {
l = !0,
u >= 0 ? o = o.slice(0, u + 1) : o = [o[0]];
break
}
}
}
return o.reduceRight((c,d,f)=>{
let h, m = !1, p = null, b = null;
n && (h = a && d.route.id ? a[d.route.id] : void 0,
p = d.route.errorElement || H_,
l && (u < 0 && f === 0 ? (m = !0,
b = null) : u === f && (m = !0,
b = d.route.hydrateFallbackElement || null)));
let v = t.concat(o.slice(0, f + 1))
, g = ()=>{
let w;
return h ? w = p : m ? w = b : d.route.Component ? w = y.createElement(d.route.Component, null) : d.route.element ? w = d.route.element : w = c,
y.createElement(G_, {
match: d,
routeContext: {
outlet: c,
matches: v,
isDataRoute: n != null
},
children: w
})
}
;
return n && (d.route.ErrorBoundary || d.route.errorElement || f === 0) ? y.createElement(W_, {
location: n.location,
revalidation: n.revalidation,
component: p,
error: h,
children: g(),
routeContext: {
outlet: null,
matches: v,
isDataRoute: !0
}
}) : g()
}
, null)
}
var $E = function(e) {
return e.UseBlocker = "useBlocker",
e.UseRevalidator = "useRevalidator",
e.UseNavigateStable = "useNavigate",
e
}($E || {})
, yd = function(e) {
return e.UseBlocker = "useBlocker",
e.UseLoaderData = "useLoaderData",
e.UseActionData = "useActionData",
e.UseRouteError = "useRouteError",
e.UseNavigation = "useNavigation",
e.UseRouteLoaderData = "useRouteLoaderData",
e.UseMatches = "useMatches",
e.UseRevalidator = "useRevalidator",
e.UseNavigateStable = "useNavigate",
e.UseRouteId = "useRouteId",
e
}(yd || {});
function q_(e) {
let t = y.useContext(pf);
return t || Fe(!1),
t
}
function Q_(e) {
let t = y.useContext(LE);
return t || Fe(!1),
t
}
function Y_(e) {
let t = y.useContext(qi);
return t || Fe(!1),
t
}
function IE(e) {
let t = Y_()
, n = t.matches[t.matches.length - 1];
return n.route.id || Fe(!1),
n.route.id
}
function FE() {
var e;
let t = y.useContext(NE)
, n = Q_(yd.UseRouteError)
, r = IE(yd.UseRouteError);
return t !== void 0 ? t : (e = n.errors) == null ? void 0 : e[r]
}
function X_() {
let {router: e} = q_($E.UseNavigateStable)
, t = IE(yd.UseNavigateStable)
, n = y.useRef(!1);
return ME(()=>{
n.current = !0
}
),
y.useCallback(function(i, s) {
s === void 0 && (s = {}),
n.current && (typeof i == "number" ? e.navigate(i) : e.navigate(i, vd({
fromRouteId: t
}, s)))
}, [e, t])
}
function J_(e) {
return z_(e.context)
}
function ns(e) {
Fe(!1)
}
function Z_(e) {
let {basename: t="/", children: n=null, location: r, navigationType: i=Ot.Pop, navigator: s, static: o=!1, future: a} = e;
bu() && Fe(!1);
let l = t.replace(/^\/*/, "/")
, u = y.useMemo(()=>({
basename: l,
navigator: s,
static: o,
future: vd({
v7_relativeSplatPath: !1
}, a)
}), [l, a, s, o]);
typeof r == "string" && (r = Ki(r));
let {pathname: c="/", search: d="", hash: f="", state: h=null, key: m="default"} = r
, p = y.useMemo(()=>{
let b = pa(c, l);
return b == null ? null : {
location: {
pathname: b,
search: d,
hash: f,
state: h,
key: m
},
navigationType: i
}
}
, [l, c, d, f, h, m, i]);
return p == null ? null : y.createElement(zs.Provider, {
value: u
}, y.createElement(yv.Provider, {
children: n,
value: p
}))
}
new Promise(()=>{}
);
function lm(e, t) {
t === void 0 && (t = []);
let n = [];
return y.Children.forEach(e, (r,i)=>{
if (!y.isValidElement(r))
return;
let s = [...t, i];
if (r.type === y.Fragment) {
n.push.apply(n, lm(r.props.children, s));
return
}
r.type !== ns && Fe(!1),
!r.props.index || !r.props.children || Fe(!1);
let o = {
id: r.props.id || s.join("-"),
caseSensitive: r.props.caseSensitive,
element: r.props.element,
Component: r.props.Component,
index: r.props.index,
path: r.props.path,
loader: r.props.loader,
action: r.props.action,
errorElement: r.props.errorElement,
ErrorBoundary: r.props.ErrorBoundary,
hasErrorBoundary: r.props.ErrorBoundary != null || r.props.errorElement != null,
shouldRevalidate: r.props.shouldRevalidate,
handle: r.props.handle,
lazy: r.props.lazy
};
r.props.children && (o.children = lm(r.props.children, s)),
n.push(o)
}
),
n
}
function eA(e) {
let t = {
hasErrorBoundary: e.ErrorBoundary != null || e.errorElement != null
};
return e.Component && Object.assign(t, {
element: y.createElement(e.Component),
Component: void 0
}),
e.HydrateFallback && Object.assign(t, {
hydrateFallbackElement: y.createElement(e.HydrateFallback),
HydrateFallback: void 0
}),
e.ErrorBoundary && Object.assign(t, {
errorElement: y.createElement(e.ErrorBoundary),
ErrorBoundary: void 0
}),
t
}
/**
* React Router DOM v6.23.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
function Ml() {
return Ml = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
Ml.apply(this, arguments)
}
function tA(e, t) {
if (e == null)
return {};
var n = {}, r = Object.keys(e), i, s;
for (s = 0; s < r.length; s++)
i = r[s],
!(t.indexOf(i) >= 0) && (n[i] = e[i]);
return n
}
function nA(e) {
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)
}
function rA(e, t) {
return e.button === 0 && (!t || t === "_self") && !nA(e)
}
const iA = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"]
, sA = "6";
try {
window.__reactRouterVersion = sA
} catch {}
function oA(e, t) {
return x_({
basename: void 0,
future: Ml({}, void 0, {
v7_prependBasename: !0
}),
history: Bk({
window: void 0
}),
hydrationData: aA(),
routes: e,
mapRouteProperties: eA,
unstable_dataStrategy: void 0,
window: void 0
}).initialize()
}
function aA() {
var e;
let t = (e = window) == null ? void 0 : e.__staticRouterHydrationData;
return t && t.errors && (t = Ml({}, t, {
errors: lA(t.errors)
})),
t
}
function lA(e) {
if (!e)
return null;
let t = Object.entries(e)
, n = {};
for (let[r,i] of t)
if (i && i.__type === "RouteErrorResponse")
n[r] = new pv(i.status,i.statusText,i.data,i.internal === !0);
else if (i && i.__type === "Error") {
if (i.__subType) {
let s = window[i.__subType];
if (typeof s == "function")
try {
let o = new s(i.message);
o.stack = "",
n[r] = o
} catch {}
}
if (n[r] == null) {
let s = new Error(i.message);
s.stack = "",
n[r] = s
}
} else
n[r] = i;
return n
}
const uA = y.createContext({
isTransitioning: !1
})
, cA = y.createContext(new Map)
, dA = "startTransition"
, a1 = vb[dA]
, fA = "flushSync"
, l1 = Uk[fA];
function hA(e) {
a1 ? a1(e) : e()
}
function La(e) {
l1 ? l1(e) : e()
}
class pA {
constructor() {
this.status = "pending",
this.promise = new Promise((t,n)=>{
this.resolve = r=>{
this.status === "pending" && (this.status = "resolved",
t(r))
}
,
this.reject = r=>{
this.status === "pending" && (this.status = "rejected",
n(r))
}
}
)
}
}
function mA(e) {
let {fallbackElement: t, router: n, future: r} = e
, [i,s] = y.useState(n.state)
, [o,a] = y.useState()
, [l,u] = y.useState({
isTransitioning: !1
})
, [c,d] = y.useState()
, [f,h] = y.useState()
, [m,p] = y.useState()
, b = y.useRef(new Map)
, {v7_startTransition: v} = r || {}
, g = y.useCallback(C=>{
v ? hA(C) : C()
}
, [v])
, w = y.useCallback((C,P)=>{
let {deletedFetchers: A, unstable_flushSync: B, unstable_viewTransitionOpts: Q} = P;
A.forEach(F=>b.current.delete(F)),
C.fetchers.forEach((F,k)=>{
F.data !== void 0 && b.current.set(k, F.data)
}
);
let Z = n.window == null || n.window.document == null || typeof n.window.document.startViewTransition != "function";
if (!Q || Z) {
B ? La(()=>s(C)) : g(()=>s(C));
return
}
if (B) {
La(()=>{
f && (c && c.resolve(),
f.skipTransition()),
u({
isTransitioning: !0,
flushSync: !0,
currentLocation: Q.currentLocation,
nextLocation: Q.nextLocation
})
}
);
let F = n.window.document.startViewTransition(()=>{
La(()=>s(C))
}
);
F.finished.finally(()=>{
La(()=>{
d(void 0),
h(void 0),
a(void 0),
u({
isTransitioning: !1
})
}
)
}
),
La(()=>h(F));
return
}
f ? (c && c.resolve(),
f.skipTransition(),
p({
state: C,
currentLocation: Q.currentLocation,
nextLocation: Q.nextLocation
})) : (a(C),
u({
isTransitioning: !0,
flushSync: !1,
currentLocation: Q.currentLocation,
nextLocation: Q.nextLocation
}))
}
, [n.window, f, c, b, g]);
y.useLayoutEffect(()=>n.subscribe(w), [n, w]),
y.useEffect(()=>{
l.isTransitioning && !l.flushSync && d(new pA)
}
, [l]),
y.useEffect(()=>{
if (c && o && n.window) {
let C = o
, P = c.promise
, A = n.window.document.startViewTransition(async()=>{
g(()=>s(C)),
await P
}
);
A.finished.finally(()=>{
d(void 0),
h(void 0),
a(void 0),
u({
isTransitioning: !1
})
}
),
h(A)
}
}
, [g, o, c, n.window]),
y.useEffect(()=>{
c && o && i.location.key === o.location.key && c.resolve()
}
, [c, f, i.location, o]),
y.useEffect(()=>{
!l.isTransitioning && m && (a(m.state),
u({
isTransitioning: !0,
flushSync: !1,
currentLocation: m.currentLocation,
nextLocation: m.nextLocation
}),
p(void 0))
}
, [l.isTransitioning, m]),
y.useEffect(()=>{}
, []);
let E = y.useMemo(()=>({
createHref: n.createHref,
encodeLocation: n.encodeLocation,
go: C=>n.navigate(C),
push: (C,P,A)=>n.navigate(C, {
state: P,
preventScrollReset: A == null ? void 0 : A.preventScrollReset
}),
replace: (C,P,A)=>n.navigate(C, {
replace: !0,
state: P,
preventScrollReset: A == null ? void 0 : A.preventScrollReset
})
}), [n])
, D = n.basename || "/"
, V = y.useMemo(()=>({
router: n,
navigator: E,
static: !1,
basename: D
}), [n, E, D]);
return y.createElement(y.Fragment, null, y.createElement(pf.Provider, {
value: V
}, y.createElement(LE.Provider, {
value: i
}, y.createElement(cA.Provider, {
value: b.current
}, y.createElement(uA.Provider, {
value: l
}, y.createElement(Z_, {
basename: D,
location: i.location,
navigationType: i.historyAction,
navigator: E,
future: {
v7_relativeSplatPath: n.future.v7_relativeSplatPath
}
}, i.initialized || n.future.v7_partialHydration ? y.createElement(gA, {
routes: n.routes,
future: n.future,
state: i
}) : t))))), null)
}
function gA(e) {
let {routes: t, future: n, state: r} = e;
return U_(t, void 0, r, n)
}
const vA = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u"
, yA = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i
, wA = y.forwardRef(function(t, n) {
let {onClick: r, relative: i, reloadDocument: s, replace: o, state: a, target: l, to: u, preventScrollReset: c, unstable_viewTransition: d} = t, f = tA(t, iA), {basename: h} = y.useContext(zs), m, p = !1;
if (typeof u == "string" && yA.test(u) && (m = u,
vA))
try {
let w = new URL(window.location.href)
, E = u.startsWith("//") ? new URL(w.protocol + u) : new URL(u)
, D = pa(E.pathname, h);
E.origin === w.origin && D != null ? u = D + E.search + E.hash : p = !0
} catch {}
let b = I_(u, {
relative: i
})
, v = xA(u, {
replace: o,
state: a,
target: l,
preventScrollReset: c,
relative: i,
unstable_viewTransition: d
});
function g(w) {
r && r(w),
w.defaultPrevented || v(w)
}
return y.createElement("a", Ml({}, f, {
href: m || b,
onClick: p || s ? r : g,
ref: n,
target: l
}))
});
var u1;
(function(e) {
e.UseScrollRestoration = "useScrollRestoration",
e.UseSubmit = "useSubmit",
e.UseSubmitFetcher = "useSubmitFetcher",
e.UseFetcher = "useFetcher",
e.useViewTransitionState = "useViewTransitionState"
}
)(u1 || (u1 = {}));
var c1;
(function(e) {
e.UseFetcher = "useFetcher",
e.UseFetchers = "useFetchers",
e.UseScrollRestoration = "useScrollRestoration"
}
)(c1 || (c1 = {}));
function xA(e, t) {
let {target: n, replace: r, state: i, preventScrollReset: s, relative: o, unstable_viewTransition: a} = t === void 0 ? {} : t
, l = wv()
, u = Qi()
, c = jE(e, {
relative: o
});
return y.useCallback(d=>{
if (rA(d, n)) {
d.preventDefault();
let f = r !== void 0 ? r : As(u) === As(c);
l(e, {
replace: f,
state: i,
preventScrollReset: s,
relative: o,
unstable_viewTransition: a
})
}
}
, [u, l, c, r, i, n, e, s, o, a])
}
const mf = (e,t)=>t === 0 ? 0 : e / t * 100
, bA = ()=>!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
function VE(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number")
r += e;
else if (typeof e == "object")
if (Array.isArray(e)) {
var i = e.length;
for (t = 0; t < i; t++)
e[t] && (n = VE(e[t])) && (r && (r += " "),
r += n)
} else
for (n in e)
e[n] && (r && (r += " "),
r += n);
return r
}
function SA() {
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++)
(e = arguments[n]) && (t = VE(e)) && (r && (r += " "),
r += t);
return r
}
function Ze(...e) {
return SA(e)
}
const zE = ()=>{
var e;
(e = document.querySelector("#loader")) == null || e.remove()
}
, xv = "-";
function EA(e) {
const t = PA(e)
, {conflictingClassGroups: n, conflictingClassGroupModifiers: r} = e;
function i(o) {
const a = o.split(xv);
return a[0] === "" && a.length !== 1 && a.shift(),
UE(a, t) || CA(o)
}
function s(o, a) {
const l = n[o] || [];
return a && r[o] ? [...l, ...r[o]] : l
}
return {
getClassGroupId: i,
getConflictingClassGroupIds: s
}
}
function UE(e, t) {
var o;
if (e.length === 0)
return t.classGroupId;
const n = e[0]
, r = t.nextPart.get(n)
, i = r ? UE(e.slice(1), r) : void 0;
if (i)
return i;
if (t.validators.length === 0)
return;
const s = e.join(xv);
return (o = t.validators.find(({validator: a})=>a(s))) == null ? void 0 : o.classGroupId
}
const d1 = /^\[(.+)\]$/;
function CA(e) {
if (d1.test(e)) {
const t = d1.exec(e)[1]
, n = t == null ? void 0 : t.substring(0, t.indexOf(":"));
if (n)
return "arbitrary.." + n
}
}
function PA(e) {
const {theme: t, prefix: n} = e
, r = {
nextPart: new Map,
validators: []
};
return RA(Object.entries(e.classGroups), n).forEach(([s,o])=>{
um(o, r, s, t)
}
),
r
}
function um(e, t, n, r) {
e.forEach(i=>{
if (typeof i == "string") {
const s = i === "" ? t : f1(t, i);
s.classGroupId = n;
return
}
if (typeof i == "function") {
if (TA(i)) {
um(i(r), t, n, r);
return
}
t.validators.push({
validator: i,
classGroupId: n
});
return
}
Object.entries(i).forEach(([s,o])=>{
um(o, f1(t, s), n, r)
}
)
}
)
}
function f1(e, t) {
let n = e;
return t.split(xv).forEach(r=>{
n.nextPart.has(r) || n.nextPart.set(r, {
nextPart: new Map,
validators: []
}),
n = n.nextPart.get(r)
}
),
n
}
function TA(e) {
return e.isThemeGetter
}
function RA(e, t) {
return t ? e.map(([n,r])=>{
const i = r.map(s=>typeof s == "string" ? t + s : typeof s == "object" ? Object.fromEntries(Object.entries(s).map(([o,a])=>[t + o, a])) : s);
return [n, i]
}
) : e
}
function OA(e) {
if (e < 1)
return {
get: ()=>{}
,
set: ()=>{}
};
let t = 0
, n = new Map
, r = new Map;
function i(s, o) {
n.set(s, o),
t++,
t > e && (t = 0,
r = n,
n = new Map)
}
return {
get(s) {
let o = n.get(s);
if (o !== void 0)
return o;
if ((o = r.get(s)) !== void 0)
return i(s, o),
o
},
set(s, o) {
n.has(s) ? n.set(s, o) : i(s, o)
}
}
}
const BE = "!";
function kA(e) {
const t = e.separator
, n = t.length === 1
, r = t[0]
, i = t.length;
return function(o) {
const a = [];
let l = 0, u = 0, c;
for (let p = 0; p < o.length; p++) {
let b = o[p];
if (l === 0) {
if (b === r && (n || o.slice(p, p + i) === t)) {
a.push(o.slice(u, p)),
u = p + i;
continue
}
if (b === "/") {
c = p;
continue
}
}
b === "[" ? l++ : b === "]" && l--
}
const d = a.length === 0 ? o : o.substring(u)
, f = d.startsWith(BE)
, h = f ? d.substring(1) : d
, m = c && c > u ? c - u : void 0;
return {
modifiers: a,
hasImportantModifier: f,
baseClassName: h,
maybePostfixModifierPosition: m
}
}
}
function _A(e) {
if (e.length <= 1)
return e;
const t = [];
let n = [];
return e.forEach(r=>{
r[0] === "[" ? (t.push(...n.sort(), r),
n = []) : n.push(r)
}
),
t.push(...n.sort()),
t
}
function AA(e) {
return {
cache: OA(e.cacheSize),
splitModifiers: kA(e),
...EA(e)
}
}
const DA = /\s+/;
function LA(e, t) {
const {splitModifiers: n, getClassGroupId: r, getConflictingClassGroupIds: i} = t
, s = new Set;
return e.trim().split(DA).map(o=>{
const {modifiers: a, hasImportantModifier: l, baseClassName: u, maybePostfixModifierPosition: c} = n(o);
let d = r(c ? u.substring(0, c) : u)
, f = !!c;
if (!d) {
if (!c)
return {
isTailwindClass: !1,
originalClassName: o
};
if (d = r(u),
!d)
return {
isTailwindClass: !1,
originalClassName: o
};
f = !1
}
const h = _A(a).join(":");
return {
isTailwindClass: !0,
modifierId: l ? h + BE : h,
classGroupId: d,
originalClassName: o,
hasPostfixModifier: f
}
}
).reverse().filter(o=>{
if (!o.isTailwindClass)
return !0;
const {modifierId: a, classGroupId: l, hasPostfixModifier: u} = o
, c = a + l;
return s.has(c) ? !1 : (s.add(c),
i(l, u).forEach(d=>s.add(a + d)),
!0)
}
).reverse().map(o=>o.originalClassName).join(" ")
}
function NA() {
let e = 0, t, n, r = "";
for (; e < arguments.length; )
(t = arguments[e++]) && (n = HE(t)) && (r && (r += " "),
r += n);
return r
}
function HE(e) {
if (typeof e == "string")
return e;
let t, n = "";
for (let r = 0; r < e.length; r++)
e[r] && (t = HE(e[r])) && (n && (n += " "),
n += t);
return n
}
function MA(e, ...t) {
let n, r, i, s = o;
function o(l) {
const u = t.reduce((c,d)=>d(c), e());
return n = AA(u),
r = n.cache.get,
i = n.cache.set,
s = a,
a(l)
}
function a(l) {
const u = r(l);
if (u)
return u;
const c = LA(l, n);
return i(l, c),
c
}
return function() {
return s(NA.apply(null, arguments))
}
}
function ot(e) {
const t = n=>n[e] || [];
return t.isThemeGetter = !0,
t
}
const WE = /^\[(?:([a-z-]+):)?(.+)\]$/i
, jA = /^\d+\/\d+$/
, $A = new Set(["px", "full", "screen"])
, IA = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
, FA = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
, VA = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/
, zA = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
, UA = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
function Dr(e) {
return fs(e) || $A.has(e) || jA.test(e)
}
function ii(e) {
return ma(e, "length", YA)
}
function fs(e) {
return !!e && !Number.isNaN(Number(e))
}
function rc(e) {
return ma(e, "number", fs)
}
function Na(e) {
return !!e && Number.isInteger(Number(e))
}
function BA(e) {
return e.endsWith("%") && fs(e.slice(0, -1))
}
function $e(e) {
return WE.test(e)
}
function si(e) {
return IA.test(e)
}
const HA = new Set(["length", "size", "percentage"]);
function WA(e) {
return ma(e, HA, GE)
}
function GA(e) {
return ma(e, "position", GE)
}
const KA = new Set(["image", "url"]);
function qA(e) {
return ma(e, KA, JA)
}
function QA(e) {
return ma(e, "", XA)
}
function Ma() {
return !0
}
function ma(e, t, n) {
const r = WE.exec(e);
return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1
}
function YA(e) {
return FA.test(e) && !VA.test(e)
}
function GE() {
return !1
}
function XA(e) {
return zA.test(e)
}
function JA(e) {
return UA.test(e)
}
function ZA() {
const e = ot("colors")
, t = ot("spacing")
, n = ot("blur")
, r = ot("brightness")
, i = ot("borderColor")
, s = ot("borderRadius")
, o = ot("borderSpacing")
, a = ot("borderWidth")
, l = ot("contrast")
, u = ot("grayscale")
, c = ot("hueRotate")
, d = ot("invert")
, f = ot("gap")
, h = ot("gradientColorStops")
, m = ot("gradientColorStopPositions")
, p = ot("inset")
, b = ot("margin")
, v = ot("opacity")
, g = ot("padding")
, w = ot("saturate")
, E = ot("scale")
, D = ot("sepia")
, V = ot("skew")
, C = ot("space")
, P = ot("translate")
, A = ()=>["auto", "contain", "none"]
, B = ()=>["auto", "hidden", "clip", "visible", "scroll"]
, Q = ()=>["auto", $e, t]
, Z = ()=>[$e, t]
, F = ()=>["", Dr, ii]
, k = ()=>["auto", fs, $e]
, T = ()=>["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"]
, _ = ()=>["solid", "dashed", "dotted", "double", "none"]
, O = ()=>["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"]
, R = ()=>["start", "end", "center", "between", "around", "evenly", "stretch"]
, z = ()=>["", "0", $e]
, Y = ()=>["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"]
, te = ()=>[fs, rc]
, ue = ()=>[fs, $e];
return {
cacheSize: 500,
separator: ":",
theme: {
colors: [Ma],
spacing: [Dr, ii],
blur: ["none", "", si, $e],
brightness: te(),
borderColor: [e],
borderRadius: ["none", "", "full", si, $e],
borderSpacing: Z(),
borderWidth: F(),
contrast: te(),
grayscale: z(),
hueRotate: ue(),
invert: z(),
gap: Z(),
gradientColorStops: [e],
gradientColorStopPositions: [BA, ii],
inset: Q(),
margin: Q(),
opacity: te(),
padding: Z(),
saturate: te(),
scale: te(),
sepia: z(),
skew: ue(),
space: Z(),
translate: Z()
},
classGroups: {
aspect: [{
aspect: ["auto", "square", "video", $e]
}],
container: ["container"],
columns: [{
columns: [si]
}],
"break-after": [{
"break-after": Y()
}],
"break-before": [{
"break-before": Y()
}],
"break-inside": [{
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
}],
"box-decoration": [{
"box-decoration": ["slice", "clone"]
}],
box: [{
box: ["border", "content"]
}],
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
float: [{
float: ["right", "left", "none", "start", "end"]
}],
clear: [{
clear: ["left", "right", "both", "none", "start", "end"]
}],
isolation: ["isolate", "isolation-auto"],
"object-fit": [{
object: ["contain", "cover", "fill", "none", "scale-down"]
}],
"object-position": [{
object: [...T(), $e]
}],
overflow: [{
overflow: B()
}],
"overflow-x": [{
"overflow-x": B()
}],
"overflow-y": [{
"overflow-y": B()
}],
overscroll: [{
overscroll: A()
}],
"overscroll-x": [{
"overscroll-x": A()
}],
"overscroll-y": [{
"overscroll-y": A()
}],
position: ["static", "fixed", "absolute", "relative", "sticky"],
inset: [{
inset: [p]
}],
"inset-x": [{
"inset-x": [p]
}],
"inset-y": [{
"inset-y": [p]
}],
start: [{
start: [p]
}],
end: [{
end: [p]
}],
top: [{
top: [p]
}],
right: [{
right: [p]
}],
bottom: [{
bottom: [p]
}],
left: [{
left: [p]
}],
visibility: ["visible", "invisible", "collapse"],
z: [{
z: ["auto", Na, $e]
}],
basis: [{
basis: Q()
}],
"flex-direction": [{
flex: ["row", "row-reverse", "col", "col-reverse"]
}],
"flex-wrap": [{
flex: ["wrap", "wrap-reverse", "nowrap"]
}],
flex: [{
flex: ["1", "auto", "initial", "none", $e]
}],
grow: [{
grow: z()
}],
shrink: [{
shrink: z()
}],
order: [{
order: ["first", "last", "none", Na, $e]
}],
"grid-cols": [{
"grid-cols": [Ma]
}],
"col-start-end": [{
col: ["auto", {
span: ["full", Na, $e]
}, $e]
}],
"col-start": [{
"col-start": k()
}],
"col-end": [{
"col-end": k()
}],
"grid-rows": [{
"grid-rows": [Ma]
}],
"row-start-end": [{
row: ["auto", {
span: [Na, $e]
}, $e]
}],
"row-start": [{
"row-start": k()
}],
"row-end": [{
"row-end": k()
}],
"grid-flow": [{
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
}],
"auto-cols": [{
"auto-cols": ["auto", "min", "max", "fr", $e]
}],
"auto-rows": [{
"auto-rows": ["auto", "min", "max", "fr", $e]
}],
gap: [{
gap: [f]
}],
"gap-x": [{
"gap-x": [f]
}],
"gap-y": [{
"gap-y": [f]
}],
"justify-content": [{
justify: ["normal", ...R()]
}],
"justify-items": [{
"justify-items": ["start", "end", "center", "stretch"]
}],
"justify-self": [{
"justify-self": ["auto", "start", "end", "center", "stretch"]
}],
"align-content": [{
content: ["normal", ...R(), "baseline"]
}],
"align-items": [{
items: ["start", "end", "center", "baseline", "stretch"]
}],
"align-self": [{
self: ["auto", "start", "end", "center", "stretch", "baseline"]
}],
"place-content": [{
"place-content": [...R(), "baseline"]
}],
"place-items": [{
"place-items": ["start", "end", "center", "baseline", "stretch"]
}],
"place-self": [{
"place-self": ["auto", "start", "end", "center", "stretch"]
}],
p: [{
p: [g]
}],
px: [{
px: [g]
}],
py: [{
py: [g]
}],
ps: [{
ps: [g]
}],
pe: [{
pe: [g]
}],
pt: [{
pt: [g]
}],
pr: [{
pr: [g]
}],
pb: [{
pb: [g]
}],
pl: [{
pl: [g]
}],
m: [{
m: [b]
}],
mx: [{
mx: [b]
}],
my: [{
my: [b]
}],
ms: [{
ms: [b]
}],
me: [{
me: [b]
}],
mt: [{
mt: [b]
}],
mr: [{
mr: [b]
}],
mb: [{
mb: [b]
}],
ml: [{
ml: [b]
}],
"space-x": [{
"space-x": [C]
}],
"space-x-reverse": ["space-x-reverse"],
"space-y": [{
"space-y": [C]
}],
"space-y-reverse": ["space-y-reverse"],
w: [{
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", $e, t]
}],
"min-w": [{
"min-w": [$e, t, "min", "max", "fit"]
}],
"max-w": [{
"max-w": [$e, t, "none", "full", "min", "max", "fit", "prose", {
screen: [si]
}, si]
}],
h: [{
h: [$e, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
}],
"min-h": [{
"min-h": [$e, t, "min", "max", "fit", "svh", "lvh", "dvh"]
}],
"max-h": [{
"max-h": [$e, t, "min", "max", "fit", "svh", "lvh", "dvh"]
}],
size: [{
size: [$e, t, "auto", "min", "max", "fit"]
}],
"font-size": [{
text: ["base", si, ii]
}],
"font-smoothing": ["antialiased", "subpixel-antialiased"],
"font-style": ["italic", "not-italic"],
"font-weight": [{
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", rc]
}],
"font-family": [{
font: [Ma]
}],
"fvn-normal": ["normal-nums"],
"fvn-ordinal": ["ordinal"],
"fvn-slashed-zero": ["slashed-zero"],
"fvn-figure": ["lining-nums", "oldstyle-nums"],
"fvn-spacing": ["proportional-nums", "tabular-nums"],
"fvn-fraction": ["diagonal-fractions", "stacked-fractons"],
tracking: [{
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", $e]
}],
"line-clamp": [{
"line-clamp": ["none", fs, rc]
}],
leading: [{
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", Dr, $e]
}],
"list-image": [{
"list-image": ["none", $e]
}],
"list-style-type": [{
list: ["none", "disc", "decimal", $e]
}],
"list-style-position": [{
list: ["inside", "outside"]
}],
"placeholder-color": [{
placeholder: [e]
}],
"placeholder-opacity": [{
"placeholder-opacity": [v]
}],
"text-alignment": [{
text: ["left", "center", "right", "justify", "start", "end"]
}],
"text-color": [{
text: [e]
}],
"text-opacity": [{
"text-opacity": [v]
}],
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
"text-decoration-style": [{
decoration: [..._(), "wavy"]
}],
"text-decoration-thickness": [{
decoration: ["auto", "from-font", Dr, ii]
}],
"underline-offset": [{
"underline-offset": ["auto", Dr, $e]
}],
"text-decoration-color": [{
decoration: [e]
}],
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
"text-wrap": [{
text: ["wrap", "nowrap", "balance", "pretty"]
}],
indent: [{
indent: Z()
}],
"vertical-align": [{
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", $e]
}],
whitespace: [{
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
}],
break: [{
break: ["normal", "words", "all", "keep"]
}],
hyphens: [{
hyphens: ["none", "manual", "auto"]
}],
content: [{
content: ["none", $e]
}],
"bg-attachment": [{
bg: ["fixed", "local", "scroll"]
}],
"bg-clip": [{
"bg-clip": ["border", "padding", "content", "text"]
}],
"bg-opacity": [{
"bg-opacity": [v]
}],
"bg-origin": [{
"bg-origin": ["border", "padding", "content"]
}],
"bg-position": [{
bg: [...T(), GA]
}],
"bg-repeat": [{
bg: ["no-repeat", {
repeat: ["", "x", "y", "round", "space"]
}]
}],
"bg-size": [{
bg: ["auto", "cover", "contain", WA]
}],
"bg-image": [{
bg: ["none", {
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
}, qA]
}],
"bg-color": [{
bg: [e]
}],
"gradient-from-pos": [{
from: [m]
}],
"gradient-via-pos": [{
via: [m]
}],
"gradient-to-pos": [{
to: [m]
}],
"gradient-from": [{
from: [h]
}],
"gradient-via": [{
via: [h]
}],
"gradient-to": [{
to: [h]
}],
rounded: [{
rounded: [s]
}],
"rounded-s": [{
"rounded-s": [s]
}],
"rounded-e": [{
"rounded-e": [s]
}],
"rounded-t": [{
"rounded-t": [s]
}],
"rounded-r": [{
"rounded-r": [s]
}],
"rounded-b": [{
"rounded-b": [s]
}],
"rounded-l": [{
"rounded-l": [s]
}],
"rounded-ss": [{
"rounded-ss": [s]
}],
"rounded-se": [{
"rounded-se": [s]
}],
"rounded-ee": [{
"rounded-ee": [s]
}],
"rounded-es": [{
"rounded-es": [s]
}],
"rounded-tl": [{
"rounded-tl": [s]
}],
"rounded-tr": [{
"rounded-tr": [s]
}],
"rounded-br": [{
"rounded-br": [s]
}],
"rounded-bl": [{
"rounded-bl": [s]
}],
"border-w": [{
border: [a]
}],
"border-w-x": [{
"border-x": [a]
}],
"border-w-y": [{
"border-y": [a]
}],
"border-w-s": [{
"border-s": [a]
}],
"border-w-e": [{
"border-e": [a]
}],
"border-w-t": [{
"border-t": [a]
}],
"border-w-r": [{
"border-r": [a]
}],
"border-w-b": [{
"border-b": [a]
}],
"border-w-l": [{
"border-l": [a]
}],
"border-opacity": [{
"border-opacity": [v]
}],
"border-style": [{
border: [..._(), "hidden"]
}],
"divide-x": [{
"divide-x": [a]
}],
"divide-x-reverse": ["divide-x-reverse"],
"divide-y": [{
"divide-y": [a]
}],
"divide-y-reverse": ["divide-y-reverse"],
"divide-opacity": [{
"divide-opacity": [v]
}],
"divide-style": [{
divide: _()
}],
"border-color": [{
border: [i]
}],
"border-color-x": [{
"border-x": [i]
}],
"border-color-y": [{
"border-y": [i]
}],
"border-color-t": [{
"border-t": [i]
}],
"border-color-r": [{
"border-r": [i]
}],
"border-color-b": [{
"border-b": [i]
}],
"border-color-l": [{
"border-l": [i]
}],
"divide-color": [{
divide: [i]
}],
"outline-style": [{
outline: ["", ..._()]
}],
"outline-offset": [{
"outline-offset": [Dr, $e]
}],
"outline-w": [{
outline: [Dr, ii]
}],
"outline-color": [{
outline: [e]
}],
"ring-w": [{
ring: F()
}],
"ring-w-inset": ["ring-inset"],
"ring-color": [{
ring: [e]
}],
"ring-opacity": [{
"ring-opacity": [v]
}],
"ring-offset-w": [{
"ring-offset": [Dr, ii]
}],
"ring-offset-color": [{
"ring-offset": [e]
}],
shadow: [{
shadow: ["", "inner", "none", si, QA]
}],
"shadow-color": [{
shadow: [Ma]
}],
opacity: [{
opacity: [v]
}],
"mix-blend": [{
"mix-blend": [...O(), "plus-lighter", "plus-darker"]
}],
"bg-blend": [{
"bg-blend": O()
}],
filter: [{
filter: ["", "none"]
}],
blur: [{
blur: [n]
}],
brightness: [{
brightness: [r]
}],
contrast: [{
contrast: [l]
}],
"drop-shadow": [{
"drop-shadow": ["", "none", si, $e]
}],
grayscale: [{
grayscale: [u]
}],
"hue-rotate": [{
"hue-rotate": [c]
}],
invert: [{
invert: [d]
}],
saturate: [{
saturate: [w]
}],
sepia: [{
sepia: [D]
}],
"backdrop-filter": [{
"backdrop-filter": ["", "none"]
}],
"backdrop-blur": [{
"backdrop-blur": [n]
}],
"backdrop-brightness": [{
"backdrop-brightness": [r]
}],
"backdrop-contrast": [{
"backdrop-contrast": [l]
}],
"backdrop-grayscale": [{
"backdrop-grayscale": [u]
}],
"backdrop-hue-rotate": [{
"backdrop-hue-rotate": [c]
}],
"backdrop-invert": [{
"backdrop-invert": [d]
}],
"backdrop-opacity": [{
"backdrop-opacity": [v]
}],
"backdrop-saturate": [{
"backdrop-saturate": [w]
}],
"backdrop-sepia": [{
"backdrop-sepia": [D]
}],
"border-collapse": [{
border: ["collapse", "separate"]
}],
"border-spacing": [{
"border-spacing": [o]
}],
"border-spacing-x": [{
"border-spacing-x": [o]
}],
"border-spacing-y": [{
"border-spacing-y": [o]
}],
"table-layout": [{
table: ["auto", "fixed"]
}],
caption: [{
caption: ["top", "bottom"]
}],
transition: [{
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", $e]
}],
duration: [{
duration: ue()
}],
ease: [{
ease: ["linear", "in", "out", "in-out", $e]
}],
delay: [{
delay: ue()
}],
animate: [{
animate: ["none", "spin", "ping", "pulse", "bounce", $e]
}],
transform: [{
transform: ["", "gpu", "none"]
}],
scale: [{
scale: [E]
}],
"scale-x": [{
"scale-x": [E]
}],
"scale-y": [{
"scale-y": [E]
}],
rotate: [{
rotate: [Na, $e]
}],
"translate-x": [{
"translate-x": [P]
}],
"translate-y": [{
"translate-y": [P]
}],
"skew-x": [{
"skew-x": [V]
}],
"skew-y": [{
"skew-y": [V]
}],
"transform-origin": [{
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", $e]
}],
accent: [{
accent: ["auto", e]
}],
appearance: [{
appearance: ["none", "auto"]
}],
cursor: [{
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", $e]
}],
"caret-color": [{
caret: [e]
}],
"pointer-events": [{
"pointer-events": ["none", "auto"]
}],
resize: [{
resize: ["none", "y", "x", ""]
}],
"scroll-behavior": [{
scroll: ["auto", "smooth"]
}],
"scroll-m": [{
"scroll-m": Z()
}],
"scroll-mx": [{
"scroll-mx": Z()
}],
"scroll-my": [{
"scroll-my": Z()
}],
"scroll-ms": [{
"scroll-ms": Z()
}],
"scroll-me": [{
"scroll-me": Z()
}],
"scroll-mt": [{
"scroll-mt": Z()
}],
"scroll-mr": [{
"scroll-mr": Z()
}],
"scroll-mb": [{
"scroll-mb": Z()
}],
"scroll-ml": [{
"scroll-ml": Z()
}],
"scroll-p": [{
"scroll-p": Z()
}],
"scroll-px": [{
"scroll-px": Z()
}],
"scroll-py": [{
"scroll-py": Z()
}],
"scroll-ps": [{
"scroll-ps": Z()
}],
"scroll-pe": [{
"scroll-pe": Z()
}],
"scroll-pt": [{
"scroll-pt": Z()
}],
"scroll-pr": [{
"scroll-pr": Z()
}],
"scroll-pb": [{
"scroll-pb": Z()
}],
"scroll-pl": [{
"scroll-pl": Z()
}],
"snap-align": [{
snap: ["start", "end", "center", "align-none"]
}],
"snap-stop": [{
snap: ["normal", "always"]
}],
"snap-type": [{
snap: ["none", "x", "y", "both"]
}],
"snap-strictness": [{
snap: ["mandatory", "proximity"]
}],
touch: [{
touch: ["auto", "none", "manipulation"]
}],
"touch-x": [{
"touch-pan": ["x", "left", "right"]
}],
"touch-y": [{
"touch-pan": ["y", "up", "down"]
}],
"touch-pz": ["touch-pinch-zoom"],
select: [{
select: ["none", "text", "all", "auto"]
}],
"will-change": [{
"will-change": ["auto", "scroll", "contents", "transform", $e]
}],
fill: [{
fill: [e, "none"]
}],
"stroke-w": [{
stroke: [Dr, ii, rc]
}],
stroke: [{
stroke: [e, "none"]
}],
sr: ["sr-only", "not-sr-only"],
"forced-color-adjust": [{
"forced-color-adjust": ["auto", "none"]
}]
},
conflictingClassGroups: {
overflow: ["overflow-x", "overflow-y"],
overscroll: ["overscroll-x", "overscroll-y"],
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
"inset-x": ["right", "left"],
"inset-y": ["top", "bottom"],
flex: ["basis", "grow", "shrink"],
gap: ["gap-x", "gap-y"],
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
px: ["pr", "pl"],
py: ["pt", "pb"],
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
mx: ["mr", "ml"],
my: ["mt", "mb"],
size: ["w", "h"],
"font-size": ["leading"],
"fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
"fvn-ordinal": ["fvn-normal"],
"fvn-slashed-zero": ["fvn-normal"],
"fvn-figure": ["fvn-normal"],
"fvn-spacing": ["fvn-normal"],
"fvn-fraction": ["fvn-normal"],
"line-clamp": ["display", "overflow"],
rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
"rounded-s": ["rounded-ss", "rounded-es"],
"rounded-e": ["rounded-se", "rounded-ee"],
"rounded-t": ["rounded-tl", "rounded-tr"],
"rounded-r": ["rounded-tr", "rounded-br"],
"rounded-b": ["rounded-br", "rounded-bl"],
"rounded-l": ["rounded-tl", "rounded-bl"],
"border-spacing": ["border-spacing-x", "border-spacing-y"],
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
"border-w-x": ["border-w-r", "border-w-l"],
"border-w-y": ["border-w-t", "border-w-b"],
"border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
"border-color-x": ["border-color-r", "border-color-l"],
"border-color-y": ["border-color-t", "border-color-b"],
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
"scroll-mx": ["scroll-mr", "scroll-ml"],
"scroll-my": ["scroll-mt", "scroll-mb"],
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
"scroll-px": ["scroll-pr", "scroll-pl"],
"scroll-py": ["scroll-pt", "scroll-pb"],
touch: ["touch-x", "touch-y", "touch-pz"],
"touch-x": ["touch"],
"touch-y": ["touch"],
"touch-pz": ["touch"]
},
conflictingClassGroupModifiers: {
"font-size": ["leading"]
}
}
}
const eD = MA(ZA)
, Ds = e=>{
const {children: t, className: n, bgUrl: r} = e
, {pathname: i} = Qi()
, s = i === "/";
return r ? x.jsxs("div", {
className: "relative h-full overflow-hidden",
children: [x.jsx("img", {
src: r,
alt: "bg",
className: Ze("absolute top-0 -z-10 w-full", s && "opacity-20")
}), x.jsx("div", {
className: Ze(eD("relative h-full overflow-x-hidden overflow-y-scroll px-5 pb-4 pt-10", n)),
children: t
})]
}) : x.jsx("div", {
className: Ze("relative overflow-scroll px-5 pb-4 pt-10", n),
children: t
})
}
, dt = "https://your-url.com/images"
, Ae = {
bgTap: `${dt}/bg/main.png`,
bgMini: `${dt}/bg/mini.png`,
bgAccent: `${dt}/bg/accent.png`,
coin: `${dt}/coin.png`,
levelCoin: `${dt}/level-coin.png`,
flyingCoin: `${dt}/flying-coin.png`,
tapCoin: `${dt}/tap-coin.png`,
energy: `${dt}/energy.png`,
bookmark: `${dt}/bookmark.png`,
tappingGuru: `${dt}/flames.png`,
fullTank: `${dt}/thunder.png`,
energyLimit: `${dt}/energy-limit.png`,
multitap: `${dt}/multitap.png`,
rechargingSpeed: `${dt}/thunder.png`,
congrats: `${dt}/congrats.png`,
notFound: `${dt}/not-found.png`,
navRef: `${dt}/nav/ref.png`,
navTasks: `${dt}/nav/tasks.png`,
navTap: `${dt}/nav/tap.png`,
navBoosters: `${dt}/nav/boosts.png`,
navStats: `${dt}/nav/stats.png`,
navGlow: `${dt}/nav/glow.png`,
tappingGuruEffect: `${dt}/tapping-guru-effect.png`
};
var ga = class {
constructor() {
this.listeners = new Set,
this.subscribe = this.subscribe.bind(this)
}
subscribe(e) {
return this.listeners.add(e),
this.onSubscribe(),
()=>{
this.listeners.delete(e),
this.onUnsubscribe()
}
}
hasListeners() {
return this.listeners.size > 0
}
onSubscribe() {}
onUnsubscribe() {}
}
, na = typeof window > "u" || "Deno"in globalThis;
function Bn() {}
function tD(e, t) {
return typeof e == "function" ? e(t) : e
}
function cm(e) {
return typeof e == "number" && e >= 0 && e !== 1 / 0
}
function KE(e, t) {
return Math.max(e + (t || 0) - Date.now(), 0)
}
function Ao(e, t) {
return typeof e == "function" ? e(t) : e
}
function h1(e, t) {
const {type: n="all", exact: r, fetchStatus: i, predicate: s, queryKey: o, stale: a} = e;
if (o) {
if (r) {
if (t.queryHash !== bv(o, t.options))
return !1
} else if (!jl(t.queryKey, o))
return !1
}
if (n !== "all") {
const l = t.isActive();
if (n === "active" && !l || n === "inactive" && l)
return !1
}
return !(typeof a == "boolean" && t.isStale() !== a || i && i !== t.state.fetchStatus || s && !s(t))
}
function p1(e, t) {
const {exact: n, status: r, predicate: i, mutationKey: s} = e;
if (s) {
if (!t.options.mutationKey)
return !1;
if (n) {
if (Ls(t.options.mutationKey) !== Ls(s))
return !1
} else if (!jl(t.options.mutationKey, s))
return !1
}
return !(r && t.state.status !== r || i && !i(t))
}
function bv(e, t) {
return ((t == null ? void 0 : t.queryKeyHashFn) || Ls)(e)
}
function Ls(e) {
return JSON.stringify(e, (t,n)=>dm(n) ? Object.keys(n).sort().reduce((r,i)=>(r[i] = n[i],
r), {}) : n)
}
function jl(e, t) {
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some(n=>!jl(e[n], t[n])) : !1
}
function qE(e, t) {
if (e === t)
return e;
const n = m1(e) && m1(t);
if (n || dm(e) && dm(t)) {
const r = n ? e : Object.keys(e)
, i = r.length
, s = n ? t : Object.keys(t)
, o = s.length
, a = n ? [] : {};
let l = 0;
for (let u = 0; u < o; u++) {
const c = n ? u : s[u];
(!n && r.includes(c) || n) && e[c] === void 0 && t[c] === void 0 ? (a[c] = void 0,
l++) : (a[c] = qE(e[c], t[c]),
a[c] === e[c] && e[c] !== void 0 && l++)
}
return i === o && l === i ? e : a
}
return t
}
function wd(e, t) {
if (!t || Object.keys(e).length !== Object.keys(t).length)
return !1;
for (const n in e)
if (e[n] !== t[n])
return !1;
return !0
}
function m1(e) {
return Array.isArray(e) && e.length === Object.keys(e).length
}
function dm(e) {
if (!g1(e))
return !1;
const t = e.constructor;
if (t === void 0)
return !0;
const n = t.prototype;
return !(!g1(n) || !n.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype)
}
function g1(e) {
return Object.prototype.toString.call(e) === "[object Object]"
}
function nD(e) {
return new Promise(t=>{
setTimeout(t, e)
}
)
}
function fm(e, t, n) {
return typeof n.structuralSharing == "function" ? n.structuralSharing(e, t) : n.structuralSharing !== !1 ? qE(e, t) : t
}
function rD(e, t, n=0) {
const r = [...e, t];
return n && r.length > n ? r.slice(1) : r
}
function iD(e, t, n=0) {
const r = [t, ...e];
return n && r.length > n ? r.slice(0, -1) : r
}
var QE = Symbol(), YE = (e,t)=>!e.queryFn && (t != null && t.initialPromise) ? ()=>t.initialPromise : !e.queryFn || e.queryFn === QE ? ()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn, ps, vi, No, Yx, sD = (Yx = class extends ga {
constructor() {
super();
xe(this, ps, void 0);
xe(this, vi, void 0);
xe(this, No, void 0);
he(this, No, t=>{
if (!na && window.addEventListener) {
const n = ()=>t();
return window.addEventListener("visibilitychange", n, !1),
()=>{
window.removeEventListener("visibilitychange", n)
}
}
}
)
}
onSubscribe() {
G(this, vi) || this.setEventListener(G(this, No))
}
onUnsubscribe() {
var t;
this.hasListeners() || ((t = G(this, vi)) == null || t.call(this),
he(this, vi, void 0))
}
setEventListener(t) {
var n;
he(this, No, t),
(n = G(this, vi)) == null || n.call(this),
he(this, vi, t(r=>{
typeof r == "boolean" ? this.setFocused(r) : this.onFocus()
}
))
}
setFocused(t) {
G(this, ps) !== t && (he(this, ps, t),
this.onFocus())
}
onFocus() {
const t = this.isFocused();
this.listeners.forEach(n=>{
n(t)
}
)
}
isFocused() {
var t;
return typeof G(this, ps) == "boolean" ? G(this, ps) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden"
}
}
,
ps = new WeakMap,
vi = new WeakMap,
No = new WeakMap,
Yx), Sv = new sD, Mo, yi, jo, Xx, oD = (Xx = class extends ga {
constructor() {
super();
xe(this, Mo, !0);
xe(this, yi, void 0);
xe(this, jo, void 0);
he(this, jo, t=>{
if (!na && window.addEventListener) {
const n = ()=>t(!0)
, r = ()=>t(!1);
return window.addEventListener("online", n, !1),
window.addEventListener("offline", r, !1),
()=>{
window.removeEventListener("online", n),
window.removeEventListener("offline", r)
}
}
}
)
}
onSubscribe() {
G(this, yi) || this.setEventListener(G(this, jo))
}
onUnsubscribe() {
var t;
this.hasListeners() || ((t = G(this, yi)) == null || t.call(this),
he(this, yi, void 0))
}
setEventListener(t) {
var n;
he(this, jo, t),
(n = G(this, yi)) == null || n.call(this),
he(this, yi, t(this.setOnline.bind(this)))
}
setOnline(t) {
G(this, Mo) !== t && (he(this, Mo, t),
this.listeners.forEach(r=>{
r(t)
}
))
}
isOnline() {
return G(this, Mo)
}
}
,
Mo = new WeakMap,
yi = new WeakMap,
jo = new WeakMap,
Xx), xd = new oD;
function aD(e) {
return Math.min(1e3 * 2 ** e, 3e4)
}
function XE(e) {
return (e ?? "online") === "online" ? xd.isOnline() : !0
}
var JE = class {
constructor(e) {
this.revert = e == null ? void 0 : e.revert,
this.silent = e == null ? void 0 : e.silent
}
}
;
function bh(e) {
return e instanceof JE
}
function ZE(e) {
let t = !1, n = 0, r = !1, i, s, o;
const a = new Promise((v,g)=>{
s = v,
o = g
}
)
, l = v=>{
var g;
r || (m(new JE(v)),
(g = e.abort) == null || g.call(e))
}
, u = ()=>{
t = !0
}
, c = ()=>{
t = !1
}
, d = ()=>Sv.isFocused() && (e.networkMode === "always" || xd.isOnline()) && e.canRun()
, f = ()=>XE(e.networkMode) && e.canRun()
, h = v=>{
var g;
r || (r = !0,
(g = e.onSuccess) == null || g.call(e, v),
i == null || i(),
s(v))
}
, m = v=>{
var g;
r || (r = !0,
(g = e.onError) == null || g.call(e, v),
i == null || i(),
o(v))
}
, p = ()=>new Promise(v=>{
var g;
i = w=>{
(r || d()) && v(w)
}
,
(g = e.onPause) == null || g.call(e)
}
).then(()=>{
var v;
i = void 0,
r || (v = e.onContinue) == null || v.call(e)
}
)
, b = ()=>{
if (r)
return;
let v;
const g = n === 0 ? e.initialPromise : void 0;
try {
v = g ?? e.fn()
} catch (w) {
v = Promise.reject(w)
}
Promise.resolve(v).then(h).catch(w=>{
var P;
if (r)
return;
const E = e.retry ?? (na ? 0 : 3)
, D = e.retryDelay ?? aD
, V = typeof D == "function" ? D(n, w) : D
, C = E === !0 || typeof E == "number" && n < E || typeof E == "function" && E(n, w);
if (t || !C) {
m(w);
return
}
n++,
(P = e.onFail) == null || P.call(e, n, w),
nD(V).then(()=>d() ? void 0 : p()).then(()=>{
t ? m(w) : b()
}
)
}
)
}
;
return {
promise: a,
cancel: l,
continue: ()=>(i == null || i(),
a),
cancelRetry: u,
continueRetry: c,
canStart: f,
start: ()=>(f() ? b() : p().then(b),
a)
}
}
function lD() {
let e = []
, t = 0
, n = f=>{
f()
}
, r = f=>{
f()
}
, i = f=>setTimeout(f, 0);
const s = f=>{
i = f
}
, o = f=>{
let h;
t++;
try {
h = f()
} finally {
t--,
t || u()
}
return h
}
, a = f=>{
t ? e.push(f) : i(()=>{
n(f)
}
)
}
, l = f=>(...h)=>{
a(()=>{
f(...h)
}
)
}
, u = ()=>{
const f = e;
e = [],
f.length && i(()=>{
r(()=>{
f.forEach(h=>{
n(h)
}
)
}
)
}
)
}
;
return {
batch: o,
batchCalls: l,
schedule: a,
setNotifyFunction: f=>{
n = f
}
,
setBatchNotifyFunction: f=>{
r = f
}
,
setScheduler: s
}
}
var Dt = lD(), ms, Jx, eC = (Jx = class {
constructor() {
xe(this, ms, void 0)
}
destroy() {
this.clearGcTimeout()
}
scheduleGc() {
this.clearGcTimeout(),
cm(this.gcTime) && he(this, ms, setTimeout(()=>{
this.optionalRemove()
}
, this.gcTime))
}
updateGcTime(e) {
this.gcTime = Math.max(this.gcTime || 0, e ?? (na ? 1 / 0 : 5 * 60 * 1e3))
}
clearGcTimeout() {
G(this, ms) && (clearTimeout(G(this, ms)),
he(this, ms, void 0))
}
}
,
ms = new WeakMap,
Jx), $o, Io, zn, tn, nu, gs, rr, Nr, Zx, uD = (Zx = class extends eC {
constructor(t) {
super();
xe(this, rr);
xe(this, $o, void 0);
xe(this, Io, void 0);
xe(this, zn, void 0);
xe(this, tn, void 0);
xe(this, nu, void 0);
xe(this, gs, void 0);
he(this, gs, !1),
he(this, nu, t.defaultOptions),
this.setOptions(t.options),
this.observers = [],
he(this, zn, t.cache),
this.queryKey = t.queryKey,
this.queryHash = t.queryHash,
he(this, $o, t.state || cD(this.options)),
this.state = G(this, $o),
this.scheduleGc()
}
get meta() {
return this.options.meta
}
get promise() {
var t;
return (t = G(this, tn)) == null ? void 0 : t.promise
}
setOptions(t) {
this.options = {
...G(this, nu),
...t
},
this.updateGcTime(this.options.gcTime)
}
optionalRemove() {
!this.observers.length && this.state.fetchStatus === "idle" && G(this, zn).remove(this)
}
setData(t, n) {
const r = fm(this.state.data, t, this.options);
return Ie(this, rr, Nr).call(this, {
data: r,
type: "success",
dataUpdatedAt: n == null ? void 0 : n.updatedAt,
manual: n == null ? void 0 : n.manual
}),
r
}
setState(t, n) {
Ie(this, rr, Nr).call(this, {
type: "setState",
state: t,
setStateOptions: n
})
}
cancel(t) {
var r, i;
const n = (r = G(this, tn)) == null ? void 0 : r.promise;
return (i = G(this, tn)) == null || i.cancel(t),
n ? n.then(Bn).catch(Bn) : Promise.resolve()
}
destroy() {
super.destroy(),
this.cancel({
silent: !0
})
}
reset() {
this.destroy(),
this.setState(G(this, $o))
}
isActive() {
return this.observers.some(t=>t.options.enabled !== !1)
}
isDisabled() {
return this.getObserversCount() > 0 && !this.isActive()
}
isStale() {
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(t=>t.getCurrentResult().isStale) : this.state.data === void 0
}
isStaleByTime(t=0) {
return this.state.isInvalidated || this.state.data === void 0 || !KE(this.state.dataUpdatedAt, t)
}
onFocus() {
var n;
const t = this.observers.find(r=>r.shouldFetchOnWindowFocus());
t == null || t.refetch({
cancelRefetch: !1
}),
(n = G(this, tn)) == null || n.continue()
}
onOnline() {
var n;
const t = this.observers.find(r=>r.shouldFetchOnReconnect());
t == null || t.refetch({
cancelRefetch: !1
}),
(n = G(this, tn)) == null || n.continue()
}
addObserver(t) {
this.observers.includes(t) || (this.observers.push(t),
this.clearGcTimeout(),
G(this, zn).notify({
type: "observerAdded",
query: this,
observer: t
}))
}
removeObserver(t) {
this.observers.includes(t) && (this.observers = this.observers.filter(n=>n !== t),
this.observers.length || (G(this, tn) && (G(this, gs) ? G(this, tn).cancel({
revert: !0
}) : G(this, tn).cancelRetry()),
this.scheduleGc()),
G(this, zn).notify({
type: "observerRemoved",
query: this,
observer: t
}))
}
getObserversCount() {
return this.observers.length
}
invalidate() {
this.state.isInvalidated || Ie(this, rr, Nr).call(this, {
type: "invalidate"
})
}
fetch(t, n) {
var l, u, c;
if (this.state.fetchStatus !== "idle") {
if (this.state.data !== void 0 && (n != null && n.cancelRefetch))
this.cancel({
silent: !0
});
else if (G(this, tn))
return G(this, tn).continueRetry(),
G(this, tn).promise
}
if (t && this.setOptions(t),
!this.options.queryFn) {
const d = this.observers.find(f=>f.options.queryFn);
d && this.setOptions(d.options)
}
const r = new AbortController
, i = d=>{
Object.defineProperty(d, "signal", {
enumerable: !0,
get: ()=>(he(this, gs, !0),
r.signal)
})
}
, s = ()=>{
const d = YE(this.options, n)
, f = {
queryKey: this.queryKey,
meta: this.meta
};
return i(f),
he(this, gs, !1),
this.options.persister ? this.options.persister(d, f, this) : d(f)
}
, o = {
fetchOptions: n,
options: this.options,
queryKey: this.queryKey,
state: this.state,
fetchFn: s
};
i(o),
(l = this.options.behavior) == null || l.onFetch(o, this),
he(this, Io, this.state),
(this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((u = o.fetchOptions) == null ? void 0 : u.meta)) && Ie(this, rr, Nr).call(this, {
type: "fetch",
meta: (c = o.fetchOptions) == null ? void 0 : c.meta
});
const a = d=>{
var f, h, m, p;
bh(d) && d.silent || Ie(this, rr, Nr).call(this, {
type: "error",
error: d
}),
bh(d) || ((h = (f = G(this, zn).config).onError) == null || h.call(f, d, this),
(p = (m = G(this, zn).config).onSettled) == null || p.call(m, this.state.data, d, this)),
this.isFetchingOptimistic || this.scheduleGc(),
this.isFetchingOptimistic = !1
}
;
return he(this, tn, ZE({
initialPromise: n == null ? void 0 : n.initialPromise,
fn: o.fetchFn,
abort: r.abort.bind(r),
onSuccess: d=>{
var f, h, m, p;
if (d === void 0) {
a(new Error(`${this.queryHash} data is undefined`));
return
}
this.setData(d),
(h = (f = G(this, zn).config).onSuccess) == null || h.call(f, d, this),
(p = (m = G(this, zn).config).onSettled) == null || p.call(m, d, this.state.error, this),
this.isFetchingOptimistic || this.scheduleGc(),
this.isFetchingOptimistic = !1
}
,
onError: a,
onFail: (d,f)=>{
Ie(this, rr, Nr).call(this, {
type: "failed",
failureCount: d,
error: f
})
}
,
onPause: ()=>{
Ie(this, rr, Nr).call(this, {
type: "pause"
})
}
,
onContinue: ()=>{
Ie(this, rr, Nr).call(this, {
type: "continue"
})
}
,
retry: o.options.retry,
retryDelay: o.options.retryDelay,
networkMode: o.options.networkMode,
canRun: ()=>!0
})),
G(this, tn).start()
}
}
,
$o = new WeakMap,
Io = new WeakMap,
zn = new WeakMap,
tn = new WeakMap,
nu = new WeakMap,
gs = new WeakMap,
rr = new WeakSet,
Nr = function(t) {
const n = r=>{
switch (t.type) {
case "failed":
return {
...r,
fetchFailureCount: t.failureCount,
fetchFailureReason: t.error
};
case "pause":
return {
...r,
fetchStatus: "paused"
};
case "continue":
return {
...r,
fetchStatus: "fetching"
};
case "fetch":
return {
...r,
...tC(r.data, this.options),
fetchMeta: t.meta ?? null
};
case "success":
return {
...r,
data: t.data,
dataUpdateCount: r.dataUpdateCount + 1,
dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
error: null,
isInvalidated: !1,
status: "success",
...!t.manual && {
fetchStatus: "idle",
fetchFailureCount: 0,
fetchFailureReason: null
}
};
case "error":
const i = t.error;
return bh(i) && i.revert && G(this, Io) ? {
...G(this, Io),
fetchStatus: "idle"
} : {
...r,
error: i,
errorUpdateCount: r.errorUpdateCount + 1,
errorUpdatedAt: Date.now(),
fetchFailureCount: r.fetchFailureCount + 1,
fetchFailureReason: i,
fetchStatus: "idle",
status: "error"
};
case "invalidate":
return {
...r,
isInvalidated: !0
};
case "setState":
return {
...r,
...t.state
}
}
}
;
this.state = n(this.state),
Dt.batch(()=>{
this.observers.forEach(r=>{
r.onQueryUpdate()
}
),
G(this, zn).notify({
query: this,
type: "updated",
action: t
})
}
)
}
,
Zx);
function tC(e, t) {
return {
fetchFailureCount: 0,
fetchFailureReason: null,
fetchStatus: XE(t.networkMode) ? "fetching" : "paused",
...e === void 0 && {
error: null,
status: "pending"
}
}
}
function cD(e) {
const t = typeof e.initialData == "function" ? e.initialData() : e.initialData
, n = t !== void 0
, r = n ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
return {
data: t,
dataUpdateCount: 0,
dataUpdatedAt: n ? r ?? Date.now() : 0,
error: null,
errorUpdateCount: 0,
errorUpdatedAt: 0,
fetchFailureCount: 0,
fetchFailureReason: null,
fetchMeta: null,
isInvalidated: !1,
status: n ? "success" : "pending",
fetchStatus: "idle"
}
}
var br, eb, dD = (eb = class extends ga {
constructor(t={}) {
super();
xe(this, br, void 0);
this.config = t,
he(this, br, new Map)
}
build(t, n, r) {
const i = n.queryKey
, s = n.queryHash ?? bv(i, n);
let o = this.get(s);
return o || (o = new uD({
cache: this,
queryKey: i,
queryHash: s,
options: t.defaultQueryOptions(n),
state: r,
defaultOptions: t.getQueryDefaults(i)
}),
this.add(o)),
o
}
add(t) {
G(this, br).has(t.queryHash) || (G(this, br).set(t.queryHash, t),
this.notify({
type: "added",
query: t
}))
}
remove(t) {
const n = G(this, br).get(t.queryHash);
n && (t.destroy(),
n === t && G(this, br).delete(t.queryHash),
this.notify({
type: "removed",
query: t
}))
}
clear() {
Dt.batch(()=>{
this.getAll().forEach(t=>{
this.remove(t)
}
)
}
)
}
get(t) {
return G(this, br).get(t)
}
getAll() {
return [...G(this, br).values()]
}
find(t) {
const n = {
exact: !0,
...t
};
return this.getAll().find(r=>h1(n, r))
}
findAll(t={}) {
const n = this.getAll();
return Object.keys(t).length > 0 ? n.filter(r=>h1(t, r)) : n
}
notify(t) {
Dt.batch(()=>{
this.listeners.forEach(n=>{
n(t)
}
)
}
)
}
onFocus() {
Dt.batch(()=>{
this.getAll().forEach(t=>{
t.onFocus()
}
)
}
)
}
onOnline() {
Dt.batch(()=>{
this.getAll().forEach(t=>{
t.onOnline()
}
)
}
)
}
}
,
br = new WeakMap,
eb), Sr, cn, vs, Er, li, tb, fD = (tb = class extends eC {
constructor(t) {
super();
xe(this, Er);
xe(this, Sr, void 0);
xe(this, cn, void 0);
xe(this, vs, void 0);
this.mutationId = t.mutationId,
he(this, cn, t.mutationCache),
he(this, Sr, []),
this.state = t.state || nC(),
this.setOptions(t.options),
this.scheduleGc()
}
setOptions(t) {
this.options = t,
this.updateGcTime(this.options.gcTime)
}
get meta() {
return this.options.meta
}
addObserver(t) {
G(this, Sr).includes(t) || (G(this, Sr).push(t),
this.clearGcTimeout(),
G(this, cn).notify({
type: "observerAdded",
mutation: this,
observer: t
}))
}
removeObserver(t) {
he(this, Sr, G(this, Sr).filter(n=>n !== t)),
this.scheduleGc(),
G(this, cn).notify({
type: "observerRemoved",
mutation: this,
observer: t
})
}
optionalRemove() {
G(this, Sr).length || (this.state.status === "pending" ? this.scheduleGc() : G(this, cn).remove(this))
}
continue() {
var t;
return ((t = G(this, vs)) == null ? void 0 : t.continue()) ?? this.execute(this.state.variables)
}
async execute(t) {
var i, s, o, a, l, u, c, d, f, h, m, p, b, v, g, w, E, D, V, C;
he(this, vs, ZE({
fn: ()=>this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
onFail: (P,A)=>{
Ie(this, Er, li).call(this, {
type: "failed",
failureCount: P,
error: A
})
}
,
onPause: ()=>{
Ie(this, Er, li).call(this, {
type: "pause"
})
}
,
onContinue: ()=>{
Ie(this, Er, li).call(this, {
type: "continue"
})
}
,
retry: this.options.retry ?? 0,
retryDelay: this.options.retryDelay,
networkMode: this.options.networkMode,
canRun: ()=>G(this, cn).canRun(this)
}));
const n = this.state.status === "pending"
, r = !G(this, vs).canStart();
try {
if (!n) {
Ie(this, Er, li).call(this, {
type: "pending",
variables: t,
isPaused: r
}),
await ((s = (i = G(this, cn).config).onMutate) == null ? void 0 : s.call(i, t, this));
const A = await ((a = (o = this.options).onMutate) == null ? void 0 : a.call(o, t));
A !== this.state.context && Ie(this, Er, li).call(this, {
type: "pending",
context: A,
variables: t,
isPaused: r
})
}
const P = await G(this, vs).start();
return await ((u = (l = G(this, cn).config).onSuccess) == null ? void 0 : u.call(l, P, t, this.state.context, this)),
await ((d = (c = this.options).onSuccess) == null ? void 0 : d.call(c, P, t, this.state.context)),
await ((h = (f = G(this, cn).config).onSettled) == null ? void 0 : h.call(f, P, null, this.state.variables, this.state.context, this)),
await ((p = (m = this.options).onSettled) == null ? void 0 : p.call(m, P, null, t, this.state.context)),
Ie(this, Er, li).call(this, {
type: "success",
data: P
}),
P
} catch (P) {
try {
throw await ((v = (b = G(this, cn).config).onError) == null ? void 0 : v.call(b, P, t, this.state.context, this)),
await ((w = (g = this.options).onError) == null ? void 0 : w.call(g, P, t, this.state.context)),
await ((D = (E = G(this, cn).config).onSettled) == null ? void 0 : D.call(E, void 0, P, this.state.variables, this.state.context, this)),
await ((C = (V = this.options).onSettled) == null ? void 0 : C.call(V, void 0, P, t, this.state.context)),
P
} finally {
Ie(this, Er, li).call(this, {
type: "error",
error: P
})
}
} finally {
G(this, cn).runNext(this)
}
}
}
,
Sr = new WeakMap,
cn = new WeakMap,
vs = new WeakMap,
Er = new WeakSet,
li = function(t) {
const n = r=>{
switch (t.type) {
case "failed":
return {
...r,
failureCount: t.failureCount,
failureReason: t.error
};
case "pause":
return {
...r,
isPaused: !0
};
case "continue":
return {
...r,
isPaused: !1
};
case "pending":
return {
...r,
context: t.context,
data: void 0,
failureCount: 0,
failureReason: null,
error: null,
isPaused: t.isPaused,
status: "pending",
variables: t.variables,
submittedAt: Date.now()
};
case "success":
return {
...r,
data: t.data,
failureCount: 0,
failureReason: null,
error: null,
status: "success",
isPaused: !1
};
case "error":
return {
...r,
data: void 0,
error: t.error,
failureCount: r.failureCount + 1,
failureReason: t.error,
isPaused: !1,
status: "error"
}
}
}
;
this.state = n(this.state),
Dt.batch(()=>{
G(this, Sr).forEach(r=>{
r.onMutationUpdate(t)
}
),
G(this, cn).notify({
mutation: this,
type: "updated",
action: t
})
}
)
}
,
tb);
function nC() {
return {
context: void 0,
data: void 0,
error: null,
failureCount: 0,
failureReason: null,
isPaused: !1,
status: "idle",
variables: void 0,
submittedAt: 0
}
}
var Rn, ru, nb, hD = (nb = class extends ga {
constructor(t={}) {
super();
xe(this, Rn, void 0);
xe(this, ru, void 0);
this.config = t,
he(this, Rn, new Map),
he(this, ru, Date.now())
}
build(t, n, r) {
const i = new fD({
mutationCache: this,
mutationId: ++Iu(this, ru)._,
options: t.defaultMutationOptions(n),
state: r
});
return this.add(i),
i
}
add(t) {
const n = ic(t)
, r = G(this, Rn).get(n) ?? [];
r.push(t),
G(this, Rn).set(n, r),
this.notify({
type: "added",
mutation: t
})
}
remove(t) {
var r;
const n = ic(t);
if (G(this, Rn).has(n)) {
const i = (r = G(this, Rn).get(n)) == null ? void 0 : r.filter(s=>s !== t);
i && (i.length === 0 ? G(this, Rn).delete(n) : G(this, Rn).set(n, i))
}
this.notify({
type: "removed",
mutation: t
})
}
canRun(t) {
var r;
const n = (r = G(this, Rn).get(ic(t))) == null ? void 0 : r.find(i=>i.state.status === "pending");
return !n || n === t
}
runNext(t) {
var r;
const n = (r = G(this, Rn).get(ic(t))) == null ? void 0 : r.find(i=>i !== t && i.state.isPaused);
return (n == null ? void 0 : n.continue()) ?? Promise.resolve()
}
clear() {
Dt.batch(()=>{
this.getAll().forEach(t=>{
this.remove(t)
}
)
}
)
}
getAll() {
return [...G(this, Rn).values()].flat()
}
find(t) {
const n = {
exact: !0,
...t
};
return this.getAll().find(r=>p1(n, r))
}
findAll(t={}) {
return this.getAll().filter(n=>p1(t, n))
}
notify(t) {
Dt.batch(()=>{
this.listeners.forEach(n=>{
n(t)
}
)
}
)
}
resumePausedMutations() {
const t = this.getAll().filter(n=>n.state.isPaused);
return Dt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Bn))))
}
}
,
Rn = new WeakMap,
ru = new WeakMap,
nb);
function ic(e) {
var t;
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId)
}
function pD(e) {
return {
onFetch: (t,n)=>{
const r = async()=>{
var m, p, b, v, g;
const i = t.options
, s = (b = (p = (m = t.fetchOptions) == null ? void 0 : m.meta) == null ? void 0 : p.fetchMore) == null ? void 0 : b.direction
, o = ((v = t.state.data) == null ? void 0 : v.pages) || []
, a = ((g = t.state.data) == null ? void 0 : g.pageParams) || []
, l = {
pages: [],
pageParams: []
};
let u = !1;
const c = w=>{
Object.defineProperty(w, "signal", {
enumerable: !0,
get: ()=>(t.signal.aborted ? u = !0 : t.signal.addEventListener("abort", ()=>{
u = !0
}
),
t.signal)
})
}
, d = YE(t.options, t.fetchOptions)
, f = async(w,E,D)=>{
if (u)
return Promise.reject();
if (E == null && w.pages.length)
return Promise.resolve(w);
const V = {
queryKey: t.queryKey,
pageParam: E,
direction: D ? "backward" : "forward",
meta: t.options.meta
};
c(V);
const C = await d(V)
, {maxPages: P} = t.options
, A = D ? iD : rD;
return {
pages: A(w.pages, C, P),
pageParams: A(w.pageParams, E, P)
}
}
;
let h;
if (s && o.length) {
const w = s === "backward"
, E = w ? mD : v1
, D = {
pages: o,
pageParams: a
}
, V = E(i, D);
h = await f(D, V, w)
} else {
h = await f(l, a[0] ?? i.initialPageParam);
const w = e ?? o.length;
for (let E = 1; E < w; E++) {
const D = v1(i, h);
h = await f(h, D)
}
}
return h
}
;
t.options.persister ? t.fetchFn = ()=>{
var i, s;
return (s = (i = t.options).persister) == null ? void 0 : s.call(i, r, {
queryKey: t.queryKey,
meta: t.options.meta,
signal: t.signal
}, n)
}
: t.fetchFn = r
}
}
}
function v1(e, {pages: t, pageParams: n}) {
const r = t.length - 1;
return e.getNextPageParam(t[r], t, n[r], n)
}
function mD(e, {pages: t, pageParams: n}) {
var r;
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n)
}
var bt, wi, xi, Fo, Vo, bi, zo, Uo, rb, gD = (rb = class {
constructor(e={}) {
xe(this, bt, void 0);
xe(this, wi, void 0);
xe(this, xi, void 0);
xe(this, Fo, void 0);
xe(this, Vo, void 0);
xe(this, bi, void 0);
xe(this, zo, void 0);
xe(this, Uo, void 0);
he(this, bt, e.queryCache || new dD),
he(this, wi, e.mutationCache || new hD),
he(this, xi, e.defaultOptions || {}),
he(this, Fo, new Map),
he(this, Vo, new Map),
he(this, bi, 0)
}
mount() {
Iu(this, bi)._++,
G(this, bi) === 1 && (he(this, zo, Sv.subscribe(async e=>{
e && (await this.resumePausedMutations(),
G(this, bt).onFocus())
}
)),
he(this, Uo, xd.subscribe(async e=>{
e && (await this.resumePausedMutations(),
G(this, bt).onOnline())
}
)))
}
unmount() {
var e, t;
Iu(this, bi)._--,
G(this, bi) === 0 && ((e = G(this, zo)) == null || e.call(this),
he(this, zo, void 0),
(t = G(this, Uo)) == null || t.call(this),
he(this, Uo, void 0))
}
isFetching(e) {
return G(this, bt).findAll({
...e,
fetchStatus: "fetching"
}).length
}
isMutating(e) {
return G(this, wi).findAll({
...e,
status: "pending"
}).length
}
getQueryData(e) {
var n;
const t = this.defaultQueryOptions({
queryKey: e
});
return (n = G(this, bt).get(t.queryHash)) == null ? void 0 : n.state.data
}
ensureQueryData(e) {
const t = this.getQueryData(e.queryKey);
if (t === void 0)
return this.fetchQuery(e);
{
const n = this.defaultQueryOptions(e)
, r = G(this, bt).build(this, n);
return e.revalidateIfStale && r.isStaleByTime(Ao(n.staleTime, r)) && this.prefetchQuery(n),
Promise.resolve(t)
}
}
getQueriesData(e) {
return G(this, bt).findAll(e).map(({queryKey: t, state: n})=>{
const r = n.data;
return [t, r]
}
)
}
setQueryData(e, t, n) {
const r = this.defaultQueryOptions({
queryKey: e
})
, i = G(this, bt).get(r.queryHash)
, s = i == null ? void 0 : i.state.data
, o = tD(t, s);
if (o !== void 0)
return G(this, bt).build(this, r).setData(o, {
...n,
manual: !0
})
}
setQueriesData(e, t, n) {
return Dt.batch(()=>G(this, bt).findAll(e).map(({queryKey: r})=>[r, this.setQueryData(r, t, n)]))
}
getQueryState(e) {
var n;
const t = this.defaultQueryOptions({
queryKey: e
});
return (n = G(this, bt).get(t.queryHash)) == null ? void 0 : n.state
}
removeQueries(e) {
const t = G(this, bt);
Dt.batch(()=>{
t.findAll(e).forEach(n=>{
t.remove(n)
}
)
}
)
}
resetQueries(e, t) {
const n = G(this, bt)
, r = {
type: "active",
...e
};
return Dt.batch(()=>(n.findAll(e).forEach(i=>{
i.reset()
}
),
this.refetchQueries(r, t)))
}
cancelQueries(e={}, t={}) {
const n = {
revert: !0,
...t
}
, r = Dt.batch(()=>G(this, bt).findAll(e).map(i=>i.cancel(n)));
return Promise.all(r).then(Bn).catch(Bn)
}
invalidateQueries(e={}, t={}) {
return Dt.batch(()=>{
if (G(this, bt).findAll(e).forEach(r=>{
r.invalidate()
}
),
e.refetchType === "none")
return Promise.resolve();
const n = {
...e,
type: e.refetchType ?? e.type ?? "active"
};
return this.refetchQueries(n, t)
}
)
}
refetchQueries(e={}, t) {
const n = {
...t,
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
}
, r = Dt.batch(()=>G(this, bt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{
let s = i.fetch(void 0, n);
return n.throwOnError || (s = s.catch(Bn)),
i.state.fetchStatus === "paused" ? Promise.resolve() : s
}
));
return Promise.all(r).then(Bn)
}
fetchQuery(e) {
const t = this.defaultQueryOptions(e);
t.retry === void 0 && (t.retry = !1);
const n = G(this, bt).build(this, t);
return n.isStaleByTime(Ao(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data)
}
prefetchQuery(e) {
return this.fetchQuery(e).then(Bn).catch(Bn)
}
fetchInfiniteQuery(e) {
return e.behavior = pD(e.pages),
this.fetchQuery(e)
}
prefetchInfiniteQuery(e) {
return this.fetchInfiniteQuery(e).then(Bn).catch(Bn)
}
resumePausedMutations() {
return xd.isOnline() ? G(this, wi).resumePausedMutations() : Promise.resolve()
}
getQueryCache() {
return G(this, bt)
}
getMutationCache() {
return G(this, wi)
}
getDefaultOptions() {
return G(this, xi)
}
setDefaultOptions(e) {
he(this, xi, e)
}
setQueryDefaults(e, t) {
G(this, Fo).set(Ls(e), {
queryKey: e,
defaultOptions: t
})
}
getQueryDefaults(e) {
const t = [...G(this, Fo).values()];
let n = {};
return t.forEach(r=>{
jl(e, r.queryKey) && (n = {
...n,
...r.defaultOptions
})
}
),
n
}
setMutationDefaults(e, t) {
G(this, Vo).set(Ls(e), {
mutationKey: e,
defaultOptions: t
})
}
getMutationDefaults(e) {
const t = [...G(this, Vo).values()];
let n = {};
return t.forEach(r=>{
jl(e, r.mutationKey) && (n = {
...n,
...r.defaultOptions
})
}
),
n
}
defaultQueryOptions(e) {
if (e._defaulted)
return e;
const t = {
...G(this, xi).queries,
...this.getQueryDefaults(e.queryKey),
...e,
_defaulted: !0
};
return t.queryHash || (t.queryHash = bv(t.queryKey, t)),
t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"),
t.throwOnError === void 0 && (t.throwOnError = !!t.suspense),
!t.networkMode && t.persister && (t.networkMode = "offlineFirst"),
t.enabled !== !0 && t.queryFn === QE && (t.enabled = !1),
t
}
defaultMutationOptions(e) {
return e != null && e._defaulted ? e : {
...G(this, xi).mutations,
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
...e,
_defaulted: !0
}
}
clear() {
G(this, bt).clear(),
G(this, wi).clear()
}
}
,
bt = new WeakMap,
wi = new WeakMap,
xi = new WeakMap,
Fo = new WeakMap,
Vo = new WeakMap,
bi = new WeakMap,
zo = new WeakMap,
Uo = new WeakMap,
rb), yn, Ye, iu, dn, ys, Bo, Cr, su, Ho, Wo, ws, xs, Si, Go, bs, qa, ou, hm, au, pm, lu, mm, uu, gm, cu, vm, du, ym, fu, wm, Yd, rC, ib, vD = (ib = class extends ga {
constructor(t, n) {
super();
xe(this, bs);
xe(this, ou);
xe(this, au);
xe(this, lu);
xe(this, uu);
xe(this, cu);
xe(this, du);
xe(this, fu);
xe(this, Yd);
xe(this, yn, void 0);
xe(this, Ye, void 0);
xe(this, iu, void 0);
xe(this, dn, void 0);
xe(this, ys, void 0);
xe(this, Bo, void 0);
xe(this, Cr, void 0);
xe(this, su, void 0);
xe(this, Ho, void 0);
xe(this, Wo, void 0);
xe(this, ws, void 0);
xe(this, xs, void 0);
xe(this, Si, void 0);
xe(this, Go, new Set);
this.options = n,
he(this, yn, t),
he(this, Cr, null),
this.bindMethods(),
this.setOptions(n)
}
bindMethods() {
this.refetch = this.refetch.bind(this)
}
onSubscribe() {
this.listeners.size === 1 && (G(this, Ye).addObserver(this),
y1(G(this, Ye), this.options) ? Ie(this, bs, qa).call(this) : this.updateResult(),
Ie(this, uu, gm).call(this))
}
onUnsubscribe() {
this.hasListeners() || this.destroy()
}
shouldFetchOnReconnect() {
return xm(G(this, Ye), this.options, this.options.refetchOnReconnect)
}
shouldFetchOnWindowFocus() {
return xm(G(this, Ye), this.options, this.options.refetchOnWindowFocus)
}
destroy() {
this.listeners = new Set,
Ie(this, cu, vm).call(this),
Ie(this, du, ym).call(this),
G(this, Ye).removeObserver(this)
}
setOptions(t, n) {
const r = this.options
, i = G(this, Ye);
if (this.options = G(this, yn).defaultQueryOptions(t),
this.options.enabled !== void 0 && typeof this.options.enabled != "boolean")
throw new Error("Expected enabled to be a boolean");
Ie(this, fu, wm).call(this),
G(this, Ye).setOptions(this.options),
r._defaulted && !wd(this.options, r) && G(this, yn).getQueryCache().notify({
type: "observerOptionsUpdated",
query: G(this, Ye),
observer: this
});
const s = this.hasListeners();
s && w1(G(this, Ye), i, this.options, r) && Ie(this, bs, qa).call(this),
this.updateResult(n),
s && (G(this, Ye) !== i || this.options.enabled !== r.enabled || Ao(this.options.staleTime, G(this, Ye)) !== Ao(r.staleTime, G(this, Ye))) && Ie(this, ou, hm).call(this);
const o = Ie(this, au, pm).call(this);
s && (G(this, Ye) !== i || this.options.enabled !== r.enabled || o !== G(this, Si)) && Ie(this, lu, mm).call(this, o)
}
getOptimisticResult(t) {
const n = G(this, yn).getQueryCache().build(G(this, yn), t)
, r = this.createResult(n, t);
return wD(this, r) && (he(this, dn, r),
he(this, Bo, this.options),
he(this, ys, G(this, Ye).state)),
r
}
getCurrentResult() {
return G(this, dn)
}
trackResult(t, n) {
const r = {};
return Object.keys(t).forEach(i=>{
Object.defineProperty(r, i, {
configurable: !1,
enumerable: !0,
get: ()=>(this.trackProp(i),
n == null || n(i),
t[i])
})
}
),
r
}
trackProp(t) {
G(this, Go).add(t)
}
getCurrentQuery() {
return G(this, Ye)
}
refetch({...t}={}) {
return this.fetch({
...t
})
}
fetchOptimistic(t) {
const n = G(this, yn).defaultQueryOptions(t)
, r = G(this, yn).getQueryCache().build(G(this, yn), n);
return r.isFetchingOptimistic = !0,
r.fetch().then(()=>this.createResult(r, n))
}
fetch(t) {
return Ie(this, bs, qa).call(this, {
...t,
cancelRefetch: t.cancelRefetch ?? !0
}).then(()=>(this.updateResult(),
G(this, dn)))
}
createResult(t, n) {
var C;
const r = G(this, Ye)
, i = this.options
, s = G(this, dn)
, o = G(this, ys)
, a = G(this, Bo)
, u = t !== r ? t.state : G(this, iu)
, {state: c} = t;
let d = {
...c
}, f = !1, h;
if (n._optimisticResults) {
const P = this.hasListeners()
, A = !P && y1(t, n)
, B = P && w1(t, r, n, i);
(A || B) && (d = {
...d,
...tC(c.data, t.options)
}),
n._optimisticResults === "isRestoring" && (d.fetchStatus = "idle")
}
let {error: m, errorUpdatedAt: p, status: b} = d;
if (n.select && d.data !== void 0)
if (s && d.data === (o == null ? void 0 : o.data) && n.select === G(this, su))
h = G(this, Ho);
else
try {
he(this, su, n.select),
h = n.select(d.data),
h = fm(s == null ? void 0 : s.data, h, n),
he(this, Ho, h),
he(this, Cr, null)
} catch (P) {
he(this, Cr, P)
}
else
h = d.data;
if (n.placeholderData !== void 0 && h === void 0 && b === "pending") {
let P;
if (s != null && s.isPlaceholderData && n.placeholderData === (a == null ? void 0 : a.placeholderData))
P = s.data;
else if (P = typeof n.placeholderData == "function" ? n.placeholderData((C = G(this, Wo)) == null ? void 0 : C.state.data, G(this, Wo)) : n.placeholderData,
n.select && P !== void 0)
try {
P = n.select(P),
he(this, Cr, null)
} catch (A) {
he(this, Cr, A)
}
P !== void 0 && (b = "success",
h = fm(s == null ? void 0 : s.data, P, n),
f = !0)
}
G(this, Cr) && (m = G(this, Cr),
h = G(this, Ho),
p = Date.now(),
b = "error");
const v = d.fetchStatus === "fetching"
, g = b === "pending"
, w = b === "error"
, E = g && v
, D = h !== void 0;
return {
status: b,
fetchStatus: d.fetchStatus,
isPending: g,
isSuccess: b === "success",
isError: w,
isInitialLoading: E,
isLoading: E,
data: h,
dataUpdatedAt: d.dataUpdatedAt,
error: m,
errorUpdatedAt: p,
failureCount: d.fetchFailureCount,
failureReason: d.fetchFailureReason,
errorUpdateCount: d.errorUpdateCount,
isFetched: d.dataUpdateCount > 0 || d.errorUpdateCount > 0,
isFetchedAfterMount: d.dataUpdateCount > u.dataUpdateCount || d.errorUpdateCount > u.errorUpdateCount,
isFetching: v,
isRefetching: v && !g,
isLoadingError: w && !D,
isPaused: d.fetchStatus === "paused",
isPlaceholderData: f,
isRefetchError: w && D,
isStale: Ev(t, n),
refetch: this.refetch
}
}
updateResult(t) {
const n = G(this, dn)
, r = this.createResult(G(this, Ye), this.options);
if (he(this, ys, G(this, Ye).state),
he(this, Bo, this.options),
G(this, ys).data !== void 0 && he(this, Wo, G(this, Ye)),
wd(r, n))
return;
he(this, dn, r);
const i = {}
, s = ()=>{
if (!n)
return !0;
const {notifyOnChangeProps: o} = this.options
, a = typeof o == "function" ? o() : o;
if (a === "all" || !a && !G(this, Go).size)
return !0;
const l = new Set(a ?? G(this, Go));
return this.options.throwOnError && l.add("error"),
Object.keys(G(this, dn)).some(u=>{
const c = u;
return G(this, dn)[c] !== n[c] && l.has(c)
}
)
}
;
(t == null ? void 0 : t.listeners) !== !1 && s() && (i.listeners = !0),
Ie(this, Yd, rC).call(this, {
...i,
...t
})
}
onQueryUpdate() {
this.updateResult(),
this.hasListeners() && Ie(this, uu, gm).call(this)
}
}
,
yn = new WeakMap,
Ye = new WeakMap,
iu = new WeakMap,
dn = new WeakMap,
ys = new WeakMap,
Bo = new WeakMap,
Cr = new WeakMap,
su = new WeakMap,
Ho = new WeakMap,
Wo = new WeakMap,
ws = new WeakMap,
xs = new WeakMap,
Si = new WeakMap,
Go = new WeakMap,
bs = new WeakSet,
qa = function(t) {
Ie(this, fu, wm).call(this);
let n = G(this, Ye).fetch(this.options, t);
return t != null && t.throwOnError || (n = n.catch(Bn)),
n
}
,
ou = new WeakSet,
hm = function() {
Ie(this, cu, vm).call(this);
const t = Ao(this.options.staleTime, G(this, Ye));
if (na || G(this, dn).isStale || !cm(t))
return;
const r = KE(G(this, dn).dataUpdatedAt, t) + 1;
he(this, ws, setTimeout(()=>{
G(this, dn).isStale || this.updateResult()
}
, r))
}
,
au = new WeakSet,
pm = function() {
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(G(this, Ye)) : this.options.refetchInterval) ?? !1
}
,
lu = new WeakSet,
mm = function(t) {
Ie(this, du, ym).call(this),
he(this, Si, t),
!(na || this.options.enabled === !1 || !cm(G(this, Si)) || G(this, Si) === 0) && he(this, xs, setInterval(()=>{
(this.options.refetchIntervalInBackground || Sv.isFocused()) && Ie(this, bs, qa).call(this)
}
, G(this, Si)))
}
,
uu = new WeakSet,
gm = function() {
Ie(this, ou, hm).call(this),
Ie(this, lu, mm).call(this, Ie(this, au, pm).call(this))
}
,
cu = new WeakSet,
vm = function() {
G(this, ws) && (clearTimeout(G(this, ws)),
he(this, ws, void 0))
}
,
du = new WeakSet,
ym = function() {
G(this, xs) && (clearInterval(G(this, xs)),
he(this, xs, void 0))
}
,
fu = new WeakSet,
wm = function() {
const t = G(this, yn).getQueryCache().build(G(this, yn), this.options);
if (t === G(this, Ye))
return;
const n = G(this, Ye);
he(this, Ye, t),
he(this, iu, t.state),
this.hasListeners() && (n == null || n.removeObserver(this),
t.addObserver(this))
}
,
Yd = new WeakSet,
rC = function(t) {
Dt.batch(()=>{
t.listeners && this.listeners.forEach(n=>{
n(G(this, dn))
}
),
G(this, yn).getQueryCache().notify({
query: G(this, Ye),
type: "observerResultsUpdated"
})
}
)
}
,
ib);
function yD(e, t) {
return t.enabled !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1)
}
function y1(e, t) {
return yD(e, t) || e.state.data !== void 0 && xm(e, t, t.refetchOnMount)
}
function xm(e, t, n) {
if (t.enabled !== !1) {
const r = typeof n == "function" ? n(e) : n;
return r === "always" || r !== !1 && Ev(e, t)
}
return !1
}
function w1(e, t, n, r) {
return (e !== t || r.enabled === !1) && (!n.suspense || e.state.status !== "error") && Ev(e, n)
}
function Ev(e, t) {
return t.enabled !== !1 && e.isStaleByTime(Ao(t.staleTime, e))
}
function wD(e, t) {
return !wd(e.getCurrentResult(), t)
}
var Ei, Ci, wn, $r, Ko, Dc, hu, bm, sb, xD = (sb = class extends ga {
constructor(n, r) {
super();
xe(this, Ko);
xe(this, hu);
xe(this, Ei, void 0);
xe(this, Ci, void 0);
xe(this, wn, void 0);
xe(this, $r, void 0);
he(this, Ei, n),
this.setOptions(r),
this.bindMethods(),
Ie(this, Ko, Dc).call(this)
}
bindMethods() {
this.mutate = this.mutate.bind(this),
this.reset = this.reset.bind(this)
}
setOptions(n) {
var i;
const r = this.options;
this.options = G(this, Ei).defaultMutationOptions(n),
wd(this.options, r) || G(this, Ei).getMutationCache().notify({
type: "observerOptionsUpdated",
mutation: G(this, wn),
observer: this
}),
r != null && r.mutationKey && this.options.mutationKey && Ls(r.mutationKey) !== Ls(this.options.mutationKey) ? this.reset() : ((i = G(this, wn)) == null ? void 0 : i.state.status) === "pending" && G(this, wn).setOptions(this.options)
}
onUnsubscribe() {
var n;
this.hasListeners() || (n = G(this, wn)) == null || n.removeObserver(this)
}
onMutationUpdate(n) {
Ie(this, Ko, Dc).call(this),
Ie(this, hu, bm).call(this, n)
}
getCurrentResult() {
return G(this, Ci)
}
reset() {
var n;
(n = G(this, wn)) == null || n.removeObserver(this),
he(this, wn, void 0),
Ie(this, Ko, Dc).call(this),
Ie(this, hu, bm).call(this)
}
mutate(n, r) {
var i;
return he(this, $r, r),
(i = G(this, wn)) == null || i.removeObserver(this),
he(this, wn, G(this, Ei).getMutationCache().build(G(this, Ei), this.options)),
G(this, wn).addObserver(this),
G(this, wn).execute(n)
}
}
,
Ei = new WeakMap,
Ci = new WeakMap,
wn = new WeakMap,
$r = new WeakMap,
Ko = new WeakSet,
Dc = function() {
var r;
const n = ((r = G(this, wn)) == null ? void 0 : r.state) ?? nC();
he(this, Ci, {
...n,
isPending: n.status === "pending",
isSuccess: n.status === "success",
isError: n.status === "error",
isIdle: n.status === "idle",
mutate: this.mutate,
reset: this.reset
})
}
,
hu = new WeakSet,
bm = function(n) {
Dt.batch(()=>{
var r, i, s, o, a, l, u, c;
if (G(this, $r) && this.hasListeners()) {
const d = G(this, Ci).variables
, f = G(this, Ci).context;
(n == null ? void 0 : n.type) === "success" ? ((i = (r = G(this, $r)).onSuccess) == null || i.call(r, n.data, d, f),
(o = (s = G(this, $r)).onSettled) == null || o.call(s, n.data, null, d, f)) : (n == null ? void 0 : n.type) === "error" && ((l = (a = G(this, $r)).onError) == null || l.call(a, n.error, d, f),
(c = (u = G(this, $r)).onSettled) == null || c.call(u, void 0, n.error, d, f))
}
this.listeners.forEach(d=>{
d(G(this, Ci))
}
)
}
)
}
,
sb), iC = y.createContext(void 0), gf = e=>{
const t = y.useContext(iC);
if (!t)
throw new Error("No QueryClient set, use QueryClientProvider to set one");
return t
}
, bD = ({client: e, children: t})=>(y.useEffect(()=>(e.mount(),
()=>{
e.unmount()
}
), [e]),
x.jsx(iC.Provider, {
value: e,
children: t
})), sC = y.createContext(!1), SD = ()=>y.useContext(sC);
sC.Provider;
function ED() {
let e = !1;
return {
clearReset: ()=>{
e = !1
}
,
reset: ()=>{
e = !0
}
,
isReset: ()=>e
}
}
var CD = y.createContext(ED())
, PD = ()=>y.useContext(CD);
function oC(e, t) {
return typeof e == "function" ? e(...t) : !!e
}
function TD() {}
var RD = (e,t)=>{
(e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1))
}
, OD = e=>{
y.useEffect(()=>{
e.clearReset()
}
, [e])
}
, kD = ({result: e, errorResetBoundary: t, throwOnError: n, query: r})=>e.isError && !t.isReset() && !e.isFetching && r && oC(n, [e.error, r])
, _D = e=>{
e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3)
}
, AD = (e,t)=>(e == null ? void 0 : e.suspense) && t.isPending
, DD = (e,t,n)=>t.fetchOptimistic(e).catch(()=>{
n.clearReset()
}
);
function LD(e, t, n) {
const r = gf()
, i = SD()
, s = PD()
, o = r.defaultQueryOptions(e);
o._optimisticResults = i ? "isRestoring" : "optimistic",
_D(o),
RD(o, s),
OD(s);
const [a] = y.useState(()=>new t(r,o))
, l = a.getOptimisticResult(o);
if (y.useSyncExternalStore(y.useCallback(u=>{
const c = i ? ()=>{}
: a.subscribe(Dt.batchCalls(u));
return a.updateResult(),
c
}
, [a, i]), ()=>a.getCurrentResult(), ()=>a.getCurrentResult()),
y.useEffect(()=>{
a.setOptions(o, {
listeners: !1
})
}
, [o, a]),
AD(o, l))
throw DD(o, a, s);
if (kD({
result: l,
errorResetBoundary: s,
throwOnError: o.throwOnError,
query: r.getQueryCache().get(o.queryHash)
}))
throw l.error;
return o.notifyOnChangeProps ? l : a.trackResult(l)
}
function vf(e, t) {
return LD(e, vD)
}
function Us(e, t) {
const n = gf()
, [r] = y.useState(()=>new xD(n,e));
y.useEffect(()=>{
r.setOptions(e)
}
, [r, e]);
const i = y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Dt.batchCalls(o)), [r]), ()=>r.getCurrentResult(), ()=>r.getCurrentResult())
, s = y.useCallback((o,a)=>{
r.mutate(o, a).catch(TD)
}
, [r]);
if (i.error && oC(r.options.throwOnError, [i.error]))
throw i.error;
return {
...i,
mutate: s,
mutateAsync: i.mutate
}
}
const ND = ()=>{
const e = gf();
return async n=>{
await e.cancelQueries({
queryKey: n
})
}
}
;
var jt = {
VITE_API_URL: "https://your-url.com/api",
VITE_GA_ID: "G-BCZKLGL3D0",
VITE_BOT_NAME: "your_tap_bot",
BASE_URL: "/",
MODE: "production",
DEV: !1,
PROD: !0,
SSR: !1
};
let MD = 0;
function aC(e, t) {
const n = `atom${++MD}`
, r = {
toString: ()=>n
};
return typeof e == "function" ? r.read = e : (r.init = e,
r.read = jD,
r.write = $D),
r
}
function jD(e) {
return e(this)
}
function $D(e, t, n) {
return t(this, typeof n == "function" ? n(e(this)) : n)
}
const Sh = (e,t)=>e.unstable_is ? e.unstable_is(t) : t === e
, Eh = e=>"init"in e
, Ch = e=>!!e.write
, bd = new WeakMap
, ID = (e,t)=>{
bd.set(e, t),
e.catch(()=>{}
).finally(()=>bd.delete(e))
}
, x1 = (e,t)=>{
const n = bd.get(e);
n && (bd.delete(e),
n(t))
}
, b1 = (e,t)=>{
e.status = "fulfilled",
e.value = t
}
, S1 = (e,t)=>{
e.status = "rejected",
e.reason = t
}
, FD = e=>typeof (e == null ? void 0 : e.then) == "function"
, ja = (e,t)=>!!e && "v"in e && "v"in t && Object.is(e.v, t.v)
, E1 = (e,t)=>!!e && "e"in e && "e"in t && Object.is(e.e, t.e)
, Xs = e=>!!e && "v"in e && e.v instanceof Promise
, VD = (e,t)=>"v"in e && "v"in t && e.v.orig && e.v.orig === t.v.orig
, sc = e=>{
if ("e"in e)
throw e.e;
return e.v
}
, zD = ()=>{
const e = new WeakMap
, t = new WeakMap
, n = []
, r = new WeakMap;
let i, s;
(jt ? "production" : void 0) !== "production" && (i = new Set,
s = new Set);
const o = P=>e.get(P)
, a = (P,A)=>{
A.d.forEach((B,Q)=>{
if (!r.has(Q)) {
const Z = o(Q);
r.set(Q, [Z, new Set]),
Z && a(Q, Z)
}
r.get(Q)[1].add(P)
}
)
}
, l = (P,A)=>{
var B;
(jt ? "production" : void 0) !== "production" && Object.freeze(A);
const Q = o(P);
if (e.set(P, A),
(B = n[n.length - 1]) == null || B.add(P),
r.has(P) || (r.set(P, [Q, new Set]),
a(P, A)),
Xs(Q)) {
const Z = "v"in A ? A.v instanceof Promise ? A.v : Promise.resolve(A.v) : Promise.reject(A.e);
Q.v !== Z && x1(Q.v, Z)
}
}
, u = (P,A,B,Q)=>{
const Z = new Map(Q ? A.d : null);
let F = !1;
B.forEach((k,T)=>{
!k && Sh(P, T) && (k = A),
k ? (Z.set(T, k),
A.d.get(T) !== k && (F = !0)) : (jt ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found")
}
),
(F || A.d.size !== Z.size) && (A.d = Z)
}
, c = (P,A,B,Q)=>{
const Z = o(P)
, F = {
d: (Z == null ? void 0 : Z.d) || new Map,
v: A
};
if (B && u(P, F, B, Q),
ja(Z, F) && Z.d === F.d)
return Z;
if (Xs(Z) && Xs(F) && VD(Z, F)) {
if (Z.d === F.d)
return Z;
F.v = Z.v
}
return l(P, F),
F
}
, d = (P,A,B,Q)=>{
if (FD(A)) {
let Z;
const F = ()=>{
const T = o(P);
if (!Xs(T) || T.v !== k)
return;
const _ = c(P, k, B);
t.has(P) && T.d !== _.d && D(P, _, T.d)
}
, k = new Promise((T,_)=>{
let O = !1;
A.then(R=>{
O || (O = !0,
b1(k, R),
T(R),
F())
}
, R=>{
O || (O = !0,
S1(k, R),
_(R),
F())
}
),
Z = R=>{
O || (O = !0,
R.then(z=>b1(k, z), z=>S1(k, z)),
T(R))
}
}
);
return k.orig = A,
k.status = "pending",
ID(k, T=>{
T && Z(T),
Q == null || Q()
}
),
c(P, k, B, !0)
}
return c(P, A, B)
}
, f = (P,A,B)=>{
const Q = o(P)
, Z = {
d: (Q == null ? void 0 : Q.d) || new Map,
e: A
};
return B && u(P, Z, B),
E1(Q, Z) && Q.d === Z.d ? Q : (l(P, Z),
Z)
}
, h = (P,A)=>{
const B = o(P);
if (!(A != null && A(P)) && B && (t.has(P) || Array.from(B.d).every(([O,R])=>{
if (O === P)
return !0;
const z = h(O, A);
return z === R || ja(z, R)
}
)))
return B;
const Q = new Map;
let Z = !0;
const F = O=>{
if (Sh(P, O)) {
const z = o(O);
if (z)
return Q.set(O, z),
sc(z);
if (Eh(O))
return Q.set(O, void 0),
O.init;
throw new Error("no atom init")
}
const R = h(O, A);
return Q.set(O, R),
sc(R)
}
;
let k, T;
const _ = {
get signal() {
return k || (k = new AbortController),
k.signal
},
get setSelf() {
return (jt ? "production" : void 0) !== "production" && !Ch(P) && console.warn("setSelf function cannot be used with read-only atom"),
!T && Ch(P) && (T = (...O)=>{
if ((jt ? "production" : void 0) !== "production" && Z && console.warn("setSelf function cannot be called in sync"),
!Z)
return v(P, ...O)
}
),
T
}
};
try {
const O = P.read(F, _);
return d(P, O, Q, ()=>k == null ? void 0 : k.abort())
} catch (O) {
return f(P, O, Q)
} finally {
Z = !1
}
}
, m = P=>sc(h(P))
, p = P=>{
const A = T=>{
var _, O;
const R = new Set((_ = t.get(T)) == null ? void 0 : _.t);
return (O = r.get(T)) == null || O[1].forEach(z=>{
R.add(z)
}
),
R
}
, B = new Array
, Q = new Set
, Z = T=>{
if (!Q.has(T)) {
Q.add(T);
for (const _ of A(T))
T !== _ && Z(_);
B.push(T)
}
}
;
Z(P);
const F = new Set([P])
, k = T=>Q.has(T);
for (let T = B.length - 1; T >= 0; --T) {
const _ = B[T]
, O = o(_);
if (!O)
continue;
let R = !1;
for (const z of O.d.keys())
if (z !== _ && F.has(z)) {
R = !0;
break
}
if (R) {
const z = h(_, k);
a(_, z),
ja(O, z) || F.add(_)
}
Q.delete(_)
}
}
, b = (P,...A)=>{
const B = F=>sc(h(F))
, Q = (F,...k)=>{
const T = n.length > 0;
T || n.push(new Set([F]));
let _;
if (Sh(P, F)) {
if (!Eh(F))
throw new Error("atom not writable");
const O = o(F)
, R = d(F, k[0]);
ja(O, R) || p(F)
} else
_ = b(F, ...k);
if (!T) {
const O = V(n.pop());
(jt ? "production" : void 0) !== "production" && i.forEach(R=>R({
type: "async-write",
flushed: O
}))
}
return _
}
;
return P.write(B, Q, ...A)
}
, v = (P,...A)=>{
n.push(new Set([P]));
const B = b(P, ...A)
, Q = V(n.pop());
return (jt ? "production" : void 0) !== "production" && i.forEach(Z=>Z({
type: "write",
flushed: Q
})),
B
}
, g = (P,A,B)=>{
var Q;
const Z = t.get(P);
if (Z)
return A && Z.t.add(A),
Z;
const F = B || [];
(Q = o(P)) == null || Q.d.forEach((T,_)=>{
_ !== P && g(_, P, F)
}
),
h(P);
const k = {
t: new Set(A && [A]),
l: new Set
};
if (t.set(P, k),
(jt ? "production" : void 0) !== "production" && s.add(P),
Ch(P) && P.onMount) {
const {onMount: T} = P;
F.push(()=>{
const _ = T((...O)=>v(P, ...O));
_ && (k.u = _)
}
)
}
return B || F.forEach(T=>T()),
k
}
, w = (P,A)=>!A.l.size && (!A.t.size || A.t.size === 1 && A.t.has(P))
, E = (P,A)=>{
if (!w(P, A))
return;
const B = A.u;
B && B(),
t.delete(P),
(jt ? "production" : void 0) !== "production" && s.delete(P);
const Q = o(P);
Q ? (Xs(Q) && x1(Q.v),
Q.d.forEach((Z,F)=>{
if (F !== P) {
const k = t.get(F);
k && (k.t.delete(P),
E(F, k))
}
}
)) : (jt ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", P)
}
, D = (P,A,B)=>{
const Q = new Set(A.d.keys())
, Z = new Set;
B == null || B.forEach((F,k)=>{
if (Q.has(k)) {
Q.delete(k);
return
}
Z.add(k);
const T = t.get(k);
T && T.t.delete(P)
}
),
Q.forEach(F=>{
g(F, P)
}
),
Z.forEach(F=>{
const k = t.get(F);
k && E(F, k)
}
)
}
, V = P=>{
let A;
(jt ? "production" : void 0) !== "production" && (A = new Set);
const B = []
, Q = Z=>{
var F;
if (!r.has(Z))
return;
const [k,T] = r.get(Z);
r.delete(Z),
B.push([Z, k]),
T.forEach(Q),
(F = o(Z)) == null || F.d.forEach((_,O)=>Q(O))
}
;
if (P.forEach(Q),
B.forEach(([Z,F])=>{
const k = o(Z);
if (!k) {
(jt ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
return
}
if (k !== F) {
const T = t.get(Z);
T && k.d !== (F == null ? void 0 : F.d) && D(Z, k, F == null ? void 0 : F.d),
T && !(!Xs(F) && (ja(F, k) || E1(F, k))) && (T.l.forEach(_=>_()),
(jt ? "production" : void 0) !== "production" && A.add(Z))
}
}
),
(jt ? "production" : void 0) !== "production")
return A
}
, C = (P,A)=>{
const B = g(P)
, Q = V([P])
, Z = B.l;
return Z.add(A),
(jt ? "production" : void 0) !== "production" && i.forEach(F=>F({
type: "sub",
flushed: Q
})),
()=>{
Z.delete(A),
E(P, B),
(jt ? "production" : void 0) !== "production" && i.forEach(F=>F({
type: "unsub"
}))
}
}
;
return (jt ? "production" : void 0) !== "production" ? {
get: m,
set: v,
sub: C,
dev_subscribe_store: P=>(i.add(P),
()=>{
i.delete(P)
}
),
dev_get_mounted_atoms: ()=>s.values(),
dev_get_atom_state: P=>e.get(P),
dev_get_mounted: P=>t.get(P),
dev_restore_atoms: P=>{
n.push(new Set);
for (const [B,Q] of P)
Eh(B) && (d(B, Q),
p(B));
const A = V(n.pop());
i.forEach(B=>B({
type: "restore",
flushed: A
}))
}
} : {
get: m,
set: v,
sub: C
}
}
;
let $a;
const UD = ()=>($a || ($a = zD(),
(jt ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = $a),
globalThis.__JOTAI_DEFAULT_STORE__ !== $a && console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),
$a)
, BD = UD;
var HD = {
VITE_API_URL: "https://your-url.com/api",
VITE_GA_ID: "G-BCZKLGL3D0",
VITE_BOT_NAME: "your_tap_bot",
BASE_URL: "/",
MODE: "production",
DEV: !1,
PROD: !0,
SSR: !1
};
const WD = y.createContext(void 0)
, lC = e=>y.useContext(WD) || BD()
, GD = e=>typeof (e == null ? void 0 : e.then) == "function"
, KD = ce.use || (e=>{
if (e.status === "pending")
throw e;
if (e.status === "fulfilled")
return e.value;
throw e.status === "rejected" ? e.reason : (e.status = "pending",
e.then(t=>{
e.status = "fulfilled",
e.value = t
}
, t=>{
e.status = "rejected",
e.reason = t
}
),
e)
}
);
function Vt(e, t) {
const n = lC()
, [[r,i,s],o] = y.useReducer(u=>{
const c = n.get(e);
return Object.is(u[0], c) && u[1] === n && u[2] === e ? u : [c, n, e]
}
, void 0, ()=>[n.get(e), n, e]);
let a = r;
return (i !== n || s !== e) && (o(),
a = n.get(e)),
y.useEffect(()=>{
const u = n.sub(e, ()=>{
o()
}
);
return o(),
u
}
, [n, e, void 0]),
y.useDebugValue(a),
GD(a) ? KD(a) : a
}
function uC(e, t) {
const n = lC();
return y.useCallback((...i)=>{
if ((HD ? "production" : void 0) !== "production" && !("write"in e))
throw new Error("not writable atom");
return n.set(e, ...i)
}
, [n, e])
}
function qD(e, t) {
return [Vt(e), uC(e)]
}
const QD = aC({
leagues: !1,
referrals: !1
})
, yf = e=>{
const [t,n] = qD(QD);
if (e === "all")
return {
isDialogOpen: Object.values(t).some(s=>s),
setIsDialogOpen: ()=>{
n(s=>{
const o = {
...s
};
return Object.keys(o).forEach(a=>{
o[a] = !1
}
),
o
}
)
}
};
const r = s=>{
n(o=>({
...o,
[e]: s
}))
}
;
return {
isDialogOpen: t[e],
setIsDialogOpen: r
}
}
, YD = ()=>/iPad|iPhone|iPod/i.test(navigator.userAgent)
, Js = 2
, XD = ()=>{
const e = YD()
, {pathname: t} = Qi()
, n = t === "/"
, r = y.useRef()
, i = y.useRef(null);
y.useLayoutEffect(()=>{
i.current = document.getElementById("root")
}
, []);
const s = u=>{
u ? (document.documentElement.classList.add("html"),
document.body.style.marginTop = `${Js}px`,
document.body.style.height = window.innerHeight + Js + "px",
document.body.style.paddingBottom = `${Js}px`,
window.scrollTo(0, Js)) : (document.documentElement.classList.remove("html"),
document.body.removeAttribute("style"),
window.scrollTo(0, 0))
}
, o = y.useCallback(u=>{
r.current = u.touches[0].clientY
}
, [])
, a = y.useCallback(u=>{
const c = i.current;
if (c) {
const d = c.scrollTop
, f = u.changedTouches[0].clientY;
d <= 0 && r.current < f && u.preventDefault()
} else
u.preventDefault()
}
, [])
, l = y.useCallback(()=>{
const u = i.current;
window.scrollY < Js && (window.scrollTo(0, Js),
u && u.scrollTo(0, 0))
}
, []);
y.useEffect(()=>(Telegram.WebApp.expand(),
n ? (s(!0),
document.documentElement.addEventListener("touchstart", o, {
passive: !1
}),
document.documentElement.addEventListener("touchmove", a, {
passive: !1
}),
window.addEventListener("scroll", l, {
passive: !0
})) : (console.log("removing everything"),
s(!1),
document.documentElement.removeEventListener("touchstart", o),
document.documentElement.removeEventListener("touchmove", a),
window.removeEventListener("scroll", l)),
()=>{
s(!1),
document.documentElement.removeEventListener("touchstart", o),
document.documentElement.removeEventListener("touchmove", a),
window.removeEventListener("scroll", l)
}
), [n, e, l, a, o])
}
;
var ar = (e=>(e[e.new = 0] = "new",
e[e.started = 1] = "started",
e[e.completed = 2] = "completed",
e[e.claimed = 3] = "claimed",
e))(ar || {})
, Kn = (e=>(e[e.new = 0] = "new",
e[e.started = 1] = "started",
e[e.checking = 2] = "checking",
e[e.completed = 3] = "completed",
e))(Kn || {});
const cC = ()=>{
const {user: e} = Et();
return e ? e.missions.some(t=>t.status !== ar.completed) : !1
}
, JD = {
1: 5e3,
3: 1e5,
10: 4e5,
25: 5e5,
50: 6e5,
100: 1e6,
500: 4e6,
1e3: 25e5,
1e4: 1e7,
1e5: 1e8
}
, ZD = {
wooden: 0,
bronze: 1e3,
silver: 5e3,
gold: 1e4,
platinum: 3e4,
diamond: 5e4,
master: 1e5,
grandmaster: 25e4,
elite: 5e5,
legendary: 1e6,
mythic: 5e6
};
var eL = {
VITE_API_URL: "https://your-url.com/api",
VITE_GA_ID: "G-BCZKLGL3D0",
VITE_BOT_NAME: "your_tap_bot",
BASE_URL: "/",
MODE: "production",
DEV: !1,
PROD: !0,
SSR: !1
};
const C1 = e=>{
let t;
const n = new Set
, r = (c,d)=>{
const f = typeof c == "function" ? c(t) : c;
if (!Object.is(f, t)) {
const h = t;
t = d ?? (typeof f != "object" || f === null) ? f : Object.assign({}, t, f),
n.forEach(m=>m(t, h))
}
}
, i = ()=>t
, l = {
setState: r,
getState: i,
getInitialState: ()=>u,
subscribe: c=>(n.add(c),
()=>n.delete(c)),
destroy: ()=>{
(eL ? "production" : void 0) !== "production" && console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),
n.clear()
}
}
, u = t = e(r, i, l);
return l
}
, tL = e=>e ? C1(e) : C1;
var dC = {
exports: {}
}
, fC = {}
, hC = {
exports: {}
}
, pC = {};
/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ra = y;
function nL(e, t) {
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t
}
var rL = typeof Object.is == "function" ? Object.is : nL
, iL = ra.useState
, sL = ra.useEffect
, oL = ra.useLayoutEffect
, aL = ra.useDebugValue;
function lL(e, t) {
var n = t()
, r = iL({
inst: {
value: n,
getSnapshot: t
}
})
, i = r[0].inst
, s = r[1];
return oL(function() {
i.value = n,
i.getSnapshot = t,
Ph(i) && s({
inst: i
})
}, [e, n, t]),
sL(function() {
return Ph(i) && s({
inst: i
}),
e(function() {
Ph(i) && s({
inst: i
})
})
}, [e]),
aL(n),
n
}
function Ph(e) {
var t = e.getSnapshot;
e = e.value;
try {
var n = t();
return !rL(e, n)
} catch {
return !0
}
}
function uL(e, t) {
return t()
}
var cL = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? uL : lL;
pC.useSyncExternalStore = ra.useSyncExternalStore !== void 0 ? ra.useSyncExternalStore : cL;
hC.exports = pC;
var dL = hC.exports;
/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var wf = y
, fL = dL;
function hL(e, t) {
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t
}
var pL = typeof Object.is == "function" ? Object.is : hL
, mL = fL.useSyncExternalStore
, gL = wf.useRef
, vL = wf.useEffect
, yL = wf.useMemo
, wL = wf.useDebugValue;
fC.useSyncExternalStoreWithSelector = function(e, t, n, r, i) {
var s = gL(null);
if (s.current === null) {
var o = {
hasValue: !1,
value: null
};
s.current = o
} else
o = s.current;
s = yL(function() {
function l(h) {
if (!u) {
if (u = !0,
c = h,
h = r(h),
i !== void 0 && o.hasValue) {
var m = o.value;
if (i(m, h))
return d = m
}
return d = h
}
if (m = d,
pL(c, h))
return m;
var p = r(h);
return i !== void 0 && i(m, p) ? m : (c = h,
d = p)
}
var u = !1, c, d, f = n === void 0 ? null : n;
return [function() {
return l(t())
}
, f === null ? void 0 : function() {
return l(f())
}
]
}, [t, n, r, i]);
var a = mL(e, s[0], s[1]);
return vL(function() {
o.hasValue = !0,
o.value = a
}, [a]),
wL(a),
a
}
;
dC.exports = fC;
var xL = dC.exports;
const bL = pu(xL);
var mC = {
VITE_API_URL: "https://your-url.com/api",
VITE_GA_ID: "G-BCZKLGL3D0",
VITE_BOT_NAME: "your_tap_bot",
BASE_URL: "/",
MODE: "production",
DEV: !1,
PROD: !0,
SSR: !1
};
const {useDebugValue: SL} = ce
, {useSyncExternalStoreWithSelector: EL} = bL;
let P1 = !1;
const CL = e=>e;
function PL(e, t=CL, n) {
(mC ? "production" : void 0) !== "production" && n && !P1 && (console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),
P1 = !0);
const r = EL(e.subscribe, e.getState, e.getServerState || e.getInitialState, t, n);
return SL(r),
r
}
const T1 = e=>{
(mC ? "production" : void 0) !== "production" && typeof e != "function" && console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");
const t = typeof e == "function" ? tL(e) : e
, n = (r,i)=>PL(t, r, i);
return Object.assign(n, t),
n
}
, Su = e=>e ? T1(e) : T1;
var TL = {
VITE_API_URL: "https://your-url.com/api",
VITE_GA_ID: "G-BCZKLGL3D0",
VITE_BOT_NAME: "your_tap_bot",
BASE_URL: "/",
MODE: "production",
DEV: !1,
PROD: !0,
SSR: !1
};
function gC(e, t) {
let n;
try {
n = e()
} catch {
return
}
return {
getItem: i=>{
var s;
const o = l=>l === null ? null : JSON.parse(l, void 0)
, a = (s = n.getItem(i)) != null ? s : null;
return a instanceof Promise ? a.then(o) : o(a)
}
,
setItem: (i,s)=>n.setItem(i, JSON.stringify(s, void 0)),
removeItem: i=>n.removeItem(i)
}
}
const $l = e=>t=>{
try {
const n = e(t);
return n instanceof Promise ? n : {
then(r) {
return $l(r)(n)
},
catch(r) {
return this
}
}
} catch (n) {
return {
then(r) {
return this
},
catch(r) {
return $l(r)(n)
}
}
}
}
, RL = (e,t)=>(n,r,i)=>{
let s = {
getStorage: ()=>localStorage,
serialize: JSON.stringify,
deserialize: JSON.parse,
partialize: b=>b,
version: 0,
merge: (b,v)=>({
...v,
...b
}),
...t
}
, o = !1;
const a = new Set
, l = new Set;
let u;
try {
u = s.getStorage()
} catch {}
if (!u)
return e((...b)=>{
console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),
n(...b)
}
, r, i);
const c = $l(s.serialize)
, d = ()=>{
const b = s.partialize({
...r()
});
let v;
const g = c({
state: b,
version: s.version
}).then(w=>u.setItem(s.name, w)).catch(w=>{
v = w
}
);
if (v)
throw v;
return g
}
, f = i.setState;
i.setState = (b,v)=>{
f(b, v),
d()
}
;
const h = e((...b)=>{
n(...b),
d()
}
, r, i);
let m;
const p = ()=>{
var b;
if (!u)
return;
o = !1,
a.forEach(g=>g(r()));
const v = ((b = s.onRehydrateStorage) == null ? void 0 : b.call(s, r())) || void 0;
return $l(u.getItem.bind(u))(s.name).then(g=>{
if (g)
return s.deserialize(g)
}
).then(g=>{
if (g)
if (typeof g.version == "number" && g.version !== s.version) {
if (s.migrate)
return s.migrate(g.state, g.version);
console.error("State loaded from storage couldn't be migrated since no migrate function was provided")
} else
return g.state
}
).then(g=>{
var w;
return m = s.merge(g, (w = r()) != null ? w : h),
n(m, !0),
d()
}
).then(()=>{
v == null || v(m, void 0),
o = !0,
l.forEach(g=>g(m))
}
).catch(g=>{
v == null || v(void 0, g)
}
)
}
;
return i.persist = {
setOptions: b=>{
s = {
...s,
...b
},
b.getStorage && (u = b.getStorage())
}
,
clearStorage: ()=>{
u == null || u.removeItem(s.name)
}
,
getOptions: ()=>s,
rehydrate: ()=>p(),
hasHydrated: ()=>o,
onHydrate: b=>(a.add(b),
()=>{
a.delete(b)
}
),
onFinishHydration: b=>(l.add(b),
()=>{
l.delete(b)
}
)
},
p(),
m || h
}
, OL = (e,t)=>(n,r,i)=>{
let s = {
storage: gC(()=>localStorage),
partialize: p=>p,
version: 0,
merge: (p,b)=>({
...b,
...p
}),
...t
}
, o = !1;
const a = new Set
, l = new Set;
let u = s.storage;
if (!u)
return e((...p)=>{
console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),
n(...p)
}
, r, i);
const c = ()=>{
const p = s.partialize({
...r()
});
return u.setItem(s.name, {
state: p,
version: s.version
})
}
, d = i.setState;
i.setState = (p,b)=>{
d(p, b),
c()
}
;
const f = e((...p)=>{
n(...p),
c()
}
, r, i);
i.getInitialState = ()=>f;
let h;
const m = ()=>{
var p, b;
if (!u)
return;
o = !1,
a.forEach(g=>{
var w;
return g((w = r()) != null ? w : f)
}
);
const v = ((b = s.onRehydrateStorage) == null ? void 0 : b.call(s, (p = r()) != null ? p : f)) || void 0;
return $l(u.getItem.bind(u))(s.name).then(g=>{
if (g)
if (typeof g.version == "number" && g.version !== s.version) {
if (s.migrate)
return s.migrate(g.state, g.version);
console.error("State loaded from storage couldn't be migrated since no migrate function was provided")
} else
return g.state
}
).then(g=>{
var w;
return h = s.merge(g, (w = r()) != null ? w : f),
n(h, !0),
c()
}
).then(()=>{
v == null || v(h, void 0),
h = r(),
o = !0,
l.forEach(g=>g(h))
}
).catch(g=>{
v == null || v(void 0, g)
}
)
}
;
return i.persist = {
setOptions: p=>{
s = {
...s,
...p
},
p.storage && (u = p.storage)
}
,
clearStorage: ()=>{
u == null || u.removeItem(s.name)
}
,
getOptions: ()=>s,
rehydrate: ()=>m(),
hasHydrated: ()=>o,
onHydrate: p=>(a.add(p),
()=>{
a.delete(p)
}
),
onFinishHydration: p=>(l.add(p),
()=>{
l.delete(p)
}
)
},
s.skipHydration || m(),
h || f
}
, kL = (e,t)=>"getStorage"in t || "serialize"in t || "deserialize"in t ? ((TL ? "production" : void 0) !== "production" && console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),
RL(e, t)) : OL(e, t)
, _L = kL
, R1 = Su(_L(()=>({
token: null
}), {
name: "auth",
storage: gC(()=>sessionStorage)
}))
, Sd = Su()(e=>({
api: void 0,
setApi: t=>{
e({
api: t
})
}
}))
, gn = ()=>Sd(e=>e.api);
Su()(e=>({
user: {
score: 0,
balance: 0,
tappingGuruLeft: 3,
fullTankLeft: 3,
energy: 500,
energyLimit: 1,
multitap: 1,
rechargingSpeed: 1,
referrals: 0,
missions: [],
refTasks: [],
leaguesTasks: [],
totalReferralsRewards: 0,
language: "en",
diff: 0,
timestamp: 0
},
setUser: t=>{
e({
user: t
})
}
}));
const zt = aC({
score: 0,
balance: 0,
tappingGuruLeft: 3,
fullTankLeft: 3,
energy: 500,
energyLimit: 1,
multitap: 1,
rechargingSpeed: 1,
referrals: 0,
missions: [],
refTasks: [],
leaguesTasks: [],
totalReferralsRewards: 0,
language: "en",
diff: 0,
timestamp: 0
})
, ll = Su()(e=>({
tapsInc: 0,
initTimestamp: 0,
addTaps: t=>{
e(n=>{
const r = n.initTimestamp === 0;
return {
tapsInc: n.tapsInc + t,
...r ? {
initTimestamp: Date.now()
} : {}
}
}
)
}
,
resetTaps: ()=>{
e({
tapsInc: 0,
initTimestamp: 0
})
}
}))
, yo = {
wooden: 0,
bronze: 1,
silver: 5e3,
gold: 5e4,
platinum: 25e4,
diamond: 5e5,
master: 1e6,
grandmaster: 25e5,
elite: 5e6,
legendary: 1e7,
mythic: 5e7
}
, Il = e=>{
const t = Object.keys(yo);
t.sort((n,r)=>yo[r] - yo[n]);
for (const n of t)
if (e >= yo[n])
return n;
return "wooden"
}
, vC = ()=>Object.keys(yo)
, AL = e=>{
const t = vC()
, n = t.indexOf(e);
return n < t.length - 1 ? t[n + 1] : null
}
, yC = e=>yo[e]
, Cv = e=>{
const t = AL(e);
return t ? yC(t) : 1 / 0
}
, wC = e=>{
const t = Cv(Il(e));
return mf(e, t)
}
, xf = e=>`${dt}/leagues/${e}.png`;
function DL() {
if (console && console.warn) {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
typeof t[0] == "string" && (t[0] = `react-i18next:: ${t[0]}`),
console.warn(...t)
}
}
const O1 = {};
function Sm() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
typeof t[0] == "string" && O1[t[0]] || (typeof t[0] == "string" && (O1[t[0]] = new Date),
DL(...t))
}
const xC = (e,t)=>()=>{
if (e.isInitialized)
t();
else {
const n = ()=>{
setTimeout(()=>{
e.off("initialized", n)
}
, 0),
t()
}
;
e.on("initialized", n)
}
}
;
function k1(e, t, n) {
e.loadNamespaces(t, xC(e, n))
}
function _1(e, t, n, r) {
typeof n == "string" && (n = [n]),
n.forEach(i=>{
e.options.ns.indexOf(i) < 0 && e.options.ns.push(i)
}
),
e.loadLanguages(t, xC(e, r))
}
function LL(e, t) {
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
const r = t.languages[0]
, i = t.options ? t.options.fallbackLng : !1
, s = t.languages[t.languages.length - 1];
if (r.toLowerCase() === "cimode")
return !0;
const o = (a,l)=>{
const u = t.services.backendConnector.state[`${a}|${l}`];
return u === -1 || u === 2
}
;
return n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && t.services.backendConnector.backend && t.isLanguageChangingTo && !o(t.isLanguageChangingTo, e) ? !1 : !!(t.hasResourceBundle(r, e) || !t.services.backendConnector.backend || t.options.resources && !t.options.partialBundledLanguages || o(r, e) && (!i || o(s, e)))
}
function NL(e, t) {
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
return !t.languages || !t.languages.length ? (Sm("i18n.languages were undefined or empty", t.languages),
!0) : t.options.ignoreJSONStructure !== void 0 ? t.hasLoadedNamespace(e, {
lng: n.lng,
precheck: (i,s)=>{
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && i.services.backendConnector.backend && i.isLanguageChangingTo && !s(i.isLanguageChangingTo, e))
return !1
}
}) : LL(e, t, n)
}
const ML = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g
, jL = {
"&": "&",
"&": "&",
"<": "<",
"<": "<",
">": ">",
">": ">",
"'": "'",
"'": "'",
""": '"',
""": '"',
" ": " ",
" ": " ",
"©": "©",
"©": "©",
"®": "®",
"®": "®",
"…": "…",
"…": "…",
"/": "/",
"/": "/"
}
, $L = e=>jL[e]
, IL = e=>e.replace(ML, $L);
let FL = {
bindI18n: "languageChanged",
bindI18nStore: "",
transEmptyNodeValue: "",
transSupportBasicHtmlNodes: !0,
transWrapTextNodes: "",
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
useSuspense: !0,
unescape: IL
};
function VL() {
return FL
}
let zL;
function UL() {
return zL
}
const bC = y.createContext();
class BL {
constructor() {
this.usedNamespaces = {}
}
addUsedNamespaces(t) {
t.forEach(n=>{
this.usedNamespaces[n] || (this.usedNamespaces[n] = !0)
}
)
}
getUsedNamespaces() {
return Object.keys(this.usedNamespaces)
}
}
const HL = (e,t)=>{
const n = y.useRef();
return y.useEffect(()=>{
n.current = e
}
, [e, t]),
n.current
}
;
function SC(e, t, n, r) {
return e.getFixedT(t, n, r)
}
function WL(e, t, n, r) {
return y.useCallback(SC(e, t, n, r), [e, t, n, r])
}
function Tt(e) {
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
const {i18n: n} = t
, {i18n: r, defaultNS: i} = y.useContext(bC) || {}
, s = n || r || UL();
if (s && !s.reportNamespaces && (s.reportNamespaces = new BL),
!s) {
Sm("You will need to pass in an i18next instance by using initReactI18next");
const E = (V,C)=>typeof C == "string" ? C : C && typeof C == "object" && typeof C.defaultValue == "string" ? C.defaultValue : Array.isArray(V) ? V[V.length - 1] : V
, D = [E, {}, !1];
return D.t = E,
D.i18n = {},
D.ready = !1,
D
}
s.options.react && s.options.react.wait !== void 0 && Sm("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
const o = {
...VL(),
...s.options.react,
...t
}
, {useSuspense: a, keyPrefix: l} = o;
let u = e || i || s.options && s.options.defaultNS;
u = typeof u == "string" ? [u] : u || ["translation"],
s.reportNamespaces.addUsedNamespaces && s.reportNamespaces.addUsedNamespaces(u);
const c = (s.isInitialized || s.initializedStoreOnce) && u.every(E=>NL(E, s, o))
, d = WL(s, t.lng || null, o.nsMode === "fallback" ? u : u[0], l)
, f = ()=>d
, h = ()=>SC(s, t.lng || null, o.nsMode === "fallback" ? u : u[0], l)
, [m,p] = y.useState(f);
let b = u.join();
t.lng && (b = `${t.lng}${b}`);
const v = HL(b)
, g = y.useRef(!0);
y.useEffect(()=>{
const {bindI18n: E, bindI18nStore: D} = o;
g.current = !0,
!c && !a && (t.lng ? _1(s, t.lng, u, ()=>{
g.current && p(h)
}
) : k1(s, u, ()=>{
g.current && p(h)
}
)),
c && v && v !== b && g.current && p(h);
function V() {
g.current && p(h)
}
return E && s && s.on(E, V),
D && s && s.store.on(D, V),
()=>{
g.current = !1,
E && s && E.split(" ").forEach(C=>s.off(C, V)),
D && s && D.split(" ").forEach(C=>s.store.off(C, V))
}
}
, [s, b]),
y.useEffect(()=>{
g.current && c && p(f)
}
, [s, l, c]);
const w = [m, s, c];
if (w.t = m,
w.i18n = s,
w.ready = c,
c || !c && !a)
return w;
throw new Promise(E=>{
t.lng ? _1(s, t.lng, u, ()=>E()) : k1(s, u, ()=>E())
}
)
}
function GL(e) {
let {i18n: t, defaultNS: n, children: r} = e;
const i = y.useMemo(()=>({
i18n: t,
defaultNS: n
}), [t, n]);
return y.createElement(bC.Provider, {
value: i
}, r)
}
const KL = ()=>{
const {leaguesTasks: e} = Vt(zt)
, {score: t} = Vt(zt)
, {t: n} = Tt("leagues");
return e.map(i=>{
const s = Cv(i);
return {
name: n(i),
league: i,
iconUrl: xf(i),
reward: ZD[i],
progress: mf(t, s)
}
}
)
}
, Qt = {
getUser: "/getUser/",
stats: "/stat/",
referrals: "/referrals/",
claimRefTask: "/claimRefTask/",
claimLeagueTask: "/claimLeagueTask/",
inviteFriend: "/inviteFriend/",
startTask: "/startTask/",
checkTask: "/checkTask/",
startMission: "/startMission/",
finishMission: "/finishMission/",
getReferrals: "/referrals/",
reset: "/resetJFIWEFWQJSDFIISHFASDHSADFSA",
energyLimit: "/energyLimit/",
fullTank: "/fullTank/",
multitap: "/multitap/",
rechargingSpeed: "/rechargingSpeed/",
tappingGuru: "/tappingGuru/",
tap: "/tap/"
}
, qL = e=>Ae.bookmark
, QL = ()=>{
const {refTasks: e} = Vt(zt)
, {referrals: t} = Vt(zt)
, {t: n} = Tt("tasks");
return e.map(i=>{
const s = n("invite", {
count: i
})
, o = JD[i]
, a = qL()
, l = mf(t, i);
return {
level: i,
name: s,
iconUrl: a,
reward: o,
progress: l
}
}
)
}
, YL = e=>{
const {mutate: t} = Et()
, n = gn();
return {
claim: async(i,s)=>{
const o = e.balance + i
, a = e.leaguesTasks.filter(l=>l !== s);
t({
balance: o,
leaguesTasks: a
}),
await n.post(Qt.claimLeagueTask, {
league: s
})
}
}
}
, XL = e=>{
const {mutate: t} = Et()
, n = gn();
return {
claim: async(i,s)=>{
const o = e.balance + i
, a = e.refTasks.filter(l=>l !== s);
t({
balance: o,
refTasks: a
}),
await n.post(Qt.claimRefTask, {
refLevel: s
})
}
}
}
;
var EC = Symbol.for("immer-nothing")
, A1 = Symbol.for("immer-draftable")
, Ln = Symbol.for("immer-state");
function lr(e, ...t) {
throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)
}
var ia = Object.getPrototypeOf;
function sa(e) {
return !!e && !!e[Ln]
}
function Ns(e) {
var t;
return e ? CC(e) || Array.isArray(e) || !!e[A1] || !!((t = e.constructor) != null && t[A1]) || Sf(e) || Ef(e) : !1
}
var JL = Object.prototype.constructor.toString();
function CC(e) {
if (!e || typeof e != "object")
return !1;
const t = ia(e);
if (t === null)
return !0;
const n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
return n === Object ? !0 : typeof n == "function" && Function.toString.call(n) === JL
}
function Ed(e, t) {
bf(e) === 0 ? Reflect.ownKeys(e).forEach(n=>{
t(n, e[n], e)
}
) : e.forEach((n,r)=>t(r, n, e))
}
function bf(e) {
const t = e[Ln];
return t ? t.type_ : Array.isArray(e) ? 1 : Sf(e) ? 2 : Ef(e) ? 3 : 0
}
function Em(e, t) {
return bf(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t)
}
function PC(e, t, n) {
const r = bf(e);
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n
}
function ZL(e, t) {
return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t
}
function Sf(e) {
return e instanceof Map
}
function Ef(e) {
return e instanceof Set
}
function rs(e) {
return e.copy_ || e.base_
}
function Cm(e, t) {
if (Sf(e))
return new Map(e);
if (Ef(e))
return new Set(e);
if (Array.isArray(e))
return Array.prototype.slice.call(e);
const n = CC(e);
if (t === !0 || t === "class_only" && !n) {
const r = Object.getOwnPropertyDescriptors(e);
delete r[Ln];
let i = Reflect.ownKeys(r);
for (let s = 0; s < i.length; s++) {
const o = i[s]
, a = r[o];
a.writable === !1 && (a.writable = !0,
a.configurable = !0),
(a.get || a.set) && (r[o] = {
configurable: !0,
writable: !0,
enumerable: a.enumerable,
value: e[o]
})
}
return Object.create(ia(e), r)
} else {
const r = ia(e);
if (r !== null && n)
return {
...e
};
const i = Object.create(r);
return Object.assign(i, e)
}
}
function Pv(e, t=!1) {
return Cf(e) || sa(e) || !Ns(e) || (bf(e) > 1 && (e.set = e.add = e.clear = e.delete = eN),
Object.freeze(e),
t && Object.entries(e).forEach(([n,r])=>Pv(r, !0))),
e
}
function eN() {
lr(2)
}
function Cf(e) {
return Object.isFrozen(e)
}
var tN = {};
function Ms(e) {
const t = tN[e];
return t || lr(0, e),
t
}
var Fl;
function TC() {
return Fl
}
function nN(e, t) {
return {
drafts_: [],
parent_: e,
immer_: t,
canAutoFreeze_: !0,
unfinalizedDrafts_: 0
}
}
function D1(e, t) {
t && (Ms("Patches"),
e.patches_ = [],
e.inversePatches_ = [],
e.patchListener_ = t)
}
function Pm(e) {
Tm(e),
e.drafts_.forEach(rN),
e.drafts_ = null
}
function Tm(e) {
e === Fl && (Fl = e.parent_)
}
function L1(e) {
return Fl = nN(Fl, e)
}
function rN(e) {
const t = e[Ln];
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0
}
function N1(e, t) {
t.unfinalizedDrafts_ = t.drafts_.length;
const n = t.drafts_[0];
return e !== void 0 && e !== n ? (n[Ln].modified_ && (Pm(t),
lr(4)),
Ns(e) && (e = Cd(t, e),
t.parent_ || Pd(t, e)),
t.patches_ && Ms("Patches").generateReplacementPatches_(n[Ln].base_, e, t.patches_, t.inversePatches_)) : e = Cd(t, n, []),
Pm(t),
t.patches_ && t.patchListener_(t.patches_, t.inversePatches_),
e !== EC ? e : void 0
}
function Cd(e, t, n) {
if (Cf(t))
return t;
const r = t[Ln];
if (!r)
return Ed(t, (i,s)=>M1(e, r, t, i, s, n)),
t;
if (r.scope_ !== e)
return t;
if (!r.modified_)
return Pd(e, r.base_, !0),
r.base_;
if (!r.finalized_) {
r.finalized_ = !0,
r.scope_.unfinalizedDrafts_--;
const i = r.copy_;
let s = i
, o = !1;
r.type_ === 3 && (s = new Set(i),
i.clear(),
o = !0),
Ed(s, (a,l)=>M1(e, r, i, a, l, n, o)),
Pd(e, i, !1),
n && e.patches_ && Ms("Patches").generatePatches_(r, n, e.patches_, e.inversePatches_)
}
return r.copy_
}
function M1(e, t, n, r, i, s, o) {
if (sa(i)) {
const a = s && t && t.type_ !== 3 && !Em(t.assigned_, r) ? s.concat(r) : void 0
, l = Cd(e, i, a);
if (PC(n, r, l),
sa(l))
e.canAutoFreeze_ = !1;
else
return
} else
o && n.add(i);
if (Ns(i) && !Cf(i)) {
if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
return;
Cd(e, i),
(!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && Pd(e, i)
}
}
function Pd(e, t, n=!1) {
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && Pv(t, n)
}
function iN(e, t) {
const n = Array.isArray(e)
, r = {
type_: n ? 1 : 0,
scope_: t ? t.scope_ : TC(),
modified_: !1,
finalized_: !1,
assigned_: {},
parent_: t,
base_: e,
draft_: null,
copy_: null,
revoke_: null,
isManual_: !1
};
let i = r
, s = Tv;
n && (i = [r],
s = Vl);
const {revoke: o, proxy: a} = Proxy.revocable(i, s);
return r.draft_ = a,
r.revoke_ = o,
a
}
var Tv = {
get(e, t) {
if (t === Ln)
return e;
const n = rs(e);
if (!Em(n, t))
return sN(e, n, t);
const r = n[t];
return e.finalized_ || !Ns(r) ? r : r === Th(e.base_, t) ? (Rh(e),
e.copy_[t] = Om(r, e)) : r
},
has(e, t) {
return t in rs(e)
},
ownKeys(e) {
return Reflect.ownKeys(rs(e))
},
set(e, t, n) {
const r = RC(rs(e), t);
if (r != null && r.set)
return r.set.call(e.draft_, n),
!0;
if (!e.modified_) {
const i = Th(rs(e), t)
, s = i == null ? void 0 : i[Ln];
if (s && s.base_ === n)
return e.copy_[t] = n,
e.assigned_[t] = !1,
!0;
if (ZL(n, i) && (n !== void 0 || Em(e.base_, t)))
return !0;
Rh(e),
Rm(e)
}
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = n,
e.assigned_[t] = !0),
!0
},
deleteProperty(e, t) {
return Th(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1,
Rh(e),
Rm(e)) : delete e.assigned_[t],
e.copy_ && delete e.copy_[t],
!0
},
getOwnPropertyDescriptor(e, t) {
const n = rs(e)
, r = Reflect.getOwnPropertyDescriptor(n, t);
return r && {
writable: !0,
configurable: e.type_ !== 1 || t !== "length",
enumerable: r.enumerable,
value: n[t]
}
},
defineProperty() {
lr(11)
},
getPrototypeOf(e) {
return ia(e.base_)
},
setPrototypeOf() {
lr(12)
}
}
, Vl = {};
Ed(Tv, (e,t)=>{
Vl[e] = function() {
return arguments[0] = arguments[0][0],
t.apply(this, arguments)
}
}
);
Vl.deleteProperty = function(e, t) {
return Vl.set.call(this, e, t, void 0)
}
;
Vl.set = function(e, t, n) {
return Tv.set.call(this, e[0], t, n, e[0])
}
;
function Th(e, t) {
const n = e[Ln];
return (n ? rs(n) : e)[t]
}
function sN(e, t, n) {
var i;
const r = RC(t, n);
return r ? "value"in r ? r.value : (i = r.get) == null ? void 0 : i.call(e.draft_) : void 0
}
function RC(e, t) {
if (!(t in e))
return;
let n = ia(e);
for (; n; ) {
const r = Object.getOwnPropertyDescriptor(n, t);
if (r)
return r;
n = ia(n)
}
}
function Rm(e) {
e.modified_ || (e.modified_ = !0,
e.parent_ && Rm(e.parent_))
}
function Rh(e) {
e.copy_ || (e.copy_ = Cm(e.base_, e.scope_.immer_.useStrictShallowCopy_))
}
var oN = class {
constructor(e) {
this.autoFreeze_ = !0,
this.useStrictShallowCopy_ = !1,
this.produce = (t,n,r)=>{
if (typeof t == "function" && typeof n != "function") {
const s = n;
n = t;
const o = this;
return function(l=s, ...u) {
return o.produce(l, c=>n.call(this, c, ...u))
}
}
typeof n != "function" && lr(6),
r !== void 0 && typeof r != "function" && lr(7);
let i;
if (Ns(t)) {
const s = L1(this)
, o = Om(t, void 0);
let a = !0;
try {
i = n(o),
a = !1
} finally {
a ? Pm(s) : Tm(s)
}
return D1(s, r),
N1(i, s)
} else if (!t || typeof t != "object") {
if (i = n(t),
i === void 0 && (i = t),
i === EC && (i = void 0),
this.autoFreeze_ && Pv(i, !0),
r) {
const s = []
, o = [];
Ms("Patches").generateReplacementPatches_(t, i, s, o),
r(s, o)
}
return i
} else
lr(1, t)
}
,
this.produceWithPatches = (t,n)=>{
if (typeof t == "function")
return (o,...a)=>this.produceWithPatches(o, l=>t(l, ...a));
let r, i;
return [this.produce(t, n, (o,a)=>{
r = o,
i = a
}
), r, i]
}
,
typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze),
typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy)
}
createDraft(e) {
Ns(e) || lr(8),
sa(e) && (e = aN(e));
const t = L1(this)
, n = Om(e, void 0);
return n[Ln].isManual_ = !0,
Tm(t),
n
}
finishDraft(e, t) {
const n = e && e[Ln];
(!n || !n.isManual_) && lr(9);
const {scope_: r} = n;
return D1(r, t),
N1(void 0, r)
}
setAutoFreeze(e) {
this.autoFreeze_ = e
}
setUseStrictShallowCopy(e) {
this.useStrictShallowCopy_ = e
}
applyPatches(e, t) {
let n;
for (n = t.length - 1; n >= 0; n--) {
const i = t[n];
if (i.path.length === 0 && i.op === "replace") {
e = i.value;
break
}
}
n > -1 && (t = t.slice(n + 1));
const r = Ms("Patches").applyPatches_;
return sa(e) ? r(e, t) : this.produce(e, i=>r(i, t))
}
}
;
function Om(e, t) {
const n = Sf(e) ? Ms("MapSet").proxyMap_(e, t) : Ef(e) ? Ms("MapSet").proxySet_(e, t) : iN(e, t);
return (t ? t.scope_ : TC()).drafts_.push(n),
n
}
function aN(e) {
return sa(e) || lr(10, e),
OC(e)
}
function OC(e) {
if (!Ns(e) || Cf(e))
return e;
const t = e[Ln];
let n;
if (t) {
if (!t.modified_)
return t.base_;
t.finalized_ = !0,
n = Cm(e, t.scope_.immer_.useStrictShallowCopy_)
} else
n = Cm(e, !0);
return Ed(n, (r,i)=>{
PC(n, r, OC(i))
}
),
t && (t.finalized_ = !1),
n
}
var Nn = new oN
, Td = Nn.produce;
Nn.produceWithPatches.bind(Nn);
Nn.setAutoFreeze.bind(Nn);
Nn.setUseStrictShallowCopy.bind(Nn);
Nn.applyPatches.bind(Nn);
Nn.createDraft.bind(Nn);
Nn.finishDraft.bind(Nn);
const lN = 300
, Rv = Su()((e,t)=>({
countdowns: {},
createTask: n=>{
t().countdowns[n] || e(Td(r=>{
r.countdowns[n] = lN
}
))
}
,
decrement: ()=>{
const n = Object.keys(t().countdowns);
e(Td(r=>{
n.forEach(i=>{
const s = +i;
r.countdowns[s] === 0 && delete r.countdowns[s],
r.countdowns[s] > 0 && r.countdowns[s]--
}
)
}
))
}
}))
, uN = e=>Rv(n=>n.countdowns)[e]
, cN = (e,t)=>{
const {user: n, mutate: r} = Et()
, {createTask: i} = Rv()
, s = gn()
, {mutate: o, isPending: a} = Us({
mutationFn: async()=>{
if (!n)
return;
const {data: l} = await s.post(Qt.checkTask, {
taskId: t
})
, u = Td(n, c=>{
var f;
const d = (f = c.missions.find(h=>h.id === e)) == null ? void 0 : f.tasks.find(h=>h.id === t);
d && (l.status === "wait" && (i(t),
d.status = Kn.checking),
l.status === "ok" && (d.status = Kn.completed))
}
);
r(u)
}
});
return {
checkTask: o,
isMutating: a
}
}
, dN = (e,t)=>{
const {user: n, mutate: r} = Et()
, i = gn();
return {
finishMission: async()=>{
if (!n)
return;
const o = n.missions.map(l=>l.id === e ? {
...l,
status: ar.completed
} : l)
, a = n.balance + t;
r({
balance: a,
missions: o
}),
await i.post(Qt.finishMission, {
missionId: e
})
}
}
}
, fN = ()=>{
const {mutate: e, user: t} = Et();
return {
setStartedMission: async r=>{
if (!t)
return;
const i = Td(t, s=>{
s.missions.forEach(o=>{
o.tasks.forEach(a=>{
a.id === r && (a.status = Kn.started)
}
)
}
)
}
);
e(i)
}
}
}
, hN = e=>{
const {user: t, mutate: n} = Et()
, r = gn();
return {
startMission: y.useCallback(async()=>{
if (!t)
return;
const s = t.missions.map(o=>o.id === e ? {
...o,
status: ar.started
} : o);
n({
missions: s
}),
await r.post("/startMission/", {
missionId: e
})
}
, [r, e, n, t])
}
}
, pN = (e,t,n)=>{
const {user: r, mutate: i} = Et()
, s = gn();
return {
startTask: async()=>{
const a = r == null ? void 0 : r.missions.find(d=>d.id === e);
if (!r || !a)
return;
const l = a.tasks.map(d=>d.id === t ? {
...d,
status: Kn.started
} : d)
, u = {
...a,
tasks: l
}
, c = r.missions.map(d=>d.id === e ? u : d);
i({
missions: c
}),
await s.post("/startTask/", {
taskId: t
})
}
}
}
;
var mN = typeof Fu == "object" && Fu && Fu.Object === Object && Fu
, gN = typeof self == "object" && self && self.Object === Object && self;
mN || gN || Function("return this")();
var Ov = typeof window < "u" ? y.useLayoutEffect : y.useEffect;
function vN(e, t, n, r) {
const i = y.useRef(t);
Ov(()=>{
i.current = t
}
, [t]),
y.useEffect(()=>{
const s = window;
if (!(s && s.addEventListener))
return;
const o = a=>{
i.current(a)
}
;
return s.addEventListener(e, o, r),
()=>{
s.removeEventListener(e, o, r)
}
}
, [e, n, r])
}
function kv(e, t) {
const n = y.useRef(e);
Ov(()=>{
n.current = e
}
, [e]),
y.useEffect(()=>{
const r = setInterval(()=>{
n.current()
}
, t);
return ()=>{
clearInterval(r)
}
}
, [t])
}
var yN = typeof window > "u";
function wN(e, {defaultValue: t=!1, initializeWithValue: n=!0}={}) {
const r = a=>yN ? t : window.matchMedia(a).matches
, [i,s] = y.useState(()=>n ? r(e) : t);
function o() {
s(r(e))
}
return Ov(()=>{
const a = window.matchMedia(e);
return o(),
a.addListener ? a.addListener(o) : a.addEventListener("change", o),
()=>{
a.removeListener ? a.removeListener(o) : a.removeEventListener("change", o)
}
}
, [e]),
i
}
function kC(e, t, n="mousedown", r={}) {
vN(n, i=>{
const s = i.target;
if (!s || !s.isConnected)
return;
(Array.isArray(e) ? e.filter(a=>!!a.current).every(a=>a.current && !a.current.contains(s)) : e.current && !e.current.contains(s)) && t(i)
}
, void 0, r)
}
const xN = ()=>{
const {decrement: e, countdowns: t} = Rv()
, {setStartedMission: n} = fN();
kv(()=>{
Object.keys(t).forEach(r=>{
const i = Number(r);
t[i] <= 0 && n(i)
}
),
e()
}
, 1e3)
}
, Ar = {
tappingGurus: 3,
fullTanks: 3,
tappingGuruLifeTime: 20 * 1e3,
tappingGuruDelay: 6 * 60 * 60 * 1e3,
fullTankDelay: 12 * 60 * 60 * 1e3,
energyPerLevel: 500,
tappingGuruMultiplier: 5
}
, bN = ()=>{
const {user: e, mutate: t} = Et()
, n = Pu();
return {
recoverEnergy: async()=>{
if (!e || n)
return;
const i = e.energyLimit * Ar.energyPerLevel
, s = e.energy + e.rechargingSpeed
, o = s > i ? i : s;
t({
energy: o
})
}
}
}
, SN = ()=>{
const {recoverEnergy: e} = bN()
, t = ll(r=>r.tapsInc)
, n = y.useCallback(()=>{
t === 0 && e()
}
, [e, t]);
kv(n, 1e3)
}
;
function _C(e, t) {
return function() {
return e.apply(t, arguments)
}
}
const {toString: EN} = Object.prototype
, {getPrototypeOf: _v} = Object
, Pf = (e=>t=>{
const n = EN.call(t);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase())
}
)(Object.create(null))
, mr = e=>(e = e.toLowerCase(),
t=>Pf(t) === e)
, Tf = e=>t=>typeof t === e
, {isArray: va} = Array
, zl = Tf("undefined");
function CN(e) {
return e !== null && !zl(e) && e.constructor !== null && !zl(e.constructor) && Xn(e.constructor.isBuffer) && e.constructor.isBuffer(e)
}
const AC = mr("ArrayBuffer");
function PN(e) {
let t;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && AC(e.buffer),
t
}
const TN = Tf("string")
, Xn = Tf("function")
, DC = Tf("number")
, Rf = e=>e !== null && typeof e == "object"
, RN = e=>e === !0 || e === !1
, Lc = e=>{
if (Pf(e) !== "object")
return !1;
const t = _v(e);
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e)
}
, ON = mr("Date")
, kN = mr("File")
, _N = mr("Blob")
, AN = mr("FileList")
, DN = e=>Rf(e) && Xn(e.pipe)
, LN = e=>{
let t;
return e && (typeof FormData == "function" && e instanceof FormData || Xn(e.append) && ((t = Pf(e)) === "formdata" || t === "object" && Xn(e.toString) && e.toString() === "[object FormData]"))
}
, NN = mr("URLSearchParams")
, [MN,jN,$N,IN] = ["ReadableStream", "Request", "Response", "Headers"].map(mr)
, FN = e=>e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Eu(e, t, {allOwnKeys: n=!1}={}) {
if (e === null || typeof e > "u")
return;
let r, i;
if (typeof e != "object" && (e = [e]),
va(e))
for (r = 0,
i = e.length; r < i; r++)
t.call(null, e[r], r, e);
else {
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e)
, o = s.length;
let a;
for (r = 0; r < o; r++)
a = s[r],
t.call(null, e[a], a, e)
}
}
function LC(e, t) {
t = t.toLowerCase();
const n = Object.keys(e);
let r = n.length, i;
for (; r-- > 0; )
if (i = n[r],
t === i.toLowerCase())
return i;
return null
}
const NC = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global
, MC = e=>!zl(e) && e !== NC;
function km() {
const {caseless: e} = MC(this) && this || {}
, t = {}
, n = (r,i)=>{
const s = e && LC(t, i) || i;
Lc(t[s]) && Lc(r) ? t[s] = km(t[s], r) : Lc(r) ? t[s] = km({}, r) : va(r) ? t[s] = r.slice() : t[s] = r
}
;
for (let r = 0, i = arguments.length; r < i; r++)
arguments[r] && Eu(arguments[r], n);
return t
}
const VN = (e,t,n,{allOwnKeys: r}={})=>(Eu(t, (i,s)=>{
n && Xn(i) ? e[s] = _C(i, n) : e[s] = i
}
, {
allOwnKeys: r
}),
e)
, zN = e=>(e.charCodeAt(0) === 65279 && (e = e.slice(1)),
e)
, UN = (e,t,n,r)=>{
e.prototype = Object.create(t.prototype, r),
e.prototype.constructor = e,
Object.defineProperty(e, "super", {
value: t.prototype
}),
n && Object.assign(e.prototype, n)
}
, BN = (e,t,n,r)=>{
let i, s, o;
const a = {};
if (t = t || {},
e == null)
return t;
do {
for (i = Object.getOwnPropertyNames(e),
s = i.length; s-- > 0; )
o = i[s],
(!r || r(o, e, t)) && !a[o] && (t[o] = e[o],
a[o] = !0);
e = n !== !1 && _v(e)
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t
}
, HN = (e,t,n)=>{
e = String(e),
(n === void 0 || n > e.length) && (n = e.length),
n -= t.length;
const r = e.indexOf(t, n);
return r !== -1 && r === n
}
, WN = e=>{
if (!e)
return null;
if (va(e))
return e;
let t = e.length;
if (!DC(t))
return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n
}
, GN = (e=>t=>e && t instanceof e)(typeof Uint8Array < "u" && _v(Uint8Array))
, KN = (e,t)=>{
const r = (e && e[Symbol.iterator]).call(e);
let i;
for (; (i = r.next()) && !i.done; ) {
const s = i.value;
t.call(e, s[0], s[1])
}
}
, qN = (e,t)=>{
let n;
const r = [];
for (; (n = e.exec(t)) !== null; )
r.push(n);
return r
}
, QN = mr("HTMLFormElement")
, YN = e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, i) {
return r.toUpperCase() + i
})
, j1 = (({hasOwnProperty: e})=>(t,n)=>e.call(t, n))(Object.prototype)
, XN = mr("RegExp")
, jC = (e,t)=>{
const n = Object.getOwnPropertyDescriptors(e)
, r = {};
Eu(n, (i,s)=>{
let o;
(o = t(i, s, e)) !== !1 && (r[s] = o || i)
}
),
Object.defineProperties(e, r)
}
, JN = e=>{
jC(e, (t,n)=>{
if (Xn(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (Xn(r)) {
if (t.enumerable = !1,
"writable"in t) {
t.writable = !1;
return
}
t.set || (t.set = ()=>{
throw Error("Can not rewrite read-only method '" + n + "'")
}
)
}
}
)
}
, ZN = (e,t)=>{
const n = {}
, r = i=>{
i.forEach(s=>{
n[s] = !0
}
)
}
;
return va(e) ? r(e) : r(String(e).split(t)),
n
}
, eM = ()=>{}
, tM = (e,t)=>e != null && Number.isFinite(e = +e) ? e : t
, Oh = "abcdefghijklmnopqrstuvwxyz"
, $1 = "0123456789"
, $C = {
DIGIT: $1,
ALPHA: Oh,
ALPHA_DIGIT: Oh + Oh.toUpperCase() + $1
}
, nM = (e=16,t=$C.ALPHA_DIGIT)=>{
let n = "";
const {length: r} = t;
for (; e--; )
n += t[Math.random() * r | 0];
return n
}
;
function rM(e) {
return !!(e && Xn(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator])
}
const iM = e=>{
const t = new Array(10)
, n = (r,i)=>{
if (Rf(r)) {
if (t.indexOf(r) >= 0)
return;
if (!("toJSON"in r)) {
t[i] = r;
const s = va(r) ? [] : {};
return Eu(r, (o,a)=>{
const l = n(o, i + 1);
!zl(l) && (s[a] = l)
}
),
t[i] = void 0,
s
}
}
return r
}
;
return n(e, 0)
}
, sM = mr("AsyncFunction")
, oM = e=>e && (Rf(e) || Xn(e)) && Xn(e.then) && Xn(e.catch)
, re = {
isArray: va,
isArrayBuffer: AC,
isBuffer: CN,
isFormData: LN,
isArrayBufferView: PN,
isString: TN,
isNumber: DC,
isBoolean: RN,
isObject: Rf,
isPlainObject: Lc,
isReadableStream: MN,
isRequest: jN,
isResponse: $N,
isHeaders: IN,
isUndefined: zl,
isDate: ON,
isFile: kN,
isBlob: _N,
isRegExp: XN,
isFunction: Xn,
isStream: DN,
isURLSearchParams: NN,
isTypedArray: GN,
isFileList: AN,
forEach: Eu,
merge: km,
extend: VN,
trim: FN,
stripBOM: zN,
inherits: UN,
toFlatObject: BN,
kindOf: Pf,
kindOfTest: mr,
endsWith: HN,
toArray: WN,
forEachEntry: KN,
matchAll: qN,
isHTMLForm: QN,
hasOwnProperty: j1,
hasOwnProp: j1,
reduceDescriptors: jC,
freezeMethods: JN,
toObjectSet: ZN,
toCamelCase: YN,
noop: eM,
toFiniteNumber: tM,
findKey: LC,
global: NC,
isContextDefined: MC,
ALPHABET: $C,
generateString: nM,
isSpecCompliantForm: rM,
toJSONObject: iM,
isAsyncFn: sM,
isThenable: oM
};
function Ne(e, t, n, r, i) {
Error.call(this),
Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack,
this.message = e,
this.name = "AxiosError",
t && (this.code = t),
n && (this.config = n),
r && (this.request = r),
i && (this.response = i)
}
re.inherits(Ne, Error, {
toJSON: function() {
return {
message: this.message,
name: this.name,
description: this.description,
number: this.number,
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
config: re.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
}
}
});
const IC = Ne.prototype
, FC = {};
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach(e=>{
FC[e] = {
value: e
}
}
);
Object.defineProperties(Ne, FC);
Object.defineProperty(IC, "isAxiosError", {
value: !0
});
Ne.from = (e,t,n,r,i,s)=>{
const o = Object.create(IC);
return re.toFlatObject(e, o, function(l) {
return l !== Error.prototype
}, a=>a !== "isAxiosError"),
Ne.call(o, e.message, t, n, r, i),
o.cause = e,
o.name = e.name,
s && Object.assign(o, s),
o
}
;
const aM = null;
function _m(e) {
return re.isPlainObject(e) || re.isArray(e)
}
function VC(e) {
return re.endsWith(e, "[]") ? e.slice(0, -2) : e
}
function I1(e, t, n) {
return e ? e.concat(t).map(function(i, s) {
return i = VC(i),
!n && s ? "[" + i + "]" : i
}).join(n ? "." : "") : t
}
function lM(e) {
return re.isArray(e) && !e.some(_m)
}
const uM = re.toFlatObject(re, {}, null, function(t) {
return /^is[A-Z]/.test(t)
});
function Of(e, t, n) {
if (!re.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData,
n = re.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(p, b) {
return !re.isUndefined(b[p])
});
const r = n.metaTokens
, i = n.visitor || c
, s = n.dots
, o = n.indexes
, l = (n.Blob || typeof Blob < "u" && Blob) && re.isSpecCompliantForm(t);
if (!re.isFunction(i))
throw new TypeError("visitor must be a function");
function u(m) {
if (m === null)
return "";
if (re.isDate(m))
return m.toISOString();
if (!l && re.isBlob(m))
throw new Ne("Blob is not supported. Use a Buffer instead.");
return re.isArrayBuffer(m) || re.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m
}
function c(m, p, b) {
let v = m;
if (m && !b && typeof m == "object") {
if (re.endsWith(p, "{}"))
p = r ? p : p.slice(0, -2),
m = JSON.stringify(m);
else if (re.isArray(m) && lM(m) || (re.isFileList(m) || re.endsWith(p, "[]")) && (v = re.toArray(m)))
return p = VC(p),
v.forEach(function(w, E) {
!(re.isUndefined(w) || w === null) && t.append(o === !0 ? I1([p], E, s) : o === null ? p : p + "[]", u(w))
}),
!1
}
return _m(m) ? !0 : (t.append(I1(b, p, s), u(m)),
!1)
}
const d = []
, f = Object.assign(uM, {
defaultVisitor: c,
convertValue: u,
isVisitable: _m
});
function h(m, p) {
if (!re.isUndefined(m)) {
if (d.indexOf(m) !== -1)
throw Error("Circular reference detected in " + p.join("."));
d.push(m),
re.forEach(m, function(v, g) {
(!(re.isUndefined(v) || v === null) && i.call(t, v, re.isString(g) ? g.trim() : g, p, f)) === !0 && h(v, p ? p.concat(g) : [g])
}),
d.pop()
}
}
if (!re.isObject(e))
throw new TypeError("data must be an object");
return h(e),
t
}
function F1(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
return t[r]
})
}
function Av(e, t) {
this._pairs = [],
e && Of(e, this, t)
}
const zC = Av.prototype;
zC.append = function(t, n) {
this._pairs.push([t, n])
}
;
zC.toString = function(t) {
const n = t ? function(r) {
return t.call(this, r, F1)
}
: F1;
return this._pairs.map(function(i) {
return n(i[0]) + "=" + n(i[1])
}, "").join("&")
}
;
function cM(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]")
}
function UC(e, t, n) {
if (!t)
return e;
const r = n && n.encode || cM
, i = n && n.serialize;
let s;
if (i ? s = i(t, n) : s = re.isURLSearchParams(t) ? t.toString() : new Av(t,n).toString(r),
s) {
const o = e.indexOf("#");
o !== -1 && (e = e.slice(0, o)),
e += (e.indexOf("?") === -1 ? "?" : "&") + s
}
return e
}
class V1 {
constructor() {
this.handlers = []
}
use(t, n, r) {
return this.handlers.push({
fulfilled: t,
rejected: n,
synchronous: r ? r.synchronous : !1,
runWhen: r ? r.runWhen : null
}),
this.handlers.length - 1
}
eject(t) {
this.handlers[t] && (this.handlers[t] = null)
}
clear() {
this.handlers && (this.handlers = [])
}
forEach(t) {
re.forEach(this.handlers, function(r) {
r !== null && t(r)
})
}
}
const BC = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}
, dM = typeof URLSearchParams < "u" ? URLSearchParams : Av
, fM = typeof FormData < "u" ? FormData : null
, hM = typeof Blob < "u" ? Blob : null
, pM = {
isBrowser: !0,
classes: {
URLSearchParams: dM,
FormData: fM,
Blob: hM
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}
, Dv = typeof window < "u" && typeof document < "u"
, mM = (e=>Dv && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product)
, gM = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function"
, vM = Dv && window.location.href || "http://localhost"
, yM = Object.freeze(Object.defineProperty({
__proto__: null,
hasBrowserEnv: Dv,
hasStandardBrowserEnv: mM,
hasStandardBrowserWebWorkerEnv: gM,
origin: vM
}, Symbol.toStringTag, {
value: "Module"
}))
, dr = {
...yM,
...pM
};
function wM(e, t) {
return Of(e, new dr.classes.URLSearchParams, Object.assign({
visitor: function(n, r, i, s) {
return dr.isNode && re.isBuffer(n) ? (this.append(r, n.toString("base64")),
!1) : s.defaultVisitor.apply(this, arguments)
}
}, t))
}
function xM(e) {
return re.matchAll(/\w+|\[(\w*)]/g, e).map(t=>t[0] === "[]" ? "" : t[1] || t[0])
}
function bM(e) {
const t = {}
, n = Object.keys(e);
let r;
const i = n.length;
let s;
for (r = 0; r < i; r++)
s = n[r],
t[s] = e[s];
return t
}
function HC(e) {
function t(n, r, i, s) {
let o = n[s++];
if (o === "__proto__")
return !0;
const a = Number.isFinite(+o)
, l = s >= n.length;
return o = !o && re.isArray(i) ? i.length : o,
l ? (re.hasOwnProp(i, o) ? i[o] = [i[o], r] : i[o] = r,
!a) : ((!i[o] || !re.isObject(i[o])) && (i[o] = []),
t(n, r, i[o], s) && re.isArray(i[o]) && (i[o] = bM(i[o])),
!a)
}
if (re.isFormData(e) && re.isFunction(e.entries)) {
const n = {};
return re.forEachEntry(e, (r,i)=>{
t(xM(r), i, n, 0)
}
),
n
}
return null
}
function SM(e, t, n) {
if (re.isString(e))
try {
return (t || JSON.parse)(e),
re.trim(e)
} catch (r) {
if (r.name !== "SyntaxError")
throw r
}
return (n || JSON.stringify)(e)
}
const Cu = {
transitional: BC,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(t, n) {
const r = n.getContentType() || ""
, i = r.indexOf("application/json") > -1
, s = re.isObject(t);
if (s && re.isHTMLForm(t) && (t = new FormData(t)),
re.isFormData(t))
return i ? JSON.stringify(HC(t)) : t;
if (re.isArrayBuffer(t) || re.isBuffer(t) || re.isStream(t) || re.isFile(t) || re.isBlob(t) || re.isReadableStream(t))
return t;
if (re.isArrayBufferView(t))
return t.buffer;
if (re.isURLSearchParams(t))
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
t.toString();
let a;
if (s) {
if (r.indexOf("application/x-www-form-urlencoded") > -1)
return wM(t, this.formSerializer).toString();
if ((a = re.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
const l = this.env && this.env.FormData;
return Of(a ? {
"files[]": t
} : t, l && new l, this.formSerializer)
}
}
return s || i ? (n.setContentType("application/json", !1),
SM(t)) : t
}
],
transformResponse: [function(t) {
const n = this.transitional || Cu.transitional
, r = n && n.forcedJSONParsing
, i = this.responseType === "json";
if (re.isResponse(t) || re.isReadableStream(t))
return t;
if (t && re.isString(t) && (r && !this.responseType || i)) {
const o = !(n && n.silentJSONParsing) && i;
try {
return JSON.parse(t)
} catch (a) {
if (o)
throw a.name === "SyntaxError" ? Ne.from(a, Ne.ERR_BAD_RESPONSE, this, null, this.response) : a
}
}
return t
}
],
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: dr.classes.FormData,
Blob: dr.classes.Blob
},
validateStatus: function(t) {
return t >= 200 && t < 300
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
re.forEach(["delete", "get", "head", "post", "put", "patch"], e=>{
Cu.headers[e] = {}
}
);
const EM = re.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"])
, CM = e=>{
const t = {};
let n, r, i;
return e && e.split(`
`).forEach(function(o) {
i = o.indexOf(":"),
n = o.substring(0, i).trim().toLowerCase(),
r = o.substring(i + 1).trim(),
!(!n || t[n] && EM[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r)
}),
t
}
, z1 = Symbol("internals");
function Ia(e) {
return e && String(e).trim().toLowerCase()
}
function Nc(e) {
return e === !1 || e == null ? e : re.isArray(e) ? e.map(Nc) : String(e)
}
function PM(e) {
const t = Object.create(null)
, n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let r;
for (; r = n.exec(e); )
t[r[1]] = r[2];
return t
}
const TM = e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function kh(e, t, n, r, i) {
if (re.isFunction(r))
return r.call(this, t, n);
if (i && (t = n),
!!re.isString(t)) {
if (re.isString(r))
return t.indexOf(r) !== -1;
if (re.isRegExp(r))
return r.test(t)
}
}
function RM(e) {
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,n,r)=>n.toUpperCase() + r)
}
function OM(e, t) {
const n = re.toCamelCase(" " + t);
["get", "set", "has"].forEach(r=>{
Object.defineProperty(e, r + n, {
value: function(i, s, o) {
return this[r].call(this, t, i, s, o)
},
configurable: !0
})
}
)
}
class Pn {
constructor(t) {
t && this.set(t)
}
set(t, n, r) {
const i = this;
function s(a, l, u) {
const c = Ia(l);
if (!c)
throw new Error("header name must be a non-empty string");
const d = re.findKey(i, c);
(!d || i[d] === void 0 || u === !0 || u === void 0 && i[d] !== !1) && (i[d || l] = Nc(a))
}
const o = (a,l)=>re.forEach(a, (u,c)=>s(u, c, l));
if (re.isPlainObject(t) || t instanceof this.constructor)
o(t, n);
else if (re.isString(t) && (t = t.trim()) && !TM(t))
o(CM(t), n);
else if (re.isHeaders(t))
for (const [a,l] of t.entries())
s(l, a, r);
else
t != null && s(n, t, r);
return this
}
get(t, n) {
if (t = Ia(t),
t) {
const r = re.findKey(this, t);
if (r) {
const i = this[r];
if (!n)
return i;
if (n === !0)
return PM(i);
if (re.isFunction(n))
return n.call(this, i, r);
if (re.isRegExp(n))
return n.exec(i);
throw new TypeError("parser must be boolean|regexp|function")
}
}
}
has(t, n) {
if (t = Ia(t),
t) {
const r = re.findKey(this, t);
return !!(r && this[r] !== void 0 && (!n || kh(this, this[r], r, n)))
}
return !1
}
delete(t, n) {
const r = this;
let i = !1;
function s(o) {
if (o = Ia(o),
o) {
const a = re.findKey(r, o);
a && (!n || kh(r, r[a], a, n)) && (delete r[a],
i = !0)
}
}
return re.isArray(t) ? t.forEach(s) : s(t),
i
}
clear(t) {
const n = Object.keys(this);
let r = n.length
, i = !1;
for (; r--; ) {
const s = n[r];
(!t || kh(this, this[s], s, t, !0)) && (delete this[s],
i = !0)
}
return i
}
normalize(t) {
const n = this
, r = {};
return re.forEach(this, (i,s)=>{
const o = re.findKey(r, s);
if (o) {
n[o] = Nc(i),
delete n[s];
return
}
const a = t ? RM(s) : String(s).trim();
a !== s && delete n[s],
n[a] = Nc(i),
r[a] = !0
}
),
this
}
concat(...t) {
return this.constructor.concat(this, ...t)
}
toJSON(t) {
const n = Object.create(null);
return re.forEach(this, (r,i)=>{
r != null && r !== !1 && (n[i] = t && re.isArray(r) ? r.join(", ") : r)
}
),
n
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]()
}
toString() {
return Object.entries(this.toJSON()).map(([t,n])=>t + ": " + n).join(`
`)
}
get[Symbol.toStringTag]() {
return "AxiosHeaders"
}
static from(t) {
return t instanceof this ? t : new this(t)
}
static concat(t, ...n) {
const r = new this(t);
return n.forEach(i=>r.set(i)),
r
}
static accessor(t) {
const r = (this[z1] = this[z1] = {
accessors: {}
}).accessors
, i = this.prototype;
function s(o) {
const a = Ia(o);
r[a] || (OM(i, o),
r[a] = !0)
}
return re.isArray(t) ? t.forEach(s) : s(t),
this
}
}
Pn.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
re.reduceDescriptors(Pn.prototype, ({value: e},t)=>{
let n = t[0].toUpperCase() + t.slice(1);
return {
get: ()=>e,
set(r) {
this[n] = r
}
}
}
);
re.freezeMethods(Pn);
function _h(e, t) {
const n = this || Cu
, r = t || n
, i = Pn.from(r.headers);
let s = r.data;
return re.forEach(e, function(a) {
s = a.call(n, s, i.normalize(), t ? t.status : void 0)
}),
i.normalize(),
s
}
function WC(e) {
return !!(e && e.__CANCEL__)
}
function ya(e, t, n) {
Ne.call(this, e ?? "canceled", Ne.ERR_CANCELED, t, n),
this.name = "CanceledError"
}
re.inherits(ya, Ne, {
__CANCEL__: !0
});
function GC(e, t, n) {
const r = n.config.validateStatus;
!n.status || !r || r(n.status) ? e(n) : t(new Ne("Request failed with status code " + n.status,[Ne.ERR_BAD_REQUEST, Ne.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],n.config,n.request,n))
}
function kM(e) {
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
return t && t[1] || ""
}
function _M(e, t) {
e = e || 10;
const n = new Array(e)
, r = new Array(e);
let i = 0, s = 0, o;
return t = t !== void 0 ? t : 1e3,
function(l) {
const u = Date.now()
, c = r[s];
o || (o = u),
n[i] = l,
r[i] = u;
let d = s
, f = 0;
for (; d !== i; )
f += n[d++],
d = d % e;
if (i = (i + 1) % e,
i === s && (s = (s + 1) % e),
u - o < t)
return;
const h = c && u - c;
return h ? Math.round(f * 1e3 / h) : void 0
}
}
function AM(e, t) {
let n = 0;
const r = 1e3 / t;
let i = null;
return function() {
const o = this === !0
, a = Date.now();
if (o || a - n > r)
return i && (clearTimeout(i),
i = null),
n = a,
e.apply(null, arguments);
i || (i = setTimeout(()=>(i = null,
n = Date.now(),
e.apply(null, arguments)), r - (a - n)))
}
}
const Rd = (e,t,n=3)=>{
let r = 0;
const i = _M(50, 250);
return AM(s=>{
const o = s.loaded
, a = s.lengthComputable ? s.total : void 0
, l = o - r
, u = i(l)
, c = o <= a;
r = o;
const d = {
loaded: o,
total: a,
progress: a ? o / a : void 0,
bytes: l,
rate: u || void 0,
estimated: u && a && c ? (a - o) / u : void 0,
event: s,
lengthComputable: a != null
};
d[t ? "download" : "upload"] = !0,
e(d)
}
, n)
}
, DM = dr.hasStandardBrowserEnv ? function() {
const t = /(msie|trident)/i.test(navigator.userAgent)
, n = document.createElement("a");
let r;
function i(s) {
let o = s;
return t && (n.setAttribute("href", o),
o = n.href),
n.setAttribute("href", o),
{
href: n.href,
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
host: n.host,
search: n.search ? n.search.replace(/^\?/, "") : "",
hash: n.hash ? n.hash.replace(/^#/, "") : "",
hostname: n.hostname,
port: n.port,
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
}
}
return r = i(window.location.href),
function(o) {
const a = re.isString(o) ? i(o) : o;
return a.protocol === r.protocol && a.host === r.host
}
}() : function() {
return function() {
return !0
}
}()
, LM = dr.hasStandardBrowserEnv ? {
write(e, t, n, r, i, s) {
const o = [e + "=" + encodeURIComponent(t)];
re.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()),
re.isString(r) && o.push("path=" + r),
re.isString(i) && o.push("domain=" + i),
s === !0 && o.push("secure"),
document.cookie = o.join("; ")
},
read(e) {
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
return t ? decodeURIComponent(t[3]) : null
},
remove(e) {
this.write(e, "", Date.now() - 864e5)
}
} : {
write() {},
read() {
return null
},
remove() {}
};
function NM(e) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)
}
function MM(e, t) {
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e
}
function KC(e, t) {
return e && !NM(t) ? MM(e, t) : t
}
const U1 = e=>e instanceof Pn ? {
...e
} : e;
function js(e, t) {
t = t || {};
const n = {};
function r(u, c, d) {
return re.isPlainObject(u) && re.isPlainObject(c) ? re.merge.call({
caseless: d
}, u, c) : re.isPlainObject(c) ? re.merge({}, c) : re.isArray(c) ? c.slice() : c
}
function i(u, c, d) {
if (re.isUndefined(c)) {
if (!re.isUndefined(u))
return r(void 0, u, d)
} else
return r(u, c, d)
}
function s(u, c) {
if (!re.isUndefined(c))
return r(void 0, c)
}
function o(u, c) {
if (re.isUndefined(c)) {
if (!re.isUndefined(u))
return r(void 0, u)
} else
return r(void 0, c)
}
function a(u, c, d) {
if (d in t)
return r(u, c);
if (d in e)
return r(void 0, u)
}
const l = {
url: s,
method: s,
data: s,
baseURL: o,
transformRequest: o,
transformResponse: o,
paramsSerializer: o,
timeout: o,
timeoutMessage: o,
withCredentials: o,
withXSRFToken: o,
adapter: o,
responseType: o,
xsrfCookieName: o,
xsrfHeaderName: o,
onUploadProgress: o,
onDownloadProgress: o,
decompress: o,
maxContentLength: o,
maxBodyLength: o,
beforeRedirect: o,
transport: o,
httpAgent: o,
httpsAgent: o,
cancelToken: o,
socketPath: o,
responseEncoding: o,
validateStatus: a,
headers: (u,c)=>i(U1(u), U1(c), !0)
};
return re.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
const d = l[c] || i
, f = d(e[c], t[c], c);
re.isUndefined(f) && d !== a || (n[c] = f)
}),
n
}
const qC = e=>{
const t = js({}, e);
let {data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: s, headers: o, auth: a} = t;
t.headers = o = Pn.from(o),
t.url = UC(KC(t.baseURL, t.url), e.params, e.paramsSerializer),
a && o.set("Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")));
let l;
if (re.isFormData(n)) {
if (dr.hasStandardBrowserEnv || dr.hasStandardBrowserWebWorkerEnv)
o.setContentType(void 0);
else if ((l = o.getContentType()) !== !1) {
const [u,...c] = l ? l.split(";").map(d=>d.trim()).filter(Boolean) : [];
o.setContentType([u || "multipart/form-data", ...c].join("; "))
}
}
if (dr.hasStandardBrowserEnv && (r && re.isFunction(r) && (r = r(t)),
r || r !== !1 && DM(t.url))) {
const u = i && s && LM.read(s);
u && o.set(i, u)
}
return t
}
, jM = typeof XMLHttpRequest < "u"
, $M = jM && function(e) {
return new Promise(function(n, r) {
const i = qC(e);
let s = i.data;
const o = Pn.from(i.headers).normalize();
let {responseType: a} = i, l;
function u() {
i.cancelToken && i.cancelToken.unsubscribe(l),
i.signal && i.signal.removeEventListener("abort", l)
}
let c = new XMLHttpRequest;
c.open(i.method.toUpperCase(), i.url, !0),
c.timeout = i.timeout;
function d() {
if (!c)
return;
const h = Pn.from("getAllResponseHeaders"in c && c.getAllResponseHeaders())
, p = {
data: !a || a === "text" || a === "json" ? c.responseText : c.response,
status: c.status,
statusText: c.statusText,
headers: h,
config: e,
request: c
};
GC(function(v) {
n(v),
u()
}, function(v) {
r(v),
u()
}, p),
c = null
}
"onloadend"in c ? c.onloadend = d : c.onreadystatechange = function() {
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(d)
}
,
c.onabort = function() {
c && (r(new Ne("Request aborted",Ne.ECONNABORTED,i,c)),
c = null)
}
,
c.onerror = function() {
r(new Ne("Network Error",Ne.ERR_NETWORK,i,c)),
c = null
}
,
c.ontimeout = function() {
let m = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
const p = i.transitional || BC;
i.timeoutErrorMessage && (m = i.timeoutErrorMessage),
r(new Ne(m,p.clarifyTimeoutError ? Ne.ETIMEDOUT : Ne.ECONNABORTED,i,c)),
c = null
}
,
s === void 0 && o.setContentType(null),
"setRequestHeader"in c && re.forEach(o.toJSON(), function(m, p) {
c.setRequestHeader(p, m)
}),
re.isUndefined(i.withCredentials) || (c.withCredentials = !!i.withCredentials),
a && a !== "json" && (c.responseType = i.responseType),
typeof i.onDownloadProgress == "function" && c.addEventListener("progress", Rd(i.onDownloadProgress, !0)),
typeof i.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", Rd(i.onUploadProgress)),
(i.cancelToken || i.signal) && (l = h=>{
c && (r(!h || h.type ? new ya(null,e,c) : h),
c.abort(),
c = null)
}
,
i.cancelToken && i.cancelToken.subscribe(l),
i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
const f = kM(i.url);
if (f && dr.protocols.indexOf(f) === -1) {
r(new Ne("Unsupported protocol " + f + ":",Ne.ERR_BAD_REQUEST,e));
return
}
c.send(s || null)
}
)
}
, IM = (e,t)=>{
let n = new AbortController, r;
const i = function(l) {
if (!r) {
r = !0,
o();
const u = l instanceof Error ? l : this.reason;
n.abort(u instanceof Ne ? u : new ya(u instanceof Error ? u.message : u))
}
};
let s = t && setTimeout(()=>{
i(new Ne(`timeout ${t} of ms exceeded`,Ne.ETIMEDOUT))
}
, t);
const o = ()=>{
e && (s && clearTimeout(s),
s = null,
e.forEach(l=>{
l && (l.removeEventListener ? l.removeEventListener("abort", i) : l.unsubscribe(i))
}
),
e = null)
}
;
e.forEach(l=>l && l.addEventListener && l.addEventListener("abort", i));
const {signal: a} = n;
return a.unsubscribe = o,
[a, ()=>{
s && clearTimeout(s),
s = null
}
]
}
, FM = function*(e, t) {
let n = e.byteLength;
if (!t || n < t) {
yield e;
return
}
let r = 0, i;
for (; r < n; )
i = r + t,
yield e.slice(r, i),
r = i
}
, VM = async function*(e, t, n) {
for await(const r of e)
yield*FM(ArrayBuffer.isView(r) ? r : await n(String(r)), t)
}
, B1 = (e,t,n,r,i)=>{
const s = VM(e, t, i);
let o = 0;
return new ReadableStream({
type: "bytes",
async pull(a) {
const {done: l, value: u} = await s.next();
if (l) {
a.close(),
r();
return
}
let c = u.byteLength;
n && n(o += c),
a.enqueue(new Uint8Array(u))
},
cancel(a) {
return r(a),
s.return()
}
},{
highWaterMark: 2
})
}
, H1 = (e,t)=>{
const n = e != null;
return r=>setTimeout(()=>t({
lengthComputable: n,
total: e,
loaded: r
}))
}
, kf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function"
, QC = kf && typeof ReadableStream == "function"
, Am = kf && (typeof TextEncoder == "function" ? (e=>t=>e.encode(t))(new TextEncoder) : async e=>new Uint8Array(await new Response(e).arrayBuffer()))
, zM = QC && (()=>{
let e = !1;
const t = new Request(dr.origin,{
body: new ReadableStream,
method: "POST",
get duplex() {
return e = !0,
"half"
}
}).headers.has("Content-Type");
return e && !t
}
)()
, W1 = 64 * 1024
, Dm = QC && !!(()=>{
try {
return re.isReadableStream(new Response("").body)
} catch {}
}
)()
, Od = {
stream: Dm && (e=>e.body)
};
kf && (e=>{
["text", "arrayBuffer", "blob", "formData", "stream"].forEach(t=>{
!Od[t] && (Od[t] = re.isFunction(e[t]) ? n=>n[t]() : (n,r)=>{
throw new Ne(`Response type '${t}' is not supported`,Ne.ERR_NOT_SUPPORT,r)
}
)
}
)
}
)(new Response);
const UM = async e=>{
if (e == null)
return 0;
if (re.isBlob(e))
return e.size;
if (re.isSpecCompliantForm(e))
return (await new Request(e).arrayBuffer()).byteLength;
if (re.isArrayBufferView(e))
return e.byteLength;
if (re.isURLSearchParams(e) && (e = e + ""),
re.isString(e))
return (await Am(e)).byteLength
}
, BM = async(e,t)=>{
const n = re.toFiniteNumber(e.getContentLength());
return n ?? UM(t)
}
, HM = kf && (async e=>{
let {url: t, method: n, data: r, signal: i, cancelToken: s, timeout: o, onDownloadProgress: a, onUploadProgress: l, responseType: u, headers: c, withCredentials: d="same-origin", fetchOptions: f} = qC(e);
u = u ? (u + "").toLowerCase() : "text";
let[h,m] = i || s || o ? IM([i, s], o) : [], p, b;
const v = ()=>{
!p && setTimeout(()=>{
h && h.unsubscribe()
}
),
p = !0
}
;
let g;
try {
if (l && zM && n !== "get" && n !== "head" && (g = await BM(c, r)) !== 0) {
let V = new Request(t,{
method: "POST",
body: r,
duplex: "half"
}), C;
re.isFormData(r) && (C = V.headers.get("content-type")) && c.setContentType(C),
V.body && (r = B1(V.body, W1, H1(g, Rd(l)), null, Am))
}
re.isString(d) || (d = d ? "cors" : "omit"),
b = new Request(t,{
...f,
signal: h,
method: n.toUpperCase(),
headers: c.normalize().toJSON(),
body: r,
duplex: "half",
withCredentials: d
});
let w = await fetch(b);
const E = Dm && (u === "stream" || u === "response");
if (Dm && (a || E)) {
const V = {};
["status", "statusText", "headers"].forEach(P=>{
V[P] = w[P]
}
);
const C = re.toFiniteNumber(w.headers.get("content-length"));
w = new Response(B1(w.body, W1, a && H1(C, Rd(a, !0)), E && v, Am),V)
}
u = u || "text";
let D = await Od[re.findKey(Od, u) || "text"](w, e);
return !E && v(),
m && m(),
await new Promise((V,C)=>{
GC(V, C, {
data: D,
headers: Pn.from(w.headers),
status: w.status,
statusText: w.statusText,
config: e,
request: b
})
}
)
} catch (w) {
throw v(),
w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,e,b), {
cause: w.cause || w
}) : Ne.from(w, w && w.code, e, b)
}
}
)
, Lm = {
http: aM,
xhr: $M,
fetch: HM
};
re.forEach(Lm, (e,t)=>{
if (e) {
try {
Object.defineProperty(e, "name", {
value: t
})
} catch {}
Object.defineProperty(e, "adapterName", {
value: t
})
}
}
);
const G1 = e=>`- ${e}`
, WM = e=>re.isFunction(e) || e === null || e === !1
, YC = {
getAdapter: e=>{
e = re.isArray(e) ? e : [e];
const {length: t} = e;
let n, r;
const i = {};
for (let s = 0; s < t; s++) {
n = e[s];
let o;
if (r = n,
!WM(n) && (r = Lm[(o = String(n)).toLowerCase()],
r === void 0))
throw new Ne(`Unknown adapter '${o}'`);
if (r)
break;
i[o || "#" + s] = r
}
if (!r) {
const s = Object.entries(i).map(([a,l])=>`adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build"));
let o = t ? s.length > 1 ? `since :
` + s.map(G1).join(`
`) : " " + G1(s[0]) : "as no adapter specified";
throw new Ne("There is no suitable adapter to dispatch the request " + o,"ERR_NOT_SUPPORT")
}
return r
}
,
adapters: Lm
};
function Ah(e) {
if (e.cancelToken && e.cancelToken.throwIfRequested(),
e.signal && e.signal.aborted)
throw new ya(null,e)
}
function K1(e) {
return Ah(e),
e.headers = Pn.from(e.headers),
e.data = _h.call(e, e.transformRequest),
["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
YC.getAdapter(e.adapter || Cu.adapter)(e).then(function(r) {
return Ah(e),
r.data = _h.call(e, e.transformResponse, r),
r.headers = Pn.from(r.headers),
r
}, function(r) {
return WC(r) || (Ah(e),
r && r.response && (r.response.data = _h.call(e, e.transformResponse, r.response),
r.response.headers = Pn.from(r.response.headers))),
Promise.reject(r)
})
}
const XC = "1.7.2"
, Lv = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e,t)=>{
Lv[e] = function(r) {
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e
}
}
);
const q1 = {};
Lv.transitional = function(t, n, r) {
function i(s, o) {
return "[Axios v" + XC + "] Transitional option '" + s + "'" + o + (r ? ". " + r : "")
}
return (s,o,a)=>{
if (t === !1)
throw new Ne(i(o, " has been removed" + (n ? " in " + n : "")),Ne.ERR_DEPRECATED);
return n && !q1[o] && (q1[o] = !0,
console.warn(i(o, " has been deprecated since v" + n + " and will be removed in the near future"))),
t ? t(s, o, a) : !0
}
}
;
function GM(e, t, n) {
if (typeof e != "object")
throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);
const r = Object.keys(e);
let i = r.length;
for (; i-- > 0; ) {
const s = r[i]
, o = t[s];
if (o) {
const a = e[s]
, l = a === void 0 || o(a, s, e);
if (l !== !0)
throw new Ne("option " + s + " must be " + l,Ne.ERR_BAD_OPTION_VALUE);
continue
}
if (n !== !0)
throw new Ne("Unknown option " + s,Ne.ERR_BAD_OPTION)
}
}
const Nm = {
assertOptions: GM,
validators: Lv
}
, oi = Nm.validators;
class Cs {
constructor(t) {
this.defaults = t,
this.interceptors = {
request: new V1,
response: new V1
}
}
async request(t, n) {
try {
return await this._request(t, n)
} catch (r) {
if (r instanceof Error) {
let i;
Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error;
const s = i.stack ? i.stack.replace(/^.+\n/, "") : "";
try {
r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + s) : r.stack = s
} catch {}
}
throw r
}
}
_request(t, n) {
typeof t == "string" ? (n = n || {},
n.url = t) : n = t || {},
n = js(this.defaults, n);
const {transitional: r, paramsSerializer: i, headers: s} = n;
r !== void 0 && Nm.assertOptions(r, {
silentJSONParsing: oi.transitional(oi.boolean),
forcedJSONParsing: oi.transitional(oi.boolean),
clarifyTimeoutError: oi.transitional(oi.boolean)
}, !1),
i != null && (re.isFunction(i) ? n.paramsSerializer = {
serialize: i
} : Nm.assertOptions(i, {
encode: oi.function,
serialize: oi.function
}, !0)),
n.method = (n.method || this.defaults.method || "get").toLowerCase();
let o = s && re.merge(s.common, s[n.method]);
s && re.forEach(["delete", "get", "head", "post", "put", "patch", "common"], m=>{
delete s[m]
}
),
n.headers = Pn.concat(o, s);
const a = [];
let l = !0;
this.interceptors.request.forEach(function(p) {
typeof p.runWhen == "function" && p.runWhen(n) === !1 || (l = l && p.synchronous,
a.unshift(p.fulfilled, p.rejected))
});
const u = [];
this.interceptors.response.forEach(function(p) {
u.push(p.fulfilled, p.rejected)
});
let c, d = 0, f;
if (!l) {
const m = [K1.bind(this), void 0];
for (m.unshift.apply(m, a),
m.push.apply(m, u),
f = m.length,
c = Promise.resolve(n); d < f; )
c = c.then(m[d++], m[d++]);
return c
}
f = a.length;
let h = n;
for (d = 0; d < f; ) {
const m = a[d++]
, p = a[d++];
try {
h = m(h)
} catch (b) {
p.call(this, b);
break
}
}
try {
c = K1.call(this, h)
} catch (m) {
return Promise.reject(m)
}
for (d = 0,
f = u.length; d < f; )
c = c.then(u[d++], u[d++]);
return c
}
getUri(t) {
t = js(this.defaults, t);
const n = KC(t.baseURL, t.url);
return UC(n, t.params, t.paramsSerializer)
}
}
re.forEach(["delete", "get", "head", "options"], function(t) {
Cs.prototype[t] = function(n, r) {
return this.request(js(r || {}, {
method: t,
url: n,
data: (r || {}).data
}))
}
});
re.forEach(["post", "put", "patch"], function(t) {
function n(r) {
return function(s, o, a) {
return this.request(js(a || {}, {
method: t,
headers: r ? {
"Content-Type": "multipart/form-data"
} : {},
url: s,
data: o
}))
}
}
Cs.prototype[t] = n(),
Cs.prototype[t + "Form"] = n(!0)
});
class Nv {
constructor(t) {
if (typeof t != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(s) {
n = s
}
);
const r = this;
this.promise.then(i=>{
if (!r._listeners)
return;
let s = r._listeners.length;
for (; s-- > 0; )
r._listeners[s](i);
r._listeners = null
}
),
this.promise.then = i=>{
let s;
const o = new Promise(a=>{
r.subscribe(a),
s = a
}
).then(i);
return o.cancel = function() {
r.unsubscribe(s)
}
,
o
}
,
t(function(s, o, a) {
r.reason || (r.reason = new ya(s,o,a),
n(r.reason))
})
}
throwIfRequested() {
if (this.reason)
throw this.reason
}
subscribe(t) {
if (this.reason) {
t(this.reason);
return
}
this._listeners ? this._listeners.push(t) : this._listeners = [t]
}
unsubscribe(t) {
if (!this._listeners)
return;
const n = this._listeners.indexOf(t);
n !== -1 && this._listeners.splice(n, 1)
}
static source() {
let t;
return {
token: new Nv(function(i) {
t = i
}
),
cancel: t
}
}
}
function KM(e) {
return function(n) {
return e.apply(null, n)
}
}
function qM(e) {
return re.isObject(e) && e.isAxiosError === !0
}
const Mm = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
};
Object.entries(Mm).forEach(([e,t])=>{
Mm[t] = e
}
);
function JC(e) {
const t = new Cs(e)
, n = _C(Cs.prototype.request, t);
return re.extend(n, Cs.prototype, t, {
allOwnKeys: !0
}),
re.extend(n, t, null, {
allOwnKeys: !0
}),
n.create = function(i) {
return JC(js(e, i))
}
,
n
}
const wt = JC(Cu);
wt.Axios = Cs;
wt.CanceledError = ya;
wt.CancelToken = Nv;
wt.isCancel = WC;
wt.VERSION = XC;
wt.toFormData = Of;
wt.AxiosError = Ne;
wt.Cancel = wt.CanceledError;
wt.all = function(t) {
return Promise.all(t)
}
;
wt.spread = KM;
wt.isAxiosError = qM;
wt.mergeConfig = js;
wt.AxiosHeaders = Pn;
wt.formToJSON = e=>HC(re.isHTMLForm(e) ? new FormData(e) : e);
wt.getAdapter = YC.getAdapter;
wt.HttpStatusCode = Mm;
wt.default = wt;
const QM = ()=>{
const {token: e} = R1()
, {data: t, error: n} = vf({
queryKey: ["token"],
queryFn: async()=>{
var i;
const {data: r} = await wt.post("https://your-url.com/api/login/", {}, {
headers: {
"Telegram-Data": (i = Telegram.WebApp) == null ? void 0 : i.initData
}
});
return r
}
,
enabled: !e
});
if (n)
throw n;
y.useEffect(()=>{
if (e) {
const r = wt.create({
baseURL: "https://your-url.com/api",
headers: {
"App-Token": e
}
});
Sd.setState({
api: r
})
}
}
, [e]),
y.useEffect(()=>{
if (t) {
const r = wt.create({
baseURL: "https://your-url.com/api",
headers: {
"App-Token": t
}
});
R1.setState({
token: t
}),
Sd.setState({
api: r
})
}
}
, [t])
}
, Et = e=>{
const {enabled: t=!1} = e || {}
, n = gn()
, r = gf()
, i = ND()
, {mutate: s} = Us({
onMutate: async l=>{
const u = [Qt.getUser];
await i(u),
r.setQueryData(u, c=>{
const d = {
...c,
...l
};
return console.log("nextUser mutate", d),
d
}
)
}
})
, {data: o, ...a} = vf({
queryKey: [Qt.getUser],
queryFn: async()=>{
if (!n)
throw new Error("api is not defined");
const l = Date.now()
, {data: u} = await n.get(Qt.getUser)
, c = Date.now()
, f = (l + c) / 2 - u.timestamp;
return {
...u,
diff: f
}
}
,
enabled: t
});
if (a.error)
throw a.error;
return {
...a,
user: o,
mutate: s
}
}
, Pu = ()=>{
const {user: e} = Et();
return e ? e.tappingGuruStarted !== void 0 : !1
}
;
let YM = {
data: ""
}
, XM = e=>typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), {
innerHTML: " ",
id: "_goober"
})).firstChild : e || YM
, JM = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g
, ZM = /\/\*[^]*?\*\/| +/g
, Q1 = /\n+/g
, gi = (e,t)=>{
let n = ""
, r = ""
, i = "";
for (let s in e) {
let o = e[s];
s[0] == "@" ? s[1] == "i" ? n = s + " " + o + ";" : r += s[1] == "f" ? gi(o, s) : s + "{" + gi(o, s[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += gi(o, t ? t.replace(/([^,])+/g, a=>s.replace(/(^:.*)|([^,])+/g, l=>/&/.test(l) ? l.replace(/&/g, a) : a ? a + " " + l : l)) : s) : o != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(),
i += gi.p ? gi.p(s, o) : s + ":" + o + ";")
}
return n + (t && i ? t + "{" + i + "}" : i) + r
}
, Lr = {}
, ZC = e=>{
if (typeof e == "object") {
let t = "";
for (let n in e)
t += n + ZC(e[n]);
return t
}
return e
}
, e3 = (e,t,n,r,i)=>{
let s = ZC(e)
, o = Lr[s] || (Lr[s] = (l=>{
let u = 0
, c = 11;
for (; u < l.length; )
c = 101 * c + l.charCodeAt(u++) >>> 0;
return "go" + c
}
)(s));
if (!Lr[o]) {
let l = s !== e ? e : (u=>{
let c, d, f = [{}];
for (; c = JM.exec(u.replace(ZM, "")); )
c[4] ? f.shift() : c[3] ? (d = c[3].replace(Q1, " ").trim(),
f.unshift(f[0][d] = f[0][d] || {})) : f[0][c[1]] = c[2].replace(Q1, " ").trim();
return f[0]
}
)(e);
Lr[o] = gi(i ? {
["@keyframes " + o]: l
} : l, n ? "" : "." + o)
}
let a = n && Lr.g ? Lr.g : null;
return n && (Lr.g = Lr[o]),
((l,u,c,d)=>{
d ? u.data = u.data.replace(d, l) : u.data.indexOf(l) === -1 && (u.data = c ? l + u.data : u.data + l)
}
)(Lr[o], t, r, a),
o
}
, t3 = (e,t,n)=>e.reduce((r,i,s)=>{
let o = t[s];
if (o && o.call) {
let a = o(n)
, l = a && a.props && a.props.className || /^go/.test(a) && a;
o = l ? "." + l : a && typeof a == "object" ? a.props ? "" : gi(a, "") : a === !1 ? "" : a
}
return r + i + (o ?? "")
}
, "");
function _f(e) {
let t = this || {}
, n = e.call ? e(t.p) : e;
return e3(n.unshift ? n.raw ? t3(n, [].slice.call(arguments, 1), t.p) : n.reduce((r,i)=>Object.assign(r, i && i.call ? i(t.p) : i), {}) : n, XM(t.target), t.g, t.o, t.k)
}
let eP, jm, $m;
_f.bind({
g: 1
});
let Jr = _f.bind({
k: 1
});
function n3(e, t, n, r) {
gi.p = t,
eP = e,
jm = n,
$m = r
}
function Yi(e, t) {
let n = this || {};
return function() {
let r = arguments;
function i(s, o) {
let a = Object.assign({}, s)
, l = a.className || i.className;
n.p = Object.assign({
theme: jm && jm()
}, a),
n.o = / *go\d+/.test(l),
a.className = _f.apply(n, r) + (l ? " " + l : "");
let u = e;
return e[0] && (u = a.as || e,
delete a.as),
$m && u[0] && $m(a),
eP(u, a)
}
return i
}
}
var r3 = e=>typeof e == "function"
, kd = (e,t)=>r3(e) ? e(t) : e
, i3 = (()=>{
let e = 0;
return ()=>(++e).toString()
}
)()
, tP = (()=>{
let e;
return ()=>{
if (e === void 0 && typeof window < "u") {
let t = matchMedia("(prefers-reduced-motion: reduce)");
e = !t || t.matches
}
return e
}
}
)()
, s3 = 20
, Mc = new Map
, o3 = 1e3
, Y1 = e=>{
if (Mc.has(e))
return;
let t = setTimeout(()=>{
Mc.delete(e),
Bs({
type: 4,
toastId: e
})
}
, o3);
Mc.set(e, t)
}
, a3 = e=>{
let t = Mc.get(e);
t && clearTimeout(t)
}
, Im = (e,t)=>{
switch (t.type) {
case 0:
return {
...e,
toasts: [t.toast, ...e.toasts].slice(0, s3)
};
case 1:
return t.toast.id && a3(t.toast.id),
{
...e,
toasts: e.toasts.map(s=>s.id === t.toast.id ? {
...s,
...t.toast
} : s)
};
case 2:
let {toast: n} = t;
return e.toasts.find(s=>s.id === n.id) ? Im(e, {
type: 1,
toast: n
}) : Im(e, {
type: 0,
toast: n
});
case 3:
let {toastId: r} = t;
return r ? Y1(r) : e.toasts.forEach(s=>{
Y1(s.id)
}
),
{
...e,
toasts: e.toasts.map(s=>s.id === r || r === void 0 ? {
...s,
visible: !1
} : s)
};
case 4:
return t.toastId === void 0 ? {
...e,
toasts: []
} : {
...e,
toasts: e.toasts.filter(s=>s.id !== t.toastId)
};
case 5:
return {
...e,
pausedAt: t.time
};
case 6:
let i = t.time - (e.pausedAt || 0);
return {
...e,
pausedAt: void 0,
toasts: e.toasts.map(s=>({
...s,
pauseDuration: s.pauseDuration + i
}))
}
}
}
, jc = []
, $c = {
toasts: [],
pausedAt: void 0
}
, Bs = e=>{
$c = Im($c, e),
jc.forEach(t=>{
t($c)
}
)
}
, l3 = {
blank: 4e3,
error: 4e3,
success: 2e3,
loading: 1 / 0,
custom: 4e3
}
, u3 = (e={})=>{
let[t,n] = y.useState($c);
y.useEffect(()=>(jc.push(n),
()=>{
let i = jc.indexOf(n);
i > -1 && jc.splice(i, 1)
}
), [t]);
let r = t.toasts.map(i=>{
var s, o;
return {
...e,
...e[i.type],
...i,
duration: i.duration || ((s = e[i.type]) == null ? void 0 : s.duration) || (e == null ? void 0 : e.duration) || l3[i.type],
style: {
...e.style,
...(o = e[i.type]) == null ? void 0 : o.style,
...i.style
}
}
}
);
return {
...t,
toasts: r
}
}
, c3 = (e,t="blank",n)=>({
createdAt: Date.now(),
visible: !0,
type: t,
ariaProps: {
role: "status",
"aria-live": "polite"
},
message: e,
pauseDuration: 0,
...n,
id: (n == null ? void 0 : n.id) || i3()
})
, Tu = e=>(t,n)=>{
let r = c3(t, e, n);
return Bs({
type: 2,
toast: r
}),
r.id
}
, _n = (e,t)=>Tu("blank")(e, t);
_n.error = Tu("error");
_n.success = Tu("success");
_n.loading = Tu("loading");
_n.custom = Tu("custom");
_n.dismiss = e=>{
Bs({
type: 3,
toastId: e
})
}
;
_n.remove = e=>Bs({
type: 4,
toastId: e
});
_n.promise = (e,t,n)=>{
let r = _n.loading(t.loading, {
...n,
...n == null ? void 0 : n.loading
});
return e.then(i=>(_n.success(kd(t.success, i), {
id: r,
...n,
...n == null ? void 0 : n.success
}),
i)).catch(i=>{
_n.error(kd(t.error, i), {
id: r,
...n,
...n == null ? void 0 : n.error
})
}
),
e
}
;
var d3 = (e,t)=>{
Bs({
type: 1,
toast: {
id: e,
height: t
}
})
}
, f3 = ()=>{
Bs({
type: 5,
time: Date.now()
})
}
, h3 = e=>{
let {toasts: t, pausedAt: n} = u3(e);
y.useEffect(()=>{
if (n)
return;
let s = Date.now()
, o = t.map(a=>{
if (a.duration === 1 / 0)
return;
let l = (a.duration || 0) + a.pauseDuration - (s - a.createdAt);
if (l < 0) {
a.visible && _n.dismiss(a.id);
return
}
return setTimeout(()=>_n.dismiss(a.id), l)
}
);
return ()=>{
o.forEach(a=>a && clearTimeout(a))
}
}
, [t, n]);
let r = y.useCallback(()=>{
n && Bs({
type: 6,
time: Date.now()
})
}
, [n])
, i = y.useCallback((s,o)=>{
let {reverseOrder: a=!1, gutter: l=8, defaultPosition: u} = o || {}
, c = t.filter(h=>(h.position || u) === (s.position || u) && h.height)
, d = c.findIndex(h=>h.id === s.id)
, f = c.filter((h,m)=>m < d && h.visible).length;
return c.filter(h=>h.visible).slice(...a ? [f + 1] : [0, f]).reduce((h,m)=>h + (m.height || 0) + l, 0)
}
, [t]);
return {
toasts: t,
handlers: {
updateHeight: d3,
startPause: f3,
endPause: r,
calculateOffset: i
}
}
}
, p3 = Jr`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`
, m3 = Jr`
from {
transform: scale(0);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}`
, g3 = Jr`
from {
transform: scale(0) rotate(90deg);
opacity: 0;
}
to {
transform: scale(1) rotate(90deg);
opacity: 1;
}`
, v3 = Yi("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary || "#ff4b4b"};
position: relative;
transform: rotate(45deg);
animation: ${p3} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after,
&:before {
content: '';
animation: ${m3} 0.15s ease-out forwards;
animation-delay: 150ms;
position: absolute;
border-radius: 3px;
opacity: 0;
background: ${e=>e.secondary || "#fff"};
bottom: 9px;
left: 4px;
height: 2px;
width: 12px;
}
&:before {
animation: ${g3} 0.15s ease-out forwards;
animation-delay: 180ms;
transform: rotate(90deg);
}
`
, y3 = Jr`
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
`
, w3 = Yi("div")`
width: 12px;
height: 12px;
box-sizing: border-box;
border: 2px solid;
border-radius: 100%;
border-color: ${e=>e.secondary || "#e0e0e0"};
border-right-color: ${e=>e.primary || "#616161"};
animation: ${y3} 1s linear infinite;
`
, x3 = Jr`
from {
transform: scale(0) rotate(45deg);
opacity: 0;
}
to {
transform: scale(1) rotate(45deg);
opacity: 1;
}`
, b3 = Jr`
0% {
height: 0;
width: 0;
opacity: 0;
}
40% {
height: 0;
width: 6px;
opacity: 1;
}
100% {
opacity: 1;
height: 10px;
}`
, S3 = Yi("div")`
width: 20px;
opacity: 0;
height: 20px;
border-radius: 10px;
background: ${e=>e.primary || "#61d345"};
position: relative;
transform: rotate(45deg);
animation: ${x3} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
animation-delay: 100ms;
&:after {
content: '';
box-sizing: border-box;
animation: ${b3} 0.2s ease-out forwards;
opacity: 0;
animation-delay: 200ms;
position: absolute;
border-right: 2px solid;
border-bottom: 2px solid;
border-color: ${e=>e.secondary || "#fff"};
bottom: 6px;
left: 6px;
height: 10px;
width: 6px;
}
`
, E3 = Yi("div")`
position: absolute;
`
, C3 = Yi("div")`
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
`
, P3 = Jr`
from {
transform: scale(0.6);
opacity: 0.4;
}
to {
transform: scale(1);
opacity: 1;
}`
, T3 = Yi("div")`
position: relative;
transform: scale(0.6);
opacity: 0.4;
min-width: 20px;
animation: ${P3} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
forwards;
`
, R3 = ({toast: e})=>{
let {icon: t, type: n, iconTheme: r} = e;
return t !== void 0 ? typeof t == "string" ? y.createElement(T3, null, t) : t : n === "blank" ? null : y.createElement(C3, null, y.createElement(w3, {
...r
}), n !== "loading" && y.createElement(E3, null, n === "error" ? y.createElement(v3, {
...r
}) : y.createElement(S3, {
...r
})))
}
, O3 = e=>`
0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`
, k3 = e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e * -150}%,-1px) scale(.6); opacity:0;}
`
, _3 = "0%{opacity:0;} 100%{opacity:1;}"
, A3 = "0%{opacity:1;} 100%{opacity:0;}"
, D3 = Yi("div")`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`
, L3 = Yi("div")`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`
, N3 = (e,t)=>{
let n = e.includes("top") ? 1 : -1
, [r,i] = tP() ? [_3, A3] : [O3(n), k3(n)];
return {
animation: t ? `${Jr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${Jr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`
}
}
, M3 = y.memo(({toast: e, position: t, style: n, children: r})=>{
let i = e.height ? N3(e.position || t || "top-center", e.visible) : {
opacity: 0
}
, s = y.createElement(R3, {
toast: e
})
, o = y.createElement(L3, {
...e.ariaProps
}, kd(e.message, e));
return y.createElement(D3, {
className: e.className,
style: {
...i,
...n,
...e.style
}
}, typeof r == "function" ? r({
icon: s,
message: o
}) : y.createElement(y.Fragment, null, s, o))
}
);
n3(y.createElement);
var j3 = ({id: e, className: t, style: n, onHeightUpdate: r, children: i})=>{
let s = y.useCallback(o=>{
if (o) {
let a = ()=>{
let l = o.getBoundingClientRect().height;
r(e, l)
}
;
a(),
new MutationObserver(a).observe(o, {
subtree: !0,
childList: !0,
characterData: !0
})
}
}
, [e, r]);
return y.createElement("div", {
ref: s,
className: t,
style: n
}, i)
}
, $3 = (e,t)=>{
let n = e.includes("top")
, r = n ? {
top: 0
} : {
bottom: 0
}
, i = e.includes("center") ? {
justifyContent: "center"
} : e.includes("right") ? {
justifyContent: "flex-end"
} : {};
return {
left: 0,
right: 0,
display: "flex",
position: "absolute",
transition: tP() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)",
transform: `translateY(${t * (n ? 1 : -1)}px)`,
...r,
...i
}
}
, I3 = _f`
z-index: 9999;
> * {
pointer-events: auto;
}
`
, oc = 16
, F3 = ({reverseOrder: e, position: t="top-center", toastOptions: n, gutter: r, children: i, containerStyle: s, containerClassName: o})=>{
let {toasts: a, handlers: l} = h3(n);
return y.createElement("div", {
style: {
position: "fixed",
zIndex: 9999,
top: oc,
left: oc,
right: oc,
bottom: oc,
pointerEvents: "none",
...s
},
className: o,
onMouseEnter: l.startPause,
onMouseLeave: l.endPause
}, a.map(u=>{
let c = u.position || t
, d = l.calculateOffset(u, {
reverseOrder: e,
gutter: r,
defaultPosition: t
})
, f = $3(c, d);
return y.createElement(j3, {
id: u.id,
key: u.id,
onHeightUpdate: l.updateHeight,
className: u.visible ? I3 : "",
style: f
}, u.type === "custom" ? kd(u.message, u) : i ? i(u) : y.createElement(M3, {
toast: u,
position: c
}))
}
))
}
;
const wa = ()=>{
const [e,t] = jR();
return r=>{
_n.success(r),
t("success")
}
}
, nP = ()=>{
const e = wv()
, t = gn()
, {mutate: n, isPending: r} = Us({
mutationFn: ()=>t.post(Qt.fullTank, {})
})
, {user: i, mutate: s} = Et()
, o = wa();
return {
startFullTank: async()=>{
if (!i)
return;
const l = Date.now()
, {energyLimit: u, fullTankLeft: c} = i
, d = u * Ar.energyPerLevel
, f = c - 1;
if (f === 0) {
const h = l + Ar.fullTankDelay;
s({
fullTankNextTime: h,
fullTankLeft: 0,
energy: d
})
} else
s({
fullTankLeft: f,
energy: d
});
o("Energy restored!"),
n(),
e("/")
}
,
isFullTankPending: r
}
}
, V3 = e=>{
const t = gn()
, n = wa()
, {mutate: r} = Us({
mutationFn: ()=>t.post(Qt.multitap, {})
})
, {user: i, mutate: s} = Et();
return {
increaseMultitap: async()=>{
i && (n("Multitap increased!"),
s({
multitap: i.multitap + 1,
balance: i.balance - e
}),
r())
}
}
}
, z3 = e=>{
const t = gn()
, n = wa()
, {mutate: r} = Us({
mutationFn: ()=>t.post(Qt.rechargingSpeed, {})
})
, {user: i, mutate: s} = Et()
, o = async()=>{
i && (n("Recharging speed increased!"),
s({
rechargingSpeed: i.rechargingSpeed + 1,
balance: i.balance - e
}),
r())
}
;
return {
increaseRechargingSpeed: ()=>o()
}
}
, U3 = e=>{
const {user: t, mutate: n} = Et()
, r = gn()
, i = wa()
, {mutate: s} = Us({
mutationFn: ()=>r.post(Qt.energyLimit, {})
});
return {
increaseEnergyLimit: async()=>{
t && (n({
energyLimit: t.energyLimit + 1,
balance: t.balance - e
}),
s(),
i("Energy limit increased!"))
}
}
}
, Mv = ()=>{
const e = gn()
, {user: t, mutate: n} = Et()
, r = ll(s=>s.resetTaps);
return {
sendTaps: async s=>{
if (!t)
return;
const o = ll.getState().tapsInc
, a = ll.getState().initTimestamp
, l = s == null ? void 0 : s.tappingGuruEnded;
if (o === 0)
return;
const u = a - t.diff
, c = {
tapsInc: o,
initTimestamp: u,
...l ? {
tappingGuruEnded: l
} : {}
};
r();
const {data: d} = await e.post(Qt.tap, c)
, f = d.energy ? {
energy: d.energy
} : {};
n({
balance: d.balance,
score: d.score,
...f
})
}
}
}
, rP = ()=>{
const e = wv()
, {user: t, mutate: n} = Et()
, r = gn()
, {sendTaps: i} = Mv()
, s = wa()
, {mutate: o, isPending: a} = Us({
mutationFn: ()=>r.post(Qt.tappingGuru, {})
});
return {
startTapingGuru: async()=>{
if (!t)
return;
const u = Date.now()
, c = t.tappingGuruLeft === 1
, d = c ? t.tappingGuruNextTime : void 0;
n({
tappingGuruStarted: u,
tappingGuruLeft: t.tappingGuruLeft - 1,
...c && {
tappingGuruNextTime: d
}
}),
s("Power Punching activated!"),
e("/"),
o(),
setTimeout(()=>{
n({
tappingGuruStarted: void 0
}),
i({
tappingGuruEnded: !0
})
}
, Ar.tappingGuruLifeTime)
}
,
isTapingGuruPending: a
}
}
, X1 = [200, 500, 1e3, 2e3, 4e3, 8e3, 16e3, 25e3, 5e4, 1e5, 2e5, 3e5, 4e5, 5e5, 6e5, 7e5, 8e5, 9e5, 1e6]
, Hr = {
multitap: X1,
energyLimit: X1,
rechargingSpeed: [2e3, 1e4, 1e5, 25e4]
}
, jv = e=>{
const {children: t, price: n, level: r, iconUrl: i, disabled: s, isMaxLevelReached: o, ...a} = e
, {t: l} = Tt("boosters");
return x.jsx("button", {
...a,
className: Ze("w-full rounded-2xl bg-graphite-normal p-3 pr-5 disabled:opacity-35", s && "pointer-events-none"),
disabled: s,
children: x.jsxs("div", {
className: "flex w-full items-center justify-between",
children: [x.jsxs("div", {
className: "flex items-center gap-2 leading-none",
children: [x.jsx("img", {
src: i,
className: "size-10"
}), x.jsxs("div", {
className: "flex flex-col items-start gap-3",
children: [x.jsx("div", {
className: "text-h5",
children: t
}), x.jsxs("div", {
className: "flex items-center gap-2.5",
children: [!o && x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-6"
}), x.jsx("div", {
className: "text-base text-white/65",
children: n
})]
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsxs("div", {
className: "relative",
children: [x.jsx("img", {
src: Ae.levelCoin,
className: "relative size-6 object-contain"
}), x.jsx("div", {
className: "absolute inset-0 top-[5px] z-0 text-base text-white",
children: r
})]
}), x.jsx("div", {
children: l("level")
})]
})]
})]
})]
}), x.jsx(B3, {})]
})
})
}
, B3 = ()=>x.jsx("svg", {
width: "8",
height: "12",
viewBox: "0 0 8 12",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
children: x.jsx("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M0.861766 0.195262C1.12212 -0.0650874 1.54423 -0.0650874 1.80458 0.195262L7.13791 5.5286C7.39826 5.78895 7.39826 6.21106 7.13791 6.4714L1.80458 11.8047C1.54423 12.0651 1.12212 12.0651 0.861766 11.8047C0.601417 11.5444 0.601417 11.1223 0.861766 10.8619L5.7237 6L0.861766 1.13807C0.601417 0.877722 0.601417 0.455612 0.861766 0.195262Z",
fill: "white"
})
});
function H3(e) {
const t = Math.floor(e / 3600)
, n = Math.floor(e % 3600 / 60)
, r = e % 60;
return `${Dh(t)}:${Dh(n)}:${Dh(r)}`
}
function Dh(e) {
return e < 10 ? `0${e}` : `${e}`
}
const iP = e=>{
const {nextActiveTime: t, ...n} = e
, [r,i] = y.useState(t ? t - Date.now() : void 0)
, s = r ? Math.floor(r / 1e3) : 0;
return kv(()=>{
if (!t)
return;
const o = Date.now()
, a = t - o;
i(a)
}
, 1e3),
x.jsx("button", {
...n,
className: Ze("min-h-16 w-full rounded-2xl border border-graphite-light bg-graphite-normal p-2.5 disabled:opacity-35", e.disabled && "pointer-events-none"),
disabled: e.disabled,
children: x.jsxs("div", {
className: "flex items-center gap-1 leading-none",
children: [x.jsx("img", {
src: e.iconUrl,
className: "size-10"
}), x.jsxs("div", {
className: "flex flex-col items-start gap-2.5",
children: [x.jsx("div", {
className: "text-left text-h5",
children: e.children
}), x.jsx("div", {
className: "text-base text-white/65",
children: e.left === 0 ? H3(s) : `${e.left}/3`
})]
})]
})
})
}
, W3 = e=>{
const {multitap: t, balance: n} = Vt(zt)
, r = Hr.multitap[t - 1]
, i = !Hr.multitap[t - 1]
, s = r > n || i
, {t: o} = Tt("boosters");
return x.jsx(jv, {
...e,
level: t,
price: r,
iconUrl: Ae.multitap,
disabled: s,
isMaxLevelReached: i,
children: o("multitap")
})
}
, G3 = e=>{
const {energyLimit: t, balance: n} = Vt(zt)
, r = Hr.energyLimit[t - 1]
, i = !Hr.energyLimit[t - 1]
, s = r > n || i
, {t: o} = Tt("boosters");
return x.jsx(jv, {
level: t,
price: r,
iconUrl: Ae.energyLimit,
disabled: s,
isMaxLevelReached: i,
...e,
children: o("energyLimit")
})
}
, K3 = e=>{
const {rechargingSpeed: t, balance: n} = Vt(zt)
, r = Hr.rechargingSpeed[t - 1]
, i = !Hr.rechargingSpeed[t - 1]
, s = r > n || i
, {t: o} = Tt("boosters");
return x.jsx(jv, {
...e,
level: t,
price: r,
iconUrl: Ae.rechargingSpeed,
disabled: s,
isMaxLevelReached: i,
children: o("rechargingSpeed")
})
}
, q3 = e=>{
const {tappingGuruLeft: t, tappingGuruNextTime: n} = Vt(zt)
, r = Pu()
, {isTapingGuruPending: i} = rP()
, s = t === 0 || i || r
, {t: o} = Tt("boosters");
return x.jsx(iP, {
...e,
disabled: s,
left: t,
iconUrl: Ae.tappingGuru,
nextActiveTime: n,
children: o("tappingGuru")
})
}
, Q3 = e=>{
const {fullTankLeft: t, fullTankNextTime: n} = Vt(zt)
, {isFullTankPending: r} = nP()
, i = Pu()
, s = t === 0 || r || i
, {t: o} = Tt("boosters");
return x.jsx(iP, {
...e,
disabled: s,
left: t,
iconUrl: Ae.fullTank,
nextActiveTime: n,
children: o("fullTank")
})
}
, Af = e=>x.jsx("svg", {
width: "16",
height: "16",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
...e,
children: x.jsx("path", {
d: "M0.362356 13.7928C-0.117521 14.2727 -0.127314 15.1247 0.37215 15.6242C0.881407 16.1236 1.73343 16.1138 2.20352 15.6438L8.00121 9.84606L13.7891 15.634C14.2788 16.1236 15.121 16.1236 15.6205 15.6242C16.12 15.1149 16.12 14.2825 15.6303 13.7928L9.84238 8.0049L15.6303 2.2072C16.12 1.71753 16.1297 0.875295 15.6205 0.375831C15.121 -0.123633 14.2788 -0.123633 13.7891 0.366038L8.00121 6.15394L2.20352 0.366038C1.73343 -0.113839 0.871613 -0.133426 0.37215 0.375831C-0.127314 0.875295 -0.117521 1.73711 0.362356 2.2072L6.15026 8.0049L0.362356 13.7928Z",
fill: "white"
})
});
function qe() {
return qe = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
({}).hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
qe.apply(null, arguments)
}
function Yt(e, t, {checkForDefaultPrevented: n=!0}={}) {
return function(i) {
if (e == null || e(i),
n === !1 || !i.defaultPrevented)
return t == null ? void 0 : t(i)
}
}
function Y3(e, t) {
typeof e == "function" ? e(t) : e != null && (e.current = t)
}
function sP(...e) {
return t=>e.forEach(n=>Y3(n, t))
}
function Zr(...e) {
return y.useCallback(sP(...e), e)
}
function Ru(e, t=[]) {
let n = [];
function r(s, o) {
const a = y.createContext(o)
, l = n.length;
n = [...n, o];
function u(d) {
const {scope: f, children: h, ...m} = d
, p = (f == null ? void 0 : f[e][l]) || a
, b = y.useMemo(()=>m, Object.values(m));
return y.createElement(p.Provider, {
value: b
}, h)
}
function c(d, f) {
const h = (f == null ? void 0 : f[e][l]) || a
, m = y.useContext(h);
if (m)
return m;
if (o !== void 0)
return o;
throw new Error(`\`${d}\` must be used within \`${s}\``)
}
return u.displayName = s + "Provider",
[u, c]
}
const i = ()=>{
const s = n.map(o=>y.createContext(o));
return function(a) {
const l = (a == null ? void 0 : a[e]) || s;
return y.useMemo(()=>({
[`__scope${e}`]: {
...a,
[e]: l
}
}), [a, l])
}
}
;
return i.scopeName = e,
[r, X3(i, ...t)]
}
function X3(...e) {
const t = e[0];
if (e.length === 1)
return t;
const n = ()=>{
const r = e.map(i=>({
useScope: i(),
scopeName: i.scopeName
}));
return function(s) {
const o = r.reduce((a,{useScope: l, scopeName: u})=>{
const d = l(s)[`__scope${u}`];
return {
...a,
...d
}
}
, {});
return y.useMemo(()=>({
[`__scope${t.scopeName}`]: o
}), [o])
}
}
;
return n.scopeName = t.scopeName,
n
}
const Fm = globalThis != null && globalThis.document ? y.useLayoutEffect : ()=>{}
, J3 = vb.useId || (()=>{}
);
let Z3 = 0;
function ul(e) {
const [t,n] = y.useState(J3());
return Fm(()=>{
n(r=>r ?? String(Z3++))
}
, [e]),
t ? `radix-${t}` : ""
}
function Vi(e) {
const t = y.useRef(e);
return y.useEffect(()=>{
t.current = e
}
),
y.useMemo(()=>(...n)=>{
var r;
return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n)
}
, [])
}
function $v({prop: e, defaultProp: t, onChange: n=()=>{}
}) {
const [r,i] = ej({
defaultProp: t,
onChange: n
})
, s = e !== void 0
, o = s ? e : r
, a = Vi(n)
, l = y.useCallback(u=>{
if (s) {
const d = typeof u == "function" ? u(e) : u;
d !== e && a(d)
} else
i(u)
}
, [s, e, i, a]);
return [o, l]
}
function ej({defaultProp: e, onChange: t}) {
const n = y.useState(e)
, [r] = n
, i = y.useRef(r)
, s = Vi(t);
return y.useEffect(()=>{
i.current !== r && (s(r),
i.current = r)
}
, [r, i, s]),
n
}
const Ul = y.forwardRef((e,t)=>{
const {children: n, ...r} = e
, i = y.Children.toArray(n)
, s = i.find(nj);
if (s) {
const o = s.props.children
, a = i.map(l=>l === s ? y.Children.count(o) > 1 ? y.Children.only(null) : y.isValidElement(o) ? o.props.children : null : l);
return y.createElement(Vm, qe({}, r, {
ref: t
}), y.isValidElement(o) ? y.cloneElement(o, void 0, a) : null)
}
return y.createElement(Vm, qe({}, r, {
ref: t
}), n)
}
);
Ul.displayName = "Slot";
const Vm = y.forwardRef((e,t)=>{
const {children: n, ...r} = e;
return y.isValidElement(n) ? y.cloneElement(n, {
...rj(r, n.props),
ref: t ? sP(t, n.ref) : n.ref
}) : y.Children.count(n) > 1 ? y.Children.only(null) : null
}
);
Vm.displayName = "SlotClone";
const tj = ({children: e})=>y.createElement(y.Fragment, null, e);
function nj(e) {
return y.isValidElement(e) && e.type === tj
}
function rj(e, t) {
const n = {
...t
};
for (const r in t) {
const i = e[r]
, s = t[r];
/^on[A-Z]/.test(r) ? i && s ? n[r] = (...a)=>{
s(...a),
i(...a)
}
: i && (n[r] = i) : r === "style" ? n[r] = {
...i,
...s
} : r === "className" && (n[r] = [i, s].filter(Boolean).join(" "))
}
return {
...e,
...n
}
}
const ij = ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "span", "svg", "ul"]
, ln = ij.reduce((e,t)=>{
const n = y.forwardRef((r,i)=>{
const {asChild: s, ...o} = r
, a = s ? Ul : t;
return y.useEffect(()=>{
window[Symbol.for("radix-ui")] = !0
}
, []),
y.createElement(a, qe({}, o, {
ref: i
}))
}
);
return n.displayName = `Primitive.${t}`,
{
...e,
[t]: n
}
}
, {});
function sj(e, t) {
e && xu.flushSync(()=>e.dispatchEvent(t))
}
function oj(e, t=globalThis == null ? void 0 : globalThis.document) {
const n = Vi(e);
y.useEffect(()=>{
const r = i=>{
i.key === "Escape" && n(i)
}
;
return t.addEventListener("keydown", r),
()=>t.removeEventListener("keydown", r)
}
, [n, t])
}
const zm = "dismissableLayer.update"
, aj = "dismissableLayer.pointerDownOutside"
, lj = "dismissableLayer.focusOutside";
let J1;
const uj = y.createContext({
layers: new Set,
layersWithOutsidePointerEventsDisabled: new Set,
branches: new Set
})
, cj = y.forwardRef((e,t)=>{
var n;
const {disableOutsidePointerEvents: r=!1, onEscapeKeyDown: i, onPointerDownOutside: s, onFocusOutside: o, onInteractOutside: a, onDismiss: l, ...u} = e
, c = y.useContext(uj)
, [d,f] = y.useState(null)
, h = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document
, [,m] = y.useState({})
, p = Zr(t, P=>f(P))
, b = Array.from(c.layers)
, [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1)
, g = b.indexOf(v)
, w = d ? b.indexOf(d) : -1
, E = c.layersWithOutsidePointerEventsDisabled.size > 0
, D = w >= g
, V = dj(P=>{
const A = P.target
, B = [...c.branches].some(Q=>Q.contains(A));
!D || B || (s == null || s(P),
a == null || a(P),
P.defaultPrevented || l == null || l())
}
, h)
, C = fj(P=>{
const A = P.target;
[...c.branches].some(Q=>Q.contains(A)) || (o == null || o(P),
a == null || a(P),
P.defaultPrevented || l == null || l())
}
, h);
return oj(P=>{
w === c.layers.size - 1 && (i == null || i(P),
!P.defaultPrevented && l && (P.preventDefault(),
l()))
}
, h),
y.useEffect(()=>{
if (d)
return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (J1 = h.body.style.pointerEvents,
h.body.style.pointerEvents = "none"),
c.layersWithOutsidePointerEventsDisabled.add(d)),
c.layers.add(d),
Z1(),
()=>{
r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = J1)
}
}
, [d, h, r, c]),
y.useEffect(()=>()=>{
d && (c.layers.delete(d),
c.layersWithOutsidePointerEventsDisabled.delete(d),
Z1())
}
, [d, c]),
y.useEffect(()=>{
const P = ()=>m({});
return document.addEventListener(zm, P),
()=>document.removeEventListener(zm, P)
}
, []),
y.createElement(ln.div, qe({}, u, {
ref: p,
style: {
pointerEvents: E ? D ? "auto" : "none" : void 0,
...e.style
},
onFocusCapture: Yt(e.onFocusCapture, C.onFocusCapture),
onBlurCapture: Yt(e.onBlurCapture, C.onBlurCapture),
onPointerDownCapture: Yt(e.onPointerDownCapture, V.onPointerDownCapture)
}))
}
);
function dj(e, t=globalThis == null ? void 0 : globalThis.document) {
const n = Vi(e)
, r = y.useRef(!1)
, i = y.useRef(()=>{}
);
return y.useEffect(()=>{
const s = a=>{
if (a.target && !r.current) {
let c = function() {
oP(aj, n, u, {
discrete: !0
})
};
var l = c;
const u = {
originalEvent: a
};
a.pointerType === "touch" ? (t.removeEventListener("click", i.current),
i.current = c,
t.addEventListener("click", i.current, {
once: !0
})) : c()
} else
t.removeEventListener("click", i.current);
r.current = !1
}
, o = window.setTimeout(()=>{
t.addEventListener("pointerdown", s)
}
, 0);
return ()=>{
window.clearTimeout(o),
t.removeEventListener("pointerdown", s),
t.removeEventListener("click", i.current)
}
}
, [t, n]),
{
onPointerDownCapture: ()=>r.current = !0
}
}
function fj(e, t=globalThis == null ? void 0 : globalThis.document) {
const n = Vi(e)
, r = y.useRef(!1);
return y.useEffect(()=>{
const i = s=>{
s.target && !r.current && oP(lj, n, {
originalEvent: s
}, {
discrete: !1
})
}
;
return t.addEventListener("focusin", i),
()=>t.removeEventListener("focusin", i)
}
, [t, n]),
{
onFocusCapture: ()=>r.current = !0,
onBlurCapture: ()=>r.current = !1
}
}
function Z1() {
const e = new CustomEvent(zm);
document.dispatchEvent(e)
}
function oP(e, t, n, {discrete: r}) {
const i = n.originalEvent.target
, s = new CustomEvent(e,{
bubbles: !1,
cancelable: !0,
detail: n
});
t && i.addEventListener(e, t, {
once: !0
}),
r ? sj(i, s) : i.dispatchEvent(s)
}
const Lh = "focusScope.autoFocusOnMount"
, Nh = "focusScope.autoFocusOnUnmount"
, ew = {
bubbles: !1,
cancelable: !0
}
, hj = y.forwardRef((e,t)=>{
const {loop: n=!1, trapped: r=!1, onMountAutoFocus: i, onUnmountAutoFocus: s, ...o} = e
, [a,l] = y.useState(null)
, u = Vi(i)
, c = Vi(s)
, d = y.useRef(null)
, f = Zr(t, p=>l(p))
, h = y.useRef({
paused: !1,
pause() {
this.paused = !0
},
resume() {
this.paused = !1
}
}).current;
y.useEffect(()=>{
if (r) {
let g = function(V) {
if (h.paused || !a)
return;
const C = V.target;
a.contains(C) ? d.current = C : ui(d.current, {
select: !0
})
}
, w = function(V) {
if (h.paused || !a)
return;
const C = V.relatedTarget;
C !== null && (a.contains(C) || ui(d.current, {
select: !0
}))
}
, E = function(V) {
if (document.activeElement === document.body)
for (const P of V)
P.removedNodes.length > 0 && ui(a)
};
var p = g
, b = w
, v = E;
document.addEventListener("focusin", g),
document.addEventListener("focusout", w);
const D = new MutationObserver(E);
return a && D.observe(a, {
childList: !0,
subtree: !0
}),
()=>{
document.removeEventListener("focusin", g),
document.removeEventListener("focusout", w),
D.disconnect()
}
}
}
, [r, a, h.paused]),
y.useEffect(()=>{
if (a) {
nw.add(h);
const p = document.activeElement;
if (!a.contains(p)) {
const v = new CustomEvent(Lh,ew);
a.addEventListener(Lh, u),
a.dispatchEvent(v),
v.defaultPrevented || (pj(wj(aP(a)), {
select: !0
}),
document.activeElement === p && ui(a))
}
return ()=>{
a.removeEventListener(Lh, u),
setTimeout(()=>{
const v = new CustomEvent(Nh,ew);
a.addEventListener(Nh, c),
a.dispatchEvent(v),
v.defaultPrevented || ui(p ?? document.body, {
select: !0
}),
a.removeEventListener(Nh, c),
nw.remove(h)
}
, 0)
}
}
}
, [a, u, c, h]);
const m = y.useCallback(p=>{
if (!n && !r || h.paused)
return;
const b = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey
, v = document.activeElement;
if (b && v) {
const g = p.currentTarget
, [w,E] = mj(g);
w && E ? !p.shiftKey && v === E ? (p.preventDefault(),
n && ui(w, {
select: !0
})) : p.shiftKey && v === w && (p.preventDefault(),
n && ui(E, {
select: !0
})) : v === g && p.preventDefault()
}
}
, [n, r, h.paused]);
return y.createElement(ln.div, qe({
tabIndex: -1
}, o, {
ref: f,
onKeyDown: m
}))
}
);
function pj(e, {select: t=!1}={}) {
const n = document.activeElement;
for (const r of e)
if (ui(r, {
select: t
}),
document.activeElement !== n)
return
}
function mj(e) {
const t = aP(e)
, n = tw(t, e)
, r = tw(t.reverse(), e);
return [n, r]
}
function aP(e) {
const t = []
, n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: r=>{
const i = r.tagName === "INPUT" && r.type === "hidden";
return r.disabled || r.hidden || i ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
}
});
for (; n.nextNode(); )
t.push(n.currentNode);
return t
}
function tw(e, t) {
for (const n of e)
if (!gj(n, {
upTo: t
}))
return n
}
function gj(e, {upTo: t}) {
if (getComputedStyle(e).visibility === "hidden")
return !0;
for (; e; ) {
if (t !== void 0 && e === t)
return !1;
if (getComputedStyle(e).display === "none")
return !0;
e = e.parentElement
}
return !1
}
function vj(e) {
return e instanceof HTMLInputElement && "select"in e
}
function ui(e, {select: t=!1}={}) {
if (e && e.focus) {
const n = document.activeElement;
e.focus({
preventScroll: !0
}),
e !== n && vj(e) && t && e.select()
}
}
const nw = yj();
function yj() {
let e = [];
return {
add(t) {
const n = e[0];
t !== n && (n == null || n.pause()),
e = rw(e, t),
e.unshift(t)
},
remove(t) {
var n;
e = rw(e, t),
(n = e[0]) === null || n === void 0 || n.resume()
}
}
}
function rw(e, t) {
const n = [...e]
, r = n.indexOf(t);
return r !== -1 && n.splice(r, 1),
n
}
function wj(e) {
return e.filter(t=>t.tagName !== "A")
}
const xj = y.forwardRef((e,t)=>{
var n;
const {container: r=globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...i} = e;
return r ? EE.createPortal(y.createElement(ln.div, qe({}, i, {
ref: t
})), r) : null
}
);
function bj(e, t) {
return y.useReducer((n,r)=>{
const i = t[n][r];
return i ?? n
}
, e)
}
const Ou = e=>{
const {present: t, children: n} = e
, r = Sj(t)
, i = typeof n == "function" ? n({
present: r.isPresent
}) : y.Children.only(n)
, s = Zr(r.ref, i.ref);
return typeof n == "function" || r.isPresent ? y.cloneElement(i, {
ref: s
}) : null
}
;
Ou.displayName = "Presence";
function Sj(e) {
const [t,n] = y.useState()
, r = y.useRef({})
, i = y.useRef(e)
, s = y.useRef("none")
, o = e ? "mounted" : "unmounted"
, [a,l] = bj(o, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
return y.useEffect(()=>{
const u = ac(r.current);
s.current = a === "mounted" ? u : "none"
}
, [a]),
Fm(()=>{
const u = r.current
, c = i.current;
if (c !== e) {
const f = s.current
, h = ac(u);
e ? l("MOUNT") : h === "none" || (u == null ? void 0 : u.display) === "none" ? l("UNMOUNT") : l(c && f !== h ? "ANIMATION_OUT" : "UNMOUNT"),
i.current = e
}
}
, [e, l]),
Fm(()=>{
if (t) {
const u = d=>{
const h = ac(r.current).includes(d.animationName);
d.target === t && h && xu.flushSync(()=>l("ANIMATION_END"))
}
, c = d=>{
d.target === t && (s.current = ac(r.current))
}
;
return t.addEventListener("animationstart", c),
t.addEventListener("animationcancel", u),
t.addEventListener("animationend", u),
()=>{
t.removeEventListener("animationstart", c),
t.removeEventListener("animationcancel", u),
t.removeEventListener("animationend", u)
}
} else
l("ANIMATION_END")
}
, [t, l]),
{
isPresent: ["mounted", "unmountSuspended"].includes(a),
ref: y.useCallback(u=>{
u && (r.current = getComputedStyle(u)),
n(u)
}
, [])
}
}
function ac(e) {
return (e == null ? void 0 : e.animationName) || "none"
}
let Mh = 0;
function Ej() {
y.useEffect(()=>{
var e, t;
const n = document.querySelectorAll("[data-radix-focus-guard]");
return document.body.insertAdjacentElement("afterbegin", (e = n[0]) !== null && e !== void 0 ? e : iw()),
document.body.insertAdjacentElement("beforeend", (t = n[1]) !== null && t !== void 0 ? t : iw()),
Mh++,
()=>{
Mh === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),
Mh--
}
}
, [])
}
function iw() {
const e = document.createElement("span");
return e.setAttribute("data-radix-focus-guard", ""),
e.tabIndex = 0,
e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none",
e
}
var Tr = function() {
return Tr = Object.assign || function(t) {
for (var n, r = 1, i = arguments.length; r < i; r++) {
n = arguments[r];
for (var s in n)
Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s])
}
return t
}
,
Tr.apply(this, arguments)
};
function lP(e, t) {
var n = {};
for (var r in e)
Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function")
for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++)
t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
return n
}
function Cj(e, t, n) {
if (n || arguments.length === 2)
for (var r = 0, i = t.length, s; r < i; r++)
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)),
s[r] = t[r]);
return e.concat(s || Array.prototype.slice.call(t))
}
var Ic = "right-scroll-bar-position"
, Fc = "width-before-scroll-bar"
, Pj = "with-scroll-bars-hidden"
, Tj = "--removed-body-scroll-bar-size";
function jh(e, t) {
return typeof e == "function" ? e(t) : e && (e.current = t),
e
}
function Rj(e, t) {
var n = y.useState(function() {
return {
value: e,
callback: t,
facade: {
get current() {
return n.value
},
set current(r) {
var i = n.value;
i !== r && (n.value = r,
n.callback(r, i))
}
}
}
})[0];
return n.callback = t,
n.facade
}
var Oj = typeof window < "u" ? y.useLayoutEffect : y.useEffect
, sw = new WeakMap;
function kj(e, t) {
var n = Rj(null, function(r) {
return e.forEach(function(i) {
return jh(i, r)
})
});
return Oj(function() {
var r = sw.get(n);
if (r) {
var i = new Set(r)
, s = new Set(e)
, o = n.current;
i.forEach(function(a) {
s.has(a) || jh(a, null)
}),
s.forEach(function(a) {
i.has(a) || jh(a, o)
})
}
sw.set(n, e)
}, [e]),
n
}
function _j(e) {
return e
}
function Aj(e, t) {
t === void 0 && (t = _j);
var n = []
, r = !1
, i = {
read: function() {
if (r)
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
return n.length ? n[n.length - 1] : e
},
useMedium: function(s) {
var o = t(s, r);
return n.push(o),
function() {
n = n.filter(function(a) {
return a !== o
})
}
},
assignSyncMedium: function(s) {
for (r = !0; n.length; ) {
var o = n;
n = [],
o.forEach(s)
}
n = {
push: function(a) {
return s(a)
},
filter: function() {
return n
}
}
},
assignMedium: function(s) {
r = !0;
var o = [];
if (n.length) {
var a = n;
n = [],
a.forEach(s),
o = n
}
var l = function() {
var c = o;
o = [],
c.forEach(s)
}
, u = function() {
return Promise.resolve().then(l)
};
u(),
n = {
push: function(c) {
o.push(c),
u()
},
filter: function(c) {
return o = o.filter(c),
n
}
}
}
};
return i
}
function Dj(e) {
e === void 0 && (e = {});
var t = Aj(null);
return t.options = Tr({
async: !0,
ssr: !1
}, e),
t
}
var uP = function(e) {
var t = e.sideCar
, n = lP(e, ["sideCar"]);
if (!t)
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
var r = t.read();
if (!r)
throw new Error("Sidecar medium not found");
return y.createElement(r, Tr({}, n))
};
uP.isSideCarExport = !0;
function Lj(e, t) {
return e.useMedium(t),
uP
}
var cP = Dj()
, $h = function() {}
, Df = y.forwardRef(function(e, t) {
var n = y.useRef(null)
, r = y.useState({
onScrollCapture: $h,
onWheelCapture: $h,
onTouchMoveCapture: $h
})
, i = r[0]
, s = r[1]
, o = e.forwardProps
, a = e.children
, l = e.className
, u = e.removeScrollBar
, c = e.enabled
, d = e.shards
, f = e.sideCar
, h = e.noIsolation
, m = e.inert
, p = e.allowPinchZoom
, b = e.as
, v = b === void 0 ? "div" : b
, g = lP(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"])
, w = f
, E = kj([n, t])
, D = Tr(Tr({}, g), i);
return y.createElement(y.Fragment, null, c && y.createElement(w, {
sideCar: cP,
removeScrollBar: u,
shards: d,
noIsolation: h,
inert: m,
setCallbacks: s,
allowPinchZoom: !!p,
lockRef: n
}), o ? y.cloneElement(y.Children.only(a), Tr(Tr({}, D), {
ref: E
})) : y.createElement(v, Tr({}, D, {
className: l,
ref: E
}), a))
});
Df.defaultProps = {
enabled: !0,
removeScrollBar: !0,
inert: !1
};
Df.classNames = {
fullWidth: Fc,
zeroRight: Ic
};
var Nj = function() {
if (typeof __webpack_nonce__ < "u")
return __webpack_nonce__
};
function Mj() {
if (!document)
return null;
var e = document.createElement("style");
e.type = "text/css";
var t = Nj();
return t && e.setAttribute("nonce", t),
e
}
function jj(e, t) {
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t))
}
function $j(e) {
var t = document.head || document.getElementsByTagName("head")[0];
t.appendChild(e)
}
var Ij = function() {
var e = 0
, t = null;
return {
add: function(n) {
e == 0 && (t = Mj()) && (jj(t, n),
$j(t)),
e++
},
remove: function() {
e--,
!e && t && (t.parentNode && t.parentNode.removeChild(t),
t = null)
}
}
}
, Fj = function() {
var e = Ij();
return function(t, n) {
y.useEffect(function() {
return e.add(t),
function() {
e.remove()
}
}, [t && n])
}
}
, dP = function() {
var e = Fj()
, t = function(n) {
var r = n.styles
, i = n.dynamic;
return e(r, i),
null
};
return t
}
, Vj = {
left: 0,
top: 0,
right: 0,
gap: 0
}
, Ih = function(e) {
return parseInt(e || "", 10) || 0
}
, zj = function(e) {
var t = window.getComputedStyle(document.body)
, n = t[e === "padding" ? "paddingLeft" : "marginLeft"]
, r = t[e === "padding" ? "paddingTop" : "marginTop"]
, i = t[e === "padding" ? "paddingRight" : "marginRight"];
return [Ih(n), Ih(r), Ih(i)]
}
, Uj = function(e) {
if (e === void 0 && (e = "margin"),
typeof window > "u")
return Vj;
var t = zj(e)
, n = document.documentElement.clientWidth
, r = window.innerWidth;
return {
left: t[0],
top: t[1],
right: t[2],
gap: Math.max(0, r - n + t[2] - t[0])
}
}
, Bj = dP()
, Do = "data-scroll-locked"
, Hj = function(e, t, n, r) {
var i = e.left
, s = e.top
, o = e.right
, a = e.gap;
return n === void 0 && (n = "margin"),
`
.`.concat(Pj, ` {
overflow: hidden `).concat(r, `;
padding-right: `).concat(a, "px ").concat(r, `;
}
body[`).concat(Do, `] {
overflow: hidden `).concat(r, `;
overscroll-behavior: contain;
`).concat([t && "position: relative ".concat(r, ";"), n === "margin" && `
padding-left: `.concat(i, `px;
padding-top: `).concat(s, `px;
padding-right: `).concat(o, `px;
margin-left:0;
margin-top:0;
margin-right: `).concat(a, "px ").concat(r, `;
`), n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")].filter(Boolean).join(""), `
}
.`).concat(Ic, ` {
right: `).concat(a, "px ").concat(r, `;
}
.`).concat(Fc, ` {
margin-right: `).concat(a, "px ").concat(r, `;
}
.`).concat(Ic, " .").concat(Ic, ` {
right: 0 `).concat(r, `;
}
.`).concat(Fc, " .").concat(Fc, ` {
margin-right: 0 `).concat(r, `;
}
body[`).concat(Do, `] {
`).concat(Tj, ": ").concat(a, `px;
}
`)
}
, ow = function() {
var e = parseInt(document.body.getAttribute(Do) || "0", 10);
return isFinite(e) ? e : 0
}
, Wj = function() {
y.useEffect(function() {
return document.body.setAttribute(Do, (ow() + 1).toString()),
function() {
var e = ow() - 1;
e <= 0 ? document.body.removeAttribute(Do) : document.body.setAttribute(Do, e.toString())
}
}, [])
}
, Gj = function(e) {
var t = e.noRelative
, n = e.noImportant
, r = e.gapMode
, i = r === void 0 ? "margin" : r;
Wj();
var s = y.useMemo(function() {
return Uj(i)
}, [i]);
return y.createElement(Bj, {
styles: Hj(s, !t, i, n ? "" : "!important")
})
}
, Um = !1;
if (typeof window < "u")
try {
var lc = Object.defineProperty({}, "passive", {
get: function() {
return Um = !0,
!0
}
});
window.addEventListener("test", lc, lc),
window.removeEventListener("test", lc, lc)
} catch {
Um = !1
}
var Zs = Um ? {
passive: !1
} : !1
, Kj = function(e) {
return e.tagName === "TEXTAREA"
}
, fP = function(e, t) {
var n = window.getComputedStyle(e);
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !Kj(e) && n[t] === "visible")
}
, qj = function(e) {
return fP(e, "overflowY")
}
, Qj = function(e) {
return fP(e, "overflowX")
}
, aw = function(e, t) {
var n = t;
do {
typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
var r = hP(e, n);
if (r) {
var i = pP(e, n)
, s = i[1]
, o = i[2];
if (s > o)
return !0
}
n = n.parentNode
} while (n && n !== document.body);
return !1
}
, Yj = function(e) {
var t = e.scrollTop
, n = e.scrollHeight
, r = e.clientHeight;
return [t, n, r]
}
, Xj = function(e) {
var t = e.scrollLeft
, n = e.scrollWidth
, r = e.clientWidth;
return [t, n, r]
}
, hP = function(e, t) {
return e === "v" ? qj(t) : Qj(t)
}
, pP = function(e, t) {
return e === "v" ? Yj(t) : Xj(t)
}
, Jj = function(e, t) {
return e === "h" && t === "rtl" ? -1 : 1
}
, Zj = function(e, t, n, r, i) {
var s = Jj(e, window.getComputedStyle(t).direction)
, o = s * r
, a = n.target
, l = t.contains(a)
, u = !1
, c = o > 0
, d = 0
, f = 0;
do {
var h = pP(e, a)
, m = h[0]
, p = h[1]
, b = h[2]
, v = p - b - s * m;
(m || v) && hP(e, a) && (d += v,
f += m),
a = a.parentNode
} while (!l && a !== document.body || l && (t.contains(a) || t === a));
return (c && (d === 0 || !i) || !c && (f === 0 || !i)) && (u = !0),
u
}
, uc = function(e) {
return "changedTouches"in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0]
}
, lw = function(e) {
return [e.deltaX, e.deltaY]
}
, uw = function(e) {
return e && "current"in e ? e.current : e
}
, e4 = function(e, t) {
return e[0] === t[0] && e[1] === t[1]
}
, t4 = function(e) {
return `
.block-interactivity-`.concat(e, ` {pointer-events: none;}
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
`)
}
, n4 = 0
, eo = [];
function r4(e) {
var t = y.useRef([])
, n = y.useRef([0, 0])
, r = y.useRef()
, i = y.useState(n4++)[0]
, s = y.useState(function() {
return dP()
})[0]
, o = y.useRef(e);
y.useEffect(function() {
o.current = e
}, [e]),
y.useEffect(function() {
if (e.inert) {
document.body.classList.add("block-interactivity-".concat(i));
var p = Cj([e.lockRef.current], (e.shards || []).map(uw), !0).filter(Boolean);
return p.forEach(function(b) {
return b.classList.add("allow-interactivity-".concat(i))
}),
function() {
document.body.classList.remove("block-interactivity-".concat(i)),
p.forEach(function(b) {
return b.classList.remove("allow-interactivity-".concat(i))
})
}
}
}, [e.inert, e.lockRef.current, e.shards]);
var a = y.useCallback(function(p, b) {
if ("touches"in p && p.touches.length === 2)
return !o.current.allowPinchZoom;
var v = uc(p), g = n.current, w = "deltaX"in p ? p.deltaX : g[0] - v[0], E = "deltaY"in p ? p.deltaY : g[1] - v[1], D, V = p.target, C = Math.abs(w) > Math.abs(E) ? "h" : "v";
if ("touches"in p && C === "h" && V.type === "range")
return !1;
var P = aw(C, V);
if (!P)
return !0;
if (P ? D = C : (D = C === "v" ? "h" : "v",
P = aw(C, V)),
!P)
return !1;
if (!r.current && "changedTouches"in p && (w || E) && (r.current = D),
!D)
return !0;
var A = r.current || D;
return Zj(A, b, p, A === "h" ? w : E, !0)
}, [])
, l = y.useCallback(function(p) {
var b = p;
if (!(!eo.length || eo[eo.length - 1] !== s)) {
var v = "deltaY"in b ? lw(b) : uc(b)
, g = t.current.filter(function(D) {
return D.name === b.type && D.target === b.target && e4(D.delta, v)
})[0];
if (g && g.should) {
b.cancelable && b.preventDefault();
return
}
if (!g) {
var w = (o.current.shards || []).map(uw).filter(Boolean).filter(function(D) {
return D.contains(b.target)
})
, E = w.length > 0 ? a(b, w[0]) : !o.current.noIsolation;
E && b.cancelable && b.preventDefault()
}
}
}, [])
, u = y.useCallback(function(p, b, v, g) {
var w = {
name: p,
delta: b,
target: v,
should: g
};
t.current.push(w),
setTimeout(function() {
t.current = t.current.filter(function(E) {
return E !== w
})
}, 1)
}, [])
, c = y.useCallback(function(p) {
n.current = uc(p),
r.current = void 0
}, [])
, d = y.useCallback(function(p) {
u(p.type, lw(p), p.target, a(p, e.lockRef.current))
}, [])
, f = y.useCallback(function(p) {
u(p.type, uc(p), p.target, a(p, e.lockRef.current))
}, []);
y.useEffect(function() {
return eo.push(s),
e.setCallbacks({
onScrollCapture: d,
onWheelCapture: d,
onTouchMoveCapture: f
}),
document.addEventListener("wheel", l, Zs),
document.addEventListener("touchmove", l, Zs),
document.addEventListener("touchstart", c, Zs),
function() {
eo = eo.filter(function(p) {
return p !== s
}),
document.removeEventListener("wheel", l, Zs),
document.removeEventListener("touchmove", l, Zs),
document.removeEventListener("touchstart", c, Zs)
}
}, []);
var h = e.removeScrollBar
, m = e.inert;
return y.createElement(y.Fragment, null, m ? y.createElement(s, {
styles: t4(i)
}) : null, h ? y.createElement(Gj, {
gapMode: "margin"
}) : null)
}
const i4 = Lj(cP, r4);
var mP = y.forwardRef(function(e, t) {
return y.createElement(Df, Tr({}, e, {
ref: t,
sideCar: i4
}))
});
mP.classNames = Df.classNames;
var s4 = function(e) {
if (typeof document > "u")
return null;
var t = Array.isArray(e) ? e[0] : e;
return t.ownerDocument.body
}
, to = new WeakMap
, cc = new WeakMap
, dc = {}
, Fh = 0
, gP = function(e) {
return e && (e.host || gP(e.parentNode))
}
, o4 = function(e, t) {
return t.map(function(n) {
if (e.contains(n))
return n;
var r = gP(n);
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"),
null)
}).filter(function(n) {
return !!n
})
}
, a4 = function(e, t, n, r) {
var i = o4(t, Array.isArray(e) ? e : [e]);
dc[n] || (dc[n] = new WeakMap);
var s = dc[n]
, o = []
, a = new Set
, l = new Set(i)
, u = function(d) {
!d || a.has(d) || (a.add(d),
u(d.parentNode))
};
i.forEach(u);
var c = function(d) {
!d || l.has(d) || Array.prototype.forEach.call(d.children, function(f) {
if (a.has(f))
c(f);
else
try {
var h = f.getAttribute(r)
, m = h !== null && h !== "false"
, p = (to.get(f) || 0) + 1
, b = (s.get(f) || 0) + 1;
to.set(f, p),
s.set(f, b),
o.push(f),
p === 1 && m && cc.set(f, !0),
b === 1 && f.setAttribute(n, "true"),
m || f.setAttribute(r, "true")
} catch (v) {
console.error("aria-hidden: cannot operate on ", f, v)
}
})
};
return c(t),
a.clear(),
Fh++,
function() {
o.forEach(function(d) {
var f = to.get(d) - 1
, h = s.get(d) - 1;
to.set(d, f),
s.set(d, h),
f || (cc.has(d) || d.removeAttribute(r),
cc.delete(d)),
h || d.removeAttribute(n)
}),
Fh--,
Fh || (to = new WeakMap,
to = new WeakMap,
cc = new WeakMap,
dc = {})
}
}
, l4 = function(e, t, n) {
n === void 0 && (n = "data-aria-hidden");
var r = Array.from(Array.isArray(e) ? e : [e])
, i = s4(e);
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live]"))),
a4(r, i, n, "aria-hidden")) : function() {
return null
}
};
const vP = "Dialog"
, [yP,Dz] = Ru(vP)
, [u4,gr] = yP(vP)
, c4 = e=>{
const {__scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: s, modal: o=!0} = e
, a = y.useRef(null)
, l = y.useRef(null)
, [u=!1,c] = $v({
prop: r,
defaultProp: i,
onChange: s
});
return y.createElement(u4, {
scope: t,
triggerRef: a,
contentRef: l,
contentId: ul(),
titleId: ul(),
descriptionId: ul(),
open: u,
onOpenChange: c,
onOpenToggle: y.useCallback(()=>c(d=>!d), [c]),
modal: o
}, n)
}
, d4 = "DialogTrigger"
, f4 = y.forwardRef((e,t)=>{
const {__scopeDialog: n, ...r} = e
, i = gr(d4, n)
, s = Zr(t, i.triggerRef);
return y.createElement(ln.button, qe({
type: "button",
"aria-haspopup": "dialog",
"aria-expanded": i.open,
"aria-controls": i.contentId,
"data-state": Iv(i.open)
}, r, {
ref: s,
onClick: Yt(e.onClick, i.onOpenToggle)
}))
}
)
, wP = "DialogPortal"
, [h4,xP] = yP(wP, {
forceMount: void 0
})
, p4 = e=>{
const {__scopeDialog: t, forceMount: n, children: r, container: i} = e
, s = gr(wP, t);
return y.createElement(h4, {
scope: t,
forceMount: n
}, y.Children.map(r, o=>y.createElement(Ou, {
present: n || s.open
}, y.createElement(xj, {
asChild: !0,
container: i
}, o))))
}
, Bm = "DialogOverlay"
, m4 = y.forwardRef((e,t)=>{
const n = xP(Bm, e.__scopeDialog)
, {forceMount: r=n.forceMount, ...i} = e
, s = gr(Bm, e.__scopeDialog);
return s.modal ? y.createElement(Ou, {
present: r || s.open
}, y.createElement(g4, qe({}, i, {
ref: t
}))) : null
}
)
, g4 = y.forwardRef((e,t)=>{
const {__scopeDialog: n, ...r} = e
, i = gr(Bm, n);
return y.createElement(mP, {
as: Ul,
allowPinchZoom: !0,
shards: [i.contentRef]
}, y.createElement(ln.div, qe({
"data-state": Iv(i.open)
}, r, {
ref: t,
style: {
pointerEvents: "auto",
...r.style
}
})))
}
)
, Bl = "DialogContent"
, v4 = y.forwardRef((e,t)=>{
const n = xP(Bl, e.__scopeDialog)
, {forceMount: r=n.forceMount, ...i} = e
, s = gr(Bl, e.__scopeDialog);
return y.createElement(Ou, {
present: r || s.open
}, s.modal ? y.createElement(y4, qe({}, i, {
ref: t
})) : y.createElement(w4, qe({}, i, {
ref: t
})))
}
)
, y4 = y.forwardRef((e,t)=>{
const n = gr(Bl, e.__scopeDialog)
, r = y.useRef(null)
, i = Zr(t, n.contentRef, r);
return y.useEffect(()=>{
const s = r.current;
if (s)
return l4(s)
}
, []),
y.createElement(bP, qe({}, e, {
ref: i,
trapFocus: n.open,
disableOutsidePointerEvents: !0,
onCloseAutoFocus: Yt(e.onCloseAutoFocus, s=>{
var o;
s.preventDefault(),
(o = n.triggerRef.current) === null || o === void 0 || o.focus()
}
),
onPointerDownOutside: Yt(e.onPointerDownOutside, s=>{
const o = s.detail.originalEvent
, a = o.button === 0 && o.ctrlKey === !0;
(o.button === 2 || a) && s.preventDefault()
}
),
onFocusOutside: Yt(e.onFocusOutside, s=>s.preventDefault())
}))
}
)
, w4 = y.forwardRef((e,t)=>{
const n = gr(Bl, e.__scopeDialog)
, r = y.useRef(!1)
, i = y.useRef(!1);
return y.createElement(bP, qe({}, e, {
ref: t,
trapFocus: !1,
disableOutsidePointerEvents: !1,
onCloseAutoFocus: s=>{
var o;
if ((o = e.onCloseAutoFocus) === null || o === void 0 || o.call(e, s),
!s.defaultPrevented) {
var a;
r.current || (a = n.triggerRef.current) === null || a === void 0 || a.focus(),
s.preventDefault()
}
r.current = !1,
i.current = !1
}
,
onInteractOutside: s=>{
var o, a;
(o = e.onInteractOutside) === null || o === void 0 || o.call(e, s),
s.defaultPrevented || (r.current = !0,
s.detail.originalEvent.type === "pointerdown" && (i.current = !0));
const l = s.target;
((a = n.triggerRef.current) === null || a === void 0 ? void 0 : a.contains(l)) && s.preventDefault(),
s.detail.originalEvent.type === "focusin" && i.current && s.preventDefault()
}
}))
}
)
, bP = y.forwardRef((e,t)=>{
const {__scopeDialog: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: s, ...o} = e
, a = gr(Bl, n)
, l = y.useRef(null)
, u = Zr(t, l);
return Ej(),
y.createElement(y.Fragment, null, y.createElement(hj, {
asChild: !0,
loop: !0,
trapped: r,
onMountAutoFocus: i,
onUnmountAutoFocus: s
}, y.createElement(cj, qe({
role: "dialog",
id: a.contentId,
"aria-describedby": a.descriptionId,
"aria-labelledby": a.titleId,
"data-state": Iv(a.open)
}, o, {
ref: u,
onDismiss: ()=>a.onOpenChange(!1)
}))), !1)
}
)
, x4 = "DialogTitle"
, b4 = y.forwardRef((e,t)=>{
const {__scopeDialog: n, ...r} = e
, i = gr(x4, n);
return y.createElement(ln.h2, qe({
id: i.titleId
}, r, {
ref: t
}))
}
)
, S4 = "DialogDescription"
, E4 = y.forwardRef((e,t)=>{
const {__scopeDialog: n, ...r} = e
, i = gr(S4, n);
return y.createElement(ln.p, qe({
id: i.descriptionId
}, r, {
ref: t
}))
}
)
, C4 = "DialogClose"
, P4 = y.forwardRef((e,t)=>{
const {__scopeDialog: n, ...r} = e
, i = gr(C4, n);
return y.createElement(ln.button, qe({
type: "button"
}, r, {
ref: t,
onClick: Yt(e.onClick, ()=>i.onOpenChange(!1))
}))
}
);
function Iv(e) {
return e ? "open" : "closed"
}
const T4 = c4
, R4 = f4
, O4 = p4
, k4 = m4
, _4 = v4
, A4 = b4
, D4 = E4
, L4 = P4;
function N4(e) {
if (typeof document > "u")
return;
let t = document.head || document.getElementsByTagName("head")[0]
, n = document.createElement("style");
n.type = "text/css",
t.appendChild(n),
n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e))
}
const SP = ce.createContext({
drawerRef: {
current: null
},
overlayRef: {
current: null
},
scaleBackground: ()=>{}
,
onPress: ()=>{}
,
onRelease: ()=>{}
,
onDrag: ()=>{}
,
onNestedDrag: ()=>{}
,
onNestedOpenChange: ()=>{}
,
onNestedRelease: ()=>{}
,
openProp: void 0,
dismissible: !1,
handleOnly: !1,
isOpen: !1,
isDragging: !1,
keyboardIsOpen: {
current: !1
},
snapPointsOffset: null,
snapPoints: null,
modal: !1,
shouldFade: !1,
activeSnapPoint: null,
onOpenChange: ()=>{}
,
setActiveSnapPoint: ()=>{}
,
visible: !1,
closeDrawer: ()=>{}
,
setVisible: ()=>{}
,
direction: "bottom"
})
, Lf = ()=>{
const e = ce.useContext(SP);
if (!e)
throw new Error("useDrawerContext must be used within a Drawer.Root");
return e
}
;
N4("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
const M4 = typeof window < "u" ? y.useLayoutEffect : y.useEffect;
function Hm(...e) {
return (...t)=>{
for (let n of e)
typeof n == "function" && n(...t)
}
}
function j4() {
return Fv(/^Mac/)
}
function $4() {
return Fv(/^iPhone/)
}
function I4() {
return Fv(/^iPad/) || j4() && navigator.maxTouchPoints > 1
}
function EP() {
return $4() || I4()
}
function Fv(e) {
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0
}
const Vh = typeof document < "u" && window.visualViewport;
function cw(e) {
let t = window.getComputedStyle(e);
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY)
}
function CP(e) {
for (cw(e) && (e = e.parentElement); e && !cw(e); )
e = e.parentElement;
return e || document.scrollingElement || document.documentElement
}
const F4 = new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
let fc = 0, zh;
function V4(e={}) {
let {isDisabled: t} = e;
M4(()=>{
if (!t)
return fc++,
fc === 1 && (EP() ? zh = U4() : zh = z4()),
()=>{
fc--,
fc === 0 && zh()
}
}
, [t])
}
function z4() {
return Hm(PP(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`))
}
function U4() {
let e, t = 0, n = d=>{
e = CP(d.target),
!(e === document.documentElement && e === document.body) && (t = d.changedTouches[0].pageY)
}
, r = d=>{
if (!e || e === document.documentElement || e === document.body) {
d.preventDefault();
return
}
let f = d.changedTouches[0].pageY
, h = e.scrollTop
, m = e.scrollHeight - e.clientHeight;
m !== 0 && ((h <= 0 && f > t || h >= m && f < t) && d.preventDefault(),
t = f)
}
, i = d=>{
let f = d.target;
Wm(f) && f !== document.activeElement && (d.preventDefault(),
f.style.transform = "translateY(-2000px)",
f.focus(),
requestAnimationFrame(()=>{
f.style.transform = ""
}
))
}
, s = d=>{
let f = d.target;
Wm(f) && (f.style.transform = "translateY(-2000px)",
requestAnimationFrame(()=>{
f.style.transform = "",
Vh && (Vh.height < window.innerHeight ? requestAnimationFrame(()=>{
dw(f)
}
) : Vh.addEventListener("resize", ()=>dw(f), {
once: !0
}))
}
))
}
, o = ()=>{
window.scrollTo(0, 0)
}
, a = window.pageXOffset, l = window.pageYOffset, u = Hm(PP(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
window.scrollTo(0, 0);
let c = Hm(Fa(document, "touchstart", n, {
passive: !1,
capture: !0
}), Fa(document, "touchmove", r, {
passive: !1,
capture: !0
}), Fa(document, "touchend", i, {
passive: !1,
capture: !0
}), Fa(document, "focus", s, !0), Fa(window, "scroll", o));
return ()=>{
u(),
c(),
window.scrollTo(a, l)
}
}
function PP(e, t, n) {
let r = e.style[t];
return e.style[t] = n,
()=>{
e.style[t] = r
}
}
function Fa(e, t, n, r) {
return e.addEventListener(t, n, r),
()=>{
e.removeEventListener(t, n, r)
}
}
function dw(e) {
let t = document.scrollingElement || document.documentElement;
for (; e && e !== t; ) {
let n = CP(e);
if (n !== document.documentElement && n !== document.body && n !== e) {
let r = n.getBoundingClientRect().top
, i = e.getBoundingClientRect().top
, s = e.getBoundingClientRect().bottom;
const o = n.getBoundingClientRect().bottom;
s > o && (n.scrollTop += i - r)
}
e = n.parentElement
}
}
function Wm(e) {
return e instanceof HTMLInputElement && !F4.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable
}
function B4(e, t) {
typeof e == "function" ? e(t) : e != null && (e.current = t)
}
function H4(...e) {
return t=>e.forEach(n=>B4(n, t))
}
function TP(...e) {
return y.useCallback(H4(...e), e)
}
let Va = null;
function W4({isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: i, noBodyStyles: s}) {
const [o,a] = ce.useState(()=>typeof window < "u" ? window.location.href : "")
, l = ce.useRef(0)
, u = ce.useCallback(()=>{
if (Va === null && e && !s) {
Va = {
position: document.body.style.position,
top: document.body.style.top,
left: document.body.style.left,
height: document.body.style.height,
right: "unset"
};
const {scrollX: d, innerHeight: f} = window;
document.body.style.setProperty("position", "fixed", "important"),
Object.assign(document.body.style, {
top: `${-l.current}px`,
left: `${-d}px`,
right: "0px",
height: "auto"
}),
window.setTimeout(()=>window.requestAnimationFrame(()=>{
const h = f - window.innerHeight;
h && l.current >= f && (document.body.style.top = `${-(l.current + h)}px`)
}
), 300)
}
}
, [e])
, c = ce.useCallback(()=>{
if (Va !== null && !s) {
const d = -parseInt(document.body.style.top, 10)
, f = -parseInt(document.body.style.left, 10);
Object.assign(document.body.style, Va),
window.requestAnimationFrame(()=>{
if (i && o !== window.location.href) {
a(window.location.href);
return
}
window.scrollTo(f, d)
}
),
Va = null
}
}
, [o]);
return ce.useEffect(()=>{
function d() {
l.current = window.scrollY
}
return d(),
window.addEventListener("scroll", d),
()=>{
window.removeEventListener("scroll", d)
}
}
, []),
ce.useEffect(()=>{
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && u(),
t || window.setTimeout(()=>{
c()
}
, 500)) : c())
}
, [e, r, o, t, n, u, c]),
{
restorePositionSetting: c
}
}
const RP = new WeakMap;
function lt(e, t, n=!1) {
if (!e || !(e instanceof HTMLElement))
return;
let r = {};
Object.entries(t).forEach(([i,s])=>{
if (i.startsWith("--")) {
e.style.setProperty(i, s);
return
}
r[i] = e.style[i],
e.style[i] = s
}
),
!n && RP.set(e, r)
}
function hc(e, t) {
if (!e || !(e instanceof HTMLElement))
return;
let n = RP.get(e);
n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([r,i])=>{
e.style[r] = i
}
))
}
const Rt = e=>{
switch (e) {
case "top":
case "bottom":
return !0;
case "left":
case "right":
return !1;
default:
return e
}
}
;
function pc(e, t) {
if (!e)
return null;
const n = window.getComputedStyle(e)
, r = n.transform || n.webkitTransform || n.mozTransform;
let i = r.match(/^matrix3d\((.+)\)$/);
return i ? parseFloat(i[1].split(", ")[Rt(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/),
i ? parseFloat(i[1].split(", ")[Rt(t) ? 5 : 4]) : null)
}
function G4(e) {
return 8 * (Math.log(e + 1) - 2)
}
const tt = {
DURATION: .5,
EASE: [.32, .72, 0, 1]
}
, OP = .4;
function kP(e) {
const t = ce.useRef(e);
return ce.useEffect(()=>{
t.current = e
}
),
ce.useMemo(()=>(...n)=>t.current == null ? void 0 : t.current.call(t, ...n), [])
}
function K4({defaultProp: e, onChange: t}) {
const n = ce.useState(e)
, [r] = n
, i = ce.useRef(r)
, s = kP(t);
return ce.useEffect(()=>{
i.current !== r && (s(r),
i.current = r)
}
, [r, i, s]),
n
}
function q4({prop: e, defaultProp: t, onChange: n=()=>{}
}) {
const [r,i] = K4({
defaultProp: t,
onChange: n
})
, s = e !== void 0
, o = s ? e : r
, a = kP(n)
, l = ce.useCallback(u=>{
if (s) {
const d = typeof u == "function" ? u(e) : u;
d !== e && a(d)
} else
i(u)
}
, [s, e, i, a]);
return [o, l]
}
function Q4({activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: i, fadeFromIndex: s, onSnapPointChange: o, direction: a="bottom"}) {
const [l,u] = q4({
prop: e,
defaultProp: n == null ? void 0 : n[0],
onChange: t
})
, c = ce.useMemo(()=>l === (n == null ? void 0 : n[n.length - 1]) || null, [n, l])
, d = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === l || !n
, f = ce.useMemo(()=>n == null ? void 0 : n.findIndex(w=>w === l), [n, l])
, h = ce.useMemo(()=>{
var w;
return (w = n == null ? void 0 : n.map(E=>{
const D = typeof window < "u"
, V = typeof E == "string";
let C = 0;
if (V && (C = parseInt(E, 10)),
Rt(a)) {
const A = V ? C : D ? E * window.innerHeight : 0;
return D ? a === "bottom" ? window.innerHeight - A : -window.innerHeight + A : A
}
const P = V ? C : D ? E * window.innerWidth : 0;
return D ? a === "right" ? window.innerWidth - P : -window.innerWidth + P : P
}
)) != null ? w : []
}
, [n])
, m = ce.useMemo(()=>f !== null ? h == null ? void 0 : h[f] : null, [h, f])
, p = ce.useCallback(w=>{
var E;
const D = (E = h == null ? void 0 : h.findIndex(V=>V === w)) != null ? E : null;
o(D),
lt(r.current, {
transition: `transform ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
transform: Rt(a) ? `translate3d(0, ${w}px, 0)` : `translate3d(${w}px, 0, 0)`
}),
h && D !== h.length - 1 && D !== s ? lt(i.current, {
transition: `opacity ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
opacity: "0"
}) : lt(i.current, {
transition: `opacity ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
opacity: "1"
}),
u(D !== null ? n == null ? void 0 : n[D] : null)
}
, [r.current, n, h, s, i, u]);
ce.useEffect(()=>{
if (l || e) {
var w;
const E = (w = n == null ? void 0 : n.findIndex(D=>D === e || D === l)) != null ? w : -1;
h && E !== -1 && typeof h[E] == "number" && p(h[E])
}
}
, [l, e, n, h, p]);
function b({draggedDistance: w, closeDrawer: E, velocity: D, dismissible: V}) {
if (s === void 0)
return;
const C = a === "bottom" || a === "right" ? (m ?? 0) - w : (m ?? 0) + w
, P = f === s - 1
, A = f === 0
, B = w > 0;
if (P && lt(i.current, {
transition: `opacity ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`
}),
D > 2 && !B) {
V ? E() : p(h[0]);
return
}
if (D > 2 && B && h && n) {
p(h[n.length - 1]);
return
}
const Q = h == null ? void 0 : h.reduce((F,k)=>typeof F != "number" || typeof k != "number" ? F : Math.abs(k - C) < Math.abs(F - C) ? k : F)
, Z = Rt(a) ? window.innerHeight : window.innerWidth;
if (D > OP && Math.abs(w) < Z * .4) {
const F = B ? 1 : -1;
if (F > 0 && c) {
p(h[n.length - 1]);
return
}
if (A && F < 0 && V && E(),
f === null)
return;
p(h[f + F]);
return
}
p(Q)
}
function v({draggedDistance: w}) {
if (m === null)
return;
const E = a === "bottom" || a === "right" ? m - w : m + w;
(a === "bottom" || a === "right") && E < h[h.length - 1] || (a === "top" || a === "left") && E > h[h.length - 1] || lt(r.current, {
transform: Rt(a) ? `translate3d(0, ${E}px, 0)` : `translate3d(${E}px, 0, 0)`
})
}
function g(w, E) {
if (!n || typeof f != "number" || !h || s === void 0)
return null;
const D = f === s - 1;
if (f >= s && E)
return 0;
if (D && !E)
return 1;
if (!d && !D)
return null;
const C = D ? f + 1 : f - 1
, P = D ? h[C] - h[C - 1] : h[C + 1] - h[C]
, A = w / Math.abs(P);
return D ? 1 - A : A
}
return {
isLastSnapPoint: c,
activeSnapPoint: l,
shouldFade: d,
getPercentageDragged: g,
setActiveSnapPoint: u,
activeSnapPointIndex: f,
onRelease: b,
onDrag: v,
snapPointsOffset: h
}
}
const Y4 = .25
, X4 = 100
, fw = 8
, Ji = 16
, hw = 26
, Uh = "vaul-dragging";
function _P({open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: i, onRelease: s, snapPoints: o, nested: a=!1, setBackgroundColorOnScale: l=!0, closeThreshold: u=Y4, scrollLockTimeout: c=X4, dismissible: d=!0, handleOnly: f=!1, fadeFromIndex: h=o && o.length - 1, activeSnapPoint: m, setActiveSnapPoint: p, fixed: b, modal: v=!0, onClose: g, noBodyStyles: w, direction: E="bottom", preventScrollRestoration: D=!0, disablePreventScroll: V=!1}) {
var C;
const [P=!1,A] = ce.useState(!1)
, [B,Q] = ce.useState(!1)
, [Z,F] = ce.useState(!1)
, [k,T] = ce.useState(!1)
, [_,O] = ce.useState(!1)
, [R,z] = ce.useState(!1)
, Y = ce.useRef(null)
, te = ce.useRef(null)
, ue = ce.useRef(null)
, X = ce.useRef(null)
, S = ce.useRef(null)
, j = ce.useRef(!1)
, N = ce.useRef(null)
, I = ce.useRef(0)
, U = ce.useRef(!1)
, H = ce.useRef(0)
, q = ce.useRef(null)
, $ = ce.useRef(((C = q.current) == null ? void 0 : C.getBoundingClientRect().height) || 0)
, L = ce.useRef(0)
, M = ce.useCallback(me=>{
o && me === ne.length - 1 && (te.current = new Date)
}
, [])
, {activeSnapPoint: W, activeSnapPointIndex: J, setActiveSnapPoint: se, onRelease: ae, snapPointsOffset: ne, onDrag: de, shouldFade: ye, getPercentageDragged: be} = Q4({
snapPoints: o,
activeSnapPointProp: m,
setActiveSnapPointProp: p,
drawerRef: q,
fadeFromIndex: h,
overlayRef: Y,
onSnapPointChange: M,
direction: E
});
V4({
isDisabled: !P || _ || !v || R || !B || V
});
const {restorePositionSetting: Me} = W4({
isOpen: P,
modal: v,
nested: a,
hasBeenOpened: B,
preventScrollRestoration: D,
noBodyStyles: w
});
function fe() {
return (window.innerWidth - hw) / window.innerWidth
}
function Ee(me) {
var Ce;
!d && !o || q.current && !q.current.contains(me.target) || ($.current = ((Ce = q.current) == null ? void 0 : Ce.getBoundingClientRect().height) || 0,
O(!0),
ue.current = new Date,
EP() && window.addEventListener("touchend", ()=>j.current = !1, {
once: !0
}),
me.target.setPointerCapture(me.pointerId),
I.current = Rt(E) ? me.clientY : me.clientX)
}
function we(me, Ce) {
var Be;
let Re = me;
const We = (Be = window.getSelection()) == null ? void 0 : Be.toString()
, et = q.current ? pc(q.current, E) : null
, st = new Date;
if (Re.hasAttribute("data-vaul-no-drag") || Re.closest("[data-vaul-no-drag]"))
return !1;
if (E === "right" || E === "left")
return !0;
if (te.current && st.getTime() - te.current.getTime() < 500)
return !1;
if (et !== null && (E === "bottom" ? et > 0 : et < 0))
return !0;
if (We && We.length > 0)
return !1;
if (S.current && st.getTime() - S.current.getTime() < c && et === 0 || Ce)
return S.current = st,
!1;
for (; Re; ) {
if (Re.scrollHeight > Re.clientHeight) {
if (Re.scrollTop !== 0)
return S.current = new Date,
!1;
if (Re.getAttribute("role") === "dialog")
return !0
}
Re = Re.parentNode
}
return !0
}
function Se(me) {
if (q.current && _) {
const Ce = E === "bottom" || E === "right" ? 1 : -1
, Be = (I.current - (Rt(E) ? me.clientY : me.clientX)) * Ce
, Re = Be > 0
, We = o && !d && !Re;
if (We && J === 0)
return;
const et = Math.abs(Be)
, st = document.querySelector("[vaul-drawer-wrapper]");
let Jt = et / $.current;
const _t = be(et, Re);
if (_t !== null && (Jt = _t),
We && Jt >= 1 || !j.current && !we(me.target, Re))
return;
if (q.current.classList.add(Uh),
j.current = !0,
lt(q.current, {
transition: "none"
}),
lt(Y.current, {
transition: "none"
}),
o && de({
draggedDistance: Be
}),
Re && !o) {
const K = G4(Be)
, ee = Math.min(K * -1, 0) * Ce;
lt(q.current, {
transform: Rt(E) ? `translate3d(0, ${ee}px, 0)` : `translate3d(${ee}px, 0, 0)`
});
return
}
const vn = 1 - Jt;
if ((ye || h && J === h - 1) && (i == null || i(me, Jt),
lt(Y.current, {
opacity: `${vn}`,
transition: "none"
}, !0)),
st && Y.current && r) {
const K = Math.min(fe() + Jt * (1 - fe()), 1)
, ee = 8 - Jt * 8
, ie = Math.max(0, 14 - Jt * 14);
lt(st, {
borderRadius: `${ee}px`,
transform: Rt(E) ? `scale(${K}) translate3d(0, ${ie}px, 0)` : `scale(${K}) translate3d(${ie}px, 0, 0)`,
transition: "none"
}, !0)
}
if (!o) {
const K = et * Ce;
lt(q.current, {
transform: Rt(E) ? `translate3d(0, ${K}px, 0)` : `translate3d(${K}px, 0, 0)`
})
}
}
}
ce.useEffect(()=>()=>{
ke(!1),
Me()
}
, []),
ce.useEffect(()=>{
var me;
function Ce() {
if (!q.current)
return;
const Be = document.activeElement;
if (Wm(Be) || U.current) {
var Re;
const We = ((Re = window.visualViewport) == null ? void 0 : Re.height) || 0;
let et = window.innerHeight - We;
const st = q.current.getBoundingClientRect().height || 0;
L.current || (L.current = st);
const Jt = q.current.getBoundingClientRect().top;
if (Math.abs(H.current - et) > 60 && (U.current = !U.current),
o && o.length > 0 && ne && J) {
const _t = ne[J] || 0;
et += _t
}
if (H.current = et,
st > We || U.current) {
const _t = q.current.getBoundingClientRect().height;
let vn = _t;
_t > We && (vn = We - hw),
b ? q.current.style.height = `${_t - Math.max(et, 0)}px` : q.current.style.height = `${Math.max(vn, We - Jt)}px`
} else
q.current.style.height = `${L.current}px`;
o && o.length > 0 && !U.current ? q.current.style.bottom = "0px" : q.current.style.bottom = `${Math.max(et, 0)}px`
}
}
return (me = window.visualViewport) == null || me.addEventListener("resize", Ce),
()=>{
var Be;
return (Be = window.visualViewport) == null ? void 0 : Be.removeEventListener("resize", Ce)
}
}
, [J, o, ne]);
function Ge() {
q.current && (Te(),
g == null || g(),
lt(q.current, {
transform: Rt(E) ? `translate3d(0, ${E === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${E === "right" ? "100%" : "-100%"}, 0, 0)`,
transition: `transform ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`
}),
lt(Y.current, {
opacity: "0",
transition: `opacity ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`
}),
ke(!1),
setTimeout(()=>{
F(!1),
A(!1)
}
, 300),
setTimeout(()=>{
o && se(o[0])
}
, tt.DURATION * 1e3))
}
ce.useEffect(()=>{
if (!P && r) {
const me = setTimeout(()=>{
hc(document.body)
}
, 200);
return ()=>clearTimeout(me)
}
}
, [P, r]),
ce.useLayoutEffect(()=>{
e ? (A(!0),
Q(!0)) : Ge()
}
, [e]),
ce.useEffect(()=>{
k && (t == null || t(P))
}
, [P]),
ce.useEffect(()=>{
T(!0)
}
, []);
function Ve() {
if (!q.current)
return;
const me = document.querySelector("[vaul-drawer-wrapper]")
, Ce = pc(q.current, E);
lt(q.current, {
transform: "translate3d(0, 0, 0)",
transition: `transform ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`
}),
lt(Y.current, {
transition: `opacity ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
opacity: "1"
}),
r && Ce && Ce > 0 && P && lt(me, {
borderRadius: `${fw}px`,
overflow: "hidden",
...Rt(E) ? {
transform: `scale(${fe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
transformOrigin: "top"
} : {
transform: `scale(${fe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
transformOrigin: "left"
},
transitionProperty: "transform, border-radius",
transitionDuration: `${tt.DURATION}s`,
transitionTimingFunction: `cubic-bezier(${tt.EASE.join(",")})`
}, !0)
}
function Te() {
!_ || !q.current || (q.current.classList.remove(Uh),
j.current = !1,
O(!1),
X.current = new Date)
}
function Ke(me) {
if (!_ || !q.current)
return;
q.current.classList.remove(Uh),
j.current = !1,
O(!1),
X.current = new Date;
const Ce = pc(q.current, E);
if (!we(me.target, !1) || !Ce || Number.isNaN(Ce) || ue.current === null)
return;
const Be = X.current.getTime() - ue.current.getTime()
, Re = I.current - (Rt(E) ? me.clientY : me.clientX)
, We = Math.abs(Re) / Be;
if (We > .05 && (z(!0),
setTimeout(()=>{
z(!1)
}
, 200)),
o) {
ae({
draggedDistance: Re * (E === "bottom" || E === "right" ? 1 : -1),
closeDrawer: Ge,
velocity: We,
dismissible: d
}),
s == null || s(me, !0);
return
}
if (E === "bottom" || E === "right" ? Re > 0 : Re < 0) {
Ve(),
s == null || s(me, !0);
return
}
if (We > OP) {
Ge(),
s == null || s(me, !1);
return
}
var et;
const st = Math.min((et = q.current.getBoundingClientRect().height) != null ? et : 0, window.innerHeight);
if (Ce >= st * u) {
Ge(),
s == null || s(me, !1);
return
}
s == null || s(me, !0),
Ve()
}
ce.useEffect(()=>{
P && (lt(document.documentElement, {
scrollBehavior: "auto"
}),
te.current = new Date,
ke(!0))
}
, [P]),
ce.useEffect(()=>{
if (q.current && Z) {
var me;
const Ce = q == null || (me = q.current) == null ? void 0 : me.querySelectorAll("*");
Ce == null || Ce.forEach(Be=>{
const Re = Be;
(Re.scrollHeight > Re.clientHeight || Re.scrollWidth > Re.clientWidth) && Re.classList.add("vaul-scrollable")
}
)
}
}
, [Z]);
function ke(me) {
const Ce = document.querySelector("[vaul-drawer-wrapper]");
!Ce || !r || (me ? (l && (w || (lt(document.body, {
background: document.body.style.backgroundColor || document.body.style.background
}),
lt(document.body, {
background: "black"
}, !0))),
lt(Ce, {
borderRadius: `${fw}px`,
overflow: "hidden",
...Rt(E) ? {
transform: `scale(${fe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
transformOrigin: "top"
} : {
transform: `scale(${fe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
transformOrigin: "left"
},
transitionProperty: "transform, border-radius",
transitionDuration: `${tt.DURATION}s`,
transitionTimingFunction: `cubic-bezier(${tt.EASE.join(",")})`
})) : (hc(Ce, "overflow"),
hc(Ce, "transform"),
hc(Ce, "borderRadius"),
lt(Ce, {
transitionProperty: "transform, border-radius",
transitionDuration: `${tt.DURATION}s`,
transitionTimingFunction: `cubic-bezier(${tt.EASE.join(",")})`
})))
}
function Qe(me) {
const Ce = me ? (window.innerWidth - Ji) / window.innerWidth : 1
, Be = me ? -Ji : 0;
N.current && window.clearTimeout(N.current),
lt(q.current, {
transition: `transform ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
transform: `scale(${Ce}) translate3d(0, ${Be}px, 0)`
}),
!me && q.current && (N.current = setTimeout(()=>{
const Re = pc(q.current, E);
lt(q.current, {
transition: "none",
transform: Rt(E) ? `translate3d(0, ${Re}px, 0)` : `translate3d(${Re}px, 0, 0)`
})
}
, 500))
}
function nt(me, Ce) {
if (Ce < 0)
return;
const Be = Rt(E) ? window.innerHeight : window.innerWidth
, Re = (Be - Ji) / Be
, We = Re + Ce * (1 - Re)
, et = -Ji + Ce * Ji;
lt(q.current, {
transform: Rt(E) ? `scale(${We}) translate3d(0, ${et}px, 0)` : `scale(${We}) translate3d(${et}px, 0, 0)`,
transition: "none"
})
}
function it(me, Ce) {
const Be = Rt(E) ? window.innerHeight : window.innerWidth
, Re = Ce ? (Be - Ji) / Be : 1
, We = Ce ? -Ji : 0;
Ce && lt(q.current, {
transition: `transform ${tt.DURATION}s cubic-bezier(${tt.EASE.join(",")})`,
transform: Rt(E) ? `scale(${Re}) translate3d(0, ${We}px, 0)` : `scale(${Re}) translate3d(${We}px, 0, 0)`
})
}
return ce.createElement(T4, {
modal: v,
onOpenChange: me=>{
if (e !== void 0) {
t == null || t(me);
return
}
me ? (Q(!0),
A(me)) : Ge()
}
,
open: P
}, ce.createElement(SP.Provider, {
value: {
visible: Z,
activeSnapPoint: W,
snapPoints: o,
setActiveSnapPoint: se,
drawerRef: q,
overlayRef: Y,
scaleBackground: ke,
onOpenChange: t,
onPress: Ee,
setVisible: F,
onRelease: Ke,
onDrag: Se,
dismissible: d,
handleOnly: f,
isOpen: P,
isDragging: _,
shouldFade: ye,
closeDrawer: Ge,
onNestedDrag: nt,
onNestedOpenChange: Qe,
onNestedRelease: it,
keyboardIsOpen: U,
openProp: e,
modal: v,
snapPointsOffset: ne,
direction: E
}
}, n))
}
const J4 = 250
, Z4 = 120
, AP = ce.forwardRef(function({preventCycle: e=!1, children: t, ...n}, r) {
const {visible: i, closeDrawer: s, isDragging: o, snapPoints: a, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: c, handleOnly: d, onPress: f, onDrag: h} = Lf()
, m = ce.useRef(null)
, p = ce.useRef(!1);
function b() {
if (p.current) {
w();
return
}
window.setTimeout(()=>{
v()
}
, Z4)
}
function v() {
if (o || e || p.current) {
w();
return
}
if (w(),
(!a || a.length === 0) && c) {
s();
return
}
if (l === a[a.length - 1] && c) {
s();
return
}
const D = a.findIndex(C=>C === l);
if (D === -1)
return;
const V = a[D + 1];
u(V)
}
function g() {
m.current = window.setTimeout(()=>{
p.current = !0
}
, J4)
}
function w() {
window.clearTimeout(m.current),
p.current = !1
}
return ce.createElement("div", {
onClick: b,
onDoubleClick: ()=>{
p.current = !0,
s()
}
,
onPointerCancel: w,
onPointerDown: E=>{
d && f(E),
g()
}
,
onPointerMove: E=>{
d && h(E)
}
,
ref: r,
"vaul-drawer-visible": i ? "true" : "false",
"vaul-handle": "",
"aria-hidden": "true",
...n
}, ce.createElement("span", {
"vaul-handle-hitarea": "",
"aria-hidden": "true"
}, t))
});
AP.displayName = "Drawer.Handle";
const DP = ce.forwardRef(function({children: e, ...t}, n) {
const {overlayRef: r, snapPoints: i, onRelease: s, shouldFade: o, isOpen: a, visible: l} = Lf()
, u = TP(n, r)
, c = i && i.length > 0;
return ce.createElement(k4, {
onMouseUp: s,
ref: u,
"vaul-drawer-visible": l ? "true" : "false",
"vaul-overlay": "",
"vaul-snap-points": a && c ? "true" : "false",
"vaul-snap-points-overlay": a && o ? "true" : "false",
...t
})
});
DP.displayName = "Drawer.Overlay";
const LP = ce.forwardRef(function({onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...i}, s) {
const {drawerRef: o, onPress: a, onRelease: l, onDrag: u, dismissible: c, keyboardIsOpen: d, snapPointsOffset: f, visible: h, closeDrawer: m, modal: p, openProp: b, onOpenChange: v, setVisible: g, handleOnly: w, direction: E} = Lf()
, D = TP(s, o)
, V = ce.useRef(null)
, C = ce.useRef(!1)
, P = (A,B,Q=0)=>{
if (C.current)
return !0;
const Z = Math.abs(A.y)
, F = Math.abs(A.x)
, k = F > Z
, T = ["bottom", "right"].includes(B) ? 1 : -1;
if (B === "left" || B === "right") {
if (!(A.x * T < 0) && F >= 0 && F <= Q)
return k
} else if (!(A.y * T < 0) && Z >= 0 && Z <= Q)
return !k;
return C.current = !0,
!0
}
;
return ce.useEffect(()=>{
g(!0)
}
, []),
ce.createElement(_4, {
"vaul-drawer": "",
"vaul-drawer-direction": E,
"vaul-drawer-visible": h ? "true" : "false",
...i,
ref: D,
style: f && f.length > 0 ? {
"--snap-point-height": `${f[0]}px`,
...r
} : r,
onOpenAutoFocus: A=>{
if (e)
e(A);
else {
var B;
A.preventDefault(),
(B = o.current) == null || B.focus()
}
}
,
onPointerDown: A=>{
w || (i.onPointerDown == null || i.onPointerDown.call(i, A),
V.current = {
x: A.clientX,
y: A.clientY
},
a(A))
}
,
onPointerDownOutside: A=>{
if (t == null || t(A),
!p || A.defaultPrevented) {
A.preventDefault();
return
}
d.current && (d.current = !1),
A.preventDefault(),
v == null || v(!1),
!(!c || b !== void 0) && m()
}
,
onFocusOutside: A=>{
if (!p) {
A.preventDefault();
return
}
}
,
onEscapeKeyDown: A=>{
if (!p) {
A.preventDefault();
return
}
}
,
onPointerMove: A=>{
if (w || (i.onPointerMove == null || i.onPointerMove.call(i, A),
!V.current))
return;
const B = A.clientY - V.current.y
, Q = A.clientX - V.current.x
, Z = A.pointerType === "touch" ? 10 : 2;
P({
x: Q,
y: B
}, E, Z) ? u(A) : (Math.abs(Q) > Z || Math.abs(B) > Z) && (V.current = null)
}
,
onPointerUp: A=>{
i.onPointerUp == null || i.onPointerUp.call(i, A),
V.current = null,
C.current = !1,
l(A)
}
})
});
LP.displayName = "Drawer.Content";
function e5({onDrag: e, onOpenChange: t, ...n}) {
const {onNestedDrag: r, onNestedOpenChange: i, onNestedRelease: s} = Lf();
if (!r)
throw new Error("Drawer.NestedRoot must be placed in another drawer");
return ce.createElement(_P, {
nested: !0,
onClose: ()=>{
i(!1)
}
,
onDrag: (o,a)=>{
r(o, a),
e == null || e(o, a)
}
,
onOpenChange: o=>{
o && i(o),
t == null || t(o)
}
,
onRelease: s,
...n
})
}
const Lt = {
Root: _P,
NestedRoot: e5,
Content: LP,
Handle: AP,
Overlay: DP,
Trigger: R4,
Portal: O4,
Close: L4,
Title: A4,
Description: D4
}
, za = e=>{
const {button: t, priceInfo: n, name: r, description: i, onGetIt: s, imageUrl: o} = e
, {isDialogOpen: a, setIsDialogOpen: l} = yf(`boosters-${r}`)
, u = ()=>{
l(!1),
s == null || s()
}
, c = d=>{
d && l(!0)
}
;
return x.jsxs(Lt.Root, {
shouldScaleBackground: !0,
dismissible: !1,
preventScrollRestoration: !0,
scrollLockTimeout: 0,
open: a,
onOpenChange: c,
modal: !1,
children: [x.jsx(Lt.Trigger, {
asChild: !0,
className: "w-full focus-visible:outline-none",
children: t
}), x.jsx(Lt.Portal, {
children: x.jsxs(Lt.Content, {
className: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex flex-col rounded-t-xl bg-graphite-normal px-6 pb-10 pt-10 focus-visible:outline-none",
children: [x.jsx(t5, {
name: r,
description: i,
imageUrl: o,
onGetIt: u,
priceInfo: n
}), x.jsx("button", {
onClick: ()=>l(!1),
className: "absolute right-6 top-6",
children: x.jsx(Af, {})
}), x.jsx("img", {
src: Ae.bgAccent,
alt: "reward glow",
className: "absolute bottom-0 left-0 -z-10"
})]
})
})]
})
}
, t5 = e=>{
const {name: t, description: n, onGetIt: r, priceInfo: i, imageUrl: s} = e
, {t: o} = Tt("boosters");
return x.jsxs("div", {
className: "flex h-full flex-1 flex-col items-center justify-between gap-10 text-center",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-10",
children: [x.jsx("img", {
src: s,
className: "size-40"
}), x.jsxs("div", {
className: "flex flex-col items-center gap-6",
children: [x.jsxs("div", {
className: "space-y-4",
children: [x.jsx("div", {
className: "text-h2",
children: t
}), x.jsx("div", {
className: "whitespace-pre-line text-pretty text-base leading-[1.4rem] text-white/65",
children: n
})]
}), x.jsx("span", {
className: "",
children: i
})]
})]
}), x.jsx("button", {
onClick: r,
className: "w-full rounded-xl bg-heat-button-gradient p-[17px] text-h3 text-white shadow-heat-button-glow",
children: o("getIt")
})]
})
}
;
var Vv = {}
, _d = function() {
return _d = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e
}
,
_d.apply(this, arguments)
}
, n5 = function() {
function e(t, n, r) {
var i = this;
this.endVal = n,
this.options = r,
this.version = "2.8.0",
this.defaults = {
startVal: 0,
decimalPlaces: 0,
duration: 2,
useEasing: !0,
useGrouping: !0,
useIndianSeparators: !1,
smartEasingThreshold: 999,
smartEasingAmount: 333,
separator: ",",
decimal: ".",
prefix: "",
suffix: "",
enableScrollSpy: !1,
scrollSpyDelay: 200,
scrollSpyOnce: !1
},
this.finalEndVal = null,
this.useEasing = !0,
this.countDown = !1,
this.error = "",
this.startVal = 0,
this.paused = !0,
this.once = !1,
this.count = function(s) {
i.startTime || (i.startTime = s);
var o = s - i.startTime;
i.remaining = i.duration - o,
i.useEasing ? i.countDown ? i.frameVal = i.startVal - i.easingFn(o, 0, i.startVal - i.endVal, i.duration) : i.frameVal = i.easingFn(o, i.startVal, i.endVal - i.startVal, i.duration) : i.frameVal = i.startVal + (i.endVal - i.startVal) * (o / i.duration);
var a = i.countDown ? i.frameVal < i.endVal : i.frameVal > i.endVal;
i.frameVal = a ? i.endVal : i.frameVal,
i.frameVal = Number(i.frameVal.toFixed(i.options.decimalPlaces)),
i.printValue(i.frameVal),
o < i.duration ? i.rAF = requestAnimationFrame(i.count) : i.finalEndVal !== null ? i.update(i.finalEndVal) : i.options.onCompleteCallback && i.options.onCompleteCallback()
}
,
this.formatNumber = function(s) {
var o, a, l, u, c = s < 0 ? "-" : "";
o = Math.abs(s).toFixed(i.options.decimalPlaces);
var d = (o += "").split(".");
if (a = d[0],
l = d.length > 1 ? i.options.decimal + d[1] : "",
i.options.useGrouping) {
u = "";
for (var f = 3, h = 0, m = 0, p = a.length; m < p; ++m)
i.options.useIndianSeparators && m === 4 && (f = 2,
h = 1),
m !== 0 && h % f == 0 && (u = i.options.separator + u),
h++,
u = a[p - m - 1] + u;
a = u
}
return i.options.numerals && i.options.numerals.length && (a = a.replace(/[0-9]/g, function(b) {
return i.options.numerals[+b]
}),
l = l.replace(/[0-9]/g, function(b) {
return i.options.numerals[+b]
})),
c + i.options.prefix + a + l + i.options.suffix
}
,
this.easeOutExpo = function(s, o, a, l) {
return a * (1 - Math.pow(2, -10 * s / l)) * 1024 / 1023 + o
}
,
this.options = _d(_d({}, this.defaults), r),
this.formattingFn = this.options.formattingFn ? this.options.formattingFn : this.formatNumber,
this.easingFn = this.options.easingFn ? this.options.easingFn : this.easeOutExpo,
this.startVal = this.validateValue(this.options.startVal),
this.frameVal = this.startVal,
this.endVal = this.validateValue(n),
this.options.decimalPlaces = Math.max(this.options.decimalPlaces),
this.resetDuration(),
this.options.separator = String(this.options.separator),
this.useEasing = this.options.useEasing,
this.options.separator === "" && (this.options.useGrouping = !1),
this.el = typeof t == "string" ? document.getElementById(t) : t,
this.el ? this.printValue(this.startVal) : this.error = "[CountUp] target is null or undefined",
typeof window < "u" && this.options.enableScrollSpy && (this.error ? console.error(this.error, t) : (window.onScrollFns = window.onScrollFns || [],
window.onScrollFns.push(function() {
return i.handleScroll(i)
}),
window.onscroll = function() {
window.onScrollFns.forEach(function(s) {
return s()
})
}
,
this.handleScroll(this)))
}
return e.prototype.handleScroll = function(t) {
if (t && window && !t.once) {
var n = window.innerHeight + window.scrollY
, r = t.el.getBoundingClientRect()
, i = r.top + window.pageYOffset
, s = r.top + r.height + window.pageYOffset;
s < n && s > window.scrollY && t.paused ? (t.paused = !1,
setTimeout(function() {
return t.start()
}, t.options.scrollSpyDelay),
t.options.scrollSpyOnce && (t.once = !0)) : (window.scrollY > s || i > n) && !t.paused && t.reset()
}
}
,
e.prototype.determineDirectionAndSmartEasing = function() {
var t = this.finalEndVal ? this.finalEndVal : this.endVal;
this.countDown = this.startVal > t;
var n = t - this.startVal;
if (Math.abs(n) > this.options.smartEasingThreshold && this.options.useEasing) {
this.finalEndVal = t;
var r = this.countDown ? 1 : -1;
this.endVal = t + r * this.options.smartEasingAmount,
this.duration = this.duration / 2
} else
this.endVal = t,
this.finalEndVal = null;
this.finalEndVal !== null ? this.useEasing = !1 : this.useEasing = this.options.useEasing
}
,
e.prototype.start = function(t) {
this.error || (this.options.onStartCallback && this.options.onStartCallback(),
t && (this.options.onCompleteCallback = t),
this.duration > 0 ? (this.determineDirectionAndSmartEasing(),
this.paused = !1,
this.rAF = requestAnimationFrame(this.count)) : this.printValue(this.endVal))
}
,
e.prototype.pauseResume = function() {
this.paused ? (this.startTime = null,
this.duration = this.remaining,
this.startVal = this.frameVal,
this.determineDirectionAndSmartEasing(),
this.rAF = requestAnimationFrame(this.count)) : cancelAnimationFrame(this.rAF),
this.paused = !this.paused
}
,
e.prototype.reset = function() {
cancelAnimationFrame(this.rAF),
this.paused = !0,
this.resetDuration(),
this.startVal = this.validateValue(this.options.startVal),
this.frameVal = this.startVal,
this.printValue(this.startVal)
}
,
e.prototype.update = function(t) {
cancelAnimationFrame(this.rAF),
this.startTime = null,
this.endVal = this.validateValue(t),
this.endVal !== this.frameVal && (this.startVal = this.frameVal,
this.finalEndVal == null && this.resetDuration(),
this.finalEndVal = null,
this.determineDirectionAndSmartEasing(),
this.rAF = requestAnimationFrame(this.count))
}
,
e.prototype.printValue = function(t) {
var n;
if (this.el) {
var r = this.formattingFn(t);
!((n = this.options.plugin) === null || n === void 0) && n.render ? this.options.plugin.render(this.el, r) : this.el.tagName === "INPUT" ? this.el.value = r : this.el.tagName === "text" || this.el.tagName === "tspan" ? this.el.textContent = r : this.el.innerHTML = r
}
}
,
e.prototype.ensureNumber = function(t) {
return typeof t == "number" && !isNaN(t)
}
,
e.prototype.validateValue = function(t) {
var n = Number(t);
return this.ensureNumber(n) ? n : (this.error = "[CountUp] invalid start or end value: ".concat(t),
null)
}
,
e.prototype.resetDuration = function() {
this.startTime = null,
this.duration = 1e3 * Number(this.options.duration),
this.remaining = this.duration
}
,
e
}();
const r5 = Object.freeze(Object.defineProperty({
__proto__: null,
CountUp: n5
}, Symbol.toStringTag, {
value: "Module"
}))
, i5 = cR(r5);
Object.defineProperty(Vv, "__esModule", {
value: !0
});
var It = y
, s5 = i5;
function o5(e, t) {
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (n != null) {
var r, i, s, o, a = [], l = !0, u = !1;
try {
if (s = (n = n.call(e)).next,
t !== 0)
for (; !(l = (r = s.call(n)).done) && (a.push(r.value),
a.length !== t); l = !0)
;
} catch (c) {
u = !0,
i = c
} finally {
try {
if (!l && n.return != null && (o = n.return(),
Object(o) !== o))
return
} finally {
if (u)
throw i
}
}
return a
}
}
function pw(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter(function(i) {
return Object.getOwnPropertyDescriptor(e, i).enumerable
})),
n.push.apply(n, r)
}
return n
}
function Ad(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] != null ? arguments[t] : {};
t % 2 ? pw(Object(n), !0).forEach(function(r) {
u5(e, r, n[r])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : pw(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r))
})
}
return e
}
function a5(e, t) {
if (typeof e != "object" || !e)
return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t || "default");
if (typeof r != "object")
return r;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (t === "string" ? String : Number)(e)
}
function l5(e) {
var t = a5(e, "string");
return typeof t == "symbol" ? t : String(t)
}
function u5(e, t, n) {
return t = l5(t),
t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
function Gm() {
return Gm = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
}
return e
}
,
Gm.apply(this, arguments)
}
function c5(e, t) {
if (e == null)
return {};
var n = {}, r = Object.keys(e), i, s;
for (s = 0; s < r.length; s++)
i = r[s],
!(t.indexOf(i) >= 0) && (n[i] = e[i]);
return n
}
function NP(e, t) {
if (e == null)
return {};
var n = c5(e, t), r, i;
if (Object.getOwnPropertySymbols) {
var s = Object.getOwnPropertySymbols(e);
for (i = 0; i < s.length; i++)
r = s[i],
!(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r])
}
return n
}
function d5(e, t) {
return f5(e) || o5(e, t) || h5(e, t) || p5()
}
function f5(e) {
if (Array.isArray(e))
return e
}
function h5(e, t) {
if (e) {
if (typeof e == "string")
return mw(e, t);
var n = Object.prototype.toString.call(e).slice(8, -1);
if (n === "Object" && e.constructor && (n = e.constructor.name),
n === "Map" || n === "Set")
return Array.from(e);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return mw(e, t)
}
}
function mw(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var n = 0, r = new Array(t); n < t; n++)
r[n] = e[n];
return r
}
function p5() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
var m5 = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? It.useLayoutEffect : It.useEffect;
function nr(e) {
var t = It.useRef(e);
return m5(function() {
t.current = e
}),
It.useCallback(function() {
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
r[i] = arguments[i];
return t.current.apply(void 0, r)
}, [])
}
var g5 = function(t, n) {
var r = n.decimal
, i = n.decimals
, s = n.duration
, o = n.easingFn
, a = n.end
, l = n.formattingFn
, u = n.numerals
, c = n.prefix
, d = n.separator
, f = n.start
, h = n.suffix
, m = n.useEasing
, p = n.useGrouping
, b = n.useIndianSeparators
, v = n.enableScrollSpy
, g = n.scrollSpyDelay
, w = n.scrollSpyOnce
, E = n.plugin;
return new s5.CountUp(t,a,{
startVal: f,
duration: s,
decimal: r,
decimalPlaces: i,
easingFn: o,
formattingFn: l,
numerals: u,
separator: d,
prefix: c,
suffix: h,
plugin: E,
useEasing: m,
useIndianSeparators: b,
useGrouping: p,
enableScrollSpy: v,
scrollSpyDelay: g,
scrollSpyOnce: w
})
}
, v5 = ["ref", "startOnMount", "enableReinitialize", "delay", "onEnd", "onStart", "onPauseResume", "onReset", "onUpdate"]
, y5 = {
decimal: ".",
separator: ",",
delay: null,
prefix: "",
suffix: "",
duration: 2,
start: 0,
decimals: 0,
startOnMount: !0,
enableReinitialize: !0,
useEasing: !0,
useGrouping: !0,
useIndianSeparators: !1
}
, MP = function(t) {
var n = Object.fromEntries(Object.entries(t).filter(function(A) {
var B = d5(A, 2)
, Q = B[1];
return Q !== void 0
}))
, r = It.useMemo(function() {
return Ad(Ad({}, y5), n)
}, [t])
, i = r.ref
, s = r.startOnMount
, o = r.enableReinitialize
, a = r.delay
, l = r.onEnd
, u = r.onStart
, c = r.onPauseResume
, d = r.onReset
, f = r.onUpdate
, h = NP(r, v5)
, m = It.useRef()
, p = It.useRef()
, b = It.useRef(!1)
, v = nr(function() {
return g5(typeof i == "string" ? i : i.current, h)
})
, g = nr(function(A) {
var B = m.current;
if (B && !A)
return B;
var Q = v();
return m.current = Q,
Q
})
, w = nr(function() {
var A = function() {
return g(!0).start(function() {
l == null || l({
pauseResume: E,
reset: D,
start: C,
update: V
})
})
};
a && a > 0 ? p.current = setTimeout(A, a * 1e3) : A(),
u == null || u({
pauseResume: E,
reset: D,
update: V
})
})
, E = nr(function() {
g().pauseResume(),
c == null || c({
reset: D,
start: C,
update: V
})
})
, D = nr(function() {
g().el && (p.current && clearTimeout(p.current),
g().reset(),
d == null || d({
pauseResume: E,
start: C,
update: V
}))
})
, V = nr(function(A) {
g().update(A),
f == null || f({
pauseResume: E,
reset: D,
start: C
})
})
, C = nr(function() {
D(),
w()
})
, P = nr(function(A) {
s && (A && D(),
w())
});
return It.useEffect(function() {
b.current ? o && P(!0) : (b.current = !0,
P())
}, [o, b, P, a, t.start, t.suffix, t.prefix, t.duration, t.separator, t.decimals, t.decimal, t.formattingFn]),
It.useEffect(function() {
return function() {
D()
}
}, [D]),
{
start: C,
pauseResume: E,
reset: D,
update: V,
getCountUp: g
}
}
, w5 = ["className", "redraw", "containerProps", "children", "style"]
, x5 = function(t) {
var n = t.className
, r = t.redraw
, i = t.containerProps
, s = t.children
, o = t.style
, a = NP(t, w5)
, l = It.useRef(null)
, u = It.useRef(!1)
, c = MP(Ad(Ad({}, a), {}, {
ref: l,
startOnMount: typeof s != "function" || t.delay === 0,
enableReinitialize: !1
}))
, d = c.start
, f = c.reset
, h = c.update
, m = c.pauseResume
, p = c.getCountUp
, b = nr(function() {
d()
})
, v = nr(function(E) {
t.preserveValue || f(),
h(E)
})
, g = nr(function() {
if (typeof t.children == "function" && !(l.current instanceof Element)) {
console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);
return
}
p()
});
It.useEffect(function() {
g()
}, [g]),
It.useEffect(function() {
u.current && v(t.end)
}, [t.end, v]);
var w = r && t;
return It.useEffect(function() {
r && u.current && b()
}, [b, r, w]),
It.useEffect(function() {
!r && u.current && b()
}, [b, r, t.start, t.suffix, t.prefix, t.duration, t.separator, t.decimals, t.decimal, t.className, t.formattingFn]),
It.useEffect(function() {
u.current = !0
}, []),
typeof s == "function" ? s({
countUpRef: l,
start: d,
reset: f,
update: h,
pauseResume: m,
getCountUp: p
}) : It.createElement("span", Gm({
className: n,
ref: l,
style: o
}, i), typeof t.start < "u" ? p().formattingFn(t.start) : "")
}
, b5 = Vv.default = x5;
Vv.useCountUp = MP;
function S5(e) {
const t = y.useRef(0);
return y.useEffect(()=>{
t.current = e
}
, [e]),
t.current
}
const E5 = y.memo(e=>{
const {className: t, amount: n} = e
, r = S5(n)
, [i,s] = y.useState(0)
, o = 26;
return y.useLayoutEffect(()=>{
s(n.toString().length * o)
}
, [n]),
x.jsx("div", {
style: {
width: i
},
className: "flex",
children: x.jsx(b5, {
duration: 5,
className: t,
start: r,
end: n
})
})
}
)
, zv = ()=>{
const {user: e} = Et();
return e ? x.jsxs("div", {
className: "flex items-center justify-center gap-2",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-14"
}), x.jsx(E5, {
className: "text-h1 text-gold",
amount: e.balance
})]
}) : null
}
, C5 = ()=>{
const {multitap: e, energyLimit: t, rechargingSpeed: n, tappingGuruLeft: r, fullTankLeft: i} = Vt(zt)
, s = Hr.multitap[e - 1]
, o = Hr.energyLimit[t - 1]
, a = Hr.rechargingSpeed[n - 1]
, {increaseMultitap: l} = V3(s)
, {increaseEnergyLimit: u} = U3(o)
, {increaseRechargingSpeed: c} = z3(a)
, {startTapingGuru: d} = rP()
, {startFullTank: f} = nP()
, {t: h} = Tt("boosters");
return x.jsx(Ds, {
bgUrl: Ae.bgMini,
children: x.jsxs("div", {
className: "space-y-12",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-2 text-center",
children: [x.jsx("div", {
className: "text-base text-white/65",
children: h("shareBalance")
}), x.jsx(zv, {})]
}), x.jsxs("div", {
className: "space-y-6",
children: [x.jsxs("div", {
className: "space-y-3",
children: [x.jsx("div", {
className: "text-lg font-medium leading-none",
children: h("dailyBoosters")
}), x.jsxs("div", {
className: "flex gap-2 *:flex-1",
children: [x.jsx(za, {
name: h("tappingGuru"),
description: h("tappingGuruDescription"),
imageUrl: Ae.tappingGuru,
button: x.jsx(q3, {}),
priceInfo: x.jsx(gw, {
left: r
}),
onGetIt: ()=>d()
}), x.jsx(za, {
name: h("fullTank"),
description: h("fullTankDescription"),
button: x.jsx(Q3, {}),
imageUrl: Ae.fullTank,
priceInfo: x.jsx(gw, {
left: i
}),
onGetIt: ()=>f()
})]
})]
}), x.jsxs("div", {
className: "space-y-3",
children: [x.jsx("div", {
className: "text-lg font-medium leading-none",
children: h("boosters")
}), x.jsxs("div", {
className: "space-y-2",
children: [x.jsx(za, {
name: h("multitap"),
description: h("multitapDescription"),
onGetIt: ()=>l(),
button: x.jsx(W3, {}),
imageUrl: Ae.multitap,
priceInfo: x.jsx(Bh, {
nextLevel: e + 1,
price: s
})
}), x.jsx(za, {
name: h("energyLimit"),
description: h("energyLimitDescription"),
onGetIt: ()=>u(),
button: x.jsx(G3, {}),
imageUrl: Ae.energyLimit,
priceInfo: x.jsx(Bh, {
nextLevel: t + 1,
price: o
})
}), x.jsx(za, {
name: h("rechargingSpeed"),
description: h("rechargingSpeedDescription"),
imageUrl: Ae.rechargingSpeed,
onGetIt: ()=>c(),
button: x.jsx(K3, {}),
priceInfo: x.jsx(Bh, {
nextLevel: n + 1,
price: a
})
})]
})]
})]
})]
})
})
}
, gw = e=>{
const {t} = Tt("boosters");
return x.jsxs("div", {
className: "flex items-center gap-3",
children: [x.jsxs("div", {
className: "flex items-center gap-2",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-8"
}), x.jsx("div", {
className: "text-h2 text-gold",
children: t("free")
})]
}), x.jsxs("div", {
className: "translate-y-0.5 text-base text-white/65",
children: [e.left, "/3"]
})]
})
}
, Bh = e=>{
const {t} = Tt("boosters");
return x.jsxs("div", {
className: "flex items-center gap-3",
children: [x.jsxs("div", {
className: "flex items-center gap-2",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-8"
}), x.jsx("div", {
className: "text-h2 text-gold",
children: e.price
})]
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsxs("div", {
className: "relative",
children: [x.jsx("img", {
src: Ae.levelCoin,
className: "relative size-6 object-contain"
}), x.jsx("div", {
className: "absolute inset-0 top-[5px] z-0 text-base text-white",
children: e.nextLevel
})]
}), x.jsx("div", {
className: " text-base text-white/65",
children: t("level")
})]
})]
})
}
, P5 = ()=>{
var r;
const e = FE();
y.useEffect(()=>{
zE()
}
, []);
const t = e instanceof Error ? e.message : e;
return wt.isAxiosError(e) && ((r = e.response) == null ? void 0 : r.status) === 401 ? x.jsxs("div", {
className: "flex flex-col gap-2 p-4",
children: [x.jsx("div", {
children: "You're not authorized"
}), x.jsx("div", {
children: "Close this webApp window, type and send /start commant in the bot chat input."
}), x.jsx("div", {
children: "In case you were invited by friend, please find that link and use it to enter bot as a first time."
}), x.jsx("div", {
children: " "
}), x.jsx("div", {
children: "Вы не авторизованы"
}), x.jsx("div", {
children: "Закройте это окно, введите команду /start в чате бота и отправьте ее"
}), x.jsx("div", {
children: "A если вы были приглашены другом, пожалуйста, сначала перейдите присланной ссылке."
})]
}) : x.jsxs("div", {
className: "p-4",
children: [x.jsx("div", {
children: "Oops, something went wrong:"
}), x.jsx("p", {
className: "mt-1 font-mono text-sm text-rose-500",
children: JSON.stringify(t, null, 2)
})]
})
}
;
function T5(e) {
return Object.prototype.toString.call(e) === "[object Object]"
}
function vw(e) {
return T5(e) || Array.isArray(e)
}
function R5() {
return !!(typeof window < "u" && window.document && window.document.createElement)
}
function Uv(e, t) {
const n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
const i = JSON.stringify(Object.keys(e.breakpoints || {}))
, s = JSON.stringify(Object.keys(t.breakpoints || {}));
return i !== s ? !1 : n.every(o=>{
const a = e[o]
, l = t[o];
return typeof a == "function" ? `${a}` == `${l}` : !vw(a) || !vw(l) ? a === l : Uv(a, l)
}
)
}
function yw(e) {
return e.concat().sort((t,n)=>t.name > n.name ? 1 : -1).map(t=>t.options)
}
function O5(e, t) {
if (e.length !== t.length)
return !1;
const n = yw(e)
, r = yw(t);
return n.every((i,s)=>{
const o = r[s];
return Uv(i, o)
}
)
}
function Bv(e) {
return typeof e == "number"
}
function Km(e) {
return typeof e == "string"
}
function Hv(e) {
return typeof e == "boolean"
}
function ww(e) {
return Object.prototype.toString.call(e) === "[object Object]"
}
function pt(e) {
return Math.abs(e)
}
function Wv(e) {
return Math.sign(e)
}
function cl(e, t) {
return pt(e - t)
}
function k5(e, t) {
if (e === 0 || t === 0 || pt(e) <= pt(t))
return 0;
const n = cl(pt(e), pt(t));
return pt(n / e)
}
function Hl(e) {
return Wl(e).map(Number)
}
function fr(e) {
return e[ku(e)]
}
function ku(e) {
return Math.max(0, e.length - 1)
}
function Gv(e, t) {
return t === ku(e)
}
function xw(e, t=0) {
return Array.from(Array(e), (n,r)=>t + r)
}
function Wl(e) {
return Object.keys(e)
}
function jP(e, t) {
return [e, t].reduce((n,r)=>(Wl(r).forEach(i=>{
const s = n[i]
, o = r[i]
, a = ww(s) && ww(o);
n[i] = a ? jP(s, o) : o
}
),
n), {})
}
function qm(e, t) {
return typeof t.MouseEvent < "u" && e instanceof t.MouseEvent
}
function _5(e, t) {
const n = {
start: r,
center: i,
end: s
};
function r() {
return 0
}
function i(l) {
return s(l) / 2
}
function s(l) {
return t - l
}
function o(l, u) {
return Km(e) ? n[e](l) : e(t, l, u)
}
return {
measure: o
}
}
function Gl() {
let e = [];
function t(i, s, o, a={
passive: !0
}) {
let l;
if ("addEventListener"in i)
i.addEventListener(s, o, a),
l = ()=>i.removeEventListener(s, o, a);
else {
const u = i;
u.addListener(o),
l = ()=>u.removeListener(o)
}
return e.push(l),
r
}
function n() {
e = e.filter(i=>i())
}
const r = {
add: t,
clear: n
};
return r
}
function A5(e, t, n, r) {
const i = Gl()
, s = 1e3 / 60;
let o = null
, a = 0
, l = 0;
function u() {
i.add(e, "visibilitychange", ()=>{
e.hidden && m()
}
)
}
function c() {
h(),
i.clear()
}
function d(b) {
if (!l)
return;
o || (o = b);
const v = b - o;
for (o = b,
a += v; a >= s; )
n(),
a -= s;
const g = pt(a / s);
r(g),
l && t.requestAnimationFrame(d)
}
function f() {
l || (l = t.requestAnimationFrame(d))
}
function h() {
t.cancelAnimationFrame(l),
o = null,
a = 0,
l = 0
}
function m() {
o = null,
a = 0
}
return {
init: u,
destroy: c,
start: f,
stop: h,
update: n,
render: r
}
}
function D5(e, t) {
const n = t === "rtl"
, r = e === "y"
, i = r ? "y" : "x"
, s = r ? "x" : "y"
, o = !r && n ? -1 : 1
, a = c()
, l = d();
function u(m) {
const {height: p, width: b} = m;
return r ? p : b
}
function c() {
return r ? "top" : n ? "right" : "left"
}
function d() {
return r ? "bottom" : n ? "left" : "right"
}
function f(m) {
return m * o
}
return {
scroll: i,
cross: s,
startEdge: a,
endEdge: l,
measureSize: u,
direction: f
}
}
function $s(e=0, t=0) {
const n = pt(e - t);
function r(u) {
return u < e
}
function i(u) {
return u > t
}
function s(u) {
return r(u) || i(u)
}
function o(u) {
return s(u) ? r(u) ? e : t : u
}
function a(u) {
return n ? u - n * Math.ceil((u - t) / n) : u
}
return {
length: n,
max: t,
min: e,
constrain: o,
reachedAny: s,
reachedMax: i,
reachedMin: r,
removeOffset: a
}
}
function $P(e, t, n) {
const {constrain: r} = $s(0, e)
, i = e + 1;
let s = o(t);
function o(f) {
return n ? pt((i + f) % i) : r(f)
}
function a() {
return s
}
function l(f) {
return s = o(f),
d
}
function u(f) {
return c().set(a() + f)
}
function c() {
return $P(e, a(), n)
}
const d = {
get: a,
set: l,
add: u,
clone: c
};
return d
}
function L5(e, t, n, r, i, s, o, a, l, u, c, d, f, h, m, p, b, v, g) {
const {cross: w, direction: E} = e
, D = ["INPUT", "SELECT", "TEXTAREA"]
, V = {
passive: !1
}
, C = Gl()
, P = Gl()
, A = $s(50, 225).constrain(h.measure(20))
, B = {
mouse: 300,
touch: 400
}
, Q = {
mouse: 500,
touch: 600
}
, Z = m ? 43 : 25;
let F = !1
, k = 0
, T = 0
, _ = !1
, O = !1
, R = !1
, z = !1;
function Y(L) {
if (!g)
return;
function M(J) {
(Hv(g) || g(L, J)) && N(J)
}
const W = t;
C.add(W, "dragstart", J=>J.preventDefault(), V).add(W, "touchmove", ()=>{}
, V).add(W, "touchend", ()=>{}
).add(W, "touchstart", M).add(W, "mousedown", M).add(W, "touchcancel", U).add(W, "contextmenu", U).add(W, "click", H, !0)
}
function te() {
C.clear(),
P.clear()
}
function ue() {
const L = z ? n : t;
P.add(L, "touchmove", I, V).add(L, "touchend", U).add(L, "mousemove", I, V).add(L, "mouseup", U)
}
function X(L) {
const M = L.nodeName || "";
return D.includes(M)
}
function S() {
return (m ? Q : B)[z ? "mouse" : "touch"]
}
function j(L, M) {
const W = d.add(Wv(L) * -1)
, J = c.byDistance(L, !m).distance;
return m || pt(L) < A ? J : b && M ? J * .5 : c.byIndex(W.get(), 0).distance
}
function N(L) {
const M = qm(L, r);
z = M,
R = m && M && !L.buttons && F,
F = cl(i.get(), o.get()) >= 2,
!(M && L.button !== 0) && (X(L.target) || (_ = !0,
s.pointerDown(L),
u.useFriction(0).useDuration(0),
i.set(o),
ue(),
k = s.readPoint(L),
T = s.readPoint(L, w),
f.emit("pointerDown")))
}
function I(L) {
if (!qm(L, r) && L.touches.length >= 2)
return U(L);
const W = s.readPoint(L)
, J = s.readPoint(L, w)
, se = cl(W, k)
, ae = cl(J, T);
if (!O && !z && (!L.cancelable || (O = se > ae,
!O)))
return U(L);
const ne = s.pointerMove(L);
se > p && (R = !0),
u.useFriction(.3).useDuration(.75),
a.start(),
i.add(E(ne)),
L.preventDefault()
}
function U(L) {
const W = c.byDistance(0, !1).index !== d.get()
, J = s.pointerUp(L) * S()
, se = j(E(J), W)
, ae = k5(J, se)
, ne = Z - 10 * ae
, de = v + ae / 50;
O = !1,
_ = !1,
P.clear(),
u.useDuration(ne).useFriction(de),
l.distance(se, !m),
z = !1,
f.emit("pointerUp")
}
function H(L) {
R && (L.stopPropagation(),
L.preventDefault(),
R = !1)
}
function q() {
return _
}
return {
init: Y,
destroy: te,
pointerDown: q
}
}
function N5(e, t) {
let r, i;
function s(d) {
return d.timeStamp
}
function o(d, f) {
const m = `client${(f || e.scroll) === "x" ? "X" : "Y"}`;
return (qm(d, t) ? d : d.touches[0])[m]
}
function a(d) {
return r = d,
i = d,
o(d)
}
function l(d) {
const f = o(d) - o(i)
, h = s(d) - s(r) > 170;
return i = d,
h && (r = d),
f
}
function u(d) {
if (!r || !i)
return 0;
const f = o(i) - o(r)
, h = s(d) - s(r)
, m = s(d) - s(i) > 170
, p = f / h;
return h && !m && pt(p) > .1 ? p : 0
}
return {
pointerDown: a,
pointerMove: l,
pointerUp: u,
readPoint: o
}
}
function M5() {
function e(n) {
const {offsetTop: r, offsetLeft: i, offsetWidth: s, offsetHeight: o} = n;
return {
top: r,
right: i + s,
bottom: r + o,
left: i,
width: s,
height: o
}
}
return {
measure: e
}
}
function j5(e) {
function t(r) {
return e * (r / 100)
}
return {
measure: t
}
}
function $5(e, t, n, r, i, s, o) {
let a, l, u = [], c = !1;
function d(p) {
return i.measureSize(o.measure(p))
}
function f(p) {
if (!s)
return;
l = d(e),
u = r.map(d);
function b(g) {
for (const w of g) {
const E = w.target === e
, D = r.indexOf(w.target)
, V = E ? l : u[D]
, C = d(E ? e : r[D]);
if (pt(C - V) >= .5) {
n.requestAnimationFrame(()=>{
p.reInit(),
t.emit("resize")
}
);
break
}
}
}
a = new ResizeObserver(g=>{
c || (Hv(s) || s(p, g)) && b(g)
}
),
[e].concat(r).forEach(g=>a.observe(g))
}
function h() {
a && a.disconnect(),
c = !0
}
return {
init: f,
destroy: h
}
}
function I5(e, t, n, r, i) {
let s = 0
, o = 0
, a = r
, l = i
, u = e.get()
, c = 0;
function d() {
const D = n.get() - e.get()
, V = !a;
let C = 0;
return V ? (s = 0,
e.set(n),
C = D) : (s += D / a,
s *= l,
u += s,
e.add(s),
C = u - c),
o = Wv(C),
c = u,
E
}
function f() {
const D = n.get() - t.get();
return pt(D) < .001
}
function h() {
return a
}
function m() {
return o
}
function p() {
return s
}
function b() {
return g(r)
}
function v() {
return w(i)
}
function g(D) {
return a = D,
E
}
function w(D) {
return l = D,
E
}
const E = {
direction: m,
duration: h,
velocity: p,
seek: d,
settled: f,
useBaseFriction: v,
useBaseDuration: b,
useFriction: w,
useDuration: g
};
return E
}
function F5(e, t, n, r, i) {
const s = i.measure(10)
, o = i.measure(50)
, a = $s(.1, .99);
let l = !1;
function u() {
return !(l || !e.reachedAny(n.get()) || !e.reachedAny(t.get()))
}
function c(h) {
if (!u())
return;
const m = e.reachedMin(t.get()) ? "min" : "max"
, p = pt(e[m] - t.get())
, b = n.get() - t.get()
, v = a.constrain(p / o);
n.subtract(b * v),
!h && pt(b) < s && (n.set(e.constrain(n.get())),
r.useDuration(25).useBaseFriction())
}
function d(h) {
l = !h
}
return {
constrain: c,
toggleActive: d
}
}
function V5(e, t, n, r, i) {
const s = $s(-t + e, 0)
, o = d()
, a = c()
, l = f();
function u(m, p) {
return cl(m, p) < 1
}
function c() {
const m = o[0]
, p = fr(o)
, b = o.lastIndexOf(m)
, v = o.indexOf(p) + 1;
return $s(b, v)
}
function d() {
return n.map((m,p)=>{
const {min: b, max: v} = s
, g = s.constrain(m)
, w = !p
, E = Gv(n, p);
return w ? v : E || u(b, g) ? b : u(v, g) ? v : g
}
).map(m=>parseFloat(m.toFixed(3)))
}
function f() {
if (t <= e + i)
return [s.max];
if (r === "keepSnaps")
return o;
const {min: m, max: p} = a;
return o.slice(m, p)
}
return {
snapsContained: l,
scrollContainLimit: a
}
}
function z5(e, t, n) {
const r = t[0]
, i = n ? r - e : fr(t);
return {
limit: $s(i, r)
}
}
function U5(e, t, n, r) {
const s = t.min + .1
, o = t.max + .1
, {reachedMin: a, reachedMax: l} = $s(s, o);
function u(f) {
return f === 1 ? l(n.get()) : f === -1 ? a(n.get()) : !1
}
function c(f) {
if (!u(f))
return;
const h = e * (f * -1);
r.forEach(m=>m.add(h))
}
return {
loop: c
}
}
function B5(e) {
const {max: t, length: n} = e;
function r(s) {
const o = s - t;
return n ? o / -n : 0
}
return {
get: r
}
}
function H5(e, t, n, r, i) {
const {startEdge: s, endEdge: o} = e
, {groupSlides: a} = i
, l = d().map(t.measure)
, u = f()
, c = h();
function d() {
return a(r).map(p=>fr(p)[o] - p[0][s]).map(pt)
}
function f() {
return r.map(p=>n[s] - p[s]).map(p=>-pt(p))
}
function h() {
return a(u).map(p=>p[0]).map((p,b)=>p + l[b])
}
return {
snaps: u,
snapsAligned: c
}
}
function W5(e, t, n, r, i, s) {
const {groupSlides: o} = i
, {min: a, max: l} = r
, u = c();
function c() {
const f = o(s)
, h = !e || t === "keepSnaps";
return n.length === 1 ? [s] : h ? f : f.slice(a, l).map((m,p,b)=>{
const v = !p
, g = Gv(b, p);
if (v) {
const w = fr(b[0]) + 1;
return xw(w)
}
if (g) {
const w = ku(s) - fr(b)[0] + 1;
return xw(w, fr(b)[0])
}
return m
}
)
}
return {
slideRegistry: u
}
}
function G5(e, t, n, r, i) {
const {reachedAny: s, removeOffset: o, constrain: a} = r;
function l(m) {
return m.concat().sort((p,b)=>pt(p) - pt(b))[0]
}
function u(m) {
const p = e ? o(m) : a(m)
, b = t.map((g,w)=>({
diff: c(g - p, 0),
index: w
})).sort((g,w)=>pt(g.diff) - pt(w.diff))
, {index: v} = b[0];
return {
index: v,
distance: p
}
}
function c(m, p) {
const b = [m, m + n, m - n];
if (!e)
return m;
if (!p)
return l(b);
const v = b.filter(g=>Wv(g) === p);
return v.length ? l(v) : fr(b) - n
}
function d(m, p) {
const b = t[m] - i.get()
, v = c(b, p);
return {
index: m,
distance: v
}
}
function f(m, p) {
const b = i.get() + m
, {index: v, distance: g} = u(b)
, w = !e && s(b);
if (!p || w)
return {
index: v,
distance: m
};
const E = t[v] - g
, D = m + c(E, 0);
return {
index: v,
distance: D
}
}
return {
byDistance: f,
byIndex: d,
shortcut: c
}
}
function K5(e, t, n, r, i, s, o) {
function a(d) {
const f = d.distance
, h = d.index !== t.get();
s.add(f),
f && (r.duration() ? e.start() : (e.update(),
e.render(1),
e.update())),
h && (n.set(t.get()),
t.set(d.index),
o.emit("select"))
}
function l(d, f) {
const h = i.byDistance(d, f);
a(h)
}
function u(d, f) {
const h = t.clone().set(d)
, m = i.byIndex(h.get(), f);
a(m)
}
return {
distance: l,
index: u
}
}
function q5(e, t, n, r, i, s, o) {
let a = 0;
function l() {
s.add(document, "keydown", u, !1),
t.forEach(c)
}
function u(f) {
f.code === "Tab" && (a = new Date().getTime())
}
function c(f) {
const h = ()=>{
if (new Date().getTime() - a > 10)
return;
e.scrollLeft = 0;
const b = t.indexOf(f)
, v = n.findIndex(g=>g.includes(b));
Bv(v) && (i.useDuration(0),
r.index(v, 0),
o.emit("slideFocus"))
}
;
s.add(f, "focus", h, {
passive: !0,
capture: !0
})
}
return {
init: l
}
}
function Vc(e) {
let t = e;
function n() {
return t
}
function r(l) {
t = o(l)
}
function i(l) {
t += o(l)
}
function s(l) {
t -= o(l)
}
function o(l) {
return Bv(l) ? l : l.get()
}
return {
get: n,
set: r,
add: i,
subtract: s
}
}
function IP(e, t) {
const n = e.scroll === "x" ? s : o
, r = t.style;
let i = !1;
function s(d) {
return `translate3d(${d}px,0px,0px)`
}
function o(d) {
return `translate3d(0px,${d}px,0px)`
}
function a(d) {
i || (r.transform = n(e.direction(d)))
}
function l(d) {
i = !d
}
function u() {
i || (r.transform = "",
t.getAttribute("style") || t.removeAttribute("style"))
}
return {
clear: u,
to: a,
toggleActive: l
}
}
function Q5(e, t, n, r, i, s, o, a, l) {
const c = Hl(i)
, d = Hl(i).reverse()
, f = v().concat(g());
function h(C, P) {
return C.reduce((A,B)=>A - i[B], P)
}
function m(C, P) {
return C.reduce((A,B)=>h(A, P) > 0 ? A.concat([B]) : A, [])
}
function p(C) {
return s.map((P,A)=>({
start: P - r[A] + .5 + C,
end: P + t - .5 + C
}))
}
function b(C, P, A) {
const B = p(P);
return C.map(Q=>{
const Z = A ? 0 : -n
, F = A ? n : 0
, k = A ? "end" : "start"
, T = B[Q][k];
return {
index: Q,
loopPoint: T,
slideLocation: Vc(-1),
translate: IP(e, l[Q]),
target: ()=>a.get() > T ? Z : F
}
}
)
}
function v() {
const C = o[0]
, P = m(d, C);
return b(P, n, !1)
}
function g() {
const C = t - o[0] - 1
, P = m(c, C);
return b(P, -n, !0)
}
function w() {
return f.every(({index: C})=>{
const P = c.filter(A=>A !== C);
return h(P, t) <= .1
}
)
}
function E() {
f.forEach(C=>{
const {target: P, translate: A, slideLocation: B} = C
, Q = P();
Q !== B.get() && (A.to(Q),
B.set(Q))
}
)
}
function D() {
f.forEach(C=>C.translate.clear())
}
return {
canLoop: w,
clear: D,
loop: E,
loopPoints: f
}
}
function Y5(e, t, n) {
let r, i = !1;
function s(l) {
if (!n)
return;
function u(c) {
for (const d of c)
if (d.type === "childList") {
l.reInit(),
t.emit("slidesChanged");
break
}
}
r = new MutationObserver(c=>{
i || (Hv(n) || n(l, c)) && u(c)
}
),
r.observe(e, {
childList: !0
})
}
function o() {
r && r.disconnect(),
i = !0
}
return {
init: s,
destroy: o
}
}
function X5(e, t, n, r) {
const i = {};
let s = null, o = null, a, l = !1;
function u() {
a = new IntersectionObserver(m=>{
l || (m.forEach(p=>{
const b = t.indexOf(p.target);
i[b] = p
}
),
s = null,
o = null,
n.emit("slidesInView"))
}
,{
root: e.parentElement,
threshold: r
}),
t.forEach(m=>a.observe(m))
}
function c() {
a && a.disconnect(),
l = !0
}
function d(m) {
return Wl(i).reduce((p,b)=>{
const v = parseInt(b)
, {isIntersecting: g} = i[v];
return (m && g || !m && !g) && p.push(v),
p
}
, [])
}
function f(m=!0) {
if (m && s)
return s;
if (!m && o)
return o;
const p = d(m);
return m && (s = p),
m || (o = p),
p
}
return {
init: u,
destroy: c,
get: f
}
}
function J5(e, t, n, r, i, s) {
const {measureSize: o, startEdge: a, endEdge: l} = e
, u = n[0] && i
, c = m()
, d = p()
, f = n.map(o)
, h = b();
function m() {
if (!u)
return 0;
const g = n[0];
return pt(t[a] - g[a])
}
function p() {
if (!u)
return 0;
const g = s.getComputedStyle(fr(r));
return parseFloat(g.getPropertyValue(`margin-${l}`))
}
function b() {
return n.map((g,w,E)=>{
const D = !w
, V = Gv(E, w);
return D ? f[w] + c : V ? f[w] + d : E[w + 1][a] - g[a]
}
).map(pt)
}
return {
slideSizes: f,
slideSizesWithGaps: h,
startGap: c,
endGap: d
}
}
function Z5(e, t, n, r, i, s, o, a, l) {
const {startEdge: u, endEdge: c, direction: d} = e
, f = Bv(n);
function h(v, g) {
return Hl(v).filter(w=>w % g === 0).map(w=>v.slice(w, w + g))
}
function m(v) {
return v.length ? Hl(v).reduce((g,w,E)=>{
const D = fr(g) || 0
, V = D === 0
, C = w === ku(v)
, P = i[u] - s[D][u]
, A = i[u] - s[w][c]
, B = !r && V ? d(o) : 0
, Q = !r && C ? d(a) : 0
, Z = pt(A - Q - (P + B));
return E && Z > t + l && g.push(w),
C && g.push(v.length),
g
}
, []).map((g,w,E)=>{
const D = Math.max(E[w - 1] || 0);
return v.slice(D, g)
}
) : []
}
function p(v) {
return f ? h(v, n) : m(v)
}
return {
groupSlides: p
}
}
function e$(e, t, n, r, i, s, o) {
const {align: a, axis: l, direction: u, startIndex: c, loop: d, duration: f, dragFree: h, dragThreshold: m, inViewThreshold: p, slidesToScroll: b, skipSnaps: v, containScroll: g, watchResize: w, watchSlides: E, watchDrag: D} = s
, V = 2
, C = M5()
, P = C.measure(t)
, A = n.map(C.measure)
, B = D5(l, u)
, Q = B.measureSize(P)
, Z = j5(Q)
, F = _5(a, Q)
, k = !d && !!g
, T = d || !!g
, {slideSizes: _, slideSizesWithGaps: O, startGap: R, endGap: z} = J5(B, P, A, n, T, i)
, Y = Z5(B, Q, b, d, P, A, R, z, V)
, {snaps: te, snapsAligned: ue} = H5(B, F, P, A, Y)
, X = -fr(te) + fr(O)
, {snapsContained: S, scrollContainLimit: j} = V5(Q, X, ue, g, V)
, N = k ? S : ue
, {limit: I} = z5(X, N, d)
, U = $P(ku(N), c, d)
, H = U.clone()
, q = Hl(n)
, $ = ({dragHandler: Ve, scrollBody: Te, scrollBounds: Ke, options: {loop: ke}})=>{
ke || Ke.constrain(Ve.pointerDown()),
Te.seek()
}
, L = ({scrollBody: Ve, translate: Te, location: Ke, offsetLocation: ke, scrollLooper: Qe, slideLooper: nt, dragHandler: it, animation: me, eventHandler: Ce, options: {loop: Be}},Re)=>{
const We = Ve.velocity()
, et = Ve.settled();
et && !it.pointerDown() && (me.stop(),
Ce.emit("settle")),
et || Ce.emit("scroll"),
ke.set(Ke.get() - We + We * Re),
Be && (Qe.loop(Ve.direction()),
nt.loop()),
Te.to(ke.get())
}
, M = A5(r, i, ()=>$(Ge), Ve=>L(Ge, Ve))
, W = .68
, J = N[U.get()]
, se = Vc(J)
, ae = Vc(J)
, ne = Vc(J)
, de = I5(se, ae, ne, f, W)
, ye = G5(d, N, X, I, ne)
, be = K5(M, U, H, de, ye, ne, o)
, Me = B5(I)
, fe = Gl()
, Ee = X5(t, n, o, p)
, {slideRegistry: we} = W5(k, g, N, j, Y, q)
, Se = q5(e, n, we, be, de, fe, o)
, Ge = {
ownerDocument: r,
ownerWindow: i,
eventHandler: o,
containerRect: P,
slideRects: A,
animation: M,
axis: B,
dragHandler: L5(B, e, r, i, ne, N5(B, i), se, M, be, de, ye, U, o, Z, h, m, v, W, D),
eventStore: fe,
percentOfView: Z,
index: U,
indexPrevious: H,
limit: I,
location: se,
offsetLocation: ae,
options: s,
resizeHandler: $5(t, o, i, n, B, w, C),
scrollBody: de,
scrollBounds: F5(I, ae, ne, de, Z),
scrollLooper: U5(X, I, ae, [se, ae, ne]),
scrollProgress: Me,
scrollSnapList: N.map(Me.get),
scrollSnaps: N,
scrollTarget: ye,
scrollTo: be,
slideLooper: Q5(B, Q, X, _, O, te, N, ae, n),
slideFocus: Se,
slidesHandler: Y5(t, o, E),
slidesInView: Ee,
slideIndexes: q,
slideRegistry: we,
slidesToScroll: Y,
target: ne,
translate: IP(B, t)
};
return Ge
}
function t$() {
let e = {}, t;
function n(u) {
t = u
}
function r(u) {
return e[u] || []
}
function i(u) {
return r(u).forEach(c=>c(t, u)),
l
}
function s(u, c) {
return e[u] = r(u).concat([c]),
l
}
function o(u, c) {
return e[u] = r(u).filter(d=>d !== c),
l
}
function a() {
e = {}
}
const l = {
init: n,
emit: i,
off: o,
on: s,
clear: a
};
return l
}
const n$ = {
align: "center",
axis: "x",
container: null,
slides: null,
containScroll: "trimSnaps",
direction: "ltr",
slidesToScroll: 1,
inViewThreshold: 0,
breakpoints: {},
dragFree: !1,
dragThreshold: 10,
loop: !1,
skipSnaps: !1,
duration: 25,
startIndex: 0,
active: !0,
watchDrag: !0,
watchResize: !0,
watchSlides: !0
};
function r$(e) {
function t(s, o) {
return jP(s, o || {})
}
function n(s) {
const o = s.breakpoints || {}
, a = Wl(o).filter(l=>e.matchMedia(l).matches).map(l=>o[l]).reduce((l,u)=>t(l, u), {});
return t(s, a)
}
function r(s) {
return s.map(o=>Wl(o.breakpoints || {})).reduce((o,a)=>o.concat(a), []).map(e.matchMedia)
}
return {
mergeOptions: t,
optionsAtMedia: n,
optionsMediaQueries: r
}
}
function i$(e) {
let t = [];
function n(s, o) {
return t = o.filter(({options: a})=>e.optionsAtMedia(a).active !== !1),
t.forEach(a=>a.init(s, e)),
o.reduce((a,l)=>Object.assign(a, {
[l.name]: l
}), {})
}
function r() {
t = t.filter(s=>s.destroy())
}
return {
init: n,
destroy: r
}
}
function Dd(e, t, n) {
const r = e.ownerDocument
, i = r.defaultView
, s = r$(i)
, o = i$(s)
, a = Gl()
, l = t$()
, {mergeOptions: u, optionsAtMedia: c, optionsMediaQueries: d} = s
, {on: f, off: h, emit: m} = l
, p = Q;
let b = !1, v, g = u(n$, Dd.globalOptions), w = u(g), E = [], D, V, C;
function P() {
const {container: $, slides: L} = w;
V = (Km($) ? e.querySelector($) : $) || e.children[0];
const W = Km(L) ? V.querySelectorAll(L) : L;
C = [].slice.call(W || V.children)
}
function A($) {
const L = e$(e, V, C, r, i, $, l);
if ($.loop && !L.slideLooper.canLoop()) {
const M = Object.assign({}, $, {
loop: !1
});
return A(M)
}
return L
}
function B($, L) {
b || (g = u(g, $),
w = c(g),
E = L || E,
P(),
v = A(w),
d([g, ...E.map(({options: M})=>M)]).forEach(M=>a.add(M, "change", Q)),
w.active && (v.translate.to(v.location.get()),
v.animation.init(),
v.slidesInView.init(),
v.slideFocus.init(),
v.eventHandler.init(q),
v.resizeHandler.init(q),
v.slidesHandler.init(q),
v.options.loop && v.slideLooper.loop(),
V.offsetParent && C.length && v.dragHandler.init(q),
D = o.init(q, E)))
}
function Q($, L) {
const M = te();
Z(),
B(u({
startIndex: M
}, $), L),
l.emit("reInit")
}
function Z() {
v.dragHandler.destroy(),
v.eventStore.clear(),
v.translate.clear(),
v.slideLooper.clear(),
v.resizeHandler.destroy(),
v.slidesHandler.destroy(),
v.slidesInView.destroy(),
v.animation.destroy(),
o.destroy(),
a.clear()
}
function F() {
b || (b = !0,
a.clear(),
Z(),
l.emit("destroy"),
l.clear())
}
function k($, L, M) {
!w.active || b || (v.scrollBody.useBaseFriction().useDuration(L === !0 ? 0 : w.duration),
v.scrollTo.index($, M || 0))
}
function T($) {
const L = v.index.add(1).get();
k(L, $, -1)
}
function _($) {
const L = v.index.add(-1).get();
k(L, $, 1)
}
function O() {
return v.index.add(1).get() !== te()
}
function R() {
return v.index.add(-1).get() !== te()
}
function z() {
return v.scrollSnapList
}
function Y() {
return v.scrollProgress.get(v.location.get())
}
function te() {
return v.index.get()
}
function ue() {
return v.indexPrevious.get()
}
function X() {
return v.slidesInView.get()
}
function S() {
return v.slidesInView.get(!1)
}
function j() {
return D
}
function N() {
return v
}
function I() {
return e
}
function U() {
return V
}
function H() {
return C
}
const q = {
canScrollNext: O,
canScrollPrev: R,
containerNode: U,
internalEngine: N,
destroy: F,
off: h,
on: f,
emit: m,
plugins: j,
previousScrollSnap: ue,
reInit: p,
rootNode: I,
scrollNext: T,
scrollPrev: _,
scrollProgress: Y,
scrollSnapList: z,
scrollTo: k,
selectedScrollSnap: te,
slideNodes: H,
slidesInView: X,
slidesNotInView: S
};
return B(t, n),
setTimeout(()=>l.emit("init"), 0),
q
}
Dd.globalOptions = void 0;
function Kv(e={}, t=[]) {
const n = y.useRef(e)
, r = y.useRef(t)
, [i,s] = y.useState()
, [o,a] = y.useState()
, l = y.useCallback(()=>{
i && i.reInit(n.current, r.current)
}
, [i]);
return y.useEffect(()=>{
if (R5() && o) {
Dd.globalOptions = Kv.globalOptions;
const u = Dd(o, n.current, r.current);
return s(u),
()=>u.destroy()
} else
s(void 0)
}
, [o, s]),
y.useEffect(()=>{
Uv(n.current, e) || (n.current = e,
l())
}
, [e, l]),
y.useEffect(()=>{
O5(r.current, t) || (r.current = t,
l())
}
, [t, l]),
[a, i]
}
Kv.globalOptions = void 0;
const s$ = e=>x.jsx(FP, {
...e,
right: !1
})
, qv = e=>x.jsx(FP, {
...e,
right: !0
})
, FP = e=>{
const {right: t, ...n} = e;
return x.jsx("svg", {
...n,
width: "10",
height: "18",
viewBox: "0 0 10 18",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: Ze(e.className, t && "rotate-180", "size-[11px]"),
children: x.jsx("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M9.70711 0.292893C9.31658 -0.0976311 8.68342 -0.0976311 8.29289 0.292893L0.292893 8.29289C-0.0976315 8.68342 -0.0976315 9.31658 0.292893 9.70711L8.29289 17.7071C8.68342 18.0976 9.31658 18.0976 9.70711 17.7071C10.0976 17.3166 10.0976 16.6834 9.70711 16.2929L2.41421 9L9.70711 1.70711C10.0976 1.31658 10.0976 0.683417 9.70711 0.292893Z",
fill: "currentColor"
})
})
}
, VP = y.createContext(null);
function Nf() {
const e = y.useContext(VP);
if (!e)
throw new Error("useCarousel must be used within a <Carousel />");
return e
}
const zP = y.forwardRef(({orientation: e="horizontal", opts: t, setApi: n, plugins: r, className: i, children: s, ...o},a)=>{
const [l,u] = Kv({
...t,
axis: e === "horizontal" ? "x" : "y"
}, r)
, [c,d] = y.useState(!1)
, [f,h] = y.useState(!1)
, m = y.useCallback(g=>{
g && (d(g.canScrollPrev()),
h(g.canScrollNext()))
}
, [])
, p = y.useCallback(()=>{
u == null || u.scrollPrev()
}
, [u])
, b = y.useCallback(()=>{
u == null || u.scrollNext()
}
, [u])
, v = y.useCallback(g=>{
g.key === "ArrowLeft" ? (g.preventDefault(),
p()) : g.key === "ArrowRight" && (g.preventDefault(),
b())
}
, [p, b]);
return y.useEffect(()=>{
!u || !n || n(u)
}
, [u, n]),
y.useEffect(()=>{
if (u)
return m(u),
u.on("reInit", m),
u.on("select", m),
()=>{
u == null || u.off("select", m)
}
}
, [u, m]),
x.jsx(VP.Provider, {
value: {
carouselRef: l,
api: u,
opts: t,
orientation: e || ((t == null ? void 0 : t.axis) === "y" ? "vertical" : "horizontal"),
scrollPrev: p,
scrollNext: b,
canScrollPrev: c,
canScrollNext: f
},
children: x.jsx("div", {
ref: a,
onKeyDownCapture: v,
className: Ze("relative", i),
role: "region",
"aria-roledescription": "carousel",
...o,
children: s
})
})
}
);
zP.displayName = "Carousel";
const UP = y.forwardRef(({className: e, ...t},n)=>{
const {carouselRef: r, orientation: i} = Nf();
return x.jsx("div", {
ref: r,
className: "overflow-hidden",
children: x.jsx("div", {
ref: n,
className: Ze("flex", i === "horizontal" ? "-ml-4" : "-mt-4 flex-col", e),
...t
})
})
}
);
UP.displayName = "CarouselContent";
const BP = y.forwardRef(({className: e, ...t},n)=>{
const {orientation: r} = Nf();
return x.jsx("div", {
ref: n,
role: "group",
"aria-roledescription": "slide",
className: Ze("min-w-0 shrink-0 grow-0 basis-full", r === "horizontal" ? "pl-4" : "pt-4", e),
...t
})
}
);
BP.displayName = "CarouselItem";
const HP = y.forwardRef(({className: e, ...t},n)=>{
const {scrollPrev: r, canScrollPrev: i} = Nf();
return x.jsxs("button", {
ref: n,
className: Ze("h-8 w-8 rounded-full", e),
disabled: !i,
onClick: r,
...t,
children: [x.jsx(s$, {
className: Ze("h-4 w-4", !i && "text-transparent")
}), x.jsx("span", {
className: "sr-only",
children: "Previous slide"
})]
})
}
);
HP.displayName = "CarouselPrevious";
const WP = y.forwardRef(({className: e, ...t},n)=>{
const {scrollNext: r, canScrollNext: i} = Nf();
return x.jsxs("button", {
ref: n,
className: Ze("h-8 w-8 rounded-full", e),
disabled: !i,
onClick: r,
...t,
children: [x.jsx(qv, {
className: Ze("h-4 w-4", !i && "text-transparent")
}), x.jsx("span", {
className: "sr-only",
children: "Next slide"
})]
})
}
);
WP.displayName = "CarouselNext";
const GP = e=>x.jsx("div", {
className: Ze("size-2 rounded-full bg-accent-error", e.className)
})
, o$ = ()=>{
const e = cC()
, {pathname: t} = Qi()
, n = i=>t === i
, r = Oz();
return x.jsx("nav", {
className: "flex gap-1",
children: r.map(i=>{
const {path: s, name: o, iconUrl: a} = i
, l = s === "/tasks" && e
, u = n(s);
return x.jsxs(wA, {
to: s,
className: "group relative box-border grid h-20 flex-1 place-content-center rounded-2xl bg-graphite-normal px-3 py-2 text-sm text-white/65 transition-all data-[status=active]:bg-active-nav-gradient data-[status=active]:text-gold data-[status=active]:shadow-inner-border data-[status=active]:shadow-gold",
"data-status": u && "active",
children: [l && x.jsx(GP, {
className: "absolute right-2 top-2"
}), x.jsxs("div", {
className: "flex flex-col items-center justify-center gap-1",
children: [x.jsxs("div", {
className: "relative",
children: [x.jsx("img", {
className: "relative z-10 size-10 object-scale-down",
src: a,
alt: o
}), x.jsx("img", {
className: "absolute inset-0 z-0 hidden size-14 group-data-[status=active]:block",
src: Ae.navGlow,
alt: "glow"
})]
}), x.jsx("div", {
children: o
})]
})]
}, s)
}
)
})
}
, a$ = ()=>{
const {pathname: e} = Qi();
return x.jsx("div", {
className: Ze("absolute top-0 h-8 w-full -translate-y-8 bg-gradient-to-t from-graphite-dark to-transparent", e === "/" && "-z-10")
})
}
, l$ = ()=>x.jsx("div", {
className: "flex h-screen items-center justify-center",
children: x.jsx("div", {
children: "App is available only on mobile :)"
})
})
, Qv = y.createContext({
transformPagePoint: e=>e,
isStatic: !1,
reducedMotion: "never"
})
, Mf = y.createContext({})
, jf = y.createContext(null)
, Yv = typeof document < "u"
, Xv = Yv ? y.useLayoutEffect : y.useEffect
, KP = y.createContext({
strict: !1
})
, Jv = e=>e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase()
, u$ = "framerAppearId"
, qP = "data-" + Jv(u$)
, c$ = {
skipAnimations: !1,
useManualTiming: !1
};
class bw {
constructor() {
this.order = [],
this.scheduled = new Set
}
add(t) {
if (!this.scheduled.has(t))
return this.scheduled.add(t),
this.order.push(t),
!0
}
remove(t) {
const n = this.order.indexOf(t);
n !== -1 && (this.order.splice(n, 1),
this.scheduled.delete(t))
}
clear() {
this.order.length = 0,
this.scheduled.clear()
}
}
function d$(e) {
let t = new bw
, n = new bw
, r = 0
, i = !1
, s = !1;
const o = new WeakSet
, a = {
schedule: (l,u=!1,c=!1)=>{
const d = c && i
, f = d ? t : n;
return u && o.add(l),
f.add(l) && d && i && (r = t.order.length),
l
}
,
cancel: l=>{
n.remove(l),
o.delete(l)
}
,
process: l=>{
if (i) {
s = !0;
return
}
if (i = !0,
[t,n] = [n, t],
n.clear(),
r = t.order.length,
r)
for (let u = 0; u < r; u++) {
const c = t.order[u];
o.has(c) && (a.schedule(c),
e()),
c(l)
}
i = !1,
s && (s = !1,
a.process(l))
}
};
return a
}
const mc = ["read", "resolveKeyframes", "update", "preRender", "render", "postRender"]
, f$ = 40;
function QP(e, t) {
let n = !1
, r = !0;
const i = {
delta: 0,
timestamp: 0,
isProcessing: !1
}
, s = mc.reduce((d,f)=>(d[f] = d$(()=>n = !0),
d), {})
, o = d=>{
s[d].process(i)
}
, a = ()=>{
const d = performance.now();
n = !1,
i.delta = r ? 1e3 / 60 : Math.max(Math.min(d - i.timestamp, f$), 1),
i.timestamp = d,
i.isProcessing = !0,
mc.forEach(o),
i.isProcessing = !1,
n && t && (r = !1,
e(a))
}
, l = ()=>{
n = !0,
r = !0,
i.isProcessing || e(a)
}
;
return {
schedule: mc.reduce((d,f)=>{
const h = s[f];
return d[f] = (m,p=!1,b=!1)=>(n || l(),
h.schedule(m, p, b)),
d
}
, {}),
cancel: d=>mc.forEach(f=>s[f].cancel(d)),
state: i,
steps: s
}
}
const {schedule: Zv, cancel: Lz} = QP(queueMicrotask, !1);
function h$(e, t, n, r) {
const {visualElement: i} = y.useContext(Mf)
, s = y.useContext(KP)
, o = y.useContext(jf)
, a = y.useContext(Qv).reducedMotion
, l = y.useRef();
r = r || s.renderer,
!l.current && r && (l.current = r(e, {
visualState: t,
parent: i,
props: n,
presenceContext: o,
blockInitialAnimation: o ? o.initial === !1 : !1,
reducedMotionConfig: a
}));
const u = l.current;
y.useInsertionEffect(()=>{
u && u.update(n, o)
}
);
const c = y.useRef(!!(n[qP] && !window.HandoffComplete));
return Xv(()=>{
u && (Zv.render(u.render),
c.current && u.animationState && u.animationState.animateChanges())
}
),
y.useEffect(()=>{
u && (u.updateFeatures(),
!c.current && u.animationState && u.animationState.animateChanges(),
c.current && (c.current = !1,
window.HandoffComplete = !0))
}
),
u
}
function wo(e) {
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current")
}
function p$(e, t, n) {
return y.useCallback(r=>{
r && e.mount && e.mount(r),
t && (r ? t.mount(r) : t.unmount()),
n && (typeof n == "function" ? n(r) : wo(n) && (n.current = r))
}
, [t])
}
function Kl(e) {
return typeof e == "string" || Array.isArray(e)
}
function $f(e) {
return e !== null && typeof e == "object" && typeof e.start == "function"
}
const ey = ["animate", "whileInView", "whileFocus", "whileHover", "whileTap", "whileDrag", "exit"]
, ty = ["initial", ...ey];
function If(e) {
return $f(e.animate) || ty.some(t=>Kl(e[t]))
}
function YP(e) {
return !!(If(e) || e.variants)
}
function m$(e, t) {
if (If(e)) {
const {initial: n, animate: r} = e;
return {
initial: n === !1 || Kl(n) ? n : void 0,
animate: Kl(r) ? r : void 0
}
}
return e.inherit !== !1 ? t : {}
}
function g$(e) {
const {initial: t, animate: n} = m$(e, y.useContext(Mf));
return y.useMemo(()=>({
initial: t,
animate: n
}), [Sw(t), Sw(n)])
}
function Sw(e) {
return Array.isArray(e) ? e.join(" ") : e
}
const Ew = {
animation: ["animate", "variants", "whileHover", "whileTap", "exit", "whileInView", "whileFocus", "whileDrag"],
exit: ["exit"],
drag: ["drag", "dragControls"],
focus: ["whileFocus"],
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
layout: ["layout", "layoutId"]
}
, ql = {};
for (const e in Ew)
ql[e] = {
isEnabled: t=>Ew[e].some(n=>!!t[n])
};
function v$(e) {
for (const t in e)
ql[t] = {
...ql[t],
...e[t]
}
}
const ny = y.createContext({})
, XP = y.createContext({})
, y$ = Symbol.for("motionComponentSymbol");
function w$({preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component: i}) {
e && v$(e);
function s(a, l) {
let u;
const c = {
...y.useContext(Qv),
...a,
layoutId: x$(a)
}
, {isStatic: d} = c
, f = g$(a)
, h = r(a, d);
if (!d && Yv) {
f.visualElement = h$(i, h, c, t);
const m = y.useContext(XP)
, p = y.useContext(KP).strict;
f.visualElement && (u = f.visualElement.loadFeatures(c, p, e, m))
}
return x.jsxs(Mf.Provider, {
value: f,
children: [u && f.visualElement ? x.jsx(u, {
visualElement: f.visualElement,
...c
}) : null, n(i, a, p$(h, f.visualElement, l), h, d, f.visualElement)]
})
}
const o = y.forwardRef(s);
return o[y$] = i,
o
}
function x$({layoutId: e}) {
const t = y.useContext(ny).id;
return t && e !== void 0 ? t + "-" + e : e
}
function b$(e) {
function t(r, i={}) {
return w$(e(r, i))
}
if (typeof Proxy > "u")
return t;
const n = new Map;
return new Proxy(t,{
get: (r,i)=>(n.has(i) || n.set(i, t(i)),
n.get(i))
})
}
const S$ = ["animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "switch", "symbol", "svg", "text", "tspan", "use", "view"];
function ry(e) {
return typeof e != "string" || e.includes("-") ? !1 : !!(S$.indexOf(e) > -1 || /[A-Z]/u.test(e))
}
const Ld = {};
function E$(e) {
Object.assign(Ld, e)
}
const _u = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"]
, Hs = new Set(_u);
function JP(e, {layout: t, layoutId: n}) {
return Hs.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Ld[e] || e === "opacity")
}
const sn = e=>!!(e && e.getVelocity)
, C$ = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective"
}
, P$ = _u.length;
function T$(e, {enableHardwareAcceleration: t=!0, allowTransformNone: n=!0}, r, i) {
let s = "";
for (let o = 0; o < P$; o++) {
const a = _u[o];
if (e[a] !== void 0) {
const l = C$[a] || a;
s += `${l}(${e[a]}) `
}
}
return t && !e.z && (s += "translateZ(0)"),
s = s.trim(),
i ? s = i(e, r ? "" : s) : n && r && (s = "none"),
s
}
const ZP = e=>t=>typeof t == "string" && t.startsWith(e)
, e2 = ZP("--")
, R$ = ZP("var(--")
, iy = e=>R$(e) ? O$.test(e.split("/*")[0].trim()) : !1
, O$ = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu
, k$ = (e,t)=>t && typeof e == "number" ? t.transform(e) : e
, zi = (e,t,n)=>n > t ? t : n < e ? e : n
, xa = {
test: e=>typeof e == "number",
parse: parseFloat,
transform: e=>e
}
, dl = {
...xa,
transform: e=>zi(0, 1, e)
}
, gc = {
...xa,
default: 1
}
, fl = e=>Math.round(e * 1e5) / 1e5
, sy = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu
, _$ = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu
, A$ = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
function Au(e) {
return typeof e == "string"
}
const Du = e=>({
test: t=>Au(t) && t.endsWith(e) && t.split(" ").length === 1,
parse: parseFloat,
transform: t=>`${t}${e}`
})
, ci = Du("deg")
, _r = Du("%")
, Oe = Du("px")
, D$ = Du("vh")
, L$ = Du("vw")
, Cw = {
..._r,
parse: e=>_r.parse(e) / 100,
transform: e=>_r.transform(e * 100)
}
, Pw = {
...xa,
transform: Math.round
}
, t2 = {
borderWidth: Oe,
borderTopWidth: Oe,
borderRightWidth: Oe,
borderBottomWidth: Oe,
borderLeftWidth: Oe,
borderRadius: Oe,
radius: Oe,
borderTopLeftRadius: Oe,
borderTopRightRadius: Oe,
borderBottomRightRadius: Oe,
borderBottomLeftRadius: Oe,
width: Oe,
maxWidth: Oe,
height: Oe,
maxHeight: Oe,
size: Oe,
top: Oe,
right: Oe,
bottom: Oe,
left: Oe,
padding: Oe,
paddingTop: Oe,
paddingRight: Oe,
paddingBottom: Oe,
paddingLeft: Oe,
margin: Oe,
marginTop: Oe,
marginRight: Oe,
marginBottom: Oe,
marginLeft: Oe,
rotate: ci,
rotateX: ci,
rotateY: ci,
rotateZ: ci,
scale: gc,
scaleX: gc,
scaleY: gc,
scaleZ: gc,
skew: ci,
skewX: ci,
skewY: ci,
distance: Oe,
translateX: Oe,
translateY: Oe,
translateZ: Oe,
x: Oe,
y: Oe,
z: Oe,
perspective: Oe,
transformPerspective: Oe,
opacity: dl,
originX: Cw,
originY: Cw,
originZ: Oe,
zIndex: Pw,
backgroundPositionX: Oe,
backgroundPositionY: Oe,
fillOpacity: dl,
strokeOpacity: dl,
numOctaves: Pw
};
function oy(e, t, n, r) {
const {style: i, vars: s, transform: o, transformOrigin: a} = e;
let l = !1
, u = !1
, c = !0;
for (const d in t) {
const f = t[d];
if (e2(d)) {
s[d] = f;
continue
}
const h = t2[d]
, m = k$(f, h);
if (Hs.has(d)) {
if (l = !0,
o[d] = m,
!c)
continue;
f !== (h.default || 0) && (c = !1)
} else
d.startsWith("origin") ? (u = !0,
a[d] = m) : i[d] = m
}
if (t.transform || (l || r ? i.transform = T$(e.transform, n, c, r) : i.transform && (i.transform = "none")),
u) {
const {originX: d="50%", originY: f="50%", originZ: h=0} = a;
i.transformOrigin = `${d} ${f} ${h}`
}
}
const ay = ()=>({
style: {},
transform: {},
transformOrigin: {},
vars: {}
});
function n2(e, t, n) {
for (const r in t)
!sn(t[r]) && !JP(r, n) && (e[r] = t[r])
}
function N$({transformTemplate: e}, t, n) {
return y.useMemo(()=>{
const r = ay();
return oy(r, t, {
enableHardwareAcceleration: !n
}, e),
Object.assign({}, r.vars, r.style)
}
, [t])
}
function M$(e, t, n) {
const r = e.style || {}
, i = {};
return n2(i, r, e),
Object.assign(i, N$(e, t, n)),
i
}
function j$(e, t, n) {
const r = {}
, i = M$(e, t, n);
return e.drag && e.dragListener !== !1 && (r.draggable = !1,
i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none",
i.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`),
e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (r.tabIndex = 0),
r.style = i,
r
}
const $$ = new Set(["animate", "exit", "variants", "initial", "style", "values", "variants", "transition", "transformTemplate", "custom", "inherit", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "_dragX", "_dragY", "onHoverStart", "onHoverEnd", "onViewportEnter", "onViewportLeave", "globalTapTarget", "ignoreStrict", "viewport"]);
function Nd(e) {
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || $$.has(e)
}
let r2 = e=>!Nd(e);
function I$(e) {
e && (r2 = t=>t.startsWith("on") ? !Nd(t) : e(t))
}
try {
I$(require("@emotion/is-prop-valid").default)
} catch {}
function F$(e, t, n) {
const r = {};
for (const i in e)
i === "values" && typeof e.values == "object" || (r2(i) || n === !0 && Nd(i) || !t && !Nd(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]);
return r
}
function Tw(e, t, n) {
return typeof e == "string" ? e : Oe.transform(t + n * e)
}
function V$(e, t, n) {
const r = Tw(t, e.x, e.width)
, i = Tw(n, e.y, e.height);
return `${r} ${i}`
}
const z$ = {
offset: "stroke-dashoffset",
array: "stroke-dasharray"
}
, U$ = {
offset: "strokeDashoffset",
array: "strokeDasharray"
};
function B$(e, t, n=1, r=0, i=!0) {
e.pathLength = 1;
const s = i ? z$ : U$;
e[s.offset] = Oe.transform(-r);
const o = Oe.transform(t)
, a = Oe.transform(n);
e[s.array] = `${o} ${a}`
}
function ly(e, {attrX: t, attrY: n, attrScale: r, originX: i, originY: s, pathLength: o, pathSpacing: a=1, pathOffset: l=0, ...u}, c, d, f) {
if (oy(e, u, c, f),
d) {
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
return
}
e.attrs = e.style,
e.style = {};
const {attrs: h, style: m, dimensions: p} = e;
h.transform && (p && (m.transform = h.transform),
delete h.transform),
p && (i !== void 0 || s !== void 0 || m.transform) && (m.transformOrigin = V$(p, i !== void 0 ? i : .5, s !== void 0 ? s : .5)),
t !== void 0 && (h.x = t),
n !== void 0 && (h.y = n),
r !== void 0 && (h.scale = r),
o !== void 0 && B$(h, o, a, l, !1)
}
const i2 = ()=>({
...ay(),
attrs: {}
})
, uy = e=>typeof e == "string" && e.toLowerCase() === "svg";
function H$(e, t, n, r) {
const i = y.useMemo(()=>{
const s = i2();
return ly(s, t, {
enableHardwareAcceleration: !1
}, uy(r), e.transformTemplate),
{
...s.attrs,
style: {
...s.style
}
}
}
, [t]);
if (e.style) {
const s = {};
n2(s, e.style, e),
i.style = {
...s,
...i.style
}
}
return i
}
function W$(e=!1) {
return (n,r,i,{latestValues: s},o)=>{
const l = (ry(n) ? H$ : j$)(r, s, o, n)
, u = F$(r, typeof n == "string", e)
, c = n !== y.Fragment ? {
...u,
...l,
ref: i
} : {}
, {children: d} = r
, f = y.useMemo(()=>sn(d) ? d.get() : d, [d]);
return y.createElement(n, {
...c,
children: f
})
}
}
function s2(e, {style: t, vars: n}, r, i) {
Object.assign(e.style, t, i && i.getProjectionStyles(r));
for (const s in n)
e.style.setProperty(s, n[s])
}
const o2 = new Set(["baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength", "startOffset", "textLength", "lengthAdjust"]);
function a2(e, t, n, r) {
s2(e, t, void 0, r);
for (const i in t.attrs)
e.setAttribute(o2.has(i) ? i : Jv(i), t.attrs[i])
}
function cy(e, t, n) {
var r;
const {style: i} = e
, s = {};
for (const o in i)
(sn(i[o]) || t.style && sn(t.style[o]) || JP(o, e) || ((r = n == null ? void 0 : n.getValue(o)) === null || r === void 0 ? void 0 : r.liveStyle) !== void 0) && (s[o] = i[o]);
return s
}
function l2(e, t, n) {
const r = cy(e, t, n);
for (const i in e)
if (sn(e[i]) || sn(t[i])) {
const s = _u.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
r[s] = e[i]
}
return r
}
function Rw(e) {
const t = [{}, {}];
return e == null || e.values.forEach((n,r)=>{
t[0][r] = n.get(),
t[1][r] = n.getVelocity()
}
),
t
}
function dy(e, t, n, r) {
if (typeof t == "function") {
const [i,s] = Rw(r);
t = t(n !== void 0 ? n : e.custom, i, s)
}
if (typeof t == "string" && (t = e.variants && e.variants[t]),
typeof t == "function") {
const [i,s] = Rw(r);
t = t(n !== void 0 ? n : e.custom, i, s)
}
return t
}
function u2(e) {
const t = y.useRef(null);
return t.current === null && (t.current = e()),
t.current
}
const Qm = e=>Array.isArray(e)
, G$ = e=>!!(e && typeof e == "object" && e.mix && e.toValue)
, K$ = e=>Qm(e) ? e[e.length - 1] || 0 : e;
function zc(e) {
const t = sn(e) ? e.get() : e;
return G$(t) ? t.toValue() : t
}
function q$({scrapeMotionValuesFromProps: e, createRenderState: t, onMount: n}, r, i, s) {
const o = {
latestValues: Q$(r, i, s, e),
renderState: t()
};
return n && (o.mount = a=>n(r, a, o)),
o
}
const c2 = e=>(t,n)=>{
const r = y.useContext(Mf)
, i = y.useContext(jf)
, s = ()=>q$(e, t, r, i);
return n ? s() : u2(s)
}
;
function Q$(e, t, n, r) {
const i = {}
, s = r(e, {});
for (const f in s)
i[f] = zc(s[f]);
let {initial: o, animate: a} = e;
const l = If(e)
, u = YP(e);
t && u && !l && e.inherit !== !1 && (o === void 0 && (o = t.initial),
a === void 0 && (a = t.animate));
let c = n ? n.initial === !1 : !1;
c = c || o === !1;
const d = c ? a : o;
return d && typeof d != "boolean" && !$f(d) && (Array.isArray(d) ? d : [d]).forEach(h=>{
const m = dy(e, h);
if (!m)
return;
const {transitionEnd: p, transition: b, ...v} = m;
for (const g in v) {
let w = v[g];
if (Array.isArray(w)) {
const E = c ? w.length - 1 : 0;
w = w[E]
}
w !== null && (i[g] = w)
}
for (const g in p)
i[g] = p[g]
}
),
i
}
const on = e=>e
, {schedule: Xe, cancel: ei, state: Kt, steps: Hh} = QP(typeof requestAnimationFrame < "u" ? requestAnimationFrame : on, !0)
, Y$ = {
useVisualState: c2({
scrapeMotionValuesFromProps: l2,
createRenderState: i2,
onMount: (e,t,{renderState: n, latestValues: r})=>{
Xe.read(()=>{
try {
n.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect()
} catch {
n.dimensions = {
x: 0,
y: 0,
width: 0,
height: 0
}
}
}
),
Xe.render(()=>{
ly(n, r, {
enableHardwareAcceleration: !1
}, uy(t.tagName), e.transformTemplate),
a2(t, n)
}
)
}
})
}
, X$ = {
useVisualState: c2({
scrapeMotionValuesFromProps: cy,
createRenderState: ay
})
};
function J$(e, {forwardMotionProps: t=!1}, n, r) {
return {
...ry(e) ? Y$ : X$,
preloadedFeatures: n,
useRender: W$(t),
createVisualElement: r,
Component: e
}
}
function Vr(e, t, n, r={
passive: !0
}) {
return e.addEventListener(t, n, r),
()=>e.removeEventListener(t, n)
}
const d2 = e=>e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1;
function Ff(e, t="page") {
return {
point: {
x: e[`${t}X`],
y: e[`${t}Y`]
}
}
}
const Z$ = e=>t=>d2(t) && e(t, Ff(t));
function Wr(e, t, n, r) {
return Vr(e, t, Z$(n), r)
}
const eI = (e,t)=>n=>t(e(n))
, Gr = (...e)=>e.reduce(eI);
function f2(e) {
let t = null;
return ()=>{
const n = ()=>{
t = null
}
;
return t === null ? (t = e,
n) : !1
}
}
const Ow = f2("dragHorizontal")
, kw = f2("dragVertical");
function h2(e) {
let t = !1;
if (e === "y")
t = kw();
else if (e === "x")
t = Ow();
else {
const n = Ow()
, r = kw();
n && r ? t = ()=>{
n(),
r()
}
: (n && n(),
r && r())
}
return t
}
function p2() {
const e = h2(!0);
return e ? (e(),
!1) : !0
}
class Xi {
constructor(t) {
this.isMounted = !1,
this.node = t
}
update() {}
}
function _w(e, t) {
const n = t ? "pointerenter" : "pointerleave"
, r = t ? "onHoverStart" : "onHoverEnd"
, i = (s,o)=>{
if (s.pointerType === "touch" || p2())
return;
const a = e.getProps();
e.animationState && a.whileHover && e.animationState.setActive("whileHover", t);
const l = a[r];
l && Xe.postRender(()=>l(s, o))
}
;
return Wr(e.current, n, i, {
passive: !e.getProps()[r]
})
}
class tI extends Xi {
mount() {
this.unmount = Gr(_w(this.node, !0), _w(this.node, !1))
}
unmount() {}
}
class nI extends Xi {
constructor() {
super(...arguments),
this.isActive = !1
}
onFocus() {
let t = !1;
try {
t = this.node.current.matches(":focus-visible")
} catch {
t = !0
}
!t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0),
this.isActive = !0)
}
onBlur() {
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1),
this.isActive = !1)
}
mount() {
this.unmount = Gr(Vr(this.node.current, "focus", ()=>this.onFocus()), Vr(this.node.current, "blur", ()=>this.onBlur()))
}
unmount() {}
}
const m2 = (e,t)=>t ? e === t ? !0 : m2(e, t.parentElement) : !1;
function Wh(e, t) {
if (!t)
return;
const n = new PointerEvent("pointer" + e);
t(n, Ff(n))
}
class rI extends Xi {
constructor() {
super(...arguments),
this.removeStartListeners = on,
this.removeEndListeners = on,
this.removeAccessibleListeners = on,
this.startPointerPress = (t,n)=>{
if (this.isPressing)
return;
this.removeEndListeners();
const r = this.node.getProps()
, s = Wr(window, "pointerup", (a,l)=>{
if (!this.checkPressEnd())
return;
const {onTap: u, onTapCancel: c, globalTapTarget: d} = this.node.getProps()
, f = !d && !m2(this.node.current, a.target) ? c : u;
f && Xe.update(()=>f(a, l))
}
, {
passive: !(r.onTap || r.onPointerUp)
})
, o = Wr(window, "pointercancel", (a,l)=>this.cancelPress(a, l), {
passive: !(r.onTapCancel || r.onPointerCancel)
});
this.removeEndListeners = Gr(s, o),
this.startPress(t, n)
}
,
this.startAccessiblePress = ()=>{
const t = s=>{
if (s.key !== "Enter" || this.isPressing)
return;
const o = a=>{
a.key !== "Enter" || !this.checkPressEnd() || Wh("up", (l,u)=>{
const {onTap: c} = this.node.getProps();
c && Xe.postRender(()=>c(l, u))
}
)
}
;
this.removeEndListeners(),
this.removeEndListeners = Vr(this.node.current, "keyup", o),
Wh("down", (a,l)=>{
this.startPress(a, l)
}
)
}
, n = Vr(this.node.current, "keydown", t)
, r = ()=>{
this.isPressing && Wh("cancel", (s,o)=>this.cancelPress(s, o))
}
, i = Vr(this.node.current, "blur", r);
this.removeAccessibleListeners = Gr(n, i)
}
}
startPress(t, n) {
this.isPressing = !0;
const {onTapStart: r, whileTap: i} = this.node.getProps();
i && this.node.animationState && this.node.animationState.setActive("whileTap", !0),
r && Xe.postRender(()=>r(t, n))
}
checkPressEnd() {
return this.removeEndListeners(),
this.isPressing = !1,
this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1),
!p2()
}
cancelPress(t, n) {
if (!this.checkPressEnd())
return;
const {onTapCancel: r} = this.node.getProps();
r && Xe.postRender(()=>r(t, n))
}
mount() {
const t = this.node.getProps()
, n = Wr(t.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, {
passive: !(t.onTapStart || t.onPointerStart)
})
, r = Vr(this.node.current, "focus", this.startAccessiblePress);
this.removeStartListeners = Gr(n, r)
}
unmount() {
this.removeStartListeners(),
this.removeEndListeners(),
this.removeAccessibleListeners()
}
}
const Ym = new WeakMap
, Gh = new WeakMap
, iI = e=>{
const t = Ym.get(e.target);
t && t(e)
}
, sI = e=>{
e.forEach(iI)
}
;
function oI({root: e, ...t}) {
const n = e || document;
Gh.has(n) || Gh.set(n, {});
const r = Gh.get(n)
, i = JSON.stringify(t);
return r[i] || (r[i] = new IntersectionObserver(sI,{
root: e,
...t
})),
r[i]
}
function aI(e, t, n) {
const r = oI(t);
return Ym.set(e, n),
r.observe(e),
()=>{
Ym.delete(e),
r.unobserve(e)
}
}
const lI = {
some: 0,
all: 1
};
class uI extends Xi {
constructor() {
super(...arguments),
this.hasEnteredView = !1,
this.isInView = !1
}
startObserver() {
this.unmount();
const {viewport: t={}} = this.node.getProps()
, {root: n, margin: r, amount: i="some", once: s} = t
, o = {
root: n ? n.current : void 0,
rootMargin: r,
threshold: typeof i == "number" ? i : lI[i]
}
, a = l=>{
const {isIntersecting: u} = l;
if (this.isInView === u || (this.isInView = u,
s && !u && this.hasEnteredView))
return;
u && (this.hasEnteredView = !0),
this.node.animationState && this.node.animationState.setActive("whileInView", u);
const {onViewportEnter: c, onViewportLeave: d} = this.node.getProps()
, f = u ? c : d;
f && f(l)
}
;
return aI(this.node.current, o, a)
}
mount() {
this.startObserver()
}
update() {
if (typeof IntersectionObserver > "u")
return;
const {props: t, prevProps: n} = this.node;
["amount", "margin", "root"].some(cI(t, n)) && this.startObserver()
}
unmount() {}
}
function cI({viewport: e={}}, {viewport: t={}}={}) {
return n=>e[n] !== t[n]
}
const dI = {
inView: {
Feature: uI
},
tap: {
Feature: rI
},
focus: {
Feature: nI
},
hover: {
Feature: tI
}
};
function g2(e, t) {
if (!Array.isArray(t))
return !1;
const n = t.length;
if (n !== e.length)
return !1;
for (let r = 0; r < n; r++)
if (t[r] !== e[r])
return !1;
return !0
}
function Vf(e, t, n) {
const r = e.getProps();
return dy(r, t, n !== void 0 ? n : r.custom, e)
}
const Mi = e=>e * 1e3
, Kr = e=>e / 1e3
, fI = {
type: "spring",
stiffness: 500,
damping: 25,
restSpeed: 10
}
, hI = e=>({
type: "spring",
stiffness: 550,
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
restSpeed: 10
})
, pI = {
type: "keyframes",
duration: .8
}
, mI = {
type: "keyframes",
ease: [.25, .1, .35, 1],
duration: .3
}
, gI = (e,{keyframes: t})=>t.length > 2 ? pI : Hs.has(e) ? e.startsWith("scale") ? hI(t[1]) : fI : mI;
function vI({when: e, delay: t, delayChildren: n, staggerChildren: r, staggerDirection: i, repeat: s, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c}) {
return !!Object.keys(c).length
}
function fy(e, t) {
return e[t] || e.default || e
}
const yI = e=>e !== null;
function zf(e, {repeat: t, repeatType: n="loop"}, r) {
const i = e.filter(yI)
, s = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
return !s || r === void 0 ? i[s] : r
}
let Uc;
function wI() {
Uc = void 0
}
const ji = {
now: ()=>(Uc === void 0 && ji.set(Kt.isProcessing || c$.useManualTiming ? Kt.timestamp : performance.now()),
Uc),
set: e=>{
Uc = e,
queueMicrotask(wI)
}
}
, v2 = e=>/^0[^.\s]+$/u.test(e);
function xI(e) {
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || v2(e) : !0
}
let Xm = on;
const y2 = e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)
, bI = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
function SI(e) {
const t = bI.exec(e);
if (!t)
return [, ];
const [,n,r,i] = t;
return [`--${n ?? r}`, i]
}
function w2(e, t, n=1) {
const [r,i] = SI(e);
if (!r)
return;
const s = window.getComputedStyle(t).getPropertyValue(r);
if (s) {
const o = s.trim();
return y2(o) ? parseFloat(o) : o
}
return iy(i) ? w2(i, t, n + 1) : i
}
const EI = new Set(["width", "height", "top", "left", "right", "bottom", "x", "y", "translateX", "translateY"])
, Aw = e=>e === xa || e === Oe
, Dw = (e,t)=>parseFloat(e.split(", ")[t])
, Lw = (e,t)=>(n,{transform: r})=>{
if (r === "none" || !r)
return 0;
const i = r.match(/^matrix3d\((.+)\)$/u);
if (i)
return Dw(i[1], t);
{
const s = r.match(/^matrix\((.+)\)$/u);
return s ? Dw(s[1], e) : 0
}
}
, CI = new Set(["x", "y", "z"])
, PI = _u.filter(e=>!CI.has(e));
function TI(e) {
const t = [];
return PI.forEach(n=>{
const r = e.getValue(n);
r !== void 0 && (t.push([n, r.get()]),
r.set(n.startsWith("scale") ? 1 : 0))
}
),
t
}
const oa = {
width: ({x: e},{paddingLeft: t="0", paddingRight: n="0"})=>e.max - e.min - parseFloat(t) - parseFloat(n),
height: ({y: e},{paddingTop: t="0", paddingBottom: n="0"})=>e.max - e.min - parseFloat(t) - parseFloat(n),
top: (e,{top: t})=>parseFloat(t),
left: (e,{left: t})=>parseFloat(t),
bottom: ({y: e},{top: t})=>parseFloat(t) + (e.max - e.min),
right: ({x: e},{left: t})=>parseFloat(t) + (e.max - e.min),
x: Lw(4, 13),
y: Lw(5, 14)
};
oa.translateX = oa.x;
oa.translateY = oa.y;
const x2 = e=>t=>t.test(e)
, RI = {
test: e=>e === "auto",
parse: e=>e
}
, b2 = [xa, Oe, _r, ci, L$, D$, RI]
, Nw = e=>b2.find(x2(e))
, Ps = new Set;
let Jm = !1
, Zm = !1;
function S2() {
if (Zm) {
const e = Array.from(Ps).filter(r=>r.needsMeasurement)
, t = new Set(e.map(r=>r.element))
, n = new Map;
t.forEach(r=>{
const i = TI(r);
i.length && (n.set(r, i),
r.render())
}
),
e.forEach(r=>r.measureInitialState()),
t.forEach(r=>{
r.render();
const i = n.get(r);
i && i.forEach(([s,o])=>{
var a;
(a = r.getValue(s)) === null || a === void 0 || a.set(o)
}
)
}
),
e.forEach(r=>r.measureEndState()),
e.forEach(r=>{
r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY)
}
)
}
Zm = !1,
Jm = !1,
Ps.forEach(e=>e.complete()),
Ps.clear()
}
function E2() {
Ps.forEach(e=>{
e.readKeyframes(),
e.needsMeasurement && (Zm = !0)
}
)
}
function OI() {
E2(),
S2()
}
class hy {
constructor(t, n, r, i, s, o=!1) {
this.isComplete = !1,
this.isAsync = !1,
this.needsMeasurement = !1,
this.isScheduled = !1,
this.unresolvedKeyframes = [...t],
this.onComplete = n,
this.name = r,
this.motionValue = i,
this.element = s,
this.isAsync = o
}
scheduleResolve() {
this.isScheduled = !0,
this.isAsync ? (Ps.add(this),
Jm || (Jm = !0,
Xe.read(E2),
Xe.resolveKeyframes(S2))) : (this.readKeyframes(),
this.complete())
}
readKeyframes() {
const {unresolvedKeyframes: t, name: n, element: r, motionValue: i} = this;
for (let s = 0; s < t.length; s++)
if (t[s] === null)
if (s === 0) {
const o = i == null ? void 0 : i.get()
, a = t[t.length - 1];
if (o !== void 0)
t[0] = o;
else if (r && n) {
const l = r.readValue(n, a);
l != null && (t[0] = l)
}
t[0] === void 0 && (t[0] = a),
i && o === void 0 && i.set(t[0])
} else
t[s] = t[s - 1]
}
setFinalKeyframe() {}
measureInitialState() {}
renderEndStyles() {}
measureEndState() {}
complete() {
this.isComplete = !0,
this.onComplete(this.unresolvedKeyframes, this.finalKeyframe),
Ps.delete(this)
}
cancel() {
this.isComplete || (this.isScheduled = !1,
Ps.delete(this))
}
resume() {
this.isComplete || this.scheduleResolve()
}
}
const py = (e,t)=>n=>!!(Au(n) && A$.test(n) && n.startsWith(e) || t && Object.prototype.hasOwnProperty.call(n, t))
, C2 = (e,t,n)=>r=>{
if (!Au(r))
return r;
const [i,s,o,a] = r.match(sy);
return {
[e]: parseFloat(i),
[t]: parseFloat(s),
[n]: parseFloat(o),
alpha: a !== void 0 ? parseFloat(a) : 1
}
}
, kI = e=>zi(0, 255, e)
, Kh = {
...xa,
transform: e=>Math.round(kI(e))
}
, hs = {
test: py("rgb", "red"),
parse: C2("red", "green", "blue"),
transform: ({red: e, green: t, blue: n, alpha: r=1})=>"rgba(" + Kh.transform(e) + ", " + Kh.transform(t) + ", " + Kh.transform(n) + ", " + fl(dl.transform(r)) + ")"
};
function _I(e) {
let t = ""
, n = ""
, r = ""
, i = "";
return e.length > 5 ? (t = e.substring(1, 3),
n = e.substring(3, 5),
r = e.substring(5, 7),
i = e.substring(7, 9)) : (t = e.substring(1, 2),
n = e.substring(2, 3),
r = e.substring(3, 4),
i = e.substring(4, 5),
t += t,
n += n,
r += r,
i += i),
{
red: parseInt(t, 16),
green: parseInt(n, 16),
blue: parseInt(r, 16),
alpha: i ? parseInt(i, 16) / 255 : 1
}
}
const eg = {
test: py("#"),
parse: _I,
transform: hs.transform
}
, xo = {
test: py("hsl", "hue"),
parse: C2("hue", "saturation", "lightness"),
transform: ({hue: e, saturation: t, lightness: n, alpha: r=1})=>"hsla(" + Math.round(e) + ", " + _r.transform(fl(t)) + ", " + _r.transform(fl(n)) + ", " + fl(dl.transform(r)) + ")"
}
, nn = {
test: e=>hs.test(e) || eg.test(e) || xo.test(e),
parse: e=>hs.test(e) ? hs.parse(e) : xo.test(e) ? xo.parse(e) : eg.parse(e),
transform: e=>Au(e) ? e : e.hasOwnProperty("red") ? hs.transform(e) : xo.transform(e)
};
function AI(e) {
var t, n;
return isNaN(e) && Au(e) && (((t = e.match(sy)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(_$)) === null || n === void 0 ? void 0 : n.length) || 0) > 0
}
const P2 = "number"
, T2 = "color"
, DI = "var"
, LI = "var("
, Mw = "${}"
, NI = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
function Ql(e) {
const t = e.toString()
, n = []
, r = {
color: [],
number: [],
var: []
}
, i = [];
let s = 0;
const a = t.replace(NI, l=>(nn.test(l) ? (r.color.push(s),
i.push(T2),
n.push(nn.parse(l))) : l.startsWith(LI) ? (r.var.push(s),
i.push(DI),
n.push(l)) : (r.number.push(s),
i.push(P2),
n.push(parseFloat(l))),
++s,
Mw)).split(Mw);
return {
values: n,
split: a,
indexes: r,
types: i
}
}
function R2(e) {
return Ql(e).values
}
function O2(e) {
const {split: t, types: n} = Ql(e)
, r = t.length;
return i=>{
let s = "";
for (let o = 0; o < r; o++)
if (s += t[o],
i[o] !== void 0) {
const a = n[o];
a === P2 ? s += fl(i[o]) : a === T2 ? s += nn.transform(i[o]) : s += i[o]
}
return s
}
}
const MI = e=>typeof e == "number" ? 0 : e;
function jI(e) {
const t = R2(e);
return O2(e)(t.map(MI))
}
const Ui = {
test: AI,
parse: R2,
createTransformer: O2,
getAnimatableNone: jI
}
, $I = new Set(["brightness", "contrast", "saturate", "opacity"]);
function II(e) {
const [t,n] = e.slice(0, -1).split("(");
if (t === "drop-shadow")
return e;
const [r] = n.match(sy) || [];
if (!r)
return e;
const i = n.replace(r, "");
let s = $I.has(t) ? 1 : 0;
return r !== n && (s *= 100),
t + "(" + s + i + ")"
}
const FI = /\b([a-z-]*)\(.*?\)/gu
, tg = {
...Ui,
getAnimatableNone: e=>{
const t = e.match(FI);
return t ? t.map(II).join(" ") : e
}
}
, VI = {
...t2,
color: nn,
backgroundColor: nn,
outlineColor: nn,
fill: nn,
stroke: nn,
borderColor: nn,
borderTopColor: nn,
borderRightColor: nn,
borderBottomColor: nn,
borderLeftColor: nn,
filter: tg,
WebkitFilter: tg
}
, my = e=>VI[e];
function k2(e, t) {
let n = my(e);
return n !== tg && (n = Ui),
n.getAnimatableNone ? n.getAnimatableNone(t) : void 0
}
const zI = new Set(["auto", "none", "0"]);
function UI(e, t, n) {
let r = 0, i;
for (; r < e.length && !i; ) {
const s = e[r];
typeof s == "string" && !zI.has(s) && Ql(s).values.length && (i = e[r]),
r++
}
if (i && n)
for (const s of t)
e[s] = k2(n, i)
}
class _2 extends hy {
constructor(t, n, r, i) {
super(t, n, r, i, i == null ? void 0 : i.owner, !0)
}
readKeyframes() {
const {unresolvedKeyframes: t, element: n, name: r} = this;
if (!n.current)
return;
super.readKeyframes();
for (let l = 0; l < t.length; l++) {
let u = t[l];
if (typeof u == "string" && (u = u.trim(),
iy(u))) {
const c = w2(u, n.current);
c !== void 0 && (t[l] = c),
l === t.length - 1 && (this.finalKeyframe = u)
}
}
if (this.resolveNoneKeyframes(),
!EI.has(r) || t.length !== 2)
return;
const [i,s] = t
, o = Nw(i)
, a = Nw(s);
if (o !== a)
if (Aw(o) && Aw(a))
for (let l = 0; l < t.length; l++) {
const u = t[l];
typeof u == "string" && (t[l] = parseFloat(u))
}
else
this.needsMeasurement = !0
}
resolveNoneKeyframes() {
const {unresolvedKeyframes: t, name: n} = this
, r = [];
for (let i = 0; i < t.length; i++)
xI(t[i]) && r.push(i);
r.length && UI(t, r, n)
}
measureInitialState() {
const {element: t, unresolvedKeyframes: n, name: r} = this;
if (!t.current)
return;
r === "height" && (this.suspendedScrollY = window.pageYOffset),
this.measuredOrigin = oa[r](t.measureViewportBox(), window.getComputedStyle(t.current)),
n[0] = this.measuredOrigin;
const i = n[n.length - 1];
i !== void 0 && t.getValue(r, i).jump(i, !1)
}
measureEndState() {
var t;
const {element: n, name: r, unresolvedKeyframes: i} = this;
if (!n.current)
return;
const s = n.getValue(r);
s && s.jump(this.measuredOrigin, !1);
const o = i.length - 1
, a = i[o];
i[o] = oa[r](n.measureViewportBox(), window.getComputedStyle(n.current)),
a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a),
!((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([l,u])=>{
n.getValue(l).set(u)
}
),
this.resolveNoneKeyframes()
}
}
function A2(e) {
let t;
return ()=>(t === void 0 && (t = e()),
t)
}
const jw = (e,t)=>t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (Ui.test(e) || e === "0") && !e.startsWith("url("));
function BI(e) {
const t = e[0];
if (e.length === 1)
return !0;
for (let n = 0; n < e.length; n++)
if (e[n] !== t)
return !0
}
function HI(e, t, n, r) {
const i = e[0];
if (i === null)
return !1;
if (t === "display" || t === "visibility")
return !0;
const s = e[e.length - 1]
, o = jw(i, t)
, a = jw(s, t);
return !o || !a ? !1 : BI(e) || n === "spring" && r
}
class D2 {
constructor({autoplay: t=!0, delay: n=0, type: r="keyframes", repeat: i=0, repeatDelay: s=0, repeatType: o="loop", ...a}) {
this.isStopped = !1,
this.hasAttemptedResolve = !1,
this.options = {
autoplay: t,
delay: n,
type: r,
repeat: i,
repeatDelay: s,
repeatType: o,
...a
},
this.updateFinishedPromise()
}
get resolved() {
return !this._resolved && !this.hasAttemptedResolve && OI(),
this._resolved
}
onKeyframesResolved(t, n) {
this.hasAttemptedResolve = !0;
const {name: r, type: i, velocity: s, delay: o, onComplete: a, onUpdate: l, isGenerator: u} = this.options;
if (!u && !HI(t, r, i, s))
if (o)
this.options.duration = 0;
else {
l == null || l(zf(t, this.options, n)),
a == null || a(),
this.resolveFinishedPromise();
return
}
const c = this.initPlayback(t, n);
c !== !1 && (this._resolved = {
keyframes: t,
finalKeyframe: n,
...c
},
this.onPostResolved())
}
onPostResolved() {}
then(t, n) {
return this.currentFinishedPromise.then(t, n)
}
updateFinishedPromise() {
this.currentFinishedPromise = new Promise(t=>{
this.resolveFinishedPromise = t
}
)
}
}
function L2(e, t) {
return t ? e * (1e3 / t) : 0
}
const WI = 5;
function N2(e, t, n) {
const r = Math.max(t - WI, 0);
return L2(n - e(r), t - r)
}
const qh = .001
, GI = .01
, KI = 10
, qI = .05
, QI = 1;
function YI({duration: e=800, bounce: t=.25, velocity: n=0, mass: r=1}) {
let i, s, o = 1 - t;
o = zi(qI, QI, o),
e = zi(GI, KI, Kr(e)),
o < 1 ? (i = u=>{
const c = u * o
, d = c * e
, f = c - n
, h = ng(u, o)
, m = Math.exp(-d);
return qh - f / h * m
}
,
s = u=>{
const d = u * o * e
, f = d * n + n
, h = Math.pow(o, 2) * Math.pow(u, 2) * e
, m = Math.exp(-d)
, p = ng(Math.pow(u, 2), o);
return (-i(u) + qh > 0 ? -1 : 1) * ((f - h) * m) / p
}
) : (i = u=>{
const c = Math.exp(-u * e)
, d = (u - n) * e + 1;
return -qh + c * d
}
,
s = u=>{
const c = Math.exp(-u * e)
, d = (n - u) * (e * e);
return c * d
}
);
const a = 5 / e
, l = JI(i, s, a);
if (e = Mi(e),
isNaN(l))
return {
stiffness: 100,
damping: 10,
duration: e
};
{
const u = Math.pow(l, 2) * r;
return {
stiffness: u,
damping: o * 2 * Math.sqrt(r * u),
duration: e
}
}
}
const XI = 12;
function JI(e, t, n) {
let r = n;
for (let i = 1; i < XI; i++)
r = r - e(r) / t(r);
return r
}
function ng(e, t) {
return e * Math.sqrt(1 - t * t)
}
const ZI = ["duration", "bounce"]
, eF = ["stiffness", "damping", "mass"];
function $w(e, t) {
return t.some(n=>e[n] !== void 0)
}
function tF(e) {
let t = {
velocity: 0,
stiffness: 100,
damping: 10,
mass: 1,
isResolvedFromDuration: !1,
...e
};
if (!$w(e, eF) && $w(e, ZI)) {
const n = YI(e);
t = {
...t,
...n,
mass: 1
},
t.isResolvedFromDuration = !0
}
return t
}
function M2({keyframes: e, restDelta: t, restSpeed: n, ...r}) {
const i = e[0]
, s = e[e.length - 1]
, o = {
done: !1,
value: i
}
, {stiffness: a, damping: l, mass: u, duration: c, velocity: d, isResolvedFromDuration: f} = tF({
...r,
velocity: -Kr(r.velocity || 0)
})
, h = d || 0
, m = l / (2 * Math.sqrt(a * u))
, p = s - i
, b = Kr(Math.sqrt(a / u))
, v = Math.abs(p) < 5;
n || (n = v ? .01 : 2),
t || (t = v ? .005 : .5);
let g;
if (m < 1) {
const w = ng(b, m);
g = E=>{
const D = Math.exp(-m * b * E);
return s - D * ((h + m * b * p) / w * Math.sin(w * E) + p * Math.cos(w * E))
}
} else if (m === 1)
g = w=>s - Math.exp(-b * w) * (p + (h + b * p) * w);
else {
const w = b * Math.sqrt(m * m - 1);
g = E=>{
const D = Math.exp(-m * b * E)
, V = Math.min(w * E, 300);
return s - D * ((h + m * b * p) * Math.sinh(V) + w * p * Math.cosh(V)) / w
}
}
return {
calculatedDuration: f && c || null,
next: w=>{
const E = g(w);
if (f)
o.done = w >= c;
else {
let D = h;
w !== 0 && (m < 1 ? D = N2(g, w, E) : D = 0);
const V = Math.abs(D) <= n
, C = Math.abs(s - E) <= t;
o.done = V && C
}
return o.value = o.done ? s : E,
o
}
}
}
function Iw({keyframes: e, velocity: t=0, power: n=.8, timeConstant: r=325, bounceDamping: i=10, bounceStiffness: s=500, modifyTarget: o, min: a, max: l, restDelta: u=.5, restSpeed: c}) {
const d = e[0]
, f = {
done: !1,
value: d
}
, h = P=>a !== void 0 && P < a || l !== void 0 && P > l
, m = P=>a === void 0 ? l : l === void 0 || Math.abs(a - P) < Math.abs(l - P) ? a : l;
let p = n * t;
const b = d + p
, v = o === void 0 ? b : o(b);
v !== b && (p = v - d);
const g = P=>-p * Math.exp(-P / r)
, w = P=>v + g(P)
, E = P=>{
const A = g(P)
, B = w(P);
f.done = Math.abs(A) <= u,
f.value = f.done ? v : B
}
;
let D, V;
const C = P=>{
h(f.value) && (D = P,
V = M2({
keyframes: [f.value, m(f.value)],
velocity: N2(w, P, f.value),
damping: i,
stiffness: s,
restDelta: u,
restSpeed: c
}))
}
;
return C(0),
{
calculatedDuration: null,
next: P=>{
let A = !1;
return !V && D === void 0 && (A = !0,
E(P),
C(P)),
D !== void 0 && P >= D ? V.next(P - D) : (!A && E(P),
f)
}
}
}
const j2 = (e,t,n)=>(((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e
, nF = 1e-7
, rF = 12;
function iF(e, t, n, r, i) {
let s, o, a = 0;
do
o = t + (n - t) / 2,
s = j2(o, r, i) - e,
s > 0 ? n = o : t = o;
while (Math.abs(s) > nF && ++a < rF);
return o
}
function Lu(e, t, n, r) {
if (e === t && n === r)
return on;
const i = s=>iF(s, 0, 1, e, n);
return s=>s === 0 || s === 1 ? s : j2(i(s), t, r)
}
const sF = Lu(.42, 0, 1, 1)
, oF = Lu(0, 0, .58, 1)
, $2 = Lu(.42, 0, .58, 1)
, aF = e=>Array.isArray(e) && typeof e[0] != "number"
, I2 = e=>t=>t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2
, F2 = e=>t=>1 - e(1 - t)
, gy = e=>1 - Math.sin(Math.acos(e))
, V2 = F2(gy)
, lF = I2(gy)
, z2 = Lu(.33, 1.53, .69, .99)
, vy = F2(z2)
, uF = I2(vy)
, cF = e=>(e *= 2) < 1 ? .5 * vy(e) : .5 * (2 - Math.pow(2, -10 * (e - 1)))
, Fw = {
linear: on,
easeIn: sF,
easeInOut: $2,
easeOut: oF,
circIn: gy,
circInOut: lF,
circOut: V2,
backIn: vy,
backInOut: uF,
backOut: z2,
anticipate: cF
}
, Vw = e=>{
if (Array.isArray(e)) {
Xm(e.length === 4);
const [t,n,r,i] = e;
return Lu(t, n, r, i)
} else if (typeof e == "string")
return Xm(Fw[e] !== void 0),
Fw[e];
return e
}
, Yl = (e,t,n)=>{
const r = t - e;
return r === 0 ? 1 : (n - e) / r
}
, vt = (e,t,n)=>e + (t - e) * n;
function Qh(e, t, n) {
return n < 0 && (n += 1),
n > 1 && (n -= 1),
n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e
}
function dF({hue: e, saturation: t, lightness: n, alpha: r}) {
e /= 360,
t /= 100,
n /= 100;
let i = 0
, s = 0
, o = 0;
if (!t)
i = s = o = n;
else {
const a = n < .5 ? n * (1 + t) : n + t - n * t
, l = 2 * n - a;
i = Qh(l, a, e + 1 / 3),
s = Qh(l, a, e),
o = Qh(l, a, e - 1 / 3)
}
return {
red: Math.round(i * 255),
green: Math.round(s * 255),
blue: Math.round(o * 255),
alpha: r
}
}
function Md(e, t) {
return n=>n > 0 ? t : e
}
const Yh = (e,t,n)=>{
const r = e * e
, i = n * (t * t - r) + r;
return i < 0 ? 0 : Math.sqrt(i)
}
, fF = [eg, hs, xo]
, hF = e=>fF.find(t=>t.test(e));
function zw(e) {
const t = hF(e);
if (!t)
return !1;
let n = t.parse(e);
return t === xo && (n = dF(n)),
n
}
const Uw = (e,t)=>{
const n = zw(e)
, r = zw(t);
if (!n || !r)
return Md(e, t);
const i = {
...n
};
return s=>(i.red = Yh(n.red, r.red, s),
i.green = Yh(n.green, r.green, s),
i.blue = Yh(n.blue, r.blue, s),
i.alpha = vt(n.alpha, r.alpha, s),
hs.transform(i))
}
, rg = new Set(["none", "hidden"]);
function pF(e, t) {
return rg.has(e) ? n=>n <= 0 ? e : t : n=>n >= 1 ? t : e
}
function mF(e, t) {
return n=>vt(e, t, n)
}
function yy(e) {
return typeof e == "number" ? mF : typeof e == "string" ? iy(e) ? Md : nn.test(e) ? Uw : yF : Array.isArray(e) ? U2 : typeof e == "object" ? nn.test(e) ? Uw : gF : Md
}
function U2(e, t) {
const n = [...e]
, r = n.length
, i = e.map((s,o)=>yy(s)(s, t[o]));
return s=>{
for (let o = 0; o < r; o++)
n[o] = i[o](s);
return n
}
}
function gF(e, t) {
const n = {
...e,
...t
}
, r = {};
for (const i in n)
e[i] !== void 0 && t[i] !== void 0 && (r[i] = yy(e[i])(e[i], t[i]));
return i=>{
for (const s in r)
n[s] = r[s](i);
return n
}
}
function vF(e, t) {
var n;
const r = []
, i = {
color: 0,
var: 0,
number: 0
};
for (let s = 0; s < t.values.length; s++) {
const o = t.types[s]
, a = e.indexes[o][i[o]]
, l = (n = e.values[a]) !== null && n !== void 0 ? n : 0;
r[s] = l,
i[o]++
}
return r
}
const yF = (e,t)=>{
const n = Ui.createTransformer(t)
, r = Ql(e)
, i = Ql(t);
return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? rg.has(e) && !i.values.length || rg.has(t) && !r.values.length ? pF(e, t) : Gr(U2(vF(r, i), i.values), n) : Md(e, t)
}
;
function B2(e, t, n) {
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? vt(e, t, n) : yy(e)(e, t)
}
function wF(e, t, n) {
const r = []
, i = n || B2
, s = e.length - 1;
for (let o = 0; o < s; o++) {
let a = i(e[o], e[o + 1]);
if (t) {
const l = Array.isArray(t) ? t[o] || on : t;
a = Gr(l, a)
}
r.push(a)
}
return r
}
function xF(e, t, {clamp: n=!0, ease: r, mixer: i}={}) {
const s = e.length;
if (Xm(s === t.length),
s === 1)
return ()=>t[0];
if (s === 2 && e[0] === e[1])
return ()=>t[1];
e[0] > e[s - 1] && (e = [...e].reverse(),
t = [...t].reverse());
const o = wF(t, r, i)
, a = o.length
, l = u=>{
let c = 0;
if (a > 1)
for (; c < e.length - 2 && !(u < e[c + 1]); c++)
;
const d = Yl(e[c], e[c + 1], u);
return o[c](d)
}
;
return n ? u=>l(zi(e[0], e[s - 1], u)) : l
}
function bF(e, t) {
const n = e[e.length - 1];
for (let r = 1; r <= t; r++) {
const i = Yl(0, t, r);
e.push(vt(n, 1, i))
}
}
function SF(e) {
const t = [0];
return bF(t, e.length - 1),
t
}
function EF(e, t) {
return e.map(n=>n * t)
}
function CF(e, t) {
return e.map(()=>t || $2).splice(0, e.length - 1)
}
function jd({duration: e=300, keyframes: t, times: n, ease: r="easeInOut"}) {
const i = aF(r) ? r.map(Vw) : Vw(r)
, s = {
done: !1,
value: t[0]
}
, o = EF(n && n.length === t.length ? n : SF(t), e)
, a = xF(o, t, {
ease: Array.isArray(i) ? i : CF(t, i)
});
return {
calculatedDuration: e,
next: l=>(s.value = a(l),
s.done = l >= e,
s)
}
}
const Bw = 2e4;
function PF(e) {
let t = 0;
const n = 50;
let r = e.next(t);
for (; !r.done && t < Bw; )
t += n,
r = e.next(t);
return t >= Bw ? 1 / 0 : t
}
const TF = e=>{
const t = ({timestamp: n})=>e(n);
return {
start: ()=>Xe.update(t, !0),
stop: ()=>ei(t),
now: ()=>Kt.isProcessing ? Kt.timestamp : ji.now()
}
}
, RF = {
decay: Iw,
inertia: Iw,
tween: jd,
keyframes: jd,
spring: M2
}
, OF = e=>e / 100;
class wy extends D2 {
constructor({KeyframeResolver: t=hy, ...n}) {
super(n),
this.holdTime = null,
this.startTime = null,
this.cancelTime = null,
this.currentTime = 0,
this.playbackSpeed = 1,
this.pendingPlayState = "running",
this.state = "idle",
this.stop = ()=>{
if (this.resolver.cancel(),
this.isStopped = !0,
this.state === "idle")
return;
this.teardown();
const {onStop: a} = this.options;
a && a()
}
;
const {name: r, motionValue: i, keyframes: s} = this.options
, o = (a,l)=>this.onKeyframesResolved(a, l);
r && i && i.owner ? this.resolver = i.owner.resolveKeyframes(s, o, r, i) : this.resolver = new t(s,o,r,i),
this.resolver.scheduleResolve()
}
initPlayback(t) {
const {type: n="keyframes", repeat: r=0, repeatDelay: i=0, repeatType: s, velocity: o=0} = this.options
, a = RF[n] || jd;
let l, u;
a !== jd && typeof t[0] != "number" && (l = Gr(OF, B2(t[0], t[1])),
t = [0, 100]);
const c = a({
...this.options,
keyframes: t
});
s === "mirror" && (u = a({
...this.options,
keyframes: [...t].reverse(),
velocity: -o
})),
c.calculatedDuration === null && (c.calculatedDuration = PF(c));
const {calculatedDuration: d} = c
, f = d + i
, h = f * (r + 1) - i;
return {
generator: c,
mirroredGenerator: u,
mapPercentToKeyframes: l,
calculatedDuration: d,
resolvedDuration: f,
totalDuration: h
}
}
onPostResolved() {
const {autoplay: t=!0} = this.options;
this.play(),
this.pendingPlayState === "paused" || !t ? this.pause() : this.state = this.pendingPlayState
}
tick(t, n=!1) {
const {resolved: r} = this;
if (!r) {
const {keyframes: P} = this.options;
return {
done: !0,
value: P[P.length - 1]
}
}
const {finalKeyframe: i, generator: s, mirroredGenerator: o, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: u, totalDuration: c, resolvedDuration: d} = r;
if (this.startTime === null)
return s.next(0);
const {delay: f, repeat: h, repeatType: m, repeatDelay: p, onUpdate: b} = this.options;
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - c / this.speed, this.startTime)),
n ? this.currentTime = t : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(t - this.startTime) * this.speed;
const v = this.currentTime - f * (this.speed >= 0 ? 1 : -1)
, g = this.speed >= 0 ? v < 0 : v > c;
this.currentTime = Math.max(v, 0),
this.state === "finished" && this.holdTime === null && (this.currentTime = c);
let w = this.currentTime
, E = s;
if (h) {
const P = Math.min(this.currentTime, c) / d;
let A = Math.floor(P)
, B = P % 1;
!B && P >= 1 && (B = 1),
B === 1 && A--,
A = Math.min(A, h + 1),
!!(A % 2) && (m === "reverse" ? (B = 1 - B,
p && (B -= p / d)) : m === "mirror" && (E = o)),
w = zi(0, 1, B) * d
}
const D = g ? {
done: !1,
value: l[0]
} : E.next(w);
a && (D.value = a(D.value));
let {done: V} = D;
!g && u !== null && (V = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && V);
return C && i !== void 0 && (D.value = zf(l, this.options, i)),
b && b(D.value),
C && this.finish(),
D
}
get duration() {
const {resolved: t} = this;
return t ? Kr(t.calculatedDuration) : 0
}
get time() {
return Kr(this.currentTime)
}
set time(t) {
t = Mi(t),
this.currentTime = t,
this.holdTime !== null || this.speed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.speed)
}
get speed() {
return this.playbackSpeed
}
set speed(t) {
const n = this.playbackSpeed !== t;
this.playbackSpeed = t,
n && (this.time = Kr(this.currentTime))
}
play() {
if (this.resolver.isScheduled || this.resolver.resume(),
!this._resolved) {
this.pendingPlayState = "running";
return
}
if (this.isStopped)
return;
const {driver: t=TF, onPlay: n} = this.options;
this.driver || (this.driver = t(i=>this.tick(i))),
n && n();
const r = this.driver.now();
this.holdTime !== null ? this.startTime = r - this.holdTime : (!this.startTime || this.state === "finished") && (this.startTime = r),
this.state === "finished" && this.updateFinishedPromise(),
this.cancelTime = this.startTime,
this.holdTime = null,
this.state = "running",
this.driver.start()
}
pause() {
var t;
if (!this._resolved) {
this.pendingPlayState = "paused";
return
}
this.state = "paused",
this.holdTime = (t = this.currentTime) !== null && t !== void 0 ? t : 0
}
complete() {
this.state !== "running" && this.play(),
this.pendingPlayState = this.state = "finished",
this.holdTime = null
}
finish() {
this.teardown(),
this.state = "finished";
const {onComplete: t} = this.options;
t && t()
}
cancel() {
this.cancelTime !== null && this.tick(this.cancelTime),
this.teardown(),
this.updateFinishedPromise()
}
teardown() {
this.state = "idle",
this.stopDriver(),
this.resolveFinishedPromise(),
this.updateFinishedPromise(),
this.startTime = this.cancelTime = null,
this.resolver.cancel()
}
stopDriver() {
this.driver && (this.driver.stop(),
this.driver = void 0)
}
sample(t) {
return this.startTime = 0,
this.tick(t, !0)
}
}
const H2 = e=>Array.isArray(e) && typeof e[0] == "number";
function W2(e) {
return !!(!e || typeof e == "string" && e in xy || H2(e) || Array.isArray(e) && e.every(W2))
}
const Qa = ([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`
, xy = {
linear: "linear",
ease: "ease",
easeIn: "ease-in",
easeOut: "ease-out",
easeInOut: "ease-in-out",
circIn: Qa([0, .65, .55, 1]),
circOut: Qa([.55, 0, 1, .45]),
backIn: Qa([.31, .01, .66, -.59]),
backOut: Qa([.33, 1.53, .69, .99])
};
function kF(e) {
return G2(e) || xy.easeOut
}
function G2(e) {
if (e)
return H2(e) ? Qa(e) : Array.isArray(e) ? e.map(kF) : xy[e]
}
function _F(e, t, n, {delay: r=0, duration: i=300, repeat: s=0, repeatType: o="loop", ease: a, times: l}={}) {
const u = {
[t]: n
};
l && (u.offset = l);
const c = G2(a);
return Array.isArray(c) && (u.easing = c),
e.animate(u, {
delay: r,
duration: i,
easing: Array.isArray(c) ? "linear" : c,
fill: "both",
iterations: s + 1,
direction: o === "reverse" ? "alternate" : "normal"
})
}
const AF = A2(()=>Object.hasOwnProperty.call(Element.prototype, "animate"))
, DF = new Set(["opacity", "clipPath", "filter", "transform"])
, $d = 10
, LF = 2e4;
function NF(e) {
return e.type === "spring" || e.name === "backgroundColor" || !W2(e.ease)
}
function MF(e, t) {
const n = new wy({
...t,
keyframes: e,
repeat: 0,
delay: 0,
isGenerator: !0
});
let r = {
done: !1,
value: e[0]
};
const i = [];
let s = 0;
for (; !r.done && s < LF; )
r = n.sample(s),
i.push(r.value),
s += $d;
return {
times: void 0,
keyframes: i,
duration: s - $d,
ease: "linear"
}
}
class Hw extends D2 {
constructor(t) {
super(t);
const {name: n, motionValue: r, keyframes: i} = this.options;
this.resolver = new _2(i,(s,o)=>this.onKeyframesResolved(s, o),n,r),
this.resolver.scheduleResolve()
}
initPlayback(t, n) {
var r;
let {duration: i=300, times: s, ease: o, type: a, motionValue: l, name: u} = this.options;
if (!(!((r = l.owner) === null || r === void 0) && r.current))
return !1;
if (NF(this.options)) {
const {onComplete: d, onUpdate: f, motionValue: h, ...m} = this.options
, p = MF(t, m);
t = p.keyframes,
t.length === 1 && (t[1] = t[0]),
i = p.duration,
s = p.times,
o = p.ease,
a = "keyframes"
}
const c = _F(l.owner.current, u, t, {
...this.options,
duration: i,
times: s,
ease: o
});
return c.startTime = ji.now(),
this.pendingTimeline ? (c.timeline = this.pendingTimeline,
this.pendingTimeline = void 0) : c.onfinish = ()=>{
const {onComplete: d} = this.options;
l.set(zf(t, this.options, n)),
d && d(),
this.cancel(),
this.resolveFinishedPromise()
}
,
{
animation: c,
duration: i,
times: s,
type: a,
ease: o,
keyframes: t
}
}
get duration() {
const {resolved: t} = this;
if (!t)
return 0;
const {duration: n} = t;
return Kr(n)
}
get time() {
const {resolved: t} = this;
if (!t)
return 0;
const {animation: n} = t;
return Kr(n.currentTime || 0)
}
set time(t) {
const {resolved: n} = this;
if (!n)
return;
const {animation: r} = n;
r.currentTime = Mi(t)
}
get speed() {
const {resolved: t} = this;
if (!t)
return 1;
const {animation: n} = t;
return n.playbackRate
}
set speed(t) {
const {resolved: n} = this;
if (!n)
return;
const {animation: r} = n;
r.playbackRate = t
}
get state() {
const {resolved: t} = this;
if (!t)
return "idle";
const {animation: n} = t;
return n.playState
}
attachTimeline(t) {
if (!this._resolved)
this.pendingTimeline = t;
else {
const {resolved: n} = this;
if (!n)
return on;
const {animation: r} = n;
r.timeline = t,
r.onfinish = null
}
return on
}
play() {
if (this.isStopped)
return;
const {resolved: t} = this;
if (!t)
return;
const {animation: n} = t;
n.playState === "finished" && this.updateFinishedPromise(),
n.play()
}
pause() {
const {resolved: t} = this;
if (!t)
return;
const {animation: n} = t;
n.pause()
}
stop() {
if (this.resolver.cancel(),
this.isStopped = !0,
this.state === "idle")
return;
const {resolved: t} = this;
if (!t)
return;
const {animation: n, keyframes: r, duration: i, type: s, ease: o, times: a} = t;
if (!(n.playState === "idle" || n.playState === "finished")) {
if (this.time) {
const {motionValue: l, onUpdate: u, onComplete: c, ...d} = this.options
, f = new wy({
...d,
keyframes: r,
duration: i,
type: s,
ease: o,
times: a,
isGenerator: !0
})
, h = Mi(this.time);
l.setWithVelocity(f.sample(h - $d).value, f.sample(h).value, $d)
}
this.cancel()
}
}
complete() {
const {resolved: t} = this;
t && t.animation.finish()
}
cancel() {
const {resolved: t} = this;
t && t.animation.cancel()
}
static supports(t) {
const {motionValue: n, name: r, repeatDelay: i, repeatType: s, damping: o, type: a} = t;
return AF() && r && DF.has(r) && n && n.owner && n.owner.current instanceof HTMLElement && !n.owner.getProps().onUpdate && !i && s !== "mirror" && o !== 0 && a !== "inertia"
}
}
function jF(e, t) {
let n;
const r = ()=>{
const {currentTime: i} = t
, o = (i === null ? 0 : i.value) / 100;
n !== o && e(o),
n = o
}
;
return Xe.update(r, !0),
()=>ei(r)
}
const $F = A2(()=>window.ScrollTimeline !== void 0);
class IF {
constructor(t) {
this.stop = ()=>this.runAll("stop"),
this.animations = t.filter(Boolean)
}
then(t, n) {
return Promise.all(this.animations).then(t).catch(n)
}
getAll(t) {
return this.animations[0][t]
}
setAll(t, n) {
for (let r = 0; r < this.animations.length; r++)
this.animations[r][t] = n
}
attachTimeline(t) {
const n = this.animations.map(r=>{
if ($F() && r.attachTimeline)
r.attachTimeline(t);
else
return r.pause(),
jF(i=>{
r.time = r.duration * i
}
, t)
}
);
return ()=>{
n.forEach((r,i)=>{
r && r(),
this.animations[i].stop()
}
)
}
}
get time() {
return this.getAll("time")
}
set time(t) {
this.setAll("time", t)
}
get speed() {
return this.getAll("speed")
}
set speed(t) {
this.setAll("speed", t)
}
get duration() {
let t = 0;
for (let n = 0; n < this.animations.length; n++)
t = Math.max(t, this.animations[n].duration);
return t
}
runAll(t) {
this.animations.forEach(n=>n[t]())
}
play() {
this.runAll("play")
}
pause() {
this.runAll("pause")
}
cancel() {
this.runAll("cancel")
}
complete() {
this.runAll("complete")
}
}
const by = (e,t,n,r={},i,s)=>o=>{
const a = fy(r, e) || {}
, l = a.delay || r.delay || 0;
let {elapsed: u=0} = r;
u = u - Mi(l);
let c = {
keyframes: Array.isArray(n) ? n : [null, n],
ease: "easeOut",
velocity: t.getVelocity(),
...a,
delay: -u,
onUpdate: f=>{
t.set(f),
a.onUpdate && a.onUpdate(f)
}
,
onComplete: ()=>{
o(),
a.onComplete && a.onComplete()
}
,
name: e,
motionValue: t,
element: s ? void 0 : i
};
vI(a) || (c = {
...c,
...gI(e, c)
}),
c.duration && (c.duration = Mi(c.duration)),
c.repeatDelay && (c.repeatDelay = Mi(c.repeatDelay)),
c.from !== void 0 && (c.keyframes[0] = c.from);
let d = !1;
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0,
c.delay === 0 && (d = !0)),
d && !s && t.get() !== void 0) {
const f = zf(c.keyframes, a);
if (f !== void 0)
return Xe.update(()=>{
c.onUpdate(f),
c.onComplete()
}
),
new IF([])
}
return !s && Hw.supports(c) ? new Hw(c) : new wy(c)
}
;
function Id(e) {
return !!(sn(e) && e.add)
}
function Sy(e, t) {
e.indexOf(t) === -1 && e.push(t)
}
function Ey(e, t) {
const n = e.indexOf(t);
n > -1 && e.splice(n, 1)
}
class Cy {
constructor() {
this.subscriptions = []
}
add(t) {
return Sy(this.subscriptions, t),
()=>Ey(this.subscriptions, t)
}
notify(t, n, r) {
const i = this.subscriptions.length;
if (i)
if (i === 1)
this.subscriptions[0](t, n, r);
else
for (let s = 0; s < i; s++) {
const o = this.subscriptions[s];
o && o(t, n, r)
}
}
getSize() {
return this.subscriptions.length
}
clear() {
this.subscriptions.length = 0
}
}
const Ww = 30
, FF = e=>!isNaN(parseFloat(e));
let VF = class {
constructor(t, n={}) {
this.version = "11.2.10",
this.canTrackVelocity = null,
this.events = {},
this.updateAndNotify = (r,i=!0)=>{
const s = ji.now();
this.updatedAt !== s && this.setPrevFrameValue(),
this.prev = this.current,
this.setCurrent(r),
this.current !== this.prev && this.events.change && this.events.change.notify(this.current),
i && this.events.renderRequest && this.events.renderRequest.notify(this.current)
}
,
this.hasAnimated = !1,
this.setCurrent(t),
this.owner = n.owner
}
setCurrent(t) {
this.current = t,
this.updatedAt = ji.now(),
this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = FF(this.current))
}
setPrevFrameValue(t=this.current) {
this.prevFrameValue = t,
this.prevUpdatedAt = this.updatedAt
}
onChange(t) {
return this.on("change", t)
}
on(t, n) {
this.events[t] || (this.events[t] = new Cy);
const r = this.events[t].add(n);
return t === "change" ? ()=>{
r(),
Xe.read(()=>{
this.events.change.getSize() || this.stop()
}
)
}
: r
}
clearListeners() {
for (const t in this.events)
this.events[t].clear()
}
attach(t, n) {
this.passiveEffect = t,
this.stopPassiveEffect = n
}
set(t, n=!0) {
!n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify)
}
setWithVelocity(t, n, r) {
this.set(n),
this.prev = void 0,
this.prevFrameValue = t,
this.prevUpdatedAt = this.updatedAt - r
}
jump(t, n=!0) {
this.updateAndNotify(t),
this.prev = t,
this.prevUpdatedAt = this.prevFrameValue = void 0,
n && this.stop(),
this.stopPassiveEffect && this.stopPassiveEffect()
}
get() {
return this.current
}
getPrevious() {
return this.prev
}
getVelocity() {
const t = ji.now();
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Ww)
return 0;
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Ww);
return L2(parseFloat(this.current) - parseFloat(this.prevFrameValue), n)
}
start(t) {
return this.stop(),
new Promise(n=>{
this.hasAnimated = !0,
this.animation = t(n),
this.events.animationStart && this.events.animationStart.notify()
}
).then(()=>{
this.events.animationComplete && this.events.animationComplete.notify(),
this.clearAnimation()
}
)
}
stop() {
this.animation && (this.animation.stop(),
this.events.animationCancel && this.events.animationCancel.notify()),
this.clearAnimation()
}
isAnimating() {
return !!this.animation
}
clearAnimation() {
delete this.animation
}
destroy() {
this.clearListeners(),
this.stop(),
this.stopPassiveEffect && this.stopPassiveEffect()
}
}
;
function Xl(e, t) {
return new VF(e,t)
}
function zF(e, t, n) {
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Xl(n))
}
function UF(e, t) {
const n = Vf(e, t);
let {transitionEnd: r={}, transition: i={}, ...s} = n || {};
s = {
...s,
...r
};
for (const o in s) {
const a = K$(s[o]);
zF(e, o, a)
}
}
function K2(e) {
return e.getProps()[qP]
}
function BF({protectedKeys: e, needsAnimating: t}, n) {
const r = e.hasOwnProperty(n) && t[n] !== !0;
return t[n] = !1,
r
}
function q2(e, t, {delay: n=0, transitionOverride: r, type: i}={}) {
var s;
let {transition: o=e.getDefaultTransition(), transitionEnd: a, ...l} = t;
const u = e.getValue("willChange");
r && (o = r);
const c = []
, d = i && e.animationState && e.animationState.getState()[i];
for (const f in l) {
const h = e.getValue(f, (s = e.latestValues[f]) !== null && s !== void 0 ? s : null)
, m = l[f];
if (m === void 0 || d && BF(d, f))
continue;
const p = {
delay: n,
elapsed: 0,
...fy(o || {}, f)
};
let b = !1;
if (window.HandoffAppearAnimations) {
const g = K2(e);
if (g) {
const w = window.HandoffAppearAnimations(g, f, h, Xe);
w !== null && (p.elapsed = w,
b = !0)
}
}
h.start(by(f, h, m, e.shouldReduceMotion && Hs.has(f) ? {
type: !1
} : p, e, b));
const v = h.animation;
v && (Id(u) && (u.add(f),
v.then(()=>u.remove(f))),
c.push(v))
}
return a && Promise.all(c).then(()=>{
Xe.update(()=>{
a && UF(e, a)
}
)
}
),
c
}
function ig(e, t, n={}) {
var r;
const i = Vf(e, t, n.type === "exit" ? (r = e.presenceContext) === null || r === void 0 ? void 0 : r.custom : void 0);
let {transition: s=e.getDefaultTransition() || {}} = i || {};
n.transitionOverride && (s = n.transitionOverride);
const o = i ? ()=>Promise.all(q2(e, i, n)) : ()=>Promise.resolve()
, a = e.variantChildren && e.variantChildren.size ? (u=0)=>{
const {delayChildren: c=0, staggerChildren: d, staggerDirection: f} = s;
return HF(e, t, c + u, d, f, n)
}
: ()=>Promise.resolve()
, {when: l} = s;
if (l) {
const [u,c] = l === "beforeChildren" ? [o, a] : [a, o];
return u().then(()=>c())
} else
return Promise.all([o(), a(n.delay)])
}
function HF(e, t, n=0, r=0, i=1, s) {
const o = []
, a = (e.variantChildren.size - 1) * r
, l = i === 1 ? (u=0)=>u * r : (u=0)=>a - u * r;
return Array.from(e.variantChildren).sort(WF).forEach((u,c)=>{
u.notify("AnimationStart", t),
o.push(ig(u, t, {
...s,
delay: n + l(c)
}).then(()=>u.notify("AnimationComplete", t)))
}
),
Promise.all(o)
}
function WF(e, t) {
return e.sortNodePosition(t)
}
function GF(e, t, n={}) {
e.notify("AnimationStart", t);
let r;
if (Array.isArray(t)) {
const i = t.map(s=>ig(e, s, n));
r = Promise.all(i)
} else if (typeof t == "string")
r = ig(e, t, n);
else {
const i = typeof t == "function" ? Vf(e, t, n.custom) : t;
r = Promise.all(q2(e, i, n))
}
return r.then(()=>{
Xe.postRender(()=>{
e.notify("AnimationComplete", t)
}
)
}
)
}
const KF = [...ey].reverse()
, qF = ey.length;
function QF(e) {
return t=>Promise.all(t.map(({animation: n, options: r})=>GF(e, n, r)))
}
function YF(e) {
let t = QF(e);
const n = JF();
let r = !0;
const i = l=>(u,c)=>{
var d;
const f = Vf(e, c, l === "exit" ? (d = e.presenceContext) === null || d === void 0 ? void 0 : d.custom : void 0);
if (f) {
const {transition: h, transitionEnd: m, ...p} = f;
u = {
...u,
...p,
...m
}
}
return u
}
;
function s(l) {
t = l(e)
}
function o(l) {
const u = e.getProps()
, c = e.getVariantContext(!0) || {}
, d = []
, f = new Set;
let h = {}
, m = 1 / 0;
for (let b = 0; b < qF; b++) {
const v = KF[b]
, g = n[v]
, w = u[v] !== void 0 ? u[v] : c[v]
, E = Kl(w)
, D = v === l ? g.isActive : null;
D === !1 && (m = b);
let V = w === c[v] && w !== u[v] && E;
if (V && r && e.manuallyAnimateOnMount && (V = !1),
g.protectedKeys = {
...h
},
!g.isActive && D === null || !w && !g.prevProp || $f(w) || typeof w == "boolean")
continue;
let P = XF(g.prevProp, w) || v === l && g.isActive && !V && E || b > m && E
, A = !1;
const B = Array.isArray(w) ? w : [w];
let Q = B.reduce(i(v), {});
D === !1 && (Q = {});
const {prevResolvedValues: Z={}} = g
, F = {
...Z,
...Q
}
, k = T=>{
P = !0,
f.has(T) && (A = !0,
f.delete(T)),
g.needsAnimating[T] = !0;
const _ = e.getValue(T);
_ && (_.liveStyle = !1)
}
;
for (const T in F) {
const _ = Q[T]
, O = Z[T];
if (h.hasOwnProperty(T))
continue;
let R = !1;
Qm(_) && Qm(O) ? R = !g2(_, O) : R = _ !== O,
R ? _ != null ? k(T) : f.add(T) : _ !== void 0 && f.has(T) ? k(T) : g.protectedKeys[T] = !0
}
g.prevProp = w,
g.prevResolvedValues = Q,
g.isActive && (h = {
...h,
...Q
}),
r && e.blockInitialAnimation && (P = !1),
P && (!V || A) && d.push(...B.map(T=>({
animation: T,
options: {
type: v
}
})))
}
if (f.size) {
const b = {};
f.forEach(v=>{
const g = e.getBaseTarget(v)
, w = e.getValue(v);
w && (w.liveStyle = !0),
b[v] = g ?? null
}
),
d.push({
animation: b
})
}
let p = !!d.length;
return r && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (p = !1),
r = !1,
p ? t(d) : Promise.resolve()
}
function a(l, u) {
var c;
if (n[l].isActive === u)
return Promise.resolve();
(c = e.variantChildren) === null || c === void 0 || c.forEach(f=>{
var h;
return (h = f.animationState) === null || h === void 0 ? void 0 : h.setActive(l, u)
}
),
n[l].isActive = u;
const d = o(l);
for (const f in n)
n[f].protectedKeys = {};
return d
}
return {
animateChanges: o,
setActive: a,
setAnimateFunction: s,
getState: ()=>n
}
}
function XF(e, t) {
return typeof t == "string" ? t !== e : Array.isArray(t) ? !g2(t, e) : !1
}
function Zi(e=!1) {
return {
isActive: e,
protectedKeys: {},
needsAnimating: {},
prevResolvedValues: {}
}
}
function JF() {
return {
animate: Zi(!0),
whileInView: Zi(),
whileHover: Zi(),
whileTap: Zi(),
whileDrag: Zi(),
whileFocus: Zi(),
exit: Zi()
}
}
class ZF extends Xi {
constructor(t) {
super(t),
t.animationState || (t.animationState = YF(t))
}
updateAnimationControlsSubscription() {
const {animate: t} = this.node.getProps();
this.unmount(),
$f(t) && (this.unmount = t.subscribe(this.node))
}
mount() {
this.updateAnimationControlsSubscription()
}
update() {
const {animate: t} = this.node.getProps()
, {animate: n} = this.node.prevProps || {};
t !== n && this.updateAnimationControlsSubscription()
}
unmount() {}
}
let e6 = 0;
class t6 extends Xi {
constructor() {
super(...arguments),
this.id = e6++
}
update() {
if (!this.node.presenceContext)
return;
const {isPresent: t, onExitComplete: n} = this.node.presenceContext
, {isPresent: r} = this.node.prevPresenceContext || {};
if (!this.node.animationState || t === r)
return;
const i = this.node.animationState.setActive("exit", !t);
n && !t && i.then(()=>n(this.id))
}
mount() {
const {register: t} = this.node.presenceContext || {};
t && (this.unmount = t(this.id))
}
unmount() {}
}
const n6 = {
animation: {
Feature: ZF
},
exit: {
Feature: t6
}
}
, Gw = (e,t)=>Math.abs(e - t);
function r6(e, t) {
const n = Gw(e.x, t.x)
, r = Gw(e.y, t.y);
return Math.sqrt(n ** 2 + r ** 2)
}
class Q2 {
constructor(t, n, {transformPagePoint: r, contextWindow: i, dragSnapToOrigin: s=!1}={}) {
if (this.startEvent = null,
this.lastMoveEvent = null,
this.lastMoveEventInfo = null,
this.handlers = {},
this.contextWindow = window,
this.updatePoint = ()=>{
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
return;
const d = Jh(this.lastMoveEventInfo, this.history)
, f = this.startEvent !== null
, h = r6(d.offset, {
x: 0,
y: 0
}) >= 3;
if (!f && !h)
return;
const {point: m} = d
, {timestamp: p} = Kt;
this.history.push({
...m,
timestamp: p
});
const {onStart: b, onMove: v} = this.handlers;
f || (b && b(this.lastMoveEvent, d),
this.startEvent = this.lastMoveEvent),
v && v(this.lastMoveEvent, d)
}
,
this.handlePointerMove = (d,f)=>{
this.lastMoveEvent = d,
this.lastMoveEventInfo = Xh(f, this.transformPagePoint),
Xe.update(this.updatePoint, !0)
}
,
this.handlePointerUp = (d,f)=>{
this.end();
const {onEnd: h, onSessionEnd: m, resumeAnimation: p} = this.handlers;
if (this.dragSnapToOrigin && p && p(),
!(this.lastMoveEvent && this.lastMoveEventInfo))
return;
const b = Jh(d.type === "pointercancel" ? this.lastMoveEventInfo : Xh(f, this.transformPagePoint), this.history);
this.startEvent && h && h(d, b),
m && m(d, b)
}
,
!d2(t))
return;
this.dragSnapToOrigin = s,
this.handlers = n,
this.transformPagePoint = r,
this.contextWindow = i || window;
const o = Ff(t)
, a = Xh(o, this.transformPagePoint)
, {point: l} = a
, {timestamp: u} = Kt;
this.history = [{
...l,
timestamp: u
}];
const {onSessionStart: c} = n;
c && c(t, Jh(a, this.history)),
this.removeListeners = Gr(Wr(this.contextWindow, "pointermove", this.handlePointerMove), Wr(this.contextWindow, "pointerup", this.handlePointerUp), Wr(this.contextWindow, "pointercancel", this.handlePointerUp))
}
updateHandlers(t) {
this.handlers = t
}
end() {
this.removeListeners && this.removeListeners(),
ei(this.updatePoint)
}
}
function Xh(e, t) {
return t ? {
point: t(e.point)
} : e
}
function Kw(e, t) {
return {
x: e.x - t.x,
y: e.y - t.y
}
}
function Jh({point: e}, t) {
return {
point: e,
delta: Kw(e, Y2(t)),
offset: Kw(e, i6(t)),
velocity: s6(t, .1)
}
}
function i6(e) {
return e[0]
}
function Y2(e) {
return e[e.length - 1]
}
function s6(e, t) {
if (e.length < 2)
return {
x: 0,
y: 0
};
let n = e.length - 1
, r = null;
const i = Y2(e);
for (; n >= 0 && (r = e[n],
!(i.timestamp - r.timestamp > Mi(t))); )
n--;
if (!r)
return {
x: 0,
y: 0
};
const s = Kr(i.timestamp - r.timestamp);
if (s === 0)
return {
x: 0,
y: 0
};
const o = {
x: (i.x - r.x) / s,
y: (i.y - r.y) / s
};
return o.x === 1 / 0 && (o.x = 0),
o.y === 1 / 0 && (o.y = 0),
o
}
function Mn(e) {
return e.max - e.min
}
function sg(e, t=0, n=.01) {
return Math.abs(e - t) <= n
}
function qw(e, t, n, r=.5) {
e.origin = r,
e.originPoint = vt(t.min, t.max, e.origin),
e.scale = Mn(n) / Mn(t),
(sg(e.scale, 1, 1e-4) || isNaN(e.scale)) && (e.scale = 1),
e.translate = vt(n.min, n.max, e.origin) - e.originPoint,
(sg(e.translate) || isNaN(e.translate)) && (e.translate = 0)
}
function hl(e, t, n, r) {
qw(e.x, t.x, n.x, r ? r.originX : void 0),
qw(e.y, t.y, n.y, r ? r.originY : void 0)
}
function Qw(e, t, n) {
e.min = n.min + t.min,
e.max = e.min + Mn(t)
}
function o6(e, t, n) {
Qw(e.x, t.x, n.x),
Qw(e.y, t.y, n.y)
}
function Yw(e, t, n) {
e.min = t.min - n.min,
e.max = e.min + Mn(t)
}
function pl(e, t, n) {
Yw(e.x, t.x, n.x),
Yw(e.y, t.y, n.y)
}
function a6(e, {min: t, max: n}, r) {
return t !== void 0 && e < t ? e = r ? vt(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? vt(n, e, r.max) : Math.min(e, n)),
e
}
function Xw(e, t, n) {
return {
min: t !== void 0 ? e.min + t : void 0,
max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
}
}
function l6(e, {top: t, left: n, bottom: r, right: i}) {
return {
x: Xw(e.x, n, i),
y: Xw(e.y, t, r)
}
}
function Jw(e, t) {
let n = t.min - e.min
, r = t.max - e.max;
return t.max - t.min < e.max - e.min && ([n,r] = [r, n]),
{
min: n,
max: r
}
}
function u6(e, t) {
return {
x: Jw(e.x, t.x),
y: Jw(e.y, t.y)
}
}
function c6(e, t) {
let n = .5;
const r = Mn(e)
, i = Mn(t);
return i > r ? n = Yl(t.min, t.max - r, e.min) : r > i && (n = Yl(e.min, e.max - i, t.min)),
zi(0, 1, n)
}
function d6(e, t) {
const n = {};
return t.min !== void 0 && (n.min = t.min - e.min),
t.max !== void 0 && (n.max = t.max - e.min),
n
}
const og = .35;
function f6(e=og) {
return e === !1 ? e = 0 : e === !0 && (e = og),
{
x: Zw(e, "left", "right"),
y: Zw(e, "top", "bottom")
}
}
function Zw(e, t, n) {
return {
min: ex(e, t),
max: ex(e, n)
}
}
function ex(e, t) {
return typeof e == "number" ? e : e[t] || 0
}
const tx = ()=>({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0
})
, bo = ()=>({
x: tx(),
y: tx()
})
, nx = ()=>({
min: 0,
max: 0
})
, Ct = ()=>({
x: nx(),
y: nx()
});
function Vn(e) {
return [e("x"), e("y")]
}
function X2({top: e, left: t, right: n, bottom: r}) {
return {
x: {
min: t,
max: n
},
y: {
min: e,
max: r
}
}
}
function h6({x: e, y: t}) {
return {
top: t.min,
right: e.max,
bottom: t.max,
left: e.min
}
}
function p6(e, t) {
if (!t)
return e;
const n = t({
x: e.left,
y: e.top
})
, r = t({
x: e.right,
y: e.bottom
});
return {
top: n.y,
left: n.x,
bottom: r.y,
right: r.x
}
}
function Zh(e) {
return e === void 0 || e === 1
}
function ag({scale: e, scaleX: t, scaleY: n}) {
return !Zh(e) || !Zh(t) || !Zh(n)
}
function is(e) {
return ag(e) || J2(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY
}
function J2(e) {
return rx(e.x) || rx(e.y)
}
function rx(e) {
return e && e !== "0%"
}
function Fd(e, t, n) {
const r = e - n
, i = t * r;
return n + i
}
function ix(e, t, n, r, i) {
return i !== void 0 && (e = Fd(e, i, r)),
Fd(e, n, r) + t
}
function lg(e, t=0, n=1, r, i) {
e.min = ix(e.min, t, n, r, i),
e.max = ix(e.max, t, n, r, i)
}
function Z2(e, {x: t, y: n}) {
lg(e.x, t.translate, t.scale, t.originPoint),
lg(e.y, n.translate, n.scale, n.originPoint)
}
function m6(e, t, n, r=!1) {
const i = n.length;
if (!i)
return;
t.x = t.y = 1;
let s, o;
for (let a = 0; a < i; a++) {
s = n[a],
o = s.projectionDelta;
const l = s.instance;
l && l.style && l.style.display === "contents" || (r && s.options.layoutScroll && s.scroll && s !== s.root && So(e, {
x: -s.scroll.offset.x,
y: -s.scroll.offset.y
}),
o && (t.x *= o.x.scale,
t.y *= o.y.scale,
Z2(e, o)),
r && is(s.latestValues) && So(e, s.latestValues))
}
t.x = sx(t.x),
t.y = sx(t.y)
}
function sx(e) {
return Number.isInteger(e) || e > 1.0000000000001 || e < .999999999999 ? e : 1
}
function hi(e, t) {
e.min = e.min + t,
e.max = e.max + t
}
function ox(e, t, [n,r,i]) {
const s = t[i] !== void 0 ? t[i] : .5
, o = vt(e.min, e.max, s);
lg(e, t[n], t[r], o, t.scale)
}
const g6 = ["x", "scaleX", "originX"]
, v6 = ["y", "scaleY", "originY"];
function So(e, t) {
ox(e.x, t, g6),
ox(e.y, t, v6)
}
function eT(e, t) {
return X2(p6(e.getBoundingClientRect(), t))
}
function y6(e, t, n) {
const r = eT(e, n)
, {scroll: i} = t;
return i && (hi(r.x, i.offset.x),
hi(r.y, i.offset.y)),
r
}
const tT = ({current: e})=>e ? e.ownerDocument.defaultView : null
, w6 = new WeakMap;
class x6 {
constructor(t) {
this.openGlobalLock = null,
this.isDragging = !1,
this.currentDirection = null,
this.originPoint = {
x: 0,
y: 0
},
this.constraints = !1,
this.hasMutatedConstraints = !1,
this.elastic = Ct(),
this.visualElement = t
}
start(t, {snapToCursor: n=!1}={}) {
const {presenceContext: r} = this.visualElement;
if (r && r.isPresent === !1)
return;
const i = c=>{
const {dragSnapToOrigin: d} = this.getProps();
d ? this.pauseAnimation() : this.stopAnimation(),
n && this.snapToCursor(Ff(c, "page").point)
}
, s = (c,d)=>{
const {drag: f, dragPropagation: h, onDragStart: m} = this.getProps();
if (f && !h && (this.openGlobalLock && this.openGlobalLock(),
this.openGlobalLock = h2(f),
!this.openGlobalLock))
return;
this.isDragging = !0,
this.currentDirection = null,
this.resolveConstraints(),
this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0,
this.visualElement.projection.target = void 0),
Vn(b=>{
let v = this.getAxisMotionValue(b).get() || 0;
if (_r.test(v)) {
const {projection: g} = this.visualElement;
if (g && g.layout) {
const w = g.layout.layoutBox[b];
w && (v = Mn(w) * (parseFloat(v) / 100))
}
}
this.originPoint[b] = v
}
),
m && Xe.postRender(()=>m(c, d));
const {animationState: p} = this.visualElement;
p && p.setActive("whileDrag", !0)
}
, o = (c,d)=>{
const {dragPropagation: f, dragDirectionLock: h, onDirectionLock: m, onDrag: p} = this.getProps();
if (!f && !this.openGlobalLock)
return;
const {offset: b} = d;
if (h && this.currentDirection === null) {
this.currentDirection = b6(b),
this.currentDirection !== null && m && m(this.currentDirection);
return
}
this.updateAxis("x", d.point, b),
this.updateAxis("y", d.point, b),
this.visualElement.render(),
p && p(c, d)
}
, a = (c,d)=>this.stop(c, d)
, l = ()=>Vn(c=>{
var d;
return this.getAnimationState(c) === "paused" && ((d = this.getAxisMotionValue(c).animation) === null || d === void 0 ? void 0 : d.play())
}
)
, {dragSnapToOrigin: u} = this.getProps();
this.panSession = new Q2(t,{
onSessionStart: i,
onStart: s,
onMove: o,
onSessionEnd: a,
resumeAnimation: l
},{
transformPagePoint: this.visualElement.getTransformPagePoint(),
dragSnapToOrigin: u,
contextWindow: tT(this.visualElement)
})
}
stop(t, n) {
const r = this.isDragging;
if (this.cancel(),
!r)
return;
const {velocity: i} = n;
this.startAnimation(i);
const {onDragEnd: s} = this.getProps();
s && Xe.postRender(()=>s(t, n))
}
cancel() {
this.isDragging = !1;
const {projection: t, animationState: n} = this.visualElement;
t && (t.isAnimationBlocked = !1),
this.panSession && this.panSession.end(),
this.panSession = void 0;
const {dragPropagation: r} = this.getProps();
!r && this.openGlobalLock && (this.openGlobalLock(),
this.openGlobalLock = null),
n && n.setActive("whileDrag", !1)
}
updateAxis(t, n, r) {
const {drag: i} = this.getProps();
if (!r || !vc(t, i, this.currentDirection))
return;
const s = this.getAxisMotionValue(t);
let o = this.originPoint[t] + r[t];
this.constraints && this.constraints[t] && (o = a6(o, this.constraints[t], this.elastic[t])),
s.set(o)
}
resolveConstraints() {
var t;
const {dragConstraints: n, dragElastic: r} = this.getProps()
, i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (t = this.visualElement.projection) === null || t === void 0 ? void 0 : t.layout
, s = this.constraints;
n && wo(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = l6(i.layoutBox, n) : this.constraints = !1,
this.elastic = f6(r),
s !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && Vn(o=>{
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = d6(i.layoutBox[o], this.constraints[o]))
}
)
}
resolveRefConstraints() {
const {dragConstraints: t, onMeasureDragConstraints: n} = this.getProps();
if (!t || !wo(t))
return !1;
const r = t.current
, {projection: i} = this.visualElement;
if (!i || !i.layout)
return !1;
const s = y6(r, i.root, this.visualElement.getTransformPagePoint());
let o = u6(i.layout.layoutBox, s);
if (n) {
const a = n(h6(o));
this.hasMutatedConstraints = !!a,
a && (o = X2(a))
}
return o
}
startAnimation(t) {
const {drag: n, dragMomentum: r, dragElastic: i, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: a} = this.getProps()
, l = this.constraints || {}
, u = Vn(c=>{
if (!vc(c, n, this.currentDirection))
return;
let d = l && l[c] || {};
o && (d = {
min: 0,
max: 0
});
const f = i ? 200 : 1e6
, h = i ? 40 : 1e7
, m = {
type: "inertia",
velocity: r ? t[c] : 0,
bounceStiffness: f,
bounceDamping: h,
timeConstant: 750,
restDelta: 1,
restSpeed: 10,
...s,
...d
};
return this.startAxisValueAnimation(c, m)
}
);
return Promise.all(u).then(a)
}
startAxisValueAnimation(t, n) {
const r = this.getAxisMotionValue(t);
return r.start(by(t, r, 0, n, this.visualElement))
}
stopAnimation() {
Vn(t=>this.getAxisMotionValue(t).stop())
}
pauseAnimation() {
Vn(t=>{
var n;
return (n = this.getAxisMotionValue(t).animation) === null || n === void 0 ? void 0 : n.pause()
}
)
}
getAnimationState(t) {
var n;
return (n = this.getAxisMotionValue(t).animation) === null || n === void 0 ? void 0 : n.state
}
getAxisMotionValue(t) {
const n = `_drag${t.toUpperCase()}`
, r = this.visualElement.getProps()
, i = r[n];
return i || this.visualElement.getValue(t, (r.initial ? r.initial[t] : void 0) || 0)
}
snapToCursor(t) {
Vn(n=>{
const {drag: r} = this.getProps();
if (!vc(n, r, this.currentDirection))
return;
const {projection: i} = this.visualElement
, s = this.getAxisMotionValue(n);
if (i && i.layout) {
const {min: o, max: a} = i.layout.layoutBox[n];
s.set(t[n] - vt(o, a, .5))
}
}
)
}
scalePositionWithinConstraints() {
if (!this.visualElement.current)
return;
const {drag: t, dragConstraints: n} = this.getProps()
, {projection: r} = this.visualElement;
if (!wo(n) || !r || !this.constraints)
return;
this.stopAnimation();
const i = {
x: 0,
y: 0
};
Vn(o=>{
const a = this.getAxisMotionValue(o);
if (a && this.constraints !== !1) {
const l = a.get();
i[o] = c6({
min: l,
max: l
}, this.constraints[o])
}
}
);
const {transformTemplate: s} = this.visualElement.getProps();
this.visualElement.current.style.transform = s ? s({}, "") : "none",
r.root && r.root.updateScroll(),
r.updateLayout(),
this.resolveConstraints(),
Vn(o=>{
if (!vc(o, t, null))
return;
const a = this.getAxisMotionValue(o)
, {min: l, max: u} = this.constraints[o];
a.set(vt(l, u, i[o]))
}
)
}
addListeners() {
if (!this.visualElement.current)
return;
w6.set(this.visualElement, this);
const t = this.visualElement.current
, n = Wr(t, "pointerdown", l=>{
const {drag: u, dragListener: c=!0} = this.getProps();
u && c && this.start(l)
}
)
, r = ()=>{
const {dragConstraints: l} = this.getProps();
wo(l) && (this.constraints = this.resolveRefConstraints())
}
, {projection: i} = this.visualElement
, s = i.addEventListener("measure", r);
i && !i.layout && (i.root && i.root.updateScroll(),
i.updateLayout()),
r();
const o = Vr(window, "resize", ()=>this.scalePositionWithinConstraints())
, a = i.addEventListener("didUpdate", ({delta: l, hasLayoutChanged: u})=>{
this.isDragging && u && (Vn(c=>{
const d = this.getAxisMotionValue(c);
d && (this.originPoint[c] += l[c].translate,
d.set(d.get() + l[c].translate))
}
),
this.visualElement.render())
}
);
return ()=>{
o(),
n(),
s(),
a && a()
}
}
getProps() {
const t = this.visualElement.getProps()
, {drag: n=!1, dragDirectionLock: r=!1, dragPropagation: i=!1, dragConstraints: s=!1, dragElastic: o=og, dragMomentum: a=!0} = t;
return {
...t,
drag: n,
dragDirectionLock: r,
dragPropagation: i,
dragConstraints: s,
dragElastic: o,
dragMomentum: a
}
}
}
function vc(e, t, n) {
return (t === !0 || t === e) && (n === null || n === e)
}
function b6(e, t=10) {
let n = null;
return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"),
n
}
class S6 extends Xi {
constructor(t) {
super(t),
this.removeGroupControls = on,
this.removeListeners = on,
this.controls = new x6(t)
}
mount() {
const {dragControls: t} = this.node.getProps();
t && (this.removeGroupControls = t.subscribe(this.controls)),
this.removeListeners = this.controls.addListeners() || on
}
unmount() {
this.removeGroupControls(),
this.removeListeners()
}
}
const ax = e=>(t,n)=>{
e && Xe.postRender(()=>e(t, n))
}
;
class E6 extends Xi {
constructor() {
super(...arguments),
this.removePointerDownListener = on
}
onPointerDown(t) {
this.session = new Q2(t,this.createPanHandlers(),{
transformPagePoint: this.node.getTransformPagePoint(),
contextWindow: tT(this.node)
})
}
createPanHandlers() {
const {onPanSessionStart: t, onPanStart: n, onPan: r, onPanEnd: i} = this.node.getProps();
return {
onSessionStart: ax(t),
onStart: ax(n),
onMove: r,
onEnd: (s,o)=>{
delete this.session,
i && Xe.postRender(()=>i(s, o))
}
}
}
mount() {
this.removePointerDownListener = Wr(this.node.current, "pointerdown", t=>this.onPointerDown(t))
}
update() {
this.session && this.session.updateHandlers(this.createPanHandlers())
}
unmount() {
this.removePointerDownListener(),
this.session && this.session.end()
}
}
function C6() {
const e = y.useContext(jf);
if (e === null)
return [!0, null];
const {isPresent: t, onExitComplete: n, register: r} = e
, i = y.useId();
return y.useEffect(()=>r(i), []),
!t && n ? [!1, ()=>n && n(i)] : [!0]
}
const Bc = {
hasAnimatedSinceResize: !0,
hasEverUpdated: !1
};
function lx(e, t) {
return t.max === t.min ? 0 : e / (t.max - t.min) * 100
}
const Ua = {
correct: (e,t)=>{
if (!t.target)
return e;
if (typeof e == "string")
if (Oe.test(e))
e = parseFloat(e);
else
return e;
const n = lx(e, t.target.x)
, r = lx(e, t.target.y);
return `${n}% ${r}%`
}
}
, P6 = {
correct: (e,{treeScale: t, projectionDelta: n})=>{
const r = e
, i = Ui.parse(e);
if (i.length > 5)
return r;
const s = Ui.createTransformer(e)
, o = typeof i[0] != "number" ? 1 : 0
, a = n.x.scale * t.x
, l = n.y.scale * t.y;
i[0 + o] /= a,
i[1 + o] /= l;
const u = vt(a, l, .5);
return typeof i[2 + o] == "number" && (i[2 + o] /= u),
typeof i[3 + o] == "number" && (i[3 + o] /= u),
s(i)
}
};
class T6 extends y.Component {
componentDidMount() {
const {visualElement: t, layoutGroup: n, switchLayoutGroup: r, layoutId: i} = this.props
, {projection: s} = t;
E$(R6),
s && (n.group && n.group.add(s),
r && r.register && i && r.register(s),
s.root.didUpdate(),
s.addEventListener("animationComplete", ()=>{
this.safeToRemove()
}
),
s.setOptions({
...s.options,
onExitComplete: ()=>this.safeToRemove()
})),
Bc.hasEverUpdated = !0
}
getSnapshotBeforeUpdate(t) {
const {layoutDependency: n, visualElement: r, drag: i, isPresent: s} = this.props
, o = r.projection;
return o && (o.isPresent = s,
i || t.layoutDependency !== n || n === void 0 ? o.willUpdate() : this.safeToRemove(),
t.isPresent !== s && (s ? o.promote() : o.relegate() || Xe.postRender(()=>{
const a = o.getStack();
(!a || !a.members.length) && this.safeToRemove()
}
))),
null
}
componentDidUpdate() {
const {projection: t} = this.props.visualElement;
t && (t.root.didUpdate(),
Zv.postRender(()=>{
!t.currentAnimation && t.isLead() && this.safeToRemove()
}
))
}
componentWillUnmount() {
const {visualElement: t, layoutGroup: n, switchLayoutGroup: r} = this.props
, {projection: i} = t;
i && (i.scheduleCheckAfterUnmount(),
n && n.group && n.group.remove(i),
r && r.deregister && r.deregister(i))
}
safeToRemove() {
const {safeToRemove: t} = this.props;
t && t()
}
render() {
return null
}
}
function nT(e) {
const [t,n] = C6()
, r = y.useContext(ny);
return x.jsx(T6, {
...e,
layoutGroup: r,
switchLayoutGroup: y.useContext(XP),
isPresent: t,
safeToRemove: n
})
}
const R6 = {
borderRadius: {
...Ua,
applyTo: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius"]
},
borderTopLeftRadius: Ua,
borderTopRightRadius: Ua,
borderBottomLeftRadius: Ua,
borderBottomRightRadius: Ua,
boxShadow: P6
}
, rT = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"]
, O6 = rT.length
, ux = e=>typeof e == "string" ? parseFloat(e) : e
, cx = e=>typeof e == "number" || Oe.test(e);
function k6(e, t, n, r, i, s) {
i ? (e.opacity = vt(0, n.opacity !== void 0 ? n.opacity : 1, _6(r)),
e.opacityExit = vt(t.opacity !== void 0 ? t.opacity : 1, 0, A6(r))) : s && (e.opacity = vt(t.opacity !== void 0 ? t.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, r));
for (let o = 0; o < O6; o++) {
const a = `border${rT[o]}Radius`;
let l = dx(t, a)
, u = dx(n, a);
if (l === void 0 && u === void 0)
continue;
l || (l = 0),
u || (u = 0),
l === 0 || u === 0 || cx(l) === cx(u) ? (e[a] = Math.max(vt(ux(l), ux(u), r), 0),
(_r.test(u) || _r.test(l)) && (e[a] += "%")) : e[a] = u
}
(t.rotate || n.rotate) && (e.rotate = vt(t.rotate || 0, n.rotate || 0, r))
}
function dx(e, t) {
return e[t] !== void 0 ? e[t] : e.borderRadius
}
const _6 = iT(0, .5, V2)
, A6 = iT(.5, .95, on);
function iT(e, t, n) {
return r=>r < e ? 0 : r > t ? 1 : n(Yl(e, t, r))
}
function fx(e, t) {
e.min = t.min,
e.max = t.max
}
function Fn(e, t) {
fx(e.x, t.x),
fx(e.y, t.y)
}
function hx(e, t, n, r, i) {
return e -= t,
e = Fd(e, 1 / n, r),
i !== void 0 && (e = Fd(e, 1 / i, r)),
e
}
function D6(e, t=0, n=1, r=.5, i, s=e, o=e) {
if (_r.test(t) && (t = parseFloat(t),
t = vt(o.min, o.max, t / 100) - o.min),
typeof t != "number")
return;
let a = vt(s.min, s.max, r);
e === s && (a -= t),
e.min = hx(e.min, t, n, a, i),
e.max = hx(e.max, t, n, a, i)
}
function px(e, t, [n,r,i], s, o) {
D6(e, t[n], t[r], t[i], t.scale, s, o)
}
const L6 = ["x", "scaleX", "originX"]
, N6 = ["y", "scaleY", "originY"];
function mx(e, t, n, r) {
px(e.x, t, L6, n ? n.x : void 0, r ? r.x : void 0),
px(e.y, t, N6, n ? n.y : void 0, r ? r.y : void 0)
}
function gx(e) {
return e.translate === 0 && e.scale === 1
}
function sT(e) {
return gx(e.x) && gx(e.y)
}
function M6(e, t) {
return e.x.min === t.x.min && e.x.max === t.x.max && e.y.min === t.y.min && e.y.max === t.y.max
}
function oT(e, t) {
return Math.round(e.x.min) === Math.round(t.x.min) && Math.round(e.x.max) === Math.round(t.x.max) && Math.round(e.y.min) === Math.round(t.y.min) && Math.round(e.y.max) === Math.round(t.y.max)
}
function vx(e) {
return Mn(e.x) / Mn(e.y)
}
class j6 {
constructor() {
this.members = []
}
add(t) {
Sy(this.members, t),
t.scheduleRender()
}
remove(t) {
if (Ey(this.members, t),
t === this.prevLead && (this.prevLead = void 0),
t === this.lead) {
const n = this.members[this.members.length - 1];
n && this.promote(n)
}
}
relegate(t) {
const n = this.members.findIndex(i=>t === i);
if (n === 0)
return !1;
let r;
for (let i = n; i >= 0; i--) {
const s = this.members[i];
if (s.isPresent !== !1) {
r = s;
break
}
}
return r ? (this.promote(r),
!0) : !1
}
promote(t, n) {
const r = this.lead;
if (t !== r && (this.prevLead = r,
this.lead = t,
t.show(),
r)) {
r.instance && r.scheduleRender(),
t.scheduleRender(),
t.resumeFrom = r,
n && (t.resumeFrom.preserveOpacity = !0),
r.snapshot && (t.snapshot = r.snapshot,
t.snapshot.latestValues = r.animationValues || r.latestValues),
t.root && t.root.isUpdating && (t.isLayoutDirty = !0);
const {crossfade: i} = t.options;
i === !1 && r.hide()
}
}
exitAnimationComplete() {
this.members.forEach(t=>{
const {options: n, resumingFrom: r} = t;
n.onExitComplete && n.onExitComplete(),
r && r.options.onExitComplete && r.options.onExitComplete()
}
)
}
scheduleRender() {
this.members.forEach(t=>{
t.instance && t.scheduleRender(!1)
}
)
}
removeLeadSnapshot() {
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0)
}
}
function yx(e, t, n) {
let r = "";
const i = e.x.translate / t.x
, s = e.y.translate / t.y
, o = (n == null ? void 0 : n.z) || 0;
if ((i || s || o) && (r = `translate3d(${i}px, ${s}px, ${o}px) `),
(t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `),
n) {
const {transformPerspective: u, rotate: c, rotateX: d, rotateY: f, skewX: h, skewY: m} = n;
u && (r = `perspective(${u}px) ${r}`),
c && (r += `rotate(${c}deg) `),
d && (r += `rotateX(${d}deg) `),
f && (r += `rotateY(${f}deg) `),
h && (r += `skewX(${h}deg) `),
m && (r += `skewY(${m}deg) `)
}
const a = e.x.scale * t.x
, l = e.y.scale * t.y;
return (a !== 1 || l !== 1) && (r += `scale(${a}, ${l})`),
r || "none"
}
const $6 = (e,t)=>e.depth - t.depth;
class I6 {
constructor() {
this.children = [],
this.isDirty = !1
}
add(t) {
Sy(this.children, t),
this.isDirty = !0
}
remove(t) {
Ey(this.children, t),
this.isDirty = !0
}
forEach(t) {
this.isDirty && this.children.sort($6),
this.isDirty = !1,
this.children.forEach(t)
}
}
function F6(e, t) {
const n = ji.now()
, r = ({timestamp: i})=>{
const s = i - n;
s >= t && (ei(r),
e(s - t))
}
;
return Xe.read(r, !0),
()=>ei(r)
}
function V6(e) {
window.MotionDebug && window.MotionDebug.record(e)
}
function z6(e) {
return e instanceof SVGElement && e.tagName !== "svg"
}
function U6(e, t, n) {
const r = sn(e) ? e : Xl(e);
return r.start(by("", r, t, n)),
r.animation
}
const ep = ["", "X", "Y", "Z"]
, B6 = {
visibility: "hidden"
}
, wx = 1e3;
let H6 = 0;
const ss = {
type: "projectionFrame",
totalNodes: 0,
resolvedTargetDeltas: 0,
recalculatedProjection: 0
};
function tp(e, t, n, r) {
const {latestValues: i} = t;
i[e] && (n[e] = i[e],
t.setStaticValue(e, 0),
r && (r[e] = 0))
}
function aT(e) {
if (e.hasCheckedOptimisedAppear = !0,
e.root === e)
return !1;
const {visualElement: t} = e.options;
return t ? K2(t) ? !0 : e.parent && !e.parent.hasCheckedOptimisedAppear ? aT(e.parent) : !1 : !1
}
function lT({attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i}) {
return class {
constructor(o={}, a=t == null ? void 0 : t()) {
this.id = H6++,
this.animationId = 0,
this.children = new Set,
this.options = {},
this.isTreeAnimating = !1,
this.isAnimationBlocked = !1,
this.isLayoutDirty = !1,
this.isProjectionDirty = !1,
this.isSharedProjectionDirty = !1,
this.isTransformDirty = !1,
this.updateManuallyBlocked = !1,
this.updateBlockedByResize = !1,
this.isUpdating = !1,
this.isSVG = !1,
this.needsReset = !1,
this.shouldResetTransform = !1,
this.hasCheckedOptimisedAppear = !1,
this.treeScale = {
x: 1,
y: 1
},
this.eventHandlers = new Map,
this.hasTreeAnimated = !1,
this.updateScheduled = !1,
this.projectionUpdateScheduled = !1,
this.checkUpdateFailed = ()=>{
this.isUpdating && (this.isUpdating = !1,
this.clearAllSnapshots())
}
,
this.updateProjection = ()=>{
this.projectionUpdateScheduled = !1,
ss.totalNodes = ss.resolvedTargetDeltas = ss.recalculatedProjection = 0,
this.nodes.forEach(K6),
this.nodes.forEach(J6),
this.nodes.forEach(Z6),
this.nodes.forEach(q6),
V6(ss)
}
,
this.hasProjected = !1,
this.isVisible = !0,
this.animationProgress = 0,
this.sharedNodes = new Map,
this.latestValues = o,
this.root = a ? a.root || a : this,
this.path = a ? [...a.path, a] : [],
this.parent = a,
this.depth = a ? a.depth + 1 : 0;
for (let l = 0; l < this.path.length; l++)
this.path[l].shouldResetTransform = !0;
this.root === this && (this.nodes = new I6)
}
addEventListener(o, a) {
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new Cy),
this.eventHandlers.get(o).add(a)
}
notifyListeners(o, ...a) {
const l = this.eventHandlers.get(o);
l && l.notify(...a)
}
hasListeners(o) {
return this.eventHandlers.has(o)
}
mount(o, a=this.root.hasTreeAnimated) {
if (this.instance)
return;
this.isSVG = z6(o),
this.instance = o;
const {layoutId: l, layout: u, visualElement: c} = this.options;
if (c && !c.current && c.mount(o),
this.root.nodes.add(this),
this.parent && this.parent.children.add(this),
a && (u || l) && (this.isLayoutDirty = !0),
e) {
let d;
const f = ()=>this.root.updateBlockedByResize = !1;
e(o, ()=>{
this.root.updateBlockedByResize = !0,
d && d(),
d = F6(f, 250),
Bc.hasAnimatedSinceResize && (Bc.hasAnimatedSinceResize = !1,
this.nodes.forEach(bx))
}
)
}
l && this.root.registerSharedNode(l, this),
this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({delta: d, hasLayoutChanged: f, hasRelativeTargetChanged: h, layout: m})=>{
if (this.isTreeAnimationBlocked()) {
this.target = void 0,
this.relativeTarget = void 0;
return
}
const p = this.options.transition || c.getDefaultTransition() || i8
, {onLayoutAnimationStart: b, onLayoutAnimationComplete: v} = c.getProps()
, g = !this.targetLayout || !oT(this.targetLayout, m) || h
, w = !f && h;
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || w || f && (g || !this.currentAnimation)) {
this.resumeFrom && (this.resumingFrom = this.resumeFrom,
this.resumingFrom.resumingFrom = void 0),
this.setAnimationOrigin(d, w);
const E = {
...fy(p, "layout"),
onPlay: b,
onComplete: v
};
(c.shouldReduceMotion || this.options.layoutRoot) && (E.delay = 0,
E.type = !1),
this.startAnimation(E)
} else
f || bx(this),
this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
this.targetLayout = m
}
)
}
unmount() {
this.options.layoutId && this.willUpdate(),
this.root.nodes.remove(this);
const o = this.getStack();
o && o.remove(this),
this.parent && this.parent.children.delete(this),
this.instance = void 0,
ei(this.updateProjection)
}
blockUpdate() {
this.updateManuallyBlocked = !0
}
unblockUpdate() {
this.updateManuallyBlocked = !1
}
isUpdateBlocked() {
return this.updateManuallyBlocked || this.updateBlockedByResize
}
isTreeAnimationBlocked() {
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1
}
startUpdate() {
this.isUpdateBlocked() || (this.isUpdating = !0,
this.nodes && this.nodes.forEach(e8),
this.animationId++)
}
getTransformTemplate() {
const {visualElement: o} = this.options;
return o && o.getProps().transformTemplate
}
willUpdate(o=!0) {
if (this.root.hasTreeAnimated = !0,
this.root.isUpdateBlocked()) {
this.options.onExitComplete && this.options.onExitComplete();
return
}
if (window.HandoffCancelAllAnimations && aT(this) && window.HandoffCancelAllAnimations(),
!this.root.isUpdating && this.root.startUpdate(),
this.isLayoutDirty)
return;
this.isLayoutDirty = !0;
for (let c = 0; c < this.path.length; c++) {
const d = this.path[c];
d.shouldResetTransform = !0,
d.updateScroll("snapshot"),
d.options.layoutRoot && d.willUpdate(!1)
}
const {layoutId: a, layout: l} = this.options;
if (a === void 0 && !l)
return;
const u = this.getTransformTemplate();
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0,
this.updateSnapshot(),
o && this.notifyListeners("willUpdate")
}
update() {
if (this.updateScheduled = !1,
this.isUpdateBlocked()) {
this.unblockUpdate(),
this.clearAllSnapshots(),
this.nodes.forEach(xx);
return
}
this.isUpdating || this.nodes.forEach(Y6),
this.isUpdating = !1,
this.nodes.forEach(X6),
this.nodes.forEach(W6),
this.nodes.forEach(G6),
this.clearAllSnapshots();
const a = ji.now();
Kt.delta = zi(0, 1e3 / 60, a - Kt.timestamp),
Kt.timestamp = a,
Kt.isProcessing = !0,
Hh.update.process(Kt),
Hh.preRender.process(Kt),
Hh.render.process(Kt),
Kt.isProcessing = !1
}
didUpdate() {
this.updateScheduled || (this.updateScheduled = !0,
Zv.read(()=>this.update()))
}
clearAllSnapshots() {
this.nodes.forEach(Q6),
this.sharedNodes.forEach(t8)
}
scheduleUpdateProjection() {
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
Xe.preRender(this.updateProjection, !1, !0))
}
scheduleCheckAfterUnmount() {
Xe.postRender(()=>{
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed()
}
)
}
updateSnapshot() {
this.snapshot || !this.instance || (this.snapshot = this.measure())
}
updateLayout() {
if (!this.instance || (this.updateScroll(),
!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
return;
if (this.resumeFrom && !this.resumeFrom.instance)
for (let l = 0; l < this.path.length; l++)
this.path[l].updateScroll();
const o = this.layout;
this.layout = this.measure(!1),
this.layoutCorrected = Ct(),
this.isLayoutDirty = !1,
this.projectionDelta = void 0,
this.notifyListeners("measure", this.layout.layoutBox);
const {visualElement: a} = this.options;
a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0)
}
updateScroll(o="measure") {
let a = !!(this.options.layoutScroll && this.instance);
this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === o && (a = !1),
a && (this.scroll = {
animationId: this.root.animationId,
phase: o,
isRoot: r(this.instance),
offset: n(this.instance)
})
}
resetTransform() {
if (!i)
return;
const o = this.isLayoutDirty || this.shouldResetTransform
, a = this.projectionDelta && !sT(this.projectionDelta)
, l = this.getTransformTemplate()
, u = l ? l(this.latestValues, "") : void 0
, c = u !== this.prevTransformTemplateValue;
o && (a || is(this.latestValues) || c) && (i(this.instance, u),
this.shouldResetTransform = !1,
this.scheduleRender())
}
measure(o=!0) {
const a = this.measurePageBox();
let l = this.removeElementScroll(a);
return o && (l = this.removeTransform(l)),
s8(l),
{
animationId: this.root.animationId,
measuredBox: a,
layoutBox: l,
latestValues: {},
source: this.id
}
}
measurePageBox() {
const {visualElement: o} = this.options;
if (!o)
return Ct();
const a = o.measureViewportBox()
, {scroll: l} = this.root;
return l && (hi(a.x, l.offset.x),
hi(a.y, l.offset.y)),
a
}
removeElementScroll(o) {
const a = Ct();
Fn(a, o);
for (let l = 0; l < this.path.length; l++) {
const u = this.path[l]
, {scroll: c, options: d} = u;
if (u !== this.root && c && d.layoutScroll) {
if (c.isRoot) {
Fn(a, o);
const {scroll: f} = this.root;
f && (hi(a.x, -f.offset.x),
hi(a.y, -f.offset.y))
}
hi(a.x, c.offset.x),
hi(a.y, c.offset.y)
}
}
return a
}
applyTransform(o, a=!1) {
const l = Ct();
Fn(l, o);
for (let u = 0; u < this.path.length; u++) {
const c = this.path[u];
!a && c.options.layoutScroll && c.scroll && c !== c.root && So(l, {
x: -c.scroll.offset.x,
y: -c.scroll.offset.y
}),
is(c.latestValues) && So(l, c.latestValues)
}
return is(this.latestValues) && So(l, this.latestValues),
l
}
removeTransform(o) {
const a = Ct();
Fn(a, o);
for (let l = 0; l < this.path.length; l++) {
const u = this.path[l];
if (!u.instance || !is(u.latestValues))
continue;
ag(u.latestValues) && u.updateSnapshot();
const c = Ct()
, d = u.measurePageBox();
Fn(c, d),
mx(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c)
}
return is(this.latestValues) && mx(a, this.latestValues),
a
}
setTargetDelta(o) {
this.targetDelta = o,
this.root.scheduleUpdateProjection(),
this.isProjectionDirty = !0
}
setOptions(o) {
this.options = {
...this.options,
...o,
crossfade: o.crossfade !== void 0 ? o.crossfade : !0
}
}
clearMeasurements() {
this.scroll = void 0,
this.layout = void 0,
this.snapshot = void 0,
this.prevTransformTemplateValue = void 0,
this.targetDelta = void 0,
this.target = void 0,
this.isLayoutDirty = !1
}
forceRelativeParentToResolveTarget() {
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== Kt.timestamp && this.relativeParent.resolveTargetDelta(!0)
}
resolveTargetDelta(o=!1) {
var a;
const l = this.getLead();
this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty),
this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty),
this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
const u = !!this.resumingFrom || this !== l;
if (!(o || u && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget))
return;
const {layout: d, layoutId: f} = this.options;
if (!(!this.layout || !(d || f))) {
if (this.resolvedRelativeTargetAt = Kt.timestamp,
!this.targetDelta && !this.relativeTarget) {
const h = this.getClosestProjectingParent();
h && h.layout && this.animationProgress !== 1 ? (this.relativeParent = h,
this.forceRelativeParentToResolveTarget(),
this.relativeTarget = Ct(),
this.relativeTargetOrigin = Ct(),
pl(this.relativeTargetOrigin, this.layout.layoutBox, h.layout.layoutBox),
Fn(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0
}
if (!(!this.relativeTarget && !this.targetDelta)) {
if (this.target || (this.target = Ct(),
this.targetWithTransforms = Ct()),
this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
o6(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Fn(this.target, this.layout.layoutBox),
Z2(this.target, this.targetDelta)) : Fn(this.target, this.layout.layoutBox),
this.attemptToResolveRelativeTarget) {
this.attemptToResolveRelativeTarget = !1;
const h = this.getClosestProjectingParent();
h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? (this.relativeParent = h,
this.forceRelativeParentToResolveTarget(),
this.relativeTarget = Ct(),
this.relativeTargetOrigin = Ct(),
pl(this.relativeTargetOrigin, this.target, h.target),
Fn(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0
}
ss.resolvedTargetDeltas++
}
}
}
getClosestProjectingParent() {
if (!(!this.parent || ag(this.parent.latestValues) || J2(this.parent.latestValues)))
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent()
}
isProjecting() {
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout)
}
calcProjection() {
var o;
const a = this.getLead()
, l = !!this.resumingFrom || this !== a;
let u = !0;
if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (u = !1),
l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1),
this.resolvedRelativeTargetAt === Kt.timestamp && (u = !1),
u)
return;
const {layout: c, layoutId: d} = this.options;
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation),
this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0),
!this.layout || !(c || d))
return;
Fn(this.layoutCorrected, this.layout.layoutBox);
const f = this.treeScale.x
, h = this.treeScale.y;
m6(this.layoutCorrected, this.treeScale, this.path, l),
a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox,
a.targetWithTransforms = Ct());
const {target: m} = a;
if (!m) {
this.projectionTransform && (this.projectionDelta = bo(),
this.projectionTransform = "none",
this.scheduleRender());
return
}
this.projectionDelta || (this.projectionDelta = bo(),
this.projectionDeltaWithTransform = bo());
const p = this.projectionTransform;
hl(this.projectionDelta, this.layoutCorrected, m, this.latestValues),
this.projectionTransform = yx(this.projectionDelta, this.treeScale),
(this.projectionTransform !== p || this.treeScale.x !== f || this.treeScale.y !== h) && (this.hasProjected = !0,
this.scheduleRender(),
this.notifyListeners("projectionUpdate", m)),
ss.recalculatedProjection++
}
hide() {
this.isVisible = !1
}
show() {
this.isVisible = !0
}
scheduleRender(o=!0) {
if (this.options.scheduleRender && this.options.scheduleRender(),
o) {
const a = this.getStack();
a && a.scheduleRender()
}
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0)
}
setAnimationOrigin(o, a=!1) {
const l = this.snapshot
, u = l ? l.latestValues : {}
, c = {
...this.latestValues
}
, d = bo();
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0),
this.attemptToResolveRelativeTarget = !a;
const f = Ct()
, h = l ? l.source : void 0
, m = this.layout ? this.layout.source : void 0
, p = h !== m
, b = this.getStack()
, v = !b || b.members.length <= 1
, g = !!(p && !v && this.options.crossfade === !0 && !this.path.some(r8));
this.animationProgress = 0;
let w;
this.mixTargetDelta = E=>{
const D = E / 1e3;
Sx(d.x, o.x, D),
Sx(d.y, o.y, D),
this.setTargetDelta(d),
this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (pl(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox),
n8(this.relativeTarget, this.relativeTargetOrigin, f, D),
w && M6(this.relativeTarget, w) && (this.isProjectionDirty = !1),
w || (w = Ct()),
Fn(w, this.relativeTarget)),
p && (this.animationValues = c,
k6(c, u, this.latestValues, D, g, v)),
this.root.scheduleUpdateProjection(),
this.scheduleRender(),
this.animationProgress = D
}
,
this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0)
}
startAnimation(o) {
this.notifyListeners("animationStart"),
this.currentAnimation && this.currentAnimation.stop(),
this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(),
this.pendingAnimation && (ei(this.pendingAnimation),
this.pendingAnimation = void 0),
this.pendingAnimation = Xe.update(()=>{
Bc.hasAnimatedSinceResize = !0,
this.currentAnimation = U6(0, wx, {
...o,
onUpdate: a=>{
this.mixTargetDelta(a),
o.onUpdate && o.onUpdate(a)
}
,
onComplete: ()=>{
o.onComplete && o.onComplete(),
this.completeAnimation()
}
}),
this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation),
this.pendingAnimation = void 0
}
)
}
completeAnimation() {
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0,
this.resumingFrom.preserveOpacity = void 0);
const o = this.getStack();
o && o.exitAnimationComplete(),
this.resumingFrom = this.currentAnimation = this.animationValues = void 0,
this.notifyListeners("animationComplete")
}
finishAnimation() {
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(wx),
this.currentAnimation.stop()),
this.completeAnimation()
}
applyTransformsToTarget() {
const o = this.getLead();
let {targetWithTransforms: a, target: l, layout: u, latestValues: c} = o;
if (!(!a || !l || !u)) {
if (this !== o && this.layout && u && uT(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
l = this.target || Ct();
const d = Mn(this.layout.layoutBox.x);
l.x.min = o.target.x.min,
l.x.max = l.x.min + d;
const f = Mn(this.layout.layoutBox.y);
l.y.min = o.target.y.min,
l.y.max = l.y.min + f
}
Fn(a, l),
So(a, c),
hl(this.projectionDeltaWithTransform, this.layoutCorrected, a, c)
}
}
registerSharedNode(o, a) {
this.sharedNodes.has(o) || this.sharedNodes.set(o, new j6),
this.sharedNodes.get(o).add(a);
const u = a.options.initialPromotionConfig;
a.promote({
transition: u ? u.transition : void 0,
preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
})
}
isLead() {
const o = this.getStack();
return o ? o.lead === this : !0
}
getLead() {
var o;
const {layoutId: a} = this.options;
return a ? ((o = this.getStack()) === null || o === void 0 ? void 0 : o.lead) || this : this
}
getPrevLead() {
var o;
const {layoutId: a} = this.options;
return a ? (o = this.getStack()) === null || o === void 0 ? void 0 : o.prevLead : void 0
}
getStack() {
const {layoutId: o} = this.options;
if (o)
return this.root.sharedNodes.get(o)
}
promote({needsReset: o, transition: a, preserveFollowOpacity: l}={}) {
const u = this.getStack();
u && u.promote(this, l),
o && (this.projectionDelta = void 0,
this.needsReset = !0),
a && this.setOptions({
transition: a
})
}
relegate() {
const o = this.getStack();
return o ? o.relegate(this) : !1
}
resetSkewAndRotation() {
const {visualElement: o} = this.options;
if (!o)
return;
let a = !1;
const {latestValues: l} = o;
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0),
!a)
return;
const u = {};
l.z && tp("z", o, u, this.animationValues);
for (let c = 0; c < ep.length; c++)
tp(`rotate${ep[c]}`, o, u, this.animationValues),
tp(`skew${ep[c]}`, o, u, this.animationValues);
o.render();
for (const c in u)
o.setStaticValue(c, u[c]),
this.animationValues && (this.animationValues[c] = u[c]);
o.scheduleRender()
}
getProjectionStyles(o) {
var a, l;
if (!this.instance || this.isSVG)
return;
if (!this.isVisible)
return B6;
const u = {
visibility: ""
}
, c = this.getTransformTemplate();
if (this.needsReset)
return this.needsReset = !1,
u.opacity = "",
u.pointerEvents = zc(o == null ? void 0 : o.pointerEvents) || "",
u.transform = c ? c(this.latestValues, "") : "none",
u;
const d = this.getLead();
if (!this.projectionDelta || !this.layout || !d.target) {
const p = {};
return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1,
p.pointerEvents = zc(o == null ? void 0 : o.pointerEvents) || ""),
this.hasProjected && !is(this.latestValues) && (p.transform = c ? c({}, "") : "none",
this.hasProjected = !1),
p
}
const f = d.animationValues || d.latestValues;
this.applyTransformsToTarget(),
u.transform = yx(this.projectionDeltaWithTransform, this.treeScale, f),
c && (u.transform = c(f, u.transform));
const {x: h, y: m} = this.projectionDelta;
u.transformOrigin = `${h.origin * 100}% ${m.origin * 100}% 0`,
d.animationValues ? u.opacity = d === this ? (l = (a = f.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : u.opacity = d === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
for (const p in Ld) {
if (f[p] === void 0)
continue;
const {correct: b, applyTo: v} = Ld[p]
, g = u.transform === "none" ? f[p] : b(f[p], d);
if (v) {
const w = v.length;
for (let E = 0; E < w; E++)
u[v[E]] = g
} else
u[p] = g
}
return this.options.layoutId && (u.pointerEvents = d === this ? zc(o == null ? void 0 : o.pointerEvents) || "" : "none"),
u
}
clearSnapshot() {
this.resumeFrom = this.snapshot = void 0
}
resetTree() {
this.root.nodes.forEach(o=>{
var a;
return (a = o.currentAnimation) === null || a === void 0 ? void 0 : a.stop()
}
),
this.root.nodes.forEach(xx),
this.root.sharedNodes.clear()
}
}
}
function W6(e) {
e.updateLayout()
}
function G6(e) {
var t;
const n = ((t = e.resumeFrom) === null || t === void 0 ? void 0 : t.snapshot) || e.snapshot;
if (e.isLead() && e.layout && n && e.hasListeners("didUpdate")) {
const {layoutBox: r, measuredBox: i} = e.layout
, {animationType: s} = e.options
, o = n.source !== e.layout.source;
s === "size" ? Vn(d=>{
const f = o ? n.measuredBox[d] : n.layoutBox[d]
, h = Mn(f);
f.min = r[d].min,
f.max = f.min + h
}
) : uT(s, n.layoutBox, r) && Vn(d=>{
const f = o ? n.measuredBox[d] : n.layoutBox[d]
, h = Mn(r[d]);
f.max = f.min + h,
e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0,
e.relativeTarget[d].max = e.relativeTarget[d].min + h)
}
);
const a = bo();
hl(a, r, n.layoutBox);
const l = bo();
o ? hl(l, e.applyTransform(i, !0), n.measuredBox) : hl(l, r, n.layoutBox);
const u = !sT(a);
let c = !1;
if (!e.resumeFrom) {
const d = e.getClosestProjectingParent();
if (d && !d.resumeFrom) {
const {snapshot: f, layout: h} = d;
if (f && h) {
const m = Ct();
pl(m, n.layoutBox, f.layoutBox);
const p = Ct();
pl(p, r, h.layoutBox),
oT(m, p) || (c = !0),
d.options.layoutRoot && (e.relativeTarget = p,
e.relativeTargetOrigin = m,
e.relativeParent = d)
}
}
}
e.notifyListeners("didUpdate", {
layout: r,
snapshot: n,
delta: l,
layoutDelta: a,
hasLayoutChanged: u,
hasRelativeTargetChanged: c
})
} else if (e.isLead()) {
const {onExitComplete: r} = e.options;
r && r()
}
e.options.transition = void 0
}
function K6(e) {
ss.totalNodes++,
e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty),
e.isSharedProjectionDirty || (e.isSharedProjectionDirty = !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty)),
e.isTransformDirty || (e.isTransformDirty = e.parent.isTransformDirty))
}
function q6(e) {
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1
}
function Q6(e) {
e.clearSnapshot()
}
function xx(e) {
e.clearMeasurements()
}
function Y6(e) {
e.isLayoutDirty = !1
}
function X6(e) {
const {visualElement: t} = e.options;
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"),
e.resetTransform()
}
function bx(e) {
e.finishAnimation(),
e.targetDelta = e.relativeTarget = e.target = void 0,
e.isProjectionDirty = !0
}
function J6(e) {
e.resolveTargetDelta()
}
function Z6(e) {
e.calcProjection()
}
function e8(e) {
e.resetSkewAndRotation()
}
function t8(e) {
e.removeLeadSnapshot()
}
function Sx(e, t, n) {
e.translate = vt(t.translate, 0, n),
e.scale = vt(t.scale, 1, n),
e.origin = t.origin,
e.originPoint = t.originPoint
}
function Ex(e, t, n, r) {
e.min = vt(t.min, n.min, r),
e.max = vt(t.max, n.max, r)
}
function n8(e, t, n, r) {
Ex(e.x, t.x, n.x, r),
Ex(e.y, t.y, n.y, r)
}
function r8(e) {
return e.animationValues && e.animationValues.opacityExit !== void 0
}
const i8 = {
duration: .45,
ease: [.4, 0, .1, 1]
}
, Cx = e=>typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e)
, Px = Cx("applewebkit/") && !Cx("chrome/") ? Math.round : on;
function Tx(e) {
e.min = Px(e.min),
e.max = Px(e.max)
}
function s8(e) {
Tx(e.x),
Tx(e.y)
}
function uT(e, t, n) {
return e === "position" || e === "preserve-aspect" && !sg(vx(t), vx(n), .2)
}
const o8 = lT({
attachResizeListener: (e,t)=>Vr(e, "resize", t),
measureScroll: ()=>({
x: document.documentElement.scrollLeft || document.body.scrollLeft,
y: document.documentElement.scrollTop || document.body.scrollTop
}),
checkIsScrollRoot: ()=>!0
})
, np = {
current: void 0
}
, cT = lT({
measureScroll: e=>({
x: e.scrollLeft,
y: e.scrollTop
}),
defaultParent: ()=>{
if (!np.current) {
const e = new o8({});
e.mount(window),
e.setOptions({
layoutScroll: !0
}),
np.current = e
}
return np.current
}
,
resetTransform: (e,t)=>{
e.style.transform = t !== void 0 ? t : "none"
}
,
checkIsScrollRoot: e=>window.getComputedStyle(e).position === "fixed"
})
, a8 = {
pan: {
Feature: E6
},
drag: {
Feature: S6,
ProjectionNode: cT,
MeasureLayout: nT
}
}
, ug = {
current: null
}
, dT = {
current: !1
};
function l8() {
if (dT.current = !0,
!!Yv)
if (window.matchMedia) {
const e = window.matchMedia("(prefers-reduced-motion)")
, t = ()=>ug.current = e.matches;
e.addListener(t),
t()
} else
ug.current = !1
}
function u8(e, t, n) {
const {willChange: r} = t;
for (const i in t) {
const s = t[i]
, o = n[i];
if (sn(s))
e.addValue(i, s),
Id(r) && r.add(i);
else if (sn(o))
e.addValue(i, Xl(s, {
owner: e
})),
Id(r) && r.remove(i);
else if (o !== s)
if (e.hasValue(i)) {
const a = e.getValue(i);
a.liveStyle === !0 ? a.jump(s) : a.hasAnimated || a.set(s)
} else {
const a = e.getStaticValue(i);
e.addValue(i, Xl(a !== void 0 ? a : s, {
owner: e
}))
}
}
for (const i in n)
t[i] === void 0 && e.removeValue(i);
return t
}
const Rx = new WeakMap
, c8 = [...b2, nn, Ui]
, d8 = e=>c8.find(x2(e))
, fT = Object.keys(ql)
, f8 = fT.length
, Ox = ["AnimationStart", "AnimationComplete", "Update", "BeforeLayoutMeasure", "LayoutMeasure", "LayoutAnimationStart", "LayoutAnimationComplete"]
, h8 = ty.length;
function hT(e) {
if (e)
return e.options.allowProjection !== !1 ? e.projection : hT(e.parent)
}
class p8 {
scrapeMotionValuesFromProps(t, n, r) {
return {}
}
constructor({parent: t, props: n, presenceContext: r, reducedMotionConfig: i, blockInitialAnimation: s, visualState: o}, a={}) {
this.resolveKeyframes = (f,h,m,p)=>new this.KeyframeResolver(f,h,m,p,this),
this.current = null,
this.children = new Set,
this.isVariantNode = !1,
this.isControllingVariants = !1,
this.shouldReduceMotion = null,
this.values = new Map,
this.KeyframeResolver = hy,
this.features = {},
this.valueSubscriptions = new Map,
this.prevMotionValues = {},
this.events = {},
this.propEventSubscriptions = {},
this.notifyUpdate = ()=>this.notify("Update", this.latestValues),
this.render = ()=>{
this.current && (this.triggerBuild(),
this.renderInstance(this.current, this.renderState, this.props.style, this.projection))
}
,
this.scheduleRender = ()=>Xe.render(this.render, !1, !0);
const {latestValues: l, renderState: u} = o;
this.latestValues = l,
this.baseTarget = {
...l
},
this.initialValues = n.initial ? {
...l
} : {},
this.renderState = u,
this.parent = t,
this.props = n,
this.presenceContext = r,
this.depth = t ? t.depth + 1 : 0,
this.reducedMotionConfig = i,
this.options = a,
this.blockInitialAnimation = !!s,
this.isControllingVariants = If(n),
this.isVariantNode = YP(n),
this.isVariantNode && (this.variantChildren = new Set),
this.manuallyAnimateOnMount = !!(t && t.current);
const {willChange: c, ...d} = this.scrapeMotionValuesFromProps(n, {}, this);
for (const f in d) {
const h = d[f];
l[f] !== void 0 && sn(h) && (h.set(l[f], !1),
Id(c) && c.add(f))
}
}
mount(t) {
this.current = t,
Rx.set(t, this),
this.projection && !this.projection.instance && this.projection.mount(t),
this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)),
this.values.forEach((n,r)=>this.bindToMotionValue(r, n)),
dT.current || l8(),
this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : ug.current,
this.parent && this.parent.children.add(this),
this.update(this.props, this.presenceContext)
}
unmount() {
var t;
Rx.delete(this.current),
this.projection && this.projection.unmount(),
ei(this.notifyUpdate),
ei(this.render),
this.valueSubscriptions.forEach(n=>n()),
this.removeFromVariantTree && this.removeFromVariantTree(),
this.parent && this.parent.children.delete(this);
for (const n in this.events)
this.events[n].clear();
for (const n in this.features)
(t = this.features[n]) === null || t === void 0 || t.unmount();
this.current = null
}
bindToMotionValue(t, n) {
const r = Hs.has(t)
, i = n.on("change", o=>{
this.latestValues[t] = o,
this.props.onUpdate && Xe.preRender(this.notifyUpdate),
r && this.projection && (this.projection.isTransformDirty = !0)
}
)
, s = n.on("renderRequest", this.scheduleRender);
this.valueSubscriptions.set(t, ()=>{
i(),
s(),
n.owner && n.stop()
}
)
}
sortNodePosition(t) {
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current)
}
loadFeatures({children: t, ...n}, r, i, s) {
let o, a;
for (let l = 0; l < f8; l++) {
const u = fT[l]
, {isEnabled: c, Feature: d, ProjectionNode: f, MeasureLayout: h} = ql[u];
f && (o = f),
c(n) && (!this.features[u] && d && (this.features[u] = new d(this)),
h && (a = h))
}
if ((this.type === "html" || this.type === "svg") && !this.projection && o) {
const {layoutId: l, layout: u, drag: c, dragConstraints: d, layoutScroll: f, layoutRoot: h} = n;
this.projection = new o(this.latestValues,n["data-framer-portal-id"] ? void 0 : hT(this.parent)),
this.projection.setOptions({
layoutId: l,
layout: u,
alwaysMeasureLayout: !!c || d && wo(d),
visualElement: this,
scheduleRender: ()=>this.scheduleRender(),
animationType: typeof u == "string" ? u : "both",
initialPromotionConfig: s,
layoutScroll: f,
layoutRoot: h
})
}
return a
}
updateFeatures() {
for (const t in this.features) {
const n = this.features[t];
n.isMounted ? n.update() : (n.mount(),
n.isMounted = !0)
}
}
triggerBuild() {
this.build(this.renderState, this.latestValues, this.options, this.props)
}
measureViewportBox() {
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ct()
}
getStaticValue(t) {
return this.latestValues[t]
}
setStaticValue(t, n) {
this.latestValues[t] = n
}
update(t, n) {
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(),
this.prevProps = this.props,
this.props = t,
this.prevPresenceContext = this.presenceContext,
this.presenceContext = n;
for (let r = 0; r < Ox.length; r++) {
const i = Ox[r];
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](),
delete this.propEventSubscriptions[i]);
const s = "on" + i
, o = t[s];
o && (this.propEventSubscriptions[i] = this.on(i, o))
}
this.prevMotionValues = u8(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues),
this.handleChildMotionValue && this.handleChildMotionValue()
}
getProps() {
return this.props
}
getVariant(t) {
return this.props.variants ? this.props.variants[t] : void 0
}
getDefaultTransition() {
return this.props.transition
}
getTransformPagePoint() {
return this.props.transformPagePoint
}
getClosestVariantNode() {
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0
}
getVariantContext(t=!1) {
if (t)
return this.parent ? this.parent.getVariantContext() : void 0;
if (!this.isControllingVariants) {
const r = this.parent ? this.parent.getVariantContext() || {} : {};
return this.props.initial !== void 0 && (r.initial = this.props.initial),
r
}
const n = {};
for (let r = 0; r < h8; r++) {
const i = ty[r]
, s = this.props[i];
(Kl(s) || s === !1) && (n[i] = s)
}
return n
}
addVariantChild(t) {
const n = this.getClosestVariantNode();
if (n)
return n.variantChildren && n.variantChildren.add(t),
()=>n.variantChildren.delete(t)
}
addValue(t, n) {
const r = this.values.get(t);
n !== r && (r && this.removeValue(t),
this.bindToMotionValue(t, n),
this.values.set(t, n),
this.latestValues[t] = n.get())
}
removeValue(t) {
this.values.delete(t);
const n = this.valueSubscriptions.get(t);
n && (n(),
this.valueSubscriptions.delete(t)),
delete this.latestValues[t],
this.removeValueFromRenderState(t, this.renderState)
}
hasValue(t) {
return this.values.has(t)
}
getValue(t, n) {
if (this.props.values && this.props.values[t])
return this.props.values[t];
let r = this.values.get(t);
return r === void 0 && n !== void 0 && (r = Xl(n === null ? void 0 : n, {
owner: this
}),
this.addValue(t, r)),
r
}
readValue(t, n) {
var r;
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (r = this.getBaseTargetFromProps(this.props, t)) !== null && r !== void 0 ? r : this.readValueFromInstance(this.current, t, this.options);
return i != null && (typeof i == "string" && (y2(i) || v2(i)) ? i = parseFloat(i) : !d8(i) && Ui.test(n) && (i = k2(t, n)),
this.setBaseTarget(t, sn(i) ? i.get() : i)),
sn(i) ? i.get() : i
}
setBaseTarget(t, n) {
this.baseTarget[t] = n
}
getBaseTarget(t) {
var n;
const {initial: r} = this.props;
let i;
if (typeof r == "string" || typeof r == "object") {
const o = dy(this.props, r, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
o && (i = o[t])
}
if (r && i !== void 0)
return i;
const s = this.getBaseTargetFromProps(this.props, t);
return s !== void 0 && !sn(s) ? s : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t]
}
on(t, n) {
return this.events[t] || (this.events[t] = new Cy),
this.events[t].add(n)
}
notify(t, ...n) {
this.events[t] && this.events[t].notify(...n)
}
}
class pT extends p8 {
constructor() {
super(...arguments),
this.KeyframeResolver = _2
}
sortInstanceNodePosition(t, n) {
return t.compareDocumentPosition(n) & 2 ? 1 : -1
}
getBaseTargetFromProps(t, n) {
return t.style ? t.style[n] : void 0
}
removeValueFromRenderState(t, {vars: n, style: r}) {
delete n[t],
delete r[t]
}
}
function m8(e) {
return window.getComputedStyle(e)
}
class g8 extends pT {
constructor() {
super(...arguments),
this.type = "html"
}
readValueFromInstance(t, n) {
if (Hs.has(n)) {
const r = my(n);
return r && r.default || 0
} else {
const r = m8(t)
, i = (e2(n) ? r.getPropertyValue(n) : r[n]) || 0;
return typeof i == "string" ? i.trim() : i
}
}
measureInstanceViewportBox(t, {transformPagePoint: n}) {
return eT(t, n)
}
build(t, n, r, i) {
oy(t, n, r, i.transformTemplate)
}
scrapeMotionValuesFromProps(t, n, r) {
return cy(t, n, r)
}
handleChildMotionValue() {
this.childSubscription && (this.childSubscription(),
delete this.childSubscription);
const {children: t} = this.props;
sn(t) && (this.childSubscription = t.on("change", n=>{
this.current && (this.current.textContent = `${n}`)
}
))
}
renderInstance(t, n, r, i) {
s2(t, n, r, i)
}
}
class v8 extends pT {
constructor() {
super(...arguments),
this.type = "svg",
this.isSVGTag = !1
}
getBaseTargetFromProps(t, n) {
return t[n]
}
readValueFromInstance(t, n) {
if (Hs.has(n)) {
const r = my(n);
return r && r.default || 0
}
return n = o2.has(n) ? n : Jv(n),
t.getAttribute(n)
}
measureInstanceViewportBox() {
return Ct()
}
scrapeMotionValuesFromProps(t, n, r) {
return l2(t, n, r)
}
build(t, n, r, i) {
ly(t, n, r, this.isSVGTag, i.transformTemplate)
}
renderInstance(t, n, r, i) {
a2(t, n, r, i)
}
mount(t) {
this.isSVGTag = uy(t.tagName),
super.mount(t)
}
}
const y8 = (e,t)=>ry(e) ? new v8(t,{
enableHardwareAcceleration: !1
}) : new g8(t,{
allowProjection: e !== y.Fragment,
enableHardwareAcceleration: !0
})
, w8 = {
layout: {
ProjectionNode: cT,
MeasureLayout: nT
}
}
, x8 = {
...n6,
...dI,
...a8,
...w8
}
, Hc = b$((e,t)=>J$(e, t, x8, y8));
function mT() {
const e = y.useRef(!1);
return Xv(()=>(e.current = !0,
()=>{
e.current = !1
}
), []),
e
}
function b8() {
const e = mT()
, [t,n] = y.useState(0)
, r = y.useCallback(()=>{
e.current && n(t + 1)
}
, [t]);
return [y.useCallback(()=>Xe.postRender(r), [r]), t]
}
class S8 extends y.Component {
getSnapshotBeforeUpdate(t) {
const n = this.props.childRef.current;
if (n && t.isPresent && !this.props.isPresent) {
const r = this.props.sizeRef.current;
r.height = n.offsetHeight || 0,
r.width = n.offsetWidth || 0,
r.top = n.offsetTop,
r.left = n.offsetLeft
}
return null
}
componentDidUpdate() {}
render() {
return this.props.children
}
}
function E8({children: e, isPresent: t}) {
const n = y.useId()
, r = y.useRef(null)
, i = y.useRef({
width: 0,
height: 0,
top: 0,
left: 0
})
, {nonce: s} = y.useContext(Qv);
return y.useInsertionEffect(()=>{
const {width: o, height: a, top: l, left: u} = i.current;
if (t || !r.current || !o || !a)
return;
r.current.dataset.motionPopId = n;
const c = document.createElement("style");
return s && (c.nonce = s),
document.head.appendChild(c),
c.sheet && c.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${a}px !important;
top: ${l}px !important;
left: ${u}px !important;
}
`),
()=>{
document.head.removeChild(c)
}
}
, [t]),
x.jsx(S8, {
isPresent: t,
childRef: r,
sizeRef: i,
children: y.cloneElement(e, {
ref: r
})
})
}
const rp = ({children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: s, mode: o})=>{
const a = u2(C8)
, l = y.useId()
, u = y.useMemo(()=>({
id: l,
initial: t,
isPresent: n,
custom: i,
onExitComplete: c=>{
a.set(c, !0);
for (const d of a.values())
if (!d)
return;
r && r()
}
,
register: c=>(a.set(c, !1),
()=>a.delete(c))
}), s ? [Math.random()] : [n]);
return y.useMemo(()=>{
a.forEach((c,d)=>a.set(d, !1))
}
, [n]),
y.useEffect(()=>{
!n && !a.size && r && r()
}
, [n]),
o === "popLayout" && (e = x.jsx(E8, {
isPresent: n,
children: e
})),
x.jsx(jf.Provider, {
value: u,
children: e
})
}
;
function C8() {
return new Map
}
function P8(e) {
return y.useEffect(()=>()=>e(), [])
}
const os = e=>e.key || "";
function T8(e, t) {
e.forEach(n=>{
const r = os(n);
t.set(r, n)
}
)
}
function R8(e) {
const t = [];
return y.Children.forEach(e, n=>{
y.isValidElement(n) && t.push(n)
}
),
t
}
const O8 = ({children: e, custom: t, initial: n=!0, onExitComplete: r, exitBeforeEnter: i, presenceAffectsLayout: s=!0, mode: o="sync"})=>{
const a = y.useContext(ny).forceRender || b8()[0]
, l = mT()
, u = R8(e);
let c = u;
const d = y.useRef(new Map).current
, f = y.useRef(c)
, h = y.useRef(new Map).current
, m = y.useRef(!0);
if (Xv(()=>{
m.current = !1,
T8(u, h),
f.current = c
}
),
P8(()=>{
m.current = !0,
h.clear(),
d.clear()
}
),
m.current)
return x.jsx(x.Fragment, {
children: c.map(g=>x.jsx(rp, {
isPresent: !0,
initial: n ? void 0 : !1,
presenceAffectsLayout: s,
mode: o,
children: g
}, os(g)))
});
c = [...c];
const p = f.current.map(os)
, b = u.map(os)
, v = p.length;
for (let g = 0; g < v; g++) {
const w = p[g];
b.indexOf(w) === -1 && !d.has(w) && d.set(w, void 0)
}
return o === "wait" && d.size && (c = []),
d.forEach((g,w)=>{
if (b.indexOf(w) !== -1)
return;
const E = h.get(w);
if (!E)
return;
const D = p.indexOf(w);
let V = g;
if (!V) {
const C = ()=>{
d.delete(w);
const P = Array.from(h.keys()).filter(A=>!b.includes(A));
if (P.forEach(A=>h.delete(A)),
f.current = u.filter(A=>{
const B = os(A);
return B === w || P.includes(B)
}
),
!d.size) {
if (l.current === !1)
return;
a(),
r && r()
}
}
;
V = x.jsx(rp, {
isPresent: !1,
onExitComplete: C,
custom: t,
presenceAffectsLayout: s,
mode: o,
children: E
}, os(E)),
d.set(w, V)
}
c.splice(D, 0, V)
}
),
c = c.map(g=>{
const w = g.key;
return d.has(w) ? g : x.jsx(rp, {
isPresent: !0,
presenceAffectsLayout: s,
mode: o,
children: g
}, os(g))
}
),
x.jsx(x.Fragment, {
children: d.size ? c : c.map(g=>y.cloneElement(g))
})
}
, k8 = ()=>{
const {isDialogOpen: e, setIsDialogOpen: t} = yf("all")
, n = ()=>{
e && t(!1)
}
;
return x.jsx(O8, {
children: x.jsx(Hc.div, {
onClick: n,
className: "fixed top-0 z-40 h-full w-full bg-black/80 backdrop-blur-[2px]",
initial: {
opacity: 0,
zIndex: 40
},
animate: {
opacity: e ? 1 : 0,
zIndex: e ? 40 : -1
},
transition: {
delay: 0
}
})
})
}
, gT = "Progress"
, Uf = 100
, [_8,jz] = Ru(gT)
, [A8,D8] = _8(gT)
, vT = y.forwardRef((e,t)=>{
const {__scopeProgress: n, value: r, max: i, getValueLabel: s=M8, ...o} = e
, a = cg(i) ? i : Uf
, l = wT(r, a) ? r : null
, u = Vd(l) ? s(l, a) : void 0;
return y.createElement(A8, {
scope: n,
value: l,
max: a
}, y.createElement(ln.div, qe({
"aria-valuemax": a,
"aria-valuemin": 0,
"aria-valuenow": Vd(l) ? l : void 0,
"aria-valuetext": u,
role: "progressbar",
"data-state": yT(l, a),
"data-value": l ?? void 0,
"data-max": a
}, o, {
ref: t
})))
}
);
vT.propTypes = {
max(e, t, n) {
const r = e[t]
, i = String(r);
return r && !cg(r) ? new Error(j8(i, n)) : null
},
value(e, t, n) {
const r = e[t]
, i = String(r)
, s = cg(e.max) ? e.max : Uf;
return r != null && !wT(r, s) ? new Error($8(i, n)) : null
}
};
const L8 = "ProgressIndicator"
, N8 = y.forwardRef((e,t)=>{
var n;
const {__scopeProgress: r, ...i} = e
, s = D8(L8, r);
return y.createElement(ln.div, qe({
"data-state": yT(s.value, s.max),
"data-value": (n = s.value) !== null && n !== void 0 ? n : void 0,
"data-max": s.max
}, i, {
ref: t
}))
}
);
function M8(e, t) {
return `${Math.round(e / t * 100)}%`
}
function yT(e, t) {
return e == null ? "indeterminate" : e === t ? "complete" : "loading"
}
function Vd(e) {
return typeof e == "number"
}
function cg(e) {
return Vd(e) && !isNaN(e) && e > 0
}
function wT(e, t) {
return Vd(e) && !isNaN(e) && e <= t && e >= 0
}
function j8(e, t) {
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Uf}\`.`
}
function $8(e, t) {
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
- a positive number
- less than the value passed to \`max\` (or ${Uf} if no \`max\` prop is set)
- \`null\` if the progress is indeterminate.
Defaulting to \`null\`.`
}
const xT = vT
, I8 = N8
, Nu = y.forwardRef(({className: e, value: t, ...n},r)=>{
const i = (t || 0) / 100
, s = Math.round(i * 100);
return x.jsxs("div", {
className: "relative flex items-center rounded-full border border-graphite-light bg-graphite-dark p-[3.2px]",
children: [x.jsx(xT, {
ref: r,
className: Ze("relative h-4 w-full overflow-hidden rounded-full", e),
...n,
children: x.jsx(I8, {
className: "h-full w-full flex-1 rounded-full bg-heat-progress-gradient shadow-progress-glow transition-all",
style: {
width: `${s}%`
}
})
}), x.jsx(F8, {
widthPercent: s
})]
})
}
)
, F8 = e=>x.jsx("div", {
className: "absolute h-fit w-full transition-all",
style: {
width: `${e.widthPercent}%`,
display: e.widthPercent >= 4 ? "block" : "none"
},
children: x.jsxs("svg", {
width: "24",
height: "32",
viewBox: "0 0 24 32",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
className: "absolute -top-4 translate-x-1.5",
style: {
right: `calc(${e.widthPercent / 35}%)`
},
children: [x.jsx("g", {
filter: "url(#filter0_f_2177_765)",
children: x.jsx("rect", {
x: "8",
y: "8",
width: "8",
height: "16",
rx: "4",
fill: "#FFF4CD"
})
}), x.jsx("g", {
filter: "url(#filter1_f_2177_765)",
children: x.jsx("rect", {
x: "11",
y: "11",
width: "5",
height: "10",
rx: "2.5",
fill: "#FFF4CD"
})
}), x.jsx("g", {
filter: "url(#filter2_f_2177_765)",
children: x.jsx("rect", {
width: "2",
height: "4",
rx: "1",
transform: "matrix(-1 0 0 1 16 14)",
fill: "#FFFCF3"
})
}), x.jsxs("defs", {
children: [x.jsxs("filter", {
id: "filter0_f_2177_765",
x: "0",
y: "0",
width: "24",
height: "32",
filterUnits: "userSpaceOnUse",
colorInterpolationFilters: "sRGB",
children: [x.jsx("feFlood", {
floodOpacity: "0",
result: "BackgroundImageFix"
}), x.jsx("feBlend", {
mode: "normal",
in: "SourceGraphic",
in2: "BackgroundImageFix",
result: "shape"
}), x.jsx("feGaussianBlur", {
stdDeviation: "4",
result: "effect1_foregroundBlur_2177_765"
})]
}), x.jsxs("filter", {
id: "filter1_f_2177_765",
x: "9",
y: "9",
width: "9",
height: "14",
filterUnits: "userSpaceOnUse",
colorInterpolationFilters: "sRGB",
children: [x.jsx("feFlood", {
floodOpacity: "0",
result: "BackgroundImageFix"
}), x.jsx("feBlend", {
mode: "normal",
in: "SourceGraphic",
in2: "BackgroundImageFix",
result: "shape"
}), x.jsx("feGaussianBlur", {
stdDeviation: "1",
result: "effect1_foregroundBlur_2177_765"
})]
}), x.jsxs("filter", {
id: "filter2_f_2177_765",
x: "12",
y: "12",
width: "6",
height: "8",
filterUnits: "userSpaceOnUse",
colorInterpolationFilters: "sRGB",
children: [x.jsx("feFlood", {
floodOpacity: "0",
result: "BackgroundImageFix"
}), x.jsx("feBlend", {
mode: "normal",
in: "SourceGraphic",
in2: "BackgroundImageFix",
result: "shape"
}), x.jsx("feGaussianBlur", {
stdDeviation: "1",
result: "effect1_foregroundBlur_2177_765"
})]
})]
})]
})
});
Nu.displayName = xT.displayName;
var bT = {
exports: {}
};
(function(e, t) {
(function(n, r) {
e.exports = r()
}
)(self, function() {
return (()=>{
var n = {
192: (s,o)=>{
var a, l, u = function() {
var c = function(F, k) {
var T = F
, _ = b[k]
, O = null
, R = 0
, z = null
, Y = []
, te = {}
, ue = function($, L) {
O = function(M) {
for (var W = new Array(M), J = 0; J < M; J += 1) {
W[J] = new Array(M);
for (var se = 0; se < M; se += 1)
W[J][se] = null
}
return W
}(R = 4 * T + 17),
X(0, 0),
X(R - 7, 0),
X(0, R - 7),
j(),
S(),
I($, L),
T >= 7 && N($),
z == null && (z = H(T, _, Y)),
U(z, L)
}
, X = function($, L) {
for (var M = -1; M <= 7; M += 1)
if (!($ + M <= -1 || R <= $ + M))
for (var W = -1; W <= 7; W += 1)
L + W <= -1 || R <= L + W || (O[$ + M][L + W] = 0 <= M && M <= 6 && (W == 0 || W == 6) || 0 <= W && W <= 6 && (M == 0 || M == 6) || 2 <= M && M <= 4 && 2 <= W && W <= 4)
}
, S = function() {
for (var $ = 8; $ < R - 8; $ += 1)
O[$][6] == null && (O[$][6] = $ % 2 == 0);
for (var L = 8; L < R - 8; L += 1)
O[6][L] == null && (O[6][L] = L % 2 == 0)
}
, j = function() {
for (var $ = v.getPatternPosition(T), L = 0; L < $.length; L += 1)
for (var M = 0; M < $.length; M += 1) {
var W = $[L]
, J = $[M];
if (O[W][J] == null)
for (var se = -2; se <= 2; se += 1)
for (var ae = -2; ae <= 2; ae += 1)
O[W + se][J + ae] = se == -2 || se == 2 || ae == -2 || ae == 2 || se == 0 && ae == 0
}
}
, N = function($) {
for (var L = v.getBCHTypeNumber(T), M = 0; M < 18; M += 1) {
var W = !$ && (L >> M & 1) == 1;
O[Math.floor(M / 3)][M % 3 + R - 8 - 3] = W
}
for (M = 0; M < 18; M += 1)
W = !$ && (L >> M & 1) == 1,
O[M % 3 + R - 8 - 3][Math.floor(M / 3)] = W
}
, I = function($, L) {
for (var M = _ << 3 | L, W = v.getBCHTypeInfo(M), J = 0; J < 15; J += 1) {
var se = !$ && (W >> J & 1) == 1;
J < 6 ? O[J][8] = se : J < 8 ? O[J + 1][8] = se : O[R - 15 + J][8] = se
}
for (J = 0; J < 15; J += 1)
se = !$ && (W >> J & 1) == 1,
J < 8 ? O[8][R - J - 1] = se : J < 9 ? O[8][15 - J - 1 + 1] = se : O[8][15 - J - 1] = se;
O[R - 8][8] = !$
}
, U = function($, L) {
for (var M = -1, W = R - 1, J = 7, se = 0, ae = v.getMaskFunction(L), ne = R - 1; ne > 0; ne -= 2)
for (ne == 6 && (ne -= 1); ; ) {
for (var de = 0; de < 2; de += 1)
if (O[W][ne - de] == null) {
var ye = !1;
se < $.length && (ye = ($[se] >>> J & 1) == 1),
ae(W, ne - de) && (ye = !ye),
O[W][ne - de] = ye,
(J -= 1) == -1 && (se += 1,
J = 7)
}
if ((W += M) < 0 || R <= W) {
W -= M,
M = -M;
break
}
}
}
, H = function($, L, M) {
for (var W = E.getRSBlocks($, L), J = D(), se = 0; se < M.length; se += 1) {
var ae = M[se];
J.put(ae.getMode(), 4),
J.put(ae.getLength(), v.getLengthInBits(ae.getMode(), $)),
ae.write(J)
}
var ne = 0;
for (se = 0; se < W.length; se += 1)
ne += W[se].dataCount;
if (J.getLengthInBits() > 8 * ne)
throw "code length overflow. (" + J.getLengthInBits() + ">" + 8 * ne + ")";
for (J.getLengthInBits() + 4 <= 8 * ne && J.put(0, 4); J.getLengthInBits() % 8 != 0; )
J.putBit(!1);
for (; !(J.getLengthInBits() >= 8 * ne || (J.put(236, 8),
J.getLengthInBits() >= 8 * ne)); )
J.put(17, 8);
return function(de, ye) {
for (var be = 0, Me = 0, fe = 0, Ee = new Array(ye.length), we = new Array(ye.length), Se = 0; Se < ye.length; Se += 1) {
var Ge = ye[Se].dataCount
, Ve = ye[Se].totalCount - Ge;
Me = Math.max(Me, Ge),
fe = Math.max(fe, Ve),
Ee[Se] = new Array(Ge);
for (var Te = 0; Te < Ee[Se].length; Te += 1)
Ee[Se][Te] = 255 & de.getBuffer()[Te + be];
be += Ge;
var Ke = v.getErrorCorrectPolynomial(Ve)
, ke = w(Ee[Se], Ke.getLength() - 1).mod(Ke);
for (we[Se] = new Array(Ke.getLength() - 1),
Te = 0; Te < we[Se].length; Te += 1) {
var Qe = Te + ke.getLength() - we[Se].length;
we[Se][Te] = Qe >= 0 ? ke.getAt(Qe) : 0
}
}
var nt = 0;
for (Te = 0; Te < ye.length; Te += 1)
nt += ye[Te].totalCount;
var it = new Array(nt)
, me = 0;
for (Te = 0; Te < Me; Te += 1)
for (Se = 0; Se < ye.length; Se += 1)
Te < Ee[Se].length && (it[me] = Ee[Se][Te],
me += 1);
for (Te = 0; Te < fe; Te += 1)
for (Se = 0; Se < ye.length; Se += 1)
Te < we[Se].length && (it[me] = we[Se][Te],
me += 1);
return it
}(J, W)
};
te.addData = function($, L) {
var M = null;
switch (L = L || "Byte") {
case "Numeric":
M = V($);
break;
case "Alphanumeric":
M = C($);
break;
case "Byte":
M = P($);
break;
case "Kanji":
M = A($);
break;
default:
throw "mode:" + L
}
Y.push(M),
z = null
}
,
te.isDark = function($, L) {
if ($ < 0 || R <= $ || L < 0 || R <= L)
throw $ + "," + L;
return O[$][L]
}
,
te.getModuleCount = function() {
return R
}
,
te.make = function() {
if (T < 1) {
for (var $ = 1; $ < 40; $++) {
for (var L = E.getRSBlocks($, _), M = D(), W = 0; W < Y.length; W++) {
var J = Y[W];
M.put(J.getMode(), 4),
M.put(J.getLength(), v.getLengthInBits(J.getMode(), $)),
J.write(M)
}
var se = 0;
for (W = 0; W < L.length; W++)
se += L[W].dataCount;
if (M.getLengthInBits() <= 8 * se)
break
}
T = $
}
ue(!1, function() {
for (var ae = 0, ne = 0, de = 0; de < 8; de += 1) {
ue(!0, de);
var ye = v.getLostPoint(te);
(de == 0 || ae > ye) && (ae = ye,
ne = de)
}
return ne
}())
}
,
te.createTableTag = function($, L) {
$ = $ || 2;
var M = "";
M += '<table style="',
M += " border-width: 0px; border-style: none;",
M += " border-collapse: collapse;",
M += " padding: 0px; margin: " + (L = L === void 0 ? 4 * $ : L) + "px;",
M += '">',
M += "<tbody>";
for (var W = 0; W < te.getModuleCount(); W += 1) {
M += "<tr>";
for (var J = 0; J < te.getModuleCount(); J += 1)
M += '<td style="',
M += " border-width: 0px; border-style: none;",
M += " border-collapse: collapse;",
M += " padding: 0px; margin: 0px;",
M += " width: " + $ + "px;",
M += " height: " + $ + "px;",
M += " background-color: ",
M += te.isDark(W, J) ? "#000000" : "#ffffff",
M += ";",
M += '"/>';
M += "</tr>"
}
return (M += "</tbody>") + "</table>"
}
,
te.createSvgTag = function($, L, M, W) {
var J = {};
typeof arguments[0] == "object" && ($ = (J = arguments[0]).cellSize,
L = J.margin,
M = J.alt,
W = J.title),
$ = $ || 2,
L = L === void 0 ? 4 * $ : L,
(M = typeof M == "string" ? {
text: M
} : M || {}).text = M.text || null,
M.id = M.text ? M.id || "qrcode-description" : null,
(W = typeof W == "string" ? {
text: W
} : W || {}).text = W.text || null,
W.id = W.text ? W.id || "qrcode-title" : null;
var se, ae, ne, de, ye = te.getModuleCount() * $ + 2 * L, be = "";
for (de = "l" + $ + ",0 0," + $ + " -" + $ + ",0 0,-" + $ + "z ",
be += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',
be += J.scalable ? "" : ' width="' + ye + 'px" height="' + ye + 'px"',
be += ' viewBox="0 0 ' + ye + " " + ye + '" ',
be += ' preserveAspectRatio="xMinYMin meet"',
be += W.text || M.text ? ' role="img" aria-labelledby="' + q([W.id, M.id].join(" ").trim()) + '"' : "",
be += ">",
be += W.text ? '<title id="' + q(W.id) + '">' + q(W.text) + "</title>" : "",
be += M.text ? '<description id="' + q(M.id) + '">' + q(M.text) + "</description>" : "",
be += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',
be += '<path d="',
ae = 0; ae < te.getModuleCount(); ae += 1)
for (ne = ae * $ + L,
se = 0; se < te.getModuleCount(); se += 1)
te.isDark(ae, se) && (be += "M" + (se * $ + L) + "," + ne + de);
return (be += '" stroke="transparent" fill="black"/>') + "</svg>"
}
,
te.createDataURL = function($, L) {
$ = $ || 2,
L = L === void 0 ? 4 * $ : L;
var M = te.getModuleCount() * $ + 2 * L
, W = L
, J = M - L;
return Z(M, M, function(se, ae) {
if (W <= se && se < J && W <= ae && ae < J) {
var ne = Math.floor((se - W) / $)
, de = Math.floor((ae - W) / $);
return te.isDark(de, ne) ? 0 : 1
}
return 1
})
}
,
te.createImgTag = function($, L, M) {
$ = $ || 2,
L = L === void 0 ? 4 * $ : L;
var W = te.getModuleCount() * $ + 2 * L
, J = "";
return J += "<img",
J += ' src="',
J += te.createDataURL($, L),
J += '"',
J += ' width="',
J += W,
J += '"',
J += ' height="',
J += W,
J += '"',
M && (J += ' alt="',
J += q(M),
J += '"'),
J + "/>"
}
;
var q = function($) {
for (var L = "", M = 0; M < $.length; M += 1) {
var W = $.charAt(M);
switch (W) {
case "<":
L += "<";
break;
case ">":
L += ">";
break;
case "&":
L += "&";
break;
case '"':
L += """;
break;
default:
L += W
}
}
return L
};
return te.createASCII = function($, L) {
if (($ = $ || 1) < 2)
return function(Ee) {
Ee = Ee === void 0 ? 2 : Ee;
var we, Se, Ge, Ve, Te, Ke = 1 * te.getModuleCount() + 2 * Ee, ke = Ee, Qe = Ke - Ee, nt = {
"██": "█",
"█ ": "▀",
" █": "▄",
" ": " "
}, it = {
"██": "▀",
"█ ": "▀",
" █": " ",
" ": " "
}, me = "";
for (we = 0; we < Ke; we += 2) {
for (Ge = Math.floor((we - ke) / 1),
Ve = Math.floor((we + 1 - ke) / 1),
Se = 0; Se < Ke; Se += 1)
Te = "█",
ke <= Se && Se < Qe && ke <= we && we < Qe && te.isDark(Ge, Math.floor((Se - ke) / 1)) && (Te = " "),
ke <= Se && Se < Qe && ke <= we + 1 && we + 1 < Qe && te.isDark(Ve, Math.floor((Se - ke) / 1)) ? Te += " " : Te += "█",
me += Ee < 1 && we + 1 >= Qe ? it[Te] : nt[Te];
me += `
`
}
return Ke % 2 && Ee > 0 ? me.substring(0, me.length - Ke - 1) + Array(Ke + 1).join("▀") : me.substring(0, me.length - 1)
}(L);
$ -= 1,
L = L === void 0 ? 2 * $ : L;
var M, W, J, se, ae = te.getModuleCount() * $ + 2 * L, ne = L, de = ae - L, ye = Array($ + 1).join("██"), be = Array($ + 1).join(" "), Me = "", fe = "";
for (M = 0; M < ae; M += 1) {
for (J = Math.floor((M - ne) / $),
fe = "",
W = 0; W < ae; W += 1)
se = 1,
ne <= W && W < de && ne <= M && M < de && te.isDark(J, Math.floor((W - ne) / $)) && (se = 0),
fe += se ? ye : be;
for (J = 0; J < $; J += 1)
Me += fe + `
`
}
return Me.substring(0, Me.length - 1)
}
,
te.renderTo2dContext = function($, L) {
L = L || 2;
for (var M = te.getModuleCount(), W = 0; W < M; W++)
for (var J = 0; J < M; J++)
$.fillStyle = te.isDark(W, J) ? "black" : "white",
$.fillRect(W * L, J * L, L, L)
}
,
te
};
c.stringToBytes = (c.stringToBytesFuncs = {
default: function(F) {
for (var k = [], T = 0; T < F.length; T += 1) {
var _ = F.charCodeAt(T);
k.push(255 & _)
}
return k
}
}).default,
c.createStringToBytes = function(F, k) {
var T = function() {
for (var O = Q(F), R = function() {
var S = O.read();
if (S == -1)
throw "eof";
return S
}, z = 0, Y = {}; ; ) {
var te = O.read();
if (te == -1)
break;
var ue = R()
, X = R() << 8 | R();
Y[String.fromCharCode(te << 8 | ue)] = X,
z += 1
}
if (z != k)
throw z + " != " + k;
return Y
}()
, _ = 63;
return function(O) {
for (var R = [], z = 0; z < O.length; z += 1) {
var Y = O.charCodeAt(z);
if (Y < 128)
R.push(Y);
else {
var te = T[O.charAt(z)];
typeof te == "number" ? (255 & te) == te ? R.push(te) : (R.push(te >>> 8),
R.push(255 & te)) : R.push(_)
}
}
return R
}
}
;
var d, f, h, m, p, b = {
L: 1,
M: 0,
Q: 3,
H: 2
}, v = (d = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
f = 1335,
h = 7973,
p = function(F) {
for (var k = 0; F != 0; )
k += 1,
F >>>= 1;
return k
}
,
(m = {}).getBCHTypeInfo = function(F) {
for (var k = F << 10; p(k) - p(f) >= 0; )
k ^= f << p(k) - p(f);
return 21522 ^ (F << 10 | k)
}
,
m.getBCHTypeNumber = function(F) {
for (var k = F << 12; p(k) - p(h) >= 0; )
k ^= h << p(k) - p(h);
return F << 12 | k
}
,
m.getPatternPosition = function(F) {
return d[F - 1]
}
,
m.getMaskFunction = function(F) {
switch (F) {
case 0:
return function(k, T) {
return (k + T) % 2 == 0
}
;
case 1:
return function(k, T) {
return k % 2 == 0
}
;
case 2:
return function(k, T) {
return T % 3 == 0
}
;
case 3:
return function(k, T) {
return (k + T) % 3 == 0
}
;
case 4:
return function(k, T) {
return (Math.floor(k / 2) + Math.floor(T / 3)) % 2 == 0
}
;
case 5:
return function(k, T) {
return k * T % 2 + k * T % 3 == 0
}
;
case 6:
return function(k, T) {
return (k * T % 2 + k * T % 3) % 2 == 0
}
;
case 7:
return function(k, T) {
return (k * T % 3 + (k + T) % 2) % 2 == 0
}
;
default:
throw "bad maskPattern:" + F
}
}
,
m.getErrorCorrectPolynomial = function(F) {
for (var k = w([1], 0), T = 0; T < F; T += 1)
k = k.multiply(w([1, g.gexp(T)], 0));
return k
}
,
m.getLengthInBits = function(F, k) {
if (1 <= k && k < 10)
switch (F) {
case 1:
return 10;
case 2:
return 9;
case 4:
case 8:
return 8;
default:
throw "mode:" + F
}
else if (k < 27)
switch (F) {
case 1:
return 12;
case 2:
return 11;
case 4:
return 16;
case 8:
return 10;
default:
throw "mode:" + F
}
else {
if (!(k < 41))
throw "type:" + k;
switch (F) {
case 1:
return 14;
case 2:
return 13;
case 4:
return 16;
case 8:
return 12;
default:
throw "mode:" + F
}
}
}
,
m.getLostPoint = function(F) {
for (var k = F.getModuleCount(), T = 0, _ = 0; _ < k; _ += 1)
for (var O = 0; O < k; O += 1) {
for (var R = 0, z = F.isDark(_, O), Y = -1; Y <= 1; Y += 1)
if (!(_ + Y < 0 || k <= _ + Y))
for (var te = -1; te <= 1; te += 1)
O + te < 0 || k <= O + te || Y == 0 && te == 0 || z == F.isDark(_ + Y, O + te) && (R += 1);
R > 5 && (T += 3 + R - 5)
}
for (_ = 0; _ < k - 1; _ += 1)
for (O = 0; O < k - 1; O += 1) {
var ue = 0;
F.isDark(_, O) && (ue += 1),
F.isDark(_ + 1, O) && (ue += 1),
F.isDark(_, O + 1) && (ue += 1),
F.isDark(_ + 1, O + 1) && (ue += 1),
ue != 0 && ue != 4 || (T += 3)
}
for (_ = 0; _ < k; _ += 1)
for (O = 0; O < k - 6; O += 1)
F.isDark(_, O) && !F.isDark(_, O + 1) && F.isDark(_, O + 2) && F.isDark(_, O + 3) && F.isDark(_, O + 4) && !F.isDark(_, O + 5) && F.isDark(_, O + 6) && (T += 40);
for (O = 0; O < k; O += 1)
for (_ = 0; _ < k - 6; _ += 1)
F.isDark(_, O) && !F.isDark(_ + 1, O) && F.isDark(_ + 2, O) && F.isDark(_ + 3, O) && F.isDark(_ + 4, O) && !F.isDark(_ + 5, O) && F.isDark(_ + 6, O) && (T += 40);
var X = 0;
for (O = 0; O < k; O += 1)
for (_ = 0; _ < k; _ += 1)
F.isDark(_, O) && (X += 1);
return T + Math.abs(100 * X / k / k - 50) / 5 * 10
}
,
m), g = function() {
for (var F = new Array(256), k = new Array(256), T = 0; T < 8; T += 1)
F[T] = 1 << T;
for (T = 8; T < 256; T += 1)
F[T] = F[T - 4] ^ F[T - 5] ^ F[T - 6] ^ F[T - 8];
for (T = 0; T < 255; T += 1)
k[F[T]] = T;
return {
glog: function(_) {
if (_ < 1)
throw "glog(" + _ + ")";
return k[_]
},
gexp: function(_) {
for (; _ < 0; )
_ += 255;
for (; _ >= 256; )
_ -= 255;
return F[_]
}
}
}();
function w(F, k) {
if (F.length === void 0)
throw F.length + "/" + k;
var T = function() {
for (var O = 0; O < F.length && F[O] == 0; )
O += 1;
for (var R = new Array(F.length - O + k), z = 0; z < F.length - O; z += 1)
R[z] = F[z + O];
return R
}()
, _ = {
getAt: function(O) {
return T[O]
},
getLength: function() {
return T.length
},
multiply: function(O) {
for (var R = new Array(_.getLength() + O.getLength() - 1), z = 0; z < _.getLength(); z += 1)
for (var Y = 0; Y < O.getLength(); Y += 1)
R[z + Y] ^= g.gexp(g.glog(_.getAt(z)) + g.glog(O.getAt(Y)));
return w(R, 0)
},
mod: function(O) {
if (_.getLength() - O.getLength() < 0)
return _;
for (var R = g.glog(_.getAt(0)) - g.glog(O.getAt(0)), z = new Array(_.getLength()), Y = 0; Y < _.getLength(); Y += 1)
z[Y] = _.getAt(Y);
for (Y = 0; Y < O.getLength(); Y += 1)
z[Y] ^= g.gexp(g.glog(O.getAt(Y)) + R);
return w(z, 0).mod(O)
}
};
return _
}
var E = function() {
var F = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]
, k = function(_, O) {
var R = {};
return R.totalCount = _,
R.dataCount = O,
R
}
, T = {
getRSBlocks: function(_, O) {
var R = function(N, I) {
switch (I) {
case b.L:
return F[4 * (N - 1) + 0];
case b.M:
return F[4 * (N - 1) + 1];
case b.Q:
return F[4 * (N - 1) + 2];
case b.H:
return F[4 * (N - 1) + 3];
default:
return
}
}(_, O);
if (R === void 0)
throw "bad rs block @ typeNumber:" + _ + "/errorCorrectionLevel:" + O;
for (var z = R.length / 3, Y = [], te = 0; te < z; te += 1)
for (var ue = R[3 * te + 0], X = R[3 * te + 1], S = R[3 * te + 2], j = 0; j < ue; j += 1)
Y.push(k(X, S));
return Y
}
};
return T
}()
, D = function() {
var F = []
, k = 0
, T = {
getBuffer: function() {
return F
},
getAt: function(_) {
var O = Math.floor(_ / 8);
return (F[O] >>> 7 - _ % 8 & 1) == 1
},
put: function(_, O) {
for (var R = 0; R < O; R += 1)
T.putBit((_ >>> O - R - 1 & 1) == 1)
},
getLengthInBits: function() {
return k
},
putBit: function(_) {
var O = Math.floor(k / 8);
F.length <= O && F.push(0),
_ && (F[O] |= 128 >>> k % 8),
k += 1
}
};
return T
}
, V = function(F) {
var k = F
, T = {
getMode: function() {
return 1
},
getLength: function(R) {
return k.length
},
write: function(R) {
for (var z = k, Y = 0; Y + 2 < z.length; )
R.put(_(z.substring(Y, Y + 3)), 10),
Y += 3;
Y < z.length && (z.length - Y == 1 ? R.put(_(z.substring(Y, Y + 1)), 4) : z.length - Y == 2 && R.put(_(z.substring(Y, Y + 2)), 7))
}
}
, _ = function(R) {
for (var z = 0, Y = 0; Y < R.length; Y += 1)
z = 10 * z + O(R.charAt(Y));
return z
}
, O = function(R) {
if ("0" <= R && R <= "9")
return R.charCodeAt(0) - 48;
throw "illegal char :" + R
};
return T
}
, C = function(F) {
var k = F
, T = {
getMode: function() {
return 2
},
getLength: function(O) {
return k.length
},
write: function(O) {
for (var R = k, z = 0; z + 1 < R.length; )
O.put(45 * _(R.charAt(z)) + _(R.charAt(z + 1)), 11),
z += 2;
z < R.length && O.put(_(R.charAt(z)), 6)
}
}
, _ = function(O) {
if ("0" <= O && O <= "9")
return O.charCodeAt(0) - 48;
if ("A" <= O && O <= "Z")
return O.charCodeAt(0) - 65 + 10;
switch (O) {
case " ":
return 36;
case "$":
return 37;
case "%":
return 38;
case "*":
return 39;
case "+":
return 40;
case "-":
return 41;
case ".":
return 42;
case "/":
return 43;
case ":":
return 44;
default:
throw "illegal char :" + O
}
};
return T
}
, P = function(F) {
var k = c.stringToBytes(F);
return {
getMode: function() {
return 4
},
getLength: function(T) {
return k.length
},
write: function(T) {
for (var _ = 0; _ < k.length; _ += 1)
T.put(k[_], 8)
}
}
}
, A = function(F) {
var k = c.stringToBytesFuncs.SJIS;
if (!k)
throw "sjis not supported.";
(function(_, O) {
var R = k("友");
if (R.length != 2 || (R[0] << 8 | R[1]) != 38726)
throw "sjis not supported."
}
)();
var T = k(F);
return {
getMode: function() {
return 8
},
getLength: function(_) {
return ~~(T.length / 2)
},
write: function(_) {
for (var O = T, R = 0; R + 1 < O.length; ) {
var z = (255 & O[R]) << 8 | 255 & O[R + 1];
if (33088 <= z && z <= 40956)
z -= 33088;
else {
if (!(57408 <= z && z <= 60351))
throw "illegal char at " + (R + 1) + "/" + z;
z -= 49472
}
z = 192 * (z >>> 8 & 255) + (255 & z),
_.put(z, 13),
R += 2
}
if (R < O.length)
throw "illegal char at " + (R + 1)
}
}
}
, B = function() {
var F = []
, k = {
writeByte: function(T) {
F.push(255 & T)
},
writeShort: function(T) {
k.writeByte(T),
k.writeByte(T >>> 8)
},
writeBytes: function(T, _, O) {
_ = _ || 0,
O = O || T.length;
for (var R = 0; R < O; R += 1)
k.writeByte(T[R + _])
},
writeString: function(T) {
for (var _ = 0; _ < T.length; _ += 1)
k.writeByte(T.charCodeAt(_))
},
toByteArray: function() {
return F
},
toString: function() {
var T = "";
T += "[";
for (var _ = 0; _ < F.length; _ += 1)
_ > 0 && (T += ","),
T += F[_];
return T + "]"
}
};
return k
}
, Q = function(F) {
var k = F
, T = 0
, _ = 0
, O = 0
, R = {
read: function() {
for (; O < 8; ) {
if (T >= k.length) {
if (O == 0)
return -1;
throw "unexpected end of file./" + O
}
var Y = k.charAt(T);
if (T += 1,
Y == "=")
return O = 0,
-1;
Y.match(/^\s$/) || (_ = _ << 6 | z(Y.charCodeAt(0)),
O += 6)
}
var te = _ >>> O - 8 & 255;
return O -= 8,
te
}
}
, z = function(Y) {
if (65 <= Y && Y <= 90)
return Y - 65;
if (97 <= Y && Y <= 122)
return Y - 97 + 26;
if (48 <= Y && Y <= 57)
return Y - 48 + 52;
if (Y == 43)
return 62;
if (Y == 47)
return 63;
throw "c:" + Y
};
return R
}
, Z = function(F, k, T) {
for (var _ = function(X, S) {
var j = X
, N = S
, I = new Array(X * S)
, U = {
setPixel: function($, L, M) {
I[L * j + $] = M
},
write: function($) {
$.writeString("GIF87a"),
$.writeShort(j),
$.writeShort(N),
$.writeByte(128),
$.writeByte(0),
$.writeByte(0),
$.writeByte(0),
$.writeByte(0),
$.writeByte(0),
$.writeByte(255),
$.writeByte(255),
$.writeByte(255),
$.writeString(","),
$.writeShort(0),
$.writeShort(0),
$.writeShort(j),
$.writeShort(N),
$.writeByte(0);
var L = H(2);
$.writeByte(2);
for (var M = 0; L.length - M > 255; )
$.writeByte(255),
$.writeBytes(L, M, 255),
M += 255;
$.writeByte(L.length - M),
$.writeBytes(L, M, L.length - M),
$.writeByte(0),
$.writeString(";")
}
}
, H = function($) {
for (var L = 1 << $, M = 1 + (1 << $), W = $ + 1, J = q(), se = 0; se < L; se += 1)
J.add(String.fromCharCode(se));
J.add(String.fromCharCode(L)),
J.add(String.fromCharCode(M));
var ae, ne, de, ye = B(), be = (ae = ye,
ne = 0,
de = 0,
{
write: function(we, Se) {
if (we >>> Se)
throw "length over";
for (; ne + Se >= 8; )
ae.writeByte(255 & (we << ne | de)),
Se -= 8 - ne,
we >>>= 8 - ne,
de = 0,
ne = 0;
de |= we << ne,
ne += Se
},
flush: function() {
ne > 0 && ae.writeByte(de)
}
});
be.write(L, W);
var Me = 0
, fe = String.fromCharCode(I[Me]);
for (Me += 1; Me < I.length; ) {
var Ee = String.fromCharCode(I[Me]);
Me += 1,
J.contains(fe + Ee) ? fe += Ee : (be.write(J.indexOf(fe), W),
J.size() < 4095 && (J.size() == 1 << W && (W += 1),
J.add(fe + Ee)),
fe = Ee)
}
return be.write(J.indexOf(fe), W),
be.write(M, W),
be.flush(),
ye.toByteArray()
}
, q = function() {
var $ = {}
, L = 0
, M = {
add: function(W) {
if (M.contains(W))
throw "dup key:" + W;
$[W] = L,
L += 1
},
size: function() {
return L
},
indexOf: function(W) {
return $[W]
},
contains: function(W) {
return $[W] !== void 0
}
};
return M
};
return U
}(F, k), O = 0; O < k; O += 1)
for (var R = 0; R < F; R += 1)
_.setPixel(R, O, T(R, O));
var z = B();
_.write(z);
for (var Y = function() {
var X = 0
, S = 0
, j = 0
, N = ""
, I = {}
, U = function(q) {
N += String.fromCharCode(H(63 & q))
}
, H = function(q) {
if (!(q < 0)) {
if (q < 26)
return 65 + q;
if (q < 52)
return q - 26 + 97;
if (q < 62)
return q - 52 + 48;
if (q == 62)
return 43;
if (q == 63)
return 47
}
throw "n:" + q
};
return I.writeByte = function(q) {
for (X = X << 8 | 255 & q,
S += 8,
j += 1; S >= 6; )
U(X >>> S - 6),
S -= 6
}
,
I.flush = function() {
if (S > 0 && (U(X << 6 - S),
X = 0,
S = 0),
j % 3 != 0)
for (var q = 3 - j % 3, $ = 0; $ < q; $ += 1)
N += "="
}
,
I.toString = function() {
return N
}
,
I
}(), te = z.toByteArray(), ue = 0; ue < te.length; ue += 1)
Y.writeByte(te[ue]);
return Y.flush(),
"data:image/gif;base64," + Y
};
return c
}();
u.stringToBytesFuncs["UTF-8"] = function(c) {
return function(d) {
for (var f = [], h = 0; h < d.length; h++) {
var m = d.charCodeAt(h);
m < 128 ? f.push(m) : m < 2048 ? f.push(192 | m >> 6, 128 | 63 & m) : m < 55296 || m >= 57344 ? f.push(224 | m >> 12, 128 | m >> 6 & 63, 128 | 63 & m) : (h++,
m = 65536 + ((1023 & m) << 10 | 1023 & d.charCodeAt(h)),
f.push(240 | m >> 18, 128 | m >> 12 & 63, 128 | m >> 6 & 63, 128 | 63 & m))
}
return f
}(c)
}
,
(l = typeof (a = function() {
return u
}
) == "function" ? a.apply(o, []) : a) === void 0 || (s.exports = l)
}
,
676: (s,o,a)=>{
a.d(o, {
default: ()=>ue
});
var l = function() {
return (l = Object.assign || function(X) {
for (var S, j = 1, N = arguments.length; j < N; j++)
for (var I in S = arguments[j])
Object.prototype.hasOwnProperty.call(S, I) && (X[I] = S[I]);
return X
}
).apply(this, arguments)
}
, u = function() {
for (var X = 0, S = 0, j = arguments.length; S < j; S++)
X += arguments[S].length;
var N = Array(X)
, I = 0;
for (S = 0; S < j; S++)
for (var U = arguments[S], H = 0, q = U.length; H < q; H++,
I++)
N[I] = U[H];
return N
}
, c = function(X) {
return !!X && typeof X == "object" && !Array.isArray(X)
};
function d(X) {
for (var S = [], j = 1; j < arguments.length; j++)
S[j - 1] = arguments[j];
if (!S.length)
return X;
var N = S.shift();
return N !== void 0 && c(X) && c(N) ? (X = l({}, X),
Object.keys(N).forEach(function(I) {
var U = X[I]
, H = N[I];
Array.isArray(U) && Array.isArray(H) ? X[I] = H : c(U) && c(H) ? X[I] = d(Object.assign({}, U), H) : X[I] = H
}),
d.apply(void 0, u([X], S))) : X
}
function f(X, S) {
var j = document.createElement("a");
j.download = S,
j.href = X,
document.body.appendChild(j),
j.click(),
document.body.removeChild(j)
}
function h(X) {
return S = this,
j = void 0,
I = function() {
return function(U, H) {
var q, $, L, M, W = {
label: 0,
sent: function() {
if (1 & L[0])
throw L[1];
return L[1]
},
trys: [],
ops: []
};
return M = {
next: J(0),
throw: J(1),
return: J(2)
},
typeof Symbol == "function" && (M[Symbol.iterator] = function() {
return this
}
),
M;
function J(se) {
return function(ae) {
return function(ne) {
if (q)
throw new TypeError("Generator is already executing.");
for (; W; )
try {
if (q = 1,
$ && (L = 2 & ne[0] ? $.return : ne[0] ? $.throw || ((L = $.return) && L.call($),
0) : $.next) && !(L = L.call($, ne[1])).done)
return L;
switch ($ = 0,
L && (ne = [2 & ne[0], L.value]),
ne[0]) {
case 0:
case 1:
L = ne;
break;
case 4:
return W.label++,
{
value: ne[1],
done: !1
};
case 5:
W.label++,
$ = ne[1],
ne = [0];
continue;
case 7:
ne = W.ops.pop(),
W.trys.pop();
continue;
default:
if (!((L = (L = W.trys).length > 0 && L[L.length - 1]) || ne[0] !== 6 && ne[0] !== 2)) {
W = 0;
continue
}
if (ne[0] === 3 && (!L || ne[1] > L[0] && ne[1] < L[3])) {
W.label = ne[1];
break
}
if (ne[0] === 6 && W.label < L[1]) {
W.label = L[1],
L = ne;
break
}
if (L && W.label < L[2]) {
W.label = L[2],
W.ops.push(ne);
break
}
L[2] && W.ops.pop(),
W.trys.pop();
continue
}
ne = H.call(U, W)
} catch (de) {
ne = [6, de],
$ = 0
} finally {
q = L = 0
}
if (5 & ne[0])
throw ne[1];
return {
value: ne[0] ? ne[1] : void 0,
done: !0
}
}([se, ae])
}
}
}(this, function(U) {
return [2, new Promise(function(H) {
var q = new XMLHttpRequest;
q.onload = function() {
var $ = new FileReader;
$.onloadend = function() {
H($.result)
}
,
$.readAsDataURL(q.response)
}
,
q.open("GET", X),
q.responseType = "blob",
q.send()
}
)]
})
}
,
new ((N = void 0) || (N = Promise))(function(U, H) {
function q(M) {
try {
L(I.next(M))
} catch (W) {
H(W)
}
}
function $(M) {
try {
L(I.throw(M))
} catch (W) {
H(W)
}
}
function L(M) {
var W;
M.done ? U(M.value) : (W = M.value,
W instanceof N ? W : new N(function(J) {
J(W)
}
)).then(q, $)
}
L((I = I.apply(S, j || [])).next())
}
);
var S, j, N, I
}
const m = {
L: .07,
M: .15,
Q: .25,
H: .3
};
var p = function() {
return (p = Object.assign || function(X) {
for (var S, j = 1, N = arguments.length; j < N; j++)
for (var I in S = arguments[j])
Object.prototype.hasOwnProperty.call(S, I) && (X[I] = S[I]);
return X
}
).apply(this, arguments)
};
const b = function() {
function X(S) {
var j = S.svg
, N = S.type;
this._svg = j,
this._type = N
}
return X.prototype.draw = function(S, j, N, I) {
var U;
switch (this._type) {
case "dots":
U = this._drawDot;
break;
case "classy":
U = this._drawClassy;
break;
case "classy-rounded":
U = this._drawClassyRounded;
break;
case "rounded":
U = this._drawRounded;
break;
case "extra-rounded":
U = this._drawExtraRounded;
break;
case "square":
default:
U = this._drawSquare
}
U.call(this, {
x: S,
y: j,
size: N,
getNeighbor: I
})
}
,
X.prototype._rotateFigure = function(S) {
var j, N = S.x, I = S.y, U = S.size, H = S.rotation, q = H === void 0 ? 0 : H, $ = N + U / 2, L = I + U / 2;
(0,
S.draw)(),
(j = this._element) === null || j === void 0 || j.setAttribute("transform", "rotate(" + 180 * q / Math.PI + "," + $ + "," + L + ")")
}
,
X.prototype._basicDot = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"),
j._element.setAttribute("cx", String(I + N / 2)),
j._element.setAttribute("cy", String(U + N / 2)),
j._element.setAttribute("r", String(N / 2))
}
}))
}
,
X.prototype._basicSquare = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"),
j._element.setAttribute("x", String(I)),
j._element.setAttribute("y", String(U)),
j._element.setAttribute("width", String(N)),
j._element.setAttribute("height", String(N))
}
}))
}
,
X.prototype._basicSideRounded = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("d", "M " + I + " " + U + "v " + N + "h " + N / 2 + "a " + N / 2 + " " + N / 2 + ", 0, 0, 0, 0 " + -N)
}
}))
}
,
X.prototype._basicCornerRounded = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("d", "M " + I + " " + U + "v " + N + "h " + N + "v " + -N / 2 + "a " + N / 2 + " " + N / 2 + ", 0, 0, 0, " + -N / 2 + " " + -N / 2)
}
}))
}
,
X.prototype._basicCornerExtraRounded = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("d", "M " + I + " " + U + "v " + N + "h " + N + "a " + N + " " + N + ", 0, 0, 0, " + -N + " " + -N)
}
}))
}
,
X.prototype._basicCornersRounded = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(p(p({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("d", "M " + I + " " + U + "v " + N / 2 + "a " + N / 2 + " " + N / 2 + ", 0, 0, 0, " + N / 2 + " " + N / 2 + "h " + N / 2 + "v " + -N / 2 + "a " + N / 2 + " " + N / 2 + ", 0, 0, 0, " + -N / 2 + " " + -N / 2)
}
}))
}
,
X.prototype._drawDot = function(S) {
var j = S.x
, N = S.y
, I = S.size;
this._basicDot({
x: j,
y: N,
size: I,
rotation: 0
})
}
,
X.prototype._drawSquare = function(S) {
var j = S.x
, N = S.y
, I = S.size;
this._basicSquare({
x: j,
y: N,
size: I,
rotation: 0
})
}
,
X.prototype._drawRounded = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.getNeighbor
, H = U ? +U(-1, 0) : 0
, q = U ? +U(1, 0) : 0
, $ = U ? +U(0, -1) : 0
, L = U ? +U(0, 1) : 0
, M = H + q + $ + L;
if (M !== 0)
if (M > 2 || H && q || $ && L)
this._basicSquare({
x: j,
y: N,
size: I,
rotation: 0
});
else {
if (M === 2) {
var W = 0;
return H && $ ? W = Math.PI / 2 : $ && q ? W = Math.PI : q && L && (W = -Math.PI / 2),
void this._basicCornerRounded({
x: j,
y: N,
size: I,
rotation: W
})
}
if (M === 1)
return W = 0,
$ ? W = Math.PI / 2 : q ? W = Math.PI : L && (W = -Math.PI / 2),
void this._basicSideRounded({
x: j,
y: N,
size: I,
rotation: W
})
}
else
this._basicDot({
x: j,
y: N,
size: I,
rotation: 0
})
}
,
X.prototype._drawExtraRounded = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.getNeighbor
, H = U ? +U(-1, 0) : 0
, q = U ? +U(1, 0) : 0
, $ = U ? +U(0, -1) : 0
, L = U ? +U(0, 1) : 0
, M = H + q + $ + L;
if (M !== 0)
if (M > 2 || H && q || $ && L)
this._basicSquare({
x: j,
y: N,
size: I,
rotation: 0
});
else {
if (M === 2) {
var W = 0;
return H && $ ? W = Math.PI / 2 : $ && q ? W = Math.PI : q && L && (W = -Math.PI / 2),
void this._basicCornerExtraRounded({
x: j,
y: N,
size: I,
rotation: W
})
}
if (M === 1)
return W = 0,
$ ? W = Math.PI / 2 : q ? W = Math.PI : L && (W = -Math.PI / 2),
void this._basicSideRounded({
x: j,
y: N,
size: I,
rotation: W
})
}
else
this._basicDot({
x: j,
y: N,
size: I,
rotation: 0
})
}
,
X.prototype._drawClassy = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.getNeighbor
, H = U ? +U(-1, 0) : 0
, q = U ? +U(1, 0) : 0
, $ = U ? +U(0, -1) : 0
, L = U ? +U(0, 1) : 0;
H + q + $ + L !== 0 ? H || $ ? q || L ? this._basicSquare({
x: j,
y: N,
size: I,
rotation: 0
}) : this._basicCornerRounded({
x: j,
y: N,
size: I,
rotation: Math.PI / 2
}) : this._basicCornerRounded({
x: j,
y: N,
size: I,
rotation: -Math.PI / 2
}) : this._basicCornersRounded({
x: j,
y: N,
size: I,
rotation: Math.PI / 2
})
}
,
X.prototype._drawClassyRounded = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.getNeighbor
, H = U ? +U(-1, 0) : 0
, q = U ? +U(1, 0) : 0
, $ = U ? +U(0, -1) : 0
, L = U ? +U(0, 1) : 0;
H + q + $ + L !== 0 ? H || $ ? q || L ? this._basicSquare({
x: j,
y: N,
size: I,
rotation: 0
}) : this._basicCornerExtraRounded({
x: j,
y: N,
size: I,
rotation: Math.PI / 2
}) : this._basicCornerExtraRounded({
x: j,
y: N,
size: I,
rotation: -Math.PI / 2
}) : this._basicCornersRounded({
x: j,
y: N,
size: I,
rotation: Math.PI / 2
})
}
,
X
}();
var v = function() {
return (v = Object.assign || function(X) {
for (var S, j = 1, N = arguments.length; j < N; j++)
for (var I in S = arguments[j])
Object.prototype.hasOwnProperty.call(S, I) && (X[I] = S[I]);
return X
}
).apply(this, arguments)
};
const g = function() {
function X(S) {
var j = S.svg
, N = S.type;
this._svg = j,
this._type = N
}
return X.prototype.draw = function(S, j, N, I) {
var U;
switch (this._type) {
case "square":
U = this._drawSquare;
break;
case "extra-rounded":
U = this._drawExtraRounded;
break;
case "dot":
default:
U = this._drawDot
}
U.call(this, {
x: S,
y: j,
size: N,
rotation: I
})
}
,
X.prototype._rotateFigure = function(S) {
var j, N = S.x, I = S.y, U = S.size, H = S.rotation, q = H === void 0 ? 0 : H, $ = N + U / 2, L = I + U / 2;
(0,
S.draw)(),
(j = this._element) === null || j === void 0 || j.setAttribute("transform", "rotate(" + 180 * q / Math.PI + "," + $ + "," + L + ")")
}
,
X.prototype._basicDot = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y
, H = N / 7;
this._rotateFigure(v(v({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("clip-rule", "evenodd"),
j._element.setAttribute("d", "M " + (I + N / 2) + " " + U + "a " + N / 2 + " " + N / 2 + " 0 1 0 0.1 0zm 0 " + H + "a " + (N / 2 - H) + " " + (N / 2 - H) + " 0 1 1 -0.1 0Z")
}
}))
}
,
X.prototype._basicSquare = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y
, H = N / 7;
this._rotateFigure(v(v({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("clip-rule", "evenodd"),
j._element.setAttribute("d", "M " + I + " " + U + "v " + N + "h " + N + "v " + -N + "zM " + (I + H) + " " + (U + H) + "h " + (N - 2 * H) + "v " + (N - 2 * H) + "h " + (2 * H - N) + "z")
}
}))
}
,
X.prototype._basicExtraRounded = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y
, H = N / 7;
this._rotateFigure(v(v({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "path"),
j._element.setAttribute("clip-rule", "evenodd"),
j._element.setAttribute("d", "M " + I + " " + (U + 2.5 * H) + "v " + 2 * H + "a " + 2.5 * H + " " + 2.5 * H + ", 0, 0, 0, " + 2.5 * H + " " + 2.5 * H + "h " + 2 * H + "a " + 2.5 * H + " " + 2.5 * H + ", 0, 0, 0, " + 2.5 * H + " " + 2.5 * -H + "v " + -2 * H + "a " + 2.5 * H + " " + 2.5 * H + ", 0, 0, 0, " + 2.5 * -H + " " + 2.5 * -H + "h " + -2 * H + "a " + 2.5 * H + " " + 2.5 * H + ", 0, 0, 0, " + 2.5 * -H + " " + 2.5 * H + "M " + (I + 2.5 * H) + " " + (U + H) + "h " + 2 * H + "a " + 1.5 * H + " " + 1.5 * H + ", 0, 0, 1, " + 1.5 * H + " " + 1.5 * H + "v " + 2 * H + "a " + 1.5 * H + " " + 1.5 * H + ", 0, 0, 1, " + 1.5 * -H + " " + 1.5 * H + "h " + -2 * H + "a " + 1.5 * H + " " + 1.5 * H + ", 0, 0, 1, " + 1.5 * -H + " " + 1.5 * -H + "v " + -2 * H + "a " + 1.5 * H + " " + 1.5 * H + ", 0, 0, 1, " + 1.5 * H + " " + 1.5 * -H)
}
}))
}
,
X.prototype._drawDot = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.rotation;
this._basicDot({
x: j,
y: N,
size: I,
rotation: U
})
}
,
X.prototype._drawSquare = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.rotation;
this._basicSquare({
x: j,
y: N,
size: I,
rotation: U
})
}
,
X.prototype._drawExtraRounded = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.rotation;
this._basicExtraRounded({
x: j,
y: N,
size: I,
rotation: U
})
}
,
X
}();
var w = function() {
return (w = Object.assign || function(X) {
for (var S, j = 1, N = arguments.length; j < N; j++)
for (var I in S = arguments[j])
Object.prototype.hasOwnProperty.call(S, I) && (X[I] = S[I]);
return X
}
).apply(this, arguments)
};
const E = function() {
function X(S) {
var j = S.svg
, N = S.type;
this._svg = j,
this._type = N
}
return X.prototype.draw = function(S, j, N, I) {
var U;
switch (this._type) {
case "square":
U = this._drawSquare;
break;
case "dot":
default:
U = this._drawDot
}
U.call(this, {
x: S,
y: j,
size: N,
rotation: I
})
}
,
X.prototype._rotateFigure = function(S) {
var j, N = S.x, I = S.y, U = S.size, H = S.rotation, q = H === void 0 ? 0 : H, $ = N + U / 2, L = I + U / 2;
(0,
S.draw)(),
(j = this._element) === null || j === void 0 || j.setAttribute("transform", "rotate(" + 180 * q / Math.PI + "," + $ + "," + L + ")")
}
,
X.prototype._basicDot = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(w(w({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "circle"),
j._element.setAttribute("cx", String(I + N / 2)),
j._element.setAttribute("cy", String(U + N / 2)),
j._element.setAttribute("r", String(N / 2))
}
}))
}
,
X.prototype._basicSquare = function(S) {
var j = this
, N = S.size
, I = S.x
, U = S.y;
this._rotateFigure(w(w({}, S), {
draw: function() {
j._element = document.createElementNS("http://www.w3.org/2000/svg", "rect"),
j._element.setAttribute("x", String(I)),
j._element.setAttribute("y", String(U)),
j._element.setAttribute("width", String(N)),
j._element.setAttribute("height", String(N))
}
}))
}
,
X.prototype._drawDot = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.rotation;
this._basicDot({
x: j,
y: N,
size: I,
rotation: U
})
}
,
X.prototype._drawSquare = function(S) {
var j = S.x
, N = S.y
, I = S.size
, U = S.rotation;
this._basicSquare({
x: j,
y: N,
size: I,
rotation: U
})
}
,
X
}()
, D = "circle";
var V = function(X, S, j, N) {
return new (j || (j = Promise))(function(I, U) {
function H(L) {
try {
$(N.next(L))
} catch (M) {
U(M)
}
}
function q(L) {
try {
$(N.throw(L))
} catch (M) {
U(M)
}
}
function $(L) {
var M;
L.done ? I(L.value) : (M = L.value,
M instanceof j ? M : new j(function(W) {
W(M)
}
)).then(H, q)
}
$((N = N.apply(X, [])).next())
}
)
}
, C = function(X, S) {
var j, N, I, U, H = {
label: 0,
sent: function() {
if (1 & I[0])
throw I[1];
return I[1]
},
trys: [],
ops: []
};
return U = {
next: q(0),
throw: q(1),
return: q(2)
},
typeof Symbol == "function" && (U[Symbol.iterator] = function() {
return this
}
),
U;
function q($) {
return function(L) {
return function(M) {
if (j)
throw new TypeError("Generator is already executing.");
for (; H; )
try {
if (j = 1,
N && (I = 2 & M[0] ? N.return : M[0] ? N.throw || ((I = N.return) && I.call(N),
0) : N.next) && !(I = I.call(N, M[1])).done)
return I;
switch (N = 0,
I && (M = [2 & M[0], I.value]),
M[0]) {
case 0:
case 1:
I = M;
break;
case 4:
return H.label++,
{
value: M[1],
done: !1
};
case 5:
H.label++,
N = M[1],
M = [0];
continue;
case 7:
M = H.ops.pop(),
H.trys.pop();
continue;
default:
if (!((I = (I = H.trys).length > 0 && I[I.length - 1]) || M[0] !== 6 && M[0] !== 2)) {
H = 0;
continue
}
if (M[0] === 3 && (!I || M[1] > I[0] && M[1] < I[3])) {
H.label = M[1];
break
}
if (M[0] === 6 && H.label < I[1]) {
H.label = I[1],
I = M;
break
}
if (I && H.label < I[2]) {
H.label = I[2],
H.ops.push(M);
break
}
I[2] && H.ops.pop(),
H.trys.pop();
continue
}
M = S.call(X, H)
} catch (W) {
M = [6, W],
N = 0
} finally {
j = I = 0
}
if (5 & M[0])
throw M[1];
return {
value: M[0] ? M[1] : void 0,
done: !0
}
}([$, L])
}
}
}
, P = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]
, A = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
const B = function() {
function X(S) {
this._element = document.createElementNS("http://www.w3.org/2000/svg", "svg"),
this._element.setAttribute("width", String(S.width)),
this._element.setAttribute("height", String(S.height)),
this._defs = document.createElementNS("http://www.w3.org/2000/svg", "defs"),
this._element.appendChild(this._defs),
this._options = S
}
return Object.defineProperty(X.prototype, "width", {
get: function() {
return this._options.width
},
enumerable: !1,
configurable: !0
}),
Object.defineProperty(X.prototype, "height", {
get: function() {
return this._options.height
},
enumerable: !1,
configurable: !0
}),
X.prototype.getElement = function() {
return this._element
}
,
X.prototype.drawQR = function(S) {
return V(this, void 0, void 0, function() {
var j, N, I, U, H, q, $, L, M, W, J = this;
return C(this, function(se) {
switch (se.label) {
case 0:
return j = S.getModuleCount(),
N = Math.min(this._options.width, this._options.height) - 2 * this._options.margin,
I = this._options.shape === D ? N / Math.sqrt(2) : N,
U = Math.floor(I / j),
H = {
hideXDots: 0,
hideYDots: 0,
width: 0,
height: 0
},
this._qr = S,
this._options.image ? [4, this.loadImage()] : [3, 2];
case 1:
if (se.sent(),
!this._image)
return [2];
q = this._options,
$ = q.imageOptions,
L = q.qrOptions,
M = $.imageSize * m[L.errorCorrectionLevel],
W = Math.floor(M * j * j),
H = function(ae) {
var ne = ae.originalHeight
, de = ae.originalWidth
, ye = ae.maxHiddenDots
, be = ae.maxHiddenAxisDots
, Me = ae.dotSize
, fe = {
x: 0,
y: 0
}
, Ee = {
x: 0,
y: 0
};
if (ne <= 0 || de <= 0 || ye <= 0 || Me <= 0)
return {
height: 0,
width: 0,
hideYDots: 0,
hideXDots: 0
};
var we = ne / de;
return fe.x = Math.floor(Math.sqrt(ye / we)),
fe.x <= 0 && (fe.x = 1),
be && be < fe.x && (fe.x = be),
fe.x % 2 == 0 && fe.x--,
Ee.x = fe.x * Me,
fe.y = 1 + 2 * Math.ceil((fe.x * we - 1) / 2),
Ee.y = Math.round(Ee.x * we),
(fe.y * fe.x > ye || be && be < fe.y) && (be && be < fe.y ? (fe.y = be,
fe.y % 2 == 0 && fe.x--) : fe.y -= 2,
Ee.y = fe.y * Me,
fe.x = 1 + 2 * Math.ceil((fe.y / we - 1) / 2),
Ee.x = Math.round(Ee.y / we)),
{
height: Ee.y,
width: Ee.x,
hideYDots: fe.y,
hideXDots: fe.x
}
}({
originalWidth: this._image.width,
originalHeight: this._image.height,
maxHiddenDots: W,
maxHiddenAxisDots: j - 14,
dotSize: U
}),
se.label = 2;
case 2:
return this.drawBackground(),
this.drawDots(function(ae, ne) {
var de, ye, be, Me, fe, Ee;
return !(J._options.imageOptions.hideBackgroundDots && ae >= (j - H.hideXDots) / 2 && ae < (j + H.hideXDots) / 2 && ne >= (j - H.hideYDots) / 2 && ne < (j + H.hideYDots) / 2 || !((de = P[ae]) === null || de === void 0) && de[ne] || !((ye = P[ae - j + 7]) === null || ye === void 0) && ye[ne] || !((be = P[ae]) === null || be === void 0) && be[ne - j + 7] || !((Me = A[ae]) === null || Me === void 0) && Me[ne] || !((fe = A[ae - j + 7]) === null || fe === void 0) && fe[ne] || !((Ee = A[ae]) === null || Ee === void 0) && Ee[ne - j + 7])
}),
this.drawCorners(),
this._options.image ? [4, this.drawImage({
width: H.width,
height: H.height,
count: j,
dotSize: U
})] : [3, 4];
case 3:
se.sent(),
se.label = 4;
case 4:
return [2]
}
})
})
}
,
X.prototype.drawBackground = function() {
var S, j, N, I = this._element, U = this._options;
if (I) {
var H = (S = U.backgroundOptions) === null || S === void 0 ? void 0 : S.gradient
, q = (j = U.backgroundOptions) === null || j === void 0 ? void 0 : j.color;
if ((H || q) && this._createColor({
options: H,
color: q,
additionalRotation: 0,
x: 0,
y: 0,
height: U.height,
width: U.width,
name: "background-color"
}),
(N = U.backgroundOptions) === null || N === void 0 ? void 0 : N.round) {
var $ = Math.min(U.width, U.height)
, L = document.createElementNS("http://www.w3.org/2000/svg", "rect");
this._backgroundClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"),
this._backgroundClipPath.setAttribute("id", "clip-path-background-color"),
this._defs.appendChild(this._backgroundClipPath),
L.setAttribute("x", String((U.width - $) / 2)),
L.setAttribute("y", String((U.height - $) / 2)),
L.setAttribute("width", String($)),
L.setAttribute("height", String($)),
L.setAttribute("rx", String($ / 2 * U.backgroundOptions.round)),
this._backgroundClipPath.appendChild(L)
}
}
}
,
X.prototype.drawDots = function(S) {
var j, N, I = this;
if (!this._qr)
throw "QR code is not defined";
var U = this._options
, H = this._qr.getModuleCount();
if (H > U.width || H > U.height)
throw "The canvas is too small.";
var q = Math.min(U.width, U.height) - 2 * U.margin
, $ = U.shape === D ? q / Math.sqrt(2) : q
, L = Math.floor($ / H)
, M = Math.floor((U.width - H * L) / 2)
, W = Math.floor((U.height - H * L) / 2)
, J = new b({
svg: this._element,
type: U.dotsOptions.type
});
this._dotsClipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath"),
this._dotsClipPath.setAttribute("id", "clip-path-dot-color"),
this._defs.appendChild(this._dotsClipPath),
this._createColor({
options: (j = U.dotsOptions) === null || j === void 0 ? void 0 : j.gradient,
color: U.dotsOptions.color,
additionalRotation: 0,
x: 0,
y: 0,
height: U.height,
width: U.width,
name: "dot-color"
});
for (var se = function(Ve) {
for (var Te = function(ke) {
return S && !S(Ve, ke) ? "continue" : !((N = ae._qr) === null || N === void 0) && N.isDark(Ve, ke) ? (J.draw(M + Ve * L, W + ke * L, L, function(Qe, nt) {
return !(Ve + Qe < 0 || ke + nt < 0 || Ve + Qe >= H || ke + nt >= H) && !(S && !S(Ve + Qe, ke + nt)) && !!I._qr && I._qr.isDark(Ve + Qe, ke + nt)
}),
void (J._element && ae._dotsClipPath && ae._dotsClipPath.appendChild(J._element))) : "continue"
}, Ke = 0; Ke < H; Ke++)
Te(Ke)
}, ae = this, ne = 0; ne < H; ne++)
se(ne);
if (U.shape === D) {
var de = Math.floor((q / L - H) / 2)
, ye = H + 2 * de
, be = M - de * L
, Me = W - de * L
, fe = []
, Ee = Math.floor(ye / 2);
for (ne = 0; ne < ye; ne++) {
fe[ne] = [];
for (var we = 0; we < ye; we++)
ne >= de - 1 && ne <= ye - de && we >= de - 1 && we <= ye - de || Math.sqrt((ne - Ee) * (ne - Ee) + (we - Ee) * (we - Ee)) > Ee ? fe[ne][we] = 0 : fe[ne][we] = this._qr.isDark(we - 2 * de < 0 ? we : we >= H ? we - 2 * de : we - de, ne - 2 * de < 0 ? ne : ne >= H ? ne - 2 * de : ne - de) ? 1 : 0
}
var Se = function(Ve) {
for (var Te = function(ke) {
if (!fe[Ve][ke])
return "continue";
J.draw(be + Ve * L, Me + ke * L, L, function(Qe, nt) {
var it;
return !!(!((it = fe[Ve + Qe]) === null || it === void 0) && it[ke + nt])
}),
J._element && Ge._dotsClipPath && Ge._dotsClipPath.appendChild(J._element)
}, Ke = 0; Ke < ye; Ke++)
Te(Ke)
}
, Ge = this;
for (ne = 0; ne < ye; ne++)
Se(ne)
}
}
,
X.prototype.drawCorners = function() {
var S = this;
if (!this._qr)
throw "QR code is not defined";
var j = this._element
, N = this._options;
if (!j)
throw "Element code is not defined";
var I = this._qr.getModuleCount()
, U = Math.min(N.width, N.height) - 2 * N.margin
, H = N.shape === D ? U / Math.sqrt(2) : U
, q = Math.floor(H / I)
, $ = 7 * q
, L = 3 * q
, M = Math.floor((N.width - I * q) / 2)
, W = Math.floor((N.height - I * q) / 2);
[[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI / 2]].forEach(function(J) {
var se, ae, ne, de, ye, be, Me, fe, Ee, we, Se, Ge, Ve = J[0], Te = J[1], Ke = J[2], ke = M + Ve * q * (I - 7), Qe = W + Te * q * (I - 7), nt = S._dotsClipPath, it = S._dotsClipPath;
if ((!((se = N.cornersSquareOptions) === null || se === void 0) && se.gradient || !((ae = N.cornersSquareOptions) === null || ae === void 0) && ae.color) && ((nt = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-square-color-" + Ve + "-" + Te),
S._defs.appendChild(nt),
S._cornersSquareClipPath = S._cornersDotClipPath = it = nt,
S._createColor({
options: (ne = N.cornersSquareOptions) === null || ne === void 0 ? void 0 : ne.gradient,
color: (de = N.cornersSquareOptions) === null || de === void 0 ? void 0 : de.color,
additionalRotation: Ke,
x: ke,
y: Qe,
height: $,
width: $,
name: "corners-square-color-" + Ve + "-" + Te
})),
(ye = N.cornersSquareOptions) === null || ye === void 0 ? void 0 : ye.type) {
var me = new g({
svg: S._element,
type: N.cornersSquareOptions.type
});
me.draw(ke, Qe, $, Ke),
me._element && nt && nt.appendChild(me._element)
} else
for (var Ce = new b({
svg: S._element,
type: N.dotsOptions.type
}), Be = function(st) {
for (var Jt = function(vn) {
if (!(!((be = P[st]) === null || be === void 0) && be[vn]))
return "continue";
Ce.draw(ke + st * q, Qe + vn * q, q, function(K, ee) {
var ie;
return !!(!((ie = P[st + K]) === null || ie === void 0) && ie[vn + ee])
}),
Ce._element && nt && nt.appendChild(Ce._element)
}, _t = 0; _t < P[st].length; _t++)
Jt(_t)
}, Re = 0; Re < P.length; Re++)
Be(Re);
if ((!((Me = N.cornersDotOptions) === null || Me === void 0) && Me.gradient || !((fe = N.cornersDotOptions) === null || fe === void 0) && fe.color) && ((it = document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id", "clip-path-corners-dot-color-" + Ve + "-" + Te),
S._defs.appendChild(it),
S._cornersDotClipPath = it,
S._createColor({
options: (Ee = N.cornersDotOptions) === null || Ee === void 0 ? void 0 : Ee.gradient,
color: (we = N.cornersDotOptions) === null || we === void 0 ? void 0 : we.color,
additionalRotation: Ke,
x: ke + 2 * q,
y: Qe + 2 * q,
height: L,
width: L,
name: "corners-dot-color-" + Ve + "-" + Te
})),
(Se = N.cornersDotOptions) === null || Se === void 0 ? void 0 : Se.type) {
var We = new E({
svg: S._element,
type: N.cornersDotOptions.type
});
We.draw(ke + 2 * q, Qe + 2 * q, L, Ke),
We._element && it && it.appendChild(We._element)
} else {
Ce = new b({
svg: S._element,
type: N.dotsOptions.type
});
var et = function(st) {
for (var Jt = function(vn) {
if (!(!((Ge = A[st]) === null || Ge === void 0) && Ge[vn]))
return "continue";
Ce.draw(ke + st * q, Qe + vn * q, q, function(K, ee) {
var ie;
return !!(!((ie = A[st + K]) === null || ie === void 0) && ie[vn + ee])
}),
Ce._element && it && it.appendChild(Ce._element)
}, _t = 0; _t < A[st].length; _t++)
Jt(_t)
};
for (Re = 0; Re < A.length; Re++)
et(Re)
}
})
}
,
X.prototype.loadImage = function() {
var S = this;
return new Promise(function(j, N) {
var I = S._options
, U = new Image;
if (!I.image)
return N("Image is not defined");
typeof I.imageOptions.crossOrigin == "string" && (U.crossOrigin = I.imageOptions.crossOrigin),
S._image = U,
U.onload = function() {
j()
}
,
U.src = I.image
}
)
}
,
X.prototype.drawImage = function(S) {
var j = S.width
, N = S.height
, I = S.count
, U = S.dotSize;
return V(this, void 0, void 0, function() {
var H, q, $, L, M, W, J, se, ae;
return C(this, function(ne) {
switch (ne.label) {
case 0:
return H = this._options,
q = Math.floor((H.width - I * U) / 2),
$ = Math.floor((H.height - I * U) / 2),
L = q + H.imageOptions.margin + (I * U - j) / 2,
M = $ + H.imageOptions.margin + (I * U - N) / 2,
W = j - 2 * H.imageOptions.margin,
J = N - 2 * H.imageOptions.margin,
(se = document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttribute("x", String(L)),
se.setAttribute("y", String(M)),
se.setAttribute("width", W + "px"),
se.setAttribute("height", J + "px"),
[4, h(H.image || "")];
case 1:
return ae = ne.sent(),
se.setAttribute("href", ae || ""),
this._element.appendChild(se),
[2]
}
})
})
}
,
X.prototype._createColor = function(S) {
var j = S.options
, N = S.color
, I = S.additionalRotation
, U = S.x
, H = S.y
, q = S.height
, $ = S.width
, L = S.name
, M = $ > q ? $ : q
, W = document.createElementNS("http://www.w3.org/2000/svg", "rect");
if (W.setAttribute("x", String(U)),
W.setAttribute("y", String(H)),
W.setAttribute("height", String(q)),
W.setAttribute("width", String($)),
W.setAttribute("clip-path", "url('#clip-path-" + L + "')"),
j) {
var J;
if (j.type === "radial")
(J = document.createElementNS("http://www.w3.org/2000/svg", "radialGradient")).setAttribute("id", L),
J.setAttribute("gradientUnits", "userSpaceOnUse"),
J.setAttribute("fx", String(U + $ / 2)),
J.setAttribute("fy", String(H + q / 2)),
J.setAttribute("cx", String(U + $ / 2)),
J.setAttribute("cy", String(H + q / 2)),
J.setAttribute("r", String(M / 2));
else {
var se = ((j.rotation || 0) + I) % (2 * Math.PI)
, ae = (se + 2 * Math.PI) % (2 * Math.PI)
, ne = U + $ / 2
, de = H + q / 2
, ye = U + $ / 2
, be = H + q / 2;
ae >= 0 && ae <= .25 * Math.PI || ae > 1.75 * Math.PI && ae <= 2 * Math.PI ? (ne -= $ / 2,
de -= q / 2 * Math.tan(se),
ye += $ / 2,
be += q / 2 * Math.tan(se)) : ae > .25 * Math.PI && ae <= .75 * Math.PI ? (de -= q / 2,
ne -= $ / 2 / Math.tan(se),
be += q / 2,
ye += $ / 2 / Math.tan(se)) : ae > .75 * Math.PI && ae <= 1.25 * Math.PI ? (ne += $ / 2,
de += q / 2 * Math.tan(se),
ye -= $ / 2,
be -= q / 2 * Math.tan(se)) : ae > 1.25 * Math.PI && ae <= 1.75 * Math.PI && (de += q / 2,
ne += $ / 2 / Math.tan(se),
be -= q / 2,
ye -= $ / 2 / Math.tan(se)),
(J = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient")).setAttribute("id", L),
J.setAttribute("gradientUnits", "userSpaceOnUse"),
J.setAttribute("x1", String(Math.round(ne))),
J.setAttribute("y1", String(Math.round(de))),
J.setAttribute("x2", String(Math.round(ye))),
J.setAttribute("y2", String(Math.round(be)))
}
j.colorStops.forEach(function(Me) {
var fe = Me.offset
, Ee = Me.color
, we = document.createElementNS("http://www.w3.org/2000/svg", "stop");
we.setAttribute("offset", 100 * fe + "%"),
we.setAttribute("stop-color", Ee),
J.appendChild(we)
}),
W.setAttribute("fill", "url('#" + L + "')"),
this._defs.appendChild(J)
} else
N && W.setAttribute("fill", N);
this._element.appendChild(W)
}
,
X
}()
, Q = "canvas";
for (var Z = {}, F = 0; F <= 40; F++)
Z[F] = F;
const k = {
type: Q,
shape: "square",
width: 300,
height: 300,
data: "",
margin: 0,
qrOptions: {
typeNumber: Z[0],
mode: void 0,
errorCorrectionLevel: "Q"
},
imageOptions: {
hideBackgroundDots: !0,
imageSize: .4,
crossOrigin: void 0,
margin: 0
},
dotsOptions: {
type: "square",
color: "#000"
},
backgroundOptions: {
round: 0,
color: "#fff"
}
};
var T = function() {
return (T = Object.assign || function(X) {
for (var S, j = 1, N = arguments.length; j < N; j++)
for (var I in S = arguments[j])
Object.prototype.hasOwnProperty.call(S, I) && (X[I] = S[I]);
return X
}
).apply(this, arguments)
};
function _(X) {
var S = T({}, X);
if (!S.colorStops || !S.colorStops.length)
throw "Field 'colorStops' is required in gradient";
return S.rotation ? S.rotation = Number(S.rotation) : S.rotation = 0,
S.colorStops = S.colorStops.map(function(j) {
return T(T({}, j), {
offset: Number(j.offset)
})
}),
S
}
function O(X) {
var S = T({}, X);
return S.width = Number(S.width),
S.height = Number(S.height),
S.margin = Number(S.margin),
S.imageOptions = T(T({}, S.imageOptions), {
hideBackgroundDots: !!S.imageOptions.hideBackgroundDots,
imageSize: Number(S.imageOptions.imageSize),
margin: Number(S.imageOptions.margin)
}),
S.margin > Math.min(S.width, S.height) && (S.margin = Math.min(S.width, S.height)),
S.dotsOptions = T({}, S.dotsOptions),
S.dotsOptions.gradient && (S.dotsOptions.gradient = _(S.dotsOptions.gradient)),
S.cornersSquareOptions && (S.cornersSquareOptions = T({}, S.cornersSquareOptions),
S.cornersSquareOptions.gradient && (S.cornersSquareOptions.gradient = _(S.cornersSquareOptions.gradient))),
S.cornersDotOptions && (S.cornersDotOptions = T({}, S.cornersDotOptions),
S.cornersDotOptions.gradient && (S.cornersDotOptions.gradient = _(S.cornersDotOptions.gradient))),
S.backgroundOptions && (S.backgroundOptions = T({}, S.backgroundOptions),
S.backgroundOptions.gradient && (S.backgroundOptions.gradient = _(S.backgroundOptions.gradient))),
S
}
var R = a(192)
, z = a.n(R)
, Y = function(X, S, j, N) {
return new (j || (j = Promise))(function(I, U) {
function H(L) {
try {
$(N.next(L))
} catch (M) {
U(M)
}
}
function q(L) {
try {
$(N.throw(L))
} catch (M) {
U(M)
}
}
function $(L) {
var M;
L.done ? I(L.value) : (M = L.value,
M instanceof j ? M : new j(function(W) {
W(M)
}
)).then(H, q)
}
$((N = N.apply(X, [])).next())
}
)
}
, te = function(X, S) {
var j, N, I, U, H = {
label: 0,
sent: function() {
if (1 & I[0])
throw I[1];
return I[1]
},
trys: [],
ops: []
};
return U = {
next: q(0),
throw: q(1),
return: q(2)
},
typeof Symbol == "function" && (U[Symbol.iterator] = function() {
return this
}
),
U;
function q($) {
return function(L) {
return function(M) {
if (j)
throw new TypeError("Generator is already executing.");
for (; H; )
try {
if (j = 1,
N && (I = 2 & M[0] ? N.return : M[0] ? N.throw || ((I = N.return) && I.call(N),
0) : N.next) && !(I = I.call(N, M[1])).done)
return I;
switch (N = 0,
I && (M = [2 & M[0], I.value]),
M[0]) {
case 0:
case 1:
I = M;
break;
case 4:
return H.label++,
{
value: M[1],
done: !1
};
case 5:
H.label++,
N = M[1],
M = [0];
continue;
case 7:
M = H.ops.pop(),
H.trys.pop();
continue;
default:
if (!((I = (I = H.trys).length > 0 && I[I.length - 1]) || M[0] !== 6 && M[0] !== 2)) {
H = 0;
continue
}
if (M[0] === 3 && (!I || M[1] > I[0] && M[1] < I[3])) {
H.label = M[1];
break
}
if (M[0] === 6 && H.label < I[1]) {
H.label = I[1],
I = M;
break
}
if (I && H.label < I[2]) {
H.label = I[2],
H.ops.push(M);
break
}
I[2] && H.ops.pop(),
H.trys.pop();
continue
}
M = S.call(X, H)
} catch (W) {
M = [6, W],
N = 0
} finally {
j = I = 0
}
if (5 & M[0])
throw M[1];
return {
value: M[0] ? M[1] : void 0,
done: !0
}
}([$, L])
}
}
};
const ue = function() {
function X(S) {
this._options = S ? O(d(k, S)) : k,
this.update()
}
return X._clearContainer = function(S) {
S && (S.innerHTML = "")
}
,
X.prototype._setupSvg = function() {
var S = this;
if (this._qr) {
var j = new B(this._options);
this._svg = j.getElement(),
this._svgDrawingPromise = j.drawQR(this._qr).then(function() {
var N;
S._svg && ((N = S._extension) === null || N === void 0 || N.call(S, j.getElement(), S._options))
})
}
}
,
X.prototype._setupCanvas = function() {
var S, j = this;
this._qr && (this._canvas = document.createElement("canvas"),
this._canvas.width = this._options.width,
this._canvas.height = this._options.height,
this._setupSvg(),
this._canvasDrawingPromise = (S = this._svgDrawingPromise) === null || S === void 0 ? void 0 : S.then(function() {
if (j._svg) {
var N = j._svg
, I = new XMLSerializer().serializeToString(N)
, U = "data:image/svg+xml;base64," + btoa(I)
, H = new Image;
return new Promise(function(q) {
H.onload = function() {
var $, L;
(L = ($ = j._canvas) === null || $ === void 0 ? void 0 : $.getContext("2d")) === null || L === void 0 || L.drawImage(H, 0, 0),
q()
}
,
H.src = U
}
)
}
}))
}
,
X.prototype._getElement = function(S) {
return S === void 0 && (S = "png"),
Y(this, void 0, void 0, function() {
return te(this, function(j) {
switch (j.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return S.toLowerCase() !== "svg" ? [3, 2] : (this._svg && this._svgDrawingPromise || this._setupSvg(),
[4, this._svgDrawingPromise]);
case 1:
return j.sent(),
[2, this._svg];
case 2:
return this._canvas && this._canvasDrawingPromise || this._setupCanvas(),
[4, this._canvasDrawingPromise];
case 3:
return j.sent(),
[2, this._canvas]
}
})
})
}
,
X.prototype.update = function(S) {
X._clearContainer(this._container),
this._options = S ? O(d(this._options, S)) : this._options,
this._options.data && (this._qr = z()(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel),
this._qr.addData(this._options.data, this._options.qrOptions.mode || function(j) {
switch (!0) {
case /^[0-9]*$/.test(j):
return "Numeric";
case /^[0-9A-Z $%*+\-./:]*$/.test(j):
return "Alphanumeric";
default:
return "Byte"
}
}(this._options.data)),
this._qr.make(),
this._options.type === Q ? this._setupCanvas() : this._setupSvg(),
this.append(this._container))
}
,
X.prototype.append = function(S) {
if (S) {
if (typeof S.appendChild != "function")
throw "Container should be a single DOM node";
this._options.type === Q ? this._canvas && S.appendChild(this._canvas) : this._svg && S.appendChild(this._svg),
this._container = S
}
}
,
X.prototype.applyExtension = function(S) {
if (!S)
throw "Extension function should be defined.";
this._extension = S,
this.update()
}
,
X.prototype.deleteExtension = function() {
this._extension = void 0,
this.update()
}
,
X.prototype.getRawData = function(S) {
return S === void 0 && (S = "png"),
Y(this, void 0, void 0, function() {
var j, N, I;
return te(this, function(U) {
switch (U.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return [4, this._getElement(S)];
case 1:
return (j = U.sent()) ? S.toLowerCase() === "svg" ? (N = new XMLSerializer,
I = N.serializeToString(j),
[2, new Blob([`<?xml version="1.0" standalone="no"?>\r
` + I],{
type: "image/svg+xml"
})]) : [2, new Promise(function(H) {
return j.toBlob(H, "image/" + S, 1)
}
)] : [2, null]
}
})
})
}
,
X.prototype.download = function(S) {
return Y(this, void 0, void 0, function() {
var j, N, I, U, H;
return te(this, function(q) {
switch (q.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return j = "png",
N = "qr",
typeof S == "string" ? (j = S,
console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")) : typeof S == "object" && S !== null && (S.name && (N = S.name),
S.extension && (j = S.extension)),
[4, this._getElement(j)];
case 1:
return (I = q.sent()) ? (j.toLowerCase() === "svg" ? (U = new XMLSerializer,
H = `<?xml version="1.0" standalone="no"?>\r
` + (H = U.serializeToString(I)),
f("data:image/svg+xml;charset=utf-8," + encodeURIComponent(H), N + ".svg")) : f(I.toDataURL("image/" + j), N + "." + j),
[2]) : [2]
}
})
})
}
,
X
}()
}
}
, r = {};
function i(s) {
if (r[s])
return r[s].exports;
var o = r[s] = {
exports: {}
};
return n[s](o, o.exports, i),
o.exports
}
return i.n = s=>{
var o = s && s.__esModule ? ()=>s.default : ()=>s;
return i.d(o, {
a: o
}),
o
}
,
i.d = (s,o)=>{
for (var a in o)
i.o(o, a) && !i.o(s, a) && Object.defineProperty(s, a, {
enumerable: !0,
get: o[a]
})
}
,
i.o = (s,o)=>Object.prototype.hasOwnProperty.call(s, o),
i(676)
}
)().default
})
}
)(bT);
var V8 = bT.exports;
const z8 = pu(V8)
, U8 = (e,t)=>{
const n = y.useRef(null)
, r = new z8({
height: 1e3,
width: 1e3,
type: "canvas",
data: e,
image: t,
margin: 0,
qrOptions: {
typeNumber: 0,
mode: "Byte",
errorCorrectionLevel: "Q"
},
imageOptions: {
hideBackgroundDots: !0,
imageSize: .4,
margin: 0
},
backgroundOptions: {
color: "#ffffff00"
},
dotsOptions: {
type: "rounded",
color: "#DEDEDE"
},
cornersSquareOptions: {
type: "extra-rounded",
color: "#DEDEDE"
},
cornersDotOptions: {
type: void 0,
color: "#DEDEDE"
}
});
return y.useLayoutEffect(()=>{
const i = n.current;
if (i)
return r.append(n.current),
()=>{
i.innerHTML = ""
}
}
, [e, r]),
n
}
, B8 = y.memo(e=>{
const {link: t, imageUrl: n} = e
, r = U8(t, n);
return x.jsx("div", {
className: "h-full w-full *:h-full *:w-full",
ref: r
})
}
)
, kx = {
px: "1px",
0: "0px",
.5: "0.125rem",
1: "0.25rem",
1.5: "0.375rem",
2: "0.5rem",
2.5: "0.625rem",
3: "0.75rem",
3.5: "0.875rem",
4: "1rem",
5: "1.25rem",
6: "1.5rem",
7: "1.75rem",
8: "2rem",
9: "2.25rem",
10: "2.5rem",
11: "2.75rem",
12: "3rem",
14: "3.5rem",
16: "4rem",
20: "5rem",
24: "6rem",
28: "7rem",
32: "8rem",
36: "9rem",
40: "10rem",
44: "11rem",
48: "12rem",
52: "13rem",
56: "14rem",
60: "15rem",
64: "16rem",
72: "18rem",
80: "20rem",
96: "24rem"
}
, hr = e=>{
const {x: t="0", y: n="0"} = e
, r = kx[t]
, i = kx[n];
return x.jsx("div", {
style: {
width: r,
height: i
}
})
}
, ST = ()=>x.jsx("div", {
className: "flex animate-spin items-center justify-center",
children: x.jsx("img", {
src: Ae.flyingCoin,
className: "size-[80px]"
})
});
function H8(e) {
const t = e + "CollectionProvider"
, [n,r] = Ru(t)
, [i,s] = n(t, {
collectionRef: {
current: null
},
itemMap: new Map
})
, o = h=>{
const {scope: m, children: p} = h
, b = ce.useRef(null)
, v = ce.useRef(new Map).current;
return ce.createElement(i, {
scope: m,
itemMap: v,
collectionRef: b
}, p)
}
, a = e + "CollectionSlot"
, l = ce.forwardRef((h,m)=>{
const {scope: p, children: b} = h
, v = s(a, p)
, g = Zr(m, v.collectionRef);
return ce.createElement(Ul, {
ref: g
}, b)
}
)
, u = e + "CollectionItemSlot"
, c = "data-radix-collection-item"
, d = ce.forwardRef((h,m)=>{
const {scope: p, children: b, ...v} = h
, g = ce.useRef(null)
, w = Zr(m, g)
, E = s(u, p);
return ce.useEffect(()=>(E.itemMap.set(g, {
ref: g,
...v
}),
()=>void E.itemMap.delete(g))),
ce.createElement(Ul, {
[c]: "",
ref: w
}, b)
}
);
function f(h) {
const m = s(e + "CollectionConsumer", h);
return ce.useCallback(()=>{
const b = m.collectionRef.current;
if (!b)
return [];
const v = Array.from(b.querySelectorAll(`[${c}]`));
return Array.from(m.itemMap.values()).sort((E,D)=>v.indexOf(E.ref.current) - v.indexOf(D.ref.current))
}
, [m.collectionRef, m.itemMap])
}
return [{
Provider: o,
Slot: l,
ItemSlot: d
}, f, r]
}
const W8 = y.createContext(void 0);
function ET(e) {
const t = y.useContext(W8);
return e || t || "ltr"
}
const ip = "rovingFocusGroup.onEntryFocus"
, G8 = {
bubbles: !1,
cancelable: !0
}
, Py = "RovingFocusGroup"
, [dg,CT,K8] = H8(Py)
, [q8,PT] = Ru(Py, [K8])
, [Q8,Y8] = q8(Py)
, X8 = y.forwardRef((e,t)=>y.createElement(dg.Provider, {
scope: e.__scopeRovingFocusGroup
}, y.createElement(dg.Slot, {
scope: e.__scopeRovingFocusGroup
}, y.createElement(J8, qe({}, e, {
ref: t
})))))
, J8 = y.forwardRef((e,t)=>{
const {__scopeRovingFocusGroup: n, orientation: r, loop: i=!1, dir: s, currentTabStopId: o, defaultCurrentTabStopId: a, onCurrentTabStopIdChange: l, onEntryFocus: u, ...c} = e
, d = y.useRef(null)
, f = Zr(t, d)
, h = ET(s)
, [m=null,p] = $v({
prop: o,
defaultProp: a,
onChange: l
})
, [b,v] = y.useState(!1)
, g = Vi(u)
, w = CT(n)
, E = y.useRef(!1)
, [D,V] = y.useState(0);
return y.useEffect(()=>{
const C = d.current;
if (C)
return C.addEventListener(ip, g),
()=>C.removeEventListener(ip, g)
}
, [g]),
y.createElement(Q8, {
scope: n,
orientation: r,
dir: h,
loop: i,
currentTabStopId: m,
onItemFocus: y.useCallback(C=>p(C), [p]),
onItemShiftTab: y.useCallback(()=>v(!0), []),
onFocusableItemAdd: y.useCallback(()=>V(C=>C + 1), []),
onFocusableItemRemove: y.useCallback(()=>V(C=>C - 1), [])
}, y.createElement(ln.div, qe({
tabIndex: b || D === 0 ? -1 : 0,
"data-orientation": r
}, c, {
ref: f,
style: {
outline: "none",
...e.style
},
onMouseDown: Yt(e.onMouseDown, ()=>{
E.current = !0
}
),
onFocus: Yt(e.onFocus, C=>{
const P = !E.current;
if (C.target === C.currentTarget && P && !b) {
const A = new CustomEvent(ip,G8);
if (C.currentTarget.dispatchEvent(A),
!A.defaultPrevented) {
const B = w().filter(T=>T.focusable)
, Q = B.find(T=>T.active)
, Z = B.find(T=>T.id === m)
, k = [Q, Z, ...B].filter(Boolean).map(T=>T.ref.current);
TT(k)
}
}
E.current = !1
}
),
onBlur: Yt(e.onBlur, ()=>v(!1))
})))
}
)
, Z8 = "RovingFocusGroupItem"
, e7 = y.forwardRef((e,t)=>{
const {__scopeRovingFocusGroup: n, focusable: r=!0, active: i=!1, tabStopId: s, ...o} = e
, a = ul()
, l = s || a
, u = Y8(Z8, n)
, c = u.currentTabStopId === l
, d = CT(n)
, {onFocusableItemAdd: f, onFocusableItemRemove: h} = u;
return y.useEffect(()=>{
if (r)
return f(),
()=>h()
}
, [r, f, h]),
y.createElement(dg.ItemSlot, {
scope: n,
id: l,
focusable: r,
active: i
}, y.createElement(ln.span, qe({
tabIndex: c ? 0 : -1,
"data-orientation": u.orientation
}, o, {
ref: t,
onMouseDown: Yt(e.onMouseDown, m=>{
r ? u.onItemFocus(l) : m.preventDefault()
}
),
onFocus: Yt(e.onFocus, ()=>u.onItemFocus(l)),
onKeyDown: Yt(e.onKeyDown, m=>{
if (m.key === "Tab" && m.shiftKey) {
u.onItemShiftTab();
return
}
if (m.target !== m.currentTarget)
return;
const p = r7(m, u.orientation, u.dir);
if (p !== void 0) {
m.preventDefault();
let v = d().filter(g=>g.focusable).map(g=>g.ref.current);
if (p === "last")
v.reverse();
else if (p === "prev" || p === "next") {
p === "prev" && v.reverse();
const g = v.indexOf(m.currentTarget);
v = u.loop ? i7(v, g + 1) : v.slice(g + 1)
}
setTimeout(()=>TT(v))
}
}
)
})))
}
)
, t7 = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
function n7(e, t) {
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e
}
function r7(e, t, n) {
const r = n7(e.key, n);
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
return t7[r]
}
function TT(e) {
const t = document.activeElement;
for (const n of e)
if (n === t || (n.focus(),
document.activeElement !== t))
return
}
function i7(e, t) {
return e.map((n,r)=>e[(t + r) % e.length])
}
const s7 = X8
, o7 = e7
, RT = "Tabs"
, [a7,$z] = Ru(RT, [PT])
, OT = PT()
, [l7,Ty] = a7(RT)
, u7 = y.forwardRef((e,t)=>{
const {__scopeTabs: n, value: r, onValueChange: i, defaultValue: s, orientation: o="horizontal", dir: a, activationMode: l="automatic", ...u} = e
, c = ET(a)
, [d,f] = $v({
prop: r,
onChange: i,
defaultProp: s
});
return y.createElement(l7, {
scope: n,
baseId: ul(),
value: d,
onValueChange: f,
orientation: o,
dir: c,
activationMode: l
}, y.createElement(ln.div, qe({
dir: c,
"data-orientation": o
}, u, {
ref: t
})))
}
)
, c7 = "TabsList"
, d7 = y.forwardRef((e,t)=>{
const {__scopeTabs: n, loop: r=!0, ...i} = e
, s = Ty(c7, n)
, o = OT(n);
return y.createElement(s7, qe({
asChild: !0
}, o, {
orientation: s.orientation,
dir: s.dir,
loop: r
}), y.createElement(ln.div, qe({
role: "tablist",
"aria-orientation": s.orientation
}, i, {
ref: t
})))
}
)
, f7 = "TabsTrigger"
, h7 = y.forwardRef((e,t)=>{
const {__scopeTabs: n, value: r, disabled: i=!1, ...s} = e
, o = Ty(f7, n)
, a = OT(n)
, l = kT(o.baseId, r)
, u = _T(o.baseId, r)
, c = r === o.value;
return y.createElement(o7, qe({
asChild: !0
}, a, {
focusable: !i,
active: c
}), y.createElement(ln.button, qe({
type: "button",
role: "tab",
"aria-selected": c,
"aria-controls": u,
"data-state": c ? "active" : "inactive",
"data-disabled": i ? "" : void 0,
disabled: i,
id: l
}, s, {
ref: t,
onMouseDown: Yt(e.onMouseDown, d=>{
!i && d.button === 0 && d.ctrlKey === !1 ? o.onValueChange(r) : d.preventDefault()
}
),
onKeyDown: Yt(e.onKeyDown, d=>{
[" ", "Enter"].includes(d.key) && o.onValueChange(r)
}
),
onFocus: Yt(e.onFocus, ()=>{
const d = o.activationMode !== "manual";
!c && !i && d && o.onValueChange(r)
}
)
})))
}
)
, p7 = "TabsContent"
, m7 = y.forwardRef((e,t)=>{
const {__scopeTabs: n, value: r, forceMount: i, children: s, ...o} = e
, a = Ty(p7, n)
, l = kT(a.baseId, r)
, u = _T(a.baseId, r)
, c = r === a.value
, d = y.useRef(c);
return y.useEffect(()=>{
const f = requestAnimationFrame(()=>d.current = !1);
return ()=>cancelAnimationFrame(f)
}
, []),
y.createElement(Ou, {
present: i || c
}, ({present: f})=>y.createElement(ln.div, qe({
"data-state": c ? "active" : "inactive",
"data-orientation": a.orientation,
role: "tabpanel",
"aria-labelledby": l,
hidden: !f,
id: u,
tabIndex: 0
}, o, {
ref: t,
style: {
...e.style,
animationDuration: d.current ? "0s" : void 0
}
}), f && s))
}
);
function kT(e, t) {
return `${e}-trigger-${t}`
}
function _T(e, t) {
return `${e}-content-${t}`
}
const g7 = u7
, AT = d7
, DT = h7
, LT = m7
, v7 = g7
, NT = y.forwardRef(({className: e, ...t},n)=>x.jsx(AT, {
ref: n,
className: Ze("flex items-center justify-center rounded-2xl border border-graphite-light p-[3.5px] backdrop-blur-[2px]", e),
...t
}));
NT.displayName = AT.displayName;
const Wc = y.forwardRef(({className: e, notification: t=!1, ...n},r)=>x.jsxs("div", {
className: "relative flex w-full",
children: [t && x.jsx(GP, {
className: "absolute right-2 top-2"
}), x.jsx(DT, {
ref: r,
className: Ze("inline-flex w-full items-center justify-center whitespace-nowrap rounded-xl py-3 text-base text-white/65 transition-all data-[state=active]:bg-graphite-light data-[state=active]:text-white", e),
...n
})]
}));
Wc.displayName = DT.displayName;
const Gc = y.forwardRef(({className: e, ...t},n)=>x.jsx(LT, {
ref: n,
className: Ze("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", e),
...t
}));
Gc.displayName = LT.displayName;
const _x = e=>x.jsx("button", {
...e,
className: Ze("w-full rounded-xl bg-gold-button-gradient py-[17px] text-h3 text-black subpixel-antialiased shadow-gold-button-glow", e.className)
})
, y7 = e=>{
const {button: t, children: n, open: r, onOpenChange: i} = e
, [s,o] = y.useState(!1);
y.useEffect(()=>{
o(r ?? !1)
}
, [r]);
const a = u=>{
o(u),
i == null || i(u)
}
, l = ()=>{
o(!1),
i == null || i(!1)
}
;
return x.jsxs(Lt.Root, {
dismissible: !1,
open: s,
onOpenChange: a,
children: [t && x.jsx(Lt.Trigger, {
className: "w-full focus-visible:outline-none",
children: t
}), x.jsxs(Lt.Portal, {
children: [x.jsx(Lt.Overlay, {
onClick: l,
className: "fixed inset-0 bg-black/50 backdrop-blur-[4px]"
}), x.jsxs(Lt.Content, {
className: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex flex-col rounded-t-xl bg-graphite-normal px-6 pb-10 pt-10 focus-visible:outline-none",
children: [x.jsx("div", {
children: n
}), x.jsx("button", {
onClick: l,
className: "absolute right-6 top-6",
children: x.jsx(Af, {})
})]
})]
})]
})
}
, w7 = ()=>x.jsx(F3, {
toastOptions: {
style: {
backgroundColor: "#202229",
color: "#fff",
borderRadius: "16px",
padding: "10px"
}
}
})
, x7 = {
notification: {
notification: "We are cleaning up the databases from manipulations and fraud. If your balance has decreased but you did not violate any rules, we will restore everything soon!"
},
boosters: {
shareBalance: "Your share balance",
dailyBoosters: "Daily boosters",
boosters: "Boosters",
tappingGuru: "Power Punch",
fullTank: "Full tank",
energyLimit: "Energy limit",
multitap: "Multitap",
rechargingSpeed: "Recharging speed",
level: "Level",
tappingGuruDescription: "Each tap multiplies by 5 for 20 seconds",
free: "Free",
getIt: "Get it!",
fullTankDescription: "Instantly restores 100% of energy",
multitapDescription: `Increases amount of coins you can
earn per one tap. +1 per level`,
energyLimitDescription: "Increases limit of energy. +500 per level",
rechargingSpeedDescription: `Increases speed of recharging.
+1 per second for each level`
},
stats: {
totalTouches: "Total touches",
totalPlayers: "Total players",
dailyUsers: "Daily users",
onlinePlayers: "Online players"
},
footer: {
ref: "Ref",
tasks: "Tasks",
boosters: "Boost",
stats: "Stats",
tap: "Tap"
},
leagues: {
wooden: "Wooden",
bronze: "Bronze",
silver: "Silver",
gold: "Gold",
platinum: "Platinum",
diamond: "Diamond",
master: "Master",
grandmaster: "Grandmaster",
elite: "Elite",
legendary: "Legendary",
mythic: "Mythic",
league: "League",
description: `Your score determines the league you enter`,
completed: "Completed!",
from: "From"
},
tasks: {
special: "Special",
leagues: "Leagues",
referrals: "Ref Tasks",
claim: "Claim",
invite: "Invite {{count}} friends",
invite_one: "Invite {{count}} friend"
},
referrals: {
myRefs_one: "Referral",
myRefs_other: "Referrals",
my: "My",
inviteFriends: "Invite friends",
inviteFriendsButtonDescription: "and get 2500 coins each",
noRefs: "You don’t have referrals yet",
description: "Invite a friend and get 2500 coins",
copyLink: "Copy link",
inviteMessage: "Join and get 2500 real coins! I'm already in the game and waiting for you. Click on the link and take the bonus!"
}
}
, b7 = {
notification: {
notification: "Мы очищаем базы данных от манипуляций и мошенничества. Если ваш баланс уменьшился, но вы не нарушали никаких правил, мы скоро все восстановим!"
},
boosters: {
shareBalance: "Ваш баланс",
dailyBoosters: "Ежедневные бустеры",
boosters: "Бустеры",
tappingGuru: "Таппинг гуру",
fullTank: "Полный бак",
energyLimit: "Лимит энергии",
multitap: "Мультитап",
rechargingSpeed: "Скорость восстановления",
level: "Уровень",
free: "Бесплатно",
getIt: "Купить!",
tappingGuruDescription: `Каждый тап умножается на 5
в течение 20 секунд`,
fullTankDescription: `Моментально восстанавливает
энергию до 100%`,
multitapDescription: "Увеличивает количество получаемых монет за один тап. +1 за каждый уровень",
energyLimitDescription: `Увеличивает лимит энергии.
+500 за каждый уровень`,
rechargingSpeedDescription: "Увеличивает скорость восстановления энергии. +1 в секунду за каждый уровень"
},
stats: {
totalTouches: "Всего касаний",
totalPlayers: "Всего игроков",
dailyUsers: "Игроков в день",
onlinePlayers: "Игроков в сети"
},
footer: {
ref: "Друг",
tasks: "Задачи",
boosters: "Буст",
stats: "Стат",
tap: "Тап"
},
leagues: {
wooden: "Деревянная",
bronze: "Бронзовая",
silver: "Серебряная",
gold: "Золотая",
platinum: "Платиновая",
diamond: "Алмазная",
master: "Мастер",
grandmaster: "Грандмастер",
elite: "Элитная",
legendary: "Легендарная",
mythic: "Мифическая",
league: "лига",
description: "Количество натапанных монет определяет лигу в которой вы находитесь",
completed: "Завершено!",
from: "от"
},
tasks: {
special: "Особые",
leagues: "Лиги",
referrals: "Друзья",
claim: "Забрать",
invite: "{{count}} друзей",
invite_one: "{{count}} друга"
},
referrals: {
myRefs_one: "Друг",
myRefs_few: "Друга",
myRefs_many: "Друзей",
my: "Моих",
inviteFriends: "Пригласите друзей",
inviteFriendsButtonDescription: "и получите 2500 монет",
noRefs: "У вас пока нет приглашенных друзей",
description: "Пригласите друга и получите 2500 монет",
copyLink: "Скопировать ссылку",
inviteMessage: "Присоединяйся и получи 2500 реальных монет! Я уже в игре и жду тебя. Нажми на ссылку и забери бонус!"
}
}
, S7 = {
type: "logger",
log(e) {
this.output("log", e)
},
warn(e) {
this.output("warn", e)
},
error(e) {
this.output("error", e)
},
output(e, t) {
console && console[e] && console[e].apply(console, t)
}
};
class zd {
constructor(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
this.init(t, n)
}
init(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
this.prefix = n.prefix || "i18next:",
this.logger = t || S7,
this.options = n,
this.debug = n.debug
}
log() {
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
n[r] = arguments[r];
return this.forward(n, "log", "", !0)
}
warn() {
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
n[r] = arguments[r];
return this.forward(n, "warn", "", !0)
}
error() {
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
n[r] = arguments[r];
return this.forward(n, "error", "")
}
deprecate() {
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
n[r] = arguments[r];
return this.forward(n, "warn", "WARNING DEPRECATED: ", !0)
}
forward(t, n, r, i) {
return i && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${r}${this.prefix} ${t[0]}`),
this.logger[n](t))
}
create(t) {
return new zd(this.logger,{
prefix: `${this.prefix}:${t}:`,
...this.options
})
}
clone(t) {
return t = t || this.options,
t.prefix = t.prefix || this.prefix,
new zd(this.logger,t)
}
}
var Rr = new zd;
class Bf {
constructor() {
this.observers = {}
}
on(t, n) {
return t.split(" ").forEach(r=>{
this.observers[r] || (this.observers[r] = new Map);
const i = this.observers[r].get(n) || 0;
this.observers[r].set(n, i + 1)
}
),
this
}
off(t, n) {
if (this.observers[t]) {
if (!n) {
delete this.observers[t];
return
}
this.observers[t].delete(n)
}
}
emit(t) {
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
r[i - 1] = arguments[i];
this.observers[t] && Array.from(this.observers[t].entries()).forEach(o=>{
let[a,l] = o;
for (let u = 0; u < l; u++)
a(...r)
}
),
this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(o=>{
let[a,l] = o;
for (let u = 0; u < l; u++)
a.apply(a, [t, ...r])
}
)
}
}
function Ba() {
let e, t;
const n = new Promise((r,i)=>{
e = r,
t = i
}
);
return n.resolve = e,
n.reject = t,
n
}
function Ax(e) {
return e == null ? "" : "" + e
}
function E7(e, t, n) {
e.forEach(r=>{
t[r] && (n[r] = t[r])
}
)
}
const C7 = /###/g;
function ml(e, t, n) {
function r(a) {
return a && a.indexOf("###") > -1 ? a.replace(C7, ".") : a
}
function i() {
return !e || typeof e == "string"
}
const s = typeof t != "string" ? t : t.split(".");
let o = 0;
for (; o < s.length - 1; ) {
if (i())
return {};
const a = r(s[o]);
!e[a] && n && (e[a] = new n),
Object.prototype.hasOwnProperty.call(e, a) ? e = e[a] : e = {},
++o
}
return i() ? {} : {
obj: e,
k: r(s[o])
}
}
function Dx(e, t, n) {
const {obj: r, k: i} = ml(e, t, Object);
if (r !== void 0 || t.length === 1) {
r[i] = n;
return
}
let s = t[t.length - 1]
, o = t.slice(0, t.length - 1)
, a = ml(e, o, Object);
for (; a.obj === void 0 && o.length; )
s = `${o[o.length - 1]}.${s}`,
o = o.slice(0, o.length - 1),
a = ml(e, o, Object),
a && a.obj && typeof a.obj[`${a.k}.${s}`] < "u" && (a.obj = void 0);
a.obj[`${a.k}.${s}`] = n
}
function P7(e, t, n, r) {
const {obj: i, k: s} = ml(e, t, Object);
i[s] = i[s] || [],
i[s].push(n)
}
function Ud(e, t) {
const {obj: n, k: r} = ml(e, t);
if (n)
return n[r]
}
function T7(e, t, n) {
const r = Ud(e, n);
return r !== void 0 ? r : Ud(t, n)
}
function MT(e, t, n) {
for (const r in t)
r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r]instanceof String || typeof t[r] == "string" || t[r]instanceof String ? n && (e[r] = t[r]) : MT(e[r], t[r], n) : e[r] = t[r]);
return e
}
function no(e) {
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")
}
var R7 = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
function O7(e) {
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, t=>R7[t]) : e
}
class k7 {
constructor(t) {
this.capacity = t,
this.regExpMap = new Map,
this.regExpQueue = []
}
getRegExp(t) {
const n = this.regExpMap.get(t);
if (n !== void 0)
return n;
const r = new RegExp(t);
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()),
this.regExpMap.set(t, r),
this.regExpQueue.push(t),
r
}
}
const _7 = [" ", ",", "?", "!", ";"]
, A7 = new k7(20);
function D7(e, t, n) {
t = t || "",
n = n || "";
const r = _7.filter(o=>t.indexOf(o) < 0 && n.indexOf(o) < 0);
if (r.length === 0)
return !0;
const i = A7.getRegExp(`(${r.map(o=>o === "?" ? "\\?" : o).join("|")})`);
let s = !i.test(e);
if (!s) {
const o = e.indexOf(n);
o > 0 && !i.test(e.substring(0, o)) && (s = !0)
}
return s
}
function fg(e, t) {
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
if (!e)
return;
if (e[t])
return e[t];
const r = t.split(n);
let i = e;
for (let s = 0; s < r.length; ) {
if (!i || typeof i != "object")
return;
let o, a = "";
for (let l = s; l < r.length; ++l)
if (l !== s && (a += n),
a += r[l],
o = i[a],
o !== void 0) {
if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < r.length - 1)
continue;
s += l - s + 1;
break
}
i = o
}
return i
}
function Bd(e) {
return e && e.indexOf("_") > 0 ? e.replace("_", "-") : e
}
class Lx extends Bf {
constructor(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
ns: ["translation"],
defaultNS: "translation"
};
super(),
this.data = t || {},
this.options = n,
this.options.keySeparator === void 0 && (this.options.keySeparator = "."),
this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0)
}
addNamespaces(t) {
this.options.ns.indexOf(t) < 0 && this.options.ns.push(t)
}
removeNamespaces(t) {
const n = this.options.ns.indexOf(t);
n > -1 && this.options.ns.splice(n, 1)
}
getResource(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator
, o = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
let a;
t.indexOf(".") > -1 ? a = t.split(".") : (a = [t, n],
r && (Array.isArray(r) ? a.push(...r) : typeof r == "string" && s ? a.push(...r.split(s)) : a.push(r)));
const l = Ud(this.data, a);
return !l && !n && !r && t.indexOf(".") > -1 && (t = a[0],
n = a[1],
r = a.slice(2).join(".")),
l || !o || typeof r != "string" ? l : fg(this.data && this.data[t] && this.data[t][n], r, s)
}
addResource(t, n, r, i) {
let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
silent: !1
};
const o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
let a = [t, n];
r && (a = a.concat(o ? r.split(o) : r)),
t.indexOf(".") > -1 && (a = t.split("."),
i = n,
n = a[1]),
this.addNamespaces(n),
Dx(this.data, a, i),
s.silent || this.emit("added", t, n, r, i)
}
addResources(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
silent: !1
};
for (const s in r)
(typeof r[s] == "string" || Array.isArray(r[s])) && this.addResource(t, n, s, r[s], {
silent: !0
});
i.silent || this.emit("added", t, n, r)
}
addResourceBundle(t, n, r, i, s) {
let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
silent: !1,
skipCopy: !1
}
, a = [t, n];
t.indexOf(".") > -1 && (a = t.split("."),
i = r,
r = n,
n = a[1]),
this.addNamespaces(n);
let l = Ud(this.data, a) || {};
o.skipCopy || (r = JSON.parse(JSON.stringify(r))),
i ? MT(l, r, s) : l = {
...l,
...r
},
Dx(this.data, a, l),
o.silent || this.emit("added", t, n, r)
}
removeResourceBundle(t, n) {
this.hasResourceBundle(t, n) && delete this.data[t][n],
this.removeNamespaces(n),
this.emit("removed", t, n)
}
hasResourceBundle(t, n) {
return this.getResource(t, n) !== void 0
}
getResourceBundle(t, n) {
return n || (n = this.options.defaultNS),
this.options.compatibilityAPI === "v1" ? {
...this.getResource(t, n)
} : this.getResource(t, n)
}
getDataByLanguage(t) {
return this.data[t]
}
hasLanguageSomeTranslations(t) {
const n = this.getDataByLanguage(t);
return !!(n && Object.keys(n) || []).find(i=>n[i] && Object.keys(n[i]).length > 0)
}
toJSON() {
return this.data
}
}
var jT = {
processors: {},
addPostProcessor(e) {
this.processors[e.name] = e
},
handle(e, t, n, r, i) {
return e.forEach(s=>{
this.processors[s] && (t = this.processors[s].process(t, n, r, i))
}
),
t
}
};
const Nx = {};
class Hd extends Bf {
constructor(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
super(),
E7(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this),
this.options = n,
this.options.keySeparator === void 0 && (this.options.keySeparator = "."),
this.logger = Rr.create("translator")
}
changeLanguage(t) {
t && (this.language = t)
}
exists(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
interpolation: {}
};
if (t == null)
return !1;
const r = this.resolve(t, n);
return r && r.res !== void 0
}
extractFromKey(t, n) {
let r = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator;
r === void 0 && (r = ":");
const i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
let s = n.ns || this.options.defaultNS || [];
const o = r && t.indexOf(r) > -1
, a = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !D7(t, r, i);
if (o && !a) {
const l = t.match(this.interpolator.nestingRegexp);
if (l && l.length > 0)
return {
key: t,
namespaces: s
};
const u = t.split(r);
(r !== i || r === i && this.options.ns.indexOf(u[0]) > -1) && (s = u.shift()),
t = u.join(i)
}
return typeof s == "string" && (s = [s]),
{
key: t,
namespaces: s
}
}
translate(t, n, r) {
if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)),
typeof n == "object" && (n = {
...n
}),
n || (n = {}),
t == null)
return "";
Array.isArray(t) || (t = [String(t)]);
const i = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails
, s = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator
, {key: o, namespaces: a} = this.extractFromKey(t[t.length - 1], n)
, l = a[a.length - 1]
, u = n.lng || this.language
, c = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
if (u && u.toLowerCase() === "cimode") {
if (c) {
const E = n.nsSeparator || this.options.nsSeparator;
return i ? {
res: `${l}${E}${o}`,
usedKey: o,
exactUsedKey: o,
usedLng: u,
usedNS: l,
usedParams: this.getUsedParamsDetails(n)
} : `${l}${E}${o}`
}
return i ? {
res: o,
usedKey: o,
exactUsedKey: o,
usedLng: u,
usedNS: l,
usedParams: this.getUsedParamsDetails(n)
} : o
}
const d = this.resolve(t, n);
let f = d && d.res;
const h = d && d.usedKey || o
, m = d && d.exactUsedKey || o
, p = Object.prototype.toString.apply(f)
, b = ["[object Number]", "[object Function]", "[object RegExp]"]
, v = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays
, g = !this.i18nFormat || this.i18nFormat.handleAsObject;
if (g && f && (typeof f != "string" && typeof f != "boolean" && typeof f != "number") && b.indexOf(p) < 0 && !(typeof v == "string" && Array.isArray(f))) {
if (!n.returnObjects && !this.options.returnObjects) {
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
const E = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, f, {
...n,
ns: a
}) : `key '${o} (${this.language})' returned an object instead of string.`;
return i ? (d.res = E,
d.usedParams = this.getUsedParamsDetails(n),
d) : E
}
if (s) {
const E = Array.isArray(f)
, D = E ? [] : {}
, V = E ? m : h;
for (const C in f)
if (Object.prototype.hasOwnProperty.call(f, C)) {
const P = `${V}${s}${C}`;
D[C] = this.translate(P, {
...n,
joinArrays: !1,
ns: a
}),
D[C] === P && (D[C] = f[C])
}
f = D
}
} else if (g && typeof v == "string" && Array.isArray(f))
f = f.join(v),
f && (f = this.extendTranslation(f, t, n, r));
else {
let E = !1
, D = !1;
const V = n.count !== void 0 && typeof n.count != "string"
, C = Hd.hasDefaultValue(n)
, P = V ? this.pluralResolver.getSuffix(u, n.count, n) : ""
, A = n.ordinal && V ? this.pluralResolver.getSuffix(u, n.count, {
ordinal: !1
}) : ""
, B = V && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi()
, Q = B && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${P}`] || n[`defaultValue${A}`] || n.defaultValue;
!this.isValidLookup(f) && C && (E = !0,
f = Q),
this.isValidLookup(f) || (D = !0,
f = o);
const F = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : f
, k = C && Q !== f && this.options.updateMissing;
if (D || E || k) {
if (this.logger.log(k ? "updateKey" : "missingKey", u, l, o, k ? Q : f),
s) {
const R = this.resolve(o, {
...n,
keySeparator: !1
});
R && R.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")
}
let T = [];
const _ = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language);
if (this.options.saveMissingTo === "fallback" && _ && _[0])
for (let R = 0; R < _.length; R++)
T.push(_[R]);
else
this.options.saveMissingTo === "all" ? T = this.languageUtils.toResolveHierarchy(n.lng || this.language) : T.push(n.lng || this.language);
const O = (R,z,Y)=>{
const te = C && Y !== f ? Y : F;
this.options.missingKeyHandler ? this.options.missingKeyHandler(R, l, z, te, k, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(R, l, z, te, k, n),
this.emit("missingKey", R, l, z, f)
}
;
this.options.saveMissing && (this.options.saveMissingPlurals && V ? T.forEach(R=>{
const z = this.pluralResolver.getSuffixes(R, n);
B && n[`defaultValue${this.options.pluralSeparator}zero`] && z.indexOf(`${this.options.pluralSeparator}zero`) < 0 && z.push(`${this.options.pluralSeparator}zero`),
z.forEach(Y=>{
O([R], o + Y, n[`defaultValue${Y}`] || Q)
}
)
}
) : O(T, o, Q))
}
f = this.extendTranslation(f, t, n, d, r),
D && f === o && this.options.appendNamespaceToMissingKey && (f = `${l}:${o}`),
(D || E) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? f = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${o}` : o, E ? f : void 0) : f = this.options.parseMissingKeyHandler(f))
}
return i ? (d.res = f,
d.usedParams = this.getUsedParamsDetails(n),
d) : f
}
extendTranslation(t, n, r, i, s) {
var o = this;
if (this.i18nFormat && this.i18nFormat.parse)
t = this.i18nFormat.parse(t, {
...this.options.interpolation.defaultVariables,
...r
}, r.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
resolved: i
});
else if (!r.skipInterpolation) {
r.interpolation && this.interpolator.init({
...r,
interpolation: {
...this.options.interpolation,
...r.interpolation
}
});
const u = typeof t == "string" && (r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
let c;
if (u) {
const f = t.match(this.interpolator.nestingRegexp);
c = f && f.length
}
let d = r.replace && typeof r.replace != "string" ? r.replace : r;
if (this.options.interpolation.defaultVariables && (d = {
...this.options.interpolation.defaultVariables,
...d
}),
t = this.interpolator.interpolate(t, d, r.lng || this.language, r),
u) {
const f = t.match(this.interpolator.nestingRegexp)
, h = f && f.length;
c < h && (r.nest = !1)
}
!r.lng && this.options.compatibilityAPI !== "v1" && i && i.res && (r.lng = i.usedLng),
r.nest !== !1 && (t = this.interpolator.nest(t, function() {
for (var f = arguments.length, h = new Array(f), m = 0; m < f; m++)
h[m] = arguments[m];
return s && s[0] === h[0] && !r.context ? (o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),
null) : o.translate(...h, n)
}, r)),
r.interpolation && this.interpolator.reset()
}
const a = r.postProcess || this.options.postProcess
, l = typeof a == "string" ? [a] : a;
return t != null && l && l.length && r.applyPostProcessor !== !1 && (t = jT.handle(l, t, n, this.options && this.options.postProcessPassResolved ? {
i18nResolved: {
...i,
usedParams: this.getUsedParamsDetails(r)
},
...r
} : r, this)),
t
}
resolve(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, s, o, a;
return typeof t == "string" && (t = [t]),
t.forEach(l=>{
if (this.isValidLookup(r))
return;
const u = this.extractFromKey(l, n)
, c = u.key;
i = c;
let d = u.namespaces;
this.options.fallbackNS && (d = d.concat(this.options.fallbackNS));
const f = n.count !== void 0 && typeof n.count != "string"
, h = f && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi()
, m = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== ""
, p = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
d.forEach(b=>{
this.isValidLookup(r) || (a = b,
!Nx[`${p[0]}-${b}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(a) && (Nx[`${p[0]}-${b}`] = !0,
this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),
p.forEach(v=>{
if (this.isValidLookup(r))
return;
o = v;
const g = [c];
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
this.i18nFormat.addLookupKeys(g, c, v, b, n);
else {
let E;
f && (E = this.pluralResolver.getSuffix(v, n.count, n));
const D = `${this.options.pluralSeparator}zero`
, V = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
if (f && (g.push(c + E),
n.ordinal && E.indexOf(V) === 0 && g.push(c + E.replace(V, this.options.pluralSeparator)),
h && g.push(c + D)),
m) {
const C = `${c}${this.options.contextSeparator}${n.context}`;
g.push(C),
f && (g.push(C + E),
n.ordinal && E.indexOf(V) === 0 && g.push(C + E.replace(V, this.options.pluralSeparator)),
h && g.push(C + D))
}
}
let w;
for (; w = g.pop(); )
this.isValidLookup(r) || (s = w,
r = this.getResource(v, b, w, n))
}
))
}
)
}
),
{
res: r,
usedKey: i,
exactUsedKey: s,
usedLng: o,
usedNS: a
}
}
isValidLookup(t) {
return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === "")
}
getResource(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, r, i) : this.resourceStore.getResource(t, n, r, i)
}
getUsedParamsDetails() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
const n = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"]
, r = t.replace && typeof t.replace != "string";
let i = r ? t.replace : t;
if (r && typeof t.count < "u" && (i.count = t.count),
this.options.interpolation.defaultVariables && (i = {
...this.options.interpolation.defaultVariables,
...i
}),
!r) {
i = {
...i
};
for (const s of n)
delete i[s]
}
return i
}
static hasDefaultValue(t) {
const n = "defaultValue";
for (const r in t)
if (Object.prototype.hasOwnProperty.call(t, r) && n === r.substring(0, n.length) && t[r] !== void 0)
return !0;
return !1
}
}
function sp(e) {
return e.charAt(0).toUpperCase() + e.slice(1)
}
class Mx {
constructor(t) {
this.options = t,
this.supportedLngs = this.options.supportedLngs || !1,
this.logger = Rr.create("languageUtils")
}
getScriptPartFromCode(t) {
if (t = Bd(t),
!t || t.indexOf("-") < 0)
return null;
const n = t.split("-");
return n.length === 2 || (n.pop(),
n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-"))
}
getLanguagePartFromCode(t) {
if (t = Bd(t),
!t || t.indexOf("-") < 0)
return t;
const n = t.split("-");
return this.formatLanguageCode(n[0])
}
formatLanguageCode(t) {
if (typeof t == "string" && t.indexOf("-") > -1) {
const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
let r = t.split("-");
return this.options.lowerCaseLng ? r = r.map(i=>i.toLowerCase()) : r.length === 2 ? (r[0] = r[0].toLowerCase(),
r[1] = r[1].toUpperCase(),
n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = sp(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(),
r[1].length === 2 && (r[1] = r[1].toUpperCase()),
r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()),
n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = sp(r[1].toLowerCase())),
n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = sp(r[2].toLowerCase()))),
r.join("-")
}
return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t
}
isSupportedCode(t) {
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)),
!this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1
}
getBestMatchFromCodes(t) {
if (!t)
return null;
let n;
return t.forEach(r=>{
if (n)
return;
const i = this.formatLanguageCode(r);
(!this.options.supportedLngs || this.isSupportedCode(i)) && (n = i)
}
),
!n && this.options.supportedLngs && t.forEach(r=>{
if (n)
return;
const i = this.getLanguagePartFromCode(r);
if (this.isSupportedCode(i))
return n = i;
n = this.options.supportedLngs.find(s=>{
if (s === i)
return s;
if (!(s.indexOf("-") < 0 && i.indexOf("-") < 0) && (s.indexOf("-") > 0 && i.indexOf("-") < 0 && s.substring(0, s.indexOf("-")) === i || s.indexOf(i) === 0 && i.length > 1))
return s
}
)
}
),
n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]),
n
}
getFallbackCodes(t, n) {
if (!t)
return [];
if (typeof t == "function" && (t = t(n)),
typeof t == "string" && (t = [t]),
Array.isArray(t))
return t;
if (!n)
return t.default || [];
let r = t[n];
return r || (r = t[this.getScriptPartFromCode(n)]),
r || (r = t[this.formatLanguageCode(n)]),
r || (r = t[this.getLanguagePartFromCode(n)]),
r || (r = t.default),
r || []
}
toResolveHierarchy(t, n) {
const r = this.getFallbackCodes(n || this.options.fallbackLng || [], t)
, i = []
, s = o=>{
o && (this.isSupportedCode(o) ? i.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))
}
;
return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(t)),
this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(t)),
this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(t))) : typeof t == "string" && s(this.formatLanguageCode(t)),
r.forEach(o=>{
i.indexOf(o) < 0 && s(this.formatLanguageCode(o))
}
),
i
}
}
let L7 = [{
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
nr: [1, 2],
fc: 1
}, {
lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
nr: [1, 2],
fc: 2
}, {
lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
nr: [1],
fc: 3
}, {
lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
nr: [1, 2, 5],
fc: 4
}, {
lngs: ["ar"],
nr: [0, 1, 2, 3, 11, 100],
fc: 5
}, {
lngs: ["cs", "sk"],
nr: [1, 2, 5],
fc: 6
}, {
lngs: ["csb", "pl"],
nr: [1, 2, 5],
fc: 7
}, {
lngs: ["cy"],
nr: [1, 2, 3, 8],
fc: 8
}, {
lngs: ["fr"],
nr: [1, 2],
fc: 9
}, {
lngs: ["ga"],
nr: [1, 2, 3, 7, 11],
fc: 10
}, {
lngs: ["gd"],
nr: [1, 2, 3, 20],
fc: 11
}, {
lngs: ["is"],
nr: [1, 2],
fc: 12
}, {
lngs: ["jv"],
nr: [0, 1],
fc: 13
}, {
lngs: ["kw"],
nr: [1, 2, 3, 4],
fc: 14
}, {
lngs: ["lt"],
nr: [1, 2, 10],
fc: 15
}, {
lngs: ["lv"],
nr: [1, 2, 0],
fc: 16
}, {
lngs: ["mk"],
nr: [1, 2],
fc: 17
}, {
lngs: ["mnk"],
nr: [0, 1, 2],
fc: 18
}, {
lngs: ["mt"],
nr: [1, 2, 11, 20],
fc: 19
}, {
lngs: ["or"],
nr: [2, 1],
fc: 2
}, {
lngs: ["ro"],
nr: [1, 2, 20],
fc: 20
}, {
lngs: ["sl"],
nr: [5, 1, 2, 3],
fc: 21
}, {
lngs: ["he", "iw"],
nr: [1, 2, 20, 21],
fc: 22
}]
, N7 = {
1: function(e) {
return +(e > 1)
},
2: function(e) {
return +(e != 1)
},
3: function(e) {
return 0
},
4: function(e) {
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2
},
5: function(e) {
return e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5
},
6: function(e) {
return e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2
},
7: function(e) {
return e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2
},
8: function(e) {
return e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3
},
9: function(e) {
return +(e >= 2)
},
10: function(e) {
return e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4
},
11: function(e) {
return e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3
},
12: function(e) {
return +(e % 10 != 1 || e % 100 == 11)
},
13: function(e) {
return +(e !== 0)
},
14: function(e) {
return e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3
},
15: function(e) {
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2
},
16: function(e) {
return e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2
},
17: function(e) {
return e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1
},
18: function(e) {
return e == 0 ? 0 : e == 1 ? 1 : 2
},
19: function(e) {
return e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3
},
20: function(e) {
return e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2
},
21: function(e) {
return e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0
},
22: function(e) {
return e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3
}
};
const M7 = ["v1", "v2", "v3"]
, j7 = ["v4"]
, jx = {
zero: 0,
one: 1,
two: 2,
few: 3,
many: 4,
other: 5
};
function $7() {
const e = {};
return L7.forEach(t=>{
t.lngs.forEach(n=>{
e[n] = {
numbers: t.nr,
plurals: N7[t.fc]
}
}
)
}
),
e
}
class I7 {
constructor(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
this.languageUtils = t,
this.options = n,
this.logger = Rr.create("pluralResolver"),
(!this.options.compatibilityJSON || j7.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3",
this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),
this.rules = $7()
}
addRule(t, n) {
this.rules[t] = n
}
getRule(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (this.shouldUseIntlApi())
try {
return new Intl.PluralRules(Bd(t === "dev" ? "en" : t),{
type: n.ordinal ? "ordinal" : "cardinal"
})
} catch {
return
}
return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)]
}
needsPlural(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
const r = this.getRule(t, n);
return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1
}
getPluralFormsOfKey(t, n) {
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
return this.getSuffixes(t, r).map(i=>`${n}${i}`)
}
getSuffixes(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
const r = this.getRule(t, n);
return r ? this.shouldUseIntlApi() ? r.resolvedOptions().pluralCategories.sort((i,s)=>jx[i] - jx[s]).map(i=>`${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : r.numbers.map(i=>this.getSuffix(t, i, n)) : []
}
getSuffix(t, n) {
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
const i = this.getRule(t, r);
return i ? this.shouldUseIntlApi() ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(n)}` : this.getSuffixRetroCompatible(i, n) : (this.logger.warn(`no plural rule found for: ${t}`),
"")
}
getSuffixRetroCompatible(t, n) {
const r = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n));
let i = t.numbers[r];
this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (i === 2 ? i = "plural" : i === 1 && (i = ""));
const s = ()=>this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
return this.options.compatibilityJSON === "v1" ? i === 1 ? "" : typeof i == "number" ? `_plural_${i.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? s() : this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString()
}
shouldUseIntlApi() {
return !M7.includes(this.options.compatibilityJSON)
}
}
function $x(e, t, n) {
let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "."
, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0
, s = T7(e, t, n);
return !s && i && typeof n == "string" && (s = fg(e, n, r),
s === void 0 && (s = fg(t, n, r))),
s
}
class F7 {
constructor() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
this.logger = Rr.create("interpolator"),
this.options = t,
this.format = t.interpolation && t.interpolation.format || (n=>n),
this.init(t)
}
init() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
t.interpolation || (t.interpolation = {
escapeValue: !0
});
const {escape: n, escapeValue: r, useRawValueToEscape: i, prefix: s, prefixEscaped: o, suffix: a, suffixEscaped: l, formatSeparator: u, unescapeSuffix: c, unescapePrefix: d, nestingPrefix: f, nestingPrefixEscaped: h, nestingSuffix: m, nestingSuffixEscaped: p, nestingOptionsSeparator: b, maxReplaces: v, alwaysFormat: g} = t.interpolation;
this.escape = n !== void 0 ? n : O7,
this.escapeValue = r !== void 0 ? r : !0,
this.useRawValueToEscape = i !== void 0 ? i : !1,
this.prefix = s ? no(s) : o || "{{",
this.suffix = a ? no(a) : l || "}}",
this.formatSeparator = u || ",",
this.unescapePrefix = c ? "" : d || "-",
this.unescapeSuffix = this.unescapePrefix ? "" : c || "",
this.nestingPrefix = f ? no(f) : h || no("$t("),
this.nestingSuffix = m ? no(m) : p || no(")"),
this.nestingOptionsSeparator = b || ",",
this.maxReplaces = v || 1e3,
this.alwaysFormat = g !== void 0 ? g : !1,
this.resetRegExp()
}
reset() {
this.options && this.init(this.options)
}
resetRegExp() {
const t = (n,r)=>n && n.source === r ? (n.lastIndex = 0,
n) : new RegExp(r,"g");
this.regexp = t(this.regexp, `${this.prefix}(.+?)${this.suffix}`),
this.regexpUnescape = t(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),
this.nestingRegexp = t(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`)
}
interpolate(t, n, r, i) {
let s, o, a;
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
function u(m) {
return m.replace(/\$/g, "$$$$")
}
const c = m=>{
if (m.indexOf(this.formatSeparator) < 0) {
const g = $x(n, l, m, this.options.keySeparator, this.options.ignoreJSONStructure);
return this.alwaysFormat ? this.format(g, void 0, r, {
...i,
...n,
interpolationkey: m
}) : g
}
const p = m.split(this.formatSeparator)
, b = p.shift().trim()
, v = p.join(this.formatSeparator).trim();
return this.format($x(n, l, b, this.options.keySeparator, this.options.ignoreJSONStructure), v, r, {
...i,
...n,
interpolationkey: b
})
}
;
this.resetRegExp();
const d = i && i.missingInterpolationHandler || this.options.missingInterpolationHandler
, f = i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
return [{
regex: this.regexpUnescape,
safeValue: m=>u(m)
}, {
regex: this.regexp,
safeValue: m=>this.escapeValue ? u(this.escape(m)) : u(m)
}].forEach(m=>{
for (a = 0; s = m.regex.exec(t); ) {
const p = s[1].trim();
if (o = c(p),
o === void 0)
if (typeof d == "function") {
const v = d(t, s, i);
o = typeof v == "string" ? v : ""
} else if (i && Object.prototype.hasOwnProperty.call(i, p))
o = "";
else if (f) {
o = s[0];
continue
} else
this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),
o = "";
else
typeof o != "string" && !this.useRawValueToEscape && (o = Ax(o));
const b = m.safeValue(o);
if (t = t.replace(s[0], b),
f ? (m.regex.lastIndex += o.length,
m.regex.lastIndex -= s[0].length) : m.regex.lastIndex = 0,
a++,
a >= this.maxReplaces)
break
}
}
),
t
}
nest(t, n) {
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, s, o;
function a(l, u) {
const c = this.nestingOptionsSeparator;
if (l.indexOf(c) < 0)
return l;
const d = l.split(new RegExp(`${c}[ ]*{`));
let f = `{${d[1]}`;
l = d[0],
f = this.interpolate(f, o);
const h = f.match(/'/g)
, m = f.match(/"/g);
(h && h.length % 2 === 0 && !m || m.length % 2 !== 0) && (f = f.replace(/'/g, '"'));
try {
o = JSON.parse(f),
u && (o = {
...u,
...o
})
} catch (p) {
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, p),
`${l}${c}${f}`
}
return o.defaultValue && o.defaultValue.indexOf(this.prefix) > -1 && delete o.defaultValue,
l
}
for (; i = this.nestingRegexp.exec(t); ) {
let l = [];
o = {
...r
},
o = o.replace && typeof o.replace != "string" ? o.replace : o,
o.applyPostProcessor = !1,
delete o.defaultValue;
let u = !1;
if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
const c = i[1].split(this.formatSeparator).map(d=>d.trim());
i[1] = c.shift(),
l = c,
u = !0
}
if (s = n(a.call(this, i[1].trim(), o), o),
s && i[0] === t && typeof s != "string")
return s;
typeof s != "string" && (s = Ax(s)),
s || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),
s = ""),
u && (s = l.reduce((c,d)=>this.format(c, d, r.lng, {
...r,
interpolationkey: i[1].trim()
}), s.trim())),
t = t.replace(i[0], s),
this.regexp.lastIndex = 0
}
return t
}
}
function V7(e) {
let t = e.toLowerCase().trim();
const n = {};
if (e.indexOf("(") > -1) {
const r = e.split("(");
t = r[0].toLowerCase().trim();
const i = r[1].substring(0, r[1].length - 1);
t === "currency" && i.indexOf(":") < 0 ? n.currency || (n.currency = i.trim()) : t === "relativetime" && i.indexOf(":") < 0 ? n.range || (n.range = i.trim()) : i.split(";").forEach(o=>{
if (o) {
const [a,...l] = o.split(":")
, u = l.join(":").trim().replace(/^'+|'+$/g, "")
, c = a.trim();
n[c] || (n[c] = u),
u === "false" && (n[c] = !1),
u === "true" && (n[c] = !0),
isNaN(u) || (n[c] = parseInt(u, 10))
}
}
)
}
return {
formatName: t,
formatOptions: n
}
}
function ro(e) {
const t = {};
return function(r, i, s) {
const o = i + JSON.stringify(s);
let a = t[o];
return a || (a = e(Bd(i), s),
t[o] = a),
a(r)
}
}
class z7 {
constructor() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
this.logger = Rr.create("formatter"),
this.options = t,
this.formats = {
number: ro((n,r)=>{
const i = new Intl.NumberFormat(n,{
...r
});
return s=>i.format(s)
}
),
currency: ro((n,r)=>{
const i = new Intl.NumberFormat(n,{
...r,
style: "currency"
});
return s=>i.format(s)
}
),
datetime: ro((n,r)=>{
const i = new Intl.DateTimeFormat(n,{
...r
});
return s=>i.format(s)
}
),
relativetime: ro((n,r)=>{
const i = new Intl.RelativeTimeFormat(n,{
...r
});
return s=>i.format(s, r.range || "day")
}
),
list: ro((n,r)=>{
const i = new Intl.ListFormat(n,{
...r
});
return s=>i.format(s)
}
)
},
this.init(t)
}
init(t) {
const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
interpolation: {}
}).interpolation;
this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ","
}
add(t, n) {
this.formats[t.toLowerCase().trim()] = n
}
addCached(t, n) {
this.formats[t.toLowerCase().trim()] = ro(n)
}
format(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
return n.split(this.formatSeparator).reduce((a,l)=>{
const {formatName: u, formatOptions: c} = V7(l);
if (this.formats[u]) {
let d = a;
try {
const f = i && i.formatParams && i.formatParams[i.interpolationkey] || {}
, h = f.locale || f.lng || i.locale || i.lng || r;
d = this.formats[u](a, h, {
...c,
...i,
...f
})
} catch (f) {
this.logger.warn(f)
}
return d
} else
this.logger.warn(`there was no format function for ${u}`);
return a
}
, t)
}
}
function U7(e, t) {
e.pending[t] !== void 0 && (delete e.pending[t],
e.pendingCount--)
}
class B7 extends Bf {
constructor(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
super(),
this.backend = t,
this.store = n,
this.services = r,
this.languageUtils = r.languageUtils,
this.options = i,
this.logger = Rr.create("backendConnector"),
this.waitingReads = [],
this.maxParallelReads = i.maxParallelReads || 10,
this.readingCalls = 0,
this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5,
this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350,
this.state = {},
this.queue = [],
this.backend && this.backend.init && this.backend.init(r, i.backend, i)
}
queueLoad(t, n, r, i) {
const s = {}
, o = {}
, a = {}
, l = {};
return t.forEach(u=>{
let c = !0;
n.forEach(d=>{
const f = `${u}|${d}`;
!r.reload && this.store.hasResourceBundle(u, d) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ? o[f] === void 0 && (o[f] = !0) : (this.state[f] = 1,
c = !1,
o[f] === void 0 && (o[f] = !0),
s[f] === void 0 && (s[f] = !0),
l[d] === void 0 && (l[d] = !0)))
}
),
c || (a[u] = !0)
}
),
(Object.keys(s).length || Object.keys(o).length) && this.queue.push({
pending: o,
pendingCount: Object.keys(o).length,
loaded: {},
errors: [],
callback: i
}),
{
toLoad: Object.keys(s),
pending: Object.keys(o),
toLoadLanguages: Object.keys(a),
toLoadNamespaces: Object.keys(l)
}
}
loaded(t, n, r) {
const i = t.split("|")
, s = i[0]
, o = i[1];
n && this.emit("failedLoading", s, o, n),
r && this.store.addResourceBundle(s, o, r, void 0, void 0, {
skipCopy: !0
}),
this.state[t] = n ? -1 : 2;
const a = {};
this.queue.forEach(l=>{
P7(l.loaded, [s], o),
U7(l, t),
n && l.errors.push(n),
l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach(u=>{
a[u] || (a[u] = {});
const c = l.loaded[u];
c.length && c.forEach(d=>{
a[u][d] === void 0 && (a[u][d] = !0)
}
)
}
),
l.done = !0,
l.errors.length ? l.callback(l.errors) : l.callback())
}
),
this.emit("loaded", a),
this.queue = this.queue.filter(l=>!l.done)
}
read(t, n, r) {
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0
, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout
, o = arguments.length > 5 ? arguments[5] : void 0;
if (!t.length)
return o(null, {});
if (this.readingCalls >= this.maxParallelReads) {
this.waitingReads.push({
lng: t,
ns: n,
fcName: r,
tried: i,
wait: s,
callback: o
});
return
}
this.readingCalls++;
const a = (u,c)=>{
if (this.readingCalls--,
this.waitingReads.length > 0) {
const d = this.waitingReads.shift();
this.read(d.lng, d.ns, d.fcName, d.tried, d.wait, d.callback)
}
if (u && c && i < this.maxRetries) {
setTimeout(()=>{
this.read.call(this, t, n, r, i + 1, s * 2, o)
}
, s);
return
}
o(u, c)
}
, l = this.backend[r].bind(this.backend);
if (l.length === 2) {
try {
const u = l(t, n);
u && typeof u.then == "function" ? u.then(c=>a(null, c)).catch(a) : a(null, u)
} catch (u) {
a(u)
}
return
}
return l(t, n, a)
}
prepareLoading(t, n) {
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}
, i = arguments.length > 3 ? arguments[3] : void 0;
if (!this.backend)
return this.logger.warn("No backend was added via i18next.use. Will not load resources."),
i && i();
typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)),
typeof n == "string" && (n = [n]);
const s = this.queueLoad(t, n, r, i);
if (!s.toLoad.length)
return s.pending.length || i(),
null;
s.toLoad.forEach(o=>{
this.loadOne(o)
}
)
}
load(t, n, r) {
this.prepareLoading(t, n, {}, r)
}
reload(t, n, r) {
this.prepareLoading(t, n, {
reload: !0
}, r)
}
loadOne(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
const r = t.split("|")
, i = r[0]
, s = r[1];
this.read(i, s, "read", void 0, void 0, (o,a)=>{
o && this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`, o),
!o && a && this.logger.log(`${n}loaded namespace ${s} for language ${i}`, a),
this.loaded(t, o, a)
}
)
}
saveMissing(t, n, r, i, s) {
let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}
, a = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : ()=>{}
;
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) {
this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
return
}
if (!(r == null || r === "")) {
if (this.backend && this.backend.create) {
const l = {
...o,
isUpdate: s
}
, u = this.backend.create.bind(this.backend);
if (u.length < 6)
try {
let c;
u.length === 5 ? c = u(t, n, r, i, l) : c = u(t, n, r, i),
c && typeof c.then == "function" ? c.then(d=>a(null, d)).catch(a) : a(null, c)
} catch (c) {
a(c)
}
else
u(t, n, r, i, a, l)
}
!t || !t[0] || this.store.addResource(t[0], n, r, i)
}
}
}
function Ix() {
return {
debug: !1,
initImmediate: !0,
ns: ["translation"],
defaultNS: ["translation"],
fallbackLng: ["dev"],
fallbackNS: !1,
supportedLngs: !1,
nonExplicitSupportedLngs: !1,
load: "all",
preload: !1,
simplifyPluralSuffix: !0,
keySeparator: ".",
nsSeparator: ":",
pluralSeparator: "_",
contextSeparator: "_",
partialBundledLanguages: !1,
saveMissing: !1,
updateMissing: !1,
saveMissingTo: "fallback",
saveMissingPlurals: !0,
missingKeyHandler: !1,
missingInterpolationHandler: !1,
postProcess: !1,
postProcessPassResolved: !1,
returnNull: !1,
returnEmptyString: !0,
returnObjects: !1,
joinArrays: !1,
returnedObjectHandler: !1,
parseMissingKeyHandler: !1,
appendNamespaceToMissingKey: !1,
appendNamespaceToCIMode: !1,
overloadTranslationOptionHandler: function(t) {
let n = {};
if (typeof t[1] == "object" && (n = t[1]),
typeof t[1] == "string" && (n.defaultValue = t[1]),
typeof t[2] == "string" && (n.tDescription = t[2]),
typeof t[2] == "object" || typeof t[3] == "object") {
const r = t[3] || t[2];
Object.keys(r).forEach(i=>{
n[i] = r[i]
}
)
}
return n
},
interpolation: {
escapeValue: !0,
format: e=>e,
prefix: "{{",
suffix: "}}",
formatSeparator: ",",
unescapePrefix: "-",
nestingPrefix: "$t(",
nestingSuffix: ")",
nestingOptionsSeparator: ",",
maxReplaces: 1e3,
skipOnVariables: !0
}
}
}
function Fx(e) {
return typeof e.ns == "string" && (e.ns = [e.ns]),
typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]),
typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]),
e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])),
e
}
function yc() {}
function H7(e) {
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{
typeof e[n] == "function" && (e[n] = e[n].bind(e))
}
)
}
class Jl extends Bf {
constructor() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}
, n = arguments.length > 1 ? arguments[1] : void 0;
if (super(),
this.options = Fx(t),
this.services = {},
this.logger = Rr,
this.modules = {
external: []
},
H7(this),
n && !this.isInitialized && !t.isClone) {
if (!this.options.initImmediate)
return this.init(t, n),
this;
setTimeout(()=>{
this.init(t, n)
}
, 0)
}
}
init() {
var t = this;
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}
, r = arguments.length > 1 ? arguments[1] : void 0;
this.isInitializing = !0,
typeof n == "function" && (r = n,
n = {}),
!n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0]));
const i = Ix();
this.options = {
...i,
...this.options,
...Fx(n)
},
this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
...i.interpolation,
...this.options.interpolation
}),
n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator),
n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator);
function s(c) {
return c ? typeof c == "function" ? new c : c : null
}
if (!this.options.isClone) {
this.modules.logger ? Rr.init(s(this.modules.logger), this.options) : Rr.init(null, this.options);
let c;
this.modules.formatter ? c = this.modules.formatter : typeof Intl < "u" && (c = z7);
const d = new Mx(this.options);
this.store = new Lx(this.options.resources,this.options);
const f = this.services;
f.logger = Rr,
f.resourceStore = this.store,
f.languageUtils = d,
f.pluralResolver = new I7(d,{
prepend: this.options.pluralSeparator,
compatibilityJSON: this.options.compatibilityJSON,
simplifyPluralSuffix: this.options.simplifyPluralSuffix
}),
c && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (f.formatter = s(c),
f.formatter.init(f, this.options),
this.options.interpolation.format = f.formatter.format.bind(f.formatter)),
f.interpolator = new F7(this.options),
f.utils = {
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
},
f.backendConnector = new B7(s(this.modules.backend),f.resourceStore,f,this.options),
f.backendConnector.on("*", function(h) {
for (var m = arguments.length, p = new Array(m > 1 ? m - 1 : 0), b = 1; b < m; b++)
p[b - 1] = arguments[b];
t.emit(h, ...p)
}),
this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector),
f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)),
this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat),
f.i18nFormat.init && f.i18nFormat.init(this)),
this.translator = new Hd(this.services,this.options),
this.translator.on("*", function(h) {
for (var m = arguments.length, p = new Array(m > 1 ? m - 1 : 0), b = 1; b < m; b++)
p[b - 1] = arguments[b];
t.emit(h, ...p)
}),
this.modules.external.forEach(h=>{
h.init && h.init(this)
}
)
}
if (this.format = this.options.interpolation.format,
r || (r = yc),
this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
const c = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0])
}
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"),
["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach(c=>{
this[c] = function() {
return t.store[c](...arguments)
}
}
),
["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach(c=>{
this[c] = function() {
return t.store[c](...arguments),
t
}
}
);
const l = Ba()
, u = ()=>{
const c = (d,f)=>{
this.isInitializing = !1,
this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"),
this.isInitialized = !0,
this.options.isClone || this.logger.log("initialized", this.options),
this.emit("initialized", this.options),
l.resolve(f),
r(d, f)
}
;
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
return c(null, this.t.bind(this));
this.changeLanguage(this.options.lng, c)
}
;
return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0),
l
}
loadResources(t) {
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yc;
const i = typeof t == "string" ? t : this.language;
if (typeof t == "function" && (r = t),
!this.options.resources || this.options.partialBundledLanguages) {
if (i && i.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0))
return r();
const s = []
, o = a=>{
if (!a || a === "cimode")
return;
this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{
u !== "cimode" && s.indexOf(u) < 0 && s.push(u)
}
)
}
;
i ? o(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),
this.options.preload && this.options.preload.forEach(a=>o(a)),
this.services.backendConnector.load(s, this.options.ns, a=>{
!a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language),
r(a)
}
)
} else
r(null)
}
reloadResources(t, n, r) {
const i = Ba();
return t || (t = this.languages),
n || (n = this.options.ns),
r || (r = yc),
this.services.backendConnector.reload(t, n, s=>{
i.resolve(),
r(s)
}
),
i
}
use(t) {
if (!t)
throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
if (!t.type)
throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
return t.type === "backend" && (this.modules.backend = t),
(t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t),
t.type === "languageDetector" && (this.modules.languageDetector = t),
t.type === "i18nFormat" && (this.modules.i18nFormat = t),
t.type === "postProcessor" && jT.addPostProcessor(t),
t.type === "formatter" && (this.modules.formatter = t),
t.type === "3rdParty" && this.modules.external.push(t),
this
}
setResolvedLanguage(t) {
if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1))
for (let n = 0; n < this.languages.length; n++) {
const r = this.languages[n];
if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) {
this.resolvedLanguage = r;
break
}
}
}
changeLanguage(t, n) {
var r = this;
this.isLanguageChangingTo = t;
const i = Ba();
this.emit("languageChanging", t);
const s = l=>{
this.language = l,
this.languages = this.services.languageUtils.toResolveHierarchy(l),
this.resolvedLanguage = void 0,
this.setResolvedLanguage(l)
}
, o = (l,u)=>{
u ? (s(u),
this.translator.changeLanguage(u),
this.isLanguageChangingTo = void 0,
this.emit("languageChanged", u),
this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0,
i.resolve(function() {
return r.t(...arguments)
}),
n && n(l, function() {
return r.t(...arguments)
})
}
, a = l=>{
!t && !l && this.services.languageDetector && (l = []);
const u = typeof l == "string" ? l : this.services.languageUtils.getBestMatchFromCodes(l);
u && (this.language || s(u),
this.translator.language || this.translator.changeLanguage(u),
this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(u)),
this.loadResources(u, c=>{
o(c, u)
}
)
}
;
return !t && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(t),
i
}
getFixedT(t, n, r) {
var i = this;
const s = function(o, a) {
let l;
if (typeof a != "object") {
for (var u = arguments.length, c = new Array(u > 2 ? u - 2 : 0), d = 2; d < u; d++)
c[d - 2] = arguments[d];
l = i.options.overloadTranslationOptionHandler([o, a].concat(c))
} else
l = {
...a
};
l.lng = l.lng || s.lng,
l.lngs = l.lngs || s.lngs,
l.ns = l.ns || s.ns,
l.keyPrefix = l.keyPrefix || r || s.keyPrefix;
const f = i.options.keySeparator || ".";
let h;
return l.keyPrefix && Array.isArray(o) ? h = o.map(m=>`${l.keyPrefix}${f}${m}`) : h = l.keyPrefix ? `${l.keyPrefix}${f}${o}` : o,
i.t(h, l)
};
return typeof t == "string" ? s.lng = t : s.lngs = t,
s.ns = n,
s.keyPrefix = r,
s
}
t() {
return this.translator && this.translator.translate(...arguments)
}
exists() {
return this.translator && this.translator.exists(...arguments)
}
setDefaultNamespace(t) {
this.options.defaultNS = t
}
hasLoadedNamespace(t) {
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (!this.isInitialized)
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages),
!1;
if (!this.languages || !this.languages.length)
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages),
!1;
const r = n.lng || this.resolvedLanguage || this.languages[0]
, i = this.options ? this.options.fallbackLng : !1
, s = this.languages[this.languages.length - 1];
if (r.toLowerCase() === "cimode")
return !0;
const o = (a,l)=>{
const u = this.services.backendConnector.state[`${a}|${l}`];
return u === -1 || u === 2
}
;
if (n.precheck) {
const a = n.precheck(this, o);
if (a !== void 0)
return a
}
return !!(this.hasResourceBundle(r, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, t) && (!i || o(s, t)))
}
loadNamespaces(t, n) {
const r = Ba();
return this.options.ns ? (typeof t == "string" && (t = [t]),
t.forEach(i=>{
this.options.ns.indexOf(i) < 0 && this.options.ns.push(i)
}
),
this.loadResources(i=>{
r.resolve(),
n && n(i)
}
),
r) : (n && n(),
Promise.resolve())
}
loadLanguages(t, n) {
const r = Ba();
typeof t == "string" && (t = [t]);
const i = this.options.preload || []
, s = t.filter(o=>i.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o));
return s.length ? (this.options.preload = i.concat(s),
this.loadResources(o=>{
r.resolve(),
n && n(o)
}
),
r) : (n && n(),
Promise.resolve())
}
dir(t) {
if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)),
!t)
return "rtl";
const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"]
, r = this.services && this.services.languageUtils || new Mx(Ix());
return n.indexOf(r.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr"
}
static createInstance() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}
, n = arguments.length > 1 ? arguments[1] : void 0;
return new Jl(t,n)
}
cloneInstance() {
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}
, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : yc;
const r = t.forkResourceStore;
r && delete t.forkResourceStore;
const i = {
...this.options,
...t,
isClone: !0
}
, s = new Jl(i);
return (t.debug !== void 0 || t.prefix !== void 0) && (s.logger = s.logger.clone(t)),
["store", "services", "language"].forEach(a=>{
s[a] = this[a]
}
),
s.services = {
...this.services
},
s.services.utils = {
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
},
r && (s.store = new Lx(this.store.data,i),
s.services.resourceStore = s.store),
s.translator = new Hd(s.services,i),
s.translator.on("*", function(a) {
for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
u[c - 1] = arguments[c];
s.emit(a, ...u)
}),
s.init(i, n),
s.translator.options = i,
s.translator.backendConnector.services.utils = {
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
},
s
}
toJSON() {
return {
options: this.options,
store: this.store,
language: this.language,
languages: this.languages,
resolvedLanguage: this.resolvedLanguage
}
}
}
const Ut = Jl.createInstance();
Ut.createInstance = Jl.createInstance;
Ut.createInstance;
Ut.dir;
Ut.init;
Ut.loadResources;
Ut.reloadResources;
Ut.use;
Ut.changeLanguage;
Ut.getFixedT;
Ut.t;
Ut.exists;
Ut.setDefaultNamespace;
Ut.hasLoadedNamespace;
Ut.loadNamespaces;
Ut.loadLanguages;
Ut.init({
resources: {
en: x7,
ru: b7
},
fallbackLng: "en",
debug: !0
});
const W7 = ()=>{
XD(),
QM(),
SN(),
xN();
const {api: e} = Sd()
, {user: t} = Et({
enabled: e !== void 0
})
, n = uC(zt)
, [r,i] = y.useState(!1)
, {mutate: s} = Et()
, {sendTaps: o} = Mv();
return y.useEffect(()=>{
if (t && t.tappingGuruStarted) {
console.log("page rerender, power punch is still active");
const l = Ar.tappingGuruLifeTime - (Date.now() - t.tappingGuruStarted);
if (console.log("time to show (initial render)", l),
l <= 0) {
s({
tappingGuruStarted: void 0
}),
o({
tappingGuruEnded: !0
});
return
}
setTimeout(()=>{
console.log("timeout has ended"),
console.log("time to show", l),
s({
tappingGuruStarted: void 0
}),
o({
tappingGuruEnded: !0
})
}
, l)
}
}
, [t == null ? void 0 : t.tappingGuruStarted]),
y.useEffect(()=>{
t && r && zE()
}
, [r, t]),
y.useEffect(()=>{
t && (n(t),
Ut.changeLanguage(t.language).then(()=>i(!0)))
}
, [t, n]),
bA() ? x.jsxs("div", {
className: "relative grid h-screen cursor-default select-none grid-rows-layout overflow-hidden pb-5",
children: [x.jsx(k8, {}), x.jsx("div", {
className: "relative overflow-scroll",
children: x.jsx(J_, {})
}), x.jsxs("div", {
className: "relative",
children: [x.jsx(a$, {}), x.jsx("div", {
className: "px-5",
children: x.jsx(o$, {})
})]
}), x.jsx(w7, {})]
}) : x.jsx(l$, {})
}
, G7 = e=>{
const t = y.useMemo(()=>new gD({
defaultOptions: {
queries: {
retry: 5,
retryDelay: 1e3
},
mutations: {
retry: 5,
retryDelay: 1e3
}
}
}), []);
return x.jsx(bD, {
client: t,
children: x.jsx(GL, {
i18n: Ut,
children: e.children
})
})
}
, K7 = ({referral: e})=>{
const {name: t, scores: n, rewards: r} = e
, {t: i} = Tt("leagues")
, s = Il(e.scores)
, o = wC(e.scores)
, a = xf(s)
, l = i(s);
return x.jsxs("div", {
className: "flex flex-col gap-3 rounded-2xl bg-graphite-normal p-3",
children: [x.jsxs("div", {
className: "flex items-center justify-between",
children: [x.jsxs("div", {
className: "space-y-3",
children: [x.jsx("div", {
className: "pt-px text-h5",
children: t
}), x.jsxs("div", {
className: "flex items-center gap-2",
children: [x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: a,
alt: "trophy",
className: "size-6"
}), x.jsx("div", {
className: "text-base text-white/65 first-letter:uppercase",
children: l
})]
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
alt: "coin",
className: "size-6"
}), x.jsx("div", {
className: "text-base text-white/65",
children: n
})]
})]
})]
}), x.jsxs("div", {
className: "pr-1.5 text-h3 text-gold",
children: ["+", r]
})]
}), x.jsx(Nu, {
value: o
})]
})
}
, q7 = ()=>{
const e = gn()
, {data: t, isLoading: n, error: r} = vf({
queryKey: [Qt.referrals],
queryFn: async()=>{
const {data: i} = await e.get(Qt.referrals);
return i
}
});
if (r)
throw r;
return {
referrals: t,
isLoading: n,
error: r
}
}
;
var $T = {}
, IT = {}
, FT = {};
(function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = void 0;
var t = function() {
for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++)
s[o] = arguments[o];
if (typeof window < "u") {
var a;
typeof window.gtag > "u" && (window.dataLayer = window.dataLayer || [],
window.gtag = function() {
window.dataLayer.push(arguments)
}
),
(a = window).gtag.apply(a, s)
}
}
, n = t;
e.default = n
}
)(FT);
var VT = {};
(function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = o;
var t = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
function n(a) {
return a.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(l, u, c) {
return u > 0 && u + l.length !== c.length && l.search(t) > -1 && c.charAt(u - 2) !== ":" && (c.charAt(u + l.length) !== "-" || c.charAt(u - 1) === "-") && c.charAt(u - 1).search(/[^\s-]/) < 0 ? l.toLowerCase() : l.substr(1).search(/[A-Z]|\../) > -1 ? l : l.charAt(0).toUpperCase() + l.substr(1)
})
}
function r(a) {
return typeof a == "string" && a.indexOf("@") !== -1
}
var i = "REDACTED (Potential Email Address)";
function s(a) {
return r(a) ? (console.warn("This arg looks like an email address, redacting."),
i) : a
}
function o() {
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""
, l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0
, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0
, c = a || "";
return l && (c = n(a)),
u && (c = s(c)),
c
}
}
)(VT);
(function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = e.GA4 = void 0;
var t = o(FT)
, n = o(VT)
, r = ["eventCategory", "eventAction", "eventLabel", "eventValue", "hitType"]
, i = ["title", "location"]
, s = ["page", "hitType"];
function o(k) {
return k && k.__esModule ? k : {
default: k
}
}
function a(k, T) {
if (k == null)
return {};
var _ = l(k, T), O, R;
if (Object.getOwnPropertySymbols) {
var z = Object.getOwnPropertySymbols(k);
for (R = 0; R < z.length; R++)
O = z[R],
!(T.indexOf(O) >= 0) && Object.prototype.propertyIsEnumerable.call(k, O) && (_[O] = k[O])
}
return _
}
function l(k, T) {
if (k == null)
return {};
var _ = {}, O = Object.keys(k), R, z;
for (z = 0; z < O.length; z++)
R = O[z],
!(T.indexOf(R) >= 0) && (_[R] = k[R]);
return _
}
function u(k) {
"@babel/helpers - typeof";
return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(T) {
return typeof T
}
: function(T) {
return T && typeof Symbol == "function" && T.constructor === Symbol && T !== Symbol.prototype ? "symbol" : typeof T
}
,
u(k)
}
function c(k) {
return h(k) || f(k) || g(k) || d()
}
function d() {
throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function f(k) {
if (typeof Symbol < "u" && k[Symbol.iterator] != null || k["@@iterator"] != null)
return Array.from(k)
}
function h(k) {
if (Array.isArray(k))
return w(k)
}
function m(k, T) {
var _ = Object.keys(k);
if (Object.getOwnPropertySymbols) {
var O = Object.getOwnPropertySymbols(k);
T && (O = O.filter(function(R) {
return Object.getOwnPropertyDescriptor(k, R).enumerable
})),
_.push.apply(_, O)
}
return _
}
function p(k) {
for (var T = 1; T < arguments.length; T++) {
var _ = arguments[T] != null ? arguments[T] : {};
T % 2 ? m(Object(_), !0).forEach(function(O) {
A(k, O, _[O])
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(k, Object.getOwnPropertyDescriptors(_)) : m(Object(_)).forEach(function(O) {
Object.defineProperty(k, O, Object.getOwnPropertyDescriptor(_, O))
})
}
return k
}
function b(k, T) {
return D(k) || E(k, T) || g(k, T) || v()
}
function v() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)
}
function g(k, T) {
if (k) {
if (typeof k == "string")
return w(k, T);
var _ = Object.prototype.toString.call(k).slice(8, -1);
if (_ === "Object" && k.constructor && (_ = k.constructor.name),
_ === "Map" || _ === "Set")
return Array.from(k);
if (_ === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))
return w(k, T)
}
}
function w(k, T) {
(T == null || T > k.length) && (T = k.length);
for (var _ = 0, O = new Array(T); _ < T; _++)
O[_] = k[_];
return O
}
function E(k, T) {
var _ = k == null ? null : typeof Symbol < "u" && k[Symbol.iterator] || k["@@iterator"];
if (_ != null) {
var O, R, z, Y, te = [], ue = !0, X = !1;
try {
if (z = (_ = _.call(k)).next,
T !== 0)
for (; !(ue = (O = z.call(_)).done) && (te.push(O.value),
te.length !== T); ue = !0)
;
} catch (S) {
X = !0,
R = S
} finally {
try {
if (!ue && _.return != null && (Y = _.return(),
Object(Y) !== Y))
return
} finally {
if (X)
throw R
}
}
return te
}
}
function D(k) {
if (Array.isArray(k))
return k
}
function V(k, T) {
if (!(k instanceof T))
throw new TypeError("Cannot call a class as a function")
}
function C(k, T) {
for (var _ = 0; _ < T.length; _++) {
var O = T[_];
O.enumerable = O.enumerable || !1,
O.configurable = !0,
"value"in O && (O.writable = !0),
Object.defineProperty(k, B(O.key), O)
}
}
function P(k, T, _) {
return T && C(k.prototype, T),
Object.defineProperty(k, "prototype", {
writable: !1
}),
k
}
function A(k, T, _) {
return T = B(T),
T in k ? Object.defineProperty(k, T, {
value: _,
enumerable: !0,
configurable: !0,
writable: !0
}) : k[T] = _,
k
}
function B(k) {
var T = Q(k, "string");
return u(T) === "symbol" ? T : String(T)
}
function Q(k, T) {
if (u(k) !== "object" || k === null)
return k;
var _ = k[Symbol.toPrimitive];
if (_ !== void 0) {
var O = _.call(k, T || "default");
if (u(O) !== "object")
return O;
throw new TypeError("@@toPrimitive must return a primitive value.")
}
return (T === "string" ? String : Number)(k)
}
var Z = function() {
function k() {
var T = this;
V(this, k),
A(this, "reset", function() {
T.isInitialized = !1,
T._testMode = !1,
T._currentMeasurementId,
T._hasLoadedGA = !1,
T._isQueuing = !1,
T._queueGtag = []
}),
A(this, "_gtag", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
T._testMode || T._isQueuing ? T._queueGtag.push(O) : t.default.apply(void 0, O)
}),
A(this, "_loadGA", function(_, O) {
var R = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "https://www.googletagmanager.com/gtag/js";
if (!(typeof window > "u" || typeof document > "u") && !T._hasLoadedGA) {
var z = document.createElement("script");
z.async = !0,
z.src = "".concat(R, "?id=").concat(_),
O && z.setAttribute("nonce", O),
document.body.appendChild(z),
window.dataLayer = window.dataLayer || [],
window.gtag = function() {
window.dataLayer.push(arguments)
}
,
T._hasLoadedGA = !0
}
}),
A(this, "_toGtagOptions", function(_) {
if (_) {
var O = {
cookieUpdate: "cookie_update",
cookieExpires: "cookie_expires",
cookieDomain: "cookie_domain",
cookieFlags: "cookie_flags",
userId: "user_id",
clientId: "client_id",
anonymizeIp: "anonymize_ip",
contentGroup1: "content_group1",
contentGroup2: "content_group2",
contentGroup3: "content_group3",
contentGroup4: "content_group4",
contentGroup5: "content_group5",
allowAdFeatures: "allow_google_signals",
allowAdPersonalizationSignals: "allow_ad_personalization_signals",
nonInteraction: "non_interaction",
page: "page_path",
hitCallback: "event_callback"
}
, R = Object.entries(_).reduce(function(z, Y) {
var te = b(Y, 2)
, ue = te[0]
, X = te[1];
return O[ue] ? z[O[ue]] = X : z[ue] = X,
z
}, {});
return R
}
}),
A(this, "initialize", function(_) {
var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (!_)
throw new Error("Require GA_MEASUREMENT_ID");
var R = typeof _ == "string" ? [{
trackingId: _
}] : _;
T._currentMeasurementId = R[0].trackingId;
var z = O.gaOptions
, Y = O.gtagOptions
, te = O.nonce
, ue = O.testMode
, X = ue === void 0 ? !1 : ue
, S = O.gtagUrl;
if (T._testMode = X,
X || T._loadGA(T._currentMeasurementId, te, S),
T.isInitialized || (T._gtag("js", new Date),
R.forEach(function(I) {
var U = p(p(p({}, T._toGtagOptions(p(p({}, z), I.gaOptions))), Y), I.gtagOptions);
Object.keys(U).length ? T._gtag("config", I.trackingId, U) : T._gtag("config", I.trackingId)
})),
T.isInitialized = !0,
!X) {
var j = c(T._queueGtag);
for (T._queueGtag = [],
T._isQueuing = !1; j.length; ) {
var N = j.shift();
T._gtag.apply(T, c(N)),
N[0] === "get" && (T._isQueuing = !0)
}
}
}),
A(this, "set", function(_) {
if (!_) {
console.warn("`fieldsObject` is required in .set()");
return
}
if (u(_) !== "object") {
console.warn("Expected `fieldsObject` arg to be an Object");
return
}
Object.keys(_).length === 0 && console.warn("empty `fieldsObject` given to .set()"),
T._gaCommand("set", _)
}),
A(this, "_gaCommandSendEvent", function(_, O, R, z, Y) {
T._gtag("event", O, p(p({
event_category: _,
event_label: R,
value: z
}, Y && {
non_interaction: Y.nonInteraction
}), T._toGtagOptions(Y)))
}),
A(this, "_gaCommandSendEventParameters", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
if (typeof O[0] == "string")
T._gaCommandSendEvent.apply(T, c(O.slice(1)));
else {
var z = O[0]
, Y = z.eventCategory
, te = z.eventAction
, ue = z.eventLabel
, X = z.eventValue;
z.hitType;
var S = a(z, r);
T._gaCommandSendEvent(Y, te, ue, X, S)
}
}),
A(this, "_gaCommandSendTiming", function(_, O, R, z) {
T._gtag("event", "timing_complete", {
name: O,
value: R,
event_category: _,
event_label: z
})
}),
A(this, "_gaCommandSendPageview", function(_, O) {
if (O && Object.keys(O).length) {
var R = T._toGtagOptions(O)
, z = R.title
, Y = R.location
, te = a(R, i);
T._gtag("event", "page_view", p(p(p(p({}, _ && {
page_path: _
}), z && {
page_title: z
}), Y && {
page_location: Y
}), te))
} else
_ ? T._gtag("event", "page_view", {
page_path: _
}) : T._gtag("event", "page_view")
}),
A(this, "_gaCommandSendPageviewParameters", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
if (typeof O[0] == "string")
T._gaCommandSendPageview.apply(T, c(O.slice(1)));
else {
var z = O[0]
, Y = z.page;
z.hitType;
var te = a(z, s);
T._gaCommandSendPageview(Y, te)
}
}),
A(this, "_gaCommandSend", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
var z = typeof O[0] == "string" ? O[0] : O[0].hitType;
switch (z) {
case "event":
T._gaCommandSendEventParameters.apply(T, O);
break;
case "pageview":
T._gaCommandSendPageviewParameters.apply(T, O);
break;
case "timing":
T._gaCommandSendTiming.apply(T, c(O.slice(1)));
break;
case "screenview":
case "transaction":
case "item":
case "social":
case "exception":
console.warn("Unsupported send command: ".concat(z));
break;
default:
console.warn("Send command doesn't exist: ".concat(z))
}
}),
A(this, "_gaCommandSet", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
typeof O[0] == "string" && (O[0] = A({}, O[0], O[1])),
T._gtag("set", T._toGtagOptions(O[0]))
}),
A(this, "_gaCommand", function(_) {
for (var O = arguments.length, R = new Array(O > 1 ? O - 1 : 0), z = 1; z < O; z++)
R[z - 1] = arguments[z];
switch (_) {
case "send":
T._gaCommandSend.apply(T, R);
break;
case "set":
T._gaCommandSet.apply(T, R);
break;
default:
console.warn("Command doesn't exist: ".concat(_))
}
}),
A(this, "ga", function() {
for (var _ = arguments.length, O = new Array(_), R = 0; R < _; R++)
O[R] = arguments[R];
if (typeof O[0] == "string")
T._gaCommand.apply(T, O);
else {
var z = O[0];
T._gtag("get", T._currentMeasurementId, "client_id", function(Y) {
T._isQueuing = !1;
var te = T._queueGtag;
for (z({
get: function(S) {
return S === "clientId" ? Y : S === "trackingId" ? T._currentMeasurementId : S === "apiVersion" ? "1" : void 0
}
}); te.length; ) {
var ue = te.shift();
T._gtag.apply(T, c(ue))
}
}),
T._isQueuing = !0
}
return T.ga
}),
A(this, "event", function(_, O) {
if (typeof _ == "string")
T._gtag("event", _, T._toGtagOptions(O));
else {
var R = _.action
, z = _.category
, Y = _.label
, te = _.value
, ue = _.nonInteraction
, X = _.transport;
if (!z || !R) {
console.warn("args.category AND args.action are required in event()");
return
}
var S = {
hitType: "event",
eventCategory: (0,
n.default)(z),
eventAction: (0,
n.default)(R)
};
Y && (S.eventLabel = (0,
n.default)(Y)),
typeof te < "u" && (typeof te != "number" ? console.warn("Expected `args.value` arg to be a Number.") : S.eventValue = te),
typeof ue < "u" && (typeof ue != "boolean" ? console.warn("`args.nonInteraction` must be a boolean.") : S.nonInteraction = ue),
typeof X < "u" && (typeof X != "string" ? console.warn("`args.transport` must be a string.") : (["beacon", "xhr", "image"].indexOf(X) === -1 && console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),
S.transport = X)),
T._gaCommand("send", S)
}
}),
A(this, "send", function(_) {
T._gaCommand("send", _)
}),
this.reset()
}
return P(k, [{
key: "gtag",
value: function() {
this._gtag.apply(this, arguments)
}
}]),
k
}();
e.GA4 = Z;
var F = new Z;
e.default = F
}
)(IT);
(function(e) {
function t(a) {
"@babel/helpers - typeof";
return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
return typeof l
}
: function(l) {
return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l
}
,
t(a)
}
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.default = e.ReactGAImplementation = void 0;
var n = i(IT);
function r(a) {
if (typeof WeakMap != "function")
return null;
var l = new WeakMap
, u = new WeakMap;
return (r = function(d) {
return d ? u : l
}
)(a)
}
function i(a, l) {
if (a && a.__esModule)
return a;
if (a === null || t(a) !== "object" && typeof a != "function")
return {
default: a
};
var u = r(l);
if (u && u.has(a))
return u.get(a);
var c = {}
, d = Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var f in a)
if (f !== "default" && Object.prototype.hasOwnProperty.call(a, f)) {
var h = d ? Object.getOwnPropertyDescriptor(a, f) : null;
h && (h.get || h.set) ? Object.defineProperty(c, f, h) : c[f] = a[f]
}
return c.default = a,
u && u.set(a, c),
c
}
var s = n.GA4;
e.ReactGAImplementation = s;
var o = n.default;
e.default = o
}
)($T);
const zT = pu($T)
, Q7 = ()=>{
zT.initialize("G-BCZKLGL3D0")
}
, Vx = e=>{
const t = crypto.randomUUID();
zT.event("invitation_sent", {
invitation_id: t,
referrer_id: e.userId,
invitation_channell: e.type
})
}
, Y7 = ()=>y.useMemo(()=>{
var n;
const t = (n = Telegram.WebApp.initDataUnsafe.user) == null ? void 0 : n.id;
if (!t)
throw new Error("Can't get user id. Make sure that you're inside TWA");
return t
}
, [])
, zx = ()=>{
const {t: e} = Tt("referrals")
, t = Y7()
, r = encodeURI(`https://t.me/your_tap_bot?start=r_${t}`)
, [i,s] = y.useState(!1)
, o = wa()
, a = async()=>{
const u = encodeURI(e("inviteMessage"))
, c = `https://t.me/share/url?url=${r}&text=${u}`;
Vx({
userId: t,
type: "tg"
}),
window.Telegram.WebApp.openTelegramLink(c)
}
, l = ()=>{
Vx({
userId: t,
type: "link"
}),
navigator.clipboard.writeText(r),
s(!1),
o("Link copied!")
}
;
return x.jsx(y7, {
open: i,
onOpenChange: u=>{
s(u)
}
,
button: x.jsx(_x, {
children: x.jsxs("div", {
className: "flex flex-col gap-1",
children: [x.jsx("div", {
children: e("inviteFriends")
}), x.jsx("div", {
className: "text-sm font-normal subpixel-antialiased",
children: e("inviteFriendsButtonDescription")
})]
})
}),
children: x.jsxs("div", {
className: "flex flex-col items-center gap-10",
children: [x.jsxs("div", {
className: "flex flex-col gap-8",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-3.5 text-center",
children: [x.jsx("div", {
className: "text-h2 first-letter:uppercase",
children: e("inviteFriends")
}), x.jsx("p", {
className: "max-w-xs whitespace-pre-line text-pretty leading-[1.4rem] text-white/65",
children: e("description")
})]
}), x.jsx("div", {
className: "mx-auto px-8",
children: x.jsx("div", {
className: "max-w-[40vh] rounded-3xl bg-graphite-light p-5",
children: x.jsx(B8, {
link: r
})
})
})]
}), x.jsxs("div", {
className: "flex w-full flex-col items-center gap-2 text-black",
children: [x.jsx(_x, {
onClick: a,
className: "text-h3",
children: e("inviteFriends")
}), x.jsx("button", {
onClick: l,
className: "w-full rounded-xl bg-graphite-light py-[17px] text-h3 text-white",
children: e("copyLink")
})]
})]
})
})
}
, X7 = ()=>{
const {t: e} = Tt("referrals")
, {referrals: t, isLoading: n} = q7()
, {referrals: r, totalReferralsRewards: i} = Vt(zt);
return n || !t ? x.jsx(Ds, {
className: "flex h-full items-center justify-center",
children: x.jsx(ST, {})
}) : x.jsx(Ds, {
bgUrl: Ae.bgMini,
children: x.jsxs("div", {
className: Ze("flex h-full flex-col", r === 0 && "justify-between"),
children: [x.jsxs("div", {
className: "space-y-2 text-center",
children: [x.jsx("div", {
className: "text-base",
children: e("my")
}), x.jsxs("div", {
className: "space-y-3",
children: [x.jsxs("div", {
className: "text-h1",
children: [r, " ", e("myRefs", {
count: r
})]
}), x.jsxs("div", {
className: "text-h3 text-gold",
children: ["+", i]
})]
})]
}), r > 0 && x.jsxs(x.Fragment, {
children: [x.jsx(hr, {
y: 8
}), x.jsx(zx, {}), x.jsx(hr, {
y: 4
}), x.jsx("div", {
className: "flex h-full flex-col gap-2 overflow-scroll ",
children: t.map(s=>x.jsx(K7, {
referral: s
}, s.id))
})]
}), r === 0 && x.jsxs("div", {
className: "flex h-full flex-col items-center justify-center gap-6 text-center",
children: [x.jsx("img", {
src: Ae.notFound,
alt: "no referrals",
className: "size-14"
}), x.jsx("div", {
className: "text-h2",
children: e("noRefs")
}), x.jsx(zx, {})]
})]
})
})
}
, Ux = e=>y.useMemo(()=>new Intl.NumberFormat("en-US",{
minimumFractionDigits: 0,
maximumFractionDigits: 3,
notation: "compact",
...e
}), [e])
, J7 = ()=>{
const e = gn()
, t = vf({
queryKey: [Qt.stats],
queryFn: async()=>{
const {data: n} = await e.get(Qt.stats);
return n
}
});
if (t.error)
throw t.error;
return {
...t,
stats: t.data
}
}
, Z7 = ()=>{
const e = Ux()
, t = Ux({
notation: "standard"
})
, {stats: n, isLoading: r} = J7()
, {t: i} = Tt("stats");
return r || !n ? x.jsx(Ds, {
className: "flex h-full items-center justify-center",
children: x.jsx(ST, {})
}) : x.jsxs("div", {
className: "relative h-full",
children: [x.jsx("img", {
src: Ae.bgMini,
alt: "bg",
className: "absolute top-0 -z-10 w-full"
}), x.jsx(Ds, {
className: "h-full",
children: x.jsxs("div", {
className: "flex h-full flex-col items-center gap-10 text-center",
children: [x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-14"
}), x.jsx("div", {
className: "text-h1 text-gold",
children: e.format(n.totalCoins)
})]
}), x.jsxs("div", {
className: "flex h-full flex-col items-center gap-10",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-2",
children: [x.jsx("div", {
className: "text-base",
children: i("totalTouches")
}), x.jsx("div", {
className: "text-h2 text-gold",
children: t.format(n.totalTaps)
})]
}), x.jsxs("div", {
className: "flex flex-col items-center gap-2",
children: [x.jsx("div", {
className: "text-base",
children: i("totalPlayers")
}), x.jsx("div", {
className: "text-h2 text-gold",
children: t.format(n.totalPlayers)
})]
}), x.jsxs("div", {
className: "flex flex-col items-center gap-2",
children: [x.jsx("div", {
className: "text-base",
children: i("dailyUsers")
}), x.jsx("div", {
className: "text-h2 text-gold",
children: t.format(n.daily)
})]
}), x.jsxs("div", {
className: "flex flex-col items-center gap-2",
children: [x.jsx("div", {
className: "text-base",
children: i("onlinePlayers")
}), x.jsx("div", {
className: "text-h2 text-gold",
children: t.format(n.online)
})]
})]
})]
})
})]
})
}
, eV = ()=>{
const {score: e} = Vt(zt)
, {t} = Tt("leagues")
, n = t(Il(e));
return x.jsxs("div", {
className: "flex items-center justify-center gap-[7px]",
children: [x.jsxs("div", {
className: "flex items-center gap-[3px]",
children: [x.jsx("img", {
src: xf(Il(e)),
alt: "trophy",
className: "size-[30px]"
}), x.jsx("div", {
className: "translate-y-px text-h4 text-white/65 first-letter:uppercase",
children: n
})]
}), x.jsx(qv, {
className: "size-2 text-white/35"
})]
})
}
;
function UT() {
const {isDialogOpen: e, setIsDialogOpen: t} = yf("leagues")
, n = y.useRef(null);
kC(n, ()=>t(!1));
const [r,i] = y.useState()
, {t: s} = Tt("leagues")
, {score: o} = Vt(zt)
, a = Il(o)
, l = vC()
, u = l.map(D=>s(D))
, [c,d] = y.useState(0)
, f = l[c]
, h = u[c]
, m = yC(f)
, p = Cv(f)
, b = wC(o)
, v = o >= p
, g = f === a
, w = !v && !g;
y.useEffect(()=>{
r && (d(r.selectedScrollSnap()),
r.on("select", ()=>{
d(r.selectedScrollSnap())
}
))
}
, [r, a, l]);
const E = D=>{
D && t(!0)
}
;
return x.jsxs(Lt.Root, {
shouldScaleBackground: !1,
scrollLockTimeout: 0,
dismissible: !1,
open: e,
onOpenChange: E,
modal: !1,
children: [x.jsx(Lt.Trigger, {
className: "px-2 py-1 focus-visible:outline-none",
children: x.jsx(eV, {})
}), x.jsxs(Lt.Portal, {
children: [x.jsx(Lt.Overlay, {
className: "fixed inset-0 bg-black/50 backdrop-blur-[2px]"
}), x.jsxs(Lt.Content, {
ref: n,
className: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex flex-col rounded-t-3xl bg-graphite-normal focus-visible:outline-none",
children: [x.jsxs("div", {
className: "relative",
children: [g && x.jsx("img", {
src: Ae.bgAccent,
className: "animate-in fade-in absolute bottom-0 -z-10 w-full"
}), x.jsxs("div", {
className: "flex flex-1 flex-col gap-10 p-6 pb-[42px] pt-[40px]",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-3.5 text-center",
children: [x.jsxs("div", {
className: "text-h2 first-letter:uppercase",
children: [h, " ", s("league")]
}), x.jsx("p", {
className: "whitespace-pre-line text-pretty leading-[1.4rem] text-white/65",
children: s("description")
})]
}), x.jsx(zP, {
opts: {
startIndex: l.indexOf(a)
},
setApi: i,
className: "mx-auto max-w-[280px]",
children: x.jsxs("div", {
className: "flex items-center gap-4",
children: [x.jsx(HP, {}), x.jsx(UP, {
children: l.map(D=>x.jsx(BP, {
children: x.jsx("img", {
src: xf(D),
alt: "trophy",
className: "h-[240px] w-full object-cover"
})
}, D))
}), x.jsx(WP, {})]
})
}), x.jsxs("div", {
className: "flex min-h-14 w-full items-center justify-center justify-self-end",
children: [v && x.jsx("div", {
className: "w-fit bg-heat-text-gradient bg-clip-text text-center text-h3 text-transparent",
children: s("completed")
}), g && x.jsxs("div", {
className: "flex w-full flex-col items-center gap-2",
children: [x.jsxs("div", {
className: "mx-auto flex w-fit items-baseline gap-0.5",
children: [x.jsxs("div", {
children: [x.jsxs("span", {
className: "text-h3",
children: [" ", o]
}), p && x.jsx("span", {
className: "text-base text-white/65",
children: "/"
})]
}), x.jsx("div", {
children: x.jsx("div", {
className: "text-h5 text-white/65",
children: p
})
})]
}), x.jsx("div", {
className: "w-full flex-1",
children: x.jsx(Nu, {
value: b
})
})]
}), w && x.jsxs("div", {
className: "w-fit text-center text-h3 text-white",
children: [s("from"), " ", m]
})]
})]
})]
}), x.jsx("button", {
onClick: ()=>t(!1),
className: "absolute right-6 top-6",
children: x.jsx(Af, {})
})]
})]
})]
})
}
function tV(e, t) {
e.indexOf(t) === -1 && e.push(t)
}
const BT = (e,t,n)=>Math.min(Math.max(n, e), t)
, qn = {
duration: .3,
delay: 0,
endDelay: 0,
repeat: 0,
easing: "ease"
}
, Wd = e=>typeof e == "number"
, Lo = e=>Array.isArray(e) && !Wd(e[0])
, nV = (e,t,n)=>{
const r = t - e;
return ((n - e) % r + r) % r + e
}
;
function rV(e, t) {
return Lo(e) ? e[nV(0, e.length, t)] : e
}
const HT = (e,t,n)=>-n * e + n * t + e
, WT = ()=>{}
, $i = e=>e
, Ry = (e,t,n)=>t - e === 0 ? 1 : (n - e) / (t - e);
function GT(e, t) {
const n = e[e.length - 1];
for (let r = 1; r <= t; r++) {
const i = Ry(0, t, r);
e.push(HT(n, 1, i))
}
}
function iV(e) {
const t = [0];
return GT(t, e - 1),
t
}
function sV(e, t=iV(e.length), n=$i) {
const r = e.length
, i = r - t.length;
return i > 0 && GT(t, i),
s=>{
let o = 0;
for (; o < r - 2 && !(s < t[o + 1]); o++)
;
let a = BT(0, 1, Ry(t[o], t[o + 1], s));
return a = rV(n, o)(a),
HT(e[o], e[o + 1], a)
}
}
const KT = e=>Array.isArray(e) && Wd(e[0])
, hg = e=>typeof e == "object" && !!e.createAnimation
, aa = e=>typeof e == "function"
, oV = e=>typeof e == "string"
, gl = {
ms: e=>e * 1e3,
s: e=>e / 1e3
}
, qT = (e,t,n)=>(((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e
, aV = 1e-7
, lV = 12;
function uV(e, t, n, r, i) {
let s, o, a = 0;
do
o = t + (n - t) / 2,
s = qT(o, r, i) - e,
s > 0 ? n = o : t = o;
while (Math.abs(s) > aV && ++a < lV);
return o
}
function Ya(e, t, n, r) {
if (e === t && n === r)
return $i;
const i = s=>uV(s, 0, 1, e, n);
return s=>s === 0 || s === 1 ? s : qT(i(s), t, r)
}
const cV = (e,t="end")=>n=>{
n = t === "end" ? Math.min(n, .999) : Math.max(n, .001);
const r = n * e
, i = t === "end" ? Math.floor(r) : Math.ceil(r);
return BT(0, 1, i / e)
}
, dV = {
ease: Ya(.25, .1, .25, 1),
"ease-in": Ya(.42, 0, 1, 1),
"ease-in-out": Ya(.42, 0, .58, 1),
"ease-out": Ya(0, 0, .58, 1)
}
, fV = /\((.*?)\)/;
function Bx(e) {
if (aa(e))
return e;
if (KT(e))
return Ya(...e);
const t = dV[e];
if (t)
return t;
if (e.startsWith("steps")) {
const n = fV.exec(e);
if (n) {
const r = n[1].split(",");
return cV(parseFloat(r[0]), r[1].trim())
}
}
return $i
}
let QT = class {
constructor(t, n=[0, 1], {easing: r, duration: i=qn.duration, delay: s=qn.delay, endDelay: o=qn.endDelay, repeat: a=qn.repeat, offset: l, direction: u="normal", autoplay: c=!0}={}) {
if (this.startTime = null,
this.rate = 1,
this.t = 0,
this.cancelTimestamp = null,
this.easing = $i,
this.duration = 0,
this.totalDuration = 0,
this.repeat = 0,
this.playState = "idle",
this.finished = new Promise((f,h)=>{
this.resolve = f,
this.reject = h
}
),
r = r || qn.easing,
hg(r)) {
const f = r.createAnimation(n);
r = f.easing,
n = f.keyframes || n,
i = f.duration || i
}
this.repeat = a,
this.easing = Lo(r) ? $i : Bx(r),
this.updateDuration(i);
const d = sV(n, l, Lo(r) ? r.map(Bx) : $i);
this.tick = f=>{
var h;
s = s;
let m = 0;
this.pauseTime !== void 0 ? m = this.pauseTime : m = (f - this.startTime) * this.rate,
this.t = m,
m /= 1e3,
m = Math.max(m - s, 0),
this.playState === "finished" && this.pauseTime === void 0 && (m = this.totalDuration);
const p = m / this.duration;
let b = Math.floor(p)
, v = p % 1;
!v && p >= 1 && (v = 1),
v === 1 && b--;
const g = b % 2;
(u === "reverse" || u === "alternate" && g || u === "alternate-reverse" && !g) && (v = 1 - v);
const w = m >= this.totalDuration ? 1 : Math.min(v, 1)
, E = d(this.easing(w));
t(E),
this.pauseTime === void 0 && (this.playState === "finished" || m >= this.totalDuration + o) ? (this.playState = "finished",
(h = this.resolve) === null || h === void 0 || h.call(this, E)) : this.playState !== "idle" && (this.frameRequestId = requestAnimationFrame(this.tick))
}
,
c && this.play()
}
play() {
const t = performance.now();
this.playState = "running",
this.pauseTime !== void 0 ? this.startTime = t - this.pauseTime : this.startTime || (this.startTime = t),
this.cancelTimestamp = this.startTime,
this.pauseTime = void 0,
this.frameRequestId = requestAnimationFrame(this.tick)
}
pause() {
this.playState = "paused",
this.pauseTime = this.t
}
finish() {
this.playState = "finished",
this.tick(0)
}
stop() {
var t;
this.playState = "idle",
this.frameRequestId !== void 0 && cancelAnimationFrame(this.frameRequestId),
(t = this.reject) === null || t === void 0 || t.call(this, !1)
}
cancel() {
this.stop(),
this.tick(this.cancelTimestamp)
}
reverse() {
this.rate *= -1
}
commitStyles() {}
updateDuration(t) {
this.duration = t,
this.totalDuration = t * (this.repeat + 1)
}
get currentTime() {
return this.t
}
set currentTime(t) {
this.pauseTime !== void 0 || this.rate === 0 ? this.pauseTime = t : this.startTime = performance.now() - t / this.rate
}
get playbackRate() {
return this.rate
}
set playbackRate(t) {
this.rate = t
}
}
;
class hV {
setAnimation(t) {
this.animation = t,
t == null || t.finished.then(()=>this.clearAnimation()).catch(()=>{}
)
}
clearAnimation() {
this.animation = this.generator = void 0
}
}
const op = new WeakMap;
function YT(e) {
return op.has(e) || op.set(e, {
transforms: [],
values: new Map
}),
op.get(e)
}
function pV(e, t) {
return e.has(t) || e.set(t, new hV),
e.get(t)
}
const mV = ["", "X", "Y", "Z"]
, gV = ["translate", "scale", "rotate", "skew"]
, Gd = {
x: "translateX",
y: "translateY",
z: "translateZ"
}
, Hx = {
syntax: "<angle>",
initialValue: "0deg",
toDefaultUnit: e=>e + "deg"
}
, vV = {
translate: {
syntax: "<length-percentage>",
initialValue: "0px",
toDefaultUnit: e=>e + "px"
},
rotate: Hx,
scale: {
syntax: "<number>",
initialValue: 1,
toDefaultUnit: $i
},
skew: Hx
}
, Zl = new Map
, Oy = e=>`--motion-${e}`
, Kd = ["x", "y", "z"];
gV.forEach(e=>{
mV.forEach(t=>{
Kd.push(e + t),
Zl.set(Oy(e + t), vV[e])
}
)
}
);
const yV = (e,t)=>Kd.indexOf(e) - Kd.indexOf(t)
, wV = new Set(Kd)
, XT = e=>wV.has(e)
, xV = (e,t)=>{
Gd[t] && (t = Gd[t]);
const {transforms: n} = YT(e);
tV(n, t),
e.style.transform = bV(n)
}
, bV = e=>e.sort(yV).reduce(SV, "").trim()
, SV = (e,t)=>`${e} ${t}(var(${Oy(t)}))`
, pg = e=>e.startsWith("--")
, Wx = new Set;
function EV(e) {
if (!Wx.has(e)) {
Wx.add(e);
try {
const {syntax: t, initialValue: n} = Zl.has(e) ? Zl.get(e) : {};
CSS.registerProperty({
name: e,
inherits: !1,
syntax: t,
initialValue: n
})
} catch {}
}
}
const ap = (e,t)=>document.createElement("div").animate(e, t)
, Gx = {
cssRegisterProperty: ()=>typeof CSS < "u" && Object.hasOwnProperty.call(CSS, "registerProperty"),
waapi: ()=>Object.hasOwnProperty.call(Element.prototype, "animate"),
partialKeyframes: ()=>{
try {
ap({
opacity: [1]
})
} catch {
return !1
}
return !0
}
,
finished: ()=>!!ap({
opacity: [0, 1]
}, {
duration: .001
}).finished,
linearEasing: ()=>{
try {
ap({
opacity: 0
}, {
easing: "linear(0, 1)"
})
} catch {
return !1
}
return !0
}
}
, lp = {}
, Eo = {};
for (const e in Gx)
Eo[e] = ()=>(lp[e] === void 0 && (lp[e] = Gx[e]()),
lp[e]);
const CV = .015
, PV = (e,t)=>{
let n = "";
const r = Math.round(t / CV);
for (let i = 0; i < r; i++)
n += e(Ry(0, r - 1, i)) + ", ";
return n.substring(0, n.length - 2)
}
, Kx = (e,t)=>aa(e) ? Eo.linearEasing() ? `linear(${PV(e, t)})` : qn.easing : KT(e) ? TV(e) : e
, TV = ([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`;
function RV(e, t) {
for (let n = 0; n < e.length; n++)
e[n] === null && (e[n] = n ? e[n - 1] : t());
return e
}
const OV = e=>Array.isArray(e) ? e : [e];
function mg(e) {
return Gd[e] && (e = Gd[e]),
XT(e) ? Oy(e) : e
}
const wc = {
get: (e,t)=>{
t = mg(t);
let n = pg(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
if (!n && n !== 0) {
const r = Zl.get(t);
r && (n = r.initialValue)
}
return n
}
,
set: (e,t,n)=>{
t = mg(t),
pg(t) ? e.style.setProperty(t, n) : e.style[t] = n
}
};
function JT(e, t=!0) {
if (!(!e || e.playState === "finished"))
try {
e.stop ? e.stop() : (t && e.commitStyles(),
e.cancel())
} catch {}
}
function kV(e, t) {
var n;
let r = (t == null ? void 0 : t.toDefaultUnit) || $i;
const i = e[e.length - 1];
if (oV(i)) {
const s = ((n = i.match(/(-?[\d.]+)([a-z%]*)/)) === null || n === void 0 ? void 0 : n[2]) || "";
s && (r = o=>o + s)
}
return r
}
function _V() {
return window.__MOTION_DEV_TOOLS_RECORD
}
function AV(e, t, n, r={}, i) {
const s = _V()
, o = r.record !== !1 && s;
let a, {duration: l=qn.duration, delay: u=qn.delay, endDelay: c=qn.endDelay, repeat: d=qn.repeat, easing: f=qn.easing, persist: h=!1, direction: m, offset: p, allowWebkitAcceleration: b=!1, autoplay: v=!0} = r;
const g = YT(e)
, w = XT(t);
let E = Eo.waapi();
w && xV(e, t);
const D = mg(t)
, V = pV(g.values, D)
, C = Zl.get(D);
return JT(V.animation, !(hg(f) && V.generator) && r.record !== !1),
()=>{
const P = ()=>{
var Q, Z;
return (Z = (Q = wc.get(e, D)) !== null && Q !== void 0 ? Q : C == null ? void 0 : C.initialValue) !== null && Z !== void 0 ? Z : 0
}
;
let A = RV(OV(n), P);
const B = kV(A, C);
if (hg(f)) {
const Q = f.createAnimation(A, t !== "opacity", P, D, V);
f = Q.easing,
A = Q.keyframes || A,
l = Q.duration || l
}
if (pg(D) && (Eo.cssRegisterProperty() ? EV(D) : E = !1),
w && !Eo.linearEasing() && (aa(f) || Lo(f) && f.some(aa)) && (E = !1),
E) {
C && (A = A.map(F=>Wd(F) ? C.toDefaultUnit(F) : F)),
A.length === 1 && (!Eo.partialKeyframes() || o) && A.unshift(P());
const Q = {
delay: gl.ms(u),
duration: gl.ms(l),
endDelay: gl.ms(c),
easing: Lo(f) ? void 0 : Kx(f, l),
direction: m,
iterations: d + 1,
fill: "both"
};
a = e.animate({
[D]: A,
offset: p,
easing: Lo(f) ? f.map(F=>Kx(F, l)) : void 0
}, Q),
a.finished || (a.finished = new Promise((F,k)=>{
a.onfinish = F,
a.oncancel = k
}
));
const Z = A[A.length - 1];
a.finished.then(()=>{
h || (wc.set(e, D, Z),
a.cancel())
}
).catch(WT),
b || (a.playbackRate = 1.000001)
} else if (i && w)
A = A.map(Q=>typeof Q == "string" ? parseFloat(Q) : Q),
A.length === 1 && A.unshift(parseFloat(P())),
a = new i(Q=>{
wc.set(e, D, B ? B(Q) : Q)
}
,A,Object.assign(Object.assign({}, r), {
duration: l,
easing: f
}));
else {
const Q = A[A.length - 1];
wc.set(e, D, C && Wd(Q) ? C.toDefaultUnit(Q) : Q)
}
return o && s(e, t, A, {
duration: l,
delay: u,
easing: f,
repeat: d,
offset: p
}, "motion-one"),
V.setAnimation(a),
a && !v && a.pause(),
a
}
}
const DV = (e,t)=>e[t] ? Object.assign(Object.assign({}, e), e[t]) : Object.assign({}, e);
function LV(e, t) {
return typeof e == "string" ? e = document.querySelectorAll(e) : e instanceof Element && (e = [e]),
Array.from(e || [])
}
const NV = e=>e()
, ZT = (e,t,n=qn.duration)=>new Proxy({
animations: e.map(NV).filter(Boolean),
duration: n,
options: t
},jV)
, MV = e=>e.animations[0]
, jV = {
get: (e,t)=>{
const n = MV(e);
switch (t) {
case "duration":
return e.duration;
case "currentTime":
return gl.s((n == null ? void 0 : n[t]) || 0);
case "playbackRate":
case "playState":
return n == null ? void 0 : n[t];
case "finished":
return e.finished || (e.finished = Promise.all(e.animations.map($V)).catch(WT)),
e.finished;
case "stop":
return ()=>{
e.animations.forEach(r=>JT(r))
}
;
case "forEachNative":
return r=>{
e.animations.forEach(i=>r(i, e))
}
;
default:
return typeof (n == null ? void 0 : n[t]) > "u" ? void 0 : ()=>e.animations.forEach(r=>r[t]())
}
}
,
set: (e,t,n)=>{
switch (t) {
case "currentTime":
n = gl.ms(n);
case "playbackRate":
for (let r = 0; r < e.animations.length; r++)
e.animations[r][t] = n;
return !0
}
return !1
}
}
, $V = e=>e.finished;
function IV(e, t, n) {
return aa(e) ? e(t, n) : e
}
function FV(e) {
return function(n, r, i={}) {
n = LV(n);
const s = n.length
, o = [];
for (let a = 0; a < s; a++) {
const l = n[a];
for (const u in r) {
const c = DV(i, u);
c.delay = IV(c.delay, a, s);
const d = AV(l, u, r[u], c, e);
o.push(d)
}
}
return ZT(o, i, i.duration)
}
}
const VV = FV(QT);
function zV(e, t={}) {
return ZT([()=>{
const n = new QT(e,[0, 1],t);
return n.finished.catch(()=>{}
),
n
}
], t, t.duration)
}
function UV(e, t, n) {
return (aa(e) ? zV : VV)(e, t, n)
}
const BV = (e,t)=>{
e.length !== 0 && e.forEach(n=>{
const r = document.createElement("div");
r.textContent = `+${t}`,
r.style.position = "absolute",
r.style.top = `${n.y}px`,
r.style.left = `${n.x}px`,
r.style.fontSize = "24px",
r.style.fontWeight = "600",
document.body.appendChild(r),
UV(r, {
y: -150,
opacity: 0
}, {
duration: .75,
easing: "ease-out"
}).finished.then(()=>{
document.body.removeChild(r)
}
)
}
)
}
, HV = e=>{
const t = [];
for (let n = 0; n < e.length; n++) {
const r = e[n]
, i = r.identifier + Date.now();
t.push({
x: r.clientX,
y: r.clientY,
id: i
})
}
return t
}
, WV = e=>{
const {onTouches: t} = e
, {multitap: n, energy: r} = Vt(zt)
, i = Pu()
, s = i ? Ar.tappingGuruMultiplier * n : n
, o = i ? !1 : r - s < 0
, a = ({touches: d})=>{
const f = HV(d)
, h = Math.floor(r / (f.length * s))
, m = f.slice(0, h + 1);
BV(m, s),
t(m.length)
}
, l = wN("(max-width: 375px)")
, u = {
initial: {
skewY: 0,
skewX: 0
},
animate: {
skewY: 1,
scale: .99,
transition: {
duration: .05
}
}
}
, c = {
initial: {
skewY: 0,
skewX: 0
},
animate: {
skewY: 1,
scale: 1.89,
transition: {
duration: .05
}
}
};
return x.jsx("div", {
className: Ze("relative w-full", l ? "h-[58vw]" : "h-[70vw]", o && "pointer-events-none"),
children: x.jsxs(Hc.div, {
onTouchStart: a,
onClick: e.onClick,
initial: "initial",
animate: "initial",
whileTap: "animate",
className: "relative flex items-center justify-center",
children: [x.jsx(Hc.img, {
src: Ae.tappingGuruEffect,
className: Ze("absolute", l ? "-top-4 w-[65vw]" : "-top-6 w-[80vw]"),
style: {
mixBlendMode: "screen",
zIndex: 20,
scale: 1.9,
display: i ? "block" : "none"
},
variants: c
}), x.jsx(Hc.img, {
className: Ze("absolute top-0", l ? "w-[65vw]" : "w-[80vw]"),
src: Ae.tapCoin,
variants: u
})]
})
})
}
, GV = (e,t)=>{
const {multitap: n, score: r, balance: i} = e
, {tappingGuruMultiplier: s} = Ar
, o = t * n * s
, a = r + o
, l = i + o;
return {
score: a,
balance: l
}
}
, KV = (e,t)=>{
const {multitap: n, energy: r, score: i, balance: s} = e
, o = t * n
, a = r - t * n
, l = i + o
, u = s + o;
return a < 0 ? e : {
score: l,
energy: a,
balance: u
}
}
, qV = ()=>{
const {user: e, mutate: t} = Et()
, n = Pu();
return {
handleMutate: async i=>{
if (!e)
return;
const o = (n ? GV : KV)(e, i);
t(o)
}
}
}
, QV = e=>{
const t = Date.now();
localStorage.setItem("time", t.toString()),
setTimeout(()=>{
localStorage.getItem("time") === t.toString() && e()
}
, 500)
}
, YV = ()=>{
const {user: e} = Et()
, t = y.useRef(null);
if (y.useLayoutEffect(()=>{
if (!t.current || !(e != null && e.energy))
return;
const s = e.energy.toString().length
, o = (e.energyLimit * Ar.energyPerLevel).toString().length
, c = s * 12.5 + o * 9.5 + 5;
t.current.style.width = `${c}px`
}
, [e == null ? void 0 : e.energy, e == null ? void 0 : e.energyLimit]),
!e)
return null;
const {energy: n, energyLimit: r} = e
, i = r * Ar.energyPerLevel;
return x.jsxs("div", {
className: "flex items-center justify-center",
children: [x.jsx("img", {
src: Ae.energy,
className: "size-10 translate-x-0.5"
}), x.jsxs("div", {
ref: t,
className: "flex -translate-y-0.5 items-baseline gap-0.5",
children: [x.jsxs("div", {
children: [x.jsx("span", {
className: "text-base font-bold tiny:text-h3",
children: n
}), x.jsx("span", {
className: "text-sm text-white/65 tiny:text-base",
children: "/"
})]
}), x.jsx("div", {
children: x.jsx("div", {
className: "text-sm text-white/65 tiny:text-base",
children: i
})
})]
})]
})
}
, XV = ()=>{
const {user: e} = Et()
, {handleMutate: t} = qV()
, {sendTaps: n} = Mv()
, r = ll(u=>u.addTaps)
, i = y.useCallback(u=>{
t(u),
r(u),
QV(n)
}
, [r, t, n]);
if (!e)
return null;
const {energy: s, energyLimit: o} = e
, a = o * Ar.energyPerLevel
, l = mf(s, a);
return x.jsx(Ds, {
bgUrl: Ae.bgTap,
className: "overflow-y-hidden",
children: x.jsxs("div", {
className: "flex h-full flex-col justify-between",
children: [x.jsxs("div", {
className: "flex flex-1 flex-col justify-between",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-0 small:gap-2",
children: [x.jsx(zv, {}), x.jsx(UT, {})]
}), x.jsx(WV, {
onTouches: i
}), x.jsx(hr, {
y: 0
})]
}), x.jsxs("div", {
children: [x.jsx(YV, {}), x.jsx(Nu, {
value: l
})]
})]
})
})
}
, eR = new Set
, Tn = new WeakMap
, la = new WeakMap
, Is = new WeakMap
, gg = new WeakMap
, JV = new WeakMap
, ua = new WeakMap
, qd = new WeakMap
, Xa = new WeakSet;
let Bi, ky = 0, _y = 0;
const zr = "__aa_tgt"
, eu = "__aa_del"
, Qd = "__aa_new"
, ZV = e=>{
const t = sz(e);
t && t.forEach(n=>oz(n))
}
, ez = e=>{
e.forEach(t=>{
t.target === Bi && nz(),
Tn.has(t.target) && Ws(t.target)
}
)
}
;
function tz(e) {
const t = gg.get(e);
t == null || t.disconnect();
let n = Tn.get(e)
, r = 0;
const i = 5;
n || (n = ca(e),
Tn.set(e, n));
const {offsetWidth: s, offsetHeight: o} = Bi
, l = [n.top - i, s - (n.left + i + n.width), o - (n.top + i + n.height), n.left - i].map(c=>`${-1 * Math.floor(c)}px`).join(" ")
, u = new IntersectionObserver(()=>{
++r > 1 && Ws(e)
}
,{
root: Bi,
threshold: 1,
rootMargin: l
});
u.observe(e),
gg.set(e, u)
}
function Ws(e) {
clearTimeout(qd.get(e));
const t = Hf(e)
, n = tu(t) ? 500 : t.duration;
qd.set(e, setTimeout(async()=>{
const r = Is.get(e);
try {
await (r == null ? void 0 : r.finished),
Tn.set(e, ca(e)),
tz(e)
} catch {}
}
, n))
}
function nz() {
clearTimeout(qd.get(Bi)),
qd.set(Bi, setTimeout(()=>{
eR.forEach(e=>iR(e, t=>tR(()=>Ws(t))))
}
, 100))
}
function rz(e) {
setTimeout(()=>{
JV.set(e, setInterval(()=>tR(Ws.bind(null, e)), 2e3))
}
, Math.round(2e3 * Math.random()))
}
function tR(e) {
typeof requestIdleCallback == "function" ? requestIdleCallback(()=>e()) : requestAnimationFrame(()=>e())
}
let vg, Co;
const iz = typeof window < "u" && "ResizeObserver"in window;
iz && (Bi = document.documentElement,
vg = new MutationObserver(ZV),
Co = new ResizeObserver(ez),
window.addEventListener("scroll", ()=>{
_y = window.scrollY,
ky = window.scrollX
}
),
Co.observe(Bi));
function sz(e) {
return e.reduce((r,i)=>[...r, ...Array.from(i.addedNodes), ...Array.from(i.removedNodes)], []).every(r=>r.nodeName === "#comment") ? !1 : e.reduce((r,i)=>{
if (r === !1)
return !1;
if (i.target instanceof Element) {
if (up(i.target),
!r.has(i.target)) {
r.add(i.target);
for (let s = 0; s < i.target.children.length; s++) {
const o = i.target.children.item(s);
if (o) {
if (eu in o)
return !1;
up(i.target, o),
r.add(o)
}
}
}
if (i.removedNodes.length)
for (let s = 0; s < i.removedNodes.length; s++) {
const o = i.removedNodes[s];
if (eu in o)
return !1;
o instanceof Element && (r.add(o),
up(i.target, o),
la.set(o, [i.previousSibling, i.nextSibling]))
}
}
return r
}
, new Set)
}
function up(e, t) {
!t && !(zr in e) ? Object.defineProperty(e, zr, {
value: e
}) : t && !(zr in t) && Object.defineProperty(t, zr, {
value: e
})
}
function oz(e) {
var t;
const n = e.isConnected
, r = Tn.has(e);
n && la.has(e) && la.delete(e),
Is.has(e) && ((t = Is.get(e)) === null || t === void 0 || t.cancel()),
Qd in e ? qx(e) : r && n ? lz(e) : r && !n ? uz(e) : qx(e)
}
function xr(e) {
return Number(e.replace(/[^0-9.\-]/g, ""))
}
function az(e) {
let t = e.parentElement;
for (; t; ) {
if (t.scrollLeft || t.scrollTop)
return {
x: t.scrollLeft,
y: t.scrollTop
};
t = t.parentElement
}
return {
x: 0,
y: 0
}
}
function ca(e) {
const t = e.getBoundingClientRect()
, {x: n, y: r} = az(e);
return {
top: t.top + r,
left: t.left + n,
width: t.width,
height: t.height
}
}
function nR(e, t, n) {
let r = t.width
, i = t.height
, s = n.width
, o = n.height;
const a = getComputedStyle(e);
if (a.getPropertyValue("box-sizing") === "content-box") {
const u = xr(a.paddingTop) + xr(a.paddingBottom) + xr(a.borderTopWidth) + xr(a.borderBottomWidth)
, c = xr(a.paddingLeft) + xr(a.paddingRight) + xr(a.borderRightWidth) + xr(a.borderLeftWidth);
r -= c,
s -= c,
i -= u,
o -= u
}
return [r, s, i, o].map(Math.round)
}
function Hf(e) {
return zr in e && ua.has(e[zr]) ? ua.get(e[zr]) : {
duration: 250,
easing: "ease-in-out"
}
}
function rR(e) {
if (zr in e)
return e[zr]
}
function Ay(e) {
const t = rR(e);
return t ? Xa.has(t) : !1
}
function iR(e, ...t) {
t.forEach(n=>n(e, ua.has(e)));
for (let n = 0; n < e.children.length; n++) {
const r = e.children.item(n);
r && t.forEach(i=>i(r, ua.has(r)))
}
}
function Dy(e) {
return Array.isArray(e) ? e : [e]
}
function tu(e) {
return typeof e == "function"
}
function lz(e) {
const t = Tn.get(e)
, n = ca(e);
if (!Ay(e))
return Tn.set(e, n);
let r;
if (!t)
return;
const i = Hf(e);
if (typeof i != "function") {
const s = t.left - n.left
, o = t.top - n.top
, [a,l,u,c] = nR(e, t, n)
, d = {
transform: `translate(${s}px, ${o}px)`
}
, f = {
transform: "translate(0, 0)"
};
a !== l && (d.width = `${a}px`,
f.width = `${l}px`),
u !== c && (d.height = `${u}px`,
f.height = `${c}px`),
r = e.animate([d, f], {
duration: i.duration,
easing: i.easing
})
} else {
const [s] = Dy(i(e, "remain", t, n));
r = new Animation(s),
r.play()
}
Is.set(e, r),
Tn.set(e, n),
r.addEventListener("finish", Ws.bind(null, e))
}
function qx(e) {
Qd in e && delete e[Qd];
const t = ca(e);
Tn.set(e, t);
const n = Hf(e);
if (!Ay(e))
return;
let r;
if (typeof n != "function")
r = e.animate([{
transform: "scale(.98)",
opacity: 0
}, {
transform: "scale(0.98)",
opacity: 0,
offset: .5
}, {
transform: "scale(1)",
opacity: 1
}], {
duration: n.duration * 1.5,
easing: "ease-in"
});
else {
const [i] = Dy(n(e, "add", t));
r = new Animation(i),
r.play()
}
Is.set(e, r),
r.addEventListener("finish", Ws.bind(null, e))
}
function Qx(e, t) {
var n;
e.remove(),
Tn.delete(e),
la.delete(e),
Is.delete(e),
(n = gg.get(e)) === null || n === void 0 || n.disconnect(),
setTimeout(()=>{
if (eu in e && delete e[eu],
Object.defineProperty(e, Qd, {
value: !0,
configurable: !0
}),
t && e instanceof HTMLElement)
for (const r in t)
e.style[r] = ""
}
, 0)
}
function uz(e) {
var t;
if (!la.has(e) || !Tn.has(e))
return;
const [n,r] = la.get(e);
Object.defineProperty(e, eu, {
value: !0,
configurable: !0
});
const i = window.scrollX
, s = window.scrollY;
if (r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(e, r) : n && n.parentNode ? n.parentNode.appendChild(e) : (t = rR(e)) === null || t === void 0 || t.appendChild(e),
!Ay(e))
return Qx(e);
const [o,a,l,u] = dz(e)
, c = Hf(e)
, d = Tn.get(e);
(i !== ky || s !== _y) && cz(e, i, s, c);
let f, h = {
position: "absolute",
top: `${o}px`,
left: `${a}px`,
width: `${l}px`,
height: `${u}px`,
margin: "0",
pointerEvents: "none",
transformOrigin: "center",
zIndex: "100"
};
if (!tu(c))
Object.assign(e.style, h),
f = e.animate([{
transform: "scale(1)",
opacity: 1
}, {
transform: "scale(.98)",
opacity: 0
}], {
duration: c.duration,
easing: "ease-out"
});
else {
const [m,p] = Dy(c(e, "remove", d));
(p == null ? void 0 : p.styleReset) !== !1 && (h = (p == null ? void 0 : p.styleReset) || h,
Object.assign(e.style, h)),
f = new Animation(m),
f.play()
}
Is.set(e, f),
f.addEventListener("finish", Qx.bind(null, e, h))
}
function cz(e, t, n, r) {
const i = ky - t
, s = _y - n
, o = document.documentElement.style.scrollBehavior;
if (getComputedStyle(Bi).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"),
window.scrollTo(window.scrollX + i, window.scrollY + s),
!e.parentElement)
return;
const l = e.parentElement;
let u = l.clientHeight
, c = l.clientWidth;
const d = performance.now();
function f() {
requestAnimationFrame(()=>{
if (!tu(r)) {
const h = u - l.clientHeight
, m = c - l.clientWidth;
d + r.duration > performance.now() ? (window.scrollTo({
left: window.scrollX - m,
top: window.scrollY - h
}),
u = l.clientHeight,
c = l.clientWidth,
f()) : document.documentElement.style.scrollBehavior = o
}
}
)
}
f()
}
function dz(e) {
const t = Tn.get(e)
, [n,,r] = nR(e, t, ca(e));
let i = e.parentElement;
for (; i && (getComputedStyle(i).position === "static" || i instanceof HTMLBodyElement); )
i = i.parentElement;
i || (i = document.body);
const s = getComputedStyle(i)
, o = Tn.get(i) || ca(i)
, a = Math.round(t.top - o.top) - xr(s.borderTopWidth)
, l = Math.round(t.left - o.left) - xr(s.borderLeftWidth);
return [a, l, n, r]
}
function fz(e, t={}) {
return vg && Co && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !tu(t) && !t.disrespectUserMotionPreference || (Xa.add(e),
getComputedStyle(e).position === "static" && Object.assign(e.style, {
position: "relative"
}),
iR(e, Ws, rz, i=>Co == null ? void 0 : Co.observe(i)),
tu(t) ? ua.set(e, t) : ua.set(e, {
duration: 250,
easing: "ease-in-out",
...t
}),
vg.observe(e, {
childList: !0
}),
eR.add(e))),
Object.freeze({
parent: e,
enable: ()=>{
Xa.add(e)
}
,
disable: ()=>{
Xa.delete(e)
}
,
isEnabled: ()=>Xa.has(e)
})
}
function Ly(e) {
const [t,n] = y.useState()
, r = y.useMemo(()=>e, [])
, i = y.useCallback(o=>{
o instanceof HTMLElement ? n(fz(o, r)) : n(void 0)
}
, [r])
, s = y.useCallback(o=>{
t && (o ? t.enable() : t.disable())
}
, [t]);
return [i, s]
}
const hz = e=>{
const {t} = Tt("tasks");
return x.jsx("button", {
className: Ze("w-fit rounded-xl px-6 py-3 text-h4 text-black", e.disabled ? "bg-white/5 text-graphite-superlight" : "bg-gold-button-gradient"),
...e,
children: t("claim")
})
}
, sR = e=>{
const {iconUrl: t, name: n, reward: r, progress: i, onClaim: s} = e
, o = i >= 100;
return x.jsxs("div", {
className: "flex w-full flex-col gap-3 rounded-2xl bg-graphite-normal p-3",
children: [x.jsxs("div", {
className: "flex items-center justify-between",
children: [x.jsxs("div", {
className: "flex items-center gap-2",
children: [x.jsx("img", {
src: t,
alt: "league icon",
className: "size-14"
}), x.jsxs("div", {
className: "flex flex-col gap-2",
children: [x.jsx("div", {
className: "text-h5 first-letter:uppercase",
children: n
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
alt: "score",
className: "size-6"
}), x.jsx("div", {
className: "text-base text-white/65",
children: r
})]
})]
})]
}), x.jsx(hz, {
onClick: s,
disabled: !o
})]
}), !o && x.jsx(Nu, {
value: i
})]
})
}
, pz = e=>x.jsxs("div", {
className: "flex h-full flex-col items-center justify-center gap-10 text-center",
children: [x.jsx("img", {
src: Ae.congrats,
alt: "congrats",
className: "size-40"
}), x.jsxs("div", {
className: "flex flex-col items-center gap-6",
children: [x.jsxs("div", {
className: "flex flex-col items-center gap-4",
children: [x.jsx("div", {
className: "text-h2",
children: "Congratulations"
}), x.jsx("div", {
className: "text-base text-white/65",
children: "You have successfully completed the mission"
})]
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
className: "size-8"
}), x.jsx("div", {
className: "text-h2 text-gold",
children: e.reward
})]
}), x.jsx("button", {
onClick: e.onOkayClick,
className: "w-full rounded-xl bg-gold-button-gradient p-[17px] text-h3 text-black shadow-gold-button-glow",
children: "Okay"
})]
})]
})
, oR = e=>x.jsx("button", {
...e,
className: Ze("w-full rounded-xl bg-heat-button-gradient p-[17px] text-h3 shadow-heat-button-glow", e.className),
children: e.children
})
, aR = e=>{
const {name: t, reward: n, description: r} = e.mission;
return x.jsxs(x.Fragment, {
children: [x.jsxs("div", {
className: "flex flex-col items-center justify-between gap-3",
children: [x.jsx("div", {
className: "text-h2",
children: t
}), x.jsx("div", {
className: "text-center text-base leading-[1.4rem] text-white/65",
children: r
})]
}), x.jsx(hr, {
y: 8
}), x.jsxs("div", {
className: "flex flex-col items-center gap-1.5",
children: [x.jsxs("div", {
className: "flex items-center justify-center gap-2",
children: [x.jsx("img", {
src: Ae.coin,
alt: "coin",
className: "size-8"
}), x.jsx("div", {
className: "translate-y-px text-h2 text-gold",
children: n
})]
}), x.jsx("div", {
className: "text-base text-white/65",
children: "Rewards"
})]
})]
})
}
, lR = e=>{
const {missionId: t, task: n, active: r} = e
, {startTask: i} = pN(t, n.id)
, {checkTask: s, isMutating: o} = cN(t, n.id)
, a = ()=>{
n.url && n.url.startsWith("https://t.me") ? Telegram.WebApp.openTelegramLink(n.url) : n.chatId ? Telegram.WebApp.openTelegramLink(`https://t.me/${n.chatId}`) : Telegram.WebApp.openLink(n.url)
}
, l = async()=>{
n.status === Kn.new && i(),
a()
}
;
return x.jsx("button", {
onClick: l,
disabled: !r,
className: Ze("cursor-pointer rounded-2xl bg-graphite-light px-4 py-3", !r && "px-4 py-4 text-graphite-superlight"),
children: x.jsxs("div", {
className: "flex items-center justify-between",
children: [x.jsxs("div", {
className: "flex flex-col gap-2",
children: [x.jsx("div", {
className: "text-left text-h5",
children: n.name
}), n.status === Kn.checking && x.jsx("div", {
className: "text-left text-sm text-accent-error",
children: "Waiting for confirmation..."
})]
}), r && x.jsxs("div", {
className: "flex items-center gap-2",
children: [n.status === Kn.new && x.jsx(yz, {
onGo: l,
disabled: o
}), n.status === Kn.started && x.jsx(vz, {
onCheck: s,
disabled: o
}), n.status === Kn.checking && x.jsx(gz, {
taskId: n.id,
disabled: o
}), n.status === Kn.completed && x.jsx(mz, {})]
})]
})
})
}
, mz = ()=>x.jsx("div", {
className: "bg-heat-text-gradient bg-clip-text px-1.5 py-2.5 text-h4 text-transparent",
children: "Done!"
})
, gz = e=>{
const t = uN(e.taskId);
return x.jsx(Ny, {
disabled: e.disabled,
className: "bg-graphite-normal text-white/20",
children: t
})
}
, vz = e=>x.jsx(Ny, {
className: "bg-gold-button-gradient text-black disabled:opacity-50",
onClick: t=>{
var n;
t.stopPropagation(),
(n = e.onCheck) == null || n.call(e)
}
,
disabled: e.disabled,
children: "Check"
})
, yz = e=>{
const {onGo: t} = e;
return x.jsx(Ny, {
disabled: e.disabled,
className: "bg-gold-button-gradient text-black",
onClick: t,
children: "Go"
})
}
, Ny = e=>{
const t = n=>{
var r;
n.stopPropagation(),
(r = e.onClick) == null || r.call(e, n)
}
;
return x.jsx("span", {
...e,
onClick: t,
className: Ze("w-fit rounded-xl px-6 py-3 text-h4 text-black disabled:opacity-50", e.disabled && "pointer-events-none opacity-50", e.className)
})
}
, wz = e=>{
const {tasks: t} = e.mission;
return x.jsxs(x.Fragment, {
children: [x.jsx(aR, {
mission: e.mission
}), x.jsx(hr, {
y: 8
}), x.jsxs("div", {
className: "space-y-3",
children: [x.jsx("div", {
className: "text-h4",
children: "Your tasks"
}), x.jsx("div", {
className: "flex flex-col gap-2",
children: t.map(n=>x.jsx(lR, {
missionId: e.mission.id,
task: n,
active: !1
}, n.id))
})]
}), x.jsx(hr, {
y: 6
}), x.jsx(oR, {
onClick: ()=>e.onStart(e.mission.id),
children: "Start mission"
})]
})
}
, xz = e=>{
const {tasks: t} = e.mission
, n = t.some(r=>r.status !== Kn.completed);
return x.jsxs(x.Fragment, {
children: [x.jsx(aR, {
mission: e.mission
}), x.jsx(hr, {
y: 8
}), x.jsx("div", {
className: "flex flex-col gap-2",
children: t.map(r=>x.jsx(lR, {
missionId: e.mission.id,
task: r,
active: e.mission.status === ar.started
}, r.id))
}), x.jsx(hr, {
y: 6
}), x.jsx(oR, {
className: "disabled:opacity-50",
disabled: n,
onClick: ()=>e.onFinish(),
children: "Finish mission"
})]
})
}
, bz = e=>{
const {mission: t} = e
, n = t.status
, {isDialogOpen: r, setIsDialogOpen: i} = yf(`special-${t.id}`)
, s = y.useRef(null);
kC(s, ()=>i(!1));
const o = u=>{
u && i(!0)
}
, {startMission: a} = hN(e.mission.id)
, {finishMission: l} = dN(e.mission.id, e.mission.reward);
return x.jsxs(Lt.Root, {
shouldScaleBackground: !1,
scrollLockTimeout: 0,
dismissible: !1,
open: r,
onOpenChange: o,
modal: !1,
children: [x.jsx(Lt.Trigger, {
className: "w-full",
children: x.jsx(Sz, {
mission: e.mission,
iconUrl: e.iconUrl
})
}), x.jsxs(Lt.Portal, {
children: [x.jsx(Lt.Overlay, {
className: "fixed inset-0 bg-black/80"
}), x.jsxs(Lt.Content, {
className: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex flex-col rounded-t-xl bg-graphite-normal",
children: [x.jsxs("div", {
ref: s,
className: "flex flex-1 flex-col justify-between px-6 pb-[42px] pt-9",
children: [n === ar.new && x.jsx(wz, {
mission: e.mission,
onStart: a
}), n === ar.started && x.jsx(xz, {
mission: e.mission,
onFinish: l
}), n === ar.completed && x.jsx(pz, {
reward: t.reward,
onOkayClick: ()=>i(!1)
}), n === ar.new && x.jsx("img", {
className: "absolute bottom-0 left-0 -z-10",
src: Ae.bgAccent,
alt: "reward glow"
}), n === ar.completed && x.jsx("img", {
className: "absolute bottom-0 left-0 -z-10 rotate-180",
src: Ae.bgMini,
alt: "reward glow"
})]
}), x.jsx("button", {
onClick: ()=>i(!1),
className: "absolute right-6 top-6",
children: x.jsx(Af, {})
})]
})]
})]
})
}
, Sz = e=>{
const {name: t, reward: n, status: r} = e.mission
, i = r === ar.completed;
return x.jsx("div", {
className: Ze("flex w-full flex-col gap-3 rounded-2xl bg-graphite-normal p-3", i ? "pr-[20px]" : "pr-[18px]"),
children: x.jsxs("div", {
className: "flex items-center justify-between",
children: [x.jsxs("div", {
className: "flex items-center gap-2",
children: [x.jsx("img", {
src: e.iconUrl,
alt: "league icon",
className: "size-14"
}), x.jsxs("div", {
className: "flex flex-col gap-2",
children: [x.jsx("div", {
className: "text-h5 first-letter:uppercase",
children: t
}), x.jsxs("div", {
className: "flex items-center gap-1",
children: [x.jsx("img", {
src: Ae.coin,
alt: "score",
className: "size-6"
}), x.jsx("div", {
className: "text-base text-white/65",
children: n
})]
})]
})]
}), !i && x.jsx(qv, {
className: "text-white/65"
}), i && x.jsx("div", {
className: "bg-heat-text-gradient bg-clip-text text-h4 text-transparent",
children: "Done!"
})]
})
})
}
, Ez = ()=>{
const e = cC()
, {t} = Tt("tasks");
return x.jsxs(Ds, {
bgUrl: Ae.bgMini,
children: [x.jsx(zv, {}), x.jsx(hr, {
y: 2
}), x.jsx("div", {
className: "flex justify-center",
children: x.jsx(UT, {})
}), x.jsx(hr, {
y: 4
}), x.jsxs(v7, {
defaultValue: "special",
children: [x.jsxs(NT, {
children: [x.jsx(Wc, {
notification: e,
value: "special",
children: t("special")
}), x.jsx(Wc, {
value: "leagues",
children: t("leagues")
}), x.jsx(Wc, {
value: "referrals",
children: t("referrals")
})]
}), x.jsx(hr, {
y: 3
}), x.jsx(Gc, {
value: "special",
children: x.jsx(Tz, {})
}), x.jsx(Gc, {
value: "leagues",
children: x.jsx(Cz, {})
}), x.jsx(Gc, {
value: "referrals",
children: x.jsx(Pz, {})
})]
})]
})
}
, Cz = ()=>{
const e = KL()
, t = Vt(zt)
, {claim: n} = YL(t)
, [r] = Ly();
return x.jsx("div", {
ref: r,
className: "flex flex-col gap-2",
children: e.map(i=>x.jsx(sR, {
name: i.name,
iconUrl: i.iconUrl,
reward: i.reward,
progress: i.progress,
onClaim: ()=>n(i.reward, i.league)
}, i.name))
})
}
, Pz = ()=>{
const e = QL()
, t = Vt(zt)
, {claim: n} = XL(t)
, [r] = Ly();
return x.jsx("div", {
ref: r,
className: "flex flex-col gap-2",
children: e.map(i=>x.jsx(sR, {
name: i.name,
iconUrl: i.iconUrl,
reward: i.reward,
progress: i.progress,
onClaim: ()=>n(i.reward, i.level)
}, i.name))
})
}
, Tz = ()=>{
const {missions: e} = Vt(zt)
, [t] = Ly();
return x.jsx("div", {
ref: t,
className: "flex flex-col gap-2",
children: e.map(n=>x.jsx(bz, {
mission: n,
iconUrl: Ae.bookmark
}, n.id))
})
}
, Rz = oA(lm(x.jsxs(ns, {
path: "",
errorElement: x.jsx(P5, {}),
element: x.jsx(G7, {
children: x.jsx(W7, {})
}),
children: [x.jsx(ns, {
path: "/",
element: x.jsx(XV, {})
}), x.jsx(ns, {
path: "/boosters",
element: x.jsx(C5, {})
}), x.jsx(ns, {
path: "/tasks",
element: x.jsx(Ez, {})
}), x.jsx(ns, {
path: "/referrals",
element: x.jsx(X7, {})
}), x.jsx(ns, {
path: "/stats",
element: x.jsx(Z7, {})
})]
})))
, Oz = ()=>{
const {t: e} = Tt("footer");
return [{
path: "/referrals",
name: e("ref"),
iconUrl: Ae.navRef
}, {
path: "/tasks",
name: e("tasks"),
iconUrl: Ae.navTasks
}, {
path: "/",
name: e("tap"),
iconUrl: Ae.navTap
}, {
path: "/boosters",
name: e("boosters"),
iconUrl: Ae.navBoosters
}, {
path: "/stats",
name: e("stats"),
iconUrl: Ae.navStats
}]
}
;
Q7();
const kz = dp.createRoot(document.getElementById("root"));
kz.render(x.jsx(ce.StrictMode, {
children: x.jsx($R, {
options: {
smoothButtonsTransition: !0
},
children: x.jsx(mA, {
router: Rz
})
})
}));