mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
40611 lines
1.3 MiB
40611 lines
1.3 MiB
import { f as $e, j as c, u as DR, c as Be, a as At, b as St, w as kh, d as Da, o as ar, S as rS, e as Xl, g as Yt, h as zs, k as uc, i as e0, r as Y5, _ as yh, l as MR, m as RR, n as U3, p as kR, q as nx, s as cc, t as Q5, v as X5, x as PR, y as OR, z as Ie, A as K5, B as Z5, C as t0, D as Ph, F as ce, E as Pe, T as mt, G as AR, H as wg, I as Og, J as rx, K as ax, L as ix, U as NR, M as J5, N as $5, O as zR, P as e6, Q as t6, R as IR, V as n6, W as r6, X as Ku, Y as ei, Z as a6, $ as Oh, a0 as LR, a1 as FR, a2 as i6, a3 as ca, a4 as n0, a5 as BR, a6 as H3, a7 as Qu, a8 as _R, a9 as UR, aa as rh, ab as Jm, ac as HR, ad as VR, ae as WR, af as GR, ag as qR, ah as o6, ai as s6, aj as ox, ak as sx, al as l6, am as lx, an as ux, ao as V3, ap as u6, aq as c6, ar as d6, as as Eg, at as jg, au as YR, av as cx, aw as f6, ax as QR, ay as l2, az as W3, aA as p6, aB as h6, aC as dx, aD as Zu, aE as XR, aF as KR, aG as G3, aH as q3, aI as ZR, aJ as JR, aK as $R, aL as v6, aM as m6, aN as ek, aO as tk, aP as Y3, aQ as nk, aR as Q3, aS as rk, aT as ak, aU as ik, aV as ok, aW as sk, aX as lk, aY as uk, aZ as ck, a_ as X3, a$ as dk, b0 as fk, b1 as xh, b2 as Ag, b3 as g6, b4 as Ng, b5 as pk, b6 as hk, b7 as es, b8 as y6, b9 as aS, ba as Ah, bb as vk, bc as mk, bd as gk, be as ns, bf as x6, bg as yk, bh as xk, bi as S6, bj as Sk, bk, bl as Ck, bm as wk, bn as Ek, bo as jk, bp as Tk, bq as Dk, br as Mk, bs as K3, bt as Rk, bu as kk, bv as Pk, bw as Ok, bx as Ak, by as Nk, bz as u2, bA as lh, bB as $m, bC as Z3, bD as c2, bE as d2, bF as eg, bG as J3, bH as fx, bI as zk, bJ as Ik, bK as Lk, bL as Fk, bM as Bk, bN as _k, bO as Uk, bP as tg, bQ as f2, bR as ng, bS as go, bT as Hk, bU as Vk, bV as b6, bW as zg, bX as iS, bY as C6, bZ as w6, b_ as E6, b$ as Wk, c0 as j6, c1 as T6, c2 as D6, c3 as M6, c4 as R6, c5 as rf, c6 as af, c7 as k6, c8 as P6, c9 as O6, ca as A6, cb as N6, cc as Gk, cd as qk, ce as $3, cf as rg, cg as Yk, ch as ew, ci as tw, cj as nw, ck as rw, cl as p2, cm as z6, cn as Qk, co as Nh, cp as aw, cq as Xk, cr as Kk, cs as Zk, ct as Ju, cu as I6, cv as iw, cw as Jk, cx as $k, cy as eP, cz as tP, cA as nP, cB as rP, cC as aP, cD as iP, cE as oP, cF as sP, cG as lP, cH as uP } from "./component-6919b100.mjs";
|
||
import * as Je from "react";
|
||
import pt, { Children as Kl, useMemo as an, useLayoutEffect as bo, useEffect as rt, useRef as He, useState as qe, useId as bi, useCallback as Q, forwardRef as dc, isValidElement as zh, cloneElement as Ci, PureComponent as cP, Fragment as L6, createElement as Ns, createContext as r0, useContext as Zl, memo as F6, useImperativeHandle as oS, useReducer as B6, Component as dP, useTransition as fP } from "react";
|
||
import { I as Zr, u as pP, c as hP, a as Qn, b as kr, A as Sf, m as Ws, d as of, e as fc, P as sS, f as vP, C as mP, g as Z, h as je, n as _6 } from "./scrollbar-d87b3f9c.mjs";
|
||
import ag, { flushSync as gP } from "react-dom";
|
||
function lS(e, t) {
|
||
if (e == null)
|
||
return {};
|
||
var n = {}, i = Object.keys(e), o, l;
|
||
for (l = 0; l < i.length; l++)
|
||
o = i[l], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
||
return n;
|
||
}
|
||
var Ig = "NOT_FOUND";
|
||
function yP(e) {
|
||
var t;
|
||
return {
|
||
get: function(i) {
|
||
return t && e(t.key, i) ? t.value : Ig;
|
||
},
|
||
put: function(i, o) {
|
||
t = {
|
||
key: i,
|
||
value: o
|
||
};
|
||
},
|
||
getEntries: function() {
|
||
return t ? [t] : [];
|
||
},
|
||
clear: function() {
|
||
t = void 0;
|
||
}
|
||
};
|
||
}
|
||
function xP(e, t) {
|
||
var n = [];
|
||
function i(h) {
|
||
var y = n.findIndex(function(x) {
|
||
return t(h, x.key);
|
||
});
|
||
if (y > -1) {
|
||
var m = n[y];
|
||
return y > 0 && (n.splice(y, 1), n.unshift(m)), m.value;
|
||
}
|
||
return Ig;
|
||
}
|
||
function o(h, y) {
|
||
i(h) === Ig && (n.unshift({
|
||
key: h,
|
||
value: y
|
||
}), n.length > e && n.pop());
|
||
}
|
||
function l() {
|
||
return n;
|
||
}
|
||
function f() {
|
||
n = [];
|
||
}
|
||
return {
|
||
get: i,
|
||
put: o,
|
||
getEntries: l,
|
||
clear: f
|
||
};
|
||
}
|
||
var SP = function(t, n) {
|
||
return t === n;
|
||
};
|
||
function bP(e) {
|
||
return function(n, i) {
|
||
if (n === null || i === null || n.length !== i.length)
|
||
return !1;
|
||
for (var o = n.length, l = 0; l < o; l++)
|
||
if (!e(n[l], i[l]))
|
||
return !1;
|
||
return !0;
|
||
};
|
||
}
|
||
function CP(e, t) {
|
||
var n = typeof t == "object" ? t : {
|
||
equalityCheck: t
|
||
}, i = n.equalityCheck, o = i === void 0 ? SP : i, l = n.maxSize, f = l === void 0 ? 1 : l, h = n.resultEqualityCheck, y = bP(o), m = f === 1 ? yP(y) : xP(f, y);
|
||
function x() {
|
||
var b = m.get(arguments);
|
||
if (b === Ig) {
|
||
if (b = e.apply(null, arguments), h) {
|
||
var E = m.getEntries(), j = E.find(function(M) {
|
||
return h(M.value, b);
|
||
});
|
||
j && (b = j.value);
|
||
}
|
||
m.put(arguments, b);
|
||
}
|
||
return b;
|
||
}
|
||
return x.clearCache = function() {
|
||
return m.clear();
|
||
}, x;
|
||
}
|
||
function wP(e) {
|
||
var t = Array.isArray(e[0]) ? e[0] : e;
|
||
if (!t.every(function(i) {
|
||
return typeof i == "function";
|
||
})) {
|
||
var n = t.map(function(i) {
|
||
return typeof i == "function" ? "function " + (i.name || "unnamed") + "()" : typeof i;
|
||
}).join(", ");
|
||
throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + n + "]");
|
||
}
|
||
return t;
|
||
}
|
||
function EP(e) {
|
||
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
||
n[i - 1] = arguments[i];
|
||
var o = function() {
|
||
for (var f = arguments.length, h = new Array(f), y = 0; y < f; y++)
|
||
h[y] = arguments[y];
|
||
var m = 0, x, b = {
|
||
memoizeOptions: void 0
|
||
}, E = h.pop();
|
||
if (typeof E == "object" && (b = E, E = h.pop()), typeof E != "function")
|
||
throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof E + "]");
|
||
var j = b, M = j.memoizeOptions, R = M === void 0 ? n : M, k = Array.isArray(R) ? R : [R], A = wP(h), L = e.apply(void 0, [function() {
|
||
return m++, E.apply(null, arguments);
|
||
}].concat(k)), z = e(function() {
|
||
for (var _ = [], U = A.length, B = 0; B < U; B++)
|
||
_.push(A[B].apply(null, arguments));
|
||
return x = L.apply(null, _), x;
|
||
});
|
||
return Object.assign(z, {
|
||
resultFunc: E,
|
||
memoizedResultFunc: L,
|
||
dependencies: A,
|
||
lastResult: function() {
|
||
return x;
|
||
},
|
||
recomputations: function() {
|
||
return m;
|
||
},
|
||
resetRecomputations: function() {
|
||
return m = 0;
|
||
}
|
||
}), z;
|
||
};
|
||
return o;
|
||
}
|
||
var ct = /* @__PURE__ */ EP(CP);
|
||
function jP() {
|
||
return !!(typeof window < "u" && window.document && window.document.createElement);
|
||
}
|
||
var TP = /* @__PURE__ */ jP();
|
||
const U6 = 1 / 60 * 1e3, DP = typeof performance < "u" ? () => performance.now() : () => Date.now(), H6 = typeof window < "u" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(DP()), U6);
|
||
function MP(e) {
|
||
let t = [], n = [], i = 0, o = !1, l = !1;
|
||
const f = /* @__PURE__ */ new WeakSet(), h = {
|
||
schedule: (y, m = !1, x = !1) => {
|
||
const b = x && o, E = b ? t : n;
|
||
return m && f.add(y), E.indexOf(y) === -1 && (E.push(y), b && o && (i = t.length)), y;
|
||
},
|
||
cancel: (y) => {
|
||
const m = n.indexOf(y);
|
||
m !== -1 && n.splice(m, 1), f.delete(y);
|
||
},
|
||
process: (y) => {
|
||
if (o) {
|
||
l = !0;
|
||
return;
|
||
}
|
||
if (o = !0, [t, n] = [n, t], n.length = 0, i = t.length, i)
|
||
for (let m = 0; m < i; m++) {
|
||
const x = t[m];
|
||
x(y), f.has(x) && (h.schedule(x), e());
|
||
}
|
||
o = !1, l && (l = !1, h.process(y));
|
||
}
|
||
};
|
||
return h;
|
||
}
|
||
const RP = 40;
|
||
let px = !0, Sh = !1, hx = !1;
|
||
const sf = {
|
||
delta: 0,
|
||
timestamp: 0
|
||
}, Ih = [
|
||
"read",
|
||
"update",
|
||
"preRender",
|
||
"render",
|
||
"postRender"
|
||
], a0 = Ih.reduce((e, t) => (e[t] = MP(() => Sh = !0), e), {}), kP = Ih.reduce((e, t) => {
|
||
const n = a0[t];
|
||
return e[t] = (i, o = !1, l = !1) => (Sh || AP(), n.schedule(i, o, l)), e;
|
||
}, {}), PP = Ih.reduce((e, t) => (e[t] = a0[t].cancel, e), {});
|
||
Ih.reduce((e, t) => (e[t] = () => a0[t].process(sf), e), {});
|
||
const OP = (e) => a0[e].process(sf), V6 = (e) => {
|
||
Sh = !1, sf.delta = px ? U6 : Math.max(Math.min(e - sf.timestamp, RP), 1), sf.timestamp = e, hx = !0, Ih.forEach(OP), hx = !1, Sh && (px = !1, H6(V6));
|
||
}, AP = () => {
|
||
Sh = !0, px = !0, hx || H6(V6);
|
||
}, ow = () => sf;
|
||
function uS(e) {
|
||
const {
|
||
viewBox: t = "0 0 24 24",
|
||
d: n,
|
||
displayName: i,
|
||
defaultProps: o = {}
|
||
} = e, l = Kl.toArray(e.path), f = $e((h, y) => /* @__PURE__ */ c.jsx(Zr, { ref: y, viewBox: t, ...o, ...h, children: l.length ? l : /* @__PURE__ */ c.jsx("path", { fill: "currentColor", d: n }) }));
|
||
return f.displayName = i, f;
|
||
}
|
||
function Lh(e) {
|
||
const { theme: t } = DR(), n = pP();
|
||
return an(
|
||
() => hP(t.direction, {
|
||
...n,
|
||
...e
|
||
}),
|
||
[e, t.direction, n]
|
||
);
|
||
}
|
||
var NP = Object.defineProperty, zP = (e, t, n) => t in e ? NP(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, fr = (e, t, n) => (zP(e, typeof t != "symbol" ? t + "" : t, n), n);
|
||
function sw(e) {
|
||
return e.sort((t, n) => {
|
||
const i = t.compareDocumentPosition(n);
|
||
if (i & Node.DOCUMENT_POSITION_FOLLOWING || i & Node.DOCUMENT_POSITION_CONTAINED_BY)
|
||
return -1;
|
||
if (i & Node.DOCUMENT_POSITION_PRECEDING || i & Node.DOCUMENT_POSITION_CONTAINS)
|
||
return 1;
|
||
if (i & Node.DOCUMENT_POSITION_DISCONNECTED || i & Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)
|
||
throw Error("Cannot sort the given nodes.");
|
||
return 0;
|
||
});
|
||
}
|
||
var IP = (e) => typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
||
function lw(e, t, n) {
|
||
let i = e + 1;
|
||
return n && i >= t && (i = 0), i;
|
||
}
|
||
function uw(e, t, n) {
|
||
let i = e - 1;
|
||
return n && i < 0 && (i = t), i;
|
||
}
|
||
var vx = typeof window < "u" ? bo : rt, Lg = (e) => e, LP = class {
|
||
constructor() {
|
||
fr(this, "descendants", /* @__PURE__ */ new Map()), fr(this, "register", (e) => {
|
||
if (e != null)
|
||
return IP(e) ? this.registerNode(e) : (t) => {
|
||
this.registerNode(t, e);
|
||
};
|
||
}), fr(this, "unregister", (e) => {
|
||
this.descendants.delete(e);
|
||
const t = sw(Array.from(this.descendants.keys()));
|
||
this.assignIndex(t);
|
||
}), fr(this, "destroy", () => {
|
||
this.descendants.clear();
|
||
}), fr(this, "assignIndex", (e) => {
|
||
this.descendants.forEach((t) => {
|
||
const n = e.indexOf(t.node);
|
||
t.index = n, t.node.dataset.index = t.index.toString();
|
||
});
|
||
}), fr(this, "count", () => this.descendants.size), fr(this, "enabledCount", () => this.enabledValues().length), fr(this, "values", () => Array.from(this.descendants.values()).sort((t, n) => t.index - n.index)), fr(this, "enabledValues", () => this.values().filter((e) => !e.disabled)), fr(this, "item", (e) => {
|
||
if (this.count() !== 0)
|
||
return this.values()[e];
|
||
}), fr(this, "enabledItem", (e) => {
|
||
if (this.enabledCount() !== 0)
|
||
return this.enabledValues()[e];
|
||
}), fr(this, "first", () => this.item(0)), fr(this, "firstEnabled", () => this.enabledItem(0)), fr(this, "last", () => this.item(this.descendants.size - 1)), fr(this, "lastEnabled", () => {
|
||
const e = this.enabledValues().length - 1;
|
||
return this.enabledItem(e);
|
||
}), fr(this, "indexOf", (e) => {
|
||
var t, n;
|
||
return e && (n = (t = this.descendants.get(e)) == null ? void 0 : t.index) != null ? n : -1;
|
||
}), fr(this, "enabledIndexOf", (e) => e == null ? -1 : this.enabledValues().findIndex((t) => t.node.isSameNode(e))), fr(this, "next", (e, t = !0) => {
|
||
const n = lw(e, this.count(), t);
|
||
return this.item(n);
|
||
}), fr(this, "nextEnabled", (e, t = !0) => {
|
||
const n = this.item(e);
|
||
if (!n)
|
||
return;
|
||
const i = this.enabledIndexOf(n.node), o = lw(
|
||
i,
|
||
this.enabledCount(),
|
||
t
|
||
);
|
||
return this.enabledItem(o);
|
||
}), fr(this, "prev", (e, t = !0) => {
|
||
const n = uw(e, this.count() - 1, t);
|
||
return this.item(n);
|
||
}), fr(this, "prevEnabled", (e, t = !0) => {
|
||
const n = this.item(e);
|
||
if (!n)
|
||
return;
|
||
const i = this.enabledIndexOf(n.node), o = uw(
|
||
i,
|
||
this.enabledCount() - 1,
|
||
t
|
||
);
|
||
return this.enabledItem(o);
|
||
}), fr(this, "registerNode", (e, t) => {
|
||
if (!e || this.descendants.has(e))
|
||
return;
|
||
const n = Array.from(this.descendants.keys()).concat(e), i = sw(n);
|
||
t != null && t.disabled && (t.disabled = !!t.disabled);
|
||
const o = { node: e, index: -1, ...t };
|
||
this.descendants.set(e, o), this.assignIndex(i);
|
||
});
|
||
}
|
||
};
|
||
function FP(e, t) {
|
||
if (e != null) {
|
||
if (typeof e == "function") {
|
||
e(t);
|
||
return;
|
||
}
|
||
try {
|
||
e.current = t;
|
||
} catch {
|
||
throw new Error(`Cannot assign value '${t}' to ref '${e}'`);
|
||
}
|
||
}
|
||
}
|
||
function Rn(...e) {
|
||
return (t) => {
|
||
e.forEach((n) => {
|
||
FP(n, t);
|
||
});
|
||
};
|
||
}
|
||
function BP(...e) {
|
||
return an(() => Rn(...e), e);
|
||
}
|
||
function _P() {
|
||
const e = He(new LP());
|
||
return vx(() => () => e.current.destroy()), e.current;
|
||
}
|
||
var [UP, W6] = Qn({
|
||
name: "DescendantsProvider",
|
||
errorMessage: "useDescendantsContext must be used within DescendantsProvider"
|
||
});
|
||
function HP(e) {
|
||
const t = W6(), [n, i] = qe(-1), o = He(null);
|
||
vx(() => () => {
|
||
o.current && t.unregister(o.current);
|
||
}, []), vx(() => {
|
||
if (!o.current)
|
||
return;
|
||
const f = Number(o.current.dataset.index);
|
||
n != f && !Number.isNaN(f) && i(f);
|
||
});
|
||
const l = Lg(e ? t.register(e) : t.register);
|
||
return {
|
||
descendants: t,
|
||
index: n,
|
||
enabledIndex: t.enabledIndexOf(o.current),
|
||
register: Rn(l, o)
|
||
};
|
||
}
|
||
function cS() {
|
||
return [
|
||
Lg(UP),
|
||
() => Lg(W6()),
|
||
() => _P(),
|
||
(o) => HP(o)
|
||
];
|
||
}
|
||
var [VP, i0] = Qn({
|
||
name: "AccordionStylesContext",
|
||
hookName: "useAccordionStyles",
|
||
providerName: "<Accordion />"
|
||
}), [WP, dS] = Qn({
|
||
name: "AccordionItemContext",
|
||
hookName: "useAccordionItemContext",
|
||
providerName: "<AccordionItem />"
|
||
}), [
|
||
GP,
|
||
HJ,
|
||
qP,
|
||
YP
|
||
] = cS(), Kd = $e(
|
||
function(t, n) {
|
||
const { getButtonProps: i } = dS(), o = i(t, n), f = {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
width: "100%",
|
||
outline: 0,
|
||
...i0().button
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.button,
|
||
{
|
||
...o,
|
||
className: At("chakra-accordion__button", t.className),
|
||
__css: f
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Kd.displayName = "AccordionButton";
|
||
function fS(e) {
|
||
const {
|
||
value: t,
|
||
defaultValue: n,
|
||
onChange: i,
|
||
shouldUpdate: o = (E, j) => E !== j
|
||
} = e, l = kr(i), f = kr(o), [h, y] = qe(n), m = t !== void 0, x = m ? t : h, b = kr(
|
||
(E) => {
|
||
const M = typeof E == "function" ? E(x) : E;
|
||
f(x, M) && (m || y(M), l(M));
|
||
},
|
||
[m, l, x, f]
|
||
);
|
||
return [x, b];
|
||
}
|
||
function QP(e) {
|
||
const {
|
||
onChange: t,
|
||
defaultIndex: n,
|
||
index: i,
|
||
allowMultiple: o,
|
||
allowToggle: l,
|
||
...f
|
||
} = e;
|
||
ZP(e), JP(e);
|
||
const h = qP(), [y, m] = qe(-1);
|
||
rt(() => () => {
|
||
m(-1);
|
||
}, []);
|
||
const [x, b] = fS({
|
||
value: i,
|
||
defaultValue() {
|
||
return o ? n ?? [] : n ?? -1;
|
||
},
|
||
onChange: t
|
||
});
|
||
return {
|
||
index: x,
|
||
setIndex: b,
|
||
htmlProps: f,
|
||
getAccordionItemProps: (j) => {
|
||
let M = !1;
|
||
return j !== null && (M = Array.isArray(x) ? x.includes(j) : x === j), { isOpen: M, onChange: (k) => {
|
||
if (j !== null)
|
||
if (o && Array.isArray(x)) {
|
||
const A = k ? x.concat(j) : x.filter((L) => L !== j);
|
||
b(A);
|
||
} else
|
||
k ? b(j) : l && b(-1);
|
||
} };
|
||
},
|
||
focusedIndex: y,
|
||
setFocusedIndex: m,
|
||
descendants: h
|
||
};
|
||
}
|
||
var [XP, pS] = Qn({
|
||
name: "AccordionContext",
|
||
hookName: "useAccordionContext",
|
||
providerName: "Accordion"
|
||
});
|
||
function KP(e) {
|
||
const { isDisabled: t, isFocusable: n, id: i, ...o } = e, { getAccordionItemProps: l, setFocusedIndex: f } = pS(), h = He(null), y = bi(), m = i ?? y, x = `accordion-button-${m}`, b = `accordion-panel-${m}`;
|
||
$P(e);
|
||
const { register: E, index: j, descendants: M } = YP({
|
||
disabled: t && !n
|
||
}), { isOpen: R, onChange: k } = l(
|
||
j === -1 ? null : j
|
||
);
|
||
eO({ isOpen: R, isDisabled: t });
|
||
const A = () => {
|
||
k == null || k(!0);
|
||
}, L = () => {
|
||
k == null || k(!1);
|
||
}, z = Q(() => {
|
||
k == null || k(!R), f(j);
|
||
}, [j, f, R, k]), I = Q(
|
||
(q) => {
|
||
const G = {
|
||
ArrowDown: () => {
|
||
const H = M.nextEnabled(j);
|
||
H == null || H.node.focus();
|
||
},
|
||
ArrowUp: () => {
|
||
const H = M.prevEnabled(j);
|
||
H == null || H.node.focus();
|
||
},
|
||
Home: () => {
|
||
const H = M.firstEnabled();
|
||
H == null || H.node.focus();
|
||
},
|
||
End: () => {
|
||
const H = M.lastEnabled();
|
||
H == null || H.node.focus();
|
||
}
|
||
}[q.key];
|
||
G && (q.preventDefault(), G(q));
|
||
},
|
||
[M, j]
|
||
), _ = Q(() => {
|
||
f(j);
|
||
}, [f, j]), U = Q(
|
||
function(J = {}, G = null) {
|
||
return {
|
||
...J,
|
||
type: "button",
|
||
ref: Rn(E, h, G),
|
||
id: x,
|
||
disabled: !!t,
|
||
"aria-expanded": !!R,
|
||
"aria-controls": b,
|
||
onClick: St(J.onClick, z),
|
||
onFocus: St(J.onFocus, _),
|
||
onKeyDown: St(J.onKeyDown, I)
|
||
};
|
||
},
|
||
[
|
||
x,
|
||
t,
|
||
R,
|
||
z,
|
||
_,
|
||
I,
|
||
b,
|
||
E
|
||
]
|
||
), B = Q(
|
||
function(J = {}, G = null) {
|
||
return {
|
||
...J,
|
||
ref: G,
|
||
role: "region",
|
||
id: b,
|
||
"aria-labelledby": x,
|
||
hidden: !R
|
||
};
|
||
},
|
||
[x, R, b]
|
||
);
|
||
return {
|
||
isOpen: R,
|
||
isDisabled: t,
|
||
isFocusable: n,
|
||
onOpen: A,
|
||
onClose: L,
|
||
getButtonProps: U,
|
||
getPanelProps: B,
|
||
htmlProps: o
|
||
};
|
||
}
|
||
function ZP(e) {
|
||
const t = e.index || e.defaultIndex, n = t != null && !Array.isArray(t) && e.allowMultiple;
|
||
kh({
|
||
condition: !!n,
|
||
message: `If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`
|
||
});
|
||
}
|
||
function JP(e) {
|
||
kh({
|
||
condition: !!(e.allowMultiple && e.allowToggle),
|
||
message: "If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"
|
||
});
|
||
}
|
||
function $P(e) {
|
||
kh({
|
||
condition: !!(e.isFocusable && !e.isDisabled),
|
||
message: `Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.
|
||
`
|
||
});
|
||
}
|
||
function eO(e) {
|
||
kh({
|
||
condition: e.isOpen && !!e.isDisabled,
|
||
message: "Cannot open a disabled accordion item"
|
||
});
|
||
}
|
||
function Zd(e) {
|
||
const { isOpen: t, isDisabled: n } = dS(), { reduceMotion: i } = pS(), o = At("chakra-accordion__icon", e.className), l = i0(), f = {
|
||
opacity: n ? 0.4 : 1,
|
||
transform: t ? "rotate(-180deg)" : void 0,
|
||
transition: i ? void 0 : "transform 0.2s",
|
||
transformOrigin: "center",
|
||
...l.icon
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
viewBox: "0 0 24 24",
|
||
"aria-hidden": !0,
|
||
className: o,
|
||
__css: f,
|
||
...e,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
"path",
|
||
{
|
||
fill: "currentColor",
|
||
d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
Zd.displayName = "AccordionIcon";
|
||
var Jd = $e(
|
||
function(t, n) {
|
||
const { children: i, className: o } = t, { htmlProps: l, ...f } = KP(t), y = {
|
||
...i0().container,
|
||
overflowAnchor: "none"
|
||
}, m = an(() => f, [f]);
|
||
return /* @__PURE__ */ c.jsx(WP, { value: m, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: n,
|
||
...l,
|
||
className: At("chakra-accordion__item", o),
|
||
__css: y,
|
||
children: typeof i == "function" ? i({
|
||
isExpanded: !!f.isOpen,
|
||
isDisabled: !!f.isDisabled
|
||
}) : i
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
Jd.displayName = "AccordionItem";
|
||
var $d = {
|
||
ease: [0.25, 0.1, 0.25, 1],
|
||
easeIn: [0.4, 0, 1, 1],
|
||
easeOut: [0, 0, 0.2, 1],
|
||
easeInOut: [0.4, 0, 0.2, 1]
|
||
}, $u = {
|
||
enter: {
|
||
duration: 0.2,
|
||
ease: $d.easeOut
|
||
},
|
||
exit: {
|
||
duration: 0.1,
|
||
ease: $d.easeIn
|
||
}
|
||
}, Is = {
|
||
enter: (e, t) => ({
|
||
...e,
|
||
delay: typeof t == "number" ? t : t == null ? void 0 : t.enter
|
||
}),
|
||
exit: (e, t) => ({
|
||
...e,
|
||
delay: typeof t == "number" ? t : t == null ? void 0 : t.exit
|
||
})
|
||
}, tO = (e) => e != null && parseInt(e.toString(), 10) > 0, cw = {
|
||
exit: {
|
||
height: { duration: 0.2, ease: $d.ease },
|
||
opacity: { duration: 0.3, ease: $d.ease }
|
||
},
|
||
enter: {
|
||
height: { duration: 0.3, ease: $d.ease },
|
||
opacity: { duration: 0.4, ease: $d.ease }
|
||
}
|
||
}, nO = {
|
||
exit: ({
|
||
animateOpacity: e,
|
||
startingHeight: t,
|
||
transition: n,
|
||
transitionEnd: i,
|
||
delay: o
|
||
}) => {
|
||
var l;
|
||
return {
|
||
...e && { opacity: tO(t) ? 1 : 0 },
|
||
height: t,
|
||
transitionEnd: i == null ? void 0 : i.exit,
|
||
transition: (l = n == null ? void 0 : n.exit) != null ? l : Is.exit(cw.exit, o)
|
||
};
|
||
},
|
||
enter: ({
|
||
animateOpacity: e,
|
||
endingHeight: t,
|
||
transition: n,
|
||
transitionEnd: i,
|
||
delay: o
|
||
}) => {
|
||
var l;
|
||
return {
|
||
...e && { opacity: 1 },
|
||
height: t,
|
||
transitionEnd: i == null ? void 0 : i.enter,
|
||
transition: (l = n == null ? void 0 : n.enter) != null ? l : Is.enter(cw.enter, o)
|
||
};
|
||
}
|
||
}, G6 = dc(
|
||
(e, t) => {
|
||
const {
|
||
in: n,
|
||
unmountOnExit: i,
|
||
animateOpacity: o = !0,
|
||
startingHeight: l = 0,
|
||
endingHeight: f = "auto",
|
||
style: h,
|
||
className: y,
|
||
transition: m,
|
||
transitionEnd: x,
|
||
...b
|
||
} = e, [E, j] = qe(!1);
|
||
rt(() => {
|
||
const L = setTimeout(() => {
|
||
j(!0);
|
||
});
|
||
return () => clearTimeout(L);
|
||
}, []), kh({
|
||
condition: Boolean(l > 0 && i),
|
||
message: "startingHeight and unmountOnExit are mutually exclusive. You can't use them together"
|
||
});
|
||
const M = parseFloat(l.toString()) > 0, R = {
|
||
startingHeight: l,
|
||
endingHeight: f,
|
||
animateOpacity: o,
|
||
transition: E ? m : { enter: { duration: 0 } },
|
||
transitionEnd: {
|
||
enter: x == null ? void 0 : x.enter,
|
||
exit: i ? x == null ? void 0 : x.exit : {
|
||
...x == null ? void 0 : x.exit,
|
||
display: M ? "block" : "none"
|
||
}
|
||
}
|
||
}, k = i ? n : !0, A = n || i ? "enter" : "exit";
|
||
return /* @__PURE__ */ c.jsx(Sf, { initial: !1, custom: R, children: k && /* @__PURE__ */ c.jsx(
|
||
Ws.div,
|
||
{
|
||
ref: t,
|
||
...b,
|
||
className: At("chakra-collapse", y),
|
||
style: {
|
||
overflow: "hidden",
|
||
display: "block",
|
||
...h
|
||
},
|
||
custom: R,
|
||
variants: nO,
|
||
initial: i ? "exit" : !1,
|
||
animate: A,
|
||
exit: "exit"
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
G6.displayName = "Collapse";
|
||
var rO = {
|
||
enter: ({ transition: e, transitionEnd: t, delay: n } = {}) => {
|
||
var i;
|
||
return {
|
||
opacity: 1,
|
||
transition: (i = e == null ? void 0 : e.enter) != null ? i : Is.enter($u.enter, n),
|
||
transitionEnd: t == null ? void 0 : t.enter
|
||
};
|
||
},
|
||
exit: ({ transition: e, transitionEnd: t, delay: n } = {}) => {
|
||
var i;
|
||
return {
|
||
opacity: 0,
|
||
transition: (i = e == null ? void 0 : e.exit) != null ? i : Is.exit($u.exit, n),
|
||
transitionEnd: t == null ? void 0 : t.exit
|
||
};
|
||
}
|
||
}, q6 = {
|
||
initial: "exit",
|
||
animate: "enter",
|
||
exit: "exit",
|
||
variants: rO
|
||
}, aO = dc(function(t, n) {
|
||
const {
|
||
unmountOnExit: i,
|
||
in: o,
|
||
className: l,
|
||
transition: f,
|
||
transitionEnd: h,
|
||
delay: y,
|
||
...m
|
||
} = t, x = o || i ? "enter" : "exit", b = i ? o && i : !0, E = { transition: f, transitionEnd: h, delay: y };
|
||
return /* @__PURE__ */ c.jsx(Sf, { custom: E, children: b && /* @__PURE__ */ c.jsx(
|
||
Ws.div,
|
||
{
|
||
ref: n,
|
||
className: At("chakra-fade", l),
|
||
custom: E,
|
||
...q6,
|
||
animate: x,
|
||
...m
|
||
}
|
||
) });
|
||
});
|
||
aO.displayName = "Fade";
|
||
var iO = {
|
||
exit: ({ reverse: e, initialScale: t, transition: n, transitionEnd: i, delay: o }) => {
|
||
var l;
|
||
return {
|
||
opacity: 0,
|
||
...e ? { scale: t, transitionEnd: i == null ? void 0 : i.exit } : { transitionEnd: { scale: t, ...i == null ? void 0 : i.exit } },
|
||
transition: (l = n == null ? void 0 : n.exit) != null ? l : Is.exit($u.exit, o)
|
||
};
|
||
},
|
||
enter: ({ transitionEnd: e, transition: t, delay: n }) => {
|
||
var i;
|
||
return {
|
||
opacity: 1,
|
||
scale: 1,
|
||
transition: (i = t == null ? void 0 : t.enter) != null ? i : Is.enter($u.enter, n),
|
||
transitionEnd: e == null ? void 0 : e.enter
|
||
};
|
||
}
|
||
}, Y6 = {
|
||
initial: "exit",
|
||
animate: "enter",
|
||
exit: "exit",
|
||
variants: iO
|
||
}, oO = dc(
|
||
function(t, n) {
|
||
const {
|
||
unmountOnExit: i,
|
||
in: o,
|
||
reverse: l = !0,
|
||
initialScale: f = 0.95,
|
||
className: h,
|
||
transition: y,
|
||
transitionEnd: m,
|
||
delay: x,
|
||
...b
|
||
} = t, E = i ? o && i : !0, j = o || i ? "enter" : "exit", M = { initialScale: f, reverse: l, transition: y, transitionEnd: m, delay: x };
|
||
return /* @__PURE__ */ c.jsx(Sf, { custom: M, children: E && /* @__PURE__ */ c.jsx(
|
||
Ws.div,
|
||
{
|
||
ref: n,
|
||
className: At("chakra-offset-slide", h),
|
||
...Y6,
|
||
animate: j,
|
||
custom: M,
|
||
...b
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
oO.displayName = "ScaleFade";
|
||
var sO = {
|
||
initial: ({ offsetX: e, offsetY: t, transition: n, transitionEnd: i, delay: o }) => {
|
||
var l;
|
||
return {
|
||
opacity: 0,
|
||
x: e,
|
||
y: t,
|
||
transition: (l = n == null ? void 0 : n.exit) != null ? l : Is.exit($u.exit, o),
|
||
transitionEnd: i == null ? void 0 : i.exit
|
||
};
|
||
},
|
||
enter: ({ transition: e, transitionEnd: t, delay: n }) => {
|
||
var i;
|
||
return {
|
||
opacity: 1,
|
||
x: 0,
|
||
y: 0,
|
||
transition: (i = e == null ? void 0 : e.enter) != null ? i : Is.enter($u.enter, n),
|
||
transitionEnd: t == null ? void 0 : t.enter
|
||
};
|
||
},
|
||
exit: ({ offsetY: e, offsetX: t, transition: n, transitionEnd: i, reverse: o, delay: l }) => {
|
||
var f;
|
||
const h = { x: t, y: e };
|
||
return {
|
||
opacity: 0,
|
||
transition: (f = n == null ? void 0 : n.exit) != null ? f : Is.exit($u.exit, l),
|
||
...o ? { ...h, transitionEnd: i == null ? void 0 : i.exit } : { transitionEnd: { ...h, ...i == null ? void 0 : i.exit } }
|
||
};
|
||
}
|
||
}, mx = {
|
||
initial: "initial",
|
||
animate: "enter",
|
||
exit: "exit",
|
||
variants: sO
|
||
}, lO = dc(
|
||
function(t, n) {
|
||
const {
|
||
unmountOnExit: i,
|
||
in: o,
|
||
reverse: l = !0,
|
||
className: f,
|
||
offsetX: h = 0,
|
||
offsetY: y = 8,
|
||
transition: m,
|
||
transitionEnd: x,
|
||
delay: b,
|
||
...E
|
||
} = t, j = i ? o && i : !0, M = o || i ? "enter" : "exit", R = {
|
||
offsetX: h,
|
||
offsetY: y,
|
||
reverse: l,
|
||
transition: m,
|
||
transitionEnd: x,
|
||
delay: b
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Sf, { custom: R, children: j && /* @__PURE__ */ c.jsx(
|
||
Ws.div,
|
||
{
|
||
ref: n,
|
||
className: At("chakra-offset-slide", f),
|
||
custom: R,
|
||
...mx,
|
||
animate: M,
|
||
...E
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
lO.displayName = "SlideFade";
|
||
var ef = $e(
|
||
function(t, n) {
|
||
const { className: i, motionProps: o, ...l } = t, { reduceMotion: f } = pS(), { getPanelProps: h, isOpen: y } = dS(), m = h(l, n), x = At("chakra-accordion__panel", i), b = i0();
|
||
f || delete m.hidden;
|
||
const E = /* @__PURE__ */ c.jsx(Be.div, { ...m, __css: b.panel, className: x });
|
||
return f ? E : /* @__PURE__ */ c.jsx(G6, { in: y, ...o, children: E });
|
||
}
|
||
);
|
||
ef.displayName = "AccordionPanel";
|
||
var hS = $e(function({ children: t, reduceMotion: n, ...i }, o) {
|
||
const l = Da("Accordion", i), f = ar(i), { htmlProps: h, descendants: y, ...m } = QP(f), x = an(
|
||
() => ({ ...m, reduceMotion: !!n }),
|
||
[m, n]
|
||
);
|
||
return /* @__PURE__ */ c.jsx(GP, { value: y, children: /* @__PURE__ */ c.jsx(XP, { value: x, children: /* @__PURE__ */ c.jsx(VP, { value: l, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: o,
|
||
...h,
|
||
className: At("chakra-accordion", i.className),
|
||
__css: l.root,
|
||
children: t
|
||
}
|
||
) }) }) });
|
||
});
|
||
hS.displayName = "Accordion";
|
||
var gx = $e(function(t, n) {
|
||
const { htmlWidth: i, htmlHeight: o, alt: l, ...f } = t;
|
||
return /* @__PURE__ */ c.jsx("img", { width: i, height: o, ref: n, alt: l, ...f });
|
||
});
|
||
gx.displayName = "NativeImage";
|
||
function uO(e) {
|
||
const {
|
||
loading: t,
|
||
src: n,
|
||
srcSet: i,
|
||
onLoad: o,
|
||
onError: l,
|
||
crossOrigin: f,
|
||
sizes: h,
|
||
ignoreFallback: y
|
||
} = e, [m, x] = qe("pending");
|
||
rt(() => {
|
||
x(n ? "loading" : "pending");
|
||
}, [n]);
|
||
const b = He(), E = Q(() => {
|
||
if (!n)
|
||
return;
|
||
j();
|
||
const M = new Image();
|
||
M.src = n, f && (M.crossOrigin = f), i && (M.srcset = i), h && (M.sizes = h), t && (M.loading = t), M.onload = (R) => {
|
||
j(), x("loaded"), o == null || o(R);
|
||
}, M.onerror = (R) => {
|
||
j(), x("failed"), l == null || l(R);
|
||
}, b.current = M;
|
||
}, [n, f, i, h, o, l, t]), j = () => {
|
||
b.current && (b.current.onload = null, b.current.onerror = null, b.current = null);
|
||
};
|
||
return of(() => {
|
||
if (!y)
|
||
return m === "loading" && E(), () => {
|
||
j();
|
||
};
|
||
}, [m, E, y]), y ? "loaded" : m;
|
||
}
|
||
var cO = (e, t) => e !== "loaded" && t === "beforeLoadOrError" || e === "failed" && t === "onError";
|
||
function dO(e, t = []) {
|
||
const n = Object.assign({}, e);
|
||
for (const i of t)
|
||
i in n && delete n[i];
|
||
return n;
|
||
}
|
||
var Fh = $e(function(t, n) {
|
||
const {
|
||
fallbackSrc: i,
|
||
fallback: o,
|
||
src: l,
|
||
srcSet: f,
|
||
align: h,
|
||
fit: y,
|
||
loading: m,
|
||
ignoreFallback: x,
|
||
crossOrigin: b,
|
||
fallbackStrategy: E = "beforeLoadOrError",
|
||
referrerPolicy: j,
|
||
...M
|
||
} = t, R = i !== void 0 || o !== void 0, k = m != null || x || !R, A = uO({
|
||
...t,
|
||
ignoreFallback: k
|
||
}), L = cO(A, E), z = {
|
||
ref: n,
|
||
objectFit: y,
|
||
objectPosition: h,
|
||
...k ? M : dO(M, ["onError", "onLoad"])
|
||
};
|
||
return L ? o || /* @__PURE__ */ c.jsx(
|
||
Be.img,
|
||
{
|
||
as: gx,
|
||
className: "chakra-image__placeholder",
|
||
src: i,
|
||
...z
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Be.img,
|
||
{
|
||
as: gx,
|
||
src: l,
|
||
srcSet: f,
|
||
crossOrigin: b,
|
||
loading: m,
|
||
referrerPolicy: j,
|
||
className: "chakra-image",
|
||
...z
|
||
}
|
||
);
|
||
});
|
||
Fh.displayName = "Image";
|
||
function vS(e) {
|
||
return Kl.toArray(e).filter(
|
||
(t) => zh(t)
|
||
);
|
||
}
|
||
var [fO, pO] = Qn({
|
||
strict: !1,
|
||
name: "ButtonGroupContext"
|
||
}), hO = {
|
||
horizontal: {
|
||
"> *:first-of-type:not(:last-of-type)": { borderEndRadius: 0 },
|
||
"> *:not(:first-of-type):not(:last-of-type)": { borderRadius: 0 },
|
||
"> *:not(:first-of-type):last-of-type": { borderStartRadius: 0 }
|
||
},
|
||
vertical: {
|
||
"> *:first-of-type:not(:last-of-type)": { borderBottomRadius: 0 },
|
||
"> *:not(:first-of-type):not(:last-of-type)": { borderRadius: 0 },
|
||
"> *:not(:first-of-type):last-of-type": { borderTopRadius: 0 }
|
||
}
|
||
}, vO = {
|
||
horizontal: (e) => ({
|
||
"& > *:not(style) ~ *:not(style)": { marginStart: e }
|
||
}),
|
||
vertical: (e) => ({
|
||
"& > *:not(style) ~ *:not(style)": { marginTop: e }
|
||
})
|
||
}, Jr = $e(
|
||
function(t, n) {
|
||
const {
|
||
size: i,
|
||
colorScheme: o,
|
||
variant: l,
|
||
className: f,
|
||
spacing: h = "0.5rem",
|
||
isAttached: y,
|
||
isDisabled: m,
|
||
orientation: x = "horizontal",
|
||
...b
|
||
} = t, E = At("chakra-button__group", f), j = an(
|
||
() => ({ size: i, colorScheme: o, variant: l, isDisabled: m }),
|
||
[i, o, l, m]
|
||
);
|
||
let M = {
|
||
display: "inline-flex",
|
||
...y ? hO[x] : vO[x](h)
|
||
};
|
||
const R = x === "vertical";
|
||
return /* @__PURE__ */ c.jsx(fO, { value: j, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: n,
|
||
role: "group",
|
||
__css: M,
|
||
className: E,
|
||
"data-attached": y ? "" : void 0,
|
||
"data-orientation": x,
|
||
flexDir: R ? "column" : void 0,
|
||
...b
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
Jr.displayName = "ButtonGroup";
|
||
function mO(e) {
|
||
const [t, n] = qe(!e);
|
||
return { ref: Q((l) => {
|
||
l && n(l.tagName === "BUTTON");
|
||
}, []), type: t ? "button" : void 0 };
|
||
}
|
||
function yx(e) {
|
||
const { children: t, className: n, ...i } = e, o = zh(t) ? Ci(t, {
|
||
"aria-hidden": !0,
|
||
focusable: !1
|
||
}) : t, l = At("chakra-button__icon", n);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
display: "inline-flex",
|
||
alignSelf: "center",
|
||
flexShrink: 0,
|
||
...i,
|
||
className: l,
|
||
children: o
|
||
}
|
||
);
|
||
}
|
||
yx.displayName = "ButtonIcon";
|
||
function Fg(e) {
|
||
const {
|
||
label: t,
|
||
placement: n,
|
||
spacing: i = "0.5rem",
|
||
children: o = /* @__PURE__ */ c.jsx(rS, { color: "currentColor", width: "1em", height: "1em" }),
|
||
className: l,
|
||
__css: f,
|
||
...h
|
||
} = e, y = At("chakra-button__spinner", l), m = n === "start" ? "marginEnd" : "marginStart", x = an(
|
||
() => ({
|
||
display: "flex",
|
||
alignItems: "center",
|
||
position: t ? "relative" : "absolute",
|
||
[m]: t ? i : 0,
|
||
fontSize: "1em",
|
||
lineHeight: "normal",
|
||
...f
|
||
}),
|
||
[f, t, m, i]
|
||
);
|
||
return /* @__PURE__ */ c.jsx(Be.div, { className: y, ...h, __css: x, children: o });
|
||
}
|
||
Fg.displayName = "ButtonSpinner";
|
||
var pc = $e((e, t) => {
|
||
const n = pO(), i = Xl("Button", { ...n, ...e }), {
|
||
isDisabled: o = n == null ? void 0 : n.isDisabled,
|
||
isLoading: l,
|
||
isActive: f,
|
||
children: h,
|
||
leftIcon: y,
|
||
rightIcon: m,
|
||
loadingText: x,
|
||
iconSpacing: b = "0.5rem",
|
||
type: E,
|
||
spinner: j,
|
||
spinnerPlacement: M = "start",
|
||
className: R,
|
||
as: k,
|
||
...A
|
||
} = ar(e), L = an(() => {
|
||
const U = { ...i == null ? void 0 : i._focus, zIndex: 1 };
|
||
return {
|
||
display: "inline-flex",
|
||
appearance: "none",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
userSelect: "none",
|
||
position: "relative",
|
||
whiteSpace: "nowrap",
|
||
verticalAlign: "middle",
|
||
outline: "none",
|
||
...i,
|
||
...!!n && { _focus: U }
|
||
};
|
||
}, [i, n]), { ref: z, type: I } = mO(k), _ = { rightIcon: m, leftIcon: y, iconSpacing: b, children: h };
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.button,
|
||
{
|
||
ref: BP(t, z),
|
||
as: k,
|
||
type: E ?? I,
|
||
"data-active": Yt(f),
|
||
"data-loading": Yt(l),
|
||
__css: L,
|
||
className: At("chakra-button", R),
|
||
...A,
|
||
disabled: o || l,
|
||
children: [
|
||
l && M === "start" && /* @__PURE__ */ c.jsx(
|
||
Fg,
|
||
{
|
||
className: "chakra-button__spinner--start",
|
||
label: x,
|
||
placement: "start",
|
||
spacing: b,
|
||
children: j
|
||
}
|
||
),
|
||
l ? x || /* @__PURE__ */ c.jsx(Be.span, { opacity: 0, children: /* @__PURE__ */ c.jsx(dw, { ..._ }) }) : /* @__PURE__ */ c.jsx(dw, { ..._ }),
|
||
l && M === "end" && /* @__PURE__ */ c.jsx(
|
||
Fg,
|
||
{
|
||
className: "chakra-button__spinner--end",
|
||
label: x,
|
||
placement: "end",
|
||
spacing: b,
|
||
children: j
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
});
|
||
pc.displayName = "Button";
|
||
function dw(e) {
|
||
const { leftIcon: t, rightIcon: n, children: i, iconSpacing: o } = e;
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
t && /* @__PURE__ */ c.jsx(yx, { marginEnd: o, children: t }),
|
||
i,
|
||
n && /* @__PURE__ */ c.jsx(yx, { marginStart: o, children: n })
|
||
] });
|
||
}
|
||
var Wl = $e(
|
||
(e, t) => {
|
||
const { icon: n, children: i, isRound: o, "aria-label": l, ...f } = e, h = n || i, y = zh(h) ? Ci(h, {
|
||
"aria-hidden": !0,
|
||
focusable: !1
|
||
}) : null;
|
||
return /* @__PURE__ */ c.jsx(
|
||
pc,
|
||
{
|
||
padding: "0",
|
||
borderRadius: o ? "full" : void 0,
|
||
ref: t,
|
||
"aria-label": l,
|
||
...f,
|
||
children: y
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Wl.displayName = "IconButton";
|
||
var [VJ, gO] = Qn({
|
||
name: "CheckboxGroupContext",
|
||
strict: !1
|
||
});
|
||
function yO(e) {
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.svg,
|
||
{
|
||
width: "1.2em",
|
||
viewBox: "0 0 12 10",
|
||
style: {
|
||
fill: "none",
|
||
strokeWidth: 2,
|
||
stroke: "currentColor",
|
||
strokeDasharray: 16
|
||
},
|
||
...e,
|
||
children: /* @__PURE__ */ c.jsx("polyline", { points: "1.5 6 4.5 9 10.5 1" })
|
||
}
|
||
);
|
||
}
|
||
function xO(e) {
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.svg,
|
||
{
|
||
width: "1.2em",
|
||
viewBox: "0 0 24 24",
|
||
style: { stroke: "currentColor", strokeWidth: 4 },
|
||
...e,
|
||
children: /* @__PURE__ */ c.jsx("line", { x1: "21", x2: "3", y1: "12", y2: "12" })
|
||
}
|
||
);
|
||
}
|
||
function SO(e) {
|
||
const { isIndeterminate: t, isChecked: n, ...i } = e, o = t ? xO : yO;
|
||
return n || t ? /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
style: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
height: "100%"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(o, { ...i })
|
||
}
|
||
) : null;
|
||
}
|
||
var [bO, Q6] = Qn({
|
||
name: "FormControlStylesContext",
|
||
errorMessage: `useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `
|
||
}), [CO, hc] = Qn({
|
||
strict: !1,
|
||
name: "FormControlContext"
|
||
});
|
||
function wO(e) {
|
||
const {
|
||
id: t,
|
||
isRequired: n,
|
||
isInvalid: i,
|
||
isDisabled: o,
|
||
isReadOnly: l,
|
||
...f
|
||
} = e, h = bi(), y = t || `field-${h}`, m = `${y}-label`, x = `${y}-feedback`, b = `${y}-helptext`, [E, j] = qe(!1), [M, R] = qe(!1), [k, A] = qe(!1), L = Q(
|
||
(B = {}, q = null) => ({
|
||
id: b,
|
||
...B,
|
||
ref: Rn(q, (J) => {
|
||
J && R(!0);
|
||
})
|
||
}),
|
||
[b]
|
||
), z = Q(
|
||
(B = {}, q = null) => {
|
||
var J, G;
|
||
return {
|
||
...B,
|
||
ref: q,
|
||
"data-focus": Yt(k),
|
||
"data-disabled": Yt(o),
|
||
"data-invalid": Yt(i),
|
||
"data-readonly": Yt(l),
|
||
id: (J = B.id) != null ? J : m,
|
||
htmlFor: (G = B.htmlFor) != null ? G : y
|
||
};
|
||
},
|
||
[y, o, k, i, l, m]
|
||
), I = Q(
|
||
(B = {}, q = null) => ({
|
||
id: x,
|
||
...B,
|
||
ref: Rn(q, (J) => {
|
||
J && j(!0);
|
||
}),
|
||
"aria-live": "polite"
|
||
}),
|
||
[x]
|
||
), _ = Q(
|
||
(B = {}, q = null) => ({
|
||
...B,
|
||
...f,
|
||
ref: q,
|
||
role: "group"
|
||
}),
|
||
[f]
|
||
), U = Q(
|
||
(B = {}, q = null) => ({
|
||
...B,
|
||
ref: q,
|
||
role: "presentation",
|
||
"aria-hidden": !0,
|
||
children: B.children || "*"
|
||
}),
|
||
[]
|
||
);
|
||
return {
|
||
isRequired: !!n,
|
||
isInvalid: !!i,
|
||
isReadOnly: !!l,
|
||
isDisabled: !!o,
|
||
isFocused: !!k,
|
||
onFocus: () => A(!0),
|
||
onBlur: () => A(!1),
|
||
hasFeedbackText: E,
|
||
setHasFeedbackText: j,
|
||
hasHelpText: M,
|
||
setHasHelpText: R,
|
||
id: y,
|
||
labelId: m,
|
||
feedbackId: x,
|
||
helpTextId: b,
|
||
htmlProps: f,
|
||
getHelpTextProps: L,
|
||
getErrorMessageProps: I,
|
||
getRootProps: _,
|
||
getLabelProps: z,
|
||
getRequiredIndicatorProps: U
|
||
};
|
||
}
|
||
var vn = $e(
|
||
function(t, n) {
|
||
const i = Da("Form", t), o = ar(t), {
|
||
getRootProps: l,
|
||
htmlProps: f,
|
||
...h
|
||
} = wO(o), y = At("chakra-form-control", t.className);
|
||
return /* @__PURE__ */ c.jsx(CO, { value: h, children: /* @__PURE__ */ c.jsx(bO, { value: i, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...l({}, n),
|
||
className: y,
|
||
__css: i.container
|
||
}
|
||
) }) });
|
||
}
|
||
);
|
||
vn.displayName = "FormControl";
|
||
var Gn = $e(
|
||
function(t, n) {
|
||
const i = hc(), o = Q6(), l = At("chakra-form__helper-text", t.className);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...i == null ? void 0 : i.getHelpTextProps(t, n),
|
||
__css: o.helperText,
|
||
className: l
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Gn.displayName = "FormHelperText";
|
||
var [EO, jO] = Qn({
|
||
name: "FormErrorStylesContext",
|
||
errorMessage: `useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `
|
||
}), qn = $e(
|
||
(e, t) => {
|
||
const n = Da("FormError", e), i = ar(e), o = hc();
|
||
return o != null && o.isInvalid ? /* @__PURE__ */ c.jsx(EO, { value: n, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...o == null ? void 0 : o.getErrorMessageProps(i, t),
|
||
className: At("chakra-form__error-message", e.className),
|
||
__css: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
...n.text
|
||
}
|
||
}
|
||
) }) : null;
|
||
}
|
||
);
|
||
qn.displayName = "FormErrorMessage";
|
||
var TO = $e((e, t) => {
|
||
const n = jO(), i = hc();
|
||
if (!(i != null && i.isInvalid))
|
||
return null;
|
||
const o = At("chakra-form__error-icon", e.className);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
ref: t,
|
||
"aria-hidden": !0,
|
||
...e,
|
||
__css: n.icon,
|
||
className: o,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
"path",
|
||
{
|
||
fill: "currentColor",
|
||
d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"
|
||
}
|
||
)
|
||
}
|
||
);
|
||
});
|
||
TO.displayName = "FormErrorIcon";
|
||
var wn = $e(function(t, n) {
|
||
var i;
|
||
const o = Xl("FormLabel", t), l = ar(t), {
|
||
className: f,
|
||
children: h,
|
||
requiredIndicator: y = /* @__PURE__ */ c.jsx(X6, {}),
|
||
optionalIndicator: m = null,
|
||
...x
|
||
} = l, b = hc(), E = (i = b == null ? void 0 : b.getLabelProps(x, n)) != null ? i : { ref: n, ...x };
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.label,
|
||
{
|
||
...E,
|
||
className: At("chakra-form__label", l.className),
|
||
__css: {
|
||
display: "block",
|
||
textAlign: "start",
|
||
...o
|
||
},
|
||
children: [
|
||
h,
|
||
b != null && b.isRequired ? y : m
|
||
]
|
||
}
|
||
);
|
||
});
|
||
wn.displayName = "FormLabel";
|
||
var X6 = $e(
|
||
function(t, n) {
|
||
const i = hc(), o = Q6();
|
||
if (!(i != null && i.isRequired))
|
||
return null;
|
||
const l = At("chakra-form__required-indicator", t.className);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
...i == null ? void 0 : i.getRequiredIndicatorProps(t, n),
|
||
__css: o.requiredIndicator,
|
||
className: l
|
||
}
|
||
);
|
||
}
|
||
);
|
||
X6.displayName = "RequiredIndicator";
|
||
function mS(e) {
|
||
const { isDisabled: t, isInvalid: n, isReadOnly: i, isRequired: o, ...l } = gS(e);
|
||
return {
|
||
...l,
|
||
disabled: t,
|
||
readOnly: i,
|
||
required: o,
|
||
"aria-invalid": zs(n),
|
||
"aria-required": zs(o),
|
||
"aria-readonly": zs(i)
|
||
};
|
||
}
|
||
function gS(e) {
|
||
var t, n, i;
|
||
const o = hc(), {
|
||
id: l,
|
||
disabled: f,
|
||
readOnly: h,
|
||
required: y,
|
||
isRequired: m,
|
||
isInvalid: x,
|
||
isReadOnly: b,
|
||
isDisabled: E,
|
||
onFocus: j,
|
||
onBlur: M,
|
||
...R
|
||
} = e, k = e["aria-describedby"] ? [e["aria-describedby"]] : [];
|
||
return o != null && o.hasFeedbackText && (o != null && o.isInvalid) && k.push(o.feedbackId), o != null && o.hasHelpText && k.push(o.helpTextId), {
|
||
...R,
|
||
"aria-describedby": k.join(" ") || void 0,
|
||
id: l ?? (o == null ? void 0 : o.id),
|
||
isDisabled: (t = f ?? E) != null ? t : o == null ? void 0 : o.isDisabled,
|
||
isReadOnly: (n = h ?? b) != null ? n : o == null ? void 0 : o.isReadOnly,
|
||
isRequired: (i = y ?? m) != null ? i : o == null ? void 0 : o.isRequired,
|
||
isInvalid: x ?? (o == null ? void 0 : o.isInvalid),
|
||
onFocus: St(o == null ? void 0 : o.onFocus, j),
|
||
onBlur: St(o == null ? void 0 : o.onBlur, M)
|
||
};
|
||
}
|
||
var yS = {
|
||
border: "0",
|
||
clip: "rect(0, 0, 0, 0)",
|
||
height: "1px",
|
||
width: "1px",
|
||
margin: "-1px",
|
||
padding: "0",
|
||
overflow: "hidden",
|
||
whiteSpace: "nowrap",
|
||
position: "absolute"
|
||
}, K6 = Be("span", {
|
||
baseStyle: yS
|
||
});
|
||
K6.displayName = "VisuallyHidden";
|
||
var DO = Be("input", {
|
||
baseStyle: yS
|
||
});
|
||
DO.displayName = "VisuallyHiddenInput";
|
||
var fw = !1, Bh = null, ic = !1, xx = !1, Sx = /* @__PURE__ */ new Set();
|
||
function xS(e, t) {
|
||
Sx.forEach((n) => n(e, t));
|
||
}
|
||
var MO = typeof window < "u" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : !1;
|
||
function RO(e) {
|
||
return !(e.metaKey || !MO && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
||
}
|
||
function pw(e) {
|
||
ic = !0, RO(e) && (Bh = "keyboard", xS("keyboard", e));
|
||
}
|
||
function _d(e) {
|
||
if (Bh = "pointer", e.type === "mousedown" || e.type === "pointerdown") {
|
||
ic = !0;
|
||
const t = e.composedPath ? e.composedPath()[0] : e.target;
|
||
let n = !1;
|
||
try {
|
||
n = t.matches(":focus-visible");
|
||
} catch {
|
||
}
|
||
if (n)
|
||
return;
|
||
xS("pointer", e);
|
||
}
|
||
}
|
||
function kO(e) {
|
||
return e.mozInputSource === 0 && e.isTrusted ? !0 : e.detail === 0 && !e.pointerType;
|
||
}
|
||
function PO(e) {
|
||
kO(e) && (ic = !0, Bh = "virtual");
|
||
}
|
||
function OO(e) {
|
||
e.target === window || e.target === document || (!ic && !xx && (Bh = "virtual", xS("virtual", e)), ic = !1, xx = !1);
|
||
}
|
||
function AO() {
|
||
ic = !1, xx = !0;
|
||
}
|
||
function hw() {
|
||
return Bh !== "pointer";
|
||
}
|
||
function NO() {
|
||
if (typeof window > "u" || fw)
|
||
return;
|
||
const { focus: e } = HTMLElement.prototype;
|
||
HTMLElement.prototype.focus = function(...n) {
|
||
ic = !0, e.apply(this, n);
|
||
}, document.addEventListener("keydown", pw, !0), document.addEventListener("keyup", pw, !0), document.addEventListener("click", PO, !0), window.addEventListener("focus", OO, !0), window.addEventListener("blur", AO, !1), typeof PointerEvent < "u" ? (document.addEventListener("pointerdown", _d, !0), document.addEventListener("pointermove", _d, !0), document.addEventListener("pointerup", _d, !0)) : (document.addEventListener("mousedown", _d, !0), document.addEventListener("mousemove", _d, !0), document.addEventListener("mouseup", _d, !0)), fw = !0;
|
||
}
|
||
function Z6(e) {
|
||
NO(), e(hw());
|
||
const t = () => e(hw());
|
||
return Sx.add(t), () => {
|
||
Sx.delete(t);
|
||
};
|
||
}
|
||
function zO(e, t = []) {
|
||
const n = Object.assign({}, e);
|
||
for (const i of t)
|
||
i in n && delete n[i];
|
||
return n;
|
||
}
|
||
function J6(e = {}) {
|
||
const t = gS(e), {
|
||
isDisabled: n,
|
||
isReadOnly: i,
|
||
isRequired: o,
|
||
isInvalid: l,
|
||
id: f,
|
||
onBlur: h,
|
||
onFocus: y,
|
||
"aria-describedby": m
|
||
} = t, {
|
||
defaultChecked: x,
|
||
isChecked: b,
|
||
isFocusable: E,
|
||
onChange: j,
|
||
isIndeterminate: M,
|
||
name: R,
|
||
value: k,
|
||
tabIndex: A = void 0,
|
||
"aria-label": L,
|
||
"aria-labelledby": z,
|
||
"aria-invalid": I,
|
||
..._
|
||
} = e, U = zO(_, [
|
||
"isDisabled",
|
||
"isReadOnly",
|
||
"isRequired",
|
||
"isInvalid",
|
||
"id",
|
||
"onBlur",
|
||
"onFocus",
|
||
"aria-describedby"
|
||
]), B = kr(j), q = kr(h), J = kr(y), [G, H] = qe(!1), [le, ae] = qe(!1), [he, Te] = qe(!1), [xe, $] = qe(!1);
|
||
rt(() => Z6(H), []);
|
||
const Y = He(null), [te, V] = qe(!0), [ne, we] = qe(!!x), Ee = b !== void 0, se = Ee ? b : ne, ve = Q(
|
||
(Xe) => {
|
||
if (i || n) {
|
||
Xe.preventDefault();
|
||
return;
|
||
}
|
||
Ee || we(se ? Xe.target.checked : M ? !0 : Xe.target.checked), B == null || B(Xe);
|
||
},
|
||
[
|
||
i,
|
||
n,
|
||
se,
|
||
Ee,
|
||
M,
|
||
B
|
||
]
|
||
);
|
||
of(() => {
|
||
Y.current && (Y.current.indeterminate = Boolean(M));
|
||
}, [M]), fc(() => {
|
||
n && ae(!1);
|
||
}, [n, ae]), of(() => {
|
||
const Xe = Y.current;
|
||
Xe != null && Xe.form && (Xe.form.onreset = () => {
|
||
we(!!x);
|
||
});
|
||
}, []);
|
||
const Ce = n && !E, Ae = Q(
|
||
(Xe) => {
|
||
Xe.key === " " && $(!0);
|
||
},
|
||
[$]
|
||
), Ve = Q(
|
||
(Xe) => {
|
||
Xe.key === " " && $(!1);
|
||
},
|
||
[$]
|
||
);
|
||
of(() => {
|
||
if (!Y.current)
|
||
return;
|
||
Y.current.checked !== se && we(Y.current.checked);
|
||
}, [Y.current]);
|
||
const tt = Q(
|
||
(Xe = {}, ht = null) => {
|
||
const Ht = (Ot) => {
|
||
le && Ot.preventDefault(), $(!0);
|
||
};
|
||
return {
|
||
...Xe,
|
||
ref: ht,
|
||
"data-active": Yt(xe),
|
||
"data-hover": Yt(he),
|
||
"data-checked": Yt(se),
|
||
"data-focus": Yt(le),
|
||
"data-focus-visible": Yt(le && G),
|
||
"data-indeterminate": Yt(M),
|
||
"data-disabled": Yt(n),
|
||
"data-invalid": Yt(l),
|
||
"data-readonly": Yt(i),
|
||
"aria-hidden": !0,
|
||
onMouseDown: St(Xe.onMouseDown, Ht),
|
||
onMouseUp: St(Xe.onMouseUp, () => $(!1)),
|
||
onMouseEnter: St(
|
||
Xe.onMouseEnter,
|
||
() => Te(!0)
|
||
),
|
||
onMouseLeave: St(
|
||
Xe.onMouseLeave,
|
||
() => Te(!1)
|
||
)
|
||
};
|
||
},
|
||
[
|
||
xe,
|
||
se,
|
||
n,
|
||
le,
|
||
G,
|
||
he,
|
||
M,
|
||
l,
|
||
i
|
||
]
|
||
), at = Q(
|
||
(Xe = {}, ht = null) => ({
|
||
...U,
|
||
...Xe,
|
||
ref: Rn(ht, (Ht) => {
|
||
Ht && V(Ht.tagName === "LABEL");
|
||
}),
|
||
onClick: St(Xe.onClick, () => {
|
||
var Ht;
|
||
te || ((Ht = Y.current) == null || Ht.click(), requestAnimationFrame(() => {
|
||
var Ot;
|
||
(Ot = Y.current) == null || Ot.focus();
|
||
}));
|
||
}),
|
||
"data-disabled": Yt(n),
|
||
"data-checked": Yt(se),
|
||
"data-invalid": Yt(l)
|
||
}),
|
||
[U, n, se, l, te]
|
||
), ze = Q(
|
||
(Xe = {}, ht = null) => ({
|
||
...Xe,
|
||
ref: Rn(Y, ht),
|
||
type: "checkbox",
|
||
name: R,
|
||
value: k,
|
||
id: f,
|
||
tabIndex: A,
|
||
onChange: St(Xe.onChange, ve),
|
||
onBlur: St(
|
||
Xe.onBlur,
|
||
q,
|
||
() => ae(!1)
|
||
),
|
||
onFocus: St(
|
||
Xe.onFocus,
|
||
J,
|
||
() => ae(!0)
|
||
),
|
||
onKeyDown: St(Xe.onKeyDown, Ae),
|
||
onKeyUp: St(Xe.onKeyUp, Ve),
|
||
required: o,
|
||
checked: se,
|
||
disabled: Ce,
|
||
readOnly: i,
|
||
"aria-label": L,
|
||
"aria-labelledby": z,
|
||
"aria-invalid": I ? Boolean(I) : l,
|
||
"aria-describedby": m,
|
||
"aria-disabled": n,
|
||
style: yS
|
||
}),
|
||
[
|
||
R,
|
||
k,
|
||
f,
|
||
ve,
|
||
q,
|
||
J,
|
||
Ae,
|
||
Ve,
|
||
o,
|
||
se,
|
||
Ce,
|
||
i,
|
||
L,
|
||
z,
|
||
I,
|
||
l,
|
||
m,
|
||
n,
|
||
A
|
||
]
|
||
), Qe = Q(
|
||
(Xe = {}, ht = null) => ({
|
||
...Xe,
|
||
ref: ht,
|
||
onMouseDown: St(Xe.onMouseDown, vw),
|
||
onTouchStart: St(Xe.onTouchStart, vw),
|
||
"data-disabled": Yt(n),
|
||
"data-checked": Yt(se),
|
||
"data-invalid": Yt(l)
|
||
}),
|
||
[se, n, l]
|
||
);
|
||
return {
|
||
state: {
|
||
isInvalid: l,
|
||
isFocused: le,
|
||
isChecked: se,
|
||
isActive: xe,
|
||
isHovered: he,
|
||
isIndeterminate: M,
|
||
isDisabled: n,
|
||
isReadOnly: i,
|
||
isRequired: o
|
||
},
|
||
getRootProps: at,
|
||
getCheckboxProps: tt,
|
||
getInputProps: ze,
|
||
getLabelProps: Qe,
|
||
htmlProps: U
|
||
};
|
||
}
|
||
function vw(e) {
|
||
e.preventDefault(), e.stopPropagation();
|
||
}
|
||
var IO = {
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
verticalAlign: "top",
|
||
userSelect: "none",
|
||
flexShrink: 0
|
||
}, LO = {
|
||
cursor: "pointer",
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
verticalAlign: "top",
|
||
position: "relative"
|
||
}, FO = uc({
|
||
from: {
|
||
opacity: 0,
|
||
strokeDashoffset: 16,
|
||
transform: "scale(0.95)"
|
||
},
|
||
to: {
|
||
opacity: 1,
|
||
strokeDashoffset: 0,
|
||
transform: "scale(1)"
|
||
}
|
||
}), BO = uc({
|
||
from: {
|
||
opacity: 0
|
||
},
|
||
to: {
|
||
opacity: 1
|
||
}
|
||
}), _O = uc({
|
||
from: {
|
||
transform: "scaleX(0.65)"
|
||
},
|
||
to: {
|
||
transform: "scaleX(1)"
|
||
}
|
||
}), $6 = $e(function(t, n) {
|
||
const i = gO(), o = { ...i, ...t }, l = Da("Checkbox", o), f = ar(t), {
|
||
spacing: h = "0.5rem",
|
||
className: y,
|
||
children: m,
|
||
iconColor: x,
|
||
iconSize: b,
|
||
icon: E = /* @__PURE__ */ c.jsx(SO, {}),
|
||
isChecked: j,
|
||
isDisabled: M = i == null ? void 0 : i.isDisabled,
|
||
onChange: R,
|
||
inputProps: k,
|
||
...A
|
||
} = f;
|
||
let L = j;
|
||
i != null && i.value && f.value && (L = i.value.includes(f.value));
|
||
let z = R;
|
||
i != null && i.onChange && f.value && (z = e0(i.onChange, R));
|
||
const {
|
||
state: I,
|
||
getInputProps: _,
|
||
getCheckboxProps: U,
|
||
getLabelProps: B,
|
||
getRootProps: q
|
||
} = J6({
|
||
...A,
|
||
isDisabled: M,
|
||
isChecked: L,
|
||
onChange: z
|
||
}), J = an(
|
||
() => ({
|
||
animation: I.isIndeterminate ? `${BO} 20ms linear, ${_O} 200ms linear` : `${FO} 200ms linear`,
|
||
fontSize: b,
|
||
color: x,
|
||
...l.icon
|
||
}),
|
||
[x, b, , I.isIndeterminate, l.icon]
|
||
), G = Ci(E, {
|
||
__css: J,
|
||
isIndeterminate: I.isIndeterminate,
|
||
isChecked: I.isChecked
|
||
});
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.label,
|
||
{
|
||
__css: { ...LO, ...l.container },
|
||
className: At("chakra-checkbox", y),
|
||
...q(),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
"input",
|
||
{
|
||
className: "chakra-checkbox__input",
|
||
..._(k, n)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
__css: { ...IO, ...l.control },
|
||
className: "chakra-checkbox__control",
|
||
...U(),
|
||
children: G
|
||
}
|
||
),
|
||
m && /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
className: "chakra-checkbox__label",
|
||
...B(),
|
||
__css: {
|
||
marginStart: h,
|
||
...l.label
|
||
},
|
||
children: m
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
});
|
||
$6.displayName = "Checkbox";
|
||
function UO(e) {
|
||
const t = parseFloat(e);
|
||
return typeof t != "number" || Number.isNaN(t) ? 0 : t;
|
||
}
|
||
function SS(e, t) {
|
||
let n = UO(e);
|
||
const i = 10 ** (t ?? 10);
|
||
return n = Math.round(n * i) / i, t ? n.toFixed(t) : n.toString();
|
||
}
|
||
function bx(e) {
|
||
if (!Number.isFinite(e))
|
||
return 0;
|
||
let t = 1, n = 0;
|
||
for (; Math.round(e * t) / t !== e; )
|
||
t *= 10, n += 1;
|
||
return n;
|
||
}
|
||
function mw(e, t, n) {
|
||
return (e - t) * 100 / (n - t);
|
||
}
|
||
function HO(e, t, n) {
|
||
return (n - t) * e + t;
|
||
}
|
||
function gw(e, t, n) {
|
||
const i = Math.round((e - t) / n) * n + t, o = bx(n);
|
||
return SS(i, o);
|
||
}
|
||
function Tg(e, t, n) {
|
||
return e == null ? e : (n < t && console.warn("clamp: max cannot be less than min"), Math.min(Math.max(e, t), n));
|
||
}
|
||
function VO(e = {}) {
|
||
const {
|
||
onChange: t,
|
||
precision: n,
|
||
defaultValue: i,
|
||
value: o,
|
||
step: l = 1,
|
||
min: f = Number.MIN_SAFE_INTEGER,
|
||
max: h = Number.MAX_SAFE_INTEGER,
|
||
keepWithinRange: y = !0
|
||
} = e, m = kr(t), [x, b] = qe(() => {
|
||
var G;
|
||
return i == null ? "" : (G = h2(i, l, n)) != null ? G : "";
|
||
}), E = typeof o < "u", j = E ? o : x, M = ej(Ll(j), l), R = n ?? M, k = Q(
|
||
(G) => {
|
||
G !== j && (E || b(G.toString()), m == null || m(G.toString(), Ll(G)));
|
||
},
|
||
[m, E, j]
|
||
), A = Q(
|
||
(G) => {
|
||
let H = G;
|
||
return y && (H = Tg(H, f, h)), SS(H, R);
|
||
},
|
||
[R, y, h, f]
|
||
), L = Q(
|
||
(G = l) => {
|
||
let H;
|
||
j === "" ? H = Ll(G) : H = Ll(j) + G, H = A(H), k(H);
|
||
},
|
||
[A, l, k, j]
|
||
), z = Q(
|
||
(G = l) => {
|
||
let H;
|
||
j === "" ? H = Ll(-G) : H = Ll(j) - G, H = A(H), k(H);
|
||
},
|
||
[A, l, k, j]
|
||
), I = Q(() => {
|
||
var G;
|
||
let H;
|
||
i == null ? H = "" : H = (G = h2(i, l, n)) != null ? G : f, k(H);
|
||
}, [i, n, l, k, f]), _ = Q(
|
||
(G) => {
|
||
var H;
|
||
const le = (H = h2(G, l, R)) != null ? H : f;
|
||
k(le);
|
||
},
|
||
[R, l, k, f]
|
||
), U = Ll(j);
|
||
return {
|
||
isOutOfRange: U > h || U < f,
|
||
isAtMax: U === h,
|
||
isAtMin: U === f,
|
||
precision: R,
|
||
value: j,
|
||
valueAsNumber: U,
|
||
update: k,
|
||
reset: I,
|
||
increment: L,
|
||
decrement: z,
|
||
clamp: A,
|
||
cast: _,
|
||
setValue: b
|
||
};
|
||
}
|
||
function Ll(e) {
|
||
return parseFloat(e.toString().replace(/[^\w.-]+/g, ""));
|
||
}
|
||
function ej(e, t) {
|
||
return Math.max(bx(t), bx(e));
|
||
}
|
||
function h2(e, t, n) {
|
||
const i = Ll(e);
|
||
if (Number.isNaN(i))
|
||
return;
|
||
const o = ej(i, t);
|
||
return SS(i, n ?? o);
|
||
}
|
||
function ec(e, t, n, i) {
|
||
const o = kr(n);
|
||
return rt(() => {
|
||
const l = typeof e == "function" ? e() : e ?? document;
|
||
if (!(!n || !l))
|
||
return l.addEventListener(t, o, i), () => {
|
||
l.removeEventListener(t, o, i);
|
||
};
|
||
}, [t, e, i, o, n]), () => {
|
||
const l = typeof e == "function" ? e() : e ?? document;
|
||
l == null || l.removeEventListener(t, o, i);
|
||
};
|
||
}
|
||
function WO(e) {
|
||
return "current" in e;
|
||
}
|
||
var tj = () => typeof window < "u";
|
||
function GO() {
|
||
var e;
|
||
const t = navigator.userAgentData;
|
||
return (e = t == null ? void 0 : t.platform) != null ? e : navigator.platform;
|
||
}
|
||
var qO = (e) => tj() && e.test(navigator.vendor), YO = (e) => tj() && e.test(GO()), QO = () => YO(/mac|iphone|ipad|ipod/i), XO = () => QO() && qO(/apple/i);
|
||
function KO(e) {
|
||
const { ref: t, elements: n, enabled: i } = e, o = () => {
|
||
var l, f;
|
||
return (f = (l = t.current) == null ? void 0 : l.ownerDocument) != null ? f : document;
|
||
};
|
||
ec(o, "pointerdown", (l) => {
|
||
if (!XO() || !i)
|
||
return;
|
||
const f = l.target, y = (n ?? [t]).some((m) => {
|
||
const x = WO(m) ? m.current : m;
|
||
return (x == null ? void 0 : x.contains(f)) || x === f;
|
||
});
|
||
o().activeElement !== f && y && (l.preventDefault(), f.focus());
|
||
});
|
||
}
|
||
var Oe = {}, yw = {
|
||
get exports() {
|
||
return Oe;
|
||
},
|
||
set exports(e) {
|
||
Oe = e;
|
||
}
|
||
};
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/
|
||
var v2, xw;
|
||
function ZO() {
|
||
if (xw)
|
||
return v2;
|
||
xw = 1;
|
||
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
||
function i(l) {
|
||
if (l == null)
|
||
throw new TypeError("Object.assign cannot be called with null or undefined");
|
||
return Object(l);
|
||
}
|
||
function o() {
|
||
try {
|
||
if (!Object.assign)
|
||
return !1;
|
||
var l = new String("abc");
|
||
if (l[5] = "de", Object.getOwnPropertyNames(l)[0] === "5")
|
||
return !1;
|
||
for (var f = {}, h = 0; h < 10; h++)
|
||
f["_" + String.fromCharCode(h)] = h;
|
||
var y = Object.getOwnPropertyNames(f).map(function(x) {
|
||
return f[x];
|
||
});
|
||
if (y.join("") !== "0123456789")
|
||
return !1;
|
||
var m = {};
|
||
return "abcdefghijklmnopqrst".split("").forEach(function(x) {
|
||
m[x] = x;
|
||
}), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
|
||
} catch {
|
||
return !1;
|
||
}
|
||
}
|
||
return v2 = o() ? Object.assign : function(l, f) {
|
||
for (var h, y = i(l), m, x = 1; x < arguments.length; x++) {
|
||
h = Object(arguments[x]);
|
||
for (var b in h)
|
||
t.call(h, b) && (y[b] = h[b]);
|
||
if (e) {
|
||
m = e(h);
|
||
for (var E = 0; E < m.length; E++)
|
||
n.call(h, m[E]) && (y[m[E]] = h[m[E]]);
|
||
}
|
||
}
|
||
return y;
|
||
}, v2;
|
||
}
|
||
var m2, Sw;
|
||
function bS() {
|
||
if (Sw)
|
||
return m2;
|
||
Sw = 1;
|
||
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
||
return m2 = e, m2;
|
||
}
|
||
var g2, bw;
|
||
function nj() {
|
||
return bw || (bw = 1, g2 = Function.call.bind(Object.prototype.hasOwnProperty)), g2;
|
||
}
|
||
var y2, Cw;
|
||
function JO() {
|
||
if (Cw)
|
||
return y2;
|
||
Cw = 1;
|
||
var e = function() {
|
||
};
|
||
if (process.env.NODE_ENV !== "production") {
|
||
var t = bS(), n = {}, i = nj();
|
||
e = function(l) {
|
||
var f = "Warning: " + l;
|
||
typeof console < "u" && console.error(f);
|
||
try {
|
||
throw new Error(f);
|
||
} catch {
|
||
}
|
||
};
|
||
}
|
||
function o(l, f, h, y, m) {
|
||
if (process.env.NODE_ENV !== "production") {
|
||
for (var x in l)
|
||
if (i(l, x)) {
|
||
var b;
|
||
try {
|
||
if (typeof l[x] != "function") {
|
||
var E = Error(
|
||
(y || "React class") + ": " + h + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
||
);
|
||
throw E.name = "Invariant Violation", E;
|
||
}
|
||
b = l[x](f, x, y, h, null, t);
|
||
} catch (M) {
|
||
b = M;
|
||
}
|
||
if (b && !(b instanceof Error) && e(
|
||
(y || "React class") + ": type specification of " + h + " `" + x + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof b + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
||
), b instanceof Error && !(b.message in n)) {
|
||
n[b.message] = !0;
|
||
var j = m ? m() : "";
|
||
e(
|
||
"Failed " + h + " type: " + b.message + (j ?? "")
|
||
);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return o.resetWarningCache = function() {
|
||
process.env.NODE_ENV !== "production" && (n = {});
|
||
}, y2 = o, y2;
|
||
}
|
||
var x2, ww;
|
||
function $O() {
|
||
if (ww)
|
||
return x2;
|
||
ww = 1;
|
||
var e = Y5, t = ZO(), n = bS(), i = nj(), o = JO(), l = function() {
|
||
};
|
||
process.env.NODE_ENV !== "production" && (l = function(h) {
|
||
var y = "Warning: " + h;
|
||
typeof console < "u" && console.error(y);
|
||
try {
|
||
throw new Error(y);
|
||
} catch {
|
||
}
|
||
});
|
||
function f() {
|
||
return null;
|
||
}
|
||
return x2 = function(h, y) {
|
||
var m = typeof Symbol == "function" && Symbol.iterator, x = "@@iterator";
|
||
function b(V) {
|
||
var ne = V && (m && V[m] || V[x]);
|
||
if (typeof ne == "function")
|
||
return ne;
|
||
}
|
||
var E = "<<anonymous>>", j = {
|
||
array: A("array"),
|
||
bigint: A("bigint"),
|
||
bool: A("boolean"),
|
||
func: A("function"),
|
||
number: A("number"),
|
||
object: A("object"),
|
||
string: A("string"),
|
||
symbol: A("symbol"),
|
||
any: L(),
|
||
arrayOf: z,
|
||
element: I(),
|
||
elementType: _(),
|
||
instanceOf: U,
|
||
node: G(),
|
||
objectOf: q,
|
||
oneOf: B,
|
||
oneOfType: J,
|
||
shape: le,
|
||
exact: ae
|
||
};
|
||
function M(V, ne) {
|
||
return V === ne ? V !== 0 || 1 / V === 1 / ne : V !== V && ne !== ne;
|
||
}
|
||
function R(V, ne) {
|
||
this.message = V, this.data = ne && typeof ne == "object" ? ne : {}, this.stack = "";
|
||
}
|
||
R.prototype = Error.prototype;
|
||
function k(V) {
|
||
if (process.env.NODE_ENV !== "production")
|
||
var ne = {}, we = 0;
|
||
function Ee(ve, Ce, Ae, Ve, tt, at, ze) {
|
||
if (Ve = Ve || E, at = at || Ae, ze !== n) {
|
||
if (y) {
|
||
var Qe = new Error(
|
||
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
||
);
|
||
throw Qe.name = "Invariant Violation", Qe;
|
||
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
||
var Et = Ve + ":" + Ae;
|
||
!ne[Et] && // Avoid spamming the console because they are often not actionable except for lib authors
|
||
we < 3 && (l(
|
||
"You are manually calling a React.PropTypes validation function for the `" + at + "` prop on `" + Ve + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
||
), ne[Et] = !0, we++);
|
||
}
|
||
}
|
||
return Ce[Ae] == null ? ve ? Ce[Ae] === null ? new R("The " + tt + " `" + at + "` is marked as required " + ("in `" + Ve + "`, but its value is `null`.")) : new R("The " + tt + " `" + at + "` is marked as required in " + ("`" + Ve + "`, but its value is `undefined`.")) : null : V(Ce, Ae, Ve, tt, at);
|
||
}
|
||
var se = Ee.bind(null, !1);
|
||
return se.isRequired = Ee.bind(null, !0), se;
|
||
}
|
||
function A(V) {
|
||
function ne(we, Ee, se, ve, Ce, Ae) {
|
||
var Ve = we[Ee], tt = xe(Ve);
|
||
if (tt !== V) {
|
||
var at = $(Ve);
|
||
return new R(
|
||
"Invalid " + ve + " `" + Ce + "` of type " + ("`" + at + "` supplied to `" + se + "`, expected ") + ("`" + V + "`."),
|
||
{ expectedType: V }
|
||
);
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function L() {
|
||
return k(f);
|
||
}
|
||
function z(V) {
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
if (typeof V != "function")
|
||
return new R("Property `" + Ce + "` of component `" + se + "` has invalid PropType notation inside arrayOf.");
|
||
var Ae = we[Ee];
|
||
if (!Array.isArray(Ae)) {
|
||
var Ve = xe(Ae);
|
||
return new R("Invalid " + ve + " `" + Ce + "` of type " + ("`" + Ve + "` supplied to `" + se + "`, expected an array."));
|
||
}
|
||
for (var tt = 0; tt < Ae.length; tt++) {
|
||
var at = V(Ae, tt, se, ve, Ce + "[" + tt + "]", n);
|
||
if (at instanceof Error)
|
||
return at;
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function I() {
|
||
function V(ne, we, Ee, se, ve) {
|
||
var Ce = ne[we];
|
||
if (!h(Ce)) {
|
||
var Ae = xe(Ce);
|
||
return new R("Invalid " + se + " `" + ve + "` of type " + ("`" + Ae + "` supplied to `" + Ee + "`, expected a single ReactElement."));
|
||
}
|
||
return null;
|
||
}
|
||
return k(V);
|
||
}
|
||
function _() {
|
||
function V(ne, we, Ee, se, ve) {
|
||
var Ce = ne[we];
|
||
if (!e.isValidElementType(Ce)) {
|
||
var Ae = xe(Ce);
|
||
return new R("Invalid " + se + " `" + ve + "` of type " + ("`" + Ae + "` supplied to `" + Ee + "`, expected a single ReactElement type."));
|
||
}
|
||
return null;
|
||
}
|
||
return k(V);
|
||
}
|
||
function U(V) {
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
if (!(we[Ee] instanceof V)) {
|
||
var Ae = V.name || E, Ve = te(we[Ee]);
|
||
return new R("Invalid " + ve + " `" + Ce + "` of type " + ("`" + Ve + "` supplied to `" + se + "`, expected ") + ("instance of `" + Ae + "`."));
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function B(V) {
|
||
if (!Array.isArray(V))
|
||
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
|
||
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
||
) : l("Invalid argument supplied to oneOf, expected an array.")), f;
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
for (var Ae = we[Ee], Ve = 0; Ve < V.length; Ve++)
|
||
if (M(Ae, V[Ve]))
|
||
return null;
|
||
var tt = JSON.stringify(V, function(ze, Qe) {
|
||
var Et = $(Qe);
|
||
return Et === "symbol" ? String(Qe) : Qe;
|
||
});
|
||
return new R("Invalid " + ve + " `" + Ce + "` of value `" + String(Ae) + "` " + ("supplied to `" + se + "`, expected one of " + tt + "."));
|
||
}
|
||
return k(ne);
|
||
}
|
||
function q(V) {
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
if (typeof V != "function")
|
||
return new R("Property `" + Ce + "` of component `" + se + "` has invalid PropType notation inside objectOf.");
|
||
var Ae = we[Ee], Ve = xe(Ae);
|
||
if (Ve !== "object")
|
||
return new R("Invalid " + ve + " `" + Ce + "` of type " + ("`" + Ve + "` supplied to `" + se + "`, expected an object."));
|
||
for (var tt in Ae)
|
||
if (i(Ae, tt)) {
|
||
var at = V(Ae, tt, se, ve, Ce + "." + tt, n);
|
||
if (at instanceof Error)
|
||
return at;
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function J(V) {
|
||
if (!Array.isArray(V))
|
||
return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), f;
|
||
for (var ne = 0; ne < V.length; ne++) {
|
||
var we = V[ne];
|
||
if (typeof we != "function")
|
||
return l(
|
||
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Y(we) + " at index " + ne + "."
|
||
), f;
|
||
}
|
||
function Ee(se, ve, Ce, Ae, Ve) {
|
||
for (var tt = [], at = 0; at < V.length; at++) {
|
||
var ze = V[at], Qe = ze(se, ve, Ce, Ae, Ve, n);
|
||
if (Qe == null)
|
||
return null;
|
||
Qe.data && i(Qe.data, "expectedType") && tt.push(Qe.data.expectedType);
|
||
}
|
||
var Et = tt.length > 0 ? ", expected one of type [" + tt.join(", ") + "]" : "";
|
||
return new R("Invalid " + Ae + " `" + Ve + "` supplied to " + ("`" + Ce + "`" + Et + "."));
|
||
}
|
||
return k(Ee);
|
||
}
|
||
function G() {
|
||
function V(ne, we, Ee, se, ve) {
|
||
return he(ne[we]) ? null : new R("Invalid " + se + " `" + ve + "` supplied to " + ("`" + Ee + "`, expected a ReactNode."));
|
||
}
|
||
return k(V);
|
||
}
|
||
function H(V, ne, we, Ee, se) {
|
||
return new R(
|
||
(V || "React class") + ": " + ne + " type `" + we + "." + Ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + se + "`."
|
||
);
|
||
}
|
||
function le(V) {
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
var Ae = we[Ee], Ve = xe(Ae);
|
||
if (Ve !== "object")
|
||
return new R("Invalid " + ve + " `" + Ce + "` of type `" + Ve + "` " + ("supplied to `" + se + "`, expected `object`."));
|
||
for (var tt in V) {
|
||
var at = V[tt];
|
||
if (typeof at != "function")
|
||
return H(se, ve, Ce, tt, $(at));
|
||
var ze = at(Ae, tt, se, ve, Ce + "." + tt, n);
|
||
if (ze)
|
||
return ze;
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function ae(V) {
|
||
function ne(we, Ee, se, ve, Ce) {
|
||
var Ae = we[Ee], Ve = xe(Ae);
|
||
if (Ve !== "object")
|
||
return new R("Invalid " + ve + " `" + Ce + "` of type `" + Ve + "` " + ("supplied to `" + se + "`, expected `object`."));
|
||
var tt = t({}, we[Ee], V);
|
||
for (var at in tt) {
|
||
var ze = V[at];
|
||
if (i(V, at) && typeof ze != "function")
|
||
return H(se, ve, Ce, at, $(ze));
|
||
if (!ze)
|
||
return new R(
|
||
"Invalid " + ve + " `" + Ce + "` key `" + at + "` supplied to `" + se + "`.\nBad object: " + JSON.stringify(we[Ee], null, " ") + `
|
||
Valid keys: ` + JSON.stringify(Object.keys(V), null, " ")
|
||
);
|
||
var Qe = ze(Ae, at, se, ve, Ce + "." + at, n);
|
||
if (Qe)
|
||
return Qe;
|
||
}
|
||
return null;
|
||
}
|
||
return k(ne);
|
||
}
|
||
function he(V) {
|
||
switch (typeof V) {
|
||
case "number":
|
||
case "string":
|
||
case "undefined":
|
||
return !0;
|
||
case "boolean":
|
||
return !V;
|
||
case "object":
|
||
if (Array.isArray(V))
|
||
return V.every(he);
|
||
if (V === null || h(V))
|
||
return !0;
|
||
var ne = b(V);
|
||
if (ne) {
|
||
var we = ne.call(V), Ee;
|
||
if (ne !== V.entries) {
|
||
for (; !(Ee = we.next()).done; )
|
||
if (!he(Ee.value))
|
||
return !1;
|
||
} else
|
||
for (; !(Ee = we.next()).done; ) {
|
||
var se = Ee.value;
|
||
if (se && !he(se[1]))
|
||
return !1;
|
||
}
|
||
} else
|
||
return !1;
|
||
return !0;
|
||
default:
|
||
return !1;
|
||
}
|
||
}
|
||
function Te(V, ne) {
|
||
return V === "symbol" ? !0 : ne ? ne["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && ne instanceof Symbol : !1;
|
||
}
|
||
function xe(V) {
|
||
var ne = typeof V;
|
||
return Array.isArray(V) ? "array" : V instanceof RegExp ? "object" : Te(ne, V) ? "symbol" : ne;
|
||
}
|
||
function $(V) {
|
||
if (typeof V > "u" || V === null)
|
||
return "" + V;
|
||
var ne = xe(V);
|
||
if (ne === "object") {
|
||
if (V instanceof Date)
|
||
return "date";
|
||
if (V instanceof RegExp)
|
||
return "regexp";
|
||
}
|
||
return ne;
|
||
}
|
||
function Y(V) {
|
||
var ne = $(V);
|
||
switch (ne) {
|
||
case "array":
|
||
case "object":
|
||
return "an " + ne;
|
||
case "boolean":
|
||
case "date":
|
||
case "regexp":
|
||
return "a " + ne;
|
||
default:
|
||
return ne;
|
||
}
|
||
}
|
||
function te(V) {
|
||
return !V.constructor || !V.constructor.name ? E : V.constructor.name;
|
||
}
|
||
return j.checkPropTypes = o, j.resetWarningCache = o.resetWarningCache, j.PropTypes = j, j;
|
||
}, x2;
|
||
}
|
||
var S2, Ew;
|
||
function eA() {
|
||
if (Ew)
|
||
return S2;
|
||
Ew = 1;
|
||
var e = bS();
|
||
function t() {
|
||
}
|
||
function n() {
|
||
}
|
||
return n.resetWarningCache = t, S2 = function() {
|
||
function i(f, h, y, m, x, b) {
|
||
if (b !== e) {
|
||
var E = new Error(
|
||
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
||
);
|
||
throw E.name = "Invariant Violation", E;
|
||
}
|
||
}
|
||
i.isRequired = i;
|
||
function o() {
|
||
return i;
|
||
}
|
||
var l = {
|
||
array: i,
|
||
bigint: i,
|
||
bool: i,
|
||
func: i,
|
||
number: i,
|
||
object: i,
|
||
string: i,
|
||
symbol: i,
|
||
any: i,
|
||
arrayOf: o,
|
||
element: i,
|
||
elementType: i,
|
||
instanceOf: o,
|
||
node: i,
|
||
objectOf: o,
|
||
oneOf: o,
|
||
oneOfType: o,
|
||
shape: o,
|
||
exact: o,
|
||
checkPropTypes: n,
|
||
resetWarningCache: t
|
||
};
|
||
return l.PropTypes = l, l;
|
||
}, S2;
|
||
}
|
||
if (process.env.NODE_ENV !== "production") {
|
||
var tA = Y5, nA = !0;
|
||
yw.exports = $O()(tA.isElement, nA);
|
||
} else
|
||
yw.exports = eA()();
|
||
var Cx = "data-focus-lock", rj = "data-focus-lock-disabled", rA = "data-no-focus-lock", aA = "data-autofocus-inside", iA = "data-no-autofocus";
|
||
function oA(e, t) {
|
||
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
||
}
|
||
function sA(e, t) {
|
||
var n = qe(function() {
|
||
return {
|
||
// value
|
||
value: e,
|
||
// last callback
|
||
callback: t,
|
||
// "memoized" public interface
|
||
facade: {
|
||
get current() {
|
||
return n.value;
|
||
},
|
||
set current(i) {
|
||
var o = n.value;
|
||
o !== i && (n.value = i, n.callback(i, o));
|
||
}
|
||
}
|
||
};
|
||
})[0];
|
||
return n.callback = t, n.facade;
|
||
}
|
||
function aj(e, t) {
|
||
return sA(t || null, function(n) {
|
||
return e.forEach(function(i) {
|
||
return oA(i, n);
|
||
});
|
||
});
|
||
}
|
||
var b2 = {
|
||
width: "1px",
|
||
height: "0px",
|
||
padding: 0,
|
||
overflow: "hidden",
|
||
position: "fixed",
|
||
top: "1px",
|
||
left: "1px"
|
||
};
|
||
process.env.NODE_ENV !== "production" && Oe.node;
|
||
var Jo = function() {
|
||
return Jo = Object.assign || function(t) {
|
||
for (var n, i = 1, o = arguments.length; i < o; i++) {
|
||
n = arguments[i];
|
||
for (var l in n)
|
||
Object.prototype.hasOwnProperty.call(n, l) && (t[l] = n[l]);
|
||
}
|
||
return t;
|
||
}, Jo.apply(this, arguments);
|
||
};
|
||
function ij(e, t) {
|
||
var n = {};
|
||
for (var i in e)
|
||
Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
||
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
||
for (var o = 0, i = Object.getOwnPropertySymbols(e); o < i.length; o++)
|
||
t.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[o]) && (n[i[o]] = e[i[o]]);
|
||
return n;
|
||
}
|
||
function bf(e, t, n, i) {
|
||
function o(l) {
|
||
return l instanceof n ? l : new n(function(f) {
|
||
f(l);
|
||
});
|
||
}
|
||
return new (n || (n = Promise))(function(l, f) {
|
||
function h(x) {
|
||
try {
|
||
m(i.next(x));
|
||
} catch (b) {
|
||
f(b);
|
||
}
|
||
}
|
||
function y(x) {
|
||
try {
|
||
m(i.throw(x));
|
||
} catch (b) {
|
||
f(b);
|
||
}
|
||
}
|
||
function m(x) {
|
||
x.done ? l(x.value) : o(x.value).then(h, y);
|
||
}
|
||
m((i = i.apply(e, t || [])).next());
|
||
});
|
||
}
|
||
function Cf(e, t) {
|
||
var n = { label: 0, sent: function() {
|
||
if (l[0] & 1)
|
||
throw l[1];
|
||
return l[1];
|
||
}, trys: [], ops: [] }, i, o, l, f;
|
||
return f = { next: h(0), throw: h(1), return: h(2) }, typeof Symbol == "function" && (f[Symbol.iterator] = function() {
|
||
return this;
|
||
}), f;
|
||
function h(m) {
|
||
return function(x) {
|
||
return y([m, x]);
|
||
};
|
||
}
|
||
function y(m) {
|
||
if (i)
|
||
throw new TypeError("Generator is already executing.");
|
||
for (; f && (f = 0, m[0] && (n = 0)), n; )
|
||
try {
|
||
if (i = 1, o && (l = m[0] & 2 ? o.return : m[0] ? o.throw || ((l = o.return) && l.call(o), 0) : o.next) && !(l = l.call(o, m[1])).done)
|
||
return l;
|
||
switch (o = 0, l && (m = [m[0] & 2, l.value]), m[0]) {
|
||
case 0:
|
||
case 1:
|
||
l = m;
|
||
break;
|
||
case 4:
|
||
return n.label++, { value: m[1], done: !1 };
|
||
case 5:
|
||
n.label++, o = m[1], m = [0];
|
||
continue;
|
||
case 7:
|
||
m = n.ops.pop(), n.trys.pop();
|
||
continue;
|
||
default:
|
||
if (l = n.trys, !(l = l.length > 0 && l[l.length - 1]) && (m[0] === 6 || m[0] === 2)) {
|
||
n = 0;
|
||
continue;
|
||
}
|
||
if (m[0] === 3 && (!l || m[1] > l[0] && m[1] < l[3])) {
|
||
n.label = m[1];
|
||
break;
|
||
}
|
||
if (m[0] === 6 && n.label < l[1]) {
|
||
n.label = l[1], l = m;
|
||
break;
|
||
}
|
||
if (l && n.label < l[2]) {
|
||
n.label = l[2], n.ops.push(m);
|
||
break;
|
||
}
|
||
l[2] && n.ops.pop(), n.trys.pop();
|
||
continue;
|
||
}
|
||
m = t.call(e, n);
|
||
} catch (x) {
|
||
m = [6, x], o = 0;
|
||
} finally {
|
||
i = l = 0;
|
||
}
|
||
if (m[0] & 5)
|
||
throw m[1];
|
||
return { value: m[0] ? m[1] : void 0, done: !0 };
|
||
}
|
||
}
|
||
function jw(e, t) {
|
||
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
||
if (!n)
|
||
return e;
|
||
var i = n.call(e), o, l = [], f;
|
||
try {
|
||
for (; (t === void 0 || t-- > 0) && !(o = i.next()).done; )
|
||
l.push(o.value);
|
||
} catch (h) {
|
||
f = { error: h };
|
||
} finally {
|
||
try {
|
||
o && !o.done && (n = i.return) && n.call(i);
|
||
} finally {
|
||
if (f)
|
||
throw f.error;
|
||
}
|
||
}
|
||
return l;
|
||
}
|
||
function wx(e, t, n) {
|
||
if (n || arguments.length === 2)
|
||
for (var i = 0, o = t.length, l; i < o; i++)
|
||
(l || !(i in t)) && (l || (l = Array.prototype.slice.call(t, 0, i)), l[i] = t[i]);
|
||
return e.concat(l || Array.prototype.slice.call(t));
|
||
}
|
||
function oj(e) {
|
||
return e;
|
||
}
|
||
function sj(e, t) {
|
||
t === void 0 && (t = oj);
|
||
var n = [], i = !1, o = {
|
||
read: function() {
|
||
if (i)
|
||
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(l) {
|
||
var f = t(l, i);
|
||
return n.push(f), function() {
|
||
n = n.filter(function(h) {
|
||
return h !== f;
|
||
});
|
||
};
|
||
},
|
||
assignSyncMedium: function(l) {
|
||
for (i = !0; n.length; ) {
|
||
var f = n;
|
||
n = [], f.forEach(l);
|
||
}
|
||
n = {
|
||
push: function(h) {
|
||
return l(h);
|
||
},
|
||
filter: function() {
|
||
return n;
|
||
}
|
||
};
|
||
},
|
||
assignMedium: function(l) {
|
||
i = !0;
|
||
var f = [];
|
||
if (n.length) {
|
||
var h = n;
|
||
n = [], h.forEach(l), f = n;
|
||
}
|
||
var y = function() {
|
||
var x = f;
|
||
f = [], x.forEach(l);
|
||
}, m = function() {
|
||
return Promise.resolve().then(y);
|
||
};
|
||
m(), n = {
|
||
push: function(x) {
|
||
f.push(x), m();
|
||
},
|
||
filter: function(x) {
|
||
return f = f.filter(x), n;
|
||
}
|
||
};
|
||
}
|
||
};
|
||
return o;
|
||
}
|
||
function CS(e, t) {
|
||
return t === void 0 && (t = oj), sj(e, t);
|
||
}
|
||
function lj(e) {
|
||
e === void 0 && (e = {});
|
||
var t = sj(null);
|
||
return t.options = Jo({ async: !0, ssr: !1 }, e), t;
|
||
}
|
||
var uj = function(e) {
|
||
var t = e.sideCar, n = ij(e, ["sideCar"]);
|
||
if (!t)
|
||
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
||
var i = t.read();
|
||
if (!i)
|
||
throw new Error("Sidecar medium not found");
|
||
return Je.createElement(i, Jo({}, n));
|
||
};
|
||
uj.isSideCarExport = !0;
|
||
function lA(e, t) {
|
||
return e.useMedium(t), uj;
|
||
}
|
||
var cj = CS({}, function(e) {
|
||
var t = e.target, n = e.currentTarget;
|
||
return {
|
||
target: t,
|
||
currentTarget: n
|
||
};
|
||
}), dj = CS(), uA = CS(), cA = lj({
|
||
async: !0
|
||
// focus-lock sidecar is not required on the server
|
||
// however, it might be required for JSDOM tests
|
||
// ssr: true,
|
||
}), dA = [], wS = /* @__PURE__ */ Je.forwardRef(function(t, n) {
|
||
var i, o = Je.useState(), l = o[0], f = o[1], h = Je.useRef(), y = Je.useRef(!1), m = Je.useRef(null), x = t.children, b = t.disabled, E = t.noFocusGuards, j = t.persistentFocus, M = t.crossFrame, R = t.autoFocus, k = t.allowTextSelection, A = t.group, L = t.className, z = t.whiteList, I = t.hasPositiveIndices, _ = t.shards, U = _ === void 0 ? dA : _, B = t.as, q = B === void 0 ? "div" : B, J = t.lockProps, G = J === void 0 ? {} : J, H = t.sideCar, le = t.returnFocus, ae = t.focusOptions, he = t.onActivation, Te = t.onDeactivation, xe = Je.useState({}), $ = xe[0], Y = Je.useCallback(function() {
|
||
m.current = m.current || document && document.activeElement, h.current && he && he(h.current), y.current = !0;
|
||
}, [he]), te = Je.useCallback(function() {
|
||
y.current = !1, Te && Te(h.current);
|
||
}, [Te]);
|
||
rt(function() {
|
||
b || (m.current = null);
|
||
}, []);
|
||
var V = Je.useCallback(function(Ve) {
|
||
var tt = m.current;
|
||
if (tt && tt.focus) {
|
||
var at = typeof le == "function" ? le(tt) : le;
|
||
if (at) {
|
||
var ze = typeof at == "object" ? at : void 0;
|
||
m.current = null, Ve ? Promise.resolve().then(function() {
|
||
return tt.focus(ze);
|
||
}) : tt.focus(ze);
|
||
}
|
||
}
|
||
}, [le]), ne = Je.useCallback(function(Ve) {
|
||
y.current && cj.useMedium(Ve);
|
||
}, []), we = dj.useMedium, Ee = Je.useCallback(function(Ve) {
|
||
h.current !== Ve && (h.current = Ve, f(Ve));
|
||
}, []);
|
||
process.env.NODE_ENV !== "production" && (typeof k < "u" && console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"), Je.useEffect(function() {
|
||
!h.current && typeof q != "string" && console.error("FocusLock: could not obtain ref to internal node");
|
||
}, []));
|
||
var se = yh((i = {}, i[rj] = b && "disabled", i[Cx] = A, i), G), ve = E !== !0, Ce = ve && E !== "tail", Ae = aj([n, Ee]);
|
||
return /* @__PURE__ */ Je.createElement(Je.Fragment, null, ve && [
|
||
// nearest focus guard
|
||
/* @__PURE__ */ Je.createElement("div", {
|
||
key: "guard-first",
|
||
"data-focus-guard": !0,
|
||
tabIndex: b ? -1 : 0,
|
||
style: b2
|
||
}),
|
||
// first tabbed element guard
|
||
I ? /* @__PURE__ */ Je.createElement("div", {
|
||
key: "guard-nearest",
|
||
"data-focus-guard": !0,
|
||
tabIndex: b ? -1 : 1,
|
||
style: b2
|
||
}) : null
|
||
], !b && /* @__PURE__ */ Je.createElement(H, {
|
||
id: $,
|
||
sideCar: cA,
|
||
observed: l,
|
||
disabled: b,
|
||
persistentFocus: j,
|
||
crossFrame: M,
|
||
autoFocus: R,
|
||
whiteList: z,
|
||
shards: U,
|
||
onActivation: Y,
|
||
onDeactivation: te,
|
||
returnFocus: V,
|
||
focusOptions: ae
|
||
}), /* @__PURE__ */ Je.createElement(q, yh({
|
||
ref: Ae
|
||
}, se, {
|
||
className: L,
|
||
onBlur: we,
|
||
onFocus: ne
|
||
}), x), Ce && /* @__PURE__ */ Je.createElement("div", {
|
||
"data-focus-guard": !0,
|
||
tabIndex: b ? -1 : 0,
|
||
style: b2
|
||
}));
|
||
});
|
||
wS.propTypes = process.env.NODE_ENV !== "production" ? {
|
||
children: Oe.node,
|
||
disabled: Oe.bool,
|
||
returnFocus: Oe.oneOfType([Oe.bool, Oe.object, Oe.func]),
|
||
focusOptions: Oe.object,
|
||
noFocusGuards: Oe.bool,
|
||
hasPositiveIndices: Oe.bool,
|
||
allowTextSelection: Oe.bool,
|
||
autoFocus: Oe.bool,
|
||
persistentFocus: Oe.bool,
|
||
crossFrame: Oe.bool,
|
||
group: Oe.string,
|
||
className: Oe.string,
|
||
whiteList: Oe.func,
|
||
shards: Oe.arrayOf(Oe.any),
|
||
as: Oe.oneOfType([Oe.string, Oe.func, Oe.object]),
|
||
lockProps: Oe.object,
|
||
onActivation: Oe.func,
|
||
onDeactivation: Oe.func,
|
||
sideCar: Oe.any.isRequired
|
||
} : {};
|
||
wS.defaultProps = {
|
||
children: void 0,
|
||
disabled: !1,
|
||
returnFocus: !1,
|
||
focusOptions: void 0,
|
||
noFocusGuards: !1,
|
||
autoFocus: !0,
|
||
persistentFocus: !1,
|
||
crossFrame: !0,
|
||
hasPositiveIndices: void 0,
|
||
allowTextSelection: void 0,
|
||
group: void 0,
|
||
className: void 0,
|
||
whiteList: void 0,
|
||
shards: void 0,
|
||
as: "div",
|
||
lockProps: {},
|
||
onActivation: void 0,
|
||
onDeactivation: void 0
|
||
};
|
||
const fj = wS;
|
||
function ES(e, t) {
|
||
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, MR(e, t);
|
||
}
|
||
function fA(e, t) {
|
||
if (process.env.NODE_ENV !== "production") {
|
||
if (typeof e != "function")
|
||
throw new Error("Expected reducePropsToState to be a function.");
|
||
if (typeof t != "function")
|
||
throw new Error("Expected handleStateChangeOnClient to be a function.");
|
||
}
|
||
function n(i) {
|
||
return i.displayName || i.name || "Component";
|
||
}
|
||
return function(o) {
|
||
if (process.env.NODE_ENV !== "production" && typeof o != "function")
|
||
throw new Error("Expected WrappedComponent to be a React component.");
|
||
var l = [], f;
|
||
function h() {
|
||
f = e(l.map(function(m) {
|
||
return m.props;
|
||
})), t(f);
|
||
}
|
||
var y = /* @__PURE__ */ function(m) {
|
||
ES(x, m);
|
||
function x() {
|
||
return m.apply(this, arguments) || this;
|
||
}
|
||
x.peek = function() {
|
||
return f;
|
||
};
|
||
var b = x.prototype;
|
||
return b.componentDidMount = function() {
|
||
l.push(this), h();
|
||
}, b.componentDidUpdate = function() {
|
||
h();
|
||
}, b.componentWillUnmount = function() {
|
||
var j = l.indexOf(this);
|
||
l.splice(j, 1), h();
|
||
}, b.render = function() {
|
||
return /* @__PURE__ */ pt.createElement(o, this.props);
|
||
}, x;
|
||
}(cP);
|
||
return RR(y, "displayName", "SideEffect(" + n(o) + ")"), y;
|
||
};
|
||
}
|
||
var as = function(e) {
|
||
for (var t = Array(e.length), n = 0; n < e.length; ++n)
|
||
t[n] = e[n];
|
||
return t;
|
||
}, Bg = function(e) {
|
||
return Array.isArray(e) ? e : [e];
|
||
}, pj = function(e) {
|
||
return Array.isArray(e) ? e[0] : e;
|
||
}, pA = function(e) {
|
||
if (e.nodeType !== Node.ELEMENT_NODE)
|
||
return !1;
|
||
var t = window.getComputedStyle(e, null);
|
||
return !t || !t.getPropertyValue ? !1 : t.getPropertyValue("display") === "none" || t.getPropertyValue("visibility") === "hidden";
|
||
}, hj = function(e) {
|
||
return e.parentNode && e.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? (
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||
e.parentNode.host
|
||
) : e.parentNode;
|
||
}, vj = function(e) {
|
||
return e === document || e && e.nodeType === Node.DOCUMENT_NODE;
|
||
}, hA = function(e, t) {
|
||
return !e || vj(e) || !pA(e) && t(hj(e));
|
||
}, mj = function(e, t) {
|
||
var n = e.get(t);
|
||
if (n !== void 0)
|
||
return n;
|
||
var i = hA(t, mj.bind(void 0, e));
|
||
return e.set(t, i), i;
|
||
}, vA = function(e, t) {
|
||
return e && !vj(e) ? yA(e) ? t(hj(e)) : !1 : !0;
|
||
}, gj = function(e, t) {
|
||
var n = e.get(t);
|
||
if (n !== void 0)
|
||
return n;
|
||
var i = vA(t, gj.bind(void 0, e));
|
||
return e.set(t, i), i;
|
||
}, yj = function(e) {
|
||
return e.dataset;
|
||
}, mA = function(e) {
|
||
return e.tagName === "BUTTON";
|
||
}, xj = function(e) {
|
||
return e.tagName === "INPUT";
|
||
}, Sj = function(e) {
|
||
return xj(e) && e.type === "radio";
|
||
}, gA = function(e) {
|
||
return !((xj(e) || mA(e)) && (e.type === "hidden" || e.disabled));
|
||
}, yA = function(e) {
|
||
var t = e.getAttribute(iA);
|
||
return ![!0, "true", ""].includes(t);
|
||
}, jS = function(e) {
|
||
var t;
|
||
return Boolean(e && ((t = yj(e)) === null || t === void 0 ? void 0 : t.focusGuard));
|
||
}, _g = function(e) {
|
||
return !jS(e);
|
||
}, xA = function(e) {
|
||
return Boolean(e);
|
||
}, SA = function(e, t) {
|
||
var n = e.tabIndex - t.tabIndex, i = e.index - t.index;
|
||
if (n) {
|
||
if (!e.tabIndex)
|
||
return 1;
|
||
if (!t.tabIndex)
|
||
return -1;
|
||
}
|
||
return n || i;
|
||
}, bj = function(e, t, n) {
|
||
return as(e).map(function(i, o) {
|
||
return {
|
||
node: i,
|
||
index: o,
|
||
tabIndex: n && i.tabIndex === -1 ? (i.dataset || {}).focusGuard ? 0 : -1 : i.tabIndex
|
||
};
|
||
}).filter(function(i) {
|
||
return !t || i.tabIndex >= 0;
|
||
}).sort(SA);
|
||
}, bA = [
|
||
"button:enabled",
|
||
"select:enabled",
|
||
"textarea:enabled",
|
||
"input:enabled",
|
||
// elements with explicit roles will also use explicit tabindex
|
||
// '[role="button"]',
|
||
"a[href]",
|
||
"area[href]",
|
||
"summary",
|
||
"iframe",
|
||
"object",
|
||
"embed",
|
||
"audio[controls]",
|
||
"video[controls]",
|
||
"[tabindex]",
|
||
"[contenteditable]",
|
||
"[autofocus]"
|
||
], TS = bA.join(","), CA = "".concat(TS, ", [data-focus-guard]"), Cj = function(e, t) {
|
||
return as((e.shadowRoot || e).children).reduce(function(n, i) {
|
||
return n.concat(i.matches(t ? CA : TS) ? [i] : [], Cj(i));
|
||
}, []);
|
||
}, wA = function(e, t) {
|
||
var n;
|
||
return e instanceof HTMLIFrameElement && (!((n = e.contentDocument) === null || n === void 0) && n.body) ? o0([e.contentDocument.body], t) : [e];
|
||
}, o0 = function(e, t) {
|
||
return e.reduce(function(n, i) {
|
||
var o, l = Cj(i, t), f = (o = []).concat.apply(o, l.map(function(h) {
|
||
return wA(h, t);
|
||
}));
|
||
return n.concat(
|
||
// add all tabbables inside and within shadow DOMs in DOM order
|
||
f,
|
||
// add if node is tabbable itself
|
||
i.parentNode ? as(i.parentNode.querySelectorAll(TS)).filter(function(h) {
|
||
return h === i;
|
||
}) : []
|
||
);
|
||
}, []);
|
||
}, EA = function(e) {
|
||
var t = e.querySelectorAll("[".concat(aA, "]"));
|
||
return as(t).map(function(n) {
|
||
return o0([n]);
|
||
}).reduce(function(n, i) {
|
||
return n.concat(i);
|
||
}, []);
|
||
}, DS = function(e, t) {
|
||
return as(e).filter(function(n) {
|
||
return mj(t, n);
|
||
}).filter(function(n) {
|
||
return gA(n);
|
||
});
|
||
}, Tw = function(e, t) {
|
||
return t === void 0 && (t = /* @__PURE__ */ new Map()), as(e).filter(function(n) {
|
||
return gj(t, n);
|
||
});
|
||
}, Ex = function(e, t, n) {
|
||
return bj(DS(o0(e, n), t), !0, n);
|
||
}, Dw = function(e, t) {
|
||
return bj(DS(o0(e), t), !1);
|
||
}, jA = function(e, t) {
|
||
return DS(EA(e), t);
|
||
}, lf = function(e, t) {
|
||
return e.shadowRoot ? lf(e.shadowRoot, t) : Object.getPrototypeOf(e).contains !== void 0 && Object.getPrototypeOf(e).contains.call(e, t) ? !0 : as(e.children).some(function(n) {
|
||
var i;
|
||
if (n instanceof HTMLIFrameElement) {
|
||
var o = (i = n.contentDocument) === null || i === void 0 ? void 0 : i.body;
|
||
return o ? lf(o, t) : !1;
|
||
}
|
||
return lf(n, t);
|
||
});
|
||
}, TA = function(e) {
|
||
for (var t = /* @__PURE__ */ new Set(), n = e.length, i = 0; i < n; i += 1)
|
||
for (var o = i + 1; o < n; o += 1) {
|
||
var l = e[i].compareDocumentPosition(e[o]);
|
||
(l & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0 && t.add(o), (l & Node.DOCUMENT_POSITION_CONTAINS) > 0 && t.add(i);
|
||
}
|
||
return e.filter(function(f, h) {
|
||
return !t.has(h);
|
||
});
|
||
}, wj = function(e) {
|
||
return e.parentNode ? wj(e.parentNode) : e;
|
||
}, MS = function(e) {
|
||
var t = Bg(e);
|
||
return t.filter(Boolean).reduce(function(n, i) {
|
||
var o = i.getAttribute(Cx);
|
||
return n.push.apply(n, o ? TA(as(wj(i).querySelectorAll("[".concat(Cx, '="').concat(o, '"]:not([').concat(rj, '="disabled"])')))) : [i]), n;
|
||
}, []);
|
||
}, DA = function(e) {
|
||
try {
|
||
return e();
|
||
} catch {
|
||
return;
|
||
}
|
||
}, bh = function(e) {
|
||
if (e === void 0 && (e = document), !(!e || !e.activeElement)) {
|
||
var t = e.activeElement;
|
||
return t.shadowRoot ? bh(t.shadowRoot) : t instanceof HTMLIFrameElement && DA(function() {
|
||
return t.contentWindow.document;
|
||
}) ? bh(t.contentWindow.document) : t;
|
||
}
|
||
}, MA = function(e, t) {
|
||
return e === t;
|
||
}, RA = function(e, t) {
|
||
return Boolean(as(e.querySelectorAll("iframe")).some(function(n) {
|
||
return MA(n, t);
|
||
}));
|
||
}, Ej = function(e, t) {
|
||
return t === void 0 && (t = bh(pj(e).ownerDocument)), !t || t.dataset && t.dataset.focusGuard ? !1 : MS(e).some(function(n) {
|
||
return lf(n, t) || RA(n, t);
|
||
});
|
||
}, kA = function(e) {
|
||
e === void 0 && (e = document);
|
||
var t = bh(e);
|
||
return t ? as(e.querySelectorAll("[".concat(rA, "]"))).some(function(n) {
|
||
return lf(n, t);
|
||
}) : !1;
|
||
}, PA = function(e, t) {
|
||
return t.filter(Sj).filter(function(n) {
|
||
return n.name === e.name;
|
||
}).filter(function(n) {
|
||
return n.checked;
|
||
})[0] || e;
|
||
}, RS = function(e, t) {
|
||
return Sj(e) && e.name ? PA(e, t) : e;
|
||
}, OA = function(e) {
|
||
var t = /* @__PURE__ */ new Set();
|
||
return e.forEach(function(n) {
|
||
return t.add(RS(n, e));
|
||
}), e.filter(function(n) {
|
||
return t.has(n);
|
||
});
|
||
}, Mw = function(e) {
|
||
return e[0] && e.length > 1 ? RS(e[0], e) : e[0];
|
||
}, Rw = function(e, t) {
|
||
return e.length > 1 ? e.indexOf(RS(e[t], e)) : t;
|
||
}, jj = "NEW_FOCUS", AA = function(e, t, n, i) {
|
||
var o = e.length, l = e[0], f = e[o - 1], h = jS(n);
|
||
if (!(n && e.indexOf(n) >= 0)) {
|
||
var y = n !== void 0 ? t.indexOf(n) : -1, m = i ? t.indexOf(i) : y, x = i ? e.indexOf(i) : -1, b = y - m, E = t.indexOf(l), j = t.indexOf(f), M = OA(t), R = n !== void 0 ? M.indexOf(n) : -1, k = R - (i ? M.indexOf(i) : y), A = Rw(e, 0), L = Rw(e, o - 1);
|
||
if (y === -1 || x === -1)
|
||
return jj;
|
||
if (!b && x >= 0)
|
||
return x;
|
||
if (y <= E && h && Math.abs(b) > 1)
|
||
return L;
|
||
if (y >= j && h && Math.abs(b) > 1)
|
||
return A;
|
||
if (b && Math.abs(k) > 1)
|
||
return x;
|
||
if (y <= E)
|
||
return L;
|
||
if (y > j)
|
||
return A;
|
||
if (b)
|
||
return Math.abs(b) > 1 ? x : (o + x + b) % o;
|
||
}
|
||
}, NA = function(e) {
|
||
return function(t) {
|
||
var n, i = (n = yj(t)) === null || n === void 0 ? void 0 : n.autofocus;
|
||
return (
|
||
// @ts-expect-error
|
||
t.autofocus || //
|
||
i !== void 0 && i !== "false" || //
|
||
e.indexOf(t) >= 0
|
||
);
|
||
};
|
||
}, zA = function(e, t, n) {
|
||
var i = e.map(function(l) {
|
||
var f = l.node;
|
||
return f;
|
||
}), o = Tw(i.filter(NA(n)));
|
||
return o && o.length ? Mw(o) : Mw(Tw(t));
|
||
}, jx = function(e, t) {
|
||
return t === void 0 && (t = []), t.push(e), e.parentNode && jx(e.parentNode.host || e.parentNode, t), t;
|
||
}, C2 = function(e, t) {
|
||
for (var n = jx(e), i = jx(t), o = 0; o < n.length; o += 1) {
|
||
var l = n[o];
|
||
if (i.indexOf(l) >= 0)
|
||
return l;
|
||
}
|
||
return !1;
|
||
}, Tj = function(e, t, n) {
|
||
var i = Bg(e), o = Bg(t), l = i[0], f = !1;
|
||
return o.filter(Boolean).forEach(function(h) {
|
||
f = C2(f || h, h) || f, n.filter(Boolean).forEach(function(y) {
|
||
var m = C2(l, y);
|
||
m && (!f || lf(m, f) ? f = m : f = C2(m, f));
|
||
});
|
||
}), f;
|
||
}, IA = function(e, t) {
|
||
return e.reduce(function(n, i) {
|
||
return n.concat(jA(i, t));
|
||
}, []);
|
||
}, LA = function(e, t) {
|
||
var n = /* @__PURE__ */ new Map();
|
||
return t.forEach(function(i) {
|
||
return n.set(i.node, i);
|
||
}), e.map(function(i) {
|
||
return n.get(i);
|
||
}).filter(xA);
|
||
}, FA = function(e, t) {
|
||
var n = bh(Bg(e).length > 0 ? document : pj(e).ownerDocument), i = MS(e).filter(_g), o = Tj(n || e, e, i), l = /* @__PURE__ */ new Map(), f = Dw(i, l), h = Ex(i, l).filter(function(j) {
|
||
var M = j.node;
|
||
return _g(M);
|
||
});
|
||
if (!(!h[0] && (h = f, !h[0]))) {
|
||
var y = Dw([o], l).map(function(j) {
|
||
var M = j.node;
|
||
return M;
|
||
}), m = LA(y, h), x = m.map(function(j) {
|
||
var M = j.node;
|
||
return M;
|
||
}), b = AA(x, y, n, t);
|
||
if (b === jj) {
|
||
var E = zA(f, x, IA(i, l));
|
||
if (E)
|
||
return { node: E };
|
||
console.warn("focus-lock: cannot find any node to move focus into");
|
||
return;
|
||
}
|
||
return b === void 0 ? b : m[b];
|
||
}
|
||
}, BA = function(e) {
|
||
var t = MS(e).filter(_g), n = Tj(e, e, t), i = /* @__PURE__ */ new Map(), o = Ex([n], i, !0), l = Ex(t, i).filter(function(f) {
|
||
var h = f.node;
|
||
return _g(h);
|
||
}).map(function(f) {
|
||
var h = f.node;
|
||
return h;
|
||
});
|
||
return o.map(function(f) {
|
||
var h = f.node, y = f.index;
|
||
return {
|
||
node: h,
|
||
index: y,
|
||
lockItem: l.indexOf(h) >= 0,
|
||
guard: jS(h)
|
||
};
|
||
});
|
||
}, _A = function(e, t) {
|
||
"focus" in e && e.focus(t), "contentWindow" in e && e.contentWindow && e.contentWindow.focus();
|
||
}, w2 = 0, E2 = !1, Dj = function(e, t, n) {
|
||
n === void 0 && (n = {});
|
||
var i = FA(e, t);
|
||
if (!E2 && i) {
|
||
if (w2 > 2) {
|
||
console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"), E2 = !0, setTimeout(function() {
|
||
E2 = !1;
|
||
}, 1);
|
||
return;
|
||
}
|
||
w2++, _A(i.node, n.focusOptions), w2--;
|
||
}
|
||
};
|
||
function Mj(e) {
|
||
var t = window, n = t.setImmediate;
|
||
typeof n < "u" ? n(e) : setTimeout(e, 1);
|
||
}
|
||
var UA = function() {
|
||
return document && document.activeElement === document.body;
|
||
}, HA = function() {
|
||
return UA() || kA();
|
||
}, uf = null, tf = null, cf = null, Ch = !1, VA = function() {
|
||
return !0;
|
||
}, WA = function(t) {
|
||
return (uf.whiteList || VA)(t);
|
||
}, GA = function(t, n) {
|
||
cf = {
|
||
observerNode: t,
|
||
portaledElement: n
|
||
};
|
||
}, qA = function(t) {
|
||
return cf && cf.portaledElement === t;
|
||
};
|
||
function kw(e, t, n, i) {
|
||
var o = null, l = e;
|
||
do {
|
||
var f = i[l];
|
||
if (f.guard)
|
||
f.node.dataset.focusAutoGuard && (o = f);
|
||
else if (f.lockItem) {
|
||
if (l !== e)
|
||
return;
|
||
o = null;
|
||
} else
|
||
break;
|
||
} while ((l += n) !== t);
|
||
o && (o.node.tabIndex = 0);
|
||
}
|
||
var YA = function(t) {
|
||
return t && "current" in t ? t.current : t;
|
||
}, QA = function(t) {
|
||
return t ? Boolean(Ch) : Ch === "meanwhile";
|
||
}, XA = function e(t, n, i) {
|
||
return n && // find host equal to active element and check nested active element
|
||
(n.host === t && (!n.activeElement || i.contains(n.activeElement)) || n.parentNode && e(t, n.parentNode, i));
|
||
}, KA = function(t, n) {
|
||
return n.some(function(i) {
|
||
return XA(t, i, i);
|
||
});
|
||
}, Ug = function() {
|
||
var t = !1;
|
||
if (uf) {
|
||
var n = uf, i = n.observed, o = n.persistentFocus, l = n.autoFocus, f = n.shards, h = n.crossFrame, y = n.focusOptions, m = i || cf && cf.portaledElement, x = document && document.activeElement;
|
||
if (m) {
|
||
var b = [m].concat(f.map(YA).filter(Boolean));
|
||
if ((!x || WA(x)) && (o || QA(h) || !HA() || !tf && l) && (m && !// active element is "inside" working area
|
||
(Ej(b) || // check for shadow-dom contained elements
|
||
x && KA(x, b) || qA(x)) && (document && !tf && x && !l ? (x.blur && x.blur(), document.body.focus()) : (t = Dj(b, tf, {
|
||
focusOptions: y
|
||
}), cf = {})), Ch = !1, tf = document && document.activeElement), document) {
|
||
var E = document && document.activeElement, j = BA(b), M = j.map(function(R) {
|
||
var k = R.node;
|
||
return k;
|
||
}).indexOf(E);
|
||
M > -1 && (j.filter(function(R) {
|
||
var k = R.guard, A = R.node;
|
||
return k && A.dataset.focusAutoGuard;
|
||
}).forEach(function(R) {
|
||
var k = R.node;
|
||
return k.removeAttribute("tabIndex");
|
||
}), kw(M, j.length, 1, j), kw(M, -1, -1, j));
|
||
}
|
||
}
|
||
}
|
||
return t;
|
||
}, Rj = function(t) {
|
||
Ug() && t && (t.stopPropagation(), t.preventDefault());
|
||
}, kS = function() {
|
||
return Mj(Ug);
|
||
}, ZA = function(t) {
|
||
var n = t.target, i = t.currentTarget;
|
||
i.contains(n) || GA(i, n);
|
||
}, JA = function() {
|
||
return null;
|
||
};
|
||
process.env.NODE_ENV !== "production" && Oe.node.isRequired;
|
||
var kj = function() {
|
||
Ch = "just", setTimeout(function() {
|
||
Ch = "meanwhile";
|
||
}, 0);
|
||
}, $A = function() {
|
||
document.addEventListener("focusin", Rj), document.addEventListener("focusout", kS), window.addEventListener("blur", kj);
|
||
}, eN = function() {
|
||
document.removeEventListener("focusin", Rj), document.removeEventListener("focusout", kS), window.removeEventListener("blur", kj);
|
||
};
|
||
function tN(e) {
|
||
return e.filter(function(t) {
|
||
var n = t.disabled;
|
||
return !n;
|
||
});
|
||
}
|
||
function nN(e) {
|
||
var t = e.slice(-1)[0];
|
||
t && !uf && $A();
|
||
var n = uf, i = n && t && t.id === n.id;
|
||
uf = t, n && !i && (n.onDeactivation(), e.filter(function(o) {
|
||
var l = o.id;
|
||
return l === n.id;
|
||
}).length || n.returnFocus(!t)), t ? (tf = null, (!i || n.observed !== t.observed) && t.onActivation(), Ug(), Mj(Ug)) : (eN(), tf = null);
|
||
}
|
||
cj.assignSyncMedium(ZA);
|
||
dj.assignMedium(kS);
|
||
uA.assignMedium(function(e) {
|
||
return e({
|
||
moveFocusInside: Dj,
|
||
focusInside: Ej
|
||
});
|
||
});
|
||
const rN = fA(tN, nN)(JA);
|
||
var Pj = /* @__PURE__ */ Je.forwardRef(function(t, n) {
|
||
return /* @__PURE__ */ Je.createElement(fj, yh({
|
||
sideCar: rN,
|
||
ref: n
|
||
}, t));
|
||
}), Oj = fj.propTypes || {};
|
||
Oj.sideCar;
|
||
var aN = lS(Oj, ["sideCar"]);
|
||
Pj.propTypes = process.env.NODE_ENV !== "production" ? aN : {};
|
||
const Pw = Pj;
|
||
function Aj(e) {
|
||
return e != null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
||
}
|
||
function Nj(e) {
|
||
var t;
|
||
if (!Aj(e))
|
||
return !1;
|
||
const n = (t = e.ownerDocument.defaultView) != null ? t : window;
|
||
return e instanceof n.HTMLElement;
|
||
}
|
||
function iN(e) {
|
||
var t, n;
|
||
return (n = (t = zj(e)) == null ? void 0 : t.defaultView) != null ? n : window;
|
||
}
|
||
function zj(e) {
|
||
return Aj(e) ? e.ownerDocument : document;
|
||
}
|
||
function oN(e) {
|
||
return zj(e).activeElement;
|
||
}
|
||
var Ij = (e) => e.hasAttribute("tabindex"), sN = (e) => Ij(e) && e.tabIndex === -1;
|
||
function lN(e) {
|
||
return Boolean(e.getAttribute("disabled")) === !0 || Boolean(e.getAttribute("aria-disabled")) === !0;
|
||
}
|
||
function Lj(e) {
|
||
return e.parentElement && Lj(e.parentElement) ? !0 : e.hidden;
|
||
}
|
||
function uN(e) {
|
||
const t = e.getAttribute("contenteditable");
|
||
return t !== "false" && t != null;
|
||
}
|
||
function Fj(e) {
|
||
if (!Nj(e) || Lj(e) || lN(e))
|
||
return !1;
|
||
const { localName: t } = e;
|
||
if (["input", "select", "textarea", "button"].indexOf(t) >= 0)
|
||
return !0;
|
||
const i = {
|
||
a: () => e.hasAttribute("href"),
|
||
audio: () => e.hasAttribute("controls"),
|
||
video: () => e.hasAttribute("controls")
|
||
};
|
||
return t in i ? i[t]() : uN(e) ? !0 : Ij(e);
|
||
}
|
||
function cN(e) {
|
||
return e ? Nj(e) && Fj(e) && !sN(e) : !1;
|
||
}
|
||
var dN = [
|
||
"input:not(:disabled):not([disabled])",
|
||
"select:not(:disabled):not([disabled])",
|
||
"textarea:not(:disabled):not([disabled])",
|
||
"embed",
|
||
"iframe",
|
||
"object",
|
||
"a[href]",
|
||
"area[href]",
|
||
"button:not(:disabled):not([disabled])",
|
||
"[tabindex]",
|
||
"audio[controls]",
|
||
"video[controls]",
|
||
"*[tabindex]:not([aria-disabled])",
|
||
"*[contenteditable]"
|
||
], fN = dN.join(), pN = (e) => e.offsetWidth > 0 && e.offsetHeight > 0;
|
||
function Bj(e) {
|
||
const t = Array.from(
|
||
e.querySelectorAll(fN)
|
||
);
|
||
return t.unshift(e), t.filter((n) => Fj(n) && pN(n));
|
||
}
|
||
var Ow, hN = (Ow = Pw.default) != null ? Ow : Pw, _j = (e) => {
|
||
const {
|
||
initialFocusRef: t,
|
||
finalFocusRef: n,
|
||
contentRef: i,
|
||
restoreFocus: o,
|
||
children: l,
|
||
isDisabled: f,
|
||
autoFocus: h,
|
||
persistentFocus: y,
|
||
lockFocusAcrossFrames: m
|
||
} = e, x = Q(() => {
|
||
t != null && t.current ? t.current.focus() : i != null && i.current && Bj(i.current).length === 0 && requestAnimationFrame(() => {
|
||
var M;
|
||
(M = i.current) == null || M.focus();
|
||
});
|
||
}, [t, i]), b = Q(() => {
|
||
var j;
|
||
(j = n == null ? void 0 : n.current) == null || j.focus();
|
||
}, [n]), E = o && !n;
|
||
return /* @__PURE__ */ c.jsx(
|
||
hN,
|
||
{
|
||
crossFrame: m,
|
||
persistentFocus: y,
|
||
autoFocus: h,
|
||
disabled: f,
|
||
onActivation: x,
|
||
onDeactivation: b,
|
||
returnFocus: E,
|
||
children: l
|
||
}
|
||
);
|
||
};
|
||
_j.displayName = "FocusLock";
|
||
var vN = TP ? bo : rt;
|
||
function Tx(e, t = []) {
|
||
const n = He(e);
|
||
return vN(() => {
|
||
n.current = e;
|
||
}), Q((...i) => {
|
||
var o;
|
||
return (o = n.current) == null ? void 0 : o.call(n, ...i);
|
||
}, t);
|
||
}
|
||
function mN(e, t, n, i) {
|
||
const o = Tx(t);
|
||
return rt(() => {
|
||
var l;
|
||
const f = (l = U3(n)) != null ? l : document;
|
||
if (t)
|
||
return f.addEventListener(e, o, i), () => {
|
||
f.removeEventListener(e, o, i);
|
||
};
|
||
}, [e, n, i, o, t]), () => {
|
||
var l;
|
||
((l = U3(n)) != null ? l : document).removeEventListener(e, o, i);
|
||
};
|
||
}
|
||
function gN(e, t) {
|
||
const n = bi();
|
||
return an(
|
||
() => e || [t, n].filter(Boolean).join("-"),
|
||
[e, t, n]
|
||
);
|
||
}
|
||
function yN(e, t) {
|
||
const n = e !== void 0;
|
||
return [n, n && typeof e < "u" ? e : t];
|
||
}
|
||
function Gl(e = {}) {
|
||
const {
|
||
onClose: t,
|
||
onOpen: n,
|
||
isOpen: i,
|
||
id: o
|
||
} = e, l = Tx(n), f = Tx(t), [h, y] = qe(e.defaultIsOpen || !1), [m, x] = yN(i, h), b = gN(o, "disclosure"), E = Q(() => {
|
||
m || y(!1), f == null || f();
|
||
}, [m, f]), j = Q(() => {
|
||
m || y(!0), l == null || l();
|
||
}, [m, l]), M = Q(() => {
|
||
(x ? E : j)();
|
||
}, [x, j, E]);
|
||
return {
|
||
isOpen: !!x,
|
||
onOpen: j,
|
||
onClose: E,
|
||
onToggle: M,
|
||
isControlled: m,
|
||
getButtonProps: (R = {}) => ({
|
||
...R,
|
||
"aria-expanded": x,
|
||
"aria-controls": b,
|
||
onClick: kR(R.onClick, M)
|
||
}),
|
||
getDisclosureProps: (R = {}) => ({
|
||
...R,
|
||
hidden: !x,
|
||
id: b
|
||
})
|
||
};
|
||
}
|
||
var PS = $e(function(t, n) {
|
||
const { htmlSize: i, ...o } = t, l = Da("Input", o), f = ar(o), h = mS(f), y = At("chakra-input", t.className);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.input,
|
||
{
|
||
size: i,
|
||
...h,
|
||
__css: l.field,
|
||
ref: n,
|
||
className: y
|
||
}
|
||
);
|
||
});
|
||
PS.displayName = "Input";
|
||
PS.id = "Input";
|
||
var [xN, Uj] = Qn({
|
||
name: "ListStylesContext",
|
||
errorMessage: `useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `
|
||
}), OS = $e(function(t, n) {
|
||
const i = Da("List", t), {
|
||
children: o,
|
||
styleType: l = "none",
|
||
stylePosition: f,
|
||
spacing: h,
|
||
...y
|
||
} = ar(t), m = vS(o), b = h ? { ["& > *:not(style) ~ *:not(style)"]: { mt: h } } : {};
|
||
return /* @__PURE__ */ c.jsx(xN, { value: i, children: /* @__PURE__ */ c.jsx(
|
||
Be.ul,
|
||
{
|
||
ref: n,
|
||
listStyleType: l,
|
||
listStylePosition: f,
|
||
role: "list",
|
||
__css: { ...i.container, ...b },
|
||
...y,
|
||
children: m
|
||
}
|
||
) });
|
||
});
|
||
OS.displayName = "List";
|
||
var SN = $e((e, t) => {
|
||
const { as: n, ...i } = e;
|
||
return /* @__PURE__ */ c.jsx(OS, { ref: t, as: "ol", styleType: "decimal", marginStart: "1em", ...i });
|
||
});
|
||
SN.displayName = "OrderedList";
|
||
var Hj = $e(function(t, n) {
|
||
const { as: i, ...o } = t;
|
||
return /* @__PURE__ */ c.jsx(OS, { ref: n, as: "ul", styleType: "initial", marginStart: "1em", ...o });
|
||
});
|
||
Hj.displayName = "UnorderedList";
|
||
var uh = $e(function(t, n) {
|
||
const i = Uj();
|
||
return /* @__PURE__ */ c.jsx(Be.li, { ref: n, ...t, __css: i.item });
|
||
});
|
||
uh.displayName = "ListItem";
|
||
var bN = $e(function(t, n) {
|
||
const i = Uj();
|
||
return /* @__PURE__ */ c.jsx(Zr, { ref: n, role: "presentation", ...t, __css: i.icon });
|
||
});
|
||
bN.displayName = "ListIcon";
|
||
var _i = $e(function(t, n) {
|
||
const {
|
||
templateAreas: i,
|
||
gap: o,
|
||
rowGap: l,
|
||
columnGap: f,
|
||
column: h,
|
||
row: y,
|
||
autoFlow: m,
|
||
autoRows: x,
|
||
templateRows: b,
|
||
autoColumns: E,
|
||
templateColumns: j,
|
||
...M
|
||
} = t, R = {
|
||
display: "grid",
|
||
gridTemplateAreas: i,
|
||
gridGap: o,
|
||
gridRowGap: l,
|
||
gridColumnGap: f,
|
||
gridAutoColumns: E,
|
||
gridColumn: h,
|
||
gridRow: y,
|
||
gridAutoFlow: m,
|
||
gridAutoRows: x,
|
||
gridTemplateRows: b,
|
||
gridTemplateColumns: j
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Be.div, { ref: n, __css: R, ...M });
|
||
});
|
||
_i.displayName = "Grid";
|
||
function Vj(e, t) {
|
||
return Array.isArray(e) ? e.map((n) => n === null ? null : t(n)) : nx(e) ? Object.keys(e).reduce((n, i) => (n[i] = t(e[i]), n), {}) : e != null ? t(e) : null;
|
||
}
|
||
var s0 = Be("div", {
|
||
baseStyle: {
|
||
flex: 1,
|
||
justifySelf: "stretch",
|
||
alignSelf: "stretch"
|
||
}
|
||
});
|
||
s0.displayName = "Spacer";
|
||
var Wj = (e) => /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
className: "chakra-stack__item",
|
||
...e,
|
||
__css: {
|
||
display: "inline-block",
|
||
flex: "0 0 auto",
|
||
minWidth: 0,
|
||
...e.__css
|
||
}
|
||
}
|
||
);
|
||
Wj.displayName = "StackItem";
|
||
var Dx = "& > *:not(style) ~ *:not(style)";
|
||
function CN(e) {
|
||
const { spacing: t, direction: n } = e, i = {
|
||
column: {
|
||
marginTop: t,
|
||
marginEnd: 0,
|
||
marginBottom: 0,
|
||
marginStart: 0
|
||
},
|
||
row: { marginTop: 0, marginEnd: 0, marginBottom: 0, marginStart: t },
|
||
"column-reverse": {
|
||
marginTop: 0,
|
||
marginEnd: 0,
|
||
marginBottom: t,
|
||
marginStart: 0
|
||
},
|
||
"row-reverse": {
|
||
marginTop: 0,
|
||
marginEnd: t,
|
||
marginBottom: 0,
|
||
marginStart: 0
|
||
}
|
||
};
|
||
return {
|
||
flexDirection: n,
|
||
[Dx]: Vj(
|
||
n,
|
||
(o) => i[o]
|
||
)
|
||
};
|
||
}
|
||
function wN(e) {
|
||
const { spacing: t, direction: n } = e, i = {
|
||
column: {
|
||
my: t,
|
||
mx: 0,
|
||
borderLeftWidth: 0,
|
||
borderBottomWidth: "1px"
|
||
},
|
||
"column-reverse": {
|
||
my: t,
|
||
mx: 0,
|
||
borderLeftWidth: 0,
|
||
borderBottomWidth: "1px"
|
||
},
|
||
row: {
|
||
mx: t,
|
||
my: 0,
|
||
borderLeftWidth: "1px",
|
||
borderBottomWidth: 0
|
||
},
|
||
"row-reverse": {
|
||
mx: t,
|
||
my: 0,
|
||
borderLeftWidth: "1px",
|
||
borderBottomWidth: 0
|
||
}
|
||
};
|
||
return {
|
||
"&": Vj(
|
||
n,
|
||
(o) => i[o]
|
||
)
|
||
};
|
||
}
|
||
var AS = $e((e, t) => {
|
||
const {
|
||
isInline: n,
|
||
direction: i,
|
||
align: o,
|
||
justify: l,
|
||
spacing: f = "0.5rem",
|
||
wrap: h,
|
||
children: y,
|
||
divider: m,
|
||
className: x,
|
||
shouldWrapChildren: b,
|
||
...E
|
||
} = e, j = n ? "row" : i ?? "column", M = an(
|
||
() => CN({ direction: j, spacing: f }),
|
||
[j, f]
|
||
), R = an(
|
||
() => wN({ spacing: f, direction: j }),
|
||
[f, j]
|
||
), k = !!m, A = !b && !k, L = an(() => {
|
||
const I = vS(y);
|
||
return A ? I : I.map((_, U) => {
|
||
const B = typeof _.key < "u" ? _.key : U, q = U + 1 === I.length, G = b ? /* @__PURE__ */ c.jsx(Wj, { children: _ }, B) : _;
|
||
if (!k)
|
||
return G;
|
||
const H = Ci(
|
||
m,
|
||
{
|
||
__css: R
|
||
}
|
||
), le = q ? null : H;
|
||
return /* @__PURE__ */ c.jsxs(L6, { children: [
|
||
G,
|
||
le
|
||
] }, B);
|
||
});
|
||
}, [
|
||
m,
|
||
R,
|
||
k,
|
||
A,
|
||
b,
|
||
y
|
||
]), z = At("chakra-stack", x);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: t,
|
||
display: "flex",
|
||
alignItems: o,
|
||
justifyContent: l,
|
||
flexDirection: M.flexDirection,
|
||
flexWrap: h,
|
||
className: z,
|
||
__css: k ? {} : { [Dx]: M[Dx] },
|
||
...E,
|
||
children: L
|
||
}
|
||
);
|
||
});
|
||
AS.displayName = "Stack";
|
||
var Bt = $e((e, t) => /* @__PURE__ */ c.jsx(AS, { align: "center", ...e, direction: "column", ref: t }));
|
||
Bt.displayName = "VStack";
|
||
var wf = $e((e, t) => /* @__PURE__ */ c.jsx(AS, { align: "center", ...e, direction: "row", ref: t }));
|
||
wf.displayName = "HStack";
|
||
var Bi = $e(function(t, n) {
|
||
const i = Xl("Heading", t), { className: o, ...l } = ar(t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.h2,
|
||
{
|
||
ref: n,
|
||
className: At("chakra-heading", t.className),
|
||
...l,
|
||
__css: i
|
||
}
|
||
);
|
||
});
|
||
Bi.displayName = "Heading";
|
||
var Ut = Be("div");
|
||
Ut.displayName = "Box";
|
||
var Gj = $e(function(t, n) {
|
||
const { size: i, centerContent: o = !0, ...l } = t, f = o ? { display: "flex", alignItems: "center", justifyContent: "center" } : {};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
ref: n,
|
||
boxSize: i,
|
||
__css: {
|
||
...f,
|
||
flexShrink: 0,
|
||
flexGrow: 0
|
||
},
|
||
...l
|
||
}
|
||
);
|
||
});
|
||
Gj.displayName = "Square";
|
||
var EN = $e(function(t, n) {
|
||
const { size: i, ...o } = t;
|
||
return /* @__PURE__ */ c.jsx(Gj, { size: i, ref: n, borderRadius: "9999px", ...o });
|
||
});
|
||
EN.displayName = "Circle";
|
||
var tc = $e(function(t, n) {
|
||
const i = Xl("Link", t), { className: o, isExternal: l, ...f } = ar(t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.a,
|
||
{
|
||
target: l ? "_blank" : void 0,
|
||
rel: l ? "noopener" : void 0,
|
||
ref: n,
|
||
className: At("chakra-link", o),
|
||
...f,
|
||
__css: i
|
||
}
|
||
);
|
||
});
|
||
tc.displayName = "Link";
|
||
var qj = $e(function(t, n) {
|
||
const i = Xl("Badge", t), { className: o, ...l } = ar(t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
ref: n,
|
||
className: At("chakra-badge", t.className),
|
||
...l,
|
||
__css: {
|
||
display: "inline-block",
|
||
whiteSpace: "nowrap",
|
||
verticalAlign: "middle",
|
||
...i
|
||
}
|
||
}
|
||
);
|
||
});
|
||
qj.displayName = "Badge";
|
||
var Yj = Be("div", {
|
||
baseStyle: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "center"
|
||
}
|
||
});
|
||
Yj.displayName = "Center";
|
||
var jN = {
|
||
horizontal: {
|
||
insetStart: "50%",
|
||
transform: "translateX(-50%)"
|
||
},
|
||
vertical: {
|
||
top: "50%",
|
||
transform: "translateY(-50%)"
|
||
},
|
||
both: {
|
||
insetStart: "50%",
|
||
top: "50%",
|
||
transform: "translate(-50%, -50%)"
|
||
}
|
||
};
|
||
$e(
|
||
function(t, n) {
|
||
const { axis: i = "both", ...o } = t;
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: n,
|
||
__css: jN[i],
|
||
...o,
|
||
position: "absolute"
|
||
}
|
||
);
|
||
}
|
||
);
|
||
var Qj = $e(function(t, n) {
|
||
const {
|
||
borderLeftWidth: i,
|
||
borderBottomWidth: o,
|
||
borderTopWidth: l,
|
||
borderRightWidth: f,
|
||
borderWidth: h,
|
||
borderStyle: y,
|
||
borderColor: m,
|
||
...x
|
||
} = Xl("Divider", t), {
|
||
className: b,
|
||
orientation: E = "horizontal",
|
||
__css: j,
|
||
...M
|
||
} = ar(t), R = {
|
||
vertical: {
|
||
borderLeftWidth: i || f || h || "1px",
|
||
height: "100%"
|
||
},
|
||
horizontal: {
|
||
borderBottomWidth: o || l || h || "1px",
|
||
width: "100%"
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.hr,
|
||
{
|
||
ref: n,
|
||
"aria-orientation": E,
|
||
...M,
|
||
__css: {
|
||
...x,
|
||
border: "0",
|
||
borderColor: m,
|
||
borderStyle: y,
|
||
...R[E],
|
||
...j
|
||
},
|
||
className: At("chakra-divider", b)
|
||
}
|
||
);
|
||
});
|
||
Qj.displayName = "Divider";
|
||
function TN(e) {
|
||
const { key: t } = e;
|
||
return t.length === 1 || t.length > 1 && /[^a-zA-Z0-9]/.test(t);
|
||
}
|
||
function DN(e = {}) {
|
||
const { timeout: t = 300, preventDefault: n = () => !0 } = e, [i, o] = qe([]), l = He(), f = () => {
|
||
l.current && (clearTimeout(l.current), l.current = null);
|
||
}, h = () => {
|
||
f(), l.current = setTimeout(() => {
|
||
o([]), l.current = null;
|
||
}, t);
|
||
};
|
||
rt(() => f, []);
|
||
function y(m) {
|
||
return (x) => {
|
||
if (x.key === "Backspace") {
|
||
const b = [...i];
|
||
b.pop(), o(b);
|
||
return;
|
||
}
|
||
if (TN(x)) {
|
||
const b = i.concat(x.key);
|
||
n(x) && (x.preventDefault(), x.stopPropagation()), o(b), m(b.join("")), h();
|
||
}
|
||
};
|
||
}
|
||
return y;
|
||
}
|
||
function MN(e, t, n, i) {
|
||
if (t == null)
|
||
return i;
|
||
if (!i)
|
||
return e.find(
|
||
(f) => n(f).toLowerCase().startsWith(t.toLowerCase())
|
||
);
|
||
const o = e.filter(
|
||
(l) => n(l).toLowerCase().startsWith(t.toLowerCase())
|
||
);
|
||
if (o.length > 0) {
|
||
let l;
|
||
return o.includes(i) ? (l = o.indexOf(i) + 1, l === o.length && (l = 0), o[l]) : (l = e.indexOf(o[0]), e[l]);
|
||
}
|
||
return i;
|
||
}
|
||
function RN() {
|
||
const e = He(/* @__PURE__ */ new Map()), t = e.current, n = Q((o, l, f, h) => {
|
||
e.current.set(f, { type: l, el: o, options: h }), o.addEventListener(l, f, h);
|
||
}, []), i = Q(
|
||
(o, l, f, h) => {
|
||
o.removeEventListener(l, f, h), e.current.delete(f);
|
||
},
|
||
[]
|
||
);
|
||
return rt(
|
||
() => () => {
|
||
t.forEach((o, l) => {
|
||
i(o.el, o.type, l, o.options);
|
||
});
|
||
},
|
||
[i, t]
|
||
), { add: n, remove: i };
|
||
}
|
||
function j2(e) {
|
||
const t = e.target, { tagName: n, isContentEditable: i } = t;
|
||
return n !== "INPUT" && n !== "TEXTAREA" && i !== !0;
|
||
}
|
||
function Xj(e = {}) {
|
||
const {
|
||
ref: t,
|
||
isDisabled: n,
|
||
isFocusable: i,
|
||
clickOnEnter: o = !0,
|
||
clickOnSpace: l = !0,
|
||
onMouseDown: f,
|
||
onMouseUp: h,
|
||
onClick: y,
|
||
onKeyDown: m,
|
||
onKeyUp: x,
|
||
tabIndex: b,
|
||
onMouseOver: E,
|
||
onMouseLeave: j,
|
||
...M
|
||
} = e, [R, k] = qe(!0), [A, L] = qe(!1), z = RN(), I = ($) => {
|
||
$ && $.tagName !== "BUTTON" && k(!1);
|
||
}, _ = R ? b : b || 0, U = n && !i, B = Q(
|
||
($) => {
|
||
if (n) {
|
||
$.stopPropagation(), $.preventDefault();
|
||
return;
|
||
}
|
||
$.currentTarget.focus(), y == null || y($);
|
||
},
|
||
[n, y]
|
||
), q = Q(
|
||
($) => {
|
||
A && j2($) && ($.preventDefault(), $.stopPropagation(), L(!1), z.remove(document, "keyup", q, !1));
|
||
},
|
||
[A, z]
|
||
), J = Q(
|
||
($) => {
|
||
if (m == null || m($), n || $.defaultPrevented || $.metaKey || !j2($.nativeEvent) || R)
|
||
return;
|
||
const Y = o && $.key === "Enter";
|
||
l && $.key === " " && ($.preventDefault(), L(!0)), Y && ($.preventDefault(), $.currentTarget.click()), z.add(document, "keyup", q, !1);
|
||
},
|
||
[
|
||
n,
|
||
R,
|
||
m,
|
||
o,
|
||
l,
|
||
z,
|
||
q
|
||
]
|
||
), G = Q(
|
||
($) => {
|
||
if (x == null || x($), n || $.defaultPrevented || $.metaKey || !j2($.nativeEvent) || R)
|
||
return;
|
||
l && $.key === " " && ($.preventDefault(), L(!1), $.currentTarget.click());
|
||
},
|
||
[l, R, n, x]
|
||
), H = Q(
|
||
($) => {
|
||
$.button === 0 && (L(!1), z.remove(document, "mouseup", H, !1));
|
||
},
|
||
[z]
|
||
), le = Q(
|
||
($) => {
|
||
if ($.button !== 0)
|
||
return;
|
||
if (n) {
|
||
$.stopPropagation(), $.preventDefault();
|
||
return;
|
||
}
|
||
R || L(!0), $.currentTarget.focus({ preventScroll: !0 }), z.add(document, "mouseup", H, !1), f == null || f($);
|
||
},
|
||
[n, R, f, z, H]
|
||
), ae = Q(
|
||
($) => {
|
||
$.button === 0 && (R || L(!1), h == null || h($));
|
||
},
|
||
[h, R]
|
||
), he = Q(
|
||
($) => {
|
||
if (n) {
|
||
$.preventDefault();
|
||
return;
|
||
}
|
||
E == null || E($);
|
||
},
|
||
[n, E]
|
||
), Te = Q(
|
||
($) => {
|
||
A && ($.preventDefault(), L(!1)), j == null || j($);
|
||
},
|
||
[A, j]
|
||
), xe = Rn(t, I);
|
||
return R ? {
|
||
...M,
|
||
ref: xe,
|
||
type: "button",
|
||
"aria-disabled": U ? void 0 : n,
|
||
disabled: U,
|
||
onClick: B,
|
||
onMouseDown: f,
|
||
onMouseUp: h,
|
||
onKeyUp: x,
|
||
onKeyDown: m,
|
||
onMouseOver: E,
|
||
onMouseLeave: j
|
||
} : {
|
||
...M,
|
||
ref: xe,
|
||
role: "button",
|
||
"data-active": Yt(A),
|
||
"aria-disabled": n ? "true" : void 0,
|
||
tabIndex: U ? void 0 : _,
|
||
onClick: B,
|
||
onMouseDown: le,
|
||
onMouseUp: ae,
|
||
onKeyUp: G,
|
||
onKeyDown: J,
|
||
onMouseOver: he,
|
||
onMouseLeave: Te
|
||
};
|
||
}
|
||
function kN(e) {
|
||
const t = e.current;
|
||
if (!t)
|
||
return !1;
|
||
const n = oN(t);
|
||
return !n || t.contains(n) ? !1 : !!cN(n);
|
||
}
|
||
function Kj(e, t) {
|
||
const { shouldFocus: n, visible: i, focusRef: o } = t, l = n && !i;
|
||
fc(() => {
|
||
if (!l || kN(e))
|
||
return;
|
||
const f = (o == null ? void 0 : o.current) || e.current;
|
||
f && requestAnimationFrame(() => {
|
||
f.focus();
|
||
});
|
||
}, [l, e, o]);
|
||
}
|
||
var PN = {
|
||
preventScroll: !0,
|
||
shouldFocus: !1
|
||
};
|
||
function ON(e, t = PN) {
|
||
const { focusRef: n, preventScroll: i, shouldFocus: o, visible: l } = t, f = AN(e) ? e.current : e, h = o && l, y = He(h), m = He(l);
|
||
of(() => {
|
||
!m.current && l && (y.current = h), m.current = l;
|
||
}, [l, h]);
|
||
const x = Q(() => {
|
||
if (!(!l || !f || !y.current) && (y.current = !1, !f.contains(document.activeElement)))
|
||
if (n != null && n.current)
|
||
requestAnimationFrame(() => {
|
||
var b;
|
||
(b = n.current) == null || b.focus({ preventScroll: i });
|
||
});
|
||
else {
|
||
const b = Bj(f);
|
||
b.length > 0 && requestAnimationFrame(() => {
|
||
b[0].focus({ preventScroll: i });
|
||
});
|
||
}
|
||
}, [l, i, f, n]);
|
||
fc(() => {
|
||
x();
|
||
}, [x]), ec(f, "transitionend", x);
|
||
}
|
||
function AN(e) {
|
||
return "current" in e;
|
||
}
|
||
var Ud = (e, t) => ({
|
||
var: e,
|
||
varRef: t ? `var(${e}, ${t})` : `var(${e})`
|
||
}), Rr = {
|
||
arrowShadowColor: Ud("--popper-arrow-shadow-color"),
|
||
arrowSize: Ud("--popper-arrow-size", "8px"),
|
||
arrowSizeHalf: Ud("--popper-arrow-size-half"),
|
||
arrowBg: Ud("--popper-arrow-bg"),
|
||
transformOrigin: Ud("--popper-transform-origin"),
|
||
arrowOffset: Ud("--popper-arrow-offset")
|
||
};
|
||
function NN(e) {
|
||
if (e.includes("top"))
|
||
return "1px 1px 1px 0 var(--popper-arrow-shadow-color)";
|
||
if (e.includes("bottom"))
|
||
return "-1px -1px 1px 0 var(--popper-arrow-shadow-color)";
|
||
if (e.includes("right"))
|
||
return "-1px 1px 1px 0 var(--popper-arrow-shadow-color)";
|
||
if (e.includes("left"))
|
||
return "1px -1px 1px 0 var(--popper-arrow-shadow-color)";
|
||
}
|
||
var zN = {
|
||
top: "bottom center",
|
||
"top-start": "bottom left",
|
||
"top-end": "bottom right",
|
||
bottom: "top center",
|
||
"bottom-start": "top left",
|
||
"bottom-end": "top right",
|
||
left: "right center",
|
||
"left-start": "right top",
|
||
"left-end": "right bottom",
|
||
right: "left center",
|
||
"right-start": "left top",
|
||
"right-end": "left bottom"
|
||
}, IN = (e) => zN[e], Aw = {
|
||
scroll: !0,
|
||
resize: !0
|
||
};
|
||
function LN(e) {
|
||
let t;
|
||
return typeof e == "object" ? t = {
|
||
enabled: !0,
|
||
options: { ...Aw, ...e }
|
||
} : t = {
|
||
enabled: e,
|
||
options: Aw
|
||
}, t;
|
||
}
|
||
var FN = {
|
||
name: "matchWidth",
|
||
enabled: !0,
|
||
phase: "beforeWrite",
|
||
requires: ["computeStyles"],
|
||
fn: ({ state: e }) => {
|
||
e.styles.popper.width = `${e.rects.reference.width}px`;
|
||
},
|
||
effect: ({ state: e }) => () => {
|
||
const t = e.elements.reference;
|
||
e.elements.popper.style.width = `${t.offsetWidth}px`;
|
||
}
|
||
}, BN = {
|
||
name: "transformOrigin",
|
||
enabled: !0,
|
||
phase: "write",
|
||
fn: ({ state: e }) => {
|
||
Nw(e);
|
||
},
|
||
effect: ({ state: e }) => () => {
|
||
Nw(e);
|
||
}
|
||
}, Nw = (e) => {
|
||
e.elements.popper.style.setProperty(
|
||
Rr.transformOrigin.var,
|
||
IN(e.placement)
|
||
);
|
||
}, _N = {
|
||
name: "positionArrow",
|
||
enabled: !0,
|
||
phase: "afterWrite",
|
||
fn: ({ state: e }) => {
|
||
UN(e);
|
||
}
|
||
}, UN = (e) => {
|
||
var t;
|
||
if (!e.placement)
|
||
return;
|
||
const n = HN(e.placement);
|
||
if ((t = e.elements) != null && t.arrow && n) {
|
||
Object.assign(e.elements.arrow.style, {
|
||
[n.property]: n.value,
|
||
width: Rr.arrowSize.varRef,
|
||
height: Rr.arrowSize.varRef,
|
||
zIndex: -1
|
||
});
|
||
const i = {
|
||
[Rr.arrowSizeHalf.var]: `calc(${Rr.arrowSize.varRef} / 2)`,
|
||
[Rr.arrowOffset.var]: `calc(${Rr.arrowSizeHalf.varRef} * -1)`
|
||
};
|
||
for (const o in i)
|
||
e.elements.arrow.style.setProperty(o, i[o]);
|
||
}
|
||
}, HN = (e) => {
|
||
if (e.startsWith("top"))
|
||
return { property: "bottom", value: Rr.arrowOffset.varRef };
|
||
if (e.startsWith("bottom"))
|
||
return { property: "top", value: Rr.arrowOffset.varRef };
|
||
if (e.startsWith("left"))
|
||
return { property: "right", value: Rr.arrowOffset.varRef };
|
||
if (e.startsWith("right"))
|
||
return { property: "left", value: Rr.arrowOffset.varRef };
|
||
}, VN = {
|
||
name: "innerArrow",
|
||
enabled: !0,
|
||
phase: "main",
|
||
requires: ["arrow"],
|
||
fn: ({ state: e }) => {
|
||
zw(e);
|
||
},
|
||
effect: ({ state: e }) => () => {
|
||
zw(e);
|
||
}
|
||
}, zw = (e) => {
|
||
if (!e.elements.arrow)
|
||
return;
|
||
const t = e.elements.arrow.querySelector(
|
||
"[data-popper-arrow-inner]"
|
||
);
|
||
if (!t)
|
||
return;
|
||
const n = NN(e.placement);
|
||
n && t.style.setProperty("--popper-arrow-default-shadow", n), Object.assign(t.style, {
|
||
transform: "rotate(45deg)",
|
||
background: Rr.arrowBg.varRef,
|
||
top: 0,
|
||
left: 0,
|
||
width: "100%",
|
||
height: "100%",
|
||
position: "absolute",
|
||
zIndex: "inherit",
|
||
boxShadow: "var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"
|
||
});
|
||
}, WN = {
|
||
"start-start": { ltr: "left-start", rtl: "right-start" },
|
||
"start-end": { ltr: "left-end", rtl: "right-end" },
|
||
"end-start": { ltr: "right-start", rtl: "left-start" },
|
||
"end-end": { ltr: "right-end", rtl: "left-end" },
|
||
start: { ltr: "left", rtl: "right" },
|
||
end: { ltr: "right", rtl: "left" }
|
||
}, GN = {
|
||
"auto-start": "auto-end",
|
||
"auto-end": "auto-start",
|
||
"top-start": "top-end",
|
||
"top-end": "top-start",
|
||
"bottom-start": "bottom-end",
|
||
"bottom-end": "bottom-start"
|
||
};
|
||
function qN(e, t = "ltr") {
|
||
var n, i;
|
||
const o = ((n = WN[e]) == null ? void 0 : n[t]) || e;
|
||
return t === "ltr" ? o : (i = GN[e]) != null ? i : o;
|
||
}
|
||
var ni = "top", Ui = "bottom", Hi = "right", ri = "left", l0 = "auto", _h = [ni, Ui, Hi, ri], df = "start", wh = "end", YN = "clippingParents", Zj = "viewport", ah = "popper", QN = "reference", Iw = /* @__PURE__ */ _h.reduce(function(e, t) {
|
||
return e.concat([t + "-" + df, t + "-" + wh]);
|
||
}, []), Jj = /* @__PURE__ */ [].concat(_h, [l0]).reduce(function(e, t) {
|
||
return e.concat([t, t + "-" + df, t + "-" + wh]);
|
||
}, []), XN = "beforeRead", KN = "read", ZN = "afterRead", JN = "beforeMain", $N = "main", ez = "afterMain", tz = "beforeWrite", nz = "write", rz = "afterWrite", Mx = [XN, KN, ZN, JN, $N, ez, tz, nz, rz];
|
||
function rs(e) {
|
||
return e ? (e.nodeName || "").toLowerCase() : null;
|
||
}
|
||
function Vi(e) {
|
||
if (e == null)
|
||
return window;
|
||
if (e.toString() !== "[object Window]") {
|
||
var t = e.ownerDocument;
|
||
return t && t.defaultView || window;
|
||
}
|
||
return e;
|
||
}
|
||
function oc(e) {
|
||
var t = Vi(e).Element;
|
||
return e instanceof t || e instanceof Element;
|
||
}
|
||
function Si(e) {
|
||
var t = Vi(e).HTMLElement;
|
||
return e instanceof t || e instanceof HTMLElement;
|
||
}
|
||
function NS(e) {
|
||
if (typeof ShadowRoot > "u")
|
||
return !1;
|
||
var t = Vi(e).ShadowRoot;
|
||
return e instanceof t || e instanceof ShadowRoot;
|
||
}
|
||
function az(e) {
|
||
var t = e.state;
|
||
Object.keys(t.elements).forEach(function(n) {
|
||
var i = t.styles[n] || {}, o = t.attributes[n] || {}, l = t.elements[n];
|
||
!Si(l) || !rs(l) || (Object.assign(l.style, i), Object.keys(o).forEach(function(f) {
|
||
var h = o[f];
|
||
h === !1 ? l.removeAttribute(f) : l.setAttribute(f, h === !0 ? "" : h);
|
||
}));
|
||
});
|
||
}
|
||
function iz(e) {
|
||
var t = e.state, n = {
|
||
popper: {
|
||
position: t.options.strategy,
|
||
left: "0",
|
||
top: "0",
|
||
margin: "0"
|
||
},
|
||
arrow: {
|
||
position: "absolute"
|
||
},
|
||
reference: {}
|
||
};
|
||
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
||
Object.keys(t.elements).forEach(function(i) {
|
||
var o = t.elements[i], l = t.attributes[i] || {}, f = Object.keys(t.styles.hasOwnProperty(i) ? t.styles[i] : n[i]), h = f.reduce(function(y, m) {
|
||
return y[m] = "", y;
|
||
}, {});
|
||
!Si(o) || !rs(o) || (Object.assign(o.style, h), Object.keys(l).forEach(function(y) {
|
||
o.removeAttribute(y);
|
||
}));
|
||
});
|
||
};
|
||
}
|
||
const oz = {
|
||
name: "applyStyles",
|
||
enabled: !0,
|
||
phase: "write",
|
||
fn: az,
|
||
effect: iz,
|
||
requires: ["computeStyles"]
|
||
};
|
||
function yo(e) {
|
||
return e.split("-")[0];
|
||
}
|
||
var nc = Math.max, Hg = Math.min, ff = Math.round;
|
||
function Rx() {
|
||
var e = navigator.userAgentData;
|
||
return e != null && e.brands ? e.brands.map(function(t) {
|
||
return t.brand + "/" + t.version;
|
||
}).join(" ") : navigator.userAgent;
|
||
}
|
||
function $j() {
|
||
return !/^((?!chrome|android).)*safari/i.test(Rx());
|
||
}
|
||
function pf(e, t, n) {
|
||
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
||
var i = e.getBoundingClientRect(), o = 1, l = 1;
|
||
t && Si(e) && (o = e.offsetWidth > 0 && ff(i.width) / e.offsetWidth || 1, l = e.offsetHeight > 0 && ff(i.height) / e.offsetHeight || 1);
|
||
var f = oc(e) ? Vi(e) : window, h = f.visualViewport, y = !$j() && n, m = (i.left + (y && h ? h.offsetLeft : 0)) / o, x = (i.top + (y && h ? h.offsetTop : 0)) / l, b = i.width / o, E = i.height / l;
|
||
return {
|
||
width: b,
|
||
height: E,
|
||
top: x,
|
||
right: m + b,
|
||
bottom: x + E,
|
||
left: m,
|
||
x: m,
|
||
y: x
|
||
};
|
||
}
|
||
function zS(e) {
|
||
var t = pf(e), n = e.offsetWidth, i = e.offsetHeight;
|
||
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - i) <= 1 && (i = t.height), {
|
||
x: e.offsetLeft,
|
||
y: e.offsetTop,
|
||
width: n,
|
||
height: i
|
||
};
|
||
}
|
||
function eT(e, t) {
|
||
var n = t.getRootNode && t.getRootNode();
|
||
if (e.contains(t))
|
||
return !0;
|
||
if (n && NS(n)) {
|
||
var i = t;
|
||
do {
|
||
if (i && e.isSameNode(i))
|
||
return !0;
|
||
i = i.parentNode || i.host;
|
||
} while (i);
|
||
}
|
||
return !1;
|
||
}
|
||
function So(e) {
|
||
return Vi(e).getComputedStyle(e);
|
||
}
|
||
function sz(e) {
|
||
return ["table", "td", "th"].indexOf(rs(e)) >= 0;
|
||
}
|
||
function Jl(e) {
|
||
return ((oc(e) ? e.ownerDocument : (
|
||
// $FlowFixMe[prop-missing]
|
||
e.document
|
||
)) || window.document).documentElement;
|
||
}
|
||
function u0(e) {
|
||
return rs(e) === "html" ? e : (
|
||
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
||
// $FlowFixMe[incompatible-return]
|
||
// $FlowFixMe[prop-missing]
|
||
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
||
e.parentNode || // DOM Element detected
|
||
(NS(e) ? e.host : null) || // ShadowRoot detected
|
||
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
||
Jl(e)
|
||
);
|
||
}
|
||
function Lw(e) {
|
||
return !Si(e) || // https://github.com/popperjs/popper-core/issues/837
|
||
So(e).position === "fixed" ? null : e.offsetParent;
|
||
}
|
||
function lz(e) {
|
||
var t = /firefox/i.test(Rx()), n = /Trident/i.test(Rx());
|
||
if (n && Si(e)) {
|
||
var i = So(e);
|
||
if (i.position === "fixed")
|
||
return null;
|
||
}
|
||
var o = u0(e);
|
||
for (NS(o) && (o = o.host); Si(o) && ["html", "body"].indexOf(rs(o)) < 0; ) {
|
||
var l = So(o);
|
||
if (l.transform !== "none" || l.perspective !== "none" || l.contain === "paint" || ["transform", "perspective"].indexOf(l.willChange) !== -1 || t && l.willChange === "filter" || t && l.filter && l.filter !== "none")
|
||
return o;
|
||
o = o.parentNode;
|
||
}
|
||
return null;
|
||
}
|
||
function Uh(e) {
|
||
for (var t = Vi(e), n = Lw(e); n && sz(n) && So(n).position === "static"; )
|
||
n = Lw(n);
|
||
return n && (rs(n) === "html" || rs(n) === "body" && So(n).position === "static") ? t : n || lz(e) || t;
|
||
}
|
||
function IS(e) {
|
||
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
||
}
|
||
function fh(e, t, n) {
|
||
return nc(e, Hg(t, n));
|
||
}
|
||
function uz(e, t, n) {
|
||
var i = fh(e, t, n);
|
||
return i > n ? n : i;
|
||
}
|
||
function tT() {
|
||
return {
|
||
top: 0,
|
||
right: 0,
|
||
bottom: 0,
|
||
left: 0
|
||
};
|
||
}
|
||
function nT(e) {
|
||
return Object.assign({}, tT(), e);
|
||
}
|
||
function rT(e, t) {
|
||
return t.reduce(function(n, i) {
|
||
return n[i] = e, n;
|
||
}, {});
|
||
}
|
||
var cz = function(t, n) {
|
||
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
||
placement: n.placement
|
||
})) : t, nT(typeof t != "number" ? t : rT(t, _h));
|
||
};
|
||
function dz(e) {
|
||
var t, n = e.state, i = e.name, o = e.options, l = n.elements.arrow, f = n.modifiersData.popperOffsets, h = yo(n.placement), y = IS(h), m = [ri, Hi].indexOf(h) >= 0, x = m ? "height" : "width";
|
||
if (!(!l || !f)) {
|
||
var b = cz(o.padding, n), E = zS(l), j = y === "y" ? ni : ri, M = y === "y" ? Ui : Hi, R = n.rects.reference[x] + n.rects.reference[y] - f[y] - n.rects.popper[x], k = f[y] - n.rects.reference[y], A = Uh(l), L = A ? y === "y" ? A.clientHeight || 0 : A.clientWidth || 0 : 0, z = R / 2 - k / 2, I = b[j], _ = L - E[x] - b[M], U = L / 2 - E[x] / 2 + z, B = fh(I, U, _), q = y;
|
||
n.modifiersData[i] = (t = {}, t[q] = B, t.centerOffset = B - U, t);
|
||
}
|
||
}
|
||
function fz(e) {
|
||
var t = e.state, n = e.options, i = n.element, o = i === void 0 ? "[data-popper-arrow]" : i;
|
||
if (o != null && !(typeof o == "string" && (o = t.elements.popper.querySelector(o), !o))) {
|
||
if (process.env.NODE_ENV !== "production" && (Si(o) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !eT(t.elements.popper, o)) {
|
||
process.env.NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
|
||
return;
|
||
}
|
||
t.elements.arrow = o;
|
||
}
|
||
}
|
||
const pz = {
|
||
name: "arrow",
|
||
enabled: !0,
|
||
phase: "main",
|
||
fn: dz,
|
||
effect: fz,
|
||
requires: ["popperOffsets"],
|
||
requiresIfExists: ["preventOverflow"]
|
||
};
|
||
function hf(e) {
|
||
return e.split("-")[1];
|
||
}
|
||
var hz = {
|
||
top: "auto",
|
||
right: "auto",
|
||
bottom: "auto",
|
||
left: "auto"
|
||
};
|
||
function vz(e) {
|
||
var t = e.x, n = e.y, i = window, o = i.devicePixelRatio || 1;
|
||
return {
|
||
x: ff(t * o) / o || 0,
|
||
y: ff(n * o) / o || 0
|
||
};
|
||
}
|
||
function Fw(e) {
|
||
var t, n = e.popper, i = e.popperRect, o = e.placement, l = e.variation, f = e.offsets, h = e.position, y = e.gpuAcceleration, m = e.adaptive, x = e.roundOffsets, b = e.isFixed, E = f.x, j = E === void 0 ? 0 : E, M = f.y, R = M === void 0 ? 0 : M, k = typeof x == "function" ? x({
|
||
x: j,
|
||
y: R
|
||
}) : {
|
||
x: j,
|
||
y: R
|
||
};
|
||
j = k.x, R = k.y;
|
||
var A = f.hasOwnProperty("x"), L = f.hasOwnProperty("y"), z = ri, I = ni, _ = window;
|
||
if (m) {
|
||
var U = Uh(n), B = "clientHeight", q = "clientWidth";
|
||
if (U === Vi(n) && (U = Jl(n), So(U).position !== "static" && h === "absolute" && (B = "scrollHeight", q = "scrollWidth")), U = U, o === ni || (o === ri || o === Hi) && l === wh) {
|
||
I = Ui;
|
||
var J = b && U === _ && _.visualViewport ? _.visualViewport.height : (
|
||
// $FlowFixMe[prop-missing]
|
||
U[B]
|
||
);
|
||
R -= J - i.height, R *= y ? 1 : -1;
|
||
}
|
||
if (o === ri || (o === ni || o === Ui) && l === wh) {
|
||
z = Hi;
|
||
var G = b && U === _ && _.visualViewport ? _.visualViewport.width : (
|
||
// $FlowFixMe[prop-missing]
|
||
U[q]
|
||
);
|
||
j -= G - i.width, j *= y ? 1 : -1;
|
||
}
|
||
}
|
||
var H = Object.assign({
|
||
position: h
|
||
}, m && hz), le = x === !0 ? vz({
|
||
x: j,
|
||
y: R
|
||
}) : {
|
||
x: j,
|
||
y: R
|
||
};
|
||
if (j = le.x, R = le.y, y) {
|
||
var ae;
|
||
return Object.assign({}, H, (ae = {}, ae[I] = L ? "0" : "", ae[z] = A ? "0" : "", ae.transform = (_.devicePixelRatio || 1) <= 1 ? "translate(" + j + "px, " + R + "px)" : "translate3d(" + j + "px, " + R + "px, 0)", ae));
|
||
}
|
||
return Object.assign({}, H, (t = {}, t[I] = L ? R + "px" : "", t[z] = A ? j + "px" : "", t.transform = "", t));
|
||
}
|
||
function mz(e) {
|
||
var t = e.state, n = e.options, i = n.gpuAcceleration, o = i === void 0 ? !0 : i, l = n.adaptive, f = l === void 0 ? !0 : l, h = n.roundOffsets, y = h === void 0 ? !0 : h;
|
||
if (process.env.NODE_ENV !== "production") {
|
||
var m = So(t.elements.popper).transitionProperty || "";
|
||
f && ["transform", "top", "right", "bottom", "left"].some(function(b) {
|
||
return m.indexOf(b) >= 0;
|
||
}) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
|
||
|
||
`, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `
|
||
|
||
`, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
|
||
}
|
||
var x = {
|
||
placement: yo(t.placement),
|
||
variation: hf(t.placement),
|
||
popper: t.elements.popper,
|
||
popperRect: t.rects.popper,
|
||
gpuAcceleration: o,
|
||
isFixed: t.options.strategy === "fixed"
|
||
};
|
||
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Fw(Object.assign({}, x, {
|
||
offsets: t.modifiersData.popperOffsets,
|
||
position: t.options.strategy,
|
||
adaptive: f,
|
||
roundOffsets: y
|
||
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Fw(Object.assign({}, x, {
|
||
offsets: t.modifiersData.arrow,
|
||
position: "absolute",
|
||
adaptive: !1,
|
||
roundOffsets: y
|
||
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
||
"data-popper-placement": t.placement
|
||
});
|
||
}
|
||
const gz = {
|
||
name: "computeStyles",
|
||
enabled: !0,
|
||
phase: "beforeWrite",
|
||
fn: mz,
|
||
data: {}
|
||
};
|
||
var ig = {
|
||
passive: !0
|
||
};
|
||
function yz(e) {
|
||
var t = e.state, n = e.instance, i = e.options, o = i.scroll, l = o === void 0 ? !0 : o, f = i.resize, h = f === void 0 ? !0 : f, y = Vi(t.elements.popper), m = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
||
return l && m.forEach(function(x) {
|
||
x.addEventListener("scroll", n.update, ig);
|
||
}), h && y.addEventListener("resize", n.update, ig), function() {
|
||
l && m.forEach(function(x) {
|
||
x.removeEventListener("scroll", n.update, ig);
|
||
}), h && y.removeEventListener("resize", n.update, ig);
|
||
};
|
||
}
|
||
const xz = {
|
||
name: "eventListeners",
|
||
enabled: !0,
|
||
phase: "write",
|
||
fn: function() {
|
||
},
|
||
effect: yz,
|
||
data: {}
|
||
};
|
||
var Sz = {
|
||
left: "right",
|
||
right: "left",
|
||
bottom: "top",
|
||
top: "bottom"
|
||
};
|
||
function Dg(e) {
|
||
return e.replace(/left|right|bottom|top/g, function(t) {
|
||
return Sz[t];
|
||
});
|
||
}
|
||
var bz = {
|
||
start: "end",
|
||
end: "start"
|
||
};
|
||
function Bw(e) {
|
||
return e.replace(/start|end/g, function(t) {
|
||
return bz[t];
|
||
});
|
||
}
|
||
function LS(e) {
|
||
var t = Vi(e), n = t.pageXOffset, i = t.pageYOffset;
|
||
return {
|
||
scrollLeft: n,
|
||
scrollTop: i
|
||
};
|
||
}
|
||
function FS(e) {
|
||
return pf(Jl(e)).left + LS(e).scrollLeft;
|
||
}
|
||
function Cz(e, t) {
|
||
var n = Vi(e), i = Jl(e), o = n.visualViewport, l = i.clientWidth, f = i.clientHeight, h = 0, y = 0;
|
||
if (o) {
|
||
l = o.width, f = o.height;
|
||
var m = $j();
|
||
(m || !m && t === "fixed") && (h = o.offsetLeft, y = o.offsetTop);
|
||
}
|
||
return {
|
||
width: l,
|
||
height: f,
|
||
x: h + FS(e),
|
||
y
|
||
};
|
||
}
|
||
function wz(e) {
|
||
var t, n = Jl(e), i = LS(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, l = nc(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), f = nc(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), h = -i.scrollLeft + FS(e), y = -i.scrollTop;
|
||
return So(o || n).direction === "rtl" && (h += nc(n.clientWidth, o ? o.clientWidth : 0) - l), {
|
||
width: l,
|
||
height: f,
|
||
x: h,
|
||
y
|
||
};
|
||
}
|
||
function BS(e) {
|
||
var t = So(e), n = t.overflow, i = t.overflowX, o = t.overflowY;
|
||
return /auto|scroll|overlay|hidden/.test(n + o + i);
|
||
}
|
||
function aT(e) {
|
||
return ["html", "body", "#document"].indexOf(rs(e)) >= 0 ? e.ownerDocument.body : Si(e) && BS(e) ? e : aT(u0(e));
|
||
}
|
||
function ph(e, t) {
|
||
var n;
|
||
t === void 0 && (t = []);
|
||
var i = aT(e), o = i === ((n = e.ownerDocument) == null ? void 0 : n.body), l = Vi(i), f = o ? [l].concat(l.visualViewport || [], BS(i) ? i : []) : i, h = t.concat(f);
|
||
return o ? h : (
|
||
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
||
h.concat(ph(u0(f)))
|
||
);
|
||
}
|
||
function kx(e) {
|
||
return Object.assign({}, e, {
|
||
left: e.x,
|
||
top: e.y,
|
||
right: e.x + e.width,
|
||
bottom: e.y + e.height
|
||
});
|
||
}
|
||
function Ez(e, t) {
|
||
var n = pf(e, !1, t === "fixed");
|
||
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
||
}
|
||
function _w(e, t, n) {
|
||
return t === Zj ? kx(Cz(e, n)) : oc(t) ? Ez(t, n) : kx(wz(Jl(e)));
|
||
}
|
||
function jz(e) {
|
||
var t = ph(u0(e)), n = ["absolute", "fixed"].indexOf(So(e).position) >= 0, i = n && Si(e) ? Uh(e) : e;
|
||
return oc(i) ? t.filter(function(o) {
|
||
return oc(o) && eT(o, i) && rs(o) !== "body";
|
||
}) : [];
|
||
}
|
||
function Tz(e, t, n, i) {
|
||
var o = t === "clippingParents" ? jz(e) : [].concat(t), l = [].concat(o, [n]), f = l[0], h = l.reduce(function(y, m) {
|
||
var x = _w(e, m, i);
|
||
return y.top = nc(x.top, y.top), y.right = Hg(x.right, y.right), y.bottom = Hg(x.bottom, y.bottom), y.left = nc(x.left, y.left), y;
|
||
}, _w(e, f, i));
|
||
return h.width = h.right - h.left, h.height = h.bottom - h.top, h.x = h.left, h.y = h.top, h;
|
||
}
|
||
function iT(e) {
|
||
var t = e.reference, n = e.element, i = e.placement, o = i ? yo(i) : null, l = i ? hf(i) : null, f = t.x + t.width / 2 - n.width / 2, h = t.y + t.height / 2 - n.height / 2, y;
|
||
switch (o) {
|
||
case ni:
|
||
y = {
|
||
x: f,
|
||
y: t.y - n.height
|
||
};
|
||
break;
|
||
case Ui:
|
||
y = {
|
||
x: f,
|
||
y: t.y + t.height
|
||
};
|
||
break;
|
||
case Hi:
|
||
y = {
|
||
x: t.x + t.width,
|
||
y: h
|
||
};
|
||
break;
|
||
case ri:
|
||
y = {
|
||
x: t.x - n.width,
|
||
y: h
|
||
};
|
||
break;
|
||
default:
|
||
y = {
|
||
x: t.x,
|
||
y: t.y
|
||
};
|
||
}
|
||
var m = o ? IS(o) : null;
|
||
if (m != null) {
|
||
var x = m === "y" ? "height" : "width";
|
||
switch (l) {
|
||
case df:
|
||
y[m] = y[m] - (t[x] / 2 - n[x] / 2);
|
||
break;
|
||
case wh:
|
||
y[m] = y[m] + (t[x] / 2 - n[x] / 2);
|
||
break;
|
||
}
|
||
}
|
||
return y;
|
||
}
|
||
function Eh(e, t) {
|
||
t === void 0 && (t = {});
|
||
var n = t, i = n.placement, o = i === void 0 ? e.placement : i, l = n.strategy, f = l === void 0 ? e.strategy : l, h = n.boundary, y = h === void 0 ? YN : h, m = n.rootBoundary, x = m === void 0 ? Zj : m, b = n.elementContext, E = b === void 0 ? ah : b, j = n.altBoundary, M = j === void 0 ? !1 : j, R = n.padding, k = R === void 0 ? 0 : R, A = nT(typeof k != "number" ? k : rT(k, _h)), L = E === ah ? QN : ah, z = e.rects.popper, I = e.elements[M ? L : E], _ = Tz(oc(I) ? I : I.contextElement || Jl(e.elements.popper), y, x, f), U = pf(e.elements.reference), B = iT({
|
||
reference: U,
|
||
element: z,
|
||
strategy: "absolute",
|
||
placement: o
|
||
}), q = kx(Object.assign({}, z, B)), J = E === ah ? q : U, G = {
|
||
top: _.top - J.top + A.top,
|
||
bottom: J.bottom - _.bottom + A.bottom,
|
||
left: _.left - J.left + A.left,
|
||
right: J.right - _.right + A.right
|
||
}, H = e.modifiersData.offset;
|
||
if (E === ah && H) {
|
||
var le = H[o];
|
||
Object.keys(G).forEach(function(ae) {
|
||
var he = [Hi, Ui].indexOf(ae) >= 0 ? 1 : -1, Te = [ni, Ui].indexOf(ae) >= 0 ? "y" : "x";
|
||
G[ae] += le[Te] * he;
|
||
});
|
||
}
|
||
return G;
|
||
}
|
||
function Dz(e, t) {
|
||
t === void 0 && (t = {});
|
||
var n = t, i = n.placement, o = n.boundary, l = n.rootBoundary, f = n.padding, h = n.flipVariations, y = n.allowedAutoPlacements, m = y === void 0 ? Jj : y, x = hf(i), b = x ? h ? Iw : Iw.filter(function(M) {
|
||
return hf(M) === x;
|
||
}) : _h, E = b.filter(function(M) {
|
||
return m.indexOf(M) >= 0;
|
||
});
|
||
E.length === 0 && (E = b, process.env.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")));
|
||
var j = E.reduce(function(M, R) {
|
||
return M[R] = Eh(e, {
|
||
placement: R,
|
||
boundary: o,
|
||
rootBoundary: l,
|
||
padding: f
|
||
})[yo(R)], M;
|
||
}, {});
|
||
return Object.keys(j).sort(function(M, R) {
|
||
return j[M] - j[R];
|
||
});
|
||
}
|
||
function Mz(e) {
|
||
if (yo(e) === l0)
|
||
return [];
|
||
var t = Dg(e);
|
||
return [Bw(e), t, Bw(t)];
|
||
}
|
||
function Rz(e) {
|
||
var t = e.state, n = e.options, i = e.name;
|
||
if (!t.modifiersData[i]._skip) {
|
||
for (var o = n.mainAxis, l = o === void 0 ? !0 : o, f = n.altAxis, h = f === void 0 ? !0 : f, y = n.fallbackPlacements, m = n.padding, x = n.boundary, b = n.rootBoundary, E = n.altBoundary, j = n.flipVariations, M = j === void 0 ? !0 : j, R = n.allowedAutoPlacements, k = t.options.placement, A = yo(k), L = A === k, z = y || (L || !M ? [Dg(k)] : Mz(k)), I = [k].concat(z).reduce(function(se, ve) {
|
||
return se.concat(yo(ve) === l0 ? Dz(t, {
|
||
placement: ve,
|
||
boundary: x,
|
||
rootBoundary: b,
|
||
padding: m,
|
||
flipVariations: M,
|
||
allowedAutoPlacements: R
|
||
}) : ve);
|
||
}, []), _ = t.rects.reference, U = t.rects.popper, B = /* @__PURE__ */ new Map(), q = !0, J = I[0], G = 0; G < I.length; G++) {
|
||
var H = I[G], le = yo(H), ae = hf(H) === df, he = [ni, Ui].indexOf(le) >= 0, Te = he ? "width" : "height", xe = Eh(t, {
|
||
placement: H,
|
||
boundary: x,
|
||
rootBoundary: b,
|
||
altBoundary: E,
|
||
padding: m
|
||
}), $ = he ? ae ? Hi : ri : ae ? Ui : ni;
|
||
_[Te] > U[Te] && ($ = Dg($));
|
||
var Y = Dg($), te = [];
|
||
if (l && te.push(xe[le] <= 0), h && te.push(xe[$] <= 0, xe[Y] <= 0), te.every(function(se) {
|
||
return se;
|
||
})) {
|
||
J = H, q = !1;
|
||
break;
|
||
}
|
||
B.set(H, te);
|
||
}
|
||
if (q)
|
||
for (var V = M ? 3 : 1, ne = function(ve) {
|
||
var Ce = I.find(function(Ae) {
|
||
var Ve = B.get(Ae);
|
||
if (Ve)
|
||
return Ve.slice(0, ve).every(function(tt) {
|
||
return tt;
|
||
});
|
||
});
|
||
if (Ce)
|
||
return J = Ce, "break";
|
||
}, we = V; we > 0; we--) {
|
||
var Ee = ne(we);
|
||
if (Ee === "break")
|
||
break;
|
||
}
|
||
t.placement !== J && (t.modifiersData[i]._skip = !0, t.placement = J, t.reset = !0);
|
||
}
|
||
}
|
||
const kz = {
|
||
name: "flip",
|
||
enabled: !0,
|
||
phase: "main",
|
||
fn: Rz,
|
||
requiresIfExists: ["offset"],
|
||
data: {
|
||
_skip: !1
|
||
}
|
||
};
|
||
function Uw(e, t, n) {
|
||
return n === void 0 && (n = {
|
||
x: 0,
|
||
y: 0
|
||
}), {
|
||
top: e.top - t.height - n.y,
|
||
right: e.right - t.width + n.x,
|
||
bottom: e.bottom - t.height + n.y,
|
||
left: e.left - t.width - n.x
|
||
};
|
||
}
|
||
function Hw(e) {
|
||
return [ni, Hi, Ui, ri].some(function(t) {
|
||
return e[t] >= 0;
|
||
});
|
||
}
|
||
function Pz(e) {
|
||
var t = e.state, n = e.name, i = t.rects.reference, o = t.rects.popper, l = t.modifiersData.preventOverflow, f = Eh(t, {
|
||
elementContext: "reference"
|
||
}), h = Eh(t, {
|
||
altBoundary: !0
|
||
}), y = Uw(f, i), m = Uw(h, o, l), x = Hw(y), b = Hw(m);
|
||
t.modifiersData[n] = {
|
||
referenceClippingOffsets: y,
|
||
popperEscapeOffsets: m,
|
||
isReferenceHidden: x,
|
||
hasPopperEscaped: b
|
||
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
||
"data-popper-reference-hidden": x,
|
||
"data-popper-escaped": b
|
||
});
|
||
}
|
||
const Oz = {
|
||
name: "hide",
|
||
enabled: !0,
|
||
phase: "main",
|
||
requiresIfExists: ["preventOverflow"],
|
||
fn: Pz
|
||
};
|
||
function Az(e, t, n) {
|
||
var i = yo(e), o = [ri, ni].indexOf(i) >= 0 ? -1 : 1, l = typeof n == "function" ? n(Object.assign({}, t, {
|
||
placement: e
|
||
})) : n, f = l[0], h = l[1];
|
||
return f = f || 0, h = (h || 0) * o, [ri, Hi].indexOf(i) >= 0 ? {
|
||
x: h,
|
||
y: f
|
||
} : {
|
||
x: f,
|
||
y: h
|
||
};
|
||
}
|
||
function Nz(e) {
|
||
var t = e.state, n = e.options, i = e.name, o = n.offset, l = o === void 0 ? [0, 0] : o, f = Jj.reduce(function(x, b) {
|
||
return x[b] = Az(b, t.rects, l), x;
|
||
}, {}), h = f[t.placement], y = h.x, m = h.y;
|
||
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += y, t.modifiersData.popperOffsets.y += m), t.modifiersData[i] = f;
|
||
}
|
||
const zz = {
|
||
name: "offset",
|
||
enabled: !0,
|
||
phase: "main",
|
||
requires: ["popperOffsets"],
|
||
fn: Nz
|
||
};
|
||
function Iz(e) {
|
||
var t = e.state, n = e.name;
|
||
t.modifiersData[n] = iT({
|
||
reference: t.rects.reference,
|
||
element: t.rects.popper,
|
||
strategy: "absolute",
|
||
placement: t.placement
|
||
});
|
||
}
|
||
const Lz = {
|
||
name: "popperOffsets",
|
||
enabled: !0,
|
||
phase: "read",
|
||
fn: Iz,
|
||
data: {}
|
||
};
|
||
function Fz(e) {
|
||
return e === "x" ? "y" : "x";
|
||
}
|
||
function Bz(e) {
|
||
var t = e.state, n = e.options, i = e.name, o = n.mainAxis, l = o === void 0 ? !0 : o, f = n.altAxis, h = f === void 0 ? !1 : f, y = n.boundary, m = n.rootBoundary, x = n.altBoundary, b = n.padding, E = n.tether, j = E === void 0 ? !0 : E, M = n.tetherOffset, R = M === void 0 ? 0 : M, k = Eh(t, {
|
||
boundary: y,
|
||
rootBoundary: m,
|
||
padding: b,
|
||
altBoundary: x
|
||
}), A = yo(t.placement), L = hf(t.placement), z = !L, I = IS(A), _ = Fz(I), U = t.modifiersData.popperOffsets, B = t.rects.reference, q = t.rects.popper, J = typeof R == "function" ? R(Object.assign({}, t.rects, {
|
||
placement: t.placement
|
||
})) : R, G = typeof J == "number" ? {
|
||
mainAxis: J,
|
||
altAxis: J
|
||
} : Object.assign({
|
||
mainAxis: 0,
|
||
altAxis: 0
|
||
}, J), H = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, le = {
|
||
x: 0,
|
||
y: 0
|
||
};
|
||
if (U) {
|
||
if (l) {
|
||
var ae, he = I === "y" ? ni : ri, Te = I === "y" ? Ui : Hi, xe = I === "y" ? "height" : "width", $ = U[I], Y = $ + k[he], te = $ - k[Te], V = j ? -q[xe] / 2 : 0, ne = L === df ? B[xe] : q[xe], we = L === df ? -q[xe] : -B[xe], Ee = t.elements.arrow, se = j && Ee ? zS(Ee) : {
|
||
width: 0,
|
||
height: 0
|
||
}, ve = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : tT(), Ce = ve[he], Ae = ve[Te], Ve = fh(0, B[xe], se[xe]), tt = z ? B[xe] / 2 - V - Ve - Ce - G.mainAxis : ne - Ve - Ce - G.mainAxis, at = z ? -B[xe] / 2 + V + Ve + Ae + G.mainAxis : we + Ve + Ae + G.mainAxis, ze = t.elements.arrow && Uh(t.elements.arrow), Qe = ze ? I === "y" ? ze.clientTop || 0 : ze.clientLeft || 0 : 0, Et = (ae = H == null ? void 0 : H[I]) != null ? ae : 0, Xe = $ + tt - Et - Qe, ht = $ + at - Et, Ht = fh(j ? Hg(Y, Xe) : Y, $, j ? nc(te, ht) : te);
|
||
U[I] = Ht, le[I] = Ht - $;
|
||
}
|
||
if (h) {
|
||
var Ot, on = I === "x" ? ni : ri, En = I === "x" ? Ui : Hi, ee = U[_], We = _ === "y" ? "height" : "width", Fe = ee + k[on], ot = ee - k[En], me = [ni, ri].indexOf(A) !== -1, Le = (Ot = H == null ? void 0 : H[_]) != null ? Ot : 0, Dt = me ? Fe : ee - B[We] - q[We] - Le + G.altAxis, Vt = me ? ee + B[We] + q[We] - Le - G.altAxis : ot, ke = j && me ? uz(Dt, ee, Vt) : fh(j ? Dt : Fe, ee, j ? Vt : ot);
|
||
U[_] = ke, le[_] = ke - ee;
|
||
}
|
||
t.modifiersData[i] = le;
|
||
}
|
||
}
|
||
const _z = {
|
||
name: "preventOverflow",
|
||
enabled: !0,
|
||
phase: "main",
|
||
fn: Bz,
|
||
requiresIfExists: ["offset"]
|
||
};
|
||
function Uz(e) {
|
||
return {
|
||
scrollLeft: e.scrollLeft,
|
||
scrollTop: e.scrollTop
|
||
};
|
||
}
|
||
function Hz(e) {
|
||
return e === Vi(e) || !Si(e) ? LS(e) : Uz(e);
|
||
}
|
||
function Vz(e) {
|
||
var t = e.getBoundingClientRect(), n = ff(t.width) / e.offsetWidth || 1, i = ff(t.height) / e.offsetHeight || 1;
|
||
return n !== 1 || i !== 1;
|
||
}
|
||
function Wz(e, t, n) {
|
||
n === void 0 && (n = !1);
|
||
var i = Si(t), o = Si(t) && Vz(t), l = Jl(t), f = pf(e, o, n), h = {
|
||
scrollLeft: 0,
|
||
scrollTop: 0
|
||
}, y = {
|
||
x: 0,
|
||
y: 0
|
||
};
|
||
return (i || !i && !n) && ((rs(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
||
BS(l)) && (h = Hz(t)), Si(t) ? (y = pf(t, !0), y.x += t.clientLeft, y.y += t.clientTop) : l && (y.x = FS(l))), {
|
||
x: f.left + h.scrollLeft - y.x,
|
||
y: f.top + h.scrollTop - y.y,
|
||
width: f.width,
|
||
height: f.height
|
||
};
|
||
}
|
||
function Gz(e) {
|
||
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), i = [];
|
||
e.forEach(function(l) {
|
||
t.set(l.name, l);
|
||
});
|
||
function o(l) {
|
||
n.add(l.name);
|
||
var f = [].concat(l.requires || [], l.requiresIfExists || []);
|
||
f.forEach(function(h) {
|
||
if (!n.has(h)) {
|
||
var y = t.get(h);
|
||
y && o(y);
|
||
}
|
||
}), i.push(l);
|
||
}
|
||
return e.forEach(function(l) {
|
||
n.has(l.name) || o(l);
|
||
}), i;
|
||
}
|
||
function qz(e) {
|
||
var t = Gz(e);
|
||
return Mx.reduce(function(n, i) {
|
||
return n.concat(t.filter(function(o) {
|
||
return o.phase === i;
|
||
}));
|
||
}, []);
|
||
}
|
||
function Yz(e) {
|
||
var t;
|
||
return function() {
|
||
return t || (t = new Promise(function(n) {
|
||
Promise.resolve().then(function() {
|
||
t = void 0, n(e());
|
||
});
|
||
})), t;
|
||
};
|
||
}
|
||
function Nl(e) {
|
||
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
|
||
n[i - 1] = arguments[i];
|
||
return [].concat(n).reduce(function(o, l) {
|
||
return o.replace(/%s/, l);
|
||
}, e);
|
||
}
|
||
var _u = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', Qz = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Vw = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
||
function Xz(e) {
|
||
e.forEach(function(t) {
|
||
[].concat(Object.keys(t), Vw).filter(function(n, i, o) {
|
||
return o.indexOf(n) === i;
|
||
}).forEach(function(n) {
|
||
switch (n) {
|
||
case "name":
|
||
typeof t.name != "string" && console.error(Nl(_u, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
|
||
break;
|
||
case "enabled":
|
||
typeof t.enabled != "boolean" && console.error(Nl(_u, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
|
||
break;
|
||
case "phase":
|
||
Mx.indexOf(t.phase) < 0 && console.error(Nl(_u, t.name, '"phase"', "either " + Mx.join(", "), '"' + String(t.phase) + '"'));
|
||
break;
|
||
case "fn":
|
||
typeof t.fn != "function" && console.error(Nl(_u, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
|
||
break;
|
||
case "effect":
|
||
t.effect != null && typeof t.effect != "function" && console.error(Nl(_u, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
|
||
break;
|
||
case "requires":
|
||
t.requires != null && !Array.isArray(t.requires) && console.error(Nl(_u, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
|
||
break;
|
||
case "requiresIfExists":
|
||
Array.isArray(t.requiresIfExists) || console.error(Nl(_u, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
|
||
break;
|
||
case "options":
|
||
case "data":
|
||
break;
|
||
default:
|
||
console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + Vw.map(function(i) {
|
||
return '"' + i + '"';
|
||
}).join(", ") + '; but "' + n + '" was provided.');
|
||
}
|
||
t.requires && t.requires.forEach(function(i) {
|
||
e.find(function(o) {
|
||
return o.name === i;
|
||
}) == null && console.error(Nl(Qz, String(t.name), i, i));
|
||
});
|
||
});
|
||
});
|
||
}
|
||
function Kz(e, t) {
|
||
var n = /* @__PURE__ */ new Set();
|
||
return e.filter(function(i) {
|
||
var o = t(i);
|
||
if (!n.has(o))
|
||
return n.add(o), !0;
|
||
});
|
||
}
|
||
function Zz(e) {
|
||
var t = e.reduce(function(n, i) {
|
||
var o = n[i.name];
|
||
return n[i.name] = o ? Object.assign({}, o, i, {
|
||
options: Object.assign({}, o.options, i.options),
|
||
data: Object.assign({}, o.data, i.data)
|
||
}) : i, n;
|
||
}, {});
|
||
return Object.keys(t).map(function(n) {
|
||
return t[n];
|
||
});
|
||
}
|
||
var Ww = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", Jz = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", Gw = {
|
||
placement: "bottom",
|
||
modifiers: [],
|
||
strategy: "absolute"
|
||
};
|
||
function qw() {
|
||
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
||
t[n] = arguments[n];
|
||
return !t.some(function(i) {
|
||
return !(i && typeof i.getBoundingClientRect == "function");
|
||
});
|
||
}
|
||
function $z(e) {
|
||
e === void 0 && (e = {});
|
||
var t = e, n = t.defaultModifiers, i = n === void 0 ? [] : n, o = t.defaultOptions, l = o === void 0 ? Gw : o;
|
||
return function(h, y, m) {
|
||
m === void 0 && (m = l);
|
||
var x = {
|
||
placement: "bottom",
|
||
orderedModifiers: [],
|
||
options: Object.assign({}, Gw, l),
|
||
modifiersData: {},
|
||
elements: {
|
||
reference: h,
|
||
popper: y
|
||
},
|
||
attributes: {},
|
||
styles: {}
|
||
}, b = [], E = !1, j = {
|
||
state: x,
|
||
setOptions: function(A) {
|
||
var L = typeof A == "function" ? A(x.options) : A;
|
||
R(), x.options = Object.assign({}, l, x.options, L), x.scrollParents = {
|
||
reference: oc(h) ? ph(h) : h.contextElement ? ph(h.contextElement) : [],
|
||
popper: ph(y)
|
||
};
|
||
var z = qz(Zz([].concat(i, x.options.modifiers)));
|
||
if (x.orderedModifiers = z.filter(function(H) {
|
||
return H.enabled;
|
||
}), process.env.NODE_ENV !== "production") {
|
||
var I = Kz([].concat(z, x.options.modifiers), function(H) {
|
||
var le = H.name;
|
||
return le;
|
||
});
|
||
if (Xz(I), yo(x.options.placement) === l0) {
|
||
var _ = x.orderedModifiers.find(function(H) {
|
||
var le = H.name;
|
||
return le === "flip";
|
||
});
|
||
_ || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
||
}
|
||
var U = So(y), B = U.marginTop, q = U.marginRight, J = U.marginBottom, G = U.marginLeft;
|
||
[B, q, J, G].some(function(H) {
|
||
return parseFloat(H);
|
||
}) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
|
||
}
|
||
return M(), j.update();
|
||
},
|
||
// Sync update – it will always be executed, even if not necessary. This
|
||
// is useful for low frequency updates where sync behavior simplifies the
|
||
// logic.
|
||
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
||
// prefer the async Popper#update method
|
||
forceUpdate: function() {
|
||
if (!E) {
|
||
var A = x.elements, L = A.reference, z = A.popper;
|
||
if (!qw(L, z)) {
|
||
process.env.NODE_ENV !== "production" && console.error(Ww);
|
||
return;
|
||
}
|
||
x.rects = {
|
||
reference: Wz(L, Uh(z), x.options.strategy === "fixed"),
|
||
popper: zS(z)
|
||
}, x.reset = !1, x.placement = x.options.placement, x.orderedModifiers.forEach(function(H) {
|
||
return x.modifiersData[H.name] = Object.assign({}, H.data);
|
||
});
|
||
for (var I = 0, _ = 0; _ < x.orderedModifiers.length; _++) {
|
||
if (process.env.NODE_ENV !== "production" && (I += 1, I > 100)) {
|
||
console.error(Jz);
|
||
break;
|
||
}
|
||
if (x.reset === !0) {
|
||
x.reset = !1, _ = -1;
|
||
continue;
|
||
}
|
||
var U = x.orderedModifiers[_], B = U.fn, q = U.options, J = q === void 0 ? {} : q, G = U.name;
|
||
typeof B == "function" && (x = B({
|
||
state: x,
|
||
options: J,
|
||
name: G,
|
||
instance: j
|
||
}) || x);
|
||
}
|
||
}
|
||
},
|
||
// Async and optimistically optimized update – it will not be executed if
|
||
// not necessary (debounced to run at most once-per-tick)
|
||
update: Yz(function() {
|
||
return new Promise(function(k) {
|
||
j.forceUpdate(), k(x);
|
||
});
|
||
}),
|
||
destroy: function() {
|
||
R(), E = !0;
|
||
}
|
||
};
|
||
if (!qw(h, y))
|
||
return process.env.NODE_ENV !== "production" && console.error(Ww), j;
|
||
j.setOptions(m).then(function(k) {
|
||
!E && m.onFirstUpdate && m.onFirstUpdate(k);
|
||
});
|
||
function M() {
|
||
x.orderedModifiers.forEach(function(k) {
|
||
var A = k.name, L = k.options, z = L === void 0 ? {} : L, I = k.effect;
|
||
if (typeof I == "function") {
|
||
var _ = I({
|
||
state: x,
|
||
name: A,
|
||
instance: j,
|
||
options: z
|
||
}), U = function() {
|
||
};
|
||
b.push(_ || U);
|
||
}
|
||
});
|
||
}
|
||
function R() {
|
||
b.forEach(function(k) {
|
||
return k();
|
||
}), b = [];
|
||
}
|
||
return j;
|
||
};
|
||
}
|
||
var eI = [xz, Lz, gz, oz, zz, kz, _z, pz, Oz], tI = /* @__PURE__ */ $z({
|
||
defaultModifiers: eI
|
||
});
|
||
function _S(e = {}) {
|
||
const {
|
||
enabled: t = !0,
|
||
modifiers: n,
|
||
placement: i = "bottom",
|
||
strategy: o = "absolute",
|
||
arrowPadding: l = 8,
|
||
eventListeners: f = !0,
|
||
offset: h,
|
||
gutter: y = 8,
|
||
flip: m = !0,
|
||
boundary: x = "clippingParents",
|
||
preventOverflow: b = !0,
|
||
matchWidth: E,
|
||
direction: j = "ltr"
|
||
} = e, M = He(null), R = He(null), k = He(null), A = qN(i, j), L = He(() => {
|
||
}), z = Q(() => {
|
||
var G;
|
||
!t || !M.current || !R.current || ((G = L.current) == null || G.call(L), k.current = tI(M.current, R.current, {
|
||
placement: A,
|
||
modifiers: [
|
||
VN,
|
||
_N,
|
||
BN,
|
||
{
|
||
...FN,
|
||
enabled: !!E
|
||
},
|
||
{
|
||
name: "eventListeners",
|
||
...LN(f)
|
||
},
|
||
{
|
||
name: "arrow",
|
||
options: { padding: l }
|
||
},
|
||
{
|
||
name: "offset",
|
||
options: {
|
||
offset: h ?? [0, y]
|
||
}
|
||
},
|
||
{
|
||
name: "flip",
|
||
enabled: !!m,
|
||
options: { padding: 8 }
|
||
},
|
||
{
|
||
name: "preventOverflow",
|
||
enabled: !!b,
|
||
options: { boundary: x }
|
||
},
|
||
...n ?? []
|
||
],
|
||
strategy: o
|
||
}), k.current.forceUpdate(), L.current = k.current.destroy);
|
||
}, [
|
||
A,
|
||
t,
|
||
n,
|
||
E,
|
||
f,
|
||
l,
|
||
h,
|
||
y,
|
||
m,
|
||
b,
|
||
x,
|
||
o
|
||
]);
|
||
rt(() => () => {
|
||
var G;
|
||
!M.current && !R.current && ((G = k.current) == null || G.destroy(), k.current = null);
|
||
}, []);
|
||
const I = Q(
|
||
(G) => {
|
||
M.current = G, z();
|
||
},
|
||
[z]
|
||
), _ = Q(
|
||
(G = {}, H = null) => ({
|
||
...G,
|
||
ref: Rn(I, H)
|
||
}),
|
||
[I]
|
||
), U = Q(
|
||
(G) => {
|
||
R.current = G, z();
|
||
},
|
||
[z]
|
||
), B = Q(
|
||
(G = {}, H = null) => ({
|
||
...G,
|
||
ref: Rn(U, H),
|
||
style: {
|
||
...G.style,
|
||
position: o,
|
||
minWidth: E ? void 0 : "max-content",
|
||
inset: "0 auto auto 0"
|
||
}
|
||
}),
|
||
[o, U, E]
|
||
), q = Q((G = {}, H = null) => {
|
||
const { size: le, shadowColor: ae, bg: he, style: Te, ...xe } = G;
|
||
return {
|
||
...xe,
|
||
ref: H,
|
||
"data-popper-arrow": "",
|
||
style: nI(G)
|
||
};
|
||
}, []), J = Q(
|
||
(G = {}, H = null) => ({
|
||
...G,
|
||
ref: H,
|
||
"data-popper-arrow-inner": ""
|
||
}),
|
||
[]
|
||
);
|
||
return {
|
||
update() {
|
||
var G;
|
||
(G = k.current) == null || G.update();
|
||
},
|
||
forceUpdate() {
|
||
var G;
|
||
(G = k.current) == null || G.forceUpdate();
|
||
},
|
||
transformOrigin: Rr.transformOrigin.varRef,
|
||
referenceRef: I,
|
||
popperRef: U,
|
||
getPopperProps: B,
|
||
getArrowProps: q,
|
||
getArrowInnerProps: J,
|
||
getReferenceProps: _
|
||
};
|
||
}
|
||
function nI(e) {
|
||
const { size: t, shadowColor: n, bg: i, style: o } = e, l = { ...o, position: "absolute" };
|
||
return t && (l["--popper-arrow-size"] = t), n && (l["--popper-arrow-shadow-color"] = n), i && (l["--popper-arrow-bg"] = i), l;
|
||
}
|
||
function US(e = {}) {
|
||
const {
|
||
onClose: t,
|
||
onOpen: n,
|
||
isOpen: i,
|
||
id: o
|
||
} = e, l = kr(n), f = kr(t), [h, y] = qe(e.defaultIsOpen || !1), m = i !== void 0 ? i : h, x = i !== void 0, b = bi(), E = o ?? `disclosure-${b}`, j = Q(() => {
|
||
x || y(!1), f == null || f();
|
||
}, [x, f]), M = Q(() => {
|
||
x || y(!0), l == null || l();
|
||
}, [x, l]), R = Q(() => {
|
||
m ? j() : M();
|
||
}, [m, M, j]);
|
||
function k(L = {}) {
|
||
return {
|
||
...L,
|
||
"aria-expanded": m,
|
||
"aria-controls": E,
|
||
onClick(z) {
|
||
var I;
|
||
(I = L.onClick) == null || I.call(L, z), R();
|
||
}
|
||
};
|
||
}
|
||
function A(L = {}) {
|
||
return {
|
||
...L,
|
||
hidden: !m,
|
||
id: E
|
||
};
|
||
}
|
||
return {
|
||
isOpen: m,
|
||
onOpen: M,
|
||
onClose: j,
|
||
onToggle: R,
|
||
isControlled: x,
|
||
getButtonProps: k,
|
||
getDisclosureProps: A
|
||
};
|
||
}
|
||
function rI(e) {
|
||
const { ref: t, handler: n, enabled: i = !0 } = e, o = kr(n), f = He({
|
||
isPointerDown: !1,
|
||
ignoreEmulatedMouseEvents: !1
|
||
}).current;
|
||
rt(() => {
|
||
if (!i)
|
||
return;
|
||
const h = (b) => {
|
||
T2(b, t) && (f.isPointerDown = !0);
|
||
}, y = (b) => {
|
||
if (f.ignoreEmulatedMouseEvents) {
|
||
f.ignoreEmulatedMouseEvents = !1;
|
||
return;
|
||
}
|
||
f.isPointerDown && n && T2(b, t) && (f.isPointerDown = !1, o(b));
|
||
}, m = (b) => {
|
||
f.ignoreEmulatedMouseEvents = !0, n && f.isPointerDown && T2(b, t) && (f.isPointerDown = !1, o(b));
|
||
}, x = oT(t.current);
|
||
return x.addEventListener("mousedown", h, !0), x.addEventListener("mouseup", y, !0), x.addEventListener("touchstart", h, !0), x.addEventListener("touchend", m, !0), () => {
|
||
x.removeEventListener("mousedown", h, !0), x.removeEventListener("mouseup", y, !0), x.removeEventListener("touchstart", h, !0), x.removeEventListener("touchend", m, !0);
|
||
};
|
||
}, [n, t, o, f, i]);
|
||
}
|
||
function T2(e, t) {
|
||
var n;
|
||
const i = e.target;
|
||
return e.button > 0 || i && !oT(i).contains(i) ? !1 : !((n = t.current) != null && n.contains(i));
|
||
}
|
||
function oT(e) {
|
||
var t;
|
||
return (t = e == null ? void 0 : e.ownerDocument) != null ? t : document;
|
||
}
|
||
function sT(e) {
|
||
const { isOpen: t, ref: n } = e, [i, o] = qe(t), [l, f] = qe(!1);
|
||
return rt(() => {
|
||
l || (o(t), f(!0));
|
||
}, [t, l, i]), ec(
|
||
() => n.current,
|
||
"animationend",
|
||
() => {
|
||
o(t);
|
||
}
|
||
), {
|
||
present: !(t ? !1 : !i),
|
||
onComplete() {
|
||
var y;
|
||
const m = iN(n.current), x = new m.CustomEvent("animationend", { bubbles: !0 });
|
||
(y = n.current) == null || y.dispatchEvent(x);
|
||
}
|
||
};
|
||
}
|
||
function HS(e) {
|
||
const { wasSelected: t, enabled: n, isSelected: i, mode: o = "unmount" } = e;
|
||
return !!(!n || i || o === "keepMounted" && t);
|
||
}
|
||
var [
|
||
aI,
|
||
iI,
|
||
oI,
|
||
sI
|
||
] = cS(), [lI, Hh] = Qn({
|
||
strict: !1,
|
||
name: "MenuContext"
|
||
});
|
||
function uI(e, ...t) {
|
||
const n = bi(), i = e || n;
|
||
return an(() => t.map((o) => `${o}-${i}`), [i, t]);
|
||
}
|
||
function lT(e) {
|
||
var t;
|
||
return (t = e == null ? void 0 : e.ownerDocument) != null ? t : document;
|
||
}
|
||
function Yw(e) {
|
||
return lT(e).activeElement === e;
|
||
}
|
||
function cI(e = {}) {
|
||
const {
|
||
id: t,
|
||
closeOnSelect: n = !0,
|
||
closeOnBlur: i = !0,
|
||
initialFocusRef: o,
|
||
autoSelect: l = !0,
|
||
isLazy: f,
|
||
isOpen: h,
|
||
defaultIsOpen: y,
|
||
onClose: m,
|
||
onOpen: x,
|
||
placement: b = "bottom-start",
|
||
lazyBehavior: E = "unmount",
|
||
direction: j,
|
||
computePositionOnMount: M = !1,
|
||
...R
|
||
} = e, k = He(null), A = He(null), L = oI(), z = Q(() => {
|
||
requestAnimationFrame(() => {
|
||
var Ee;
|
||
(Ee = k.current) == null || Ee.focus({ preventScroll: !1 });
|
||
});
|
||
}, []), I = Q(() => {
|
||
const Ee = setTimeout(() => {
|
||
var se;
|
||
if (o)
|
||
(se = o.current) == null || se.focus();
|
||
else {
|
||
const ve = L.firstEnabled();
|
||
ve && ae(ve.index);
|
||
}
|
||
});
|
||
Y.current.add(Ee);
|
||
}, [L, o]), _ = Q(() => {
|
||
const Ee = setTimeout(() => {
|
||
const se = L.lastEnabled();
|
||
se && ae(se.index);
|
||
});
|
||
Y.current.add(Ee);
|
||
}, [L]), U = Q(() => {
|
||
x == null || x(), l ? I() : z();
|
||
}, [l, I, z, x]), { isOpen: B, onOpen: q, onClose: J, onToggle: G } = US({
|
||
isOpen: h,
|
||
defaultIsOpen: y,
|
||
onClose: m,
|
||
onOpen: U
|
||
});
|
||
rI({
|
||
enabled: B && i,
|
||
ref: k,
|
||
handler: (Ee) => {
|
||
var se;
|
||
(se = A.current) != null && se.contains(Ee.target) || J();
|
||
}
|
||
});
|
||
const H = _S({
|
||
...R,
|
||
enabled: B || M,
|
||
placement: b,
|
||
direction: j
|
||
}), [le, ae] = qe(-1);
|
||
fc(() => {
|
||
B || ae(-1);
|
||
}, [B]), Kj(k, {
|
||
focusRef: A,
|
||
visible: B,
|
||
shouldFocus: !0
|
||
});
|
||
const he = sT({ isOpen: B, ref: k }), [Te, xe] = uI(t, "menu-button", "menu-list"), $ = Q(() => {
|
||
q(), z();
|
||
}, [q, z]), Y = He(/* @__PURE__ */ new Set([]));
|
||
gI(() => {
|
||
Y.current.forEach((Ee) => clearTimeout(Ee)), Y.current.clear();
|
||
});
|
||
const te = Q(() => {
|
||
q(), I();
|
||
}, [I, q]), V = Q(() => {
|
||
q(), _();
|
||
}, [q, _]), ne = Q(() => {
|
||
var Ee, se;
|
||
const ve = lT(k.current), Ce = (Ee = k.current) == null ? void 0 : Ee.contains(ve.activeElement);
|
||
if (!(B && !Ce))
|
||
return;
|
||
const Ve = (se = L.item(le)) == null ? void 0 : se.node;
|
||
Ve == null || Ve.focus();
|
||
}, [B, le, L]), we = He(null);
|
||
return {
|
||
openAndFocusMenu: $,
|
||
openAndFocusFirstItem: te,
|
||
openAndFocusLastItem: V,
|
||
onTransitionEnd: ne,
|
||
unstable__animationState: he,
|
||
descendants: L,
|
||
popper: H,
|
||
buttonId: Te,
|
||
menuId: xe,
|
||
forceUpdate: H.forceUpdate,
|
||
orientation: "vertical",
|
||
isOpen: B,
|
||
onToggle: G,
|
||
onOpen: q,
|
||
onClose: J,
|
||
menuRef: k,
|
||
buttonRef: A,
|
||
focusedIndex: le,
|
||
closeOnSelect: n,
|
||
closeOnBlur: i,
|
||
autoSelect: l,
|
||
setFocusedIndex: ae,
|
||
isLazy: f,
|
||
lazyBehavior: E,
|
||
initialFocusRef: o,
|
||
rafId: we
|
||
};
|
||
}
|
||
function dI(e = {}, t = null) {
|
||
const n = Hh(), { onToggle: i, popper: o, openAndFocusFirstItem: l, openAndFocusLastItem: f } = n, h = Q(
|
||
(y) => {
|
||
const m = y.key, b = {
|
||
Enter: l,
|
||
ArrowDown: l,
|
||
ArrowUp: f
|
||
}[m];
|
||
b && (y.preventDefault(), y.stopPropagation(), b(y));
|
||
},
|
||
[l, f]
|
||
);
|
||
return {
|
||
...e,
|
||
ref: Rn(n.buttonRef, t, o.referenceRef),
|
||
id: n.buttonId,
|
||
"data-active": Yt(n.isOpen),
|
||
"aria-expanded": n.isOpen,
|
||
"aria-haspopup": "menu",
|
||
"aria-controls": n.menuId,
|
||
onClick: St(e.onClick, i),
|
||
onKeyDown: St(e.onKeyDown, h)
|
||
};
|
||
}
|
||
function Px(e) {
|
||
var t;
|
||
return vI(e) && !!((t = e == null ? void 0 : e.getAttribute("role")) != null && t.startsWith("menuitem"));
|
||
}
|
||
function fI(e = {}, t = null) {
|
||
const n = Hh();
|
||
if (!n)
|
||
throw new Error(
|
||
"useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>"
|
||
);
|
||
const {
|
||
focusedIndex: i,
|
||
setFocusedIndex: o,
|
||
menuRef: l,
|
||
isOpen: f,
|
||
onClose: h,
|
||
menuId: y,
|
||
isLazy: m,
|
||
lazyBehavior: x,
|
||
unstable__animationState: b
|
||
} = n, E = iI(), j = DN({
|
||
preventDefault: (A) => A.key !== " " && Px(A.target)
|
||
}), M = Q(
|
||
(A) => {
|
||
const L = A.key, I = {
|
||
Tab: (U) => U.preventDefault(),
|
||
Escape: h,
|
||
ArrowDown: () => {
|
||
const U = E.nextEnabled(i);
|
||
U && o(U.index);
|
||
},
|
||
ArrowUp: () => {
|
||
const U = E.prevEnabled(i);
|
||
U && o(U.index);
|
||
}
|
||
}[L];
|
||
if (I) {
|
||
A.preventDefault(), I(A);
|
||
return;
|
||
}
|
||
const _ = j((U) => {
|
||
const B = MN(
|
||
E.values(),
|
||
U,
|
||
(q) => {
|
||
var J, G;
|
||
return (G = (J = q == null ? void 0 : q.node) == null ? void 0 : J.textContent) != null ? G : "";
|
||
},
|
||
E.item(i)
|
||
);
|
||
if (B) {
|
||
const q = E.indexOf(B.node);
|
||
o(q);
|
||
}
|
||
});
|
||
Px(A.target) && _(A);
|
||
},
|
||
[
|
||
E,
|
||
i,
|
||
j,
|
||
h,
|
||
o
|
||
]
|
||
), R = He(!1);
|
||
f && (R.current = !0);
|
||
const k = HS({
|
||
wasSelected: R.current,
|
||
enabled: m,
|
||
mode: x,
|
||
isSelected: b.present
|
||
});
|
||
return {
|
||
...e,
|
||
ref: Rn(l, t),
|
||
children: k ? e.children : null,
|
||
tabIndex: -1,
|
||
role: "menu",
|
||
id: y,
|
||
style: {
|
||
...e.style,
|
||
transformOrigin: "var(--popper-transform-origin)"
|
||
},
|
||
"aria-orientation": "vertical",
|
||
onKeyDown: St(e.onKeyDown, M)
|
||
};
|
||
}
|
||
function pI(e = {}) {
|
||
const { popper: t, isOpen: n } = Hh();
|
||
return t.getPopperProps({
|
||
...e,
|
||
style: {
|
||
visibility: n ? "visible" : "hidden",
|
||
...e.style
|
||
}
|
||
});
|
||
}
|
||
function hI(e = {}, t = null) {
|
||
const {
|
||
onMouseEnter: n,
|
||
onMouseMove: i,
|
||
onMouseLeave: o,
|
||
onClick: l,
|
||
onFocus: f,
|
||
isDisabled: h,
|
||
isFocusable: y,
|
||
closeOnSelect: m,
|
||
type: x,
|
||
...b
|
||
} = e, E = Hh(), {
|
||
setFocusedIndex: j,
|
||
focusedIndex: M,
|
||
closeOnSelect: R,
|
||
onClose: k,
|
||
menuRef: A,
|
||
isOpen: L,
|
||
menuId: z,
|
||
rafId: I
|
||
} = E, _ = He(null), U = `${z}-menuitem-${bi()}`, { index: B, register: q } = sI({
|
||
disabled: h && !y
|
||
}), J = Q(
|
||
($) => {
|
||
n == null || n($), !h && j(B);
|
||
},
|
||
[j, B, h, n]
|
||
), G = Q(
|
||
($) => {
|
||
i == null || i($), _.current && !Yw(_.current) && J($);
|
||
},
|
||
[J, i]
|
||
), H = Q(
|
||
($) => {
|
||
o == null || o($), !h && j(-1);
|
||
},
|
||
[j, h, o]
|
||
), le = Q(
|
||
($) => {
|
||
l == null || l($), Px($.currentTarget) && (m ?? R) && k();
|
||
},
|
||
[k, l, R, m]
|
||
), ae = Q(
|
||
($) => {
|
||
f == null || f($), j(B);
|
||
},
|
||
[j, f, B]
|
||
), he = B === M, Te = h && !y;
|
||
fc(() => {
|
||
L && (he && !Te && _.current ? (I.current && cancelAnimationFrame(I.current), I.current = requestAnimationFrame(() => {
|
||
var $;
|
||
($ = _.current) == null || $.focus(), I.current = null;
|
||
})) : A.current && !Yw(A.current) && A.current.focus());
|
||
}, [he, Te, A, L]);
|
||
const xe = Xj({
|
||
onClick: le,
|
||
onFocus: ae,
|
||
onMouseEnter: J,
|
||
onMouseMove: G,
|
||
onMouseLeave: H,
|
||
ref: Rn(q, _, t),
|
||
isDisabled: h,
|
||
isFocusable: y
|
||
});
|
||
return {
|
||
...b,
|
||
...xe,
|
||
type: x ?? xe.type,
|
||
id: U,
|
||
role: "menuitem",
|
||
tabIndex: he ? 0 : -1
|
||
};
|
||
}
|
||
function vI(e) {
|
||
var t;
|
||
if (!mI(e))
|
||
return !1;
|
||
const n = (t = e.ownerDocument.defaultView) != null ? t : window;
|
||
return e instanceof n.HTMLElement;
|
||
}
|
||
function mI(e) {
|
||
return e != null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
||
}
|
||
function gI(e, t = []) {
|
||
return rt(
|
||
() => () => e(),
|
||
t
|
||
);
|
||
}
|
||
var [yI, c0] = Qn({
|
||
name: "MenuStylesContext",
|
||
errorMessage: `useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Menu />" `
|
||
}), VS = (e) => {
|
||
const { children: t } = e, n = Da("Menu", e), i = ar(e), { direction: o } = cc(), { descendants: l, ...f } = cI({ ...i, direction: o }), h = an(() => f, [f]), { isOpen: y, onClose: m, forceUpdate: x } = h;
|
||
return /* @__PURE__ */ c.jsx(aI, { value: l, children: /* @__PURE__ */ c.jsx(lI, { value: h, children: /* @__PURE__ */ c.jsx(yI, { value: n, children: Q5(t, { isOpen: y, onClose: m, forceUpdate: x }) }) }) });
|
||
};
|
||
VS.displayName = "Menu";
|
||
var uT = $e(
|
||
(e, t) => {
|
||
const n = c0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
ref: t,
|
||
...e,
|
||
__css: n.command,
|
||
className: "chakra-menu__command"
|
||
}
|
||
);
|
||
}
|
||
);
|
||
uT.displayName = "MenuCommand";
|
||
var xI = $e(
|
||
(e, t) => {
|
||
const { type: n, ...i } = e, o = c0(), l = i.as || n ? n ?? void 0 : "button", f = an(
|
||
() => ({
|
||
textDecoration: "none",
|
||
color: "inherit",
|
||
userSelect: "none",
|
||
display: "flex",
|
||
width: "100%",
|
||
alignItems: "center",
|
||
textAlign: "start",
|
||
flex: "0 0 auto",
|
||
outline: 0,
|
||
...o.item
|
||
}),
|
||
[o.item]
|
||
);
|
||
return /* @__PURE__ */ c.jsx(Be.button, { ref: t, type: l, ...i, __css: f });
|
||
}
|
||
), cT = (e) => {
|
||
const { className: t, children: n, ...i } = e, o = Kl.only(n), l = zh(o) ? Ci(o, {
|
||
focusable: "false",
|
||
"aria-hidden": !0,
|
||
className: At("chakra-menu__icon", o.props.className)
|
||
}) : null, f = At("chakra-menu__icon-wrapper", t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
className: f,
|
||
...i,
|
||
__css: {
|
||
flexShrink: 0
|
||
},
|
||
children: l
|
||
}
|
||
);
|
||
};
|
||
cT.displayName = "MenuIcon";
|
||
var Ko = $e((e, t) => {
|
||
const {
|
||
icon: n,
|
||
iconSpacing: i = "0.75rem",
|
||
command: o,
|
||
commandSpacing: l = "0.75rem",
|
||
children: f,
|
||
...h
|
||
} = e, y = hI(h, t), x = n || o ? /* @__PURE__ */ c.jsx("span", { style: { pointerEvents: "none", flex: 1 }, children: f }) : f;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
xI,
|
||
{
|
||
...y,
|
||
className: At("chakra-menu__menuitem", y.className),
|
||
children: [
|
||
n && /* @__PURE__ */ c.jsx(cT, { fontSize: "0.8em", marginEnd: i, children: n }),
|
||
x,
|
||
o && /* @__PURE__ */ c.jsx(uT, { marginStart: l, children: o })
|
||
]
|
||
}
|
||
);
|
||
});
|
||
Ko.displayName = "MenuItem";
|
||
var SI = {
|
||
enter: {
|
||
visibility: "visible",
|
||
opacity: 1,
|
||
scale: 1,
|
||
transition: {
|
||
duration: 0.2,
|
||
ease: [0.4, 0, 0.2, 1]
|
||
}
|
||
},
|
||
exit: {
|
||
transitionEnd: {
|
||
visibility: "hidden"
|
||
},
|
||
opacity: 0,
|
||
scale: 0.8,
|
||
transition: {
|
||
duration: 0.1,
|
||
easings: "easeOut"
|
||
}
|
||
}
|
||
}, bI = Be(Ws.div), WS = $e(function(t, n) {
|
||
var i, o;
|
||
const { rootProps: l, motionProps: f, ...h } = t, {
|
||
isOpen: y,
|
||
onTransitionEnd: m,
|
||
unstable__animationState: x
|
||
} = Hh(), b = fI(h, n), E = pI(l), j = c0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...E,
|
||
__css: { zIndex: (o = t.zIndex) != null ? o : (i = j.list) == null ? void 0 : i.zIndex },
|
||
children: /* @__PURE__ */ c.jsx(
|
||
bI,
|
||
{
|
||
variants: SI,
|
||
initial: !1,
|
||
animate: y ? "enter" : "exit",
|
||
__css: { outline: 0, ...j.list },
|
||
...f,
|
||
className: At("chakra-menu__menu-list", b.className),
|
||
...b,
|
||
onUpdate: m,
|
||
onAnimationComplete: e0(
|
||
x.onComplete,
|
||
b.onAnimationComplete
|
||
)
|
||
}
|
||
)
|
||
}
|
||
);
|
||
});
|
||
WS.displayName = "MenuList";
|
||
var CI = $e((e, t) => {
|
||
const n = c0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.button,
|
||
{
|
||
ref: t,
|
||
...e,
|
||
__css: {
|
||
display: "inline-flex",
|
||
appearance: "none",
|
||
alignItems: "center",
|
||
outline: 0,
|
||
...n.button
|
||
}
|
||
}
|
||
);
|
||
}), GS = $e(
|
||
(e, t) => {
|
||
const { children: n, as: i, ...o } = e, l = dI(o, t), f = i || CI;
|
||
return /* @__PURE__ */ c.jsx(
|
||
f,
|
||
{
|
||
...l,
|
||
className: At("chakra-menu__menu-button", e.className),
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
__css: { pointerEvents: "none", flex: "1 1 auto", minW: 0 },
|
||
children: e.children
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
);
|
||
GS.displayName = "MenuButton";
|
||
var wI = {
|
||
slideInBottom: {
|
||
...mx,
|
||
custom: { offsetY: 16, reverse: !0 }
|
||
},
|
||
slideInRight: {
|
||
...mx,
|
||
custom: { offsetX: 16, reverse: !0 }
|
||
},
|
||
scale: {
|
||
...Y6,
|
||
custom: { initialScale: 0.95, reverse: !0 }
|
||
},
|
||
none: {}
|
||
}, EI = Be(Ws.section), jI = (e) => wI[e || "none"], dT = dc(
|
||
(e, t) => {
|
||
const { preset: n, motionProps: i = jI(n), ...o } = e;
|
||
return /* @__PURE__ */ c.jsx(EI, { ref: t, ...i, ...o });
|
||
}
|
||
);
|
||
dT.displayName = "ModalTransition";
|
||
var TI = Object.defineProperty, DI = (e, t, n) => t in e ? TI(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, MI = (e, t, n) => (DI(e, typeof t != "symbol" ? t + "" : t, n), n), RI = class {
|
||
constructor() {
|
||
MI(this, "modals"), this.modals = /* @__PURE__ */ new Map();
|
||
}
|
||
add(e) {
|
||
return this.modals.set(e, this.modals.size + 1), this.modals.size;
|
||
}
|
||
remove(e) {
|
||
this.modals.delete(e);
|
||
}
|
||
isTopModal(e) {
|
||
return e ? this.modals.get(e) === this.modals.size : !1;
|
||
}
|
||
}, Ox = new RI();
|
||
function fT(e, t) {
|
||
const [n, i] = qe(0);
|
||
return rt(() => {
|
||
const o = e.current;
|
||
if (o) {
|
||
if (t) {
|
||
const l = Ox.add(o);
|
||
i(l);
|
||
}
|
||
return () => {
|
||
Ox.remove(o), i(0);
|
||
};
|
||
}
|
||
}, [t, e]), n;
|
||
}
|
||
var kI = function(e) {
|
||
if (typeof document > "u")
|
||
return null;
|
||
var t = Array.isArray(e) ? e[0] : e;
|
||
return t.ownerDocument.body;
|
||
}, Hd = /* @__PURE__ */ new WeakMap(), og = /* @__PURE__ */ new WeakMap(), sg = {}, D2 = 0, pT = function(e) {
|
||
return e && (e.host || pT(e.parentNode));
|
||
}, PI = function(e, t) {
|
||
return t.map(function(n) {
|
||
if (e.contains(n))
|
||
return n;
|
||
var i = pT(n);
|
||
return i && e.contains(i) ? i : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
||
}).filter(function(n) {
|
||
return Boolean(n);
|
||
});
|
||
}, OI = function(e, t, n, i) {
|
||
var o = PI(t, Array.isArray(e) ? e : [e]);
|
||
sg[n] || (sg[n] = /* @__PURE__ */ new WeakMap());
|
||
var l = sg[n], f = [], h = /* @__PURE__ */ new Set(), y = new Set(o), m = function(b) {
|
||
!b || h.has(b) || (h.add(b), m(b.parentNode));
|
||
};
|
||
o.forEach(m);
|
||
var x = function(b) {
|
||
!b || y.has(b) || Array.prototype.forEach.call(b.children, function(E) {
|
||
if (h.has(E))
|
||
x(E);
|
||
else {
|
||
var j = E.getAttribute(i), M = j !== null && j !== "false", R = (Hd.get(E) || 0) + 1, k = (l.get(E) || 0) + 1;
|
||
Hd.set(E, R), l.set(E, k), f.push(E), R === 1 && M && og.set(E, !0), k === 1 && E.setAttribute(n, "true"), M || E.setAttribute(i, "true");
|
||
}
|
||
});
|
||
};
|
||
return x(t), h.clear(), D2++, function() {
|
||
f.forEach(function(b) {
|
||
var E = Hd.get(b) - 1, j = l.get(b) - 1;
|
||
Hd.set(b, E), l.set(b, j), E || (og.has(b) || b.removeAttribute(i), og.delete(b)), j || b.removeAttribute(n);
|
||
}), D2--, D2 || (Hd = /* @__PURE__ */ new WeakMap(), Hd = /* @__PURE__ */ new WeakMap(), og = /* @__PURE__ */ new WeakMap(), sg = {});
|
||
};
|
||
}, AI = function(e, t, n) {
|
||
n === void 0 && (n = "data-aria-hidden");
|
||
var i = Array.from(Array.isArray(e) ? e : [e]), o = t || kI(e);
|
||
return o ? (i.push.apply(i, Array.from(o.querySelectorAll("[aria-live]"))), OI(i, o, n, "aria-hidden")) : function() {
|
||
return null;
|
||
};
|
||
};
|
||
function NI(e) {
|
||
const {
|
||
isOpen: t,
|
||
onClose: n,
|
||
id: i,
|
||
closeOnOverlayClick: o = !0,
|
||
closeOnEsc: l = !0,
|
||
useInert: f = !0,
|
||
onOverlayClick: h,
|
||
onEsc: y
|
||
} = e, m = He(null), x = He(null), [b, E, j] = II(
|
||
i,
|
||
"chakra-modal",
|
||
"chakra-modal--header",
|
||
"chakra-modal--body"
|
||
);
|
||
zI(m, t && f), fT(m, t);
|
||
const M = He(null), R = Q((q) => {
|
||
M.current = q.target;
|
||
}, []), k = Q(
|
||
(q) => {
|
||
q.key === "Escape" && (q.stopPropagation(), l && (n == null || n()), y == null || y());
|
||
},
|
||
[l, n, y]
|
||
), [A, L] = qe(!1), [z, I] = qe(!1), _ = Q(
|
||
(q = {}, J = null) => ({
|
||
role: "dialog",
|
||
...q,
|
||
ref: Rn(J, m),
|
||
id: b,
|
||
tabIndex: -1,
|
||
"aria-modal": !0,
|
||
"aria-labelledby": A ? E : void 0,
|
||
"aria-describedby": z ? j : void 0,
|
||
onClick: St(
|
||
q.onClick,
|
||
(G) => G.stopPropagation()
|
||
)
|
||
}),
|
||
[j, z, b, E, A]
|
||
), U = Q(
|
||
(q) => {
|
||
q.stopPropagation(), M.current === q.target && Ox.isTopModal(m.current) && (o && (n == null || n()), h == null || h());
|
||
},
|
||
[n, o, h]
|
||
), B = Q(
|
||
(q = {}, J = null) => ({
|
||
...q,
|
||
ref: Rn(J, x),
|
||
onClick: St(q.onClick, U),
|
||
onKeyDown: St(q.onKeyDown, k),
|
||
onMouseDown: St(q.onMouseDown, R)
|
||
}),
|
||
[k, R, U]
|
||
);
|
||
return {
|
||
isOpen: t,
|
||
onClose: n,
|
||
headerId: E,
|
||
bodyId: j,
|
||
setBodyMounted: I,
|
||
setHeaderMounted: L,
|
||
dialogRef: m,
|
||
overlayRef: x,
|
||
getDialogProps: _,
|
||
getDialogContainerProps: B
|
||
};
|
||
}
|
||
function zI(e, t) {
|
||
const n = e.current;
|
||
rt(() => {
|
||
if (!(!e.current || !t))
|
||
return AI(e.current);
|
||
}, [t, e, n]);
|
||
}
|
||
function II(e, ...t) {
|
||
const n = bi(), i = e || n;
|
||
return an(() => t.map((o) => `${o}-${i}`), [i, t]);
|
||
}
|
||
var [LI, Ef] = Qn({
|
||
name: "ModalStylesContext",
|
||
errorMessage: `useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `
|
||
}), [FI, sc] = Qn({
|
||
strict: !0,
|
||
name: "ModalContext",
|
||
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"
|
||
}), ql = (e) => {
|
||
const t = {
|
||
scrollBehavior: "outside",
|
||
autoFocus: !0,
|
||
trapFocus: !0,
|
||
returnFocusOnClose: !0,
|
||
blockScrollOnMount: !0,
|
||
allowPinchZoom: !1,
|
||
motionPreset: "scale",
|
||
lockFocusAcrossFrames: !0,
|
||
...e
|
||
}, {
|
||
portalProps: n,
|
||
children: i,
|
||
autoFocus: o,
|
||
trapFocus: l,
|
||
initialFocusRef: f,
|
||
finalFocusRef: h,
|
||
returnFocusOnClose: y,
|
||
blockScrollOnMount: m,
|
||
allowPinchZoom: x,
|
||
preserveScrollBarGap: b,
|
||
motionPreset: E,
|
||
lockFocusAcrossFrames: j,
|
||
onCloseComplete: M
|
||
} = t, R = Da("Modal", t), A = {
|
||
...NI(t),
|
||
autoFocus: o,
|
||
trapFocus: l,
|
||
initialFocusRef: f,
|
||
finalFocusRef: h,
|
||
returnFocusOnClose: y,
|
||
blockScrollOnMount: m,
|
||
allowPinchZoom: x,
|
||
preserveScrollBarGap: b,
|
||
motionPreset: E,
|
||
lockFocusAcrossFrames: j
|
||
};
|
||
return /* @__PURE__ */ c.jsx(FI, { value: A, children: /* @__PURE__ */ c.jsx(LI, { value: R, children: /* @__PURE__ */ c.jsx(Sf, { onExitComplete: M, children: A.isOpen && /* @__PURE__ */ c.jsx(sS, { ...n, children: i }) }) }) });
|
||
};
|
||
ql.displayName = "Modal";
|
||
var Mg = "right-scroll-bar-position", Rg = "width-before-scroll-bar", BI = "with-scroll-bars-hidden", _I = "--removed-body-scroll-bar-size", hT = lj(), M2 = function() {
|
||
}, d0 = Je.forwardRef(function(e, t) {
|
||
var n = Je.useRef(null), i = Je.useState({
|
||
onScrollCapture: M2,
|
||
onWheelCapture: M2,
|
||
onTouchMoveCapture: M2
|
||
}), o = i[0], l = i[1], f = e.forwardProps, h = e.children, y = e.className, m = e.removeScrollBar, x = e.enabled, b = e.shards, E = e.sideCar, j = e.noIsolation, M = e.inert, R = e.allowPinchZoom, k = e.as, A = k === void 0 ? "div" : k, L = ij(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), z = E, I = aj([n, t]), _ = Jo(Jo({}, L), o);
|
||
return Je.createElement(
|
||
Je.Fragment,
|
||
null,
|
||
x && Je.createElement(z, { sideCar: hT, removeScrollBar: m, shards: b, noIsolation: j, inert: M, setCallbacks: l, allowPinchZoom: !!R, lockRef: n }),
|
||
f ? Je.cloneElement(Je.Children.only(h), Jo(Jo({}, _), { ref: I })) : Je.createElement(A, Jo({}, _, { className: y, ref: I }), h)
|
||
);
|
||
});
|
||
d0.defaultProps = {
|
||
enabled: !0,
|
||
removeScrollBar: !0,
|
||
inert: !1
|
||
};
|
||
d0.classNames = {
|
||
fullWidth: Rg,
|
||
zeroRight: Mg
|
||
};
|
||
var Qw, UI = function() {
|
||
if (Qw)
|
||
return Qw;
|
||
if (typeof __webpack_nonce__ < "u")
|
||
return __webpack_nonce__;
|
||
};
|
||
function HI() {
|
||
if (!document)
|
||
return null;
|
||
var e = document.createElement("style");
|
||
e.type = "text/css";
|
||
var t = UI();
|
||
return t && e.setAttribute("nonce", t), e;
|
||
}
|
||
function VI(e, t) {
|
||
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
||
}
|
||
function WI(e) {
|
||
var t = document.head || document.getElementsByTagName("head")[0];
|
||
t.appendChild(e);
|
||
}
|
||
var GI = function() {
|
||
var e = 0, t = null;
|
||
return {
|
||
add: function(n) {
|
||
e == 0 && (t = HI()) && (VI(t, n), WI(t)), e++;
|
||
},
|
||
remove: function() {
|
||
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
||
}
|
||
};
|
||
}, qI = function() {
|
||
var e = GI();
|
||
return function(t, n) {
|
||
Je.useEffect(function() {
|
||
return e.add(t), function() {
|
||
e.remove();
|
||
};
|
||
}, [t && n]);
|
||
};
|
||
}, vT = function() {
|
||
var e = qI(), t = function(n) {
|
||
var i = n.styles, o = n.dynamic;
|
||
return e(i, o), null;
|
||
};
|
||
return t;
|
||
}, YI = {
|
||
left: 0,
|
||
top: 0,
|
||
right: 0,
|
||
gap: 0
|
||
}, R2 = function(e) {
|
||
return parseInt(e || "", 10) || 0;
|
||
}, QI = function(e) {
|
||
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], i = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
||
return [R2(n), R2(i), R2(o)];
|
||
}, XI = function(e) {
|
||
if (e === void 0 && (e = "margin"), typeof window > "u")
|
||
return YI;
|
||
var t = QI(e), n = document.documentElement.clientWidth, i = window.innerWidth;
|
||
return {
|
||
left: t[0],
|
||
top: t[1],
|
||
right: t[2],
|
||
gap: Math.max(0, i - n + t[2] - t[0])
|
||
};
|
||
}, KI = vT(), ZI = function(e, t, n, i) {
|
||
var o = e.left, l = e.top, f = e.right, h = e.gap;
|
||
return n === void 0 && (n = "margin"), `
|
||
.`.concat(BI, ` {
|
||
overflow: hidden `).concat(i, `;
|
||
padding-right: `).concat(h, "px ").concat(i, `;
|
||
}
|
||
body {
|
||
overflow: hidden `).concat(i, `;
|
||
overscroll-behavior: contain;
|
||
`).concat([
|
||
t && "position: relative ".concat(i, ";"),
|
||
n === "margin" && `
|
||
padding-left: `.concat(o, `px;
|
||
padding-top: `).concat(l, `px;
|
||
padding-right: `).concat(f, `px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(h, "px ").concat(i, `;
|
||
`),
|
||
n === "padding" && "padding-right: ".concat(h, "px ").concat(i, ";")
|
||
].filter(Boolean).join(""), `
|
||
}
|
||
|
||
.`).concat(Mg, ` {
|
||
right: `).concat(h, "px ").concat(i, `;
|
||
}
|
||
|
||
.`).concat(Rg, ` {
|
||
margin-right: `).concat(h, "px ").concat(i, `;
|
||
}
|
||
|
||
.`).concat(Mg, " .").concat(Mg, ` {
|
||
right: 0 `).concat(i, `;
|
||
}
|
||
|
||
.`).concat(Rg, " .").concat(Rg, ` {
|
||
margin-right: 0 `).concat(i, `;
|
||
}
|
||
|
||
body {
|
||
`).concat(_I, ": ").concat(h, `px;
|
||
}
|
||
`);
|
||
}, JI = function(e) {
|
||
var t = e.noRelative, n = e.noImportant, i = e.gapMode, o = i === void 0 ? "margin" : i, l = Je.useMemo(function() {
|
||
return XI(o);
|
||
}, [o]);
|
||
return Je.createElement(KI, { styles: ZI(l, !t, o, n ? "" : "!important") });
|
||
}, Ax = !1;
|
||
if (typeof window < "u")
|
||
try {
|
||
var lg = Object.defineProperty({}, "passive", {
|
||
get: function() {
|
||
return Ax = !0, !0;
|
||
}
|
||
});
|
||
window.addEventListener("test", lg, lg), window.removeEventListener("test", lg, lg);
|
||
} catch {
|
||
Ax = !1;
|
||
}
|
||
var Vd = Ax ? { passive: !1 } : !1, $I = function(e) {
|
||
return e.tagName === "TEXTAREA";
|
||
}, mT = function(e, t) {
|
||
var n = window.getComputedStyle(e);
|
||
return (
|
||
// not-not-scrollable
|
||
n[t] !== "hidden" && // contains scroll inside self
|
||
!(n.overflowY === n.overflowX && !$I(e) && n[t] === "visible")
|
||
);
|
||
}, eL = function(e) {
|
||
return mT(e, "overflowY");
|
||
}, tL = function(e) {
|
||
return mT(e, "overflowX");
|
||
}, Xw = function(e, t) {
|
||
var n = t;
|
||
do {
|
||
typeof ShadowRoot < "u" && n instanceof ShadowRoot && (n = n.host);
|
||
var i = gT(e, n);
|
||
if (i) {
|
||
var o = yT(e, n), l = o[1], f = o[2];
|
||
if (l > f)
|
||
return !0;
|
||
}
|
||
n = n.parentNode;
|
||
} while (n && n !== document.body);
|
||
return !1;
|
||
}, nL = function(e) {
|
||
var t = e.scrollTop, n = e.scrollHeight, i = e.clientHeight;
|
||
return [
|
||
t,
|
||
n,
|
||
i
|
||
];
|
||
}, rL = function(e) {
|
||
var t = e.scrollLeft, n = e.scrollWidth, i = e.clientWidth;
|
||
return [
|
||
t,
|
||
n,
|
||
i
|
||
];
|
||
}, gT = function(e, t) {
|
||
return e === "v" ? eL(t) : tL(t);
|
||
}, yT = function(e, t) {
|
||
return e === "v" ? nL(t) : rL(t);
|
||
}, aL = function(e, t) {
|
||
return e === "h" && t === "rtl" ? -1 : 1;
|
||
}, iL = function(e, t, n, i, o) {
|
||
var l = aL(e, window.getComputedStyle(t).direction), f = l * i, h = n.target, y = t.contains(h), m = !1, x = f > 0, b = 0, E = 0;
|
||
do {
|
||
var j = yT(e, h), M = j[0], R = j[1], k = j[2], A = R - k - l * M;
|
||
(M || A) && gT(e, h) && (b += A, E += M), h = h.parentNode;
|
||
} while (
|
||
// portaled content
|
||
!y && h !== document.body || // self content
|
||
y && (t.contains(h) || t === h)
|
||
);
|
||
return (x && (o && b === 0 || !o && f > b) || !x && (o && E === 0 || !o && -f > E)) && (m = !0), m;
|
||
}, ug = function(e) {
|
||
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
||
}, Kw = function(e) {
|
||
return [e.deltaX, e.deltaY];
|
||
}, Zw = function(e) {
|
||
return e && "current" in e ? e.current : e;
|
||
}, oL = function(e, t) {
|
||
return e[0] === t[0] && e[1] === t[1];
|
||
}, sL = function(e) {
|
||
return `
|
||
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
||
`);
|
||
}, lL = 0, Wd = [];
|
||
function uL(e) {
|
||
var t = Je.useRef([]), n = Je.useRef([0, 0]), i = Je.useRef(), o = Je.useState(lL++)[0], l = Je.useState(function() {
|
||
return vT();
|
||
})[0], f = Je.useRef(e);
|
||
Je.useEffect(function() {
|
||
f.current = e;
|
||
}, [e]), Je.useEffect(function() {
|
||
if (e.inert) {
|
||
document.body.classList.add("block-interactivity-".concat(o));
|
||
var R = wx([e.lockRef.current], (e.shards || []).map(Zw), !0).filter(Boolean);
|
||
return R.forEach(function(k) {
|
||
return k.classList.add("allow-interactivity-".concat(o));
|
||
}), function() {
|
||
document.body.classList.remove("block-interactivity-".concat(o)), R.forEach(function(k) {
|
||
return k.classList.remove("allow-interactivity-".concat(o));
|
||
});
|
||
};
|
||
}
|
||
}, [e.inert, e.lockRef.current, e.shards]);
|
||
var h = Je.useCallback(function(R, k) {
|
||
if ("touches" in R && R.touches.length === 2)
|
||
return !f.current.allowPinchZoom;
|
||
var A = ug(R), L = n.current, z = "deltaX" in R ? R.deltaX : L[0] - A[0], I = "deltaY" in R ? R.deltaY : L[1] - A[1], _, U = R.target, B = Math.abs(z) > Math.abs(I) ? "h" : "v";
|
||
if ("touches" in R && B === "h" && U.type === "range")
|
||
return !1;
|
||
var q = Xw(B, U);
|
||
if (!q)
|
||
return !0;
|
||
if (q ? _ = B : (_ = B === "v" ? "h" : "v", q = Xw(B, U)), !q)
|
||
return !1;
|
||
if (!i.current && "changedTouches" in R && (z || I) && (i.current = _), !_)
|
||
return !0;
|
||
var J = i.current || _;
|
||
return iL(J, k, R, J === "h" ? z : I, !0);
|
||
}, []), y = Je.useCallback(function(R) {
|
||
var k = R;
|
||
if (!(!Wd.length || Wd[Wd.length - 1] !== l)) {
|
||
var A = "deltaY" in k ? Kw(k) : ug(k), L = t.current.filter(function(_) {
|
||
return _.name === k.type && _.target === k.target && oL(_.delta, A);
|
||
})[0];
|
||
if (L && L.should) {
|
||
k.cancelable && k.preventDefault();
|
||
return;
|
||
}
|
||
if (!L) {
|
||
var z = (f.current.shards || []).map(Zw).filter(Boolean).filter(function(_) {
|
||
return _.contains(k.target);
|
||
}), I = z.length > 0 ? h(k, z[0]) : !f.current.noIsolation;
|
||
I && k.cancelable && k.preventDefault();
|
||
}
|
||
}
|
||
}, []), m = Je.useCallback(function(R, k, A, L) {
|
||
var z = { name: R, delta: k, target: A, should: L };
|
||
t.current.push(z), setTimeout(function() {
|
||
t.current = t.current.filter(function(I) {
|
||
return I !== z;
|
||
});
|
||
}, 1);
|
||
}, []), x = Je.useCallback(function(R) {
|
||
n.current = ug(R), i.current = void 0;
|
||
}, []), b = Je.useCallback(function(R) {
|
||
m(R.type, Kw(R), R.target, h(R, e.lockRef.current));
|
||
}, []), E = Je.useCallback(function(R) {
|
||
m(R.type, ug(R), R.target, h(R, e.lockRef.current));
|
||
}, []);
|
||
Je.useEffect(function() {
|
||
return Wd.push(l), e.setCallbacks({
|
||
onScrollCapture: b,
|
||
onWheelCapture: b,
|
||
onTouchMoveCapture: E
|
||
}), document.addEventListener("wheel", y, Vd), document.addEventListener("touchmove", y, Vd), document.addEventListener("touchstart", x, Vd), function() {
|
||
Wd = Wd.filter(function(R) {
|
||
return R !== l;
|
||
}), document.removeEventListener("wheel", y, Vd), document.removeEventListener("touchmove", y, Vd), document.removeEventListener("touchstart", x, Vd);
|
||
};
|
||
}, []);
|
||
var j = e.removeScrollBar, M = e.inert;
|
||
return Je.createElement(
|
||
Je.Fragment,
|
||
null,
|
||
M ? Je.createElement(l, { styles: sL(o) }) : null,
|
||
j ? Je.createElement(JI, { gapMode: "margin" }) : null
|
||
);
|
||
}
|
||
const cL = lA(hT, uL);
|
||
var xT = Je.forwardRef(function(e, t) {
|
||
return Je.createElement(d0, Jo({}, e, { ref: t, sideCar: cL }));
|
||
});
|
||
xT.classNames = d0.classNames;
|
||
const dL = xT;
|
||
function fL(e) {
|
||
const {
|
||
autoFocus: t,
|
||
trapFocus: n,
|
||
dialogRef: i,
|
||
initialFocusRef: o,
|
||
blockScrollOnMount: l,
|
||
allowPinchZoom: f,
|
||
finalFocusRef: h,
|
||
returnFocusOnClose: y,
|
||
preserveScrollBarGap: m,
|
||
lockFocusAcrossFrames: x,
|
||
isOpen: b
|
||
} = sc(), [E, j] = vP();
|
||
rt(() => {
|
||
!E && j && setTimeout(j);
|
||
}, [E, j]);
|
||
const M = fT(i, b);
|
||
return /* @__PURE__ */ c.jsx(
|
||
_j,
|
||
{
|
||
autoFocus: t,
|
||
isDisabled: !n,
|
||
initialFocusRef: o,
|
||
finalFocusRef: h,
|
||
restoreFocus: y,
|
||
contentRef: i,
|
||
lockFocusAcrossFrames: x,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
dL,
|
||
{
|
||
removeScrollBar: !m,
|
||
allowPinchZoom: f,
|
||
enabled: M === 1 && l,
|
||
forwardProps: !0,
|
||
children: e.children
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
var Yl = $e(
|
||
(e, t) => {
|
||
const {
|
||
className: n,
|
||
children: i,
|
||
containerProps: o,
|
||
motionProps: l,
|
||
...f
|
||
} = e, { getDialogProps: h, getDialogContainerProps: y } = sc(), m = h(f, t), x = y(o), b = At("chakra-modal__content", n), E = Ef(), j = {
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
position: "relative",
|
||
width: "100%",
|
||
outline: 0,
|
||
...E.dialog
|
||
}, M = {
|
||
display: "flex",
|
||
width: "100vw",
|
||
height: "$100vh",
|
||
position: "fixed",
|
||
left: 0,
|
||
top: 0,
|
||
...E.dialogContainer
|
||
}, { motionPreset: R } = sc();
|
||
return /* @__PURE__ */ c.jsx(fL, { children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...x,
|
||
className: "chakra-modal__content-container",
|
||
tabIndex: -1,
|
||
__css: M,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
dT,
|
||
{
|
||
preset: R,
|
||
motionProps: l,
|
||
className: b,
|
||
...m,
|
||
__css: j,
|
||
children: i
|
||
}
|
||
)
|
||
}
|
||
) });
|
||
}
|
||
);
|
||
Yl.displayName = "ModalContent";
|
||
function ST(e) {
|
||
const { leastDestructiveRef: t, ...n } = e;
|
||
return /* @__PURE__ */ c.jsx(ql, { ...n, initialFocusRef: t });
|
||
}
|
||
var bT = $e(
|
||
(e, t) => /* @__PURE__ */ c.jsx(Yl, { ref: t, role: "alertdialog", ...e })
|
||
), Ls = $e(
|
||
(e, t) => {
|
||
const { className: n, ...i } = e, o = At("chakra-modal__footer", n), f = {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "flex-end",
|
||
...Ef().footer
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.footer,
|
||
{
|
||
ref: t,
|
||
...i,
|
||
__css: f,
|
||
className: o
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Ls.displayName = "ModalFooter";
|
||
var Fs = $e(
|
||
(e, t) => {
|
||
const { className: n, ...i } = e, { headerId: o, setHeaderMounted: l } = sc();
|
||
rt(() => (l(!0), () => l(!1)), [l]);
|
||
const f = At("chakra-modal__header", n), y = {
|
||
flex: 0,
|
||
...Ef().header
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.header,
|
||
{
|
||
ref: t,
|
||
className: f,
|
||
id: o,
|
||
...i,
|
||
__css: y
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Fs.displayName = "ModalHeader";
|
||
var pL = Be(Ws.div), Bs = $e(
|
||
(e, t) => {
|
||
const { className: n, transition: i, motionProps: o, ...l } = e, f = At("chakra-modal__overlay", n), y = {
|
||
pos: "fixed",
|
||
left: "0",
|
||
top: "0",
|
||
w: "100vw",
|
||
h: "100vh",
|
||
...Ef().overlay
|
||
}, { motionPreset: m } = sc(), b = o || (m === "none" ? {} : q6);
|
||
return /* @__PURE__ */ c.jsx(
|
||
pL,
|
||
{
|
||
...b,
|
||
__css: y,
|
||
ref: t,
|
||
className: f,
|
||
...l
|
||
}
|
||
);
|
||
}
|
||
);
|
||
Bs.displayName = "ModalOverlay";
|
||
var _s = $e((e, t) => {
|
||
const { className: n, ...i } = e, { bodyId: o, setBodyMounted: l } = sc();
|
||
rt(() => (l(!0), () => l(!1)), [l]);
|
||
const f = At("chakra-modal__body", n), h = Ef();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: t,
|
||
className: f,
|
||
id: o,
|
||
...i,
|
||
__css: h.body
|
||
}
|
||
);
|
||
});
|
||
_s.displayName = "ModalBody";
|
||
var jf = $e(
|
||
(e, t) => {
|
||
const { onClick: n, className: i, ...o } = e, { onClose: l } = sc(), f = At("chakra-modal__close-btn", i), h = Ef();
|
||
return /* @__PURE__ */ c.jsx(
|
||
mP,
|
||
{
|
||
ref: t,
|
||
__css: h.closeButton,
|
||
className: f,
|
||
onClick: St(n, (y) => {
|
||
y.stopPropagation(), l();
|
||
}),
|
||
...o
|
||
}
|
||
);
|
||
}
|
||
);
|
||
jf.displayName = "ModalCloseButton";
|
||
var hL = (e) => /* @__PURE__ */ c.jsx(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ c.jsx(
|
||
"path",
|
||
{
|
||
fill: "currentColor",
|
||
d: "M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"
|
||
}
|
||
) }), vL = (e) => /* @__PURE__ */ c.jsx(Zr, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ c.jsx(
|
||
"path",
|
||
{
|
||
fill: "currentColor",
|
||
d: "M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"
|
||
}
|
||
) });
|
||
function Jw(e, t, n, i) {
|
||
rt(() => {
|
||
var o;
|
||
if (!e.current || !i)
|
||
return;
|
||
const l = (o = e.current.ownerDocument.defaultView) != null ? o : window, f = Array.isArray(t) ? t : [t], h = new l.MutationObserver((y) => {
|
||
for (const m of y)
|
||
m.type === "attributes" && m.attributeName && f.includes(m.attributeName) && n(m);
|
||
});
|
||
return h.observe(e.current, { attributes: !0, attributeFilter: f }), () => h.disconnect();
|
||
});
|
||
}
|
||
function mL(e, t) {
|
||
const n = kr(e);
|
||
rt(() => {
|
||
let i = null;
|
||
const o = () => n();
|
||
return t !== null && (i = window.setInterval(o, t)), () => {
|
||
i && window.clearInterval(i);
|
||
};
|
||
}, [t, n]);
|
||
}
|
||
var gL = 50, $w = 300;
|
||
function yL(e, t) {
|
||
const [n, i] = qe(!1), [o, l] = qe(null), [f, h] = qe(!0), y = He(null), m = () => clearTimeout(y.current);
|
||
mL(
|
||
() => {
|
||
o === "increment" && e(), o === "decrement" && t();
|
||
},
|
||
n ? gL : null
|
||
);
|
||
const x = Q(() => {
|
||
f && e(), y.current = setTimeout(() => {
|
||
h(!1), i(!0), l("increment");
|
||
}, $w);
|
||
}, [e, f]), b = Q(() => {
|
||
f && t(), y.current = setTimeout(() => {
|
||
h(!1), i(!0), l("decrement");
|
||
}, $w);
|
||
}, [t, f]), E = Q(() => {
|
||
h(!0), i(!1), m();
|
||
}, []);
|
||
return rt(() => () => m(), []), { up: x, down: b, stop: E, isSpinning: n };
|
||
}
|
||
var xL = /^[Ee0-9+\-.]$/;
|
||
function SL(e) {
|
||
return xL.test(e);
|
||
}
|
||
function bL(e, t) {
|
||
if (e.key == null)
|
||
return !0;
|
||
const n = e.ctrlKey || e.altKey || e.metaKey;
|
||
return !(e.key.length === 1) || n ? !0 : t(e.key);
|
||
}
|
||
function CL(e = {}) {
|
||
const {
|
||
focusInputOnChange: t = !0,
|
||
clampValueOnBlur: n = !0,
|
||
keepWithinRange: i = !0,
|
||
min: o = Number.MIN_SAFE_INTEGER,
|
||
max: l = Number.MAX_SAFE_INTEGER,
|
||
step: f = 1,
|
||
isReadOnly: h,
|
||
isDisabled: y,
|
||
isRequired: m,
|
||
isInvalid: x,
|
||
pattern: b = "[0-9]*(.[0-9]+)?",
|
||
inputMode: E = "decimal",
|
||
allowMouseWheel: j,
|
||
id: M,
|
||
onChange: R,
|
||
precision: k,
|
||
name: A,
|
||
"aria-describedby": L,
|
||
"aria-label": z,
|
||
"aria-labelledby": I,
|
||
onFocus: _,
|
||
onBlur: U,
|
||
onInvalid: B,
|
||
getAriaValueText: q,
|
||
isValidCharacter: J,
|
||
format: G,
|
||
parse: H,
|
||
...le
|
||
} = e, ae = kr(_), he = kr(U), Te = kr(B), xe = kr(
|
||
J ?? SL
|
||
), $ = kr(q), Y = VO(e), {
|
||
update: te,
|
||
increment: V,
|
||
decrement: ne
|
||
} = Y, [we, Ee] = qe(!1), se = !(h || y), ve = He(null), Ce = He(null), Ae = He(null), Ve = He(null), tt = Q(
|
||
(ke) => ke.split("").filter(xe).join(""),
|
||
[xe]
|
||
), at = Q(
|
||
(ke) => {
|
||
var Nt;
|
||
return (Nt = H == null ? void 0 : H(ke)) != null ? Nt : ke;
|
||
},
|
||
[H]
|
||
), ze = Q(
|
||
(ke) => {
|
||
var Nt;
|
||
return ((Nt = G == null ? void 0 : G(ke)) != null ? Nt : ke).toString();
|
||
},
|
||
[G]
|
||
);
|
||
fc(() => {
|
||
(Y.valueAsNumber > l || Y.valueAsNumber < o) && (Te == null || Te("rangeOverflow", ze(Y.value), Y.valueAsNumber));
|
||
}, [Y.valueAsNumber, Y.value, ze, Te]), of(() => {
|
||
if (!ve.current)
|
||
return;
|
||
if (ve.current.value != Y.value) {
|
||
const Nt = at(ve.current.value);
|
||
Y.setValue(tt(Nt));
|
||
}
|
||
}, [at, tt]);
|
||
const Qe = Q(
|
||
(ke = f) => {
|
||
se && V(ke);
|
||
},
|
||
[V, se, f]
|
||
), Et = Q(
|
||
(ke = f) => {
|
||
se && ne(ke);
|
||
},
|
||
[ne, se, f]
|
||
), Xe = yL(Qe, Et);
|
||
Jw(
|
||
Ae,
|
||
"disabled",
|
||
Xe.stop,
|
||
Xe.isSpinning
|
||
), Jw(
|
||
Ve,
|
||
"disabled",
|
||
Xe.stop,
|
||
Xe.isSpinning
|
||
);
|
||
const ht = Q(
|
||
(ke) => {
|
||
if (ke.nativeEvent.isComposing)
|
||
return;
|
||
const tn = at(ke.currentTarget.value);
|
||
te(tt(tn)), Ce.current = {
|
||
start: ke.currentTarget.selectionStart,
|
||
end: ke.currentTarget.selectionEnd
|
||
};
|
||
},
|
||
[te, tt, at]
|
||
), Ht = Q(
|
||
(ke) => {
|
||
var Nt, tn, Ne;
|
||
ae == null || ae(ke), Ce.current && (ke.target.selectionStart = (tn = Ce.current.start) != null ? tn : (Nt = ke.currentTarget.value) == null ? void 0 : Nt.length, ke.currentTarget.selectionEnd = (Ne = Ce.current.end) != null ? Ne : ke.currentTarget.selectionStart);
|
||
},
|
||
[ae]
|
||
), Ot = Q(
|
||
(ke) => {
|
||
if (ke.nativeEvent.isComposing)
|
||
return;
|
||
bL(ke, xe) || ke.preventDefault();
|
||
const Nt = on(ke) * f, tn = ke.key, ge = {
|
||
ArrowUp: () => Qe(Nt),
|
||
ArrowDown: () => Et(Nt),
|
||
Home: () => te(o),
|
||
End: () => te(l)
|
||
}[tn];
|
||
ge && (ke.preventDefault(), ge(ke));
|
||
},
|
||
[xe, f, Qe, Et, te, o, l]
|
||
), on = (ke) => {
|
||
let Nt = 1;
|
||
return (ke.metaKey || ke.ctrlKey) && (Nt = 0.1), ke.shiftKey && (Nt = 10), Nt;
|
||
}, En = an(() => {
|
||
const ke = $ == null ? void 0 : $(Y.value);
|
||
if (ke != null)
|
||
return ke;
|
||
const Nt = Y.value.toString();
|
||
return Nt || void 0;
|
||
}, [Y.value, $]), ee = Q(() => {
|
||
let ke = Y.value;
|
||
if (Y.value === "")
|
||
return;
|
||
/^[eE]/.test(Y.value.toString()) ? Y.setValue("") : (Y.valueAsNumber < o && (ke = o), Y.valueAsNumber > l && (ke = l), Y.cast(ke));
|
||
}, [Y, l, o]), We = Q(() => {
|
||
Ee(!1), n && ee();
|
||
}, [n, Ee, ee]), Fe = Q(() => {
|
||
t && requestAnimationFrame(() => {
|
||
var ke;
|
||
(ke = ve.current) == null || ke.focus();
|
||
});
|
||
}, [t]), ot = Q(
|
||
(ke) => {
|
||
ke.preventDefault(), Xe.up(), Fe();
|
||
},
|
||
[Fe, Xe]
|
||
), me = Q(
|
||
(ke) => {
|
||
ke.preventDefault(), Xe.down(), Fe();
|
||
},
|
||
[Fe, Xe]
|
||
);
|
||
ec(
|
||
() => ve.current,
|
||
"wheel",
|
||
(ke) => {
|
||
var Nt, tn;
|
||
const ge = ((tn = (Nt = ve.current) == null ? void 0 : Nt.ownerDocument) != null ? tn : document).activeElement === ve.current;
|
||
if (!j || !ge)
|
||
return;
|
||
ke.preventDefault();
|
||
const _e = on(ke) * f, yt = Math.sign(ke.deltaY);
|
||
yt === -1 ? Qe(_e) : yt === 1 && Et(_e);
|
||
},
|
||
{ passive: !1 }
|
||
);
|
||
const Le = Q(
|
||
(ke = {}, Nt = null) => {
|
||
const tn = y || i && Y.isAtMax;
|
||
return {
|
||
...ke,
|
||
ref: Rn(Nt, Ae),
|
||
role: "button",
|
||
tabIndex: -1,
|
||
onPointerDown: St(ke.onPointerDown, (Ne) => {
|
||
Ne.button !== 0 || tn || ot(Ne);
|
||
}),
|
||
onPointerLeave: St(ke.onPointerLeave, Xe.stop),
|
||
onPointerUp: St(ke.onPointerUp, Xe.stop),
|
||
disabled: tn,
|
||
"aria-disabled": zs(tn)
|
||
};
|
||
},
|
||
[Y.isAtMax, i, ot, Xe.stop, y]
|
||
), Dt = Q(
|
||
(ke = {}, Nt = null) => {
|
||
const tn = y || i && Y.isAtMin;
|
||
return {
|
||
...ke,
|
||
ref: Rn(Nt, Ve),
|
||
role: "button",
|
||
tabIndex: -1,
|
||
onPointerDown: St(ke.onPointerDown, (Ne) => {
|
||
Ne.button !== 0 || tn || me(Ne);
|
||
}),
|
||
onPointerLeave: St(ke.onPointerLeave, Xe.stop),
|
||
onPointerUp: St(ke.onPointerUp, Xe.stop),
|
||
disabled: tn,
|
||
"aria-disabled": zs(tn)
|
||
};
|
||
},
|
||
[Y.isAtMin, i, me, Xe.stop, y]
|
||
), Vt = Q(
|
||
(ke = {}, Nt = null) => {
|
||
var tn, Ne, ge, _e;
|
||
return {
|
||
name: A,
|
||
inputMode: E,
|
||
type: "text",
|
||
pattern: b,
|
||
"aria-labelledby": I,
|
||
"aria-label": z,
|
||
"aria-describedby": L,
|
||
id: M,
|
||
disabled: y,
|
||
...ke,
|
||
readOnly: (tn = ke.readOnly) != null ? tn : h,
|
||
"aria-readonly": (Ne = ke.readOnly) != null ? Ne : h,
|
||
"aria-required": (ge = ke.required) != null ? ge : m,
|
||
required: (_e = ke.required) != null ? _e : m,
|
||
ref: Rn(ve, Nt),
|
||
value: ze(Y.value),
|
||
role: "spinbutton",
|
||
"aria-valuemin": o,
|
||
"aria-valuemax": l,
|
||
"aria-valuenow": Number.isNaN(Y.valueAsNumber) ? void 0 : Y.valueAsNumber,
|
||
"aria-invalid": zs(x ?? Y.isOutOfRange),
|
||
"aria-valuetext": En,
|
||
autoComplete: "off",
|
||
autoCorrect: "off",
|
||
onChange: St(ke.onChange, ht),
|
||
onKeyDown: St(ke.onKeyDown, Ot),
|
||
onFocus: St(
|
||
ke.onFocus,
|
||
Ht,
|
||
() => Ee(!0)
|
||
),
|
||
onBlur: St(ke.onBlur, he, We)
|
||
};
|
||
},
|
||
[
|
||
A,
|
||
E,
|
||
b,
|
||
I,
|
||
z,
|
||
ze,
|
||
L,
|
||
M,
|
||
y,
|
||
m,
|
||
h,
|
||
x,
|
||
Y.value,
|
||
Y.valueAsNumber,
|
||
Y.isOutOfRange,
|
||
o,
|
||
l,
|
||
En,
|
||
ht,
|
||
Ot,
|
||
Ht,
|
||
he,
|
||
We
|
||
]
|
||
);
|
||
return {
|
||
value: ze(Y.value),
|
||
valueAsNumber: Y.valueAsNumber,
|
||
isFocused: we,
|
||
isDisabled: y,
|
||
isReadOnly: h,
|
||
getIncrementButtonProps: Le,
|
||
getDecrementButtonProps: Dt,
|
||
getInputProps: Vt,
|
||
htmlProps: le
|
||
};
|
||
}
|
||
var [wL, f0] = Qn({
|
||
name: "NumberInputStylesContext",
|
||
errorMessage: `useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `
|
||
}), [EL, qS] = Qn({
|
||
name: "NumberInputContext",
|
||
errorMessage: "useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"
|
||
}), YS = $e(
|
||
function(t, n) {
|
||
const i = Da("NumberInput", t), o = ar(t), l = gS(o), { htmlProps: f, ...h } = CL(l), y = an(() => h, [h]);
|
||
return /* @__PURE__ */ c.jsx(EL, { value: y, children: /* @__PURE__ */ c.jsx(wL, { value: i, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...f,
|
||
ref: n,
|
||
className: At("chakra-numberinput", t.className),
|
||
__css: {
|
||
position: "relative",
|
||
zIndex: 0,
|
||
...i.root
|
||
}
|
||
}
|
||
) }) });
|
||
}
|
||
);
|
||
YS.displayName = "NumberInput";
|
||
var QS = $e(
|
||
function(t, n) {
|
||
const i = f0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
"aria-hidden": !0,
|
||
ref: n,
|
||
...t,
|
||
__css: {
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
position: "absolute",
|
||
top: "0",
|
||
insetEnd: "0px",
|
||
margin: "1px",
|
||
height: "calc(100% - 2px)",
|
||
zIndex: 1,
|
||
...i.stepperGroup
|
||
}
|
||
}
|
||
);
|
||
}
|
||
);
|
||
QS.displayName = "NumberInputStepper";
|
||
var XS = $e(
|
||
function(t, n) {
|
||
const { getInputProps: i } = qS(), o = i(t, n), l = f0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.input,
|
||
{
|
||
...o,
|
||
className: At("chakra-numberinput__field", t.className),
|
||
__css: {
|
||
width: "100%",
|
||
...l.field
|
||
}
|
||
}
|
||
);
|
||
}
|
||
);
|
||
XS.displayName = "NumberInputField";
|
||
var CT = Be("div", {
|
||
baseStyle: {
|
||
display: "flex",
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
flex: 1,
|
||
transitionProperty: "common",
|
||
transitionDuration: "normal",
|
||
userSelect: "none",
|
||
cursor: "pointer",
|
||
lineHeight: "normal"
|
||
}
|
||
}), KS = $e(function(t, n) {
|
||
var i;
|
||
const o = f0(), { getDecrementButtonProps: l } = qS(), f = l(t, n);
|
||
return /* @__PURE__ */ c.jsx(CT, { ...f, __css: o.stepper, children: (i = t.children) != null ? i : /* @__PURE__ */ c.jsx(hL, {}) });
|
||
});
|
||
KS.displayName = "NumberDecrementStepper";
|
||
var ZS = $e(function(t, n) {
|
||
var i;
|
||
const { getIncrementButtonProps: o } = qS(), l = o(t, n), f = f0();
|
||
return /* @__PURE__ */ c.jsx(CT, { ...l, __css: f.stepper, children: (i = t.children) != null ? i : /* @__PURE__ */ c.jsx(vL, {}) });
|
||
});
|
||
ZS.displayName = "NumberIncrementStepper";
|
||
var [jL, Vh] = Qn({
|
||
name: "PopoverContext",
|
||
errorMessage: "usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"
|
||
}), [TL, JS] = Qn({
|
||
name: "PopoverStylesContext",
|
||
errorMessage: `usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Popover />" `
|
||
});
|
||
function $S(e) {
|
||
const t = Kl.only(e.children), { getTriggerProps: n } = Vh();
|
||
return Ci(t, n(t.props, t.ref));
|
||
}
|
||
$S.displayName = "PopoverTrigger";
|
||
var Gd = {
|
||
click: "click",
|
||
hover: "hover"
|
||
};
|
||
function DL(e = {}) {
|
||
const {
|
||
closeOnBlur: t = !0,
|
||
closeOnEsc: n = !0,
|
||
initialFocusRef: i,
|
||
id: o,
|
||
returnFocusOnClose: l = !0,
|
||
autoFocus: f = !0,
|
||
arrowSize: h,
|
||
arrowShadowColor: y,
|
||
trigger: m = Gd.click,
|
||
openDelay: x = 200,
|
||
closeDelay: b = 200,
|
||
isLazy: E,
|
||
lazyBehavior: j = "unmount",
|
||
computePositionOnMount: M,
|
||
...R
|
||
} = e, { isOpen: k, onClose: A, onOpen: L, onToggle: z } = US(e), I = He(null), _ = He(null), U = He(null), B = He(!1), q = He(!1);
|
||
k && (q.current = !0);
|
||
const [J, G] = qe(!1), [H, le] = qe(!1), ae = bi(), he = o ?? ae, [Te, xe, $, Y] = [
|
||
"popover-trigger",
|
||
"popover-content",
|
||
"popover-header",
|
||
"popover-body"
|
||
].map((ht) => `${ht}-${he}`), {
|
||
referenceRef: te,
|
||
getArrowProps: V,
|
||
getPopperProps: ne,
|
||
getArrowInnerProps: we,
|
||
forceUpdate: Ee
|
||
} = _S({
|
||
...R,
|
||
enabled: k || !!M
|
||
}), se = sT({ isOpen: k, ref: U });
|
||
KO({
|
||
enabled: k,
|
||
ref: _
|
||
}), Kj(U, {
|
||
focusRef: _,
|
||
visible: k,
|
||
shouldFocus: l && m === Gd.click
|
||
}), ON(U, {
|
||
focusRef: i,
|
||
visible: k,
|
||
shouldFocus: f && m === Gd.click
|
||
});
|
||
const ve = HS({
|
||
wasSelected: q.current,
|
||
enabled: E,
|
||
mode: j,
|
||
isSelected: se.present
|
||
}), Ce = Q(
|
||
(ht = {}, Ht = null) => {
|
||
const Ot = {
|
||
...ht,
|
||
style: {
|
||
...ht.style,
|
||
transformOrigin: Rr.transformOrigin.varRef,
|
||
[Rr.arrowSize.var]: h ? `${h}px` : void 0,
|
||
[Rr.arrowShadowColor.var]: y
|
||
},
|
||
ref: Rn(U, Ht),
|
||
children: ve ? ht.children : null,
|
||
id: xe,
|
||
tabIndex: -1,
|
||
role: "dialog",
|
||
onKeyDown: St(ht.onKeyDown, (on) => {
|
||
n && on.key === "Escape" && A();
|
||
}),
|
||
onBlur: St(ht.onBlur, (on) => {
|
||
const En = eE(on), ee = k2(U.current, En), We = k2(_.current, En);
|
||
k && t && (!ee && !We) && A();
|
||
}),
|
||
"aria-labelledby": J ? $ : void 0,
|
||
"aria-describedby": H ? Y : void 0
|
||
};
|
||
return m === Gd.hover && (Ot.role = "tooltip", Ot.onMouseEnter = St(ht.onMouseEnter, () => {
|
||
B.current = !0;
|
||
}), Ot.onMouseLeave = St(
|
||
ht.onMouseLeave,
|
||
(on) => {
|
||
on.nativeEvent.relatedTarget !== null && (B.current = !1, setTimeout(() => A(), b));
|
||
}
|
||
)), Ot;
|
||
},
|
||
[
|
||
ve,
|
||
xe,
|
||
J,
|
||
$,
|
||
H,
|
||
Y,
|
||
m,
|
||
n,
|
||
A,
|
||
k,
|
||
t,
|
||
b,
|
||
y,
|
||
h
|
||
]
|
||
), Ae = Q(
|
||
(ht = {}, Ht = null) => ne(
|
||
{
|
||
...ht,
|
||
style: {
|
||
visibility: k ? "visible" : "hidden",
|
||
...ht.style
|
||
}
|
||
},
|
||
Ht
|
||
),
|
||
[k, ne]
|
||
), Ve = Q(
|
||
(ht, Ht = null) => ({
|
||
...ht,
|
||
ref: Rn(Ht, I, te)
|
||
}),
|
||
[I, te]
|
||
), tt = He(), at = He(), ze = Q(
|
||
(ht) => {
|
||
I.current == null && te(ht);
|
||
},
|
||
[te]
|
||
), Qe = Q(
|
||
(ht = {}, Ht = null) => {
|
||
const Ot = {
|
||
...ht,
|
||
ref: Rn(_, Ht, ze),
|
||
id: Te,
|
||
"aria-haspopup": "dialog",
|
||
"aria-expanded": k,
|
||
"aria-controls": xe
|
||
};
|
||
return m === Gd.click && (Ot.onClick = St(ht.onClick, z)), m === Gd.hover && (Ot.onFocus = St(ht.onFocus, () => {
|
||
tt.current === void 0 && L();
|
||
}), Ot.onBlur = St(ht.onBlur, (on) => {
|
||
const En = eE(on), ee = !k2(U.current, En);
|
||
k && t && ee && A();
|
||
}), Ot.onKeyDown = St(ht.onKeyDown, (on) => {
|
||
on.key === "Escape" && A();
|
||
}), Ot.onMouseEnter = St(ht.onMouseEnter, () => {
|
||
B.current = !0, tt.current = window.setTimeout(() => L(), x);
|
||
}), Ot.onMouseLeave = St(ht.onMouseLeave, () => {
|
||
B.current = !1, tt.current && (clearTimeout(tt.current), tt.current = void 0), at.current = window.setTimeout(() => {
|
||
B.current === !1 && A();
|
||
}, b);
|
||
})), Ot;
|
||
},
|
||
[
|
||
Te,
|
||
k,
|
||
xe,
|
||
m,
|
||
ze,
|
||
z,
|
||
L,
|
||
t,
|
||
A,
|
||
x,
|
||
b
|
||
]
|
||
);
|
||
rt(() => () => {
|
||
tt.current && clearTimeout(tt.current), at.current && clearTimeout(at.current);
|
||
}, []);
|
||
const Et = Q(
|
||
(ht = {}, Ht = null) => ({
|
||
...ht,
|
||
id: $,
|
||
ref: Rn(Ht, (Ot) => {
|
||
G(!!Ot);
|
||
})
|
||
}),
|
||
[$]
|
||
), Xe = Q(
|
||
(ht = {}, Ht = null) => ({
|
||
...ht,
|
||
id: Y,
|
||
ref: Rn(Ht, (Ot) => {
|
||
le(!!Ot);
|
||
})
|
||
}),
|
||
[Y]
|
||
);
|
||
return {
|
||
forceUpdate: Ee,
|
||
isOpen: k,
|
||
onAnimationComplete: se.onComplete,
|
||
onClose: A,
|
||
getAnchorProps: Ve,
|
||
getArrowProps: V,
|
||
getArrowInnerProps: we,
|
||
getPopoverPositionerProps: Ae,
|
||
getPopoverProps: Ce,
|
||
getTriggerProps: Qe,
|
||
getHeaderProps: Et,
|
||
getBodyProps: Xe
|
||
};
|
||
}
|
||
function k2(e, t) {
|
||
return e === t || (e == null ? void 0 : e.contains(t));
|
||
}
|
||
function eE(e) {
|
||
var t;
|
||
const n = e.currentTarget.ownerDocument.activeElement;
|
||
return (t = e.relatedTarget) != null ? t : n;
|
||
}
|
||
function eb(e) {
|
||
const t = Da("Popover", e), { children: n, ...i } = ar(e), o = cc(), l = DL({ ...i, direction: o.direction });
|
||
return /* @__PURE__ */ c.jsx(jL, { value: l, children: /* @__PURE__ */ c.jsx(TL, { value: t, children: Q5(n, {
|
||
isOpen: l.isOpen,
|
||
onClose: l.onClose,
|
||
forceUpdate: l.forceUpdate
|
||
}) }) });
|
||
}
|
||
eb.displayName = "Popover";
|
||
function tb(e) {
|
||
var t;
|
||
const { bg: n, bgColor: i, backgroundColor: o, shadow: l, boxShadow: f } = e, { getArrowProps: h, getArrowInnerProps: y } = Vh(), m = JS(), x = (t = n ?? i) != null ? t : o, b = l ?? f;
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...h(),
|
||
className: "chakra-popover__arrow-positioner",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
className: At("chakra-popover__arrow", e.className),
|
||
...y(e),
|
||
__css: {
|
||
"--popper-arrow-bg": x ? `colors.${x}, ${x}` : void 0,
|
||
"--popper-arrow-shadow": b ? `shadows.${b}, ${b}` : void 0,
|
||
...m.arrow
|
||
}
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
tb.displayName = "PopoverArrow";
|
||
var wT = $e(
|
||
function(t, n) {
|
||
const { getBodyProps: i } = Vh(), o = JS();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...i(t, n),
|
||
className: At("chakra-popover__body", t.className),
|
||
__css: o.body
|
||
}
|
||
);
|
||
}
|
||
);
|
||
wT.displayName = "PopoverBody";
|
||
function ML(e) {
|
||
if (e)
|
||
return {
|
||
enter: {
|
||
...e.enter,
|
||
visibility: "visible"
|
||
},
|
||
exit: {
|
||
...e.exit,
|
||
transitionEnd: {
|
||
visibility: "hidden"
|
||
}
|
||
}
|
||
};
|
||
}
|
||
var RL = {
|
||
exit: {
|
||
opacity: 0,
|
||
scale: 0.95,
|
||
transition: {
|
||
duration: 0.1,
|
||
ease: [0.4, 0, 1, 1]
|
||
}
|
||
},
|
||
enter: {
|
||
scale: 1,
|
||
opacity: 1,
|
||
transition: {
|
||
duration: 0.15,
|
||
ease: [0, 0, 0.2, 1]
|
||
}
|
||
}
|
||
}, kL = Be(Ws.section), ET = $e(function(t, n) {
|
||
const { variants: i = RL, ...o } = t, { isOpen: l } = Vh();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kL,
|
||
{
|
||
ref: n,
|
||
variants: ML(i),
|
||
initial: !1,
|
||
animate: l ? "enter" : "exit",
|
||
...o
|
||
}
|
||
);
|
||
});
|
||
ET.displayName = "PopoverTransition";
|
||
var nb = $e(
|
||
function(t, n) {
|
||
const { rootProps: i, motionProps: o, ...l } = t, { getPopoverProps: f, getPopoverPositionerProps: h, onAnimationComplete: y } = Vh(), m = JS(), x = {
|
||
position: "relative",
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
...m.content
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...h(i),
|
||
__css: m.popper,
|
||
className: "chakra-popover__popper",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
ET,
|
||
{
|
||
...o,
|
||
...f(l, n),
|
||
onAnimationComplete: e0(
|
||
y,
|
||
l.onAnimationComplete
|
||
),
|
||
className: At("chakra-popover__content", t.className),
|
||
__css: x
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
);
|
||
nb.displayName = "PopoverContent";
|
||
function PL(e, t, n) {
|
||
return (e - t) * 100 / (n - t);
|
||
}
|
||
uc({
|
||
"0%": {
|
||
strokeDasharray: "1, 400",
|
||
strokeDashoffset: "0"
|
||
},
|
||
"50%": {
|
||
strokeDasharray: "400, 400",
|
||
strokeDashoffset: "-100"
|
||
},
|
||
"100%": {
|
||
strokeDasharray: "400, 400",
|
||
strokeDashoffset: "-260"
|
||
}
|
||
});
|
||
uc({
|
||
"0%": {
|
||
transform: "rotate(0deg)"
|
||
},
|
||
"100%": {
|
||
transform: "rotate(360deg)"
|
||
}
|
||
});
|
||
var OL = uc({
|
||
"0%": { left: "-40%" },
|
||
"100%": { left: "100%" }
|
||
}), AL = uc({
|
||
from: { backgroundPosition: "1rem 0" },
|
||
to: { backgroundPosition: "0 0" }
|
||
});
|
||
function NL(e) {
|
||
const {
|
||
value: t = 0,
|
||
min: n,
|
||
max: i,
|
||
valueText: o,
|
||
getValueText: l,
|
||
isIndeterminate: f,
|
||
role: h = "progressbar"
|
||
} = e, y = PL(t, n, i);
|
||
return {
|
||
bind: {
|
||
"data-indeterminate": f ? "" : void 0,
|
||
"aria-valuemax": i,
|
||
"aria-valuemin": n,
|
||
"aria-valuenow": f ? void 0 : t,
|
||
"aria-valuetext": (() => {
|
||
if (t != null)
|
||
return typeof l == "function" ? l(t, y) : o;
|
||
})(),
|
||
role: h
|
||
},
|
||
percent: y,
|
||
value: t
|
||
};
|
||
}
|
||
var [zL, IL] = Qn({
|
||
name: "ProgressStylesContext",
|
||
errorMessage: `useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Progress />" `
|
||
}), LL = $e(
|
||
(e, t) => {
|
||
const { min: n, max: i, value: o, isIndeterminate: l, role: f, ...h } = e, y = NL({
|
||
value: o,
|
||
min: n,
|
||
max: i,
|
||
isIndeterminate: l,
|
||
role: f
|
||
}), x = {
|
||
height: "100%",
|
||
...IL().filledTrack
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: t,
|
||
style: { width: `${y.percent}%`, ...h.style },
|
||
...y.bind,
|
||
...h,
|
||
__css: x
|
||
}
|
||
);
|
||
}
|
||
), jT = $e((e, t) => {
|
||
var n;
|
||
const {
|
||
value: i,
|
||
min: o = 0,
|
||
max: l = 100,
|
||
hasStripe: f,
|
||
isAnimated: h,
|
||
children: y,
|
||
borderRadius: m,
|
||
isIndeterminate: x,
|
||
"aria-label": b,
|
||
"aria-labelledby": E,
|
||
"aria-valuetext": j,
|
||
title: M,
|
||
role: R,
|
||
...k
|
||
} = ar(e), A = Da("Progress", e), L = m ?? ((n = A.track) == null ? void 0 : n.borderRadius), z = { animation: `${AL} 1s linear infinite` }, U = {
|
||
...!x && f && h && z,
|
||
...x && {
|
||
position: "absolute",
|
||
willChange: "left",
|
||
minWidth: "50%",
|
||
animation: `${OL} 1s ease infinite normal none running`
|
||
}
|
||
}, B = {
|
||
overflow: "hidden",
|
||
position: "relative",
|
||
...A.track
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
ref: t,
|
||
borderRadius: L,
|
||
__css: B,
|
||
...k,
|
||
children: /* @__PURE__ */ c.jsxs(zL, { value: A, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
LL,
|
||
{
|
||
"aria-label": b,
|
||
"aria-labelledby": E,
|
||
"aria-valuetext": j,
|
||
min: o,
|
||
max: l,
|
||
value: i,
|
||
isIndeterminate: x,
|
||
css: U,
|
||
borderRadius: L,
|
||
title: M,
|
||
role: R
|
||
}
|
||
),
|
||
y
|
||
] })
|
||
}
|
||
);
|
||
});
|
||
jT.displayName = "Progress";
|
||
function FL(e) {
|
||
return e && nx(e) && nx(e.target);
|
||
}
|
||
function BL(e = {}) {
|
||
const {
|
||
onChange: t,
|
||
value: n,
|
||
defaultValue: i,
|
||
name: o,
|
||
isDisabled: l,
|
||
isFocusable: f,
|
||
isNative: h,
|
||
...y
|
||
} = e, [m, x] = qe(i || ""), b = typeof n < "u", E = b ? n : m, j = He(null), M = Q(() => {
|
||
const _ = j.current;
|
||
if (!_)
|
||
return;
|
||
let U = "input:not(:disabled):checked";
|
||
const B = _.querySelector(
|
||
U
|
||
);
|
||
if (B) {
|
||
B.focus();
|
||
return;
|
||
}
|
||
U = "input:not(:disabled)";
|
||
const q = _.querySelector(U);
|
||
q == null || q.focus();
|
||
}, []), k = `radio-${bi()}`, A = o || k, L = Q(
|
||
(_) => {
|
||
const U = FL(_) ? _.target.value : _;
|
||
b || x(U), t == null || t(String(U));
|
||
},
|
||
[t, b]
|
||
), z = Q(
|
||
(_ = {}, U = null) => ({
|
||
..._,
|
||
ref: Rn(U, j),
|
||
role: "radiogroup"
|
||
}),
|
||
[]
|
||
), I = Q(
|
||
(_ = {}, U = null) => ({
|
||
..._,
|
||
ref: U,
|
||
name: A,
|
||
[h ? "checked" : "isChecked"]: E != null ? _.value === E : void 0,
|
||
onChange(q) {
|
||
L(q);
|
||
},
|
||
"data-radiogroup": !0
|
||
}),
|
||
[h, A, L, E]
|
||
);
|
||
return {
|
||
getRootProps: z,
|
||
getRadioProps: I,
|
||
name: A,
|
||
ref: j,
|
||
focus: M,
|
||
setValue: x,
|
||
value: E,
|
||
onChange: L,
|
||
isDisabled: l,
|
||
isFocusable: f,
|
||
htmlProps: y
|
||
};
|
||
}
|
||
var [_L, TT] = Qn({
|
||
name: "RadioGroupContext",
|
||
strict: !1
|
||
}), jh = $e((e, t) => {
|
||
const {
|
||
colorScheme: n,
|
||
size: i,
|
||
variant: o,
|
||
children: l,
|
||
className: f,
|
||
isDisabled: h,
|
||
isFocusable: y,
|
||
...m
|
||
} = e, { value: x, onChange: b, getRootProps: E, name: j, htmlProps: M } = BL(m), R = an(
|
||
() => ({
|
||
name: j,
|
||
size: i,
|
||
onChange: b,
|
||
colorScheme: n,
|
||
value: x,
|
||
variant: o,
|
||
isDisabled: h,
|
||
isFocusable: y
|
||
}),
|
||
[
|
||
j,
|
||
i,
|
||
b,
|
||
n,
|
||
x,
|
||
o,
|
||
h,
|
||
y
|
||
]
|
||
);
|
||
return /* @__PURE__ */ c.jsx(_L, { value: R, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...E(M, t),
|
||
className: At("chakra-radio-group", f),
|
||
children: l
|
||
}
|
||
) });
|
||
});
|
||
jh.displayName = "RadioGroup";
|
||
var UL = {
|
||
border: "0",
|
||
clip: "rect(0, 0, 0, 0)",
|
||
height: "1px",
|
||
width: "1px",
|
||
margin: "-1px",
|
||
padding: "0",
|
||
overflow: "hidden",
|
||
whiteSpace: "nowrap",
|
||
position: "absolute"
|
||
};
|
||
function HL(e = {}) {
|
||
const {
|
||
defaultChecked: t,
|
||
isChecked: n,
|
||
isFocusable: i,
|
||
isDisabled: o,
|
||
isReadOnly: l,
|
||
isRequired: f,
|
||
onChange: h,
|
||
isInvalid: y,
|
||
name: m,
|
||
value: x,
|
||
id: b,
|
||
"data-radiogroup": E,
|
||
"aria-describedby": j,
|
||
...M
|
||
} = e, R = `radio-${bi()}`, k = hc(), L = !!TT() || !!E;
|
||
let I = !!k && !L ? k.id : R;
|
||
I = b ?? I;
|
||
const _ = o ?? (k == null ? void 0 : k.isDisabled), U = l ?? (k == null ? void 0 : k.isReadOnly), B = f ?? (k == null ? void 0 : k.isRequired), q = y ?? (k == null ? void 0 : k.isInvalid), [J, G] = qe(!1), [H, le] = qe(!1), [ae, he] = qe(!1), [Te, xe] = qe(!1), [$, Y] = qe(Boolean(t)), te = typeof n < "u", V = te ? n : $;
|
||
rt(() => Z6(G), []);
|
||
const ne = Q(
|
||
(ze) => {
|
||
if (U || _) {
|
||
ze.preventDefault();
|
||
return;
|
||
}
|
||
te || Y(ze.target.checked), h == null || h(ze);
|
||
},
|
||
[te, _, U, h]
|
||
), we = Q(
|
||
(ze) => {
|
||
ze.key === " " && xe(!0);
|
||
},
|
||
[xe]
|
||
), Ee = Q(
|
||
(ze) => {
|
||
ze.key === " " && xe(!1);
|
||
},
|
||
[xe]
|
||
), se = Q(
|
||
(ze = {}, Qe = null) => ({
|
||
...ze,
|
||
ref: Qe,
|
||
"data-active": Yt(Te),
|
||
"data-hover": Yt(ae),
|
||
"data-disabled": Yt(_),
|
||
"data-invalid": Yt(q),
|
||
"data-checked": Yt(V),
|
||
"data-focus": Yt(H),
|
||
"data-focus-visible": Yt(H && J),
|
||
"data-readonly": Yt(U),
|
||
"aria-hidden": !0,
|
||
onMouseDown: St(ze.onMouseDown, () => xe(!0)),
|
||
onMouseUp: St(ze.onMouseUp, () => xe(!1)),
|
||
onMouseEnter: St(
|
||
ze.onMouseEnter,
|
||
() => he(!0)
|
||
),
|
||
onMouseLeave: St(
|
||
ze.onMouseLeave,
|
||
() => he(!1)
|
||
)
|
||
}),
|
||
[
|
||
Te,
|
||
ae,
|
||
_,
|
||
q,
|
||
V,
|
||
H,
|
||
U,
|
||
J
|
||
]
|
||
), { onFocus: ve, onBlur: Ce } = k ?? {}, Ae = Q(
|
||
(ze = {}, Qe = null) => {
|
||
const Et = _ && !i;
|
||
return {
|
||
...ze,
|
||
id: I,
|
||
ref: Qe,
|
||
type: "radio",
|
||
name: m,
|
||
value: x,
|
||
onChange: St(ze.onChange, ne),
|
||
onBlur: St(
|
||
Ce,
|
||
ze.onBlur,
|
||
() => le(!1)
|
||
),
|
||
onFocus: St(
|
||
ve,
|
||
ze.onFocus,
|
||
() => le(!0)
|
||
),
|
||
onKeyDown: St(ze.onKeyDown, we),
|
||
onKeyUp: St(ze.onKeyUp, Ee),
|
||
checked: V,
|
||
disabled: Et,
|
||
readOnly: U,
|
||
required: B,
|
||
"aria-invalid": zs(q),
|
||
"aria-disabled": zs(Et),
|
||
"aria-required": zs(B),
|
||
"data-readonly": Yt(U),
|
||
"aria-describedby": j,
|
||
style: UL
|
||
};
|
||
},
|
||
[
|
||
_,
|
||
i,
|
||
I,
|
||
m,
|
||
x,
|
||
ne,
|
||
Ce,
|
||
ve,
|
||
we,
|
||
Ee,
|
||
V,
|
||
U,
|
||
B,
|
||
q,
|
||
j
|
||
]
|
||
);
|
||
return {
|
||
state: {
|
||
isInvalid: q,
|
||
isFocused: H,
|
||
isChecked: V,
|
||
isActive: Te,
|
||
isHovered: ae,
|
||
isDisabled: _,
|
||
isReadOnly: U,
|
||
isRequired: B
|
||
},
|
||
getCheckboxProps: se,
|
||
getInputProps: Ae,
|
||
getLabelProps: (ze = {}, Qe = null) => ({
|
||
...ze,
|
||
ref: Qe,
|
||
onMouseDown: St(ze.onMouseDown, tE),
|
||
onTouchStart: St(ze.onTouchStart, tE),
|
||
"data-disabled": Yt(_),
|
||
"data-checked": Yt(V),
|
||
"data-invalid": Yt(q)
|
||
}),
|
||
getRootProps: (ze, Qe = null) => ({
|
||
...ze,
|
||
ref: Qe,
|
||
"data-disabled": Yt(_),
|
||
"data-checked": Yt(V),
|
||
"data-invalid": Yt(q)
|
||
}),
|
||
htmlProps: M
|
||
};
|
||
}
|
||
function tE(e) {
|
||
e.preventDefault(), e.stopPropagation();
|
||
}
|
||
function VL(e, t) {
|
||
const n = {}, i = {};
|
||
for (const [o, l] of Object.entries(e))
|
||
t.includes(o) ? n[o] = l : i[o] = l;
|
||
return [n, i];
|
||
}
|
||
var Ua = $e((e, t) => {
|
||
var n;
|
||
const i = TT(), { onChange: o, value: l } = e, f = Da("Radio", { ...i, ...e }), h = ar(e), {
|
||
spacing: y = "0.5rem",
|
||
children: m,
|
||
isDisabled: x = i == null ? void 0 : i.isDisabled,
|
||
isFocusable: b = i == null ? void 0 : i.isFocusable,
|
||
inputProps: E,
|
||
...j
|
||
} = h;
|
||
let M = e.isChecked;
|
||
(i == null ? void 0 : i.value) != null && l != null && (M = i.value === l);
|
||
let R = o;
|
||
i != null && i.onChange && l != null && (R = e0(i.onChange, o));
|
||
const k = (n = e == null ? void 0 : e.name) != null ? n : i == null ? void 0 : i.name, {
|
||
getInputProps: A,
|
||
getCheckboxProps: L,
|
||
getLabelProps: z,
|
||
getRootProps: I,
|
||
htmlProps: _
|
||
} = HL({
|
||
...j,
|
||
isChecked: M,
|
||
isFocusable: b,
|
||
isDisabled: x,
|
||
onChange: R,
|
||
name: k
|
||
}), [U, B] = VL(_, X5), q = L(B), J = A(E, t), G = z(), H = Object.assign({}, U, I()), le = {
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
verticalAlign: "top",
|
||
cursor: "pointer",
|
||
position: "relative",
|
||
...f.container
|
||
}, ae = {
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
flexShrink: 0,
|
||
...f.control
|
||
}, he = {
|
||
userSelect: "none",
|
||
marginStart: y,
|
||
...f.label
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Be.label, { className: "chakra-radio", ...H, __css: le, children: [
|
||
/* @__PURE__ */ c.jsx("input", { className: "chakra-radio__input", ...J }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
className: "chakra-radio__control",
|
||
...q,
|
||
__css: ae
|
||
}
|
||
),
|
||
m && /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
className: "chakra-radio__label",
|
||
...G,
|
||
__css: he,
|
||
children: m
|
||
}
|
||
)
|
||
] });
|
||
});
|
||
Ua.displayName = "Radio";
|
||
var DT = $e(
|
||
function(t, n) {
|
||
const { children: i, placeholder: o, className: l, ...f } = t;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.select,
|
||
{
|
||
...f,
|
||
ref: n,
|
||
className: At("chakra-select", l),
|
||
children: [
|
||
o && /* @__PURE__ */ c.jsx("option", { value: "", children: o }),
|
||
i
|
||
]
|
||
}
|
||
);
|
||
}
|
||
);
|
||
DT.displayName = "SelectField";
|
||
function WL(e, t) {
|
||
const n = {}, i = {};
|
||
for (const [o, l] of Object.entries(e))
|
||
t.includes(o) ? n[o] = l : i[o] = l;
|
||
return [n, i];
|
||
}
|
||
var MT = $e((e, t) => {
|
||
var n;
|
||
const i = Da("Select", e), {
|
||
rootProps: o,
|
||
placeholder: l,
|
||
icon: f,
|
||
color: h,
|
||
height: y,
|
||
h: m,
|
||
minH: x,
|
||
minHeight: b,
|
||
iconColor: E,
|
||
iconSize: j,
|
||
...M
|
||
} = ar(e), [R, k] = WL(M, X5), A = mS(k), L = {
|
||
width: "100%",
|
||
height: "fit-content",
|
||
position: "relative",
|
||
color: h
|
||
}, z = {
|
||
paddingEnd: "2rem",
|
||
...i.field,
|
||
_focus: {
|
||
zIndex: "unset",
|
||
...(n = i.field) == null ? void 0 : n._focus
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.div,
|
||
{
|
||
className: "chakra-select__wrapper",
|
||
__css: L,
|
||
...R,
|
||
...o,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
DT,
|
||
{
|
||
ref: t,
|
||
height: m ?? y,
|
||
minH: x ?? b,
|
||
placeholder: l,
|
||
...A,
|
||
__css: z,
|
||
children: e.children
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
RT,
|
||
{
|
||
"data-disabled": Yt(A.disabled),
|
||
...(E || h) && { color: E || h },
|
||
__css: i.icon,
|
||
...j && { fontSize: j },
|
||
children: f
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
});
|
||
MT.displayName = "Select";
|
||
var GL = (e) => /* @__PURE__ */ c.jsx("svg", { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ c.jsx(
|
||
"path",
|
||
{
|
||
fill: "currentColor",
|
||
d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
||
}
|
||
) }), qL = Be("div", {
|
||
baseStyle: {
|
||
position: "absolute",
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
pointerEvents: "none",
|
||
top: "50%",
|
||
transform: "translateY(-50%)"
|
||
}
|
||
}), RT = (e) => {
|
||
const { children: t = /* @__PURE__ */ c.jsx(GL, {}), ...n } = e, i = Ci(t, {
|
||
role: "presentation",
|
||
className: "chakra-select__icon",
|
||
focusable: !1,
|
||
"aria-hidden": !0,
|
||
style: {
|
||
width: "1em",
|
||
height: "1em",
|
||
color: "currentColor"
|
||
}
|
||
});
|
||
return /* @__PURE__ */ c.jsx(qL, { ...n, className: "chakra-select__icon-wrapper", children: zh(t) ? i : null });
|
||
};
|
||
RT.displayName = "SelectIcon";
|
||
var qd = (e) => e ? "" : void 0, P2 = (e) => e ? !0 : void 0, Wh = (...e) => e.filter(Boolean).join(" ");
|
||
function O2(...e) {
|
||
return function(n) {
|
||
e.some((i) => (i == null || i(n), n == null ? void 0 : n.defaultPrevented));
|
||
};
|
||
}
|
||
function cg(e) {
|
||
const { orientation: t, vertical: n, horizontal: i } = e;
|
||
return t === "vertical" ? n : i;
|
||
}
|
||
var kg = { width: 0, height: 0 }, dg = (e) => e || kg;
|
||
function YL(e) {
|
||
const { orientation: t, thumbPercents: n, thumbRects: i, isReversed: o } = e, l = (R) => {
|
||
var k;
|
||
const A = (k = i[R]) != null ? k : kg;
|
||
return {
|
||
position: "absolute",
|
||
userSelect: "none",
|
||
WebkitUserSelect: "none",
|
||
MozUserSelect: "none",
|
||
msUserSelect: "none",
|
||
touchAction: "none",
|
||
...cg({
|
||
orientation: t,
|
||
vertical: {
|
||
bottom: `calc(${n[R]}% - ${A.height / 2}px)`
|
||
},
|
||
horizontal: {
|
||
left: `calc(${n[R]}% - ${A.width / 2}px)`
|
||
}
|
||
})
|
||
};
|
||
}, f = t === "vertical" ? i.reduce(
|
||
(R, k) => dg(R).height > dg(k).height ? R : k,
|
||
kg
|
||
) : i.reduce(
|
||
(R, k) => dg(R).width > dg(k).width ? R : k,
|
||
kg
|
||
), h = {
|
||
position: "relative",
|
||
touchAction: "none",
|
||
WebkitTapHighlightColor: "rgba(0,0,0,0)",
|
||
userSelect: "none",
|
||
outline: 0,
|
||
...cg({
|
||
orientation: t,
|
||
vertical: f ? {
|
||
paddingLeft: f.width / 2,
|
||
paddingRight: f.width / 2
|
||
} : {},
|
||
horizontal: f ? {
|
||
paddingTop: f.height / 2,
|
||
paddingBottom: f.height / 2
|
||
} : {}
|
||
})
|
||
}, y = {
|
||
position: "absolute",
|
||
...cg({
|
||
orientation: t,
|
||
vertical: {
|
||
left: "50%",
|
||
transform: "translateX(-50%)",
|
||
height: "100%"
|
||
},
|
||
horizontal: {
|
||
top: "50%",
|
||
transform: "translateY(-50%)",
|
||
width: "100%"
|
||
}
|
||
})
|
||
}, m = n.length === 1, x = [0, o ? 100 - n[0] : n[0]], b = m ? x : n;
|
||
let E = b[0];
|
||
!m && o && (E = 100 - E);
|
||
const j = Math.abs(b[b.length - 1] - b[0]), M = {
|
||
...y,
|
||
...cg({
|
||
orientation: t,
|
||
vertical: o ? { height: `${j}%`, top: `${E}%` } : { height: `${j}%`, bottom: `${E}%` },
|
||
horizontal: o ? { width: `${j}%`, right: `${E}%` } : { width: `${j}%`, left: `${E}%` }
|
||
})
|
||
};
|
||
return { trackStyle: y, innerTrackStyle: M, rootStyle: h, getThumbStyle: l };
|
||
}
|
||
function QL(e) {
|
||
const { isReversed: t, direction: n, orientation: i } = e;
|
||
return n === "ltr" || i === "vertical" ? t : !t;
|
||
}
|
||
function XL(e, t, n, i) {
|
||
return e.addEventListener(t, n, i), () => {
|
||
e.removeEventListener(t, n, i);
|
||
};
|
||
}
|
||
function KL(e) {
|
||
const t = JL(e);
|
||
return typeof t.PointerEvent < "u" && e instanceof t.PointerEvent ? e.pointerType === "mouse" : e instanceof t.MouseEvent;
|
||
}
|
||
function kT(e) {
|
||
return !!e.touches;
|
||
}
|
||
function ZL(e) {
|
||
return kT(e) && e.touches.length > 1;
|
||
}
|
||
function JL(e) {
|
||
var t;
|
||
return (t = e.view) != null ? t : window;
|
||
}
|
||
function $L(e, t = "page") {
|
||
const n = e.touches[0] || e.changedTouches[0];
|
||
return { x: n[`${t}X`], y: n[`${t}Y`] };
|
||
}
|
||
function eF(e, t = "page") {
|
||
return {
|
||
x: e[`${t}X`],
|
||
y: e[`${t}Y`]
|
||
};
|
||
}
|
||
function PT(e, t = "page") {
|
||
return kT(e) ? $L(e, t) : eF(e, t);
|
||
}
|
||
function tF(e) {
|
||
return (t) => {
|
||
const n = KL(t);
|
||
(!n || n && t.button === 0) && e(t);
|
||
};
|
||
}
|
||
function nF(e, t = !1) {
|
||
function n(o) {
|
||
e(o, { point: PT(o) });
|
||
}
|
||
return t ? tF(n) : n;
|
||
}
|
||
function Pg(e, t, n, i) {
|
||
return XL(e, t, nF(n, t === "pointerdown"), i);
|
||
}
|
||
var rF = Object.defineProperty, aF = (e, t, n) => t in e ? rF(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mo = (e, t, n) => (aF(e, typeof t != "symbol" ? t + "" : t, n), n), iF = class {
|
||
constructor(e, t, n) {
|
||
mo(this, "history", []), mo(this, "startEvent", null), mo(this, "lastEvent", null), mo(this, "lastEventInfo", null), mo(this, "handlers", {}), mo(this, "removeListeners", () => {
|
||
}), mo(this, "threshold", 3), mo(this, "win"), mo(this, "updatePoint", () => {
|
||
if (!(this.lastEvent && this.lastEventInfo))
|
||
return;
|
||
const h = A2(this.lastEventInfo, this.history), y = this.startEvent !== null, m = uF(h.offset, { x: 0, y: 0 }) >= this.threshold;
|
||
if (!y && !m)
|
||
return;
|
||
const { timestamp: x } = ow();
|
||
this.history.push({ ...h.point, timestamp: x });
|
||
const { onStart: b, onMove: E } = this.handlers;
|
||
y || (b == null || b(this.lastEvent, h), this.startEvent = this.lastEvent), E == null || E(this.lastEvent, h);
|
||
}), mo(this, "onPointerMove", (h, y) => {
|
||
this.lastEvent = h, this.lastEventInfo = y, kP.update(this.updatePoint, !0);
|
||
}), mo(this, "onPointerUp", (h, y) => {
|
||
const m = A2(y, this.history), { onEnd: x, onSessionEnd: b } = this.handlers;
|
||
b == null || b(h, m), this.end(), !(!x || !this.startEvent) && (x == null || x(h, m));
|
||
});
|
||
var i;
|
||
if (this.win = (i = e.view) != null ? i : window, ZL(e))
|
||
return;
|
||
this.handlers = t, n && (this.threshold = n), e.stopPropagation(), e.preventDefault();
|
||
const o = { point: PT(e) }, { timestamp: l } = ow();
|
||
this.history = [{ ...o.point, timestamp: l }];
|
||
const { onSessionStart: f } = t;
|
||
f == null || f(e, A2(o, this.history)), this.removeListeners = lF(
|
||
Pg(this.win, "pointermove", this.onPointerMove),
|
||
Pg(this.win, "pointerup", this.onPointerUp),
|
||
Pg(this.win, "pointercancel", this.onPointerUp)
|
||
);
|
||
}
|
||
updateHandlers(e) {
|
||
this.handlers = e;
|
||
}
|
||
end() {
|
||
var e;
|
||
(e = this.removeListeners) == null || e.call(this), PP.update(this.updatePoint);
|
||
}
|
||
};
|
||
function nE(e, t) {
|
||
return { x: e.x - t.x, y: e.y - t.y };
|
||
}
|
||
function A2(e, t) {
|
||
return {
|
||
point: e.point,
|
||
delta: nE(e.point, t[t.length - 1]),
|
||
offset: nE(e.point, t[0]),
|
||
velocity: sF(t, 0.1)
|
||
};
|
||
}
|
||
var oF = (e) => e * 1e3;
|
||
function sF(e, t) {
|
||
if (e.length < 2)
|
||
return { x: 0, y: 0 };
|
||
let n = e.length - 1, i = null;
|
||
const o = e[e.length - 1];
|
||
for (; n >= 0 && (i = e[n], !(o.timestamp - i.timestamp > oF(t))); )
|
||
n--;
|
||
if (!i)
|
||
return { x: 0, y: 0 };
|
||
const l = (o.timestamp - i.timestamp) / 1e3;
|
||
if (l === 0)
|
||
return { x: 0, y: 0 };
|
||
const f = {
|
||
x: (o.x - i.x) / l,
|
||
y: (o.y - i.y) / l
|
||
};
|
||
return f.x === 1 / 0 && (f.x = 0), f.y === 1 / 0 && (f.y = 0), f;
|
||
}
|
||
function lF(...e) {
|
||
return (t) => e.reduce((n, i) => i(n), t);
|
||
}
|
||
function N2(e, t) {
|
||
return Math.abs(e - t);
|
||
}
|
||
function rE(e) {
|
||
return "x" in e && "y" in e;
|
||
}
|
||
function uF(e, t) {
|
||
if (typeof e == "number" && typeof t == "number")
|
||
return N2(e, t);
|
||
if (rE(e) && rE(t)) {
|
||
const n = N2(e.x, t.x), i = N2(e.y, t.y);
|
||
return Math.sqrt(n ** 2 + i ** 2);
|
||
}
|
||
return 0;
|
||
}
|
||
function OT(e) {
|
||
const t = He(null);
|
||
return t.current = e, t;
|
||
}
|
||
function cF(e, t) {
|
||
const {
|
||
onPan: n,
|
||
onPanStart: i,
|
||
onPanEnd: o,
|
||
onPanSessionStart: l,
|
||
onPanSessionEnd: f,
|
||
threshold: h
|
||
} = t, y = Boolean(
|
||
n || i || o || l || f
|
||
), m = He(null), x = OT({
|
||
onSessionStart: l,
|
||
onSessionEnd: f,
|
||
onStart: i,
|
||
onMove: n,
|
||
onEnd(b, E) {
|
||
m.current = null, o == null || o(b, E);
|
||
}
|
||
});
|
||
rt(() => {
|
||
var b;
|
||
(b = m.current) == null || b.updateHandlers(x.current);
|
||
}), rt(() => {
|
||
const b = e.current;
|
||
if (!b || !y)
|
||
return;
|
||
function E(j) {
|
||
m.current = new iF(j, x.current, h);
|
||
}
|
||
return Pg(b, "pointerdown", E);
|
||
}, [e, y, x, h]), rt(() => () => {
|
||
var b;
|
||
(b = m.current) == null || b.end(), m.current = null;
|
||
}, []);
|
||
}
|
||
function dF(e, t) {
|
||
var n;
|
||
if (!e) {
|
||
t(void 0);
|
||
return;
|
||
}
|
||
t({ width: e.offsetWidth, height: e.offsetHeight });
|
||
const i = (n = e.ownerDocument.defaultView) != null ? n : window, o = new i.ResizeObserver((l) => {
|
||
if (!Array.isArray(l) || !l.length)
|
||
return;
|
||
const [f] = l;
|
||
let h, y;
|
||
if ("borderBoxSize" in f) {
|
||
const m = f.borderBoxSize, x = Array.isArray(m) ? m[0] : m;
|
||
h = x.inlineSize, y = x.blockSize;
|
||
} else
|
||
h = e.offsetWidth, y = e.offsetHeight;
|
||
t({ width: h, height: y });
|
||
});
|
||
return o.observe(e, { box: "border-box" }), () => o.unobserve(e);
|
||
}
|
||
var fF = Boolean(globalThis == null ? void 0 : globalThis.document) ? bo : rt;
|
||
function pF(e, t) {
|
||
var n, i;
|
||
if (!e || !e.parentElement)
|
||
return;
|
||
const o = (i = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? i : window, l = new o.MutationObserver(() => {
|
||
t();
|
||
});
|
||
return l.observe(e.parentElement, { childList: !0 }), () => {
|
||
l.disconnect();
|
||
};
|
||
}
|
||
function hF({
|
||
getNodes: e,
|
||
observeMutation: t = !0
|
||
}) {
|
||
const [n, i] = qe([]), [o, l] = qe(0);
|
||
return fF(() => {
|
||
const f = e(), h = f.map(
|
||
(y, m) => dF(y, (x) => {
|
||
i((b) => [
|
||
...b.slice(0, m),
|
||
x,
|
||
...b.slice(m + 1)
|
||
]);
|
||
})
|
||
);
|
||
if (t) {
|
||
const y = f[0];
|
||
h.push(
|
||
pF(y, () => {
|
||
l((m) => m + 1);
|
||
})
|
||
);
|
||
}
|
||
return () => {
|
||
h.forEach((y) => {
|
||
y == null || y();
|
||
});
|
||
};
|
||
}, [o]), n;
|
||
}
|
||
function vF(e) {
|
||
return typeof e == "object" && e !== null && "current" in e;
|
||
}
|
||
function mF(e) {
|
||
const [t] = hF({
|
||
observeMutation: !1,
|
||
getNodes() {
|
||
return [vF(e) ? e.current : e];
|
||
}
|
||
});
|
||
return t;
|
||
}
|
||
function gF(e) {
|
||
var t;
|
||
const {
|
||
min: n = 0,
|
||
max: i = 100,
|
||
onChange: o,
|
||
value: l,
|
||
defaultValue: f,
|
||
isReversed: h,
|
||
direction: y = "ltr",
|
||
orientation: m = "horizontal",
|
||
id: x,
|
||
isDisabled: b,
|
||
isReadOnly: E,
|
||
onChangeStart: j,
|
||
onChangeEnd: M,
|
||
step: R = 1,
|
||
getAriaValueText: k,
|
||
"aria-valuetext": A,
|
||
"aria-label": L,
|
||
"aria-labelledby": z,
|
||
name: I,
|
||
focusThumbOnChange: _ = !0,
|
||
...U
|
||
} = e, B = kr(j), q = kr(M), J = kr(k), G = QL({
|
||
isReversed: h,
|
||
direction: y,
|
||
orientation: m
|
||
}), [H, le] = fS({
|
||
value: l,
|
||
defaultValue: f ?? xF(n, i),
|
||
onChange: o
|
||
}), [ae, he] = qe(!1), [Te, xe] = qe(!1), $ = !(b || E), Y = (i - n) / 10, te = R || (i - n) / 100, V = Tg(H, n, i), ne = i - V + n, Ee = mw(G ? ne : V, n, i), se = m === "vertical", ve = OT({
|
||
min: n,
|
||
max: i,
|
||
step: R,
|
||
isDisabled: b,
|
||
value: V,
|
||
isInteractive: $,
|
||
isReversed: G,
|
||
isVertical: se,
|
||
eventSource: null,
|
||
focusThumbOnChange: _,
|
||
orientation: m
|
||
}), Ce = He(null), Ae = He(null), Ve = He(null), tt = bi(), at = x ?? tt, [ze, Qe] = [`slider-thumb-${at}`, `slider-track-${at}`], Et = Q(
|
||
(ge) => {
|
||
var _e, yt;
|
||
if (!Ce.current)
|
||
return;
|
||
const Qt = ve.current;
|
||
Qt.eventSource = "pointer";
|
||
const yn = Ce.current.getBoundingClientRect(), { clientX: vt, clientY: dt } = (yt = (_e = ge.touches) == null ? void 0 : _e[0]) != null ? yt : ge, Nn = se ? yn.bottom - dt : vt - yn.left, jn = se ? yn.height : yn.width;
|
||
let Wt = Nn / jn;
|
||
G && (Wt = 1 - Wt);
|
||
let da = HO(Wt, Qt.min, Qt.max);
|
||
return Qt.step && (da = parseFloat(
|
||
gw(da, Qt.min, Qt.step)
|
||
)), da = Tg(da, Qt.min, Qt.max), da;
|
||
},
|
||
[se, G, ve]
|
||
), Xe = Q(
|
||
(ge) => {
|
||
const _e = ve.current;
|
||
_e.isInteractive && (ge = parseFloat(gw(ge, _e.min, te)), ge = Tg(ge, _e.min, _e.max), le(ge));
|
||
},
|
||
[te, le, ve]
|
||
), ht = an(
|
||
() => ({
|
||
stepUp(ge = te) {
|
||
const _e = G ? V - ge : V + ge;
|
||
Xe(_e);
|
||
},
|
||
stepDown(ge = te) {
|
||
const _e = G ? V + ge : V - ge;
|
||
Xe(_e);
|
||
},
|
||
reset() {
|
||
Xe(f || 0);
|
||
},
|
||
stepTo(ge) {
|
||
Xe(ge);
|
||
}
|
||
}),
|
||
[Xe, G, V, te, f]
|
||
), Ht = Q(
|
||
(ge) => {
|
||
const _e = ve.current, Qt = {
|
||
ArrowRight: () => ht.stepUp(),
|
||
ArrowUp: () => ht.stepUp(),
|
||
ArrowLeft: () => ht.stepDown(),
|
||
ArrowDown: () => ht.stepDown(),
|
||
PageUp: () => ht.stepUp(Y),
|
||
PageDown: () => ht.stepDown(Y),
|
||
Home: () => Xe(_e.min),
|
||
End: () => Xe(_e.max)
|
||
}[ge.key];
|
||
Qt && (ge.preventDefault(), ge.stopPropagation(), Qt(ge), _e.eventSource = "keyboard");
|
||
},
|
||
[ht, Xe, Y, ve]
|
||
), Ot = (t = J == null ? void 0 : J(V)) != null ? t : A, on = mF(Ae), { getThumbStyle: En, rootStyle: ee, trackStyle: We, innerTrackStyle: Fe } = an(() => {
|
||
const ge = ve.current, _e = on ?? { width: 0, height: 0 };
|
||
return YL({
|
||
isReversed: G,
|
||
orientation: ge.orientation,
|
||
thumbRects: [_e],
|
||
thumbPercents: [Ee]
|
||
});
|
||
}, [G, on, Ee, ve]), ot = Q(() => {
|
||
ve.current.focusThumbOnChange && setTimeout(() => {
|
||
var _e;
|
||
return (_e = Ae.current) == null ? void 0 : _e.focus();
|
||
});
|
||
}, [ve]);
|
||
fc(() => {
|
||
const ge = ve.current;
|
||
ot(), ge.eventSource === "keyboard" && (q == null || q(ge.value));
|
||
}, [V, q]);
|
||
function me(ge) {
|
||
const _e = Et(ge);
|
||
_e != null && _e !== ve.current.value && le(_e);
|
||
}
|
||
cF(Ve, {
|
||
onPanSessionStart(ge) {
|
||
const _e = ve.current;
|
||
_e.isInteractive && (he(!0), ot(), me(ge), B == null || B(_e.value));
|
||
},
|
||
onPanSessionEnd() {
|
||
const ge = ve.current;
|
||
ge.isInteractive && (he(!1), q == null || q(ge.value));
|
||
},
|
||
onPan(ge) {
|
||
ve.current.isInteractive && me(ge);
|
||
}
|
||
});
|
||
const Le = Q(
|
||
(ge = {}, _e = null) => ({
|
||
...ge,
|
||
...U,
|
||
ref: Rn(_e, Ve),
|
||
tabIndex: -1,
|
||
"aria-disabled": P2(b),
|
||
"data-focused": qd(Te),
|
||
style: {
|
||
...ge.style,
|
||
...ee
|
||
}
|
||
}),
|
||
[U, b, Te, ee]
|
||
), Dt = Q(
|
||
(ge = {}, _e = null) => ({
|
||
...ge,
|
||
ref: Rn(_e, Ce),
|
||
id: Qe,
|
||
"data-disabled": qd(b),
|
||
style: {
|
||
...ge.style,
|
||
...We
|
||
}
|
||
}),
|
||
[b, Qe, We]
|
||
), Vt = Q(
|
||
(ge = {}, _e = null) => ({
|
||
...ge,
|
||
ref: _e,
|
||
style: {
|
||
...ge.style,
|
||
...Fe
|
||
}
|
||
}),
|
||
[Fe]
|
||
), ke = Q(
|
||
(ge = {}, _e = null) => ({
|
||
...ge,
|
||
ref: Rn(_e, Ae),
|
||
role: "slider",
|
||
tabIndex: $ ? 0 : void 0,
|
||
id: ze,
|
||
"data-active": qd(ae),
|
||
"aria-valuetext": Ot,
|
||
"aria-valuemin": n,
|
||
"aria-valuemax": i,
|
||
"aria-valuenow": V,
|
||
"aria-orientation": m,
|
||
"aria-disabled": P2(b),
|
||
"aria-readonly": P2(E),
|
||
"aria-label": L,
|
||
"aria-labelledby": L ? void 0 : z,
|
||
style: {
|
||
...ge.style,
|
||
...En(0)
|
||
},
|
||
onKeyDown: O2(ge.onKeyDown, Ht),
|
||
onFocus: O2(ge.onFocus, () => xe(!0)),
|
||
onBlur: O2(ge.onBlur, () => xe(!1))
|
||
}),
|
||
[
|
||
$,
|
||
ze,
|
||
ae,
|
||
Ot,
|
||
n,
|
||
i,
|
||
V,
|
||
m,
|
||
b,
|
||
E,
|
||
L,
|
||
z,
|
||
En,
|
||
Ht
|
||
]
|
||
), Nt = Q(
|
||
(ge, _e = null) => {
|
||
const yt = !(ge.value < n || ge.value > i), Qt = V >= ge.value, yn = mw(ge.value, n, i), vt = {
|
||
position: "absolute",
|
||
pointerEvents: "none",
|
||
...yF({
|
||
orientation: m,
|
||
vertical: {
|
||
bottom: G ? `${100 - yn}%` : `${yn}%`
|
||
},
|
||
horizontal: {
|
||
left: G ? `${100 - yn}%` : `${yn}%`
|
||
}
|
||
})
|
||
};
|
||
return {
|
||
...ge,
|
||
ref: _e,
|
||
role: "presentation",
|
||
"aria-hidden": !0,
|
||
"data-disabled": qd(b),
|
||
"data-invalid": qd(!yt),
|
||
"data-highlighted": qd(Qt),
|
||
style: {
|
||
...ge.style,
|
||
...vt
|
||
}
|
||
};
|
||
},
|
||
[b, G, i, n, m, V]
|
||
), tn = Q(
|
||
(ge = {}, _e = null) => ({
|
||
...ge,
|
||
ref: _e,
|
||
type: "hidden",
|
||
value: V,
|
||
name: I
|
||
}),
|
||
[I, V]
|
||
);
|
||
return {
|
||
state: { value: V, isFocused: Te, isDragging: ae },
|
||
actions: ht,
|
||
getRootProps: Le,
|
||
getTrackProps: Dt,
|
||
getInnerTrackProps: Vt,
|
||
getThumbProps: ke,
|
||
getMarkerProps: Nt,
|
||
getInputProps: tn
|
||
};
|
||
}
|
||
function yF(e) {
|
||
const { orientation: t, vertical: n, horizontal: i } = e;
|
||
return t === "vertical" ? n : i;
|
||
}
|
||
function xF(e, t) {
|
||
return t < e ? e : e + (t - e) / 2;
|
||
}
|
||
var [SF, p0] = Qn({
|
||
name: "SliderContext",
|
||
hookName: "useSliderContext",
|
||
providerName: "<Slider />"
|
||
}), [bF, h0] = Qn({
|
||
name: "SliderStylesContext",
|
||
hookName: "useSliderStyles",
|
||
providerName: "<Slider />"
|
||
}), AT = $e((e, t) => {
|
||
const n = {
|
||
orientation: "horizontal",
|
||
...e
|
||
}, i = Da("Slider", n), o = ar(n), { direction: l } = cc();
|
||
o.direction = l;
|
||
const { getInputProps: f, getRootProps: h, ...y } = gF(o), m = h(), x = f({}, t);
|
||
return /* @__PURE__ */ c.jsx(SF, { value: y, children: /* @__PURE__ */ c.jsx(bF, { value: i, children: /* @__PURE__ */ c.jsxs(
|
||
Be.div,
|
||
{
|
||
...m,
|
||
className: Wh("chakra-slider", n.className),
|
||
__css: i.container,
|
||
children: [
|
||
n.children,
|
||
/* @__PURE__ */ c.jsx("input", { ...x })
|
||
]
|
||
}
|
||
) }) });
|
||
});
|
||
AT.displayName = "Slider";
|
||
var NT = $e((e, t) => {
|
||
const { getThumbProps: n } = p0(), i = h0(), o = n(e, t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...o,
|
||
className: Wh("chakra-slider__thumb", e.className),
|
||
__css: i.thumb
|
||
}
|
||
);
|
||
});
|
||
NT.displayName = "SliderThumb";
|
||
var zT = $e((e, t) => {
|
||
const { getTrackProps: n } = p0(), i = h0(), o = n(e, t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...o,
|
||
className: Wh("chakra-slider__track", e.className),
|
||
__css: i.track
|
||
}
|
||
);
|
||
});
|
||
zT.displayName = "SliderTrack";
|
||
var IT = $e(
|
||
(e, t) => {
|
||
const { getInnerTrackProps: n } = p0(), i = h0(), o = n(e, t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...o,
|
||
className: Wh("chakra-slider__filled-track", e.className),
|
||
__css: i.filledTrack
|
||
}
|
||
);
|
||
}
|
||
);
|
||
IT.displayName = "SliderFilledTrack";
|
||
var Nx = $e((e, t) => {
|
||
const { getMarkerProps: n } = p0(), i = h0(), o = n(e, t);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...o,
|
||
className: Wh("chakra-slider__marker", e.className),
|
||
__css: i.mark
|
||
}
|
||
);
|
||
});
|
||
Nx.displayName = "SliderMark";
|
||
var LT = $e(function(t, n) {
|
||
const i = Da("Switch", t), { spacing: o = "0.5rem", children: l, ...f } = ar(t), {
|
||
state: h,
|
||
getInputProps: y,
|
||
getCheckboxProps: m,
|
||
getRootProps: x,
|
||
getLabelProps: b
|
||
} = J6(f), E = an(
|
||
() => ({
|
||
display: "inline-block",
|
||
position: "relative",
|
||
verticalAlign: "middle",
|
||
lineHeight: 0,
|
||
...i.container
|
||
}),
|
||
[i.container]
|
||
), j = an(
|
||
() => ({
|
||
display: "inline-flex",
|
||
flexShrink: 0,
|
||
justifyContent: "flex-start",
|
||
boxSizing: "content-box",
|
||
cursor: "pointer",
|
||
...i.track
|
||
}),
|
||
[i.track]
|
||
), M = an(
|
||
() => ({
|
||
userSelect: "none",
|
||
marginStart: o,
|
||
...i.label
|
||
}),
|
||
[o, i.label]
|
||
);
|
||
return /* @__PURE__ */ c.jsxs(
|
||
Be.label,
|
||
{
|
||
...x(),
|
||
className: At("chakra-switch", t.className),
|
||
__css: E,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("input", { className: "chakra-switch__input", ...y({}, n) }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
...m(),
|
||
className: "chakra-switch__track",
|
||
__css: j,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
__css: i.thumb,
|
||
className: "chakra-switch__thumb",
|
||
"data-checked": Yt(h.isChecked),
|
||
"data-hover": Yt(h.isHovered)
|
||
}
|
||
)
|
||
}
|
||
),
|
||
l && /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
className: "chakra-switch__label",
|
||
...b(),
|
||
__css: M,
|
||
children: l
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
});
|
||
LT.displayName = "Switch";
|
||
var [
|
||
CF,
|
||
wF,
|
||
EF,
|
||
jF
|
||
] = cS();
|
||
function TF(e) {
|
||
var t;
|
||
const {
|
||
defaultIndex: n,
|
||
onChange: i,
|
||
index: o,
|
||
isManual: l,
|
||
isLazy: f,
|
||
lazyBehavior: h = "unmount",
|
||
orientation: y = "horizontal",
|
||
direction: m = "ltr",
|
||
...x
|
||
} = e, [b, E] = qe(n ?? 0), [j, M] = fS({
|
||
defaultValue: n ?? 0,
|
||
value: o,
|
||
onChange: i
|
||
});
|
||
rt(() => {
|
||
o != null && E(o);
|
||
}, [o]);
|
||
const R = EF(), k = bi();
|
||
return {
|
||
id: `tabs-${(t = e.id) != null ? t : k}`,
|
||
selectedIndex: j,
|
||
focusedIndex: b,
|
||
setSelectedIndex: M,
|
||
setFocusedIndex: E,
|
||
isManual: l,
|
||
isLazy: f,
|
||
lazyBehavior: h,
|
||
orientation: y,
|
||
descendants: R,
|
||
direction: m,
|
||
htmlProps: x
|
||
};
|
||
}
|
||
var [DF, v0] = Qn({
|
||
name: "TabsContext",
|
||
errorMessage: "useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"
|
||
});
|
||
function MF(e) {
|
||
const { focusedIndex: t, orientation: n, direction: i } = v0(), o = wF(), l = Q(
|
||
(f) => {
|
||
const h = () => {
|
||
var L;
|
||
const z = o.nextEnabled(t);
|
||
z && ((L = z.node) == null || L.focus());
|
||
}, y = () => {
|
||
var L;
|
||
const z = o.prevEnabled(t);
|
||
z && ((L = z.node) == null || L.focus());
|
||
}, m = () => {
|
||
var L;
|
||
const z = o.firstEnabled();
|
||
z && ((L = z.node) == null || L.focus());
|
||
}, x = () => {
|
||
var L;
|
||
const z = o.lastEnabled();
|
||
z && ((L = z.node) == null || L.focus());
|
||
}, b = n === "horizontal", E = n === "vertical", j = f.key, M = i === "ltr" ? "ArrowLeft" : "ArrowRight", R = i === "ltr" ? "ArrowRight" : "ArrowLeft", A = {
|
||
[M]: () => b && y(),
|
||
[R]: () => b && h(),
|
||
ArrowDown: () => E && h(),
|
||
ArrowUp: () => E && y(),
|
||
Home: m,
|
||
End: x
|
||
}[j];
|
||
A && (f.preventDefault(), A(f));
|
||
},
|
||
[o, t, n, i]
|
||
);
|
||
return {
|
||
...e,
|
||
role: "tablist",
|
||
"aria-orientation": n,
|
||
onKeyDown: St(e.onKeyDown, l)
|
||
};
|
||
}
|
||
function RF(e) {
|
||
const { isDisabled: t, isFocusable: n, ...i } = e, { setSelectedIndex: o, isManual: l, id: f, setFocusedIndex: h, selectedIndex: y } = v0(), { index: m, register: x } = jF({
|
||
disabled: t && !n
|
||
}), b = m === y, E = () => {
|
||
o(m);
|
||
}, j = () => {
|
||
h(m), !l && !(t && n) && o(m);
|
||
}, M = Xj({
|
||
...i,
|
||
ref: Rn(x, e.ref),
|
||
isDisabled: t,
|
||
isFocusable: n,
|
||
onClick: St(e.onClick, E)
|
||
}), R = "button";
|
||
return {
|
||
...M,
|
||
id: FT(f, m),
|
||
role: "tab",
|
||
tabIndex: b ? 0 : -1,
|
||
type: R,
|
||
"aria-selected": b,
|
||
"aria-controls": BT(f, m),
|
||
onFocus: t ? void 0 : St(e.onFocus, j)
|
||
};
|
||
}
|
||
var [kF, PF] = Qn({});
|
||
function OF(e) {
|
||
const t = v0(), { id: n, selectedIndex: i } = t, l = vS(e.children).map(
|
||
(f, h) => Ns(
|
||
kF,
|
||
{
|
||
key: h,
|
||
value: {
|
||
isSelected: h === i,
|
||
id: BT(n, h),
|
||
tabId: FT(n, h),
|
||
selectedIndex: i
|
||
}
|
||
},
|
||
f
|
||
)
|
||
);
|
||
return { ...e, children: l };
|
||
}
|
||
function AF(e) {
|
||
const { children: t, ...n } = e, { isLazy: i, lazyBehavior: o } = v0(), { isSelected: l, id: f, tabId: h } = PF(), y = He(!1);
|
||
l && (y.current = !0);
|
||
const m = HS({
|
||
wasSelected: y.current,
|
||
isSelected: l,
|
||
enabled: i,
|
||
mode: o
|
||
});
|
||
return {
|
||
tabIndex: 0,
|
||
...n,
|
||
children: m ? t : null,
|
||
role: "tabpanel",
|
||
"aria-labelledby": h,
|
||
hidden: !l,
|
||
id: f
|
||
};
|
||
}
|
||
function FT(e, t) {
|
||
return `${e}--tab-${t}`;
|
||
}
|
||
function BT(e, t) {
|
||
return `${e}--tabpanel-${t}`;
|
||
}
|
||
var [NF, m0] = Qn({
|
||
name: "TabsStylesContext",
|
||
errorMessage: `useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `
|
||
}), _T = $e(function(t, n) {
|
||
const i = Da("Tabs", t), { children: o, className: l, ...f } = ar(t), { htmlProps: h, descendants: y, ...m } = TF(f), x = an(() => m, [m]), { isFitted: b, ...E } = h;
|
||
return /* @__PURE__ */ c.jsx(CF, { value: y, children: /* @__PURE__ */ c.jsx(DF, { value: x, children: /* @__PURE__ */ c.jsx(NF, { value: i, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
className: At("chakra-tabs", l),
|
||
ref: n,
|
||
...E,
|
||
__css: i.root,
|
||
children: o
|
||
}
|
||
) }) }) });
|
||
});
|
||
_T.displayName = "Tabs";
|
||
var UT = $e(function(t, n) {
|
||
const i = MF({ ...t, ref: n }), l = {
|
||
display: "flex",
|
||
...m0().tablist
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...i,
|
||
className: At("chakra-tabs__tablist", t.className),
|
||
__css: l
|
||
}
|
||
);
|
||
});
|
||
UT.displayName = "TabList";
|
||
var HT = $e(function(t, n) {
|
||
const i = AF({ ...t, ref: n }), o = m0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
outline: "0",
|
||
...i,
|
||
className: At("chakra-tabs__tab-panel", t.className),
|
||
__css: o.tabpanel
|
||
}
|
||
);
|
||
});
|
||
HT.displayName = "TabPanel";
|
||
var VT = $e(function(t, n) {
|
||
const i = OF(t), o = m0();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...i,
|
||
width: "100%",
|
||
ref: n,
|
||
className: At("chakra-tabs__tab-panels", t.className),
|
||
__css: o.tabpanels
|
||
}
|
||
);
|
||
});
|
||
VT.displayName = "TabPanels";
|
||
var WT = $e(function(t, n) {
|
||
const i = m0(), o = RF({ ...t, ref: n }), l = {
|
||
outline: "0",
|
||
display: "flex",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
...i.tab
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.button,
|
||
{
|
||
...o,
|
||
className: At("chakra-tabs__tab", t.className),
|
||
__css: l
|
||
}
|
||
);
|
||
});
|
||
WT.displayName = "Tab";
|
||
function zF(e, t = []) {
|
||
const n = Object.assign({}, e);
|
||
for (const i of t)
|
||
i in n && delete n[i];
|
||
return n;
|
||
}
|
||
var IF = ["h", "minH", "height", "minHeight"], rb = $e((e, t) => {
|
||
const n = Xl("Textarea", e), { className: i, rows: o, ...l } = ar(e), f = mS(l), h = o ? zF(n, IF) : n;
|
||
return /* @__PURE__ */ c.jsx(
|
||
Be.textarea,
|
||
{
|
||
ref: t,
|
||
rows: o,
|
||
...f,
|
||
className: At("chakra-textarea", i),
|
||
__css: h
|
||
}
|
||
);
|
||
});
|
||
rb.displayName = "Textarea";
|
||
var LF = {
|
||
exit: {
|
||
scale: 0.85,
|
||
opacity: 0,
|
||
transition: {
|
||
opacity: { duration: 0.15, easings: "easeInOut" },
|
||
scale: { duration: 0.2, easings: "easeInOut" }
|
||
}
|
||
},
|
||
enter: {
|
||
scale: 1,
|
||
opacity: 1,
|
||
transition: {
|
||
opacity: { easings: "easeOut", duration: 0.2 },
|
||
scale: { duration: 0.2, ease: [0.175, 0.885, 0.4, 1.1] }
|
||
}
|
||
}
|
||
}, Vg = (e) => {
|
||
var t;
|
||
return ((t = e.current) == null ? void 0 : t.ownerDocument) || document;
|
||
}, zx = (e) => {
|
||
var t, n;
|
||
return ((n = (t = e.current) == null ? void 0 : t.ownerDocument) == null ? void 0 : n.defaultView) || window;
|
||
};
|
||
function FF(e = {}) {
|
||
const {
|
||
openDelay: t = 0,
|
||
closeDelay: n = 0,
|
||
closeOnClick: i = !0,
|
||
closeOnMouseDown: o,
|
||
closeOnScroll: l,
|
||
closeOnPointerDown: f = o,
|
||
closeOnEsc: h = !0,
|
||
onOpen: y,
|
||
onClose: m,
|
||
placement: x,
|
||
id: b,
|
||
isOpen: E,
|
||
defaultIsOpen: j,
|
||
arrowSize: M = 10,
|
||
arrowShadowColor: R,
|
||
arrowPadding: k,
|
||
modifiers: A,
|
||
isDisabled: L,
|
||
gutter: z,
|
||
offset: I,
|
||
direction: _,
|
||
...U
|
||
} = e, { isOpen: B, onOpen: q, onClose: J } = US({
|
||
isOpen: E,
|
||
defaultIsOpen: j,
|
||
onOpen: y,
|
||
onClose: m
|
||
}), { referenceRef: G, getPopperProps: H, getArrowInnerProps: le, getArrowProps: ae } = _S({
|
||
enabled: B,
|
||
placement: x,
|
||
arrowPadding: k,
|
||
modifiers: A,
|
||
gutter: z,
|
||
offset: I,
|
||
direction: _
|
||
}), he = bi(), xe = `tooltip-${b ?? he}`, $ = He(null), Y = He(), te = Q(() => {
|
||
Y.current && (clearTimeout(Y.current), Y.current = void 0);
|
||
}, []), V = He(), ne = Q(() => {
|
||
V.current && (clearTimeout(V.current), V.current = void 0);
|
||
}, []), we = Q(() => {
|
||
ne(), J();
|
||
}, [J, ne]), Ee = BF($, we), se = Q(() => {
|
||
if (!L && !Y.current) {
|
||
Ee();
|
||
const Qe = zx($);
|
||
Y.current = Qe.setTimeout(q, t);
|
||
}
|
||
}, [Ee, L, q, t]), ve = Q(() => {
|
||
te();
|
||
const Qe = zx($);
|
||
V.current = Qe.setTimeout(we, n);
|
||
}, [n, we, te]), Ce = Q(() => {
|
||
B && i && ve();
|
||
}, [i, ve, B]), Ae = Q(() => {
|
||
B && f && ve();
|
||
}, [f, ve, B]), Ve = Q(
|
||
(Qe) => {
|
||
B && Qe.key === "Escape" && ve();
|
||
},
|
||
[B, ve]
|
||
);
|
||
ec(
|
||
() => Vg($),
|
||
"keydown",
|
||
h ? Ve : void 0
|
||
), ec(
|
||
() => Vg($),
|
||
"scroll",
|
||
() => {
|
||
B && l && we();
|
||
}
|
||
), rt(() => {
|
||
L && (te(), B && J());
|
||
}, [L, B, J, te]), rt(
|
||
() => () => {
|
||
te(), ne();
|
||
},
|
||
[te, ne]
|
||
), ec(() => $.current, "pointerleave", ve);
|
||
const tt = Q(
|
||
(Qe = {}, Et = null) => ({
|
||
...Qe,
|
||
ref: Rn($, Et, G),
|
||
onPointerEnter: St(Qe.onPointerEnter, (ht) => {
|
||
ht.pointerType !== "touch" && se();
|
||
}),
|
||
onClick: St(Qe.onClick, Ce),
|
||
onPointerDown: St(Qe.onPointerDown, Ae),
|
||
onFocus: St(Qe.onFocus, se),
|
||
onBlur: St(Qe.onBlur, ve),
|
||
"aria-describedby": B ? xe : void 0
|
||
}),
|
||
[
|
||
se,
|
||
ve,
|
||
Ae,
|
||
B,
|
||
xe,
|
||
Ce,
|
||
G
|
||
]
|
||
), at = Q(
|
||
(Qe = {}, Et = null) => H(
|
||
{
|
||
...Qe,
|
||
style: {
|
||
...Qe.style,
|
||
[Rr.arrowSize.var]: M ? `${M}px` : void 0,
|
||
[Rr.arrowShadowColor.var]: R
|
||
}
|
||
},
|
||
Et
|
||
),
|
||
[H, M, R]
|
||
), ze = Q(
|
||
(Qe = {}, Et = null) => {
|
||
const Xe = {
|
||
...Qe.style,
|
||
position: "relative",
|
||
transformOrigin: Rr.transformOrigin.varRef
|
||
};
|
||
return {
|
||
ref: Et,
|
||
...U,
|
||
...Qe,
|
||
id: xe,
|
||
role: "tooltip",
|
||
style: Xe
|
||
};
|
||
},
|
||
[U, xe]
|
||
);
|
||
return {
|
||
isOpen: B,
|
||
show: se,
|
||
hide: ve,
|
||
getTriggerProps: tt,
|
||
getTooltipProps: ze,
|
||
getTooltipPositionerProps: at,
|
||
getArrowProps: ae,
|
||
getArrowInnerProps: le
|
||
};
|
||
}
|
||
var z2 = "chakra-ui:close-tooltip";
|
||
function BF(e, t) {
|
||
return rt(() => {
|
||
const n = Vg(e);
|
||
return n.addEventListener(z2, t), () => n.removeEventListener(z2, t);
|
||
}, [t, e]), () => {
|
||
const n = Vg(e), i = zx(e);
|
||
n.dispatchEvent(new i.CustomEvent(z2));
|
||
};
|
||
}
|
||
function _F(e, t = []) {
|
||
const n = Object.assign({}, e);
|
||
for (const i of t)
|
||
i in n && delete n[i];
|
||
return n;
|
||
}
|
||
function UF(e, t) {
|
||
const n = {};
|
||
for (const i of t)
|
||
i in e && (n[i] = e[i]);
|
||
return n;
|
||
}
|
||
var HF = Be(Ws.div), Wr = $e((e, t) => {
|
||
var n, i;
|
||
const o = Xl("Tooltip", e), l = ar(e), f = cc(), {
|
||
children: h,
|
||
label: y,
|
||
shouldWrapChildren: m,
|
||
"aria-label": x,
|
||
hasArrow: b,
|
||
bg: E,
|
||
portalProps: j,
|
||
background: M,
|
||
backgroundColor: R,
|
||
bgColor: k,
|
||
motionProps: A,
|
||
...L
|
||
} = l, z = (i = (n = M ?? R) != null ? n : E) != null ? i : k;
|
||
if (z) {
|
||
o.bg = z;
|
||
const H = PR(f, "colors", z);
|
||
o[Rr.arrowBg.var] = H;
|
||
}
|
||
const I = FF({ ...L, direction: f.direction }), _ = typeof h == "string" || m;
|
||
let U;
|
||
if (_)
|
||
U = /* @__PURE__ */ c.jsx(
|
||
Be.span,
|
||
{
|
||
display: "inline-block",
|
||
tabIndex: 0,
|
||
...I.getTriggerProps(),
|
||
children: h
|
||
}
|
||
);
|
||
else {
|
||
const H = Kl.only(h);
|
||
U = Ci(
|
||
H,
|
||
I.getTriggerProps(H.props, H.ref)
|
||
);
|
||
}
|
||
const B = !!x, q = I.getTooltipProps({}, t), J = B ? _F(q, ["role", "id"]) : q, G = UF(q, ["role", "id"]);
|
||
return y ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
U,
|
||
/* @__PURE__ */ c.jsx(Sf, { children: I.isOpen && /* @__PURE__ */ c.jsx(sS, { ...j, children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
...I.getTooltipPositionerProps(),
|
||
__css: {
|
||
zIndex: o.zIndex,
|
||
pointerEvents: "none"
|
||
},
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
HF,
|
||
{
|
||
variants: LF,
|
||
initial: "exit",
|
||
animate: "enter",
|
||
exit: "exit",
|
||
...A,
|
||
...J,
|
||
__css: o,
|
||
children: [
|
||
y,
|
||
B && /* @__PURE__ */ c.jsx(Be.span, { srOnly: !0, ...G, children: x }),
|
||
b && /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
"data-popper-arrow": !0,
|
||
className: "chakra-tooltip__arrow-wrapper",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Be.div,
|
||
{
|
||
"data-popper-arrow-inner": !0,
|
||
className: "chakra-tooltip__arrow",
|
||
__css: { bg: o.bg }
|
||
}
|
||
)
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
}
|
||
) }) })
|
||
] }) : /* @__PURE__ */ c.jsx(c.Fragment, { children: h });
|
||
});
|
||
Wr.displayName = "Tooltip";
|
||
const ab = r0(null);
|
||
let aE;
|
||
const ib = () => ({
|
||
setOpenUploader: (e) => {
|
||
e && (aE = e);
|
||
},
|
||
openUploader: aE
|
||
}), Sr = ct(
|
||
(e) => e.ui,
|
||
(e) => OR[e.activeTab],
|
||
{
|
||
memoizeOptions: {
|
||
equalityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), VF = ct(
|
||
(e) => e.ui,
|
||
(e) => e.activeTab,
|
||
{
|
||
memoizeOptions: {
|
||
equalityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), vc = ct(
|
||
(e) => e.ui,
|
||
(e) => e,
|
||
{
|
||
memoizeOptions: {
|
||
equalityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), iE = (e) => async (t, n) => {
|
||
const { imageFile: i } = e, o = n(), l = Sr(o), f = new FormData();
|
||
f.append("file", i, i.name), f.append(
|
||
"data",
|
||
JSON.stringify({
|
||
kind: "init"
|
||
})
|
||
);
|
||
const y = await (await fetch(`${window.location.origin}/upload`, {
|
||
method: "POST",
|
||
body: f
|
||
})).json(), m = {
|
||
uuid: K5(),
|
||
category: "user",
|
||
...y
|
||
};
|
||
t(Z5({ image: m, category: "user" })), l === "unifiedCanvas" ? t(t0(m)) : l === "img2img" && t(Ph(m));
|
||
}, ob = (e) => {
|
||
const { children: t } = e;
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
bg: "base.850"
|
||
},
|
||
children: t
|
||
}
|
||
);
|
||
};
|
||
function WF() {
|
||
const { t: e } = Pe();
|
||
return /* @__PURE__ */ c.jsx(ob, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
w: "100%",
|
||
h: "100%",
|
||
gap: 4,
|
||
textAlign: "center"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { children: e("common.nodes") }),
|
||
/* @__PURE__ */ c.jsx(Bt, { maxW: "50rem", gap: 4, children: /* @__PURE__ */ c.jsx(mt, { children: e("common.nodesDesc") }) })
|
||
]
|
||
}
|
||
) });
|
||
}
|
||
const GF = () => {
|
||
const { t: e } = Pe();
|
||
return /* @__PURE__ */ c.jsx(ob, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
w: "100%",
|
||
h: "100%",
|
||
gap: 4,
|
||
textAlign: "center"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { children: e("common.postProcessing") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { maxW: "50rem", gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { children: e("common.postProcessDesc1") }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: e("common.postProcessDesc2") }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: e("common.postProcessDesc3") })
|
||
] })
|
||
]
|
||
}
|
||
) });
|
||
};
|
||
function qF() {
|
||
const { t: e } = Pe();
|
||
return /* @__PURE__ */ c.jsx(ob, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
w: "100%",
|
||
h: "100%",
|
||
gap: 4,
|
||
textAlign: "center"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { children: e("common.training") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { maxW: "50rem", gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { children: e("common.trainingDesc1") }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: e("common.trainingDesc2") })
|
||
] })
|
||
]
|
||
}
|
||
) });
|
||
}
|
||
function YF(e) {
|
||
const { i18n: t } = Pe(), n = localStorage.getItem("i18nextLng");
|
||
pt.useEffect(() => {
|
||
e();
|
||
}, [e]), pt.useEffect(() => {
|
||
t.on("languageChanged", () => {
|
||
e();
|
||
});
|
||
}, [e, t, n]);
|
||
}
|
||
const Ye = $e((e, t) => {
|
||
const { tooltip: n = "", tooltipProps: i, isChecked: o, ...l } = e;
|
||
return /* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
label: n,
|
||
hasArrow: !0,
|
||
...i,
|
||
...i != null && i.placement ? { placement: i.placement } : { placement: "top" },
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
ref: t,
|
||
"aria-checked": o !== void 0 ? o : void 0,
|
||
...l
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}), un = $e((e, t) => {
|
||
const { children: n, tooltip: i = "", tooltipProps: o, isChecked: l, ...f } = e;
|
||
return /* @__PURE__ */ c.jsx(Wr, { label: i, ...o, children: /* @__PURE__ */ c.jsx(pc, { ref: t, "aria-checked": l, ...f, children: n }) });
|
||
}), xo = (e) => {
|
||
const {
|
||
triggerComponent: t,
|
||
children: n,
|
||
hasArrow: i = !0,
|
||
isLazy: o = !0,
|
||
...l
|
||
} = e;
|
||
return /* @__PURE__ */ c.jsxs(eb, { isLazy: o, ...l, children: [
|
||
/* @__PURE__ */ c.jsx($S, { children: t }),
|
||
/* @__PURE__ */ c.jsxs(nb, { children: [
|
||
i && /* @__PURE__ */ c.jsx(tb, {}),
|
||
n
|
||
] })
|
||
] });
|
||
}, g0 = ct(
|
||
(e) => e.lightbox,
|
||
(e) => e,
|
||
{
|
||
memoizeOptions: {
|
||
equalityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), ai = (e) => {
|
||
const { label: t, isDisabled: n, validValues: i, tooltip: o, tooltipProps: l, ...f } = e;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isDisabled: n,
|
||
onClick: (h) => {
|
||
h.stopPropagation(), h.nativeEvent.stopImmediatePropagation(), h.nativeEvent.stopPropagation(), h.nativeEvent.cancelBubble = !0;
|
||
},
|
||
children: [
|
||
t && /* @__PURE__ */ c.jsx(wn, { children: t }),
|
||
/* @__PURE__ */ c.jsx(Wr, { label: o, ...l, children: /* @__PURE__ */ c.jsx(MT, { ...f, children: i.map((h) => typeof h == "string" || typeof h == "number" ? /* @__PURE__ */ c.jsx("option", { value: h, children: h }, h) : /* @__PURE__ */ c.jsx("option", { value: h.value, children: h.key }, h.value)) }) })
|
||
]
|
||
}
|
||
);
|
||
};
|
||
function QF() {
|
||
const e = Z(
|
||
(o) => o.postprocessing.facetoolType
|
||
), t = je(), { t: n } = Pe(), i = (o) => t(wg(o.target.value));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: n("parameters.type"),
|
||
validValues: AR.concat(),
|
||
value: e,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
var GT = {
|
||
color: void 0,
|
||
size: void 0,
|
||
className: void 0,
|
||
style: void 0,
|
||
attr: void 0
|
||
}, oE = pt.createContext && pt.createContext(GT), Hl = globalThis && globalThis.__assign || function() {
|
||
return Hl = Object.assign || function(e) {
|
||
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
||
t = arguments[n];
|
||
for (var o in t)
|
||
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
||
}
|
||
return e;
|
||
}, Hl.apply(this, arguments);
|
||
}, XF = globalThis && globalThis.__rest || function(e, t) {
|
||
var n = {};
|
||
for (var i in e)
|
||
Object.prototype.hasOwnProperty.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
|
||
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
||
for (var o = 0, i = Object.getOwnPropertySymbols(e); o < i.length; o++)
|
||
t.indexOf(i[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[o]) && (n[i[o]] = e[i[o]]);
|
||
return n;
|
||
};
|
||
function qT(e) {
|
||
return e && e.map(function(t, n) {
|
||
return pt.createElement(t.tag, Hl({
|
||
key: n
|
||
}, t.attr), qT(t.child));
|
||
});
|
||
}
|
||
function it(e) {
|
||
return function(t) {
|
||
return pt.createElement(KF, Hl({
|
||
attr: Hl({}, e.attr)
|
||
}, t), qT(e.child));
|
||
};
|
||
}
|
||
function KF(e) {
|
||
var t = function(n) {
|
||
var i = e.attr, o = e.size, l = e.title, f = XF(e, ["attr", "size", "title"]), h = o || n.size || "1em", y;
|
||
return n.className && (y = n.className), e.className && (y = (y ? y + " " : "") + e.className), pt.createElement("svg", Hl({
|
||
stroke: "currentColor",
|
||
fill: "currentColor",
|
||
strokeWidth: "0"
|
||
}, n.attr, i, f, {
|
||
className: y,
|
||
style: Hl(Hl({
|
||
color: e.color || n.color
|
||
}, n.style), e.style),
|
||
height: h,
|
||
width: h,
|
||
xmlns: "http://www.w3.org/2000/svg"
|
||
}), l && pt.createElement("title", null, l), e.children);
|
||
};
|
||
return oE !== void 0 ? pt.createElement(oE.Consumer, null, function(n) {
|
||
return t(n);
|
||
}) : t(GT);
|
||
}
|
||
function YT(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M21 11H6.414l5.293-5.293-1.414-1.414L2.586 12l7.707 7.707 1.414-1.414L6.414 13H21z" } }] })(e);
|
||
}
|
||
function ZF(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19.002 3h-14c-1.103 0-2 .897-2 2v4h2V5h14v14h-14v-4h-2v4c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.898-2-2-2z" } }, { tag: "path", attr: { d: "m11 16 5-4-5-4v3.001H3v2h8z" } }] })(e);
|
||
}
|
||
function sb(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 16c1.671 0 3-1.331 3-3s-1.329-3-3-3-3 1.331-3 3 1.329 3 3 3z" } }, { tag: "path", attr: { d: "M20.817 11.186a8.94 8.94 0 0 0-1.355-3.219 9.053 9.053 0 0 0-2.43-2.43 8.95 8.95 0 0 0-3.219-1.355 9.028 9.028 0 0 0-1.838-.18V2L8 5l3.975 3V6.002c.484-.002.968.044 1.435.14a6.961 6.961 0 0 1 2.502 1.053 7.005 7.005 0 0 1 1.892 1.892A6.967 6.967 0 0 1 19 13a7.032 7.032 0 0 1-.55 2.725 7.11 7.11 0 0 1-.644 1.188 7.2 7.2 0 0 1-.858 1.039 7.028 7.028 0 0 1-3.536 1.907 7.13 7.13 0 0 1-2.822 0 6.961 6.961 0 0 1-2.503-1.054 7.002 7.002 0 0 1-1.89-1.89A6.996 6.996 0 0 1 5 13H3a9.02 9.02 0 0 0 1.539 5.034 9.096 9.096 0 0 0 2.428 2.428A8.95 8.95 0 0 0 12 22a9.09 9.09 0 0 0 1.814-.183 9.014 9.014 0 0 0 3.218-1.355 8.886 8.886 0 0 0 1.331-1.099 9.228 9.228 0 0 0 1.1-1.332A8.952 8.952 0 0 0 21 13a9.09 9.09 0 0 0-.183-1.814z" } }] })(e);
|
||
}
|
||
function JF(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M6.758 8.758 5.344 7.344a8.048 8.048 0 0 0-1.841 2.859l1.873.701a6.048 6.048 0 0 1 1.382-2.146zM19 12.999a7.935 7.935 0 0 0-2.344-5.655A7.917 7.917 0 0 0 12 5.069V2L7 6l5 4V7.089a5.944 5.944 0 0 1 3.242 1.669A5.956 5.956 0 0 1 17 13v.002c0 .33-.033.655-.086.977-.007.043-.011.088-.019.131a6.053 6.053 0 0 1-1.138 2.536c-.16.209-.331.412-.516.597a5.954 5.954 0 0 1-.728.613 5.906 5.906 0 0 1-2.277 1.015c-.142.03-.285.05-.43.069-.062.009-.122.021-.184.027a6.104 6.104 0 0 1-1.898-.103L9.3 20.819a8.087 8.087 0 0 0 2.534.136c.069-.007.138-.021.207-.03.205-.026.409-.056.61-.098l.053-.009-.001-.005a7.877 7.877 0 0 0 2.136-.795l.001.001.028-.019a7.906 7.906 0 0 0 1.01-.67c.27-.209.532-.43.777-.675.248-.247.47-.513.681-.785.021-.028.049-.053.07-.081l-.006-.004a7.899 7.899 0 0 0 1.093-1.997l.008.003c.029-.078.05-.158.076-.237.037-.11.075-.221.107-.333.04-.14.073-.281.105-.423.022-.099.048-.195.066-.295.032-.171.056-.344.076-.516.01-.076.023-.15.03-.227.023-.249.037-.5.037-.753.002-.002.002-.004.002-.008zM6.197 16.597l-1.6 1.201a8.045 8.045 0 0 0 2.569 2.225l.961-1.754a6.018 6.018 0 0 1-1.93-1.672zM5 13c0-.145.005-.287.015-.429l-1.994-.143a7.977 7.977 0 0 0 .483 3.372l1.873-.701A5.975 5.975 0 0 1 5 13z" } }] })(e);
|
||
}
|
||
function $F(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16.242 17.242a6.04 6.04 0 0 1-1.37 1.027l.961 1.754a8.068 8.068 0 0 0 2.569-2.225l-1.6-1.201a5.938 5.938 0 0 1-.56.645zm1.743-4.671a5.975 5.975 0 0 1-.362 2.528l1.873.701a7.977 7.977 0 0 0 .483-3.371l-1.994.142zm1.512-2.368a8.048 8.048 0 0 0-1.841-2.859l-1.414 1.414a6.071 6.071 0 0 1 1.382 2.146l1.873-.701zm-8.128 8.763c-.047-.005-.094-.015-.141-.021a6.701 6.701 0 0 1-.468-.075 5.923 5.923 0 0 1-2.421-1.122 5.954 5.954 0 0 1-.583-.506 6.138 6.138 0 0 1-.516-.597 5.91 5.91 0 0 1-.891-1.634 6.086 6.086 0 0 1-.247-.902c-.008-.043-.012-.088-.019-.131A6.332 6.332 0 0 1 6 13.002V13c0-1.603.624-3.109 1.758-4.242A5.944 5.944 0 0 1 11 7.089V10l5-4-5-4v3.069a7.917 7.917 0 0 0-4.656 2.275A7.936 7.936 0 0 0 4 12.999v.009c0 .253.014.504.037.753.007.076.021.15.03.227.021.172.044.345.076.516.019.1.044.196.066.295.032.142.065.283.105.423.032.112.07.223.107.333.026.079.047.159.076.237l.008-.003A7.948 7.948 0 0 0 5.6 17.785l-.007.005c.021.028.049.053.07.081.211.272.433.538.681.785a8.236 8.236 0 0 0 .966.816c.265.192.537.372.821.529l.028.019.001-.001a7.877 7.877 0 0 0 2.136.795l-.001.005.053.009c.201.042.405.071.61.098.069.009.138.023.207.03a8.038 8.038 0 0 0 2.532-.137l-.424-1.955a6.11 6.11 0 0 1-1.904.102z" } }] })(e);
|
||
}
|
||
function eB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11 6H9v3H6v2h3v3h2v-3h3V9h-3z" } }, { tag: "path", attr: { d: "M10 2c-4.411 0-8 3.589-8 8s3.589 8 8 8a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8zm0 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z" } }] })(e);
|
||
}
|
||
function tB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M6 9h8v2H6z" } }, { tag: "path", attr: { d: "M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396 1.414-1.414-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8 3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6-6-2.691-6-6 2.691-6 6-6z" } }] })(e);
|
||
}
|
||
function kn(e) {
|
||
const [t, n] = qe(!1), {
|
||
label: i,
|
||
value: o,
|
||
min: l = 1,
|
||
max: f = 100,
|
||
step: h = 1,
|
||
onChange: y,
|
||
tooltipSuffix: m = "",
|
||
withSliderMarks: x = !1,
|
||
withInput: b = !1,
|
||
isInteger: E = !1,
|
||
inputWidth: j = 16,
|
||
inputReadOnly: M = !1,
|
||
withReset: R = !1,
|
||
hideTooltip: k = !1,
|
||
isCompact: A = !1,
|
||
handleReset: L,
|
||
isResetDisabled: z,
|
||
isSliderDisabled: I,
|
||
isInputDisabled: _,
|
||
sliderFormControlProps: U,
|
||
sliderFormLabelProps: B,
|
||
sliderMarkProps: q,
|
||
sliderTrackProps: J,
|
||
sliderThumbProps: G,
|
||
sliderNumberInputProps: H,
|
||
sliderNumberInputFieldProps: le,
|
||
sliderNumberInputStepperProps: ae,
|
||
sliderTooltipProps: he,
|
||
sliderIAIIconButtonProps: Te,
|
||
...xe
|
||
} = e, [$, Y] = qe(String(o));
|
||
rt(() => {
|
||
Y(o);
|
||
}, [o]);
|
||
const te = an(
|
||
() => H != null && H.max ? H.max : f,
|
||
[f, H == null ? void 0 : H.max]
|
||
), V = (se) => {
|
||
y(se);
|
||
}, ne = (se) => {
|
||
se.target.value === "" && (se.target.value = String(l));
|
||
const ve = Ie.clamp(
|
||
E ? Math.floor(Number(se.target.value)) : Number($),
|
||
l,
|
||
te
|
||
);
|
||
y(ve);
|
||
}, we = (se) => {
|
||
Y(se);
|
||
}, Ee = () => {
|
||
L && L();
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
sx: A ? {
|
||
display: "flex",
|
||
flexDirection: "row",
|
||
alignItems: "center",
|
||
columnGap: 4,
|
||
margin: 0,
|
||
padding: 0
|
||
} : {},
|
||
...U,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { ...B, mb: -1, children: i }),
|
||
/* @__PURE__ */ c.jsxs(wf, { w: "100%", gap: 2, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
AT,
|
||
{
|
||
"aria-label": i,
|
||
value: o,
|
||
min: l,
|
||
max: f,
|
||
step: h,
|
||
onChange: V,
|
||
onMouseEnter: () => n(!0),
|
||
onMouseLeave: () => n(!1),
|
||
focusThumbOnChange: !1,
|
||
isDisabled: I,
|
||
...xe,
|
||
children: [
|
||
x && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Nx,
|
||
{
|
||
value: l,
|
||
insetInlineStart: 0,
|
||
sx: { insetInlineStart: "unset !important" },
|
||
...q,
|
||
children: l
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Nx,
|
||
{
|
||
value: f,
|
||
insetInlineEnd: 0,
|
||
sx: { insetInlineStart: "unset !important" },
|
||
...q,
|
||
children: f
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(zT, { ...J, children: /* @__PURE__ */ c.jsx(IT, {}) }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
hasArrow: !0,
|
||
placement: "top",
|
||
isOpen: t,
|
||
label: `${o}${m}`,
|
||
hidden: k,
|
||
...he,
|
||
children: /* @__PURE__ */ c.jsx(NT, { ...G })
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
b && /* @__PURE__ */ c.jsxs(
|
||
YS,
|
||
{
|
||
min: l,
|
||
max: te,
|
||
step: h,
|
||
value: $,
|
||
onChange: we,
|
||
onBlur: ne,
|
||
isDisabled: _,
|
||
...H,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
XS,
|
||
{
|
||
readOnly: M,
|
||
minWidth: j,
|
||
...le
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(QS, { ...ae, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ZS,
|
||
{
|
||
onClick: () => y(Number($))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
KS,
|
||
{
|
||
onClick: () => y(Number($))
|
||
}
|
||
)
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
R && /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
size: "sm",
|
||
"aria-label": "Reset",
|
||
tooltip: "Reset",
|
||
icon: /* @__PURE__ */ c.jsx(sb, {}),
|
||
onClick: Ee,
|
||
isDisabled: z,
|
||
...Te
|
||
}
|
||
)
|
||
] })
|
||
]
|
||
}
|
||
);
|
||
}
|
||
function nB() {
|
||
const e = Z(
|
||
(o) => o.system.isGFPGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.facetoolStrength
|
||
), { t: n } = Pe(), i = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isSliderDisabled: !e,
|
||
isInputDisabled: !e,
|
||
isResetDisabled: !e,
|
||
label: n("parameters.strength"),
|
||
step: 0.05,
|
||
min: 0,
|
||
max: 1,
|
||
onChange: (o) => i(Og(o)),
|
||
handleReset: () => i(Og(0.75)),
|
||
value: t,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
withInput: !0
|
||
}
|
||
);
|
||
}
|
||
function rB() {
|
||
const e = Z(
|
||
(o) => o.system.isGFPGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.codeformerFidelity
|
||
), { t: n } = Pe(), i = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isSliderDisabled: !e,
|
||
isInputDisabled: !e,
|
||
isResetDisabled: !e,
|
||
label: n("parameters.codeformerFidelity"),
|
||
step: 0.05,
|
||
min: 0,
|
||
max: 1,
|
||
onChange: (o) => i(rx(o)),
|
||
handleReset: () => i(rx(1)),
|
||
value: t,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
withInput: !0
|
||
}
|
||
);
|
||
}
|
||
const lb = () => {
|
||
const e = Z(
|
||
(t) => t.postprocessing.facetoolType
|
||
);
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(QF, {}),
|
||
/* @__PURE__ */ c.jsx(nB, {}),
|
||
e === "codeformer" && /* @__PURE__ */ c.jsx(rB, {})
|
||
] });
|
||
};
|
||
function aB() {
|
||
const e = Z(
|
||
(o) => o.system.isESRGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.upscalingDenoising
|
||
), { t: n } = Pe(), i = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.denoisingStrength"),
|
||
value: t,
|
||
min: 0,
|
||
max: 1,
|
||
step: 0.01,
|
||
onChange: (o) => {
|
||
i(ax(o));
|
||
},
|
||
handleReset: () => i(ax(0.75)),
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
isSliderDisabled: !e,
|
||
isInputDisabled: !e,
|
||
isResetDisabled: !e
|
||
}
|
||
);
|
||
}
|
||
function iB() {
|
||
const e = Z(
|
||
(o) => o.system.isESRGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.upscalingStrength
|
||
), { t: n } = Pe(), i = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: `${n("parameters.upscale")} ${n("parameters.strength")}`,
|
||
value: t,
|
||
min: 0,
|
||
max: 1,
|
||
step: 0.05,
|
||
onChange: (o) => i(ix(o)),
|
||
handleReset: () => i(ix(0.75)),
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
isSliderDisabled: !e,
|
||
isInputDisabled: !e,
|
||
isResetDisabled: !e
|
||
}
|
||
);
|
||
}
|
||
function oB() {
|
||
const e = Z(
|
||
(l) => l.system.isESRGANAvailable
|
||
), t = Z(
|
||
(l) => l.postprocessing.upscalingLevel
|
||
), { t: n } = Pe(), i = je(), o = (l) => i(J5(Number(l.target.value)));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
isDisabled: !e,
|
||
label: n("parameters.scale"),
|
||
value: t,
|
||
onChange: o,
|
||
validValues: NR
|
||
}
|
||
);
|
||
}
|
||
const ub = () => /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(oB, {}),
|
||
/* @__PURE__ */ c.jsx(aB, {}),
|
||
/* @__PURE__ */ c.jsx(iB, {})
|
||
] }), cb = (e) => e.postprocessing, Xn = (e) => e.system, sB = (e) => e.system.toastQueue, QT = ct(
|
||
Xn,
|
||
(e) => {
|
||
const { model_list: t } = e, n = Ie.reduce(
|
||
t,
|
||
(i, o, l) => (o.status === "active" && (i = l), i),
|
||
""
|
||
);
|
||
return { ...t[n], name: n };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), lB = ct(
|
||
Xn,
|
||
(e) => {
|
||
const { model_list: t } = e;
|
||
return Ie.pickBy(t, (i, o) => {
|
||
if (i.format === "diffusers")
|
||
return { name: o, ...i };
|
||
});
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function Ix() {
|
||
return Ix = Object.assign ? Object.assign.bind() : function(e) {
|
||
for (var t = 1; t < arguments.length; t++) {
|
||
var n = arguments[t];
|
||
for (var i in n)
|
||
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
||
}
|
||
return e;
|
||
}, Ix.apply(this, arguments);
|
||
}
|
||
var XT = ["shift", "alt", "meta", "mod", "ctrl"], uB = {
|
||
esc: "escape",
|
||
return: "enter",
|
||
".": "period",
|
||
",": "comma",
|
||
"-": "slash",
|
||
" ": "space",
|
||
"`": "backquote",
|
||
"#": "backslash",
|
||
"+": "bracketright",
|
||
ShiftLeft: "shift",
|
||
ShiftRight: "shift",
|
||
AltLeft: "alt",
|
||
AltRight: "alt",
|
||
MetaLeft: "meta",
|
||
MetaRight: "meta",
|
||
ControlLeft: "ctrl",
|
||
ControlRight: "ctrl"
|
||
};
|
||
function Bl(e) {
|
||
return (uB[e] || e).trim().toLowerCase().replace("key", "").replace("digit", "").replace("numpad", "").replace("arrow", "");
|
||
}
|
||
function cB(e) {
|
||
return XT.includes(e);
|
||
}
|
||
function I2(e, t) {
|
||
return t === void 0 && (t = ","), typeof e == "string" ? e.split(t) : e;
|
||
}
|
||
function L2(e, t) {
|
||
t === void 0 && (t = "+");
|
||
var n = e.toLocaleLowerCase().split(t).map(function(l) {
|
||
return Bl(l);
|
||
}), i = {
|
||
alt: n.includes("alt"),
|
||
ctrl: n.includes("ctrl") || n.includes("control"),
|
||
shift: n.includes("shift"),
|
||
meta: n.includes("meta"),
|
||
mod: n.includes("mod")
|
||
}, o = n.filter(function(l) {
|
||
return !XT.includes(l);
|
||
});
|
||
return Ix({}, i, {
|
||
keys: o
|
||
});
|
||
}
|
||
var _l = /* @__PURE__ */ new Set();
|
||
function dB(e, t) {
|
||
t === void 0 && (t = ",");
|
||
var n = Array.isArray(e) ? e : e.split(t);
|
||
return n.every(function(i) {
|
||
return _l.has(i.trim().toLowerCase());
|
||
});
|
||
}
|
||
function KT(e) {
|
||
var t = Array.isArray(e) ? e : [e];
|
||
_l.has("meta") && _l.forEach(function(n) {
|
||
return !cB(n) && _l.delete(n.toLowerCase());
|
||
}), t.forEach(function(n) {
|
||
return _l.add(n.toLowerCase());
|
||
});
|
||
}
|
||
function ZT(e) {
|
||
var t = Array.isArray(e) ? e : [e];
|
||
e === "meta" ? _l.clear() : t.forEach(function(n) {
|
||
return _l.delete(n.toLowerCase());
|
||
});
|
||
}
|
||
(function() {
|
||
typeof document < "u" && (document.addEventListener("keydown", function(e) {
|
||
e.key !== void 0 && KT([Bl(e.key), Bl(e.code)]);
|
||
}), document.addEventListener("keyup", function(e) {
|
||
e.key !== void 0 && ZT([Bl(e.key), Bl(e.code)]);
|
||
})), typeof window < "u" && window.addEventListener("blur", function() {
|
||
_l.clear();
|
||
});
|
||
})();
|
||
function fB(e, t, n) {
|
||
(typeof n == "function" && n(e, t) || n === !0) && e.preventDefault();
|
||
}
|
||
function pB(e, t, n) {
|
||
return typeof n == "function" ? n(e, t) : n === !0 || n === void 0;
|
||
}
|
||
function hB(e) {
|
||
return JT(e, ["input", "textarea", "select"]);
|
||
}
|
||
function JT(e, t) {
|
||
var n = e.target;
|
||
t === void 0 && (t = !1);
|
||
var i = n && n.tagName;
|
||
return t instanceof Array ? Boolean(i && t && t.some(function(o) {
|
||
return o.toLowerCase() === i.toLowerCase();
|
||
})) : Boolean(i && t && t === !0);
|
||
}
|
||
function vB(e, t) {
|
||
return e.length === 0 && t ? (console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'), !0) : t ? e.some(function(n) {
|
||
return t.includes(n);
|
||
}) || e.includes("*") : !0;
|
||
}
|
||
var mB = function(t, n, i) {
|
||
i === void 0 && (i = !1);
|
||
var o = n.alt, l = n.meta, f = n.mod, h = n.shift, y = n.ctrl, m = n.keys, x = t.key, b = t.code, E = t.ctrlKey, j = t.metaKey, M = t.shiftKey, R = t.altKey, k = Bl(b), A = x.toLowerCase();
|
||
if (!i) {
|
||
if (o === !R && A !== "alt" || h === !M && A !== "shift")
|
||
return !1;
|
||
if (f) {
|
||
if (!j && !E)
|
||
return !1;
|
||
} else if (l === !j && A !== "meta" || y === !E && A !== "ctrl")
|
||
return !1;
|
||
}
|
||
return m && m.length === 1 && (m.includes(A) || m.includes(k)) ? !0 : m ? dB(m) : !m;
|
||
}, gB = /* @__PURE__ */ r0(void 0), yB = function() {
|
||
return Zl(gB);
|
||
};
|
||
function $T(e, t) {
|
||
return e && t && typeof e == "object" && typeof t == "object" ? Object.keys(e).length === Object.keys(t).length && Object.keys(e).reduce(function(n, i) {
|
||
return n && $T(e[i], t[i]);
|
||
}, !0) : e === t;
|
||
}
|
||
var xB = /* @__PURE__ */ r0({
|
||
hotkeys: [],
|
||
enabledScopes: [],
|
||
toggleScope: function() {
|
||
},
|
||
enableScope: function() {
|
||
},
|
||
disableScope: function() {
|
||
}
|
||
}), SB = function() {
|
||
return Zl(xB);
|
||
};
|
||
function bB(e) {
|
||
var t = He(void 0);
|
||
return $T(t.current, e) || (t.current = e), t.current;
|
||
}
|
||
var sE = function(t) {
|
||
t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation();
|
||
}, CB = typeof window < "u" ? bo : rt;
|
||
function Ze(e, t, n, i) {
|
||
var o = He(null), l = He(!1), f = n instanceof Array ? i instanceof Array ? void 0 : i : n, h = n instanceof Array ? n : i instanceof Array ? i : void 0, y = Q(t, h ?? []), m = He(y);
|
||
h ? m.current = y : m.current = t;
|
||
var x = bB(f), b = SB(), E = b.enabledScopes, j = yB();
|
||
return CB(function() {
|
||
if (!((x == null ? void 0 : x.enabled) === !1 || !vB(E, x == null ? void 0 : x.scopes))) {
|
||
var M = function(L, z) {
|
||
var I;
|
||
if (z === void 0 && (z = !1), !(hB(L) && !JT(L, x == null ? void 0 : x.enableOnFormTags))) {
|
||
if (o.current !== null && document.activeElement !== o.current && !o.current.contains(document.activeElement)) {
|
||
sE(L);
|
||
return;
|
||
}
|
||
(I = L.target) != null && I.isContentEditable && !(x != null && x.enableOnContentEditable) || I2(e, x == null ? void 0 : x.splitKey).forEach(function(_) {
|
||
var U, B = L2(_, x == null ? void 0 : x.combinationKey);
|
||
if (mB(L, B, x == null ? void 0 : x.ignoreModifiers) || (U = B.keys) != null && U.includes("*")) {
|
||
if (z && l.current)
|
||
return;
|
||
if (fB(L, B, x == null ? void 0 : x.preventDefault), !pB(L, B, x == null ? void 0 : x.enabled)) {
|
||
sE(L);
|
||
return;
|
||
}
|
||
m.current(L, B), z || (l.current = !0);
|
||
}
|
||
});
|
||
}
|
||
}, R = function(L) {
|
||
L.key !== void 0 && (KT(Bl(L.code)), ((x == null ? void 0 : x.keydown) === void 0 && (x == null ? void 0 : x.keyup) !== !0 || x != null && x.keydown) && M(L));
|
||
}, k = function(L) {
|
||
L.key !== void 0 && (ZT(Bl(L.code)), l.current = !1, x != null && x.keyup && M(L, !0));
|
||
};
|
||
return (o.current || (f == null ? void 0 : f.document) || document).addEventListener("keyup", k), (o.current || (f == null ? void 0 : f.document) || document).addEventListener("keydown", R), j && I2(e, x == null ? void 0 : x.splitKey).forEach(function(A) {
|
||
return j.addHotkey(L2(A, x == null ? void 0 : x.combinationKey));
|
||
}), function() {
|
||
(o.current || (f == null ? void 0 : f.document) || document).removeEventListener("keyup", k), (o.current || (f == null ? void 0 : f.document) || document).removeEventListener("keydown", R), j && I2(e, x == null ? void 0 : x.splitKey).forEach(function(A) {
|
||
return j.removeHotkey(L2(A, x == null ? void 0 : x.combinationKey));
|
||
});
|
||
};
|
||
}
|
||
}, [e, x, E]), o;
|
||
}
|
||
function wB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z" } }] })(e);
|
||
}
|
||
function EB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z" } }] })(e);
|
||
}
|
||
function jB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z" } }] })(e);
|
||
}
|
||
function TB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 256 512" }, child: [{ tag: "path", attr: { d: "M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z" } }] })(e);
|
||
}
|
||
function DB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 256 512" }, child: [{ tag: "path", attr: { d: "M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" } }] })(e);
|
||
}
|
||
function MB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z" } }] })(e);
|
||
}
|
||
function RB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z" } }] })(e);
|
||
}
|
||
function eD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z" } }] })(e);
|
||
}
|
||
function kB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z" } }] })(e);
|
||
}
|
||
function PB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z" } }] })(e);
|
||
}
|
||
function y0(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" } }] })(e);
|
||
}
|
||
function tD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z" } }] })(e);
|
||
}
|
||
function vf(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z" } }] })(e);
|
||
}
|
||
function nD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z" } }] })(e);
|
||
}
|
||
function OB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M239.1 6.3l-208 78c-18.7 7-31.1 25-31.1 45v225.1c0 18.2 10.3 34.8 26.5 42.9l208 104c13.5 6.8 29.4 6.8 42.9 0l208-104c16.3-8.1 26.5-24.8 26.5-42.9V129.3c0-20-12.4-37.9-31.1-44.9l-208-78C262 2.2 250 2.2 239.1 6.3zM256 68.4l192 72v1.1l-192 78-192-78v-1.1l192-72zm32 356V275.5l160-65v133.9l-160 80z" } }] })(e);
|
||
}
|
||
function db(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z" } }] })(e);
|
||
}
|
||
function rD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z" } }] })(e);
|
||
}
|
||
function AB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z" } }] })(e);
|
||
}
|
||
function NB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" } }] })(e);
|
||
}
|
||
function aD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M50.75 333.25c-12 12-18.75 28.28-18.75 45.26V424L0 480l32 32 56-32h45.49c16.97 0 33.25-6.74 45.25-18.74l126.64-126.62-128-128L50.75 333.25zM483.88 28.12c-37.47-37.5-98.28-37.5-135.75 0l-77.09 77.09-13.1-13.1c-9.44-9.44-24.65-9.31-33.94 0l-40.97 40.97c-9.37 9.37-9.37 24.57 0 33.94l161.94 161.94c9.44 9.44 24.65 9.31 33.94 0L419.88 288c9.37-9.37 9.37-24.57 0-33.94l-13.1-13.1 77.09-77.09c37.51-37.48 37.51-98.26.01-135.75z" } }] })(e);
|
||
}
|
||
function zB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z" } }] })(e);
|
||
}
|
||
function IB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" } }] })(e);
|
||
}
|
||
function iD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M512 320s-64 92.65-64 128c0 35.35 28.66 64 64 64s64-28.65 64-64-64-128-64-128zm-9.37-102.94L294.94 9.37C288.69 3.12 280.5 0 272.31 0s-16.38 3.12-22.62 9.37l-81.58 81.58L81.93 4.76c-6.25-6.25-16.38-6.25-22.62 0L36.69 27.38c-6.24 6.25-6.24 16.38 0 22.62l86.19 86.18-94.76 94.76c-37.49 37.48-37.49 98.26 0 135.75l117.19 117.19c18.74 18.74 43.31 28.12 67.87 28.12 24.57 0 49.13-9.37 67.87-28.12l221.57-221.57c12.5-12.5 12.5-32.75.01-45.25zm-116.22 70.97H65.93c1.36-3.84 3.57-7.98 7.43-11.83l13.15-13.15 81.61-81.61 58.6 58.6c12.49 12.49 32.75 12.49 45.24 0s12.49-32.75 0-45.24l-58.6-58.6 58.95-58.95 162.44 162.44-48.34 48.34z" } }] })(e);
|
||
}
|
||
function LB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z" } }] })(e);
|
||
}
|
||
function FB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z" } }] })(e);
|
||
}
|
||
function BB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z" } }] })(e);
|
||
}
|
||
function _B(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M152.1 236.2c-3.5-12.1-7.8-33.2-7.8-33.2h-.5s-4.3 21.1-7.8 33.2l-11.1 37.5H163zM616 96H336v320h280c13.3 0 24-10.7 24-24V120c0-13.3-10.7-24-24-24zm-24 120c0 6.6-5.4 12-12 12h-11.4c-6.9 23.6-21.7 47.4-42.7 69.9 8.4 6.4 17.1 12.5 26.1 18 5.5 3.4 7.3 10.5 4.1 16.2l-7.9 13.9c-3.4 5.9-10.9 7.8-16.7 4.3-12.6-7.8-24.5-16.1-35.4-24.9-10.9 8.7-22.7 17.1-35.4 24.9-5.8 3.5-13.3 1.6-16.7-4.3l-7.9-13.9c-3.2-5.6-1.4-12.8 4.2-16.2 9.3-5.7 18-11.7 26.1-18-7.9-8.4-14.9-17-21-25.7-4-5.7-2.2-13.6 3.7-17.1l6.5-3.9 7.3-4.3c5.4-3.2 12.4-1.7 16 3.4 5 7 10.8 14 17.4 20.9 13.5-14.2 23.8-28.9 30-43.2H412c-6.6 0-12-5.4-12-12v-16c0-6.6 5.4-12 12-12h64v-16c0-6.6 5.4-12 12-12h16c6.6 0 12 5.4 12 12v16h64c6.6 0 12 5.4 12 12zM0 120v272c0 13.3 10.7 24 24 24h280V96H24c-13.3 0-24 10.7-24 24zm58.9 216.1L116.4 167c1.7-4.9 6.2-8.1 11.4-8.1h32.5c5.1 0 9.7 3.3 11.4 8.1l57.5 169.1c2.6 7.8-3.1 15.9-11.4 15.9h-22.9a12 12 0 0 1-11.5-8.6l-9.4-31.9h-60.2l-9.1 31.8c-1.5 5.1-6.2 8.7-11.5 8.7H70.3c-8.2 0-14-8.1-11.4-15.9z" } }] })(e);
|
||
}
|
||
function oD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z" } }] })(e);
|
||
}
|
||
function UB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z" } }] })(e);
|
||
}
|
||
function HB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" } }] })(e);
|
||
}
|
||
function sD(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z" } }] })(e);
|
||
}
|
||
function VB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z" } }] })(e);
|
||
}
|
||
function WB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z" } }] })(e);
|
||
}
|
||
function Gh(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" } }] })(e);
|
||
}
|
||
function GB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z" } }] })(e);
|
||
}
|
||
function qB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z" } }] })(e);
|
||
}
|
||
function YB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z" } }] })(e);
|
||
}
|
||
function fb(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z" } }] })(e);
|
||
}
|
||
function QB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" } }] })(e);
|
||
}
|
||
function XB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z" } }] })(e);
|
||
}
|
||
function KB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z" } }] })(e);
|
||
}
|
||
function lE(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z" } }] })(e);
|
||
}
|
||
function pb(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z" } }] })(e);
|
||
}
|
||
function ZB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z" } }] })(e);
|
||
}
|
||
function mc(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z" } }] })(e);
|
||
}
|
||
function JB(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z" } }] })(e);
|
||
}
|
||
function x0(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z" } }] })(e);
|
||
}
|
||
function $B(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z" } }] })(e);
|
||
}
|
||
function hb(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z" } }] })(e);
|
||
}
|
||
const cn = (e) => e.canvas, ir = ct(
|
||
[cn, Sr, Xn],
|
||
(e, t, n) => e.layerState.stagingArea.images.length > 0 || t === "unifiedCanvas" && n.isProcessing
|
||
), lD = (e) => e.canvas.layerState.objects.find($5), Gs = (e) => e.gallery, e_ = ct(
|
||
[Gs, g0, ir, Sr],
|
||
(e, t, n, i) => {
|
||
const {
|
||
categories: o,
|
||
currentCategory: l,
|
||
currentImageUuid: f,
|
||
shouldPinGallery: h,
|
||
shouldShowGallery: y,
|
||
galleryImageMinimumWidth: m,
|
||
galleryImageObjectFit: x,
|
||
shouldHoldGalleryOpen: b,
|
||
shouldAutoSwitchToNewImages: E,
|
||
galleryWidth: j,
|
||
shouldUseSingleGalleryColumn: M
|
||
} = e, { isLightboxOpen: R } = t;
|
||
return {
|
||
currentImageUuid: f,
|
||
shouldPinGallery: h,
|
||
shouldShowGallery: y,
|
||
galleryImageMinimumWidth: m,
|
||
galleryImageObjectFit: x,
|
||
galleryGridTemplateColumns: M ? "auto" : `repeat(auto-fill, minmax(${m}px, auto))`,
|
||
activeTabName: i,
|
||
shouldHoldGalleryOpen: b,
|
||
shouldAutoSwitchToNewImages: E,
|
||
images: o[l].images,
|
||
areMoreImagesAvailable: o[l].areMoreImagesAvailable,
|
||
currentCategory: l,
|
||
galleryWidth: j,
|
||
isLightboxOpen: R,
|
||
isStaging: n,
|
||
shouldEnableResize: !(R || i === "unifiedCanvas" && h),
|
||
shouldUseSingleGalleryColumn: M
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), t_ = ct(
|
||
[Gs, Xn, g0, Sr],
|
||
(e, t, n, i) => ({
|
||
mayDeleteImage: t.isConnected && !t.isProcessing,
|
||
galleryImageObjectFit: e.galleryImageObjectFit,
|
||
galleryImageMinimumWidth: e.galleryImageMinimumWidth,
|
||
shouldUseSingleGalleryColumn: e.shouldUseSingleGalleryColumn,
|
||
activeTabName: i,
|
||
isLightboxOpen: n.isLightboxOpen
|
||
}),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), ti = (e) => {
|
||
const {
|
||
label: t,
|
||
isDisabled: n = !1,
|
||
width: i = "auto",
|
||
formControlProps: o,
|
||
formLabelProps: l,
|
||
...f
|
||
} = e;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isDisabled: n,
|
||
width: i,
|
||
display: "flex",
|
||
gap: 4,
|
||
alignItems: "center",
|
||
justifyContent: "space-between",
|
||
...o,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { my: 1, ...l, children: t }),
|
||
/* @__PURE__ */ c.jsx(LT, { ...f })
|
||
]
|
||
}
|
||
);
|
||
}, n_ = ct(
|
||
Xn,
|
||
(e) => {
|
||
const { shouldConfirmOnDelete: t, isConnected: n, isProcessing: i } = e;
|
||
return { shouldConfirmOnDelete: t, isConnected: n, isProcessing: i };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), Wg = $e(
|
||
({ image: e, children: t }, n) => {
|
||
const { isOpen: i, onOpen: o, onClose: l } = Gl(), f = je(), { shouldConfirmOnDelete: h, isConnected: y, isProcessing: m } = Z(
|
||
n_
|
||
), x = He(null), b = (M) => {
|
||
M.stopPropagation(), h ? o() : E();
|
||
}, E = () => {
|
||
y && !m && e && f(zR(e)), l();
|
||
};
|
||
Ze(
|
||
"delete",
|
||
() => {
|
||
h ? o() : E();
|
||
},
|
||
[e, h, y, m]
|
||
);
|
||
const j = (M) => f(e6(!M.target.checked));
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
Ci(t, {
|
||
// TODO: This feels wrong.
|
||
onClick: e ? b : void 0,
|
||
ref: n
|
||
}),
|
||
/* @__PURE__ */ c.jsx(
|
||
ST,
|
||
{
|
||
isOpen: i,
|
||
leastDestructiveRef: x,
|
||
onClose: l,
|
||
children: /* @__PURE__ */ c.jsx(Bs, { children: /* @__PURE__ */ c.jsxs(bT, { children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { fontSize: "lg", fontWeight: "bold", children: "Delete image" }),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsxs(ce, { direction: "column", gap: 5, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { children: "Are you sure? Deleted images will be sent to the Bin. You can restore from there if you wish to." }),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: "Don't ask me again",
|
||
isChecked: !h,
|
||
onChange: j
|
||
}
|
||
)
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsxs(Ls, { children: [
|
||
/* @__PURE__ */ c.jsx(un, { ref: x, onClick: l, children: "Cancel" }),
|
||
/* @__PURE__ */ c.jsx(un, { colorScheme: "error", onClick: E, ml: 3, children: "Delete" })
|
||
] })
|
||
] }) })
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
);
|
||
Wg.displayName = "DeleteImageModal";
|
||
const vb = () => {
|
||
const e = je();
|
||
return (t) => {
|
||
const n = typeof t == "string" ? t : t6(t), [i, o] = IR(n);
|
||
e(n6(i)), e(r6(o));
|
||
};
|
||
}, r_ = ct(
|
||
[
|
||
Xn,
|
||
Gs,
|
||
cb,
|
||
vc,
|
||
g0,
|
||
Sr
|
||
],
|
||
(e, t, n, i, o, l) => {
|
||
const { isProcessing: f, isConnected: h, isGFPGANAvailable: y, isESRGANAvailable: m } = e, { upscalingLevel: x, facetoolStrength: b } = n, { isLightboxOpen: E } = o, { shouldShowImageDetails: j } = i, { intermediateImage: M, currentImage: R } = t;
|
||
return {
|
||
isProcessing: f,
|
||
isConnected: h,
|
||
isGFPGANAvailable: y,
|
||
isESRGANAvailable: m,
|
||
upscalingLevel: x,
|
||
facetoolStrength: b,
|
||
shouldDisableToolbarButtons: Boolean(M) || !R,
|
||
currentImage: R,
|
||
shouldShowImageDetails: j,
|
||
activeTabName: l,
|
||
isLightboxOpen: E
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), uD = (e) => {
|
||
var H, le, ae, he, Te, xe, $, Y;
|
||
const t = je(), {
|
||
isProcessing: n,
|
||
isConnected: i,
|
||
isGFPGANAvailable: o,
|
||
isESRGANAvailable: l,
|
||
upscalingLevel: f,
|
||
facetoolStrength: h,
|
||
shouldDisableToolbarButtons: y,
|
||
shouldShowImageDetails: m,
|
||
currentImage: x,
|
||
isLightboxOpen: b,
|
||
activeTabName: E
|
||
} = Z(r_), j = Lh(), { t: M } = Pe(), R = vb(), k = () => {
|
||
x && (b && t(Ku(!1)), t(Ph(x)), t(ei("img2img")));
|
||
}, A = async () => {
|
||
if (!x)
|
||
return;
|
||
const te = await fetch(x.url).then((ne) => ne.blob()), V = [new ClipboardItem({ [te.type]: te })];
|
||
await navigator.clipboard.write(V), j({
|
||
title: M("toast.imageCopied"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, L = () => {
|
||
navigator.clipboard.writeText(
|
||
x ? window.location.toString() + x.url : ""
|
||
).then(() => {
|
||
j({
|
||
title: M("toast.imageLinkCopied"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
});
|
||
};
|
||
Ze(
|
||
"shift+i",
|
||
() => {
|
||
x ? (k(), j({
|
||
title: M("toast.sentToImageToImage"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})) : j({
|
||
title: M("toast.imageNotLoaded"),
|
||
description: M("toast.imageNotLoadedDesc"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[x]
|
||
);
|
||
const z = () => {
|
||
var te, V;
|
||
x && (x.metadata && t(a6(x.metadata)), ((te = x.metadata) == null ? void 0 : te.image.type) === "img2img" ? t(ei("img2img")) : ((V = x.metadata) == null ? void 0 : V.image.type) === "txt2img" && t(ei("txt2img")));
|
||
};
|
||
Ze(
|
||
"a",
|
||
() => {
|
||
var te, V;
|
||
["txt2img", "img2img"].includes((V = (te = x == null ? void 0 : x.metadata) == null ? void 0 : te.image) == null ? void 0 : V.type) ? (z(), j({
|
||
title: M("toast.parametersSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})) : j({
|
||
title: M("toast.parametersNotSet"),
|
||
description: M("toast.parametersNotSetDesc"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[x]
|
||
);
|
||
const I = () => {
|
||
x != null && x.metadata && t(Oh(x.metadata.image.seed));
|
||
};
|
||
Ze(
|
||
"s",
|
||
() => {
|
||
var te, V;
|
||
(V = (te = x == null ? void 0 : x.metadata) == null ? void 0 : te.image) != null && V.seed ? (I(), j({
|
||
title: M("toast.seedSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})) : j({
|
||
title: M("toast.seedNotSet"),
|
||
description: M("toast.seedNotSetDesc"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[x]
|
||
);
|
||
const _ = Q(() => {
|
||
var te, V, ne, we;
|
||
(V = (te = x == null ? void 0 : x.metadata) == null ? void 0 : te.image) != null && V.prompt && R((we = (ne = x == null ? void 0 : x.metadata) == null ? void 0 : ne.image) == null ? void 0 : we.prompt);
|
||
}, [(le = (H = x == null ? void 0 : x.metadata) == null ? void 0 : H.image) == null ? void 0 : le.prompt, R]);
|
||
Ze(
|
||
"p",
|
||
() => {
|
||
var te, V;
|
||
(V = (te = x == null ? void 0 : x.metadata) == null ? void 0 : te.image) != null && V.prompt ? (_(), j({
|
||
title: M("toast.promptSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})) : j({
|
||
title: M("toast.promptNotSet"),
|
||
description: M("toast.promptNotSetDesc"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[x]
|
||
);
|
||
const U = () => {
|
||
x && t(LR(x));
|
||
};
|
||
Ze(
|
||
"Shift+U",
|
||
() => {
|
||
l && !y && i && !n && f ? U() : j({
|
||
title: M("toast.upscalingFailed"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[
|
||
x,
|
||
l,
|
||
y,
|
||
i,
|
||
n,
|
||
f
|
||
]
|
||
);
|
||
const B = () => {
|
||
x && t(FR(x));
|
||
};
|
||
Ze(
|
||
"Shift+R",
|
||
() => {
|
||
o && !y && i && !n && h ? B() : j({
|
||
title: M("toast.faceRestoreFailed"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[
|
||
x,
|
||
o,
|
||
y,
|
||
i,
|
||
n,
|
||
h
|
||
]
|
||
);
|
||
const q = () => t(i6(!m)), J = () => {
|
||
x && (b && t(Ku(!1)), t(t0(x)), t(ca(!0)), E !== "unifiedCanvas" && t(ei("unifiedCanvas")), j({
|
||
title: M("toast.sentToUnifiedCanvas"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
}));
|
||
};
|
||
Ze(
|
||
"i",
|
||
() => {
|
||
x ? q() : j({
|
||
title: M("toast.metadataLoadFailed"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[x, m]
|
||
);
|
||
const G = () => {
|
||
t(Ku(!b));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
columnGap: "0.5em"
|
||
},
|
||
...e,
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${M("parameters.sendTo")}...`,
|
||
icon: /* @__PURE__ */ c.jsx(KB, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
rowGap: 2,
|
||
w: 52
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
onClick: k,
|
||
leftIcon: /* @__PURE__ */ c.jsx(lE, {}),
|
||
children: M("parameters.sendToImg2Img")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
onClick: J,
|
||
leftIcon: /* @__PURE__ */ c.jsx(lE, {}),
|
||
children: M("parameters.sendToUnifiedCanvas")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
onClick: A,
|
||
leftIcon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
children: M("parameters.copyImage")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
onClick: L,
|
||
leftIcon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
children: M("parameters.copyImageToLink")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(tc, { download: !0, href: x == null ? void 0 : x.url, children: /* @__PURE__ */ c.jsx(un, { leftIcon: /* @__PURE__ */ c.jsx(db, {}), size: "sm", w: "100%", children: M("parameters.downloadImage") }) })
|
||
]
|
||
}
|
||
)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(NB, {}),
|
||
tooltip: b ? `${M("parameters.closeViewer")} (Z)` : `${M("parameters.openInViewer")} (Z)`,
|
||
"aria-label": b ? `${M("parameters.closeViewer")} (Z)` : `${M("parameters.openInViewer")} (Z)`,
|
||
isChecked: b,
|
||
onClick: G
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(GB, {}),
|
||
tooltip: `${M("parameters.usePrompt")} (P)`,
|
||
"aria-label": `${M("parameters.usePrompt")} (P)`,
|
||
isDisabled: !((he = (ae = x == null ? void 0 : x.metadata) == null ? void 0 : ae.image) != null && he.prompt),
|
||
onClick: _
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(XB, {}),
|
||
tooltip: `${M("parameters.useSeed")} (S)`,
|
||
"aria-label": `${M("parameters.useSeed")} (S)`,
|
||
isDisabled: !((xe = (Te = x == null ? void 0 : x.metadata) == null ? void 0 : Te.image) != null && xe.seed),
|
||
onClick: I
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(kB, {}),
|
||
tooltip: `${M("parameters.useAll")} (A)`,
|
||
"aria-label": `${M("parameters.useAll")} (A)`,
|
||
isDisabled: !["txt2img", "img2img"].includes(
|
||
(Y = ($ = x == null ? void 0 : x.metadata) == null ? void 0 : $.image) == null ? void 0 : Y.type
|
||
),
|
||
onClick: z
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(LB, {}),
|
||
"aria-label": M("parameters.restoreFaces")
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
rowGap: 4
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(lb, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isDisabled: !o || !x || !(i && !n) || !h,
|
||
onClick: B,
|
||
children: M("parameters.restoreFaces")
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(AB, {}),
|
||
"aria-label": M("parameters.upscale")
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
gap: 4
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(ub, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isDisabled: !l || !x || !(i && !n) || !f,
|
||
onClick: U,
|
||
children: M("parameters.upscaleImage")
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(Jr, { isAttached: !0, children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(tD, {}),
|
||
tooltip: `${M("parameters.info")} (I)`,
|
||
"aria-label": `${M("parameters.info")} (I)`,
|
||
isChecked: m,
|
||
onClick: q
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(Wg, { image: x, children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(mc, {}),
|
||
tooltip: `${M("parameters.deleteImage")} (Del)`,
|
||
"aria-label": `${M("parameters.deleteImage")} (Del)`,
|
||
isDisabled: !x || !i || n,
|
||
colorScheme: "error"
|
||
}
|
||
) })
|
||
]
|
||
}
|
||
);
|
||
};
|
||
var a_ = globalThis && globalThis.__extends || function() {
|
||
var e = function(t, n) {
|
||
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, o) {
|
||
i.__proto__ = o;
|
||
} || function(i, o) {
|
||
for (var l in o)
|
||
Object.prototype.hasOwnProperty.call(o, l) && (i[l] = o[l]);
|
||
}, e(t, n);
|
||
};
|
||
return function(t, n) {
|
||
e(t, n);
|
||
function i() {
|
||
this.constructor = t;
|
||
}
|
||
t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
||
};
|
||
}(), Mr = globalThis && globalThis.__assign || function() {
|
||
return Mr = Object.assign || function(e) {
|
||
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
||
t = arguments[n];
|
||
for (var o in t)
|
||
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
||
}
|
||
return e;
|
||
}, Mr.apply(this, arguments);
|
||
}, uE = {
|
||
width: "100%",
|
||
height: "10px",
|
||
top: "0px",
|
||
left: "0px",
|
||
cursor: "row-resize"
|
||
}, cE = {
|
||
width: "10px",
|
||
height: "100%",
|
||
top: "0px",
|
||
left: "0px",
|
||
cursor: "col-resize"
|
||
}, fg = {
|
||
width: "20px",
|
||
height: "20px",
|
||
position: "absolute"
|
||
}, i_ = {
|
||
top: Mr(Mr({}, uE), { top: "-5px" }),
|
||
right: Mr(Mr({}, cE), { left: void 0, right: "-5px" }),
|
||
bottom: Mr(Mr({}, uE), { top: void 0, bottom: "-5px" }),
|
||
left: Mr(Mr({}, cE), { left: "-5px" }),
|
||
topRight: Mr(Mr({}, fg), { right: "-10px", top: "-10px", cursor: "ne-resize" }),
|
||
bottomRight: Mr(Mr({}, fg), { right: "-10px", bottom: "-10px", cursor: "se-resize" }),
|
||
bottomLeft: Mr(Mr({}, fg), { left: "-10px", bottom: "-10px", cursor: "sw-resize" }),
|
||
topLeft: Mr(Mr({}, fg), { left: "-10px", top: "-10px", cursor: "nw-resize" })
|
||
}, o_ = (
|
||
/** @class */
|
||
function(e) {
|
||
a_(t, e);
|
||
function t() {
|
||
var n = e !== null && e.apply(this, arguments) || this;
|
||
return n.onMouseDown = function(i) {
|
||
n.props.onResizeStart(i, n.props.direction);
|
||
}, n.onTouchStart = function(i) {
|
||
n.props.onResizeStart(i, n.props.direction);
|
||
}, n;
|
||
}
|
||
return t.prototype.render = function() {
|
||
return Je.createElement("div", { className: this.props.className || "", style: Mr(Mr({ position: "absolute", userSelect: "none" }, i_[this.props.direction]), this.props.replaceStyles || {}), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children);
|
||
}, t;
|
||
}(Je.PureComponent)
|
||
), s_ = globalThis && globalThis.__extends || function() {
|
||
var e = function(t, n) {
|
||
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, o) {
|
||
i.__proto__ = o;
|
||
} || function(i, o) {
|
||
for (var l in o)
|
||
Object.prototype.hasOwnProperty.call(o, l) && (i[l] = o[l]);
|
||
}, e(t, n);
|
||
};
|
||
return function(t, n) {
|
||
e(t, n);
|
||
function i() {
|
||
this.constructor = t;
|
||
}
|
||
t.prototype = n === null ? Object.create(n) : (i.prototype = n.prototype, new i());
|
||
};
|
||
}(), Zo = globalThis && globalThis.__assign || function() {
|
||
return Zo = Object.assign || function(e) {
|
||
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
||
t = arguments[n];
|
||
for (var o in t)
|
||
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
||
}
|
||
return e;
|
||
}, Zo.apply(this, arguments);
|
||
}, l_ = {
|
||
width: "auto",
|
||
height: "auto"
|
||
}, pg = function(e, t, n) {
|
||
return Math.max(Math.min(e, n), t);
|
||
}, dE = function(e, t) {
|
||
return Math.round(e / t) * t;
|
||
}, Yd = function(e, t) {
|
||
return new RegExp(e, "i").test(t);
|
||
}, hg = function(e) {
|
||
return Boolean(e.touches && e.touches.length);
|
||
}, u_ = function(e) {
|
||
return Boolean((e.clientX || e.clientX === 0) && (e.clientY || e.clientY === 0));
|
||
}, fE = function(e, t, n) {
|
||
n === void 0 && (n = 0);
|
||
var i = t.reduce(function(l, f, h) {
|
||
return Math.abs(f - e) < Math.abs(t[l] - e) ? h : l;
|
||
}, 0), o = Math.abs(t[i] - e);
|
||
return n === 0 || o < n ? t[i] : e;
|
||
}, F2 = function(e) {
|
||
return e = e.toString(), e === "auto" || e.endsWith("px") || e.endsWith("%") || e.endsWith("vh") || e.endsWith("vw") || e.endsWith("vmax") || e.endsWith("vmin") ? e : e + "px";
|
||
}, vg = function(e, t, n, i) {
|
||
if (e && typeof e == "string") {
|
||
if (e.endsWith("px"))
|
||
return Number(e.replace("px", ""));
|
||
if (e.endsWith("%")) {
|
||
var o = Number(e.replace("%", "")) / 100;
|
||
return t * o;
|
||
}
|
||
if (e.endsWith("vw")) {
|
||
var o = Number(e.replace("vw", "")) / 100;
|
||
return n * o;
|
||
}
|
||
if (e.endsWith("vh")) {
|
||
var o = Number(e.replace("vh", "")) / 100;
|
||
return i * o;
|
||
}
|
||
}
|
||
return e;
|
||
}, c_ = function(e, t, n, i, o, l, f) {
|
||
return i = vg(i, e.width, t, n), o = vg(o, e.height, t, n), l = vg(l, e.width, t, n), f = vg(f, e.height, t, n), {
|
||
maxWidth: typeof i > "u" ? void 0 : Number(i),
|
||
maxHeight: typeof o > "u" ? void 0 : Number(o),
|
||
minWidth: typeof l > "u" ? void 0 : Number(l),
|
||
minHeight: typeof f > "u" ? void 0 : Number(f)
|
||
};
|
||
}, d_ = [
|
||
"as",
|
||
"style",
|
||
"className",
|
||
"grid",
|
||
"snap",
|
||
"bounds",
|
||
"boundsByDirection",
|
||
"size",
|
||
"defaultSize",
|
||
"minWidth",
|
||
"minHeight",
|
||
"maxWidth",
|
||
"maxHeight",
|
||
"lockAspectRatio",
|
||
"lockAspectRatioExtraWidth",
|
||
"lockAspectRatioExtraHeight",
|
||
"enable",
|
||
"handleStyles",
|
||
"handleClasses",
|
||
"handleWrapperStyle",
|
||
"handleWrapperClass",
|
||
"children",
|
||
"onResizeStart",
|
||
"onResize",
|
||
"onResizeStop",
|
||
"handleComponent",
|
||
"scale",
|
||
"resizeRatio",
|
||
"snapGap"
|
||
], pE = "__resizable_base__", cD = (
|
||
/** @class */
|
||
function(e) {
|
||
s_(t, e);
|
||
function t(n) {
|
||
var i = e.call(this, n) || this;
|
||
return i.ratio = 1, i.resizable = null, i.parentLeft = 0, i.parentTop = 0, i.resizableLeft = 0, i.resizableRight = 0, i.resizableTop = 0, i.resizableBottom = 0, i.targetLeft = 0, i.targetTop = 0, i.appendBase = function() {
|
||
if (!i.resizable || !i.window)
|
||
return null;
|
||
var o = i.parentNode;
|
||
if (!o)
|
||
return null;
|
||
var l = i.window.document.createElement("div");
|
||
return l.style.width = "100%", l.style.height = "100%", l.style.position = "absolute", l.style.transform = "scale(0, 0)", l.style.left = "0", l.style.flex = "0 0 100%", l.classList ? l.classList.add(pE) : l.className += pE, o.appendChild(l), l;
|
||
}, i.removeBase = function(o) {
|
||
var l = i.parentNode;
|
||
l && l.removeChild(o);
|
||
}, i.ref = function(o) {
|
||
o && (i.resizable = o);
|
||
}, i.state = {
|
||
isResizing: !1,
|
||
width: typeof (i.propsSize && i.propsSize.width) > "u" ? "auto" : i.propsSize && i.propsSize.width,
|
||
height: typeof (i.propsSize && i.propsSize.height) > "u" ? "auto" : i.propsSize && i.propsSize.height,
|
||
direction: "right",
|
||
original: {
|
||
x: 0,
|
||
y: 0,
|
||
width: 0,
|
||
height: 0
|
||
},
|
||
backgroundStyle: {
|
||
height: "100%",
|
||
width: "100%",
|
||
backgroundColor: "rgba(0,0,0,0)",
|
||
cursor: "auto",
|
||
opacity: 0,
|
||
position: "fixed",
|
||
zIndex: 9999,
|
||
top: "0",
|
||
left: "0",
|
||
bottom: "0",
|
||
right: "0"
|
||
},
|
||
flexBasis: void 0
|
||
}, i.onResizeStart = i.onResizeStart.bind(i), i.onMouseMove = i.onMouseMove.bind(i), i.onMouseUp = i.onMouseUp.bind(i), i;
|
||
}
|
||
return Object.defineProperty(t.prototype, "parentNode", {
|
||
get: function() {
|
||
return this.resizable ? this.resizable.parentNode : null;
|
||
},
|
||
enumerable: !1,
|
||
configurable: !0
|
||
}), Object.defineProperty(t.prototype, "window", {
|
||
get: function() {
|
||
return !this.resizable || !this.resizable.ownerDocument ? null : this.resizable.ownerDocument.defaultView;
|
||
},
|
||
enumerable: !1,
|
||
configurable: !0
|
||
}), Object.defineProperty(t.prototype, "propsSize", {
|
||
get: function() {
|
||
return this.props.size || this.props.defaultSize || l_;
|
||
},
|
||
enumerable: !1,
|
||
configurable: !0
|
||
}), Object.defineProperty(t.prototype, "size", {
|
||
get: function() {
|
||
var n = 0, i = 0;
|
||
if (this.resizable && this.window) {
|
||
var o = this.resizable.offsetWidth, l = this.resizable.offsetHeight, f = this.resizable.style.position;
|
||
f !== "relative" && (this.resizable.style.position = "relative"), n = this.resizable.style.width !== "auto" ? this.resizable.offsetWidth : o, i = this.resizable.style.height !== "auto" ? this.resizable.offsetHeight : l, this.resizable.style.position = f;
|
||
}
|
||
return { width: n, height: i };
|
||
},
|
||
enumerable: !1,
|
||
configurable: !0
|
||
}), Object.defineProperty(t.prototype, "sizeStyle", {
|
||
get: function() {
|
||
var n = this, i = this.props.size, o = function(h) {
|
||
if (typeof n.state[h] > "u" || n.state[h] === "auto")
|
||
return "auto";
|
||
if (n.propsSize && n.propsSize[h] && n.propsSize[h].toString().endsWith("%")) {
|
||
if (n.state[h].toString().endsWith("%"))
|
||
return n.state[h].toString();
|
||
var y = n.getParentSize(), m = Number(n.state[h].toString().replace("px", "")), x = m / y[h] * 100;
|
||
return x + "%";
|
||
}
|
||
return F2(n.state[h]);
|
||
}, l = i && typeof i.width < "u" && !this.state.isResizing ? F2(i.width) : o("width"), f = i && typeof i.height < "u" && !this.state.isResizing ? F2(i.height) : o("height");
|
||
return { width: l, height: f };
|
||
},
|
||
enumerable: !1,
|
||
configurable: !0
|
||
}), t.prototype.getParentSize = function() {
|
||
if (!this.parentNode)
|
||
return this.window ? { width: this.window.innerWidth, height: this.window.innerHeight } : { width: 0, height: 0 };
|
||
var n = this.appendBase();
|
||
if (!n)
|
||
return { width: 0, height: 0 };
|
||
var i = !1, o = this.parentNode.style.flexWrap;
|
||
o !== "wrap" && (i = !0, this.parentNode.style.flexWrap = "wrap"), n.style.position = "relative", n.style.minWidth = "100%", n.style.minHeight = "100%";
|
||
var l = {
|
||
width: n.offsetWidth,
|
||
height: n.offsetHeight
|
||
};
|
||
return i && (this.parentNode.style.flexWrap = o), this.removeBase(n), l;
|
||
}, t.prototype.bindEvents = function() {
|
||
this.window && (this.window.addEventListener("mouseup", this.onMouseUp), this.window.addEventListener("mousemove", this.onMouseMove), this.window.addEventListener("mouseleave", this.onMouseUp), this.window.addEventListener("touchmove", this.onMouseMove, {
|
||
capture: !0,
|
||
passive: !1
|
||
}), this.window.addEventListener("touchend", this.onMouseUp));
|
||
}, t.prototype.unbindEvents = function() {
|
||
this.window && (this.window.removeEventListener("mouseup", this.onMouseUp), this.window.removeEventListener("mousemove", this.onMouseMove), this.window.removeEventListener("mouseleave", this.onMouseUp), this.window.removeEventListener("touchmove", this.onMouseMove, !0), this.window.removeEventListener("touchend", this.onMouseUp));
|
||
}, t.prototype.componentDidMount = function() {
|
||
if (!(!this.resizable || !this.window)) {
|
||
var n = this.window.getComputedStyle(this.resizable);
|
||
this.setState({
|
||
width: this.state.width || this.size.width,
|
||
height: this.state.height || this.size.height,
|
||
flexBasis: n.flexBasis !== "auto" ? n.flexBasis : void 0
|
||
});
|
||
}
|
||
}, t.prototype.componentWillUnmount = function() {
|
||
this.window && this.unbindEvents();
|
||
}, t.prototype.createSizeForCssProperty = function(n, i) {
|
||
var o = this.propsSize && this.propsSize[i];
|
||
return this.state[i] === "auto" && this.state.original[i] === n && (typeof o > "u" || o === "auto") ? "auto" : n;
|
||
}, t.prototype.calculateNewMaxFromBoundary = function(n, i) {
|
||
var o = this.props.boundsByDirection, l = this.state.direction, f = o && Yd("left", l), h = o && Yd("top", l), y, m;
|
||
if (this.props.bounds === "parent") {
|
||
var x = this.parentNode;
|
||
x && (y = f ? this.resizableRight - this.parentLeft : x.offsetWidth + (this.parentLeft - this.resizableLeft), m = h ? this.resizableBottom - this.parentTop : x.offsetHeight + (this.parentTop - this.resizableTop));
|
||
} else
|
||
this.props.bounds === "window" ? this.window && (y = f ? this.resizableRight : this.window.innerWidth - this.resizableLeft, m = h ? this.resizableBottom : this.window.innerHeight - this.resizableTop) : this.props.bounds && (y = f ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft), m = h ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop));
|
||
return y && Number.isFinite(y) && (n = n && n < y ? n : y), m && Number.isFinite(m) && (i = i && i < m ? i : m), { maxWidth: n, maxHeight: i };
|
||
}, t.prototype.calculateNewSizeFromDirection = function(n, i) {
|
||
var o = this.props.scale || 1, l = this.props.resizeRatio || 1, f = this.state, h = f.direction, y = f.original, m = this.props, x = m.lockAspectRatio, b = m.lockAspectRatioExtraHeight, E = m.lockAspectRatioExtraWidth, j = y.width, M = y.height, R = b || 0, k = E || 0;
|
||
return Yd("right", h) && (j = y.width + (n - y.x) * l / o, x && (M = (j - k) / this.ratio + R)), Yd("left", h) && (j = y.width - (n - y.x) * l / o, x && (M = (j - k) / this.ratio + R)), Yd("bottom", h) && (M = y.height + (i - y.y) * l / o, x && (j = (M - R) * this.ratio + k)), Yd("top", h) && (M = y.height - (i - y.y) * l / o, x && (j = (M - R) * this.ratio + k)), { newWidth: j, newHeight: M };
|
||
}, t.prototype.calculateNewSizeFromAspectRatio = function(n, i, o, l) {
|
||
var f = this.props, h = f.lockAspectRatio, y = f.lockAspectRatioExtraHeight, m = f.lockAspectRatioExtraWidth, x = typeof l.width > "u" ? 10 : l.width, b = typeof o.width > "u" || o.width < 0 ? n : o.width, E = typeof l.height > "u" ? 10 : l.height, j = typeof o.height > "u" || o.height < 0 ? i : o.height, M = y || 0, R = m || 0;
|
||
if (h) {
|
||
var k = (E - M) * this.ratio + R, A = (j - M) * this.ratio + R, L = (x - R) / this.ratio + M, z = (b - R) / this.ratio + M, I = Math.max(x, k), _ = Math.min(b, A), U = Math.max(E, L), B = Math.min(j, z);
|
||
n = pg(n, I, _), i = pg(i, U, B);
|
||
} else
|
||
n = pg(n, x, b), i = pg(i, E, j);
|
||
return { newWidth: n, newHeight: i };
|
||
}, t.prototype.setBoundingClientRect = function() {
|
||
if (this.props.bounds === "parent") {
|
||
var n = this.parentNode;
|
||
if (n) {
|
||
var i = n.getBoundingClientRect();
|
||
this.parentLeft = i.left, this.parentTop = i.top;
|
||
}
|
||
}
|
||
if (this.props.bounds && typeof this.props.bounds != "string") {
|
||
var o = this.props.bounds.getBoundingClientRect();
|
||
this.targetLeft = o.left, this.targetTop = o.top;
|
||
}
|
||
if (this.resizable) {
|
||
var l = this.resizable.getBoundingClientRect(), f = l.left, h = l.top, y = l.right, m = l.bottom;
|
||
this.resizableLeft = f, this.resizableRight = y, this.resizableTop = h, this.resizableBottom = m;
|
||
}
|
||
}, t.prototype.onResizeStart = function(n, i) {
|
||
if (!(!this.resizable || !this.window)) {
|
||
var o = 0, l = 0;
|
||
if (n.nativeEvent && u_(n.nativeEvent) ? (o = n.nativeEvent.clientX, l = n.nativeEvent.clientY) : n.nativeEvent && hg(n.nativeEvent) && (o = n.nativeEvent.touches[0].clientX, l = n.nativeEvent.touches[0].clientY), this.props.onResizeStart && this.resizable) {
|
||
var f = this.props.onResizeStart(n, i, this.resizable);
|
||
if (f === !1)
|
||
return;
|
||
}
|
||
this.props.size && (typeof this.props.size.height < "u" && this.props.size.height !== this.state.height && this.setState({ height: this.props.size.height }), typeof this.props.size.width < "u" && this.props.size.width !== this.state.width && this.setState({ width: this.props.size.width })), this.ratio = typeof this.props.lockAspectRatio == "number" ? this.props.lockAspectRatio : this.size.width / this.size.height;
|
||
var h, y = this.window.getComputedStyle(this.resizable);
|
||
if (y.flexBasis !== "auto") {
|
||
var m = this.parentNode;
|
||
if (m) {
|
||
var x = this.window.getComputedStyle(m).flexDirection;
|
||
this.flexDir = x.startsWith("row") ? "row" : "column", h = y.flexBasis;
|
||
}
|
||
}
|
||
this.setBoundingClientRect(), this.bindEvents();
|
||
var b = {
|
||
original: {
|
||
x: o,
|
||
y: l,
|
||
width: this.size.width,
|
||
height: this.size.height
|
||
},
|
||
isResizing: !0,
|
||
backgroundStyle: Zo(Zo({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(n.target).cursor || "auto" }),
|
||
direction: i,
|
||
flexBasis: h
|
||
};
|
||
this.setState(b);
|
||
}
|
||
}, t.prototype.onMouseMove = function(n) {
|
||
var i = this;
|
||
if (!(!this.state.isResizing || !this.resizable || !this.window)) {
|
||
if (this.window.TouchEvent && hg(n))
|
||
try {
|
||
n.preventDefault(), n.stopPropagation();
|
||
} catch {
|
||
}
|
||
var o = this.props, l = o.maxWidth, f = o.maxHeight, h = o.minWidth, y = o.minHeight, m = hg(n) ? n.touches[0].clientX : n.clientX, x = hg(n) ? n.touches[0].clientY : n.clientY, b = this.state, E = b.direction, j = b.original, M = b.width, R = b.height, k = this.getParentSize(), A = c_(k, this.window.innerWidth, this.window.innerHeight, l, f, h, y);
|
||
l = A.maxWidth, f = A.maxHeight, h = A.minWidth, y = A.minHeight;
|
||
var L = this.calculateNewSizeFromDirection(m, x), z = L.newHeight, I = L.newWidth, _ = this.calculateNewMaxFromBoundary(l, f);
|
||
this.props.snap && this.props.snap.x && (I = fE(I, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (z = fE(z, this.props.snap.y, this.props.snapGap));
|
||
var U = this.calculateNewSizeFromAspectRatio(I, z, { width: _.maxWidth, height: _.maxHeight }, { width: h, height: y });
|
||
if (I = U.newWidth, z = U.newHeight, this.props.grid) {
|
||
var B = dE(I, this.props.grid[0]), q = dE(z, this.props.grid[1]), J = this.props.snapGap || 0;
|
||
I = J === 0 || Math.abs(B - I) <= J ? B : I, z = J === 0 || Math.abs(q - z) <= J ? q : z;
|
||
}
|
||
var G = {
|
||
width: I - j.width,
|
||
height: z - j.height
|
||
};
|
||
if (M && typeof M == "string") {
|
||
if (M.endsWith("%")) {
|
||
var H = I / k.width * 100;
|
||
I = H + "%";
|
||
} else if (M.endsWith("vw")) {
|
||
var le = I / this.window.innerWidth * 100;
|
||
I = le + "vw";
|
||
} else if (M.endsWith("vh")) {
|
||
var ae = I / this.window.innerHeight * 100;
|
||
I = ae + "vh";
|
||
}
|
||
}
|
||
if (R && typeof R == "string") {
|
||
if (R.endsWith("%")) {
|
||
var H = z / k.height * 100;
|
||
z = H + "%";
|
||
} else if (R.endsWith("vw")) {
|
||
var le = z / this.window.innerWidth * 100;
|
||
z = le + "vw";
|
||
} else if (R.endsWith("vh")) {
|
||
var ae = z / this.window.innerHeight * 100;
|
||
z = ae + "vh";
|
||
}
|
||
}
|
||
var he = {
|
||
width: this.createSizeForCssProperty(I, "width"),
|
||
height: this.createSizeForCssProperty(z, "height")
|
||
};
|
||
this.flexDir === "row" ? he.flexBasis = he.width : this.flexDir === "column" && (he.flexBasis = he.height), gP(function() {
|
||
i.setState(he);
|
||
}), this.props.onResize && this.props.onResize(n, E, this.resizable, G);
|
||
}
|
||
}, t.prototype.onMouseUp = function(n) {
|
||
var i = this.state, o = i.isResizing, l = i.direction, f = i.original;
|
||
if (!(!o || !this.resizable)) {
|
||
var h = {
|
||
width: this.size.width - f.width,
|
||
height: this.size.height - f.height
|
||
};
|
||
this.props.onResizeStop && this.props.onResizeStop(n, l, this.resizable, h), this.props.size && this.setState(this.props.size), this.unbindEvents(), this.setState({
|
||
isResizing: !1,
|
||
backgroundStyle: Zo(Zo({}, this.state.backgroundStyle), { cursor: "auto" })
|
||
});
|
||
}
|
||
}, t.prototype.updateSize = function(n) {
|
||
this.setState({ width: n.width, height: n.height });
|
||
}, t.prototype.renderResizer = function() {
|
||
var n = this, i = this.props, o = i.enable, l = i.handleStyles, f = i.handleClasses, h = i.handleWrapperStyle, y = i.handleWrapperClass, m = i.handleComponent;
|
||
if (!o)
|
||
return null;
|
||
var x = Object.keys(o).map(function(b) {
|
||
return o[b] !== !1 ? Je.createElement(o_, { key: b, direction: b, onResizeStart: n.onResizeStart, replaceStyles: l && l[b], className: f && f[b] }, m && m[b] ? m[b] : null) : null;
|
||
});
|
||
return Je.createElement("div", { className: y, style: h }, x);
|
||
}, t.prototype.render = function() {
|
||
var n = this, i = Object.keys(this.props).reduce(function(f, h) {
|
||
return d_.indexOf(h) !== -1 || (f[h] = n.props[h]), f;
|
||
}, {}), o = Zo(Zo(Zo({ position: "relative", userSelect: this.state.isResizing ? "none" : "auto" }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: "border-box", flexShrink: 0 });
|
||
this.state.flexBasis && (o.flexBasis = this.state.flexBasis);
|
||
var l = this.props.as || "div";
|
||
return Je.createElement(
|
||
l,
|
||
Zo({ ref: this.ref, style: o, className: this.props.className }, i),
|
||
this.state.isResizing && Je.createElement("div", { style: this.state.backgroundStyle }),
|
||
this.props.children,
|
||
this.renderResizer()
|
||
);
|
||
}, t.defaultProps = {
|
||
as: "div",
|
||
onResizeStart: function() {
|
||
},
|
||
onResize: function() {
|
||
},
|
||
onResizeStop: function() {
|
||
},
|
||
enable: {
|
||
top: !0,
|
||
right: !0,
|
||
bottom: !0,
|
||
left: !0,
|
||
topRight: !0,
|
||
bottomRight: !0,
|
||
bottomLeft: !0,
|
||
topLeft: !0
|
||
},
|
||
style: {},
|
||
grid: [1, 1],
|
||
lockAspectRatio: !1,
|
||
lockAspectRatioExtraWidth: 0,
|
||
lockAspectRatioExtraHeight: 0,
|
||
scale: 1,
|
||
resizeRatio: 1,
|
||
snapGap: 0
|
||
}, t;
|
||
}(Je.PureComponent)
|
||
);
|
||
const Bn = (e) => {
|
||
const { label: t, ...n } = e;
|
||
return /* @__PURE__ */ c.jsx($6, { colorScheme: "accent", ...n, children: t });
|
||
};
|
||
function dD(e) {
|
||
return it({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z" } }] })(e);
|
||
}
|
||
function fD(e) {
|
||
return it({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z" } }] })(e);
|
||
}
|
||
function f_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M16.5 9c-.42 0-.83.04-1.24.11L1.01 3 1 10l9 2-9 2 .01 7 8.07-3.46C9.59 21.19 12.71 24 16.5 24c4.14 0 7.5-3.36 7.5-7.5S20.64 9 16.5 9zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z" } }, { tag: "path", attr: { d: "M18.27 14.03l-1.77 1.76-1.77-1.76-.7.7 1.76 1.77-1.76 1.77.7.7 1.77-1.76 1.77 1.76.7-.7-1.76-1.77 1.76-1.77z" } }] })(e);
|
||
}
|
||
function p_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z" } }] })(e);
|
||
}
|
||
function h_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.488.488 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" } }] })(e);
|
||
}
|
||
function v_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z" } }] })(e);
|
||
}
|
||
function m_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z" } }] })(e);
|
||
}
|
||
function g_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M7 2v11h3v9l7-12h-4l4-8z" } }] })(e);
|
||
}
|
||
function hE(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z" } }] })(e);
|
||
}
|
||
function y_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z" } }] })(e);
|
||
}
|
||
function x_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" } }, { tag: "path", attr: { d: "M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12z" } }] })(e);
|
||
}
|
||
function mb(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z" } }] })(e);
|
||
}
|
||
function S_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" } }] })(e);
|
||
}
|
||
function b_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M7 10l5 5 5-5z" } }] })(e);
|
||
}
|
||
function C_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M7 14l5-5 5 5z" } }] })(e);
|
||
}
|
||
function w_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" } }, { tag: "path", attr: { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" } }] })(e);
|
||
}
|
||
function E_(e, t) {
|
||
return e.classList ? !!t && e.classList.contains(t) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + t + " ") !== -1;
|
||
}
|
||
function j_(e, t) {
|
||
e.classList ? e.classList.add(t) : E_(e, t) || (typeof e.className == "string" ? e.className = e.className + " " + t : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + t));
|
||
}
|
||
function vE(e, t) {
|
||
return e.replace(new RegExp("(^|\\s)" + t + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
||
}
|
||
function T_(e, t) {
|
||
e.classList ? e.classList.remove(t) : typeof e.className == "string" ? e.className = vE(e.className, t) : e.setAttribute("class", vE(e.className && e.className.baseVal || "", t));
|
||
}
|
||
const mE = {
|
||
disabled: !1
|
||
};
|
||
var D_ = process.env.NODE_ENV !== "production" ? Oe.oneOfType([Oe.number, Oe.shape({
|
||
enter: Oe.number,
|
||
exit: Oe.number,
|
||
appear: Oe.number
|
||
}).isRequired]) : null, M_ = process.env.NODE_ENV !== "production" ? Oe.oneOfType([Oe.string, Oe.shape({
|
||
enter: Oe.string,
|
||
exit: Oe.string,
|
||
active: Oe.string
|
||
}), Oe.shape({
|
||
enter: Oe.string,
|
||
enterDone: Oe.string,
|
||
enterActive: Oe.string,
|
||
exit: Oe.string,
|
||
exitDone: Oe.string,
|
||
exitActive: Oe.string
|
||
})]) : null;
|
||
const pD = pt.createContext(null);
|
||
var hD = function(t) {
|
||
return t.scrollTop;
|
||
}, ch = "unmounted", Wu = "exited", Gu = "entering", Xd = "entered", Lx = "exiting", qs = /* @__PURE__ */ function(e) {
|
||
ES(t, e);
|
||
function t(i, o) {
|
||
var l;
|
||
l = e.call(this, i, o) || this;
|
||
var f = o, h = f && !f.isMounting ? i.enter : i.appear, y;
|
||
return l.appearStatus = null, i.in ? h ? (y = Wu, l.appearStatus = Gu) : y = Xd : i.unmountOnExit || i.mountOnEnter ? y = ch : y = Wu, l.state = {
|
||
status: y
|
||
}, l.nextCallback = null, l;
|
||
}
|
||
t.getDerivedStateFromProps = function(o, l) {
|
||
var f = o.in;
|
||
return f && l.status === ch ? {
|
||
status: Wu
|
||
} : null;
|
||
};
|
||
var n = t.prototype;
|
||
return n.componentDidMount = function() {
|
||
this.updateStatus(!0, this.appearStatus);
|
||
}, n.componentDidUpdate = function(o) {
|
||
var l = null;
|
||
if (o !== this.props) {
|
||
var f = this.state.status;
|
||
this.props.in ? f !== Gu && f !== Xd && (l = Gu) : (f === Gu || f === Xd) && (l = Lx);
|
||
}
|
||
this.updateStatus(!1, l);
|
||
}, n.componentWillUnmount = function() {
|
||
this.cancelNextCallback();
|
||
}, n.getTimeouts = function() {
|
||
var o = this.props.timeout, l, f, h;
|
||
return l = f = h = o, o != null && typeof o != "number" && (l = o.exit, f = o.enter, h = o.appear !== void 0 ? o.appear : f), {
|
||
exit: l,
|
||
enter: f,
|
||
appear: h
|
||
};
|
||
}, n.updateStatus = function(o, l) {
|
||
if (o === void 0 && (o = !1), l !== null)
|
||
if (this.cancelNextCallback(), l === Gu) {
|
||
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
||
var f = this.props.nodeRef ? this.props.nodeRef.current : ag.findDOMNode(this);
|
||
f && hD(f);
|
||
}
|
||
this.performEnter(o);
|
||
} else
|
||
this.performExit();
|
||
else
|
||
this.props.unmountOnExit && this.state.status === Wu && this.setState({
|
||
status: ch
|
||
});
|
||
}, n.performEnter = function(o) {
|
||
var l = this, f = this.props.enter, h = this.context ? this.context.isMounting : o, y = this.props.nodeRef ? [h] : [ag.findDOMNode(this), h], m = y[0], x = y[1], b = this.getTimeouts(), E = h ? b.appear : b.enter;
|
||
if (!o && !f || mE.disabled) {
|
||
this.safeSetState({
|
||
status: Xd
|
||
}, function() {
|
||
l.props.onEntered(m);
|
||
});
|
||
return;
|
||
}
|
||
this.props.onEnter(m, x), this.safeSetState({
|
||
status: Gu
|
||
}, function() {
|
||
l.props.onEntering(m, x), l.onTransitionEnd(E, function() {
|
||
l.safeSetState({
|
||
status: Xd
|
||
}, function() {
|
||
l.props.onEntered(m, x);
|
||
});
|
||
});
|
||
});
|
||
}, n.performExit = function() {
|
||
var o = this, l = this.props.exit, f = this.getTimeouts(), h = this.props.nodeRef ? void 0 : ag.findDOMNode(this);
|
||
if (!l || mE.disabled) {
|
||
this.safeSetState({
|
||
status: Wu
|
||
}, function() {
|
||
o.props.onExited(h);
|
||
});
|
||
return;
|
||
}
|
||
this.props.onExit(h), this.safeSetState({
|
||
status: Lx
|
||
}, function() {
|
||
o.props.onExiting(h), o.onTransitionEnd(f.exit, function() {
|
||
o.safeSetState({
|
||
status: Wu
|
||
}, function() {
|
||
o.props.onExited(h);
|
||
});
|
||
});
|
||
});
|
||
}, n.cancelNextCallback = function() {
|
||
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
||
}, n.safeSetState = function(o, l) {
|
||
l = this.setNextCallback(l), this.setState(o, l);
|
||
}, n.setNextCallback = function(o) {
|
||
var l = this, f = !0;
|
||
return this.nextCallback = function(h) {
|
||
f && (f = !1, l.nextCallback = null, o(h));
|
||
}, this.nextCallback.cancel = function() {
|
||
f = !1;
|
||
}, this.nextCallback;
|
||
}, n.onTransitionEnd = function(o, l) {
|
||
this.setNextCallback(l);
|
||
var f = this.props.nodeRef ? this.props.nodeRef.current : ag.findDOMNode(this), h = o == null && !this.props.addEndListener;
|
||
if (!f || h) {
|
||
setTimeout(this.nextCallback, 0);
|
||
return;
|
||
}
|
||
if (this.props.addEndListener) {
|
||
var y = this.props.nodeRef ? [this.nextCallback] : [f, this.nextCallback], m = y[0], x = y[1];
|
||
this.props.addEndListener(m, x);
|
||
}
|
||
o != null && setTimeout(this.nextCallback, o);
|
||
}, n.render = function() {
|
||
var o = this.state.status;
|
||
if (o === ch)
|
||
return null;
|
||
var l = this.props, f = l.children;
|
||
l.in, l.mountOnEnter, l.unmountOnExit, l.appear, l.enter, l.exit, l.timeout, l.addEndListener, l.onEnter, l.onEntering, l.onEntered, l.onExit, l.onExiting, l.onExited, l.nodeRef;
|
||
var h = lS(l, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
||
return (
|
||
// allows for nested Transitions
|
||
/* @__PURE__ */ pt.createElement(pD.Provider, {
|
||
value: null
|
||
}, typeof f == "function" ? f(o, h) : pt.cloneElement(pt.Children.only(f), h))
|
||
);
|
||
}, t;
|
||
}(pt.Component);
|
||
qs.contextType = pD;
|
||
qs.propTypes = process.env.NODE_ENV !== "production" ? {
|
||
/**
|
||
* A React reference to DOM element that need to transition:
|
||
* https://stackoverflow.com/a/51127130/4671932
|
||
*
|
||
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
||
* (e.g. `onEnter`) because user already has direct access to the node.
|
||
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
||
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
||
* (see
|
||
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
||
*/
|
||
nodeRef: Oe.shape({
|
||
current: typeof Element > "u" ? Oe.any : function(e, t, n, i, o, l) {
|
||
var f = e[t];
|
||
return Oe.instanceOf(f && "ownerDocument" in f ? f.ownerDocument.defaultView.Element : Element)(e, t, n, i, o, l);
|
||
}
|
||
}),
|
||
/**
|
||
* A `function` child can be used instead of a React element. This function is
|
||
* called with the current transition status (`'entering'`, `'entered'`,
|
||
* `'exiting'`, `'exited'`), which can be used to apply context
|
||
* specific props to a component.
|
||
*
|
||
* ```jsx
|
||
* <Transition in={this.state.in} timeout={150}>
|
||
* {state => (
|
||
* <MyComponent className={`fade fade-${state}`} />
|
||
* )}
|
||
* </Transition>
|
||
* ```
|
||
*/
|
||
children: Oe.oneOfType([Oe.func.isRequired, Oe.element.isRequired]).isRequired,
|
||
/**
|
||
* Show the component; triggers the enter or exit states
|
||
*/
|
||
in: Oe.bool,
|
||
/**
|
||
* By default the child component is mounted immediately along with
|
||
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
||
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
||
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
||
*/
|
||
mountOnEnter: Oe.bool,
|
||
/**
|
||
* By default the child component stays mounted after it reaches the `'exited'` state.
|
||
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
||
*/
|
||
unmountOnExit: Oe.bool,
|
||
/**
|
||
* By default the child component does not perform the enter transition when
|
||
* it first mounts, regardless of the value of `in`. If you want this
|
||
* behavior, set both `appear` and `in` to `true`.
|
||
*
|
||
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
||
* > only adds an additional enter transition. However, in the
|
||
* > `<CSSTransition>` component that first enter transition does result in
|
||
* > additional `.appear-*` classes, that way you can choose to style it
|
||
* > differently.
|
||
*/
|
||
appear: Oe.bool,
|
||
/**
|
||
* Enable or disable enter transitions.
|
||
*/
|
||
enter: Oe.bool,
|
||
/**
|
||
* Enable or disable exit transitions.
|
||
*/
|
||
exit: Oe.bool,
|
||
/**
|
||
* The duration of the transition, in milliseconds.
|
||
* Required unless `addEndListener` is provided.
|
||
*
|
||
* You may specify a single timeout for all transitions:
|
||
*
|
||
* ```jsx
|
||
* timeout={500}
|
||
* ```
|
||
*
|
||
* or individually:
|
||
*
|
||
* ```jsx
|
||
* timeout={{
|
||
* appear: 500,
|
||
* enter: 300,
|
||
* exit: 500,
|
||
* }}
|
||
* ```
|
||
*
|
||
* - `appear` defaults to the value of `enter`
|
||
* - `enter` defaults to `0`
|
||
* - `exit` defaults to `0`
|
||
*
|
||
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
||
*/
|
||
timeout: function(t) {
|
||
var n = D_;
|
||
t.addEndListener || (n = n.isRequired);
|
||
for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), l = 1; l < i; l++)
|
||
o[l - 1] = arguments[l];
|
||
return n.apply(void 0, [t].concat(o));
|
||
},
|
||
/**
|
||
* Add a custom transition end trigger. Called with the transitioning
|
||
* DOM node and a `done` callback. Allows for more fine grained transition end
|
||
* logic. Timeouts are still used as a fallback if provided.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* ```jsx
|
||
* addEndListener={(node, done) => {
|
||
* // use the css transitionend event to mark the finish of a transition
|
||
* node.addEventListener('transitionend', done, false);
|
||
* }}
|
||
* ```
|
||
*/
|
||
addEndListener: Oe.func,
|
||
/**
|
||
* Callback fired before the "entering" status is applied. An extra parameter
|
||
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
||
*/
|
||
onEnter: Oe.func,
|
||
/**
|
||
* Callback fired after the "entering" status is applied. An extra parameter
|
||
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool)
|
||
*/
|
||
onEntering: Oe.func,
|
||
/**
|
||
* Callback fired after the "entered" status is applied. An extra parameter
|
||
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
||
*/
|
||
onEntered: Oe.func,
|
||
/**
|
||
* Callback fired before the "exiting" status is applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement) -> void
|
||
*/
|
||
onExit: Oe.func,
|
||
/**
|
||
* Callback fired after the "exiting" status is applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement) -> void
|
||
*/
|
||
onExiting: Oe.func,
|
||
/**
|
||
* Callback fired after the "exited" status is applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
||
*
|
||
* @type Function(node: HtmlElement) -> void
|
||
*/
|
||
onExited: Oe.func
|
||
} : {};
|
||
function Qd() {
|
||
}
|
||
qs.defaultProps = {
|
||
in: !1,
|
||
mountOnEnter: !1,
|
||
unmountOnExit: !1,
|
||
appear: !1,
|
||
enter: !0,
|
||
exit: !0,
|
||
onEnter: Qd,
|
||
onEntering: Qd,
|
||
onEntered: Qd,
|
||
onExit: Qd,
|
||
onExiting: Qd,
|
||
onExited: Qd
|
||
};
|
||
qs.UNMOUNTED = ch;
|
||
qs.EXITED = Wu;
|
||
qs.ENTERING = Gu;
|
||
qs.ENTERED = Xd;
|
||
qs.EXITING = Lx;
|
||
const vD = qs;
|
||
var R_ = function(t, n) {
|
||
return t && n && n.split(" ").forEach(function(i) {
|
||
return j_(t, i);
|
||
});
|
||
}, B2 = function(t, n) {
|
||
return t && n && n.split(" ").forEach(function(i) {
|
||
return T_(t, i);
|
||
});
|
||
}, gb = /* @__PURE__ */ function(e) {
|
||
ES(t, e);
|
||
function t() {
|
||
for (var i, o = arguments.length, l = new Array(o), f = 0; f < o; f++)
|
||
l[f] = arguments[f];
|
||
return i = e.call.apply(e, [this].concat(l)) || this, i.appliedClasses = {
|
||
appear: {},
|
||
enter: {},
|
||
exit: {}
|
||
}, i.onEnter = function(h, y) {
|
||
var m = i.resolveArguments(h, y), x = m[0], b = m[1];
|
||
i.removeClasses(x, "exit"), i.addClass(x, b ? "appear" : "enter", "base"), i.props.onEnter && i.props.onEnter(h, y);
|
||
}, i.onEntering = function(h, y) {
|
||
var m = i.resolveArguments(h, y), x = m[0], b = m[1], E = b ? "appear" : "enter";
|
||
i.addClass(x, E, "active"), i.props.onEntering && i.props.onEntering(h, y);
|
||
}, i.onEntered = function(h, y) {
|
||
var m = i.resolveArguments(h, y), x = m[0], b = m[1], E = b ? "appear" : "enter";
|
||
i.removeClasses(x, E), i.addClass(x, E, "done"), i.props.onEntered && i.props.onEntered(h, y);
|
||
}, i.onExit = function(h) {
|
||
var y = i.resolveArguments(h), m = y[0];
|
||
i.removeClasses(m, "appear"), i.removeClasses(m, "enter"), i.addClass(m, "exit", "base"), i.props.onExit && i.props.onExit(h);
|
||
}, i.onExiting = function(h) {
|
||
var y = i.resolveArguments(h), m = y[0];
|
||
i.addClass(m, "exit", "active"), i.props.onExiting && i.props.onExiting(h);
|
||
}, i.onExited = function(h) {
|
||
var y = i.resolveArguments(h), m = y[0];
|
||
i.removeClasses(m, "exit"), i.addClass(m, "exit", "done"), i.props.onExited && i.props.onExited(h);
|
||
}, i.resolveArguments = function(h, y) {
|
||
return i.props.nodeRef ? [i.props.nodeRef.current, h] : [h, y];
|
||
}, i.getClassNames = function(h) {
|
||
var y = i.props.classNames, m = typeof y == "string", x = m && y ? y + "-" : "", b = m ? "" + x + h : y[h], E = m ? b + "-active" : y[h + "Active"], j = m ? b + "-done" : y[h + "Done"];
|
||
return {
|
||
baseClassName: b,
|
||
activeClassName: E,
|
||
doneClassName: j
|
||
};
|
||
}, i;
|
||
}
|
||
var n = t.prototype;
|
||
return n.addClass = function(o, l, f) {
|
||
var h = this.getClassNames(l)[f + "ClassName"], y = this.getClassNames("enter"), m = y.doneClassName;
|
||
l === "appear" && f === "done" && m && (h += " " + m), f === "active" && o && hD(o), h && (this.appliedClasses[l][f] = h, R_(o, h));
|
||
}, n.removeClasses = function(o, l) {
|
||
var f = this.appliedClasses[l], h = f.base, y = f.active, m = f.done;
|
||
this.appliedClasses[l] = {}, h && B2(o, h), y && B2(o, y), m && B2(o, m);
|
||
}, n.render = function() {
|
||
var o = this.props;
|
||
o.classNames;
|
||
var l = lS(o, ["classNames"]);
|
||
return /* @__PURE__ */ pt.createElement(vD, yh({}, l, {
|
||
onEnter: this.onEnter,
|
||
onEntered: this.onEntered,
|
||
onEntering: this.onEntering,
|
||
onExit: this.onExit,
|
||
onExiting: this.onExiting,
|
||
onExited: this.onExited
|
||
}));
|
||
}, t;
|
||
}(pt.Component);
|
||
gb.defaultProps = {
|
||
classNames: ""
|
||
};
|
||
gb.propTypes = process.env.NODE_ENV !== "production" ? yh({}, vD.propTypes, {
|
||
/**
|
||
* The animation classNames applied to the component as it appears, enters,
|
||
* exits or has finished the transition. A single name can be provided, which
|
||
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
||
*
|
||
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
||
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
||
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
||
*
|
||
* A few details to note about how these classes are applied:
|
||
*
|
||
* 1. They are _joined_ with the ones that are already defined on the child
|
||
* component, so if you want to add some base styles, you can use
|
||
* `className` without worrying that it will be overridden.
|
||
*
|
||
* 2. If the transition component mounts with `in={false}`, no classes are
|
||
* applied yet. You might be expecting `*-exit-done`, but if you think
|
||
* about it, a component cannot finish exiting if it hasn't entered yet.
|
||
*
|
||
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
||
* allows you to define different behavior for when appearing is done and
|
||
* when regular entering is done, using selectors like
|
||
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
||
* an epic entrance animation when element first appears in the DOM using
|
||
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
||
* simply use `fade-enter-done` for defining both cases.
|
||
*
|
||
* Each individual classNames can also be specified independently like:
|
||
*
|
||
* ```js
|
||
* classNames={{
|
||
* appear: 'my-appear',
|
||
* appearActive: 'my-active-appear',
|
||
* appearDone: 'my-done-appear',
|
||
* enter: 'my-enter',
|
||
* enterActive: 'my-active-enter',
|
||
* enterDone: 'my-done-enter',
|
||
* exit: 'my-exit',
|
||
* exitActive: 'my-active-exit',
|
||
* exitDone: 'my-done-exit',
|
||
* }}
|
||
* ```
|
||
*
|
||
* If you want to set these classes using CSS Modules:
|
||
*
|
||
* ```js
|
||
* import styles from './styles.css';
|
||
* ```
|
||
*
|
||
* you might want to use camelCase in your CSS file, that way could simply
|
||
* spread them instead of listing them one by one:
|
||
*
|
||
* ```js
|
||
* classNames={{ ...styles }}
|
||
* ```
|
||
*
|
||
* @type {string | {
|
||
* appear?: string,
|
||
* appearActive?: string,
|
||
* appearDone?: string,
|
||
* enter?: string,
|
||
* enterActive?: string,
|
||
* enterDone?: string,
|
||
* exit?: string,
|
||
* exitActive?: string,
|
||
* exitDone?: string,
|
||
* }}
|
||
*/
|
||
classNames: M_,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
||
* applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool)
|
||
*/
|
||
onEnter: Oe.func,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
||
* 'appear-active' class is applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool)
|
||
*/
|
||
onEntering: Oe.func,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'enter' or
|
||
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
||
*
|
||
* @type Function(node: HtmlElement, isAppearing: bool)
|
||
*/
|
||
onEntered: Oe.func,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'exit' class is
|
||
* applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
||
*
|
||
* @type Function(node: HtmlElement)
|
||
*/
|
||
onExit: Oe.func,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
||
*
|
||
* @type Function(node: HtmlElement)
|
||
*/
|
||
onExiting: Oe.func,
|
||
/**
|
||
* A `<Transition>` callback fired immediately after the 'exit' classes
|
||
* are **removed** and the `exit-done` class is added to the DOM node.
|
||
*
|
||
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
||
*
|
||
* @type Function(node: HtmlElement)
|
||
*/
|
||
onExited: Oe.func
|
||
}) : {};
|
||
const mD = gb;
|
||
var hh = globalThis && globalThis.__assign || function() {
|
||
return hh = Object.assign || function(e) {
|
||
for (var t, n = 1, i = arguments.length; n < i; n++) {
|
||
t = arguments[n];
|
||
for (var o in t)
|
||
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
||
}
|
||
return e;
|
||
}, hh.apply(this, arguments);
|
||
};
|
||
function k_(e) {
|
||
var t, n = qe(!1), i = n[0], o = n[1], l = qe(!1), f = l[0], h = l[1], y = qe(!1), m = y[0], x = y[1], b = qe([0, 0]), E = b[0], j = b[1], M = He(null);
|
||
rt(function() {
|
||
if (i)
|
||
setTimeout(function() {
|
||
h(!0), setTimeout(function() {
|
||
x(!0);
|
||
});
|
||
});
|
||
else {
|
||
x(!1);
|
||
var k = setTimeout(function() {
|
||
h(i);
|
||
}, 1e3);
|
||
return function() {
|
||
return clearTimeout(k);
|
||
};
|
||
}
|
||
}, [i]), mN("contextmenu", function(k) {
|
||
var A;
|
||
!((A = M.current) === null || A === void 0) && A.contains(k.target) || k.target === M.current ? (k.preventDefault(), o(!0), j([k.pageX, k.pageY])) : o(!1);
|
||
});
|
||
var R = Q(function() {
|
||
var k, A;
|
||
(A = (k = e.menuProps) === null || k === void 0 ? void 0 : k.onClose) === null || A === void 0 || A.call(k), o(!1);
|
||
}, [(t = e.menuProps) === null || t === void 0 ? void 0 : t.onClose, o]);
|
||
return Je.createElement(
|
||
Je.Fragment,
|
||
null,
|
||
e.children(M),
|
||
f && Je.createElement(
|
||
sS,
|
||
hh({}, e.portalProps),
|
||
Je.createElement(
|
||
VS,
|
||
hh({ isOpen: m, gutter: 0 }, e.menuProps, { onClose: R }),
|
||
Je.createElement(GS, hh({ "aria-hidden": !0, w: 1, h: 1, style: {
|
||
position: "absolute",
|
||
left: E[0],
|
||
top: E[1],
|
||
cursor: "default"
|
||
} }, e.menuButtonProps)),
|
||
e.renderMenu()
|
||
)
|
||
)
|
||
);
|
||
}
|
||
const P_ = (e, t) => e.image.uuid === t.image.uuid && e.isSelected === t.isSelected, gD = F6((e) => {
|
||
const t = je(), {
|
||
activeTabName: n,
|
||
galleryImageObjectFit: i,
|
||
galleryImageMinimumWidth: o,
|
||
mayDeleteImage: l,
|
||
shouldUseSingleGalleryColumn: f
|
||
} = Z(t_), { image: h, isSelected: y } = e, { url: m, thumbnail: x, uuid: b, metadata: E } = h, [j, M] = qe(!1), R = Lh(), { direction: k } = cc(), { t: A } = Pe(), L = vb(), z = () => M(!0), I = () => M(!1), _ = () => {
|
||
var he, Te, xe, $;
|
||
(Te = (he = h.metadata) == null ? void 0 : he.image) != null && Te.prompt && L(($ = (xe = h.metadata) == null ? void 0 : xe.image) == null ? void 0 : $.prompt), R({
|
||
title: A("toast.promptSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, U = () => {
|
||
h.metadata && t(Oh(h.metadata.image.seed)), R({
|
||
title: A("toast.seedSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, B = () => {
|
||
t(Ph(h)), n !== "img2img" && t(ei("img2img")), R({
|
||
title: A("toast.sentToImageToImage"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, q = () => {
|
||
t(t0(h)), t(n0()), n !== "unifiedCanvas" && t(ei("unifiedCanvas")), R({
|
||
title: A("toast.sentToUnifiedCanvas"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, J = () => {
|
||
E && t(a6(E)), R({
|
||
title: A("toast.parametersSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, G = async () => {
|
||
var he;
|
||
if ((he = E == null ? void 0 : E.image) != null && he.init_image_path && (await fetch(E.image.init_image_path)).ok) {
|
||
t(ei("img2img")), t(BR(E)), R({
|
||
title: A("toast.initialImageSet"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
return;
|
||
}
|
||
R({
|
||
title: A("toast.initialImageNotSet"),
|
||
description: A("toast.initialImageNotSetDesc"),
|
||
status: "error",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
});
|
||
}, H = () => t(H3(h)), le = (he) => {
|
||
he.dataTransfer.setData("invokeai/imageUuid", b), he.dataTransfer.effectAllowed = "move";
|
||
}, ae = () => {
|
||
t(H3(h)), t(Ku(!0));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
k_,
|
||
{
|
||
menuProps: { size: "sm", isLazy: !0 },
|
||
renderMenu: () => {
|
||
var he, Te, xe, $, Y, te, V, ne;
|
||
return /* @__PURE__ */ c.jsxs(WS, { children: [
|
||
/* @__PURE__ */ c.jsx(Ko, { onClickCapture: ae, children: A("parameters.openInViewer") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ko,
|
||
{
|
||
onClickCapture: _,
|
||
isDisabled: ((Te = (he = h == null ? void 0 : h.metadata) == null ? void 0 : he.image) == null ? void 0 : Te.prompt) === void 0,
|
||
children: A("parameters.usePrompt")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ko,
|
||
{
|
||
onClickCapture: U,
|
||
isDisabled: (($ = (xe = h == null ? void 0 : h.metadata) == null ? void 0 : xe.image) == null ? void 0 : $.seed) === void 0,
|
||
children: A("parameters.useSeed")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ko,
|
||
{
|
||
onClickCapture: J,
|
||
isDisabled: !["txt2img", "img2img"].includes((te = (Y = h == null ? void 0 : h.metadata) == null ? void 0 : Y.image) == null ? void 0 : te.type),
|
||
children: A("parameters.useAll")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ko,
|
||
{
|
||
onClickCapture: G,
|
||
isDisabled: ((ne = (V = h == null ? void 0 : h.metadata) == null ? void 0 : V.image) == null ? void 0 : ne.type) !== "img2img",
|
||
children: A("parameters.useInitImg")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(Ko, { onClickCapture: B, children: A("parameters.sendToImg2Img") }),
|
||
/* @__PURE__ */ c.jsx(Ko, { onClickCapture: q, children: A("parameters.sendToUnifiedCanvas") }),
|
||
/* @__PURE__ */ c.jsx(Ko, { "data-warning": !0, children: /* @__PURE__ */ c.jsx(Wg, { image: h, children: /* @__PURE__ */ c.jsx("p", { children: A("parameters.deleteImage") }) }) })
|
||
] });
|
||
},
|
||
children: (he) => /* @__PURE__ */ c.jsxs(
|
||
Ut,
|
||
{
|
||
position: "relative",
|
||
onMouseOver: z,
|
||
onMouseOut: I,
|
||
userSelect: "none",
|
||
draggable: !0,
|
||
onDragStart: le,
|
||
ref: he,
|
||
sx: {
|
||
padding: 2,
|
||
display: "flex",
|
||
justifyContent: "center",
|
||
transition: "transform 0.2s ease-out",
|
||
_hover: {
|
||
cursor: "pointer",
|
||
zIndex: 2
|
||
},
|
||
_before: { content: '""', display: "block", paddingBottom: "100%" }
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Fh,
|
||
{
|
||
objectFit: f ? "contain" : i,
|
||
rounded: "md",
|
||
src: x || m,
|
||
loading: "lazy",
|
||
sx: {
|
||
position: "absolute",
|
||
width: "100%",
|
||
height: "100%",
|
||
maxWidth: "100%",
|
||
maxHeight: "100%",
|
||
top: "50%",
|
||
transform: "translate(-50%,-50%)",
|
||
...k === "rtl" ? { insetInlineEnd: "50%" } : { insetInlineStart: "50%" }
|
||
}
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
onClick: H,
|
||
sx: {
|
||
position: "absolute",
|
||
top: "0",
|
||
insetInlineStart: "0",
|
||
width: "100%",
|
||
height: "100%",
|
||
alignItems: "center",
|
||
justifyContent: "center"
|
||
},
|
||
children: y && /* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
as: y0,
|
||
sx: {
|
||
width: "50%",
|
||
height: "50%",
|
||
fill: "ok.500"
|
||
}
|
||
}
|
||
)
|
||
}
|
||
),
|
||
j && o >= 64 && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
position: "absolute",
|
||
top: 1,
|
||
insetInlineEnd: 1
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(Wg, { image: h, children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": A("parameters.deleteImage"),
|
||
icon: /* @__PURE__ */ c.jsx(ZB, {}),
|
||
size: "xs",
|
||
fontSize: 14,
|
||
isDisabled: !l
|
||
}
|
||
) })
|
||
}
|
||
)
|
||
]
|
||
},
|
||
b
|
||
)
|
||
}
|
||
);
|
||
}, P_);
|
||
gD.displayName = "HoverableImage";
|
||
const O_ = "0px", yb = "calc(70px + 1rem)", A_ = 4, xb = 1.5, N_ = `calc(100vw - ${O_})`, z_ = `calc(100vh - ${xb * 4}px)`, I_ = `calc(100vh - ${yb})`, gE = `calc(100vh - (${yb} + 6rem))`, L_ = `calc(100vh - (${yb} + 4.4rem))`, mg = "22.5rem";
|
||
const F_ = Be(cD, {
|
||
shouldForwardProp: (e) => !["sx"].includes(e)
|
||
}), gg = 320, yE = 40, B_ = {
|
||
txt2img: { galleryMinWidth: 200, galleryMaxWidth: 500 },
|
||
img2img: { galleryMinWidth: 200, galleryMaxWidth: 500 },
|
||
unifiedCanvas: { galleryMinWidth: 200, galleryMaxWidth: 200 },
|
||
nodes: { galleryMinWidth: 200, galleryMaxWidth: 500 },
|
||
postprocess: { galleryMinWidth: 200, galleryMaxWidth: 500 },
|
||
training: { galleryMinWidth: 200, galleryMaxWidth: 500 }
|
||
}, xE = 400;
|
||
function yD() {
|
||
const e = je(), { direction: t } = cc(), { t: n } = Pe(), {
|
||
images: i,
|
||
currentCategory: o,
|
||
currentImageUuid: l,
|
||
shouldPinGallery: f,
|
||
shouldShowGallery: h,
|
||
galleryImageMinimumWidth: y,
|
||
galleryGridTemplateColumns: m,
|
||
activeTabName: x,
|
||
galleryImageObjectFit: b,
|
||
shouldHoldGalleryOpen: E,
|
||
shouldAutoSwitchToNewImages: j,
|
||
areMoreImagesAvailable: M,
|
||
galleryWidth: R,
|
||
isLightboxOpen: k,
|
||
isStaging: A,
|
||
shouldEnableResize: L,
|
||
shouldUseSingleGalleryColumn: z
|
||
} = Z(e_), { galleryMinWidth: I, galleryMaxWidth: _ } = k ? {
|
||
galleryMinWidth: xE,
|
||
galleryMaxWidth: xE
|
||
} : B_[x], [U, B] = qe(
|
||
R >= gg
|
||
), [q, J] = qe(!1), [G, H] = qe(0), le = He(null), ae = He(null), he = He(null);
|
||
rt(() => {
|
||
B(R >= gg);
|
||
}, [R]);
|
||
const Te = () => {
|
||
!f && e(Qu(!0)), e(GR(!f)), e(ca(!0));
|
||
}, xe = () => {
|
||
h ? Y() : $();
|
||
}, $ = () => {
|
||
e(Qu(!0)), f && e(ca(!0));
|
||
}, Y = Q(() => {
|
||
e(Qu(!1)), e(_R(!1)), setTimeout(
|
||
() => f && e(ca(!0)),
|
||
400
|
||
);
|
||
}, [e, f]), te = () => {
|
||
e(qR(o));
|
||
}, V = (se) => {
|
||
e(rh(se));
|
||
}, ne = () => {
|
||
E || (he.current = window.setTimeout(() => Y(), 500));
|
||
}, we = () => {
|
||
he.current && window.clearTimeout(he.current);
|
||
};
|
||
Ze(
|
||
"g",
|
||
() => {
|
||
xe();
|
||
},
|
||
[h, f]
|
||
), Ze(
|
||
"left",
|
||
() => {
|
||
e(o6());
|
||
},
|
||
{
|
||
enabled: !A || x !== "unifiedCanvas"
|
||
},
|
||
[A]
|
||
), Ze(
|
||
"right",
|
||
() => {
|
||
e(s6());
|
||
},
|
||
{
|
||
enabled: !A || x !== "unifiedCanvas"
|
||
},
|
||
[A]
|
||
), Ze(
|
||
"shift+g",
|
||
() => {
|
||
Te();
|
||
},
|
||
[f]
|
||
), Ze(
|
||
"esc",
|
||
() => {
|
||
e(Qu(!1));
|
||
},
|
||
{
|
||
enabled: () => !f,
|
||
preventDefault: !0
|
||
},
|
||
[f]
|
||
);
|
||
const Ee = 32;
|
||
return Ze(
|
||
"shift+up",
|
||
() => {
|
||
if (y < 256) {
|
||
const se = Ie.clamp(
|
||
y + Ee,
|
||
32,
|
||
256
|
||
);
|
||
e(rh(se));
|
||
}
|
||
},
|
||
[y]
|
||
), Ze(
|
||
"shift+down",
|
||
() => {
|
||
if (y > 32) {
|
||
const se = Ie.clamp(
|
||
y - Ee,
|
||
32,
|
||
256
|
||
);
|
||
e(rh(se));
|
||
}
|
||
},
|
||
[y]
|
||
), rt(() => {
|
||
function se(ve) {
|
||
!f && le.current && !le.current.contains(ve.target) && Y();
|
||
}
|
||
return document.addEventListener("mousedown", se), () => {
|
||
document.removeEventListener("mousedown", se);
|
||
};
|
||
}, [Y, f]), /* @__PURE__ */ c.jsx(
|
||
mD,
|
||
{
|
||
nodeRef: le,
|
||
in: h || E,
|
||
unmountOnExit: !0,
|
||
timeout: 200,
|
||
classNames: `${t}-image-gallery-css-transition`,
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
Ut,
|
||
{
|
||
className: `${t}-image-gallery-css-transition`,
|
||
sx: f ? { zIndex: 1, insetInlineEnd: 0 } : {
|
||
zIndex: 100,
|
||
position: "fixed",
|
||
height: "100vh",
|
||
top: 0,
|
||
insetInlineEnd: 0
|
||
},
|
||
ref: le,
|
||
onMouseLeave: f ? void 0 : ne,
|
||
onMouseEnter: f ? void 0 : we,
|
||
onMouseOver: f ? void 0 : we,
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
F_,
|
||
{
|
||
sx: {
|
||
padding: 4,
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
rowGap: 4,
|
||
borderRadius: f ? "base" : 0,
|
||
borderInlineStartWidth: 5,
|
||
// boxShadow: '0 0 1rem blackAlpha.700',
|
||
bg: "base.850",
|
||
borderColor: "base.700"
|
||
},
|
||
minWidth: I,
|
||
maxWidth: f ? _ : window.innerWidth,
|
||
"data-pinned": f,
|
||
handleStyles: t === "rtl" ? {
|
||
right: {
|
||
width: "15px"
|
||
}
|
||
} : {
|
||
left: {
|
||
width: "15px"
|
||
}
|
||
},
|
||
enable: t === "rtl" ? {
|
||
right: L
|
||
} : {
|
||
left: L
|
||
},
|
||
size: {
|
||
width: R,
|
||
height: f ? "100%" : "100vh"
|
||
},
|
||
onResizeStart: (se, ve, Ce) => {
|
||
H(Ce.clientHeight), Ce.style.height = `${Ce.clientHeight}px`, f && (Ce.style.position = "fixed", Ce.style.insetInlineEnd = "1rem", J(!0));
|
||
},
|
||
onResizeStop: (se, ve, Ce, Ae) => {
|
||
const Ve = f ? Ie.clamp(
|
||
Number(R) + Ae.width,
|
||
I,
|
||
Number(_)
|
||
) : Number(R) + Ae.width;
|
||
e(UR(Ve)), Ce.removeAttribute("data-resize-alert"), f && (console.log("unpin"), Ce.style.position = "relative", Ce.style.removeProperty("inset-inline-end"), Ce.style.setProperty(
|
||
"height",
|
||
f ? "100%" : "100vh"
|
||
), J(!1), e(ca(!0)));
|
||
},
|
||
onResize: (se, ve, Ce, Ae) => {
|
||
const Ve = Ie.clamp(
|
||
Number(R) + Ae.width,
|
||
I,
|
||
Number(
|
||
f ? _ : 0.95 * window.innerWidth
|
||
)
|
||
);
|
||
Ve >= gg && !U ? B(!0) : Ve < gg && U && B(!1), y > Ve - yE && e(
|
||
rh(
|
||
Ve - yE
|
||
)
|
||
), f && (Ve >= _ ? Ce.setAttribute("data-resize-alert", "true") : Ce.removeAttribute("data-resize-alert")), Ce.style.height = `${G}px`;
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { alignItems: "center", gap: 2, justifyContent: "space-between", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Jr,
|
||
{
|
||
size: "sm",
|
||
isAttached: !0,
|
||
w: "max-content",
|
||
justifyContent: "stretch",
|
||
children: U ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
isChecked: o === "result",
|
||
onClick: () => e(Jm("result")),
|
||
flexGrow: 1,
|
||
children: n("gallery.generations")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
isChecked: o === "user",
|
||
onClick: () => e(Jm("user")),
|
||
flexGrow: 1,
|
||
children: n("gallery.uploads")
|
||
}
|
||
)
|
||
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": n("gallery.showGenerations"),
|
||
tooltip: n("gallery.showGenerations"),
|
||
isChecked: o === "result",
|
||
icon: /* @__PURE__ */ c.jsx(FB, {}),
|
||
onClick: () => e(Jm("result"))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": n("gallery.showUploads"),
|
||
tooltip: n("gallery.showUploads"),
|
||
isChecked: o === "user",
|
||
icon: /* @__PURE__ */ c.jsx($B, {}),
|
||
onClick: () => e(Jm("user"))
|
||
}
|
||
)
|
||
] })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
size: "sm",
|
||
"aria-label": n("gallery.gallerySettings"),
|
||
icon: /* @__PURE__ */ c.jsx(hb, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { direction: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
value: y,
|
||
onChange: V,
|
||
min: 32,
|
||
max: 256,
|
||
hideTooltip: !0,
|
||
label: n("gallery.galleryImageSize"),
|
||
withReset: !0,
|
||
handleReset: () => e(rh(64))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("gallery.maintainAspectRatio"),
|
||
isChecked: b === "contain",
|
||
onChange: () => e(
|
||
HR(
|
||
b === "contain" ? "cover" : "contain"
|
||
)
|
||
)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("gallery.autoSwitchNewImages"),
|
||
isChecked: j,
|
||
onChange: (se) => e(VR(se.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("gallery.singleColumnLayout"),
|
||
isChecked: z,
|
||
onChange: (se) => e(
|
||
WR(se.target.checked)
|
||
)
|
||
}
|
||
)
|
||
] })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
size: "sm",
|
||
"aria-label": n("gallery.pinGallery"),
|
||
tooltip: `${n("gallery.pinGallery")} (Shift+G)`,
|
||
onClick: Te,
|
||
icon: f ? /* @__PURE__ */ c.jsx(dD, {}) : /* @__PURE__ */ c.jsx(fD, {})
|
||
}
|
||
)
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
direction: "column",
|
||
gap: 2,
|
||
h: f ? gE : "100vh",
|
||
maxH: f ? gE : "100vh",
|
||
overflowY: "scroll",
|
||
ref: ae,
|
||
sx: {
|
||
..._6
|
||
},
|
||
children: i.length || M ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
_i,
|
||
{
|
||
gap: 2,
|
||
style: { gridTemplateColumns: m },
|
||
children: i.map((se) => {
|
||
const { uuid: ve } = se, Ce = l === ve;
|
||
return /* @__PURE__ */ c.jsx(
|
||
gD,
|
||
{
|
||
image: se,
|
||
isSelected: Ce
|
||
},
|
||
ve
|
||
);
|
||
})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
onClick: te,
|
||
isDisabled: !M,
|
||
flexShrink: 0,
|
||
children: n(M ? "gallery.loadMore" : "gallery.allImagesLoaded")
|
||
}
|
||
)
|
||
] }) : /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
gap: 2,
|
||
padding: 8,
|
||
h: "100%",
|
||
w: "100%",
|
||
color: "base.500"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
as: mb,
|
||
sx: {
|
||
w: 16,
|
||
h: 16
|
||
}
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx("p", { children: n("gallery.noImagesInGallery") })
|
||
]
|
||
}
|
||
)
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
q && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
style: {
|
||
width: `${R}px`,
|
||
height: "100%"
|
||
}
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
var __ = uS({
|
||
displayName: "EditIcon",
|
||
path: /* @__PURE__ */ c.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeWidth: "2", children: [
|
||
/* @__PURE__ */ c.jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
||
/* @__PURE__ */ c.jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
||
] })
|
||
}), xD = uS({
|
||
displayName: "ExternalLinkIcon",
|
||
path: /* @__PURE__ */ c.jsxs("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeWidth: "2", children: [
|
||
/* @__PURE__ */ c.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
||
/* @__PURE__ */ c.jsx("path", { d: "M15 3h6v6" }),
|
||
/* @__PURE__ */ c.jsx("path", { d: "M10 14L21 3" })
|
||
] })
|
||
}), U_ = uS({
|
||
displayName: "DeleteIcon",
|
||
path: /* @__PURE__ */ c.jsx("g", { fill: "currentColor", children: /* @__PURE__ */ c.jsx("path", { d: "M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z" }) })
|
||
});
|
||
function H_(e) {
|
||
return it({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z" } }, { tag: "path", attr: { fill: "none", strokeMiterlimit: "10", strokeWidth: "32", d: "M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z" } }] })(e);
|
||
}
|
||
const Hn = ({
|
||
label: e,
|
||
value: t,
|
||
onClick: n,
|
||
isLink: i,
|
||
labelPosition: o,
|
||
withCopy: l = !1
|
||
}) => /* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
n && /* @__PURE__ */ c.jsx(Wr, { label: `Recall ${e}`, children: /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
"aria-label": "Use this parameter",
|
||
icon: /* @__PURE__ */ c.jsx(H_, {}),
|
||
size: "xs",
|
||
variant: "ghost",
|
||
fontSize: 20,
|
||
onClick: n
|
||
}
|
||
) }),
|
||
l && /* @__PURE__ */ c.jsx(Wr, { label: `Copy ${e}`, children: /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
"aria-label": `Copy ${e}`,
|
||
icon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
size: "xs",
|
||
variant: "ghost",
|
||
fontSize: 14,
|
||
onClick: () => navigator.clipboard.writeText(t.toString())
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsxs(ce, { direction: o ? "column" : "row", children: [
|
||
/* @__PURE__ */ c.jsxs(mt, { fontWeight: "semibold", whiteSpace: "pre-wrap", pr: 2, children: [
|
||
e,
|
||
":"
|
||
] }),
|
||
i ? /* @__PURE__ */ c.jsxs(tc, { href: t.toString(), isExternal: !0, wordBreak: "break-all", children: [
|
||
t.toString(),
|
||
" ",
|
||
/* @__PURE__ */ c.jsx(xD, { mx: "2px" })
|
||
] }) : /* @__PURE__ */ c.jsx(mt, { overflowY: "scroll", wordBreak: "break-all", children: t.toString() })
|
||
] })
|
||
] }), V_ = (e, t) => e.image.uuid === t.image.uuid, Sb = F6(
|
||
({ image: e, styleClass: t }) => {
|
||
var G, H;
|
||
const n = je(), i = vb();
|
||
Ze("esc", () => {
|
||
n(i6(!1));
|
||
});
|
||
const o = ((G = e == null ? void 0 : e.metadata) == null ? void 0 : G.image) || {}, l = e == null ? void 0 : e.dreamPrompt, {
|
||
cfg_scale: f,
|
||
fit: h,
|
||
height: y,
|
||
hires_fix: m,
|
||
init_image_path: x,
|
||
mask_image_path: b,
|
||
orig_path: E,
|
||
perlin: j,
|
||
postprocessing: M,
|
||
prompt: R,
|
||
sampler: k,
|
||
seamless: A,
|
||
seed: L,
|
||
steps: z,
|
||
strength: I,
|
||
threshold: _,
|
||
type: U,
|
||
variations: B,
|
||
width: q
|
||
} = o, J = JSON.stringify(e.metadata, null, 2);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
className: t,
|
||
sx: {
|
||
position: "absolute",
|
||
top: "0",
|
||
width: "100%",
|
||
borderRadius: "base",
|
||
padding: 4,
|
||
overflow: "scroll",
|
||
maxHeight: L_,
|
||
height: "100%",
|
||
zIndex: "10",
|
||
backdropFilter: "blur(10px)",
|
||
bg: "blackAlpha.600"
|
||
},
|
||
children: /* @__PURE__ */ c.jsxs(ce, { gap: 1, direction: "column", width: "100%", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "semibold", children: "File:" }),
|
||
/* @__PURE__ */ c.jsxs(tc, { href: e.url, isExternal: !0, maxW: "calc(100% - 3rem)", children: [
|
||
e.url.length > 64 ? e.url.substring(0, 64).concat("...") : e.url,
|
||
/* @__PURE__ */ c.jsx(xD, { mx: "2px" })
|
||
] })
|
||
] }),
|
||
Object.keys(o).length > 0 ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
U && /* @__PURE__ */ c.jsx(Hn, { label: "Generation type", value: U }),
|
||
((H = e.metadata) == null ? void 0 : H.model_weights) && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Model",
|
||
value: e.metadata.model_weights
|
||
}
|
||
),
|
||
["esrgan", "gfpgan"].includes(U) && /* @__PURE__ */ c.jsx(Hn, { label: "Original image", value: E }),
|
||
R && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Prompt",
|
||
labelPosition: "top",
|
||
value: typeof R == "string" ? R : t6(R),
|
||
onClick: () => i(R)
|
||
}
|
||
),
|
||
L !== void 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Seed",
|
||
value: L,
|
||
onClick: () => n(Oh(L))
|
||
}
|
||
),
|
||
_ !== void 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Noise Threshold",
|
||
value: _,
|
||
onClick: () => n(ox(_))
|
||
}
|
||
),
|
||
j !== void 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Perlin Noise",
|
||
value: j,
|
||
onClick: () => n(sx(j))
|
||
}
|
||
),
|
||
k && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Sampler",
|
||
value: k,
|
||
onClick: () => n(l6(k))
|
||
}
|
||
),
|
||
z && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Steps",
|
||
value: z,
|
||
onClick: () => n(lx(z))
|
||
}
|
||
),
|
||
f !== void 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "CFG scale",
|
||
value: f,
|
||
onClick: () => n(ux(f))
|
||
}
|
||
),
|
||
B && B.length > 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Seed-weight pairs",
|
||
value: V3(B),
|
||
onClick: () => n(u6(V3(B)))
|
||
}
|
||
),
|
||
A && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Seamless",
|
||
value: A,
|
||
onClick: () => n(c6(A))
|
||
}
|
||
),
|
||
m && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "High Resolution Optimization",
|
||
value: m,
|
||
onClick: () => n(d6(m))
|
||
}
|
||
),
|
||
q && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Width",
|
||
value: q,
|
||
onClick: () => n(Eg(q))
|
||
}
|
||
),
|
||
y && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Height",
|
||
value: y,
|
||
onClick: () => n(jg(y))
|
||
}
|
||
),
|
||
x && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Initial image",
|
||
value: x,
|
||
isLink: !0,
|
||
onClick: () => n(Ph(x))
|
||
}
|
||
),
|
||
b && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Mask image",
|
||
value: b,
|
||
isLink: !0,
|
||
onClick: () => n(YR(b))
|
||
}
|
||
),
|
||
U === "img2img" && I && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Image to image strength",
|
||
value: I,
|
||
onClick: () => n(cx(I))
|
||
}
|
||
),
|
||
h && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Image to image fit",
|
||
value: h,
|
||
onClick: () => n(f6(h))
|
||
}
|
||
),
|
||
M && M.length > 0 && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "sm", children: "Postprocessing" }),
|
||
M.map(
|
||
(le, ae) => {
|
||
if (le.type === "esrgan") {
|
||
const { scale: he, strength: Te, denoise_str: xe } = le;
|
||
return /* @__PURE__ */ c.jsxs(ce, { pl: 8, gap: 1, direction: "column", children: [
|
||
/* @__PURE__ */ c.jsx(mt, { size: "md", children: `${ae + 1}: Upscale (ESRGAN)` }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Scale",
|
||
value: he,
|
||
onClick: () => n(J5(he))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Strength",
|
||
value: Te,
|
||
onClick: () => n(ix(Te))
|
||
}
|
||
),
|
||
xe !== void 0 && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Denoising strength",
|
||
value: xe,
|
||
onClick: () => n(ax(xe))
|
||
}
|
||
)
|
||
] }, ae);
|
||
} else if (le.type === "gfpgan") {
|
||
const { strength: he } = le;
|
||
return /* @__PURE__ */ c.jsxs(ce, { pl: 8, gap: 1, direction: "column", children: [
|
||
/* @__PURE__ */ c.jsx(mt, { size: "md", children: `${ae + 1}: Face restoration (GFPGAN)` }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Strength",
|
||
value: he,
|
||
onClick: () => {
|
||
n(Og(he)), n(wg("gfpgan"));
|
||
}
|
||
}
|
||
)
|
||
] }, ae);
|
||
} else if (le.type === "codeformer") {
|
||
const { strength: he, fidelity: Te } = le;
|
||
return /* @__PURE__ */ c.jsxs(ce, { pl: 8, gap: 1, direction: "column", children: [
|
||
/* @__PURE__ */ c.jsx(mt, { size: "md", children: `${ae + 1}: Face restoration (Codeformer)` }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Strength",
|
||
value: he,
|
||
onClick: () => {
|
||
n(Og(he)), n(wg("codeformer"));
|
||
}
|
||
}
|
||
),
|
||
Te && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
label: "Fidelity",
|
||
value: Te,
|
||
onClick: () => {
|
||
n(rx(Te)), n(wg("codeformer"));
|
||
}
|
||
}
|
||
)
|
||
] }, ae);
|
||
}
|
||
}
|
||
)
|
||
] }),
|
||
l && /* @__PURE__ */ c.jsx(
|
||
Hn,
|
||
{
|
||
withCopy: !0,
|
||
label: "Dream Prompt",
|
||
value: l
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, direction: "column", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(Wr, { label: "Copy metadata JSON", children: /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
"aria-label": "Copy metadata JSON",
|
||
icon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
size: "xs",
|
||
variant: "ghost",
|
||
fontSize: 14,
|
||
onClick: () => navigator.clipboard.writeText(J)
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "semibold", children: "Metadata JSON:" })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
mt: 0,
|
||
mr: 2,
|
||
mb: 4,
|
||
ml: 2,
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
overflowX: "scroll",
|
||
wordBreak: "break-all",
|
||
bg: "whiteAlpha.100"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx("pre", { children: J })
|
||
}
|
||
)
|
||
] })
|
||
] }) : /* @__PURE__ */ c.jsx(Yj, { width: "100%", pt: 10, children: /* @__PURE__ */ c.jsx(mt, { fontSize: "lg", fontWeight: "semibold", children: "No metadata available" }) })
|
||
] })
|
||
}
|
||
);
|
||
},
|
||
V_
|
||
);
|
||
Sb.displayName = "ImageMetadataViewer";
|
||
const SE = {
|
||
height: "100%",
|
||
width: "15%",
|
||
alignItems: "center",
|
||
pointerEvents: "auto"
|
||
}, bE = {
|
||
color: "base.100"
|
||
}, W_ = ct(
|
||
Gs,
|
||
(e) => {
|
||
const { currentImage: t } = e, n = e.categories[t ? t.category : "result"].images, i = n.findIndex(
|
||
(l) => {
|
||
var f;
|
||
return l.uuid === ((f = e == null ? void 0 : e.currentImage) == null ? void 0 : f.uuid);
|
||
}
|
||
), o = n.length;
|
||
return {
|
||
isOnFirstImage: i === 0,
|
||
isOnLastImage: !isNaN(i) && i === o - 1
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), SD = () => {
|
||
const e = je(), { isOnFirstImage: t, isOnLastImage: n } = Z(
|
||
W_
|
||
), [i, o] = qe(!1), l = () => {
|
||
o(!0);
|
||
}, f = () => {
|
||
o(!1);
|
||
}, h = () => {
|
||
e(o6());
|
||
}, y = () => {
|
||
e(s6());
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
justifyContent: "space-between",
|
||
zIndex: 1,
|
||
height: "100%",
|
||
width: "100%",
|
||
pointerEvents: "none"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
_i,
|
||
{
|
||
sx: {
|
||
...SE,
|
||
justifyContent: "flex-start"
|
||
},
|
||
onMouseOver: l,
|
||
onMouseOut: f,
|
||
children: i && !t && /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
"aria-label": "Previous image",
|
||
icon: /* @__PURE__ */ c.jsx(TB, { size: 64 }),
|
||
variant: "unstyled",
|
||
onClick: h,
|
||
boxSize: 16,
|
||
sx: bE
|
||
}
|
||
)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
_i,
|
||
{
|
||
sx: {
|
||
...SE,
|
||
justifyContent: "flex-end"
|
||
},
|
||
onMouseOver: l,
|
||
onMouseOut: f,
|
||
children: i && !n && /* @__PURE__ */ c.jsx(
|
||
Wl,
|
||
{
|
||
"aria-label": "Next image",
|
||
icon: /* @__PURE__ */ c.jsx(DB, { size: 64 }),
|
||
variant: "unstyled",
|
||
onClick: y,
|
||
boxSize: 16,
|
||
sx: bE
|
||
}
|
||
)
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
};
|
||
var Fi = function(e, t) {
|
||
return Number(e.toFixed(t));
|
||
}, G_ = function(e, t) {
|
||
return typeof e == "number" ? e : t;
|
||
}, Zn = function(e, t, n) {
|
||
n && typeof n == "function" && n(e, t);
|
||
}, q_ = function(e) {
|
||
return -Math.cos(e * Math.PI) / 2 + 0.5;
|
||
}, Y_ = function(e) {
|
||
return e;
|
||
}, Q_ = function(e) {
|
||
return e * e;
|
||
}, X_ = function(e) {
|
||
return e * (2 - e);
|
||
}, K_ = function(e) {
|
||
return e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e;
|
||
}, Z_ = function(e) {
|
||
return e * e * e;
|
||
}, J_ = function(e) {
|
||
return --e * e * e + 1;
|
||
}, $_ = function(e) {
|
||
return e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1;
|
||
}, eU = function(e) {
|
||
return e * e * e * e;
|
||
}, tU = function(e) {
|
||
return 1 - --e * e * e * e;
|
||
}, nU = function(e) {
|
||
return e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e;
|
||
}, rU = function(e) {
|
||
return e * e * e * e * e;
|
||
}, aU = function(e) {
|
||
return 1 + --e * e * e * e * e;
|
||
}, iU = function(e) {
|
||
return e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e;
|
||
}, bD = {
|
||
easeOut: q_,
|
||
linear: Y_,
|
||
easeInQuad: Q_,
|
||
easeOutQuad: X_,
|
||
easeInOutQuad: K_,
|
||
easeInCubic: Z_,
|
||
easeOutCubic: J_,
|
||
easeInOutCubic: $_,
|
||
easeInQuart: eU,
|
||
easeOutQuart: tU,
|
||
easeInOutQuart: nU,
|
||
easeInQuint: rU,
|
||
easeOutQuint: aU,
|
||
easeInOutQuint: iU
|
||
}, CD = function(e) {
|
||
typeof e == "number" && cancelAnimationFrame(e);
|
||
}, $o = function(e) {
|
||
e.mounted && (CD(e.animation), e.animate = !1, e.animation = null, e.velocity = null);
|
||
};
|
||
function wD(e, t, n, i) {
|
||
if (e.mounted) {
|
||
var o = new Date().getTime(), l = 1;
|
||
$o(e), e.animation = function() {
|
||
if (!e.mounted)
|
||
return CD(e.animation);
|
||
var f = new Date().getTime() - o, h = f / n, y = bD[t], m = y(h);
|
||
f >= n ? (i(l), e.animation = null) : e.animation && (i(m), requestAnimationFrame(e.animation));
|
||
}, requestAnimationFrame(e.animation);
|
||
}
|
||
}
|
||
function oU(e) {
|
||
var t = e.scale, n = e.positionX, i = e.positionY;
|
||
return !(Number.isNaN(t) || Number.isNaN(n) || Number.isNaN(i));
|
||
}
|
||
function $l(e, t, n, i) {
|
||
var o = oU(t);
|
||
if (!(!e.mounted || !o)) {
|
||
var l = e.setTransformState, f = e.transformState, h = f.scale, y = f.positionX, m = f.positionY, x = t.scale - h, b = t.positionX - y, E = t.positionY - m;
|
||
n === 0 ? l(t.scale, t.positionX, t.positionY) : wD(e, i, n, function(j) {
|
||
var M = h + x * j, R = y + b * j, k = m + E * j;
|
||
l(M, R, k);
|
||
});
|
||
}
|
||
}
|
||
function sU(e, t, n) {
|
||
var i = e.offsetWidth, o = e.offsetHeight, l = t.offsetWidth, f = t.offsetHeight, h = l * n, y = f * n, m = i - h, x = o - y;
|
||
return {
|
||
wrapperWidth: i,
|
||
wrapperHeight: o,
|
||
newContentWidth: h,
|
||
newDiffWidth: m,
|
||
newContentHeight: y,
|
||
newDiffHeight: x
|
||
};
|
||
}
|
||
var lU = function(e, t, n, i, o, l, f) {
|
||
var h = e > t ? n * (f ? 1 : 0.5) : 0, y = i > o ? l * (f ? 1 : 0.5) : 0, m = e - t - h, x = h, b = i - o - y, E = y;
|
||
return { minPositionX: m, maxPositionX: x, minPositionY: b, maxPositionY: E };
|
||
}, bb = function(e, t) {
|
||
var n = e.wrapperComponent, i = e.contentComponent, o = e.setup.centerZoomedOut;
|
||
if (!n || !i)
|
||
throw new Error("Components are not mounted");
|
||
var l = sU(n, i, t), f = l.wrapperWidth, h = l.wrapperHeight, y = l.newContentWidth, m = l.newDiffWidth, x = l.newContentHeight, b = l.newDiffHeight, E = lU(f, y, m, h, x, b, Boolean(o));
|
||
return E;
|
||
}, Fx = function(e, t, n, i) {
|
||
return i ? e < t ? Fi(t, 2) : e > n ? Fi(n, 2) : Fi(e, 2) : Fi(e, 2);
|
||
}, mf = function(e, t) {
|
||
var n = bb(e, t);
|
||
return e.bounds = n, n;
|
||
};
|
||
function S0(e, t, n, i, o, l, f) {
|
||
var h = n.minPositionX, y = n.minPositionY, m = n.maxPositionX, x = n.maxPositionY, b = 0, E = 0;
|
||
f && (b = o, E = l);
|
||
var j = Fx(e, h - b, m + b, i), M = Fx(t, y - E, x + E, i);
|
||
return { x: j, y: M };
|
||
}
|
||
function b0(e, t, n, i, o, l) {
|
||
var f = e.transformState, h = f.scale, y = f.positionX, m = f.positionY, x = i - h;
|
||
if (typeof t != "number" || typeof n != "number")
|
||
return console.error("Mouse X and Y position were not provided!"), { x: y, y: m };
|
||
var b = y - t * x, E = m - n * x, j = S0(b, E, o, l, 0, 0, null);
|
||
return j;
|
||
}
|
||
function qh(e, t, n, i, o) {
|
||
var l = o ? i : 0, f = t - l;
|
||
return !Number.isNaN(n) && e >= n ? n : !Number.isNaN(t) && e <= f ? f : e;
|
||
}
|
||
var CE = function(e, t) {
|
||
var n = e.setup.panning.excluded, i = e.isInitialized, o = e.wrapperComponent, l = t.target, f = o == null ? void 0 : o.contains(l), h = i && l && f;
|
||
if (!h)
|
||
return !1;
|
||
var y = C0(l, n);
|
||
return !y;
|
||
}, wE = function(e) {
|
||
var t = e.isInitialized, n = e.isPanning, i = e.setup, o = i.panning.disabled, l = t && n && !o;
|
||
return !!l;
|
||
}, uU = function(e, t) {
|
||
var n = e.transformState, i = n.positionX, o = n.positionY;
|
||
e.isPanning = !0;
|
||
var l = t.clientX, f = t.clientY;
|
||
e.startCoords = { x: l - i, y: f - o };
|
||
}, cU = function(e, t) {
|
||
var n = t.touches, i = e.transformState, o = i.positionX, l = i.positionY;
|
||
e.isPanning = !0;
|
||
var f = n.length === 1;
|
||
if (f) {
|
||
var h = n[0].clientX, y = n[0].clientY;
|
||
e.startCoords = { x: h - o, y: y - l };
|
||
}
|
||
};
|
||
function dU(e) {
|
||
var t = e.transformState, n = t.positionX, i = t.positionY, o = t.scale, l = e.setup, f = l.disabled, h = l.limitToBounds, y = l.centerZoomedOut, m = e.wrapperComponent;
|
||
if (!(f || !m || !e.bounds)) {
|
||
var x = e.bounds, b = x.maxPositionX, E = x.minPositionX, j = x.maxPositionY, M = x.minPositionY, R = n > b || n < E, k = i > j || i < M, A = n > b ? m.offsetWidth : e.setup.minPositionX || 0, L = i > j ? m.offsetHeight : e.setup.minPositionY || 0, z = b0(e, A, L, o, e.bounds, h || y), I = z.x, _ = z.y;
|
||
return {
|
||
scale: o,
|
||
positionX: R ? I : n,
|
||
positionY: k ? _ : i
|
||
};
|
||
}
|
||
}
|
||
function fU(e, t, n, i, o) {
|
||
var l = e.setup.limitToBounds, f = e.wrapperComponent, h = e.bounds, y = e.transformState, m = y.scale, x = y.positionX, b = y.positionY;
|
||
if (!(f === null || h === null || t === x && n === b)) {
|
||
var E = S0(t, n, h, l, i, o, f), j = E.x, M = E.y;
|
||
e.setTransformState(m, j, M);
|
||
}
|
||
}
|
||
var pU = function(e, t, n) {
|
||
var i = e.startCoords, o = e.transformState, l = e.setup.panning, f = l.lockAxisX, h = l.lockAxisY, y = o.positionX, m = o.positionY;
|
||
if (!i)
|
||
return { x: y, y: m };
|
||
var x = t - i.x, b = n - i.y, E = f ? y : x, j = h ? m : b;
|
||
return { x: E, y: j };
|
||
}, Gg = function(e, t) {
|
||
var n = e.setup, i = e.transformState, o = i.scale, l = n.minScale, f = n.disablePadding;
|
||
return t > 0 && o >= l && !f ? t : 0;
|
||
}, hU = function(e) {
|
||
var t = e.mounted, n = e.setup, i = n.disabled, o = n.velocityAnimation, l = e.transformState.scale, f = o.disabled, h = !f || l > 1 || !i || t;
|
||
return !!h;
|
||
}, vU = function(e) {
|
||
var t = e.mounted, n = e.velocity, i = e.bounds, o = e.setup, l = o.disabled, f = o.velocityAnimation, h = e.transformState.scale, y = f.disabled, m = !y || h > 1 || !l || t;
|
||
return !(!m || !n || !i);
|
||
};
|
||
function mU(e, t) {
|
||
var n = e.setup.velocityAnimation, i = n.equalToMove, o = n.animationTime, l = n.sensitivity;
|
||
return i ? o * t * l : o;
|
||
}
|
||
function EE(e, t, n, i, o, l, f, h, y, m) {
|
||
if (o) {
|
||
if (t > f && n > f) {
|
||
var x = f + (e - f) * m;
|
||
return x > y ? y : x < f ? f : x;
|
||
}
|
||
if (t < l && n < l) {
|
||
var x = l + (e - l) * m;
|
||
return x < h ? h : x > l ? l : x;
|
||
}
|
||
}
|
||
return i ? t : Fx(e, l, f, o);
|
||
}
|
||
function gU(e, t) {
|
||
var n = 1;
|
||
return t ? Math.min(n, e.offsetWidth / window.innerWidth) : n;
|
||
}
|
||
function yU(e, t) {
|
||
var n = hU(e);
|
||
if (n) {
|
||
var i = e.lastMousePosition, o = e.velocityTime, l = e.setup, f = e.wrapperComponent, h = l.velocityAnimation.equalToMove, y = Date.now();
|
||
if (i && o && f) {
|
||
var m = gU(f, h), x = t.x - i.x, b = t.y - i.y, E = x / m, j = b / m, M = y - o, R = x * x + b * b, k = Math.sqrt(R) / M;
|
||
e.velocity = { velocityX: E, velocityY: j, total: k };
|
||
}
|
||
e.lastMousePosition = t, e.velocityTime = y;
|
||
}
|
||
}
|
||
function xU(e) {
|
||
var t = e.velocity, n = e.bounds, i = e.setup, o = e.wrapperComponent, l = vU(e);
|
||
if (!(!l || !t || !n || !o)) {
|
||
var f = t.velocityX, h = t.velocityY, y = t.total, m = n.maxPositionX, x = n.minPositionX, b = n.maxPositionY, E = n.minPositionY, j = i.limitToBounds, M = i.alignmentAnimation, R = i.zoomAnimation, k = i.panning, A = k.lockAxisY, L = k.lockAxisX, z = R.animationType, I = M.sizeX, _ = M.sizeY, U = M.velocityAlignmentTime, B = U, q = mU(e, y), J = Math.max(q, B), G = Gg(e, I), H = Gg(e, _), le = G * o.offsetWidth / 100, ae = H * o.offsetHeight / 100, he = m + le, Te = x - le, xe = b + ae, $ = E - ae, Y = e.transformState, te = new Date().getTime();
|
||
wD(e, z, J, function(V) {
|
||
var ne = e.transformState, we = ne.scale, Ee = ne.positionX, se = ne.positionY, ve = new Date().getTime() - te, Ce = ve / B, Ae = bD[M.animationType], Ve = 1 - Ae(Math.min(1, Ce)), tt = 1 - V, at = Ee + f * tt, ze = se + h * tt, Qe = EE(at, Y.positionX, Ee, L, j, x, m, Te, he, Ve), Et = EE(ze, Y.positionY, se, A, j, E, b, $, xe, Ve);
|
||
(Ee !== at || se !== ze) && e.setTransformState(we, Qe, Et);
|
||
});
|
||
}
|
||
}
|
||
function jE(e, t) {
|
||
var n = e.transformState.scale;
|
||
$o(e), mf(e, n), window.TouchEvent !== void 0 && t instanceof TouchEvent ? cU(e, t) : uU(e, t);
|
||
}
|
||
function ED(e) {
|
||
var t = e.transformState.scale, n = e.setup, i = n.minScale, o = n.alignmentAnimation, l = o.disabled, f = o.sizeX, h = o.sizeY, y = o.animationTime, m = o.animationType, x = l || t < i || !f && !h;
|
||
if (!x) {
|
||
var b = dU(e);
|
||
b && $l(e, b, y, m);
|
||
}
|
||
}
|
||
function TE(e, t, n) {
|
||
var i = e.startCoords, o = e.setup, l = o.alignmentAnimation, f = l.sizeX, h = l.sizeY;
|
||
if (i) {
|
||
var y = pU(e, t, n), m = y.x, x = y.y, b = Gg(e, f), E = Gg(e, h);
|
||
yU(e, { x: m, y: x }), fU(e, m, x, b, E);
|
||
}
|
||
}
|
||
function SU(e) {
|
||
if (e.isPanning) {
|
||
var t = e.setup.panning.velocityDisabled, n = e.velocity, i = e.wrapperComponent, o = e.contentComponent;
|
||
e.isPanning = !1, e.animate = !1, e.animation = null;
|
||
var l = i == null ? void 0 : i.getBoundingClientRect(), f = o == null ? void 0 : o.getBoundingClientRect(), h = (l == null ? void 0 : l.width) || 0, y = (l == null ? void 0 : l.height) || 0, m = (f == null ? void 0 : f.width) || 0, x = (f == null ? void 0 : f.height) || 0, b = h < m || y < x, E = !t && n && (n == null ? void 0 : n.total) > 0.1 && b;
|
||
E ? xU(e) : ED(e);
|
||
}
|
||
}
|
||
function Cb(e, t, n, i) {
|
||
var o = e.setup, l = o.minScale, f = o.maxScale, h = o.limitToBounds, y = qh(Fi(t, 2), l, f, 0, !1), m = mf(e, y), x = b0(e, n, i, y, m, h), b = x.x, E = x.y;
|
||
return { scale: y, positionX: b, positionY: E };
|
||
}
|
||
function jD(e, t, n) {
|
||
var i = e.transformState.scale, o = e.wrapperComponent, l = e.setup, f = l.minScale, h = l.limitToBounds, y = l.zoomAnimation, m = y.disabled, x = y.animationTime, b = y.animationType, E = m || i >= f;
|
||
if ((i >= 1 || h) && ED(e), !(E || !o || !e.mounted)) {
|
||
var j = t || o.offsetWidth / 2, M = n || o.offsetHeight / 2, R = Cb(e, f, j, M);
|
||
R && $l(e, R, x, b);
|
||
}
|
||
}
|
||
var Vl = function() {
|
||
return Vl = Object.assign || function(t) {
|
||
for (var n, i = 1, o = arguments.length; i < o; i++) {
|
||
n = arguments[i];
|
||
for (var l in n)
|
||
Object.prototype.hasOwnProperty.call(n, l) && (t[l] = n[l]);
|
||
}
|
||
return t;
|
||
}, Vl.apply(this, arguments);
|
||
};
|
||
function DE(e, t, n) {
|
||
if (n || arguments.length === 2)
|
||
for (var i = 0, o = t.length, l; i < o; i++)
|
||
(l || !(i in t)) && (l || (l = Array.prototype.slice.call(t, 0, i)), l[i] = t[i]);
|
||
return e.concat(l || Array.prototype.slice.call(t));
|
||
}
|
||
var yg = {
|
||
previousScale: 1,
|
||
scale: 1,
|
||
positionX: 0,
|
||
positionY: 0
|
||
}, ih = {
|
||
disabled: !1,
|
||
minPositionX: null,
|
||
maxPositionX: null,
|
||
minPositionY: null,
|
||
maxPositionY: null,
|
||
minScale: 1,
|
||
maxScale: 8,
|
||
limitToBounds: !0,
|
||
centerZoomedOut: !1,
|
||
centerOnInit: !1,
|
||
disablePadding: !1,
|
||
wheel: {
|
||
step: 0.2,
|
||
disabled: !1,
|
||
wheelDisabled: !1,
|
||
touchPadDisabled: !1,
|
||
activationKeys: [],
|
||
excluded: []
|
||
},
|
||
panning: {
|
||
disabled: !1,
|
||
velocityDisabled: !1,
|
||
lockAxisX: !1,
|
||
lockAxisY: !1,
|
||
activationKeys: [],
|
||
excluded: []
|
||
},
|
||
pinch: {
|
||
step: 5,
|
||
disabled: !1,
|
||
excluded: []
|
||
},
|
||
doubleClick: {
|
||
disabled: !1,
|
||
step: 0.7,
|
||
mode: "zoomIn",
|
||
animationType: "easeOut",
|
||
animationTime: 200,
|
||
excluded: []
|
||
},
|
||
zoomAnimation: {
|
||
disabled: !1,
|
||
size: 0.4,
|
||
animationTime: 200,
|
||
animationType: "easeOut"
|
||
},
|
||
alignmentAnimation: {
|
||
disabled: !1,
|
||
sizeX: 100,
|
||
sizeY: 100,
|
||
animationTime: 200,
|
||
velocityAlignmentTime: 400,
|
||
animationType: "easeOut"
|
||
},
|
||
velocityAnimation: {
|
||
disabled: !1,
|
||
sensitivity: 1,
|
||
animationTime: 400,
|
||
animationType: "easeOut",
|
||
equalToMove: !0
|
||
}
|
||
}, TD = function(e) {
|
||
var t, n, i, o;
|
||
return {
|
||
previousScale: (t = e.initialScale) !== null && t !== void 0 ? t : yg.scale,
|
||
scale: (n = e.initialScale) !== null && n !== void 0 ? n : yg.scale,
|
||
positionX: (i = e.initialPositionX) !== null && i !== void 0 ? i : yg.positionX,
|
||
positionY: (o = e.initialPositionY) !== null && o !== void 0 ? o : yg.positionY
|
||
};
|
||
}, ME = function(e) {
|
||
var t = Vl({}, ih);
|
||
return Object.keys(e).forEach(function(n) {
|
||
var i = typeof e[n] < "u", o = typeof ih[n] < "u";
|
||
if (o && i) {
|
||
var l = Object.prototype.toString.call(ih[n]), f = l === "[object Object]", h = l === "[object Array]";
|
||
f ? t[n] = Vl(Vl({}, ih[n]), e[n]) : h ? t[n] = DE(DE([], ih[n], !0), e[n], !0) : t[n] = e[n];
|
||
}
|
||
}), t;
|
||
}, DD = function(e, t, n) {
|
||
var i = e.transformState.scale, o = e.wrapperComponent, l = e.setup, f = l.maxScale, h = l.minScale, y = l.zoomAnimation, m = y.size;
|
||
if (!o)
|
||
throw new Error("Wrapper is not mounted");
|
||
var x = i * Math.exp(t * n), b = qh(Fi(x, 3), h, f, m, !1);
|
||
return b;
|
||
};
|
||
function MD(e, t, n, i, o) {
|
||
var l = e.wrapperComponent, f = e.transformState, h = f.scale, y = f.positionX, m = f.positionY;
|
||
if (!l)
|
||
return console.error("No WrapperComponent found");
|
||
var x = l.offsetWidth, b = l.offsetHeight, E = (x / 2 - y) / h, j = (b / 2 - m) / h, M = DD(e, t, n), R = Cb(e, M, E, j);
|
||
if (!R)
|
||
return console.error("Error during zoom event. New transformation state was not calculated.");
|
||
$l(e, R, i, o);
|
||
}
|
||
function RD(e, t, n, i) {
|
||
var o = e.setup, l = e.wrapperComponent, f = o.limitToBounds, h = TD(e.props), y = e.transformState, m = y.scale, x = y.positionX, b = y.positionY;
|
||
if (l) {
|
||
var E = bb(e, h.scale), j = S0(h.positionX, h.positionY, E, f, 0, 0, l), M = {
|
||
scale: h.scale,
|
||
positionX: j.x,
|
||
positionY: j.y
|
||
};
|
||
m === h.scale && x === h.positionX && b === h.positionY || (i == null || i(), $l(e, M, t, n));
|
||
}
|
||
}
|
||
function bU(e, t, n, i) {
|
||
var o = e.getBoundingClientRect(), l = t.getBoundingClientRect(), f = n.getBoundingClientRect(), h = l.x * i.scale, y = l.y * i.scale;
|
||
return {
|
||
x: (o.x - f.x + h) / i.scale,
|
||
y: (o.y - f.y + y) / i.scale
|
||
};
|
||
}
|
||
function CU(e, t, n) {
|
||
var i = e.wrapperComponent, o = e.contentComponent, l = e.transformState, f = e.setup, h = f.limitToBounds, y = f.minScale, m = f.maxScale;
|
||
if (!i || !o)
|
||
return l;
|
||
var x = i.getBoundingClientRect(), b = t.getBoundingClientRect(), E = bU(t, i, o, l), j = E.x, M = E.y, R = b.width / l.scale, k = b.height / l.scale, A = i.offsetWidth / R, L = i.offsetHeight / k, z = qh(n || Math.min(A, L), y, m, 0, !1), I = (x.width - R * z) / 2, _ = (x.height - k * z) / 2, U = (x.left - j) * z + I, B = (x.top - M) * z + _, q = bb(e, z), J = S0(U, B, q, h, 0, 0, i), G = J.x, H = J.y;
|
||
return { positionX: G, positionY: H, scale: z };
|
||
}
|
||
var wU = function(e) {
|
||
return function(t, n, i) {
|
||
t === void 0 && (t = 0.5), n === void 0 && (n = 300), i === void 0 && (i = "easeOut"), MD(e, 1, t, n, i);
|
||
};
|
||
}, EU = function(e) {
|
||
return function(t, n, i) {
|
||
t === void 0 && (t = 0.5), n === void 0 && (n = 300), i === void 0 && (i = "easeOut"), MD(e, -1, t, n, i);
|
||
};
|
||
}, jU = function(e) {
|
||
return function(t, n, i, o, l) {
|
||
o === void 0 && (o = 300), l === void 0 && (l = "easeOut");
|
||
var f = e.transformState, h = f.positionX, y = f.positionY, m = f.scale, x = e.wrapperComponent, b = e.contentComponent, E = e.setup.disabled;
|
||
if (!(E || !x || !b)) {
|
||
var j = {
|
||
positionX: Number.isNaN(t) ? h : t,
|
||
positionY: Number.isNaN(n) ? y : n,
|
||
scale: Number.isNaN(i) ? m : i
|
||
};
|
||
$l(e, j, o, l);
|
||
}
|
||
};
|
||
}, TU = function(e) {
|
||
return function(t, n) {
|
||
t === void 0 && (t = 200), n === void 0 && (n = "easeOut"), RD(e, t, n);
|
||
};
|
||
}, DU = function(e) {
|
||
return function(t, n, i) {
|
||
n === void 0 && (n = 200), i === void 0 && (i = "easeOut");
|
||
var o = e.transformState, l = e.wrapperComponent, f = e.contentComponent;
|
||
if (l && f) {
|
||
var h = kD(t || o.scale, l, f);
|
||
$l(e, h, n, i);
|
||
}
|
||
};
|
||
}, MU = function(e) {
|
||
return function(t, n, i, o) {
|
||
i === void 0 && (i = 600), o === void 0 && (o = "easeOut"), $o(e);
|
||
var l = e.wrapperComponent, f = typeof t == "string" ? document.getElementById(t) : t;
|
||
if (l && f && l.contains(f)) {
|
||
var h = CU(e, f, n);
|
||
$l(e, h, i, o);
|
||
}
|
||
};
|
||
}, An = function(e) {
|
||
return {
|
||
instance: e,
|
||
state: e.transformState,
|
||
zoomIn: wU(e),
|
||
zoomOut: EU(e),
|
||
setTransform: jU(e),
|
||
resetTransform: TU(e),
|
||
centerView: DU(e),
|
||
zoomToElement: MU(e)
|
||
};
|
||
}, _2 = !1;
|
||
function U2() {
|
||
try {
|
||
var e = {
|
||
get passive() {
|
||
return _2 = !0, !1;
|
||
}
|
||
};
|
||
return e;
|
||
} catch {
|
||
return _2 = !1, _2;
|
||
}
|
||
}
|
||
var C0 = function(e, t) {
|
||
var n = e.tagName.toUpperCase(), i = t.find(function(l) {
|
||
return l.toUpperCase() === n;
|
||
});
|
||
if (i)
|
||
return !0;
|
||
var o = t.find(function(l) {
|
||
return e.classList.contains(l);
|
||
});
|
||
return !!o;
|
||
}, Bx = function(e) {
|
||
e && clearTimeout(e);
|
||
}, RU = function(e, t, n) {
|
||
return "translate(".concat(e, "px, ").concat(t, "px) scale(").concat(n, ")");
|
||
}, kD = function(e, t, n) {
|
||
var i = n.offsetWidth * e, o = n.offsetHeight * e, l = (t.offsetWidth - i) / 2, f = (t.offsetHeight - o) / 2;
|
||
return {
|
||
scale: e,
|
||
positionX: l,
|
||
positionY: f
|
||
};
|
||
};
|
||
function kU(e) {
|
||
return function(t) {
|
||
e.forEach(function(n) {
|
||
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
||
});
|
||
};
|
||
}
|
||
var PU = function(e, t) {
|
||
var n = e.setup.wheel, i = n.disabled, o = n.wheelDisabled, l = n.touchPadDisabled, f = n.excluded, h = e.isInitialized, y = e.isPanning, m = t.target, x = h && !y && !i && m;
|
||
if (!x || o && !t.ctrlKey || l && t.ctrlKey)
|
||
return !1;
|
||
var b = C0(m, f);
|
||
return !b;
|
||
}, OU = function(e) {
|
||
return e ? e.deltaY < 0 ? 1 : -1 : 0;
|
||
};
|
||
function AU(e, t) {
|
||
var n = OU(e), i = G_(t, n);
|
||
return i;
|
||
}
|
||
function PD(e, t, n) {
|
||
var i = t.getBoundingClientRect(), o = 0, l = 0;
|
||
if ("clientX" in e)
|
||
o = (e.clientX - i.left) / n, l = (e.clientY - i.top) / n;
|
||
else {
|
||
var f = e.touches[0];
|
||
o = (f.clientX - i.left) / n, l = (f.clientY - i.top) / n;
|
||
}
|
||
return (Number.isNaN(o) || Number.isNaN(l)) && console.error("No mouse or touch offset found"), {
|
||
x: o,
|
||
y: l
|
||
};
|
||
}
|
||
var NU = function(e, t, n, i, o) {
|
||
var l = e.transformState.scale, f = e.wrapperComponent, h = e.setup, y = h.maxScale, m = h.minScale, x = h.zoomAnimation, b = h.disablePadding, E = x.size, j = x.disabled;
|
||
if (!f)
|
||
throw new Error("Wrapper is not mounted");
|
||
var M = l + t * (l - l * n) * n;
|
||
if (o)
|
||
return M;
|
||
var R = i ? !1 : !j, k = qh(Fi(M, 3), m, y, E, R && !b);
|
||
return k;
|
||
}, zU = function(e, t) {
|
||
var n = e.previousWheelEvent, i = e.transformState.scale, o = e.setup, l = o.maxScale, f = o.minScale;
|
||
return n ? i < l || i > f || Math.sign(n.deltaY) !== Math.sign(t.deltaY) || n.deltaY > 0 && n.deltaY < t.deltaY || n.deltaY < 0 && n.deltaY > t.deltaY || Math.sign(n.deltaY) !== Math.sign(t.deltaY) : !1;
|
||
}, IU = function(e, t) {
|
||
var n = e.setup.pinch, i = n.disabled, o = n.excluded, l = e.isInitialized, f = t.target, h = l && !i && f;
|
||
if (!h)
|
||
return !1;
|
||
var y = C0(f, o);
|
||
return !y;
|
||
}, LU = function(e) {
|
||
var t = e.setup.pinch.disabled, n = e.isInitialized, i = e.pinchStartDistance, o = n && !t && i;
|
||
return !!o;
|
||
}, FU = function(e, t, n) {
|
||
var i = n.getBoundingClientRect(), o = e.touches, l = Fi(o[0].clientX - i.left, 5), f = Fi(o[0].clientY - i.top, 5), h = Fi(o[1].clientX - i.left, 5), y = Fi(o[1].clientY - i.top, 5);
|
||
return {
|
||
x: (l + h) / 2 / t,
|
||
y: (f + y) / 2 / t
|
||
};
|
||
}, OD = function(e) {
|
||
return Math.sqrt(Math.pow(e.touches[0].pageX - e.touches[1].pageX, 2) + Math.pow(e.touches[0].pageY - e.touches[1].pageY, 2));
|
||
}, BU = function(e, t) {
|
||
var n = e.pinchStartScale, i = e.pinchStartDistance, o = e.setup, l = o.maxScale, f = o.minScale, h = o.zoomAnimation, y = o.disablePadding, m = h.size, x = h.disabled;
|
||
if (!n || i === null || !t)
|
||
throw new Error("Pinch touches distance was not provided");
|
||
if (t < 0)
|
||
return e.transformState.scale;
|
||
var b = t / i, E = b * n;
|
||
return qh(Fi(E, 2), f, l, m, !x && !y);
|
||
}, _U = 160, UU = 100, HU = function(e, t) {
|
||
var n = e.props, i = n.onWheelStart, o = n.onZoomStart;
|
||
e.wheelStopEventTimer || ($o(e), Zn(An(e), t, i), Zn(An(e), t, o));
|
||
}, VU = function(e, t) {
|
||
var n = e.props, i = n.onWheel, o = n.onZoom, l = e.contentComponent, f = e.setup, h = e.transformState, y = h.scale, m = f.limitToBounds, x = f.centerZoomedOut, b = f.zoomAnimation, E = f.wheel, j = f.disablePadding, M = b.size, R = b.disabled, k = E.step;
|
||
if (!l)
|
||
throw new Error("Component not mounted");
|
||
t.preventDefault(), t.stopPropagation();
|
||
var A = AU(t, null), L = NU(e, A, k, !t.ctrlKey);
|
||
if (y !== L) {
|
||
var z = mf(e, L), I = PD(t, l, y), _ = R || M === 0 || x || j, U = m && _, B = b0(e, I.x, I.y, L, z, U), q = B.x, J = B.y;
|
||
e.previousWheelEvent = t, e.setTransformState(L, q, J), Zn(An(e), t, i), Zn(An(e), t, o);
|
||
}
|
||
}, WU = function(e, t) {
|
||
var n = e.props, i = n.onWheelStop, o = n.onZoomStop;
|
||
Bx(e.wheelAnimationTimer), e.wheelAnimationTimer = setTimeout(function() {
|
||
e.mounted && (jD(e, t.x, t.y), e.wheelAnimationTimer = null);
|
||
}, UU);
|
||
var l = zU(e, t);
|
||
l && (Bx(e.wheelStopEventTimer), e.wheelStopEventTimer = setTimeout(function() {
|
||
e.mounted && (e.wheelStopEventTimer = null, Zn(An(e), t, i), Zn(An(e), t, o));
|
||
}, _U));
|
||
}, GU = function(e, t) {
|
||
var n = OD(t);
|
||
e.pinchStartDistance = n, e.lastDistance = n, e.pinchStartScale = e.transformState.scale, e.isPanning = !1, $o(e);
|
||
}, qU = function(e, t) {
|
||
var n = e.contentComponent, i = e.pinchStartDistance, o = e.transformState.scale, l = e.setup, f = l.limitToBounds, h = l.centerZoomedOut, y = l.zoomAnimation, m = y.disabled, x = y.size;
|
||
if (!(i === null || !n)) {
|
||
var b = FU(t, o, n);
|
||
if (!(!Number.isFinite(b.x) || !Number.isFinite(b.y))) {
|
||
var E = OD(t), j = BU(e, E);
|
||
if (j !== o) {
|
||
var M = mf(e, j), R = m || x === 0 || h, k = f && R, A = b0(e, b.x, b.y, j, M, k), L = A.x, z = A.y;
|
||
e.pinchMidpoint = b, e.lastDistance = E, e.setTransformState(j, L, z);
|
||
}
|
||
}
|
||
}
|
||
}, YU = function(e) {
|
||
var t = e.pinchMidpoint;
|
||
e.velocity = null, e.lastDistance = null, e.pinchMidpoint = null, e.pinchStartScale = null, e.pinchStartDistance = null, jD(e, t == null ? void 0 : t.x, t == null ? void 0 : t.y);
|
||
}, AD = function(e, t) {
|
||
var n = e.props.onZoomStop, i = e.setup.doubleClick.animationTime;
|
||
Bx(e.doubleClickStopEventTimer), e.doubleClickStopEventTimer = setTimeout(function() {
|
||
e.doubleClickStopEventTimer = null, Zn(An(e), t, n);
|
||
}, i);
|
||
}, QU = function(e, t) {
|
||
var n = e.props, i = n.onZoomStart, o = n.onZoom, l = e.setup.doubleClick, f = l.animationTime, h = l.animationType;
|
||
Zn(An(e), t, i), RD(e, f, h, function() {
|
||
return Zn(An(e), t, o);
|
||
}), AD(e, t);
|
||
};
|
||
function XU(e, t) {
|
||
var n = e.setup, i = e.doubleClickStopEventTimer, o = e.transformState, l = e.contentComponent, f = o.scale, h = e.props, y = h.onZoomStart, m = h.onZoom, x = n.doubleClick, b = x.disabled, E = x.mode, j = x.step, M = x.animationTime, R = x.animationType;
|
||
if (!b && !i) {
|
||
if (E === "reset")
|
||
return QU(e, t);
|
||
if (!l)
|
||
return console.error("No ContentComponent found");
|
||
var k = E === "zoomOut" ? -1 : 1, A = DD(e, k, j);
|
||
if (f !== A) {
|
||
Zn(An(e), t, y);
|
||
var L = PD(t, l, f), z = Cb(e, A, L.x, L.y);
|
||
if (!z)
|
||
return console.error("Error during zoom event. New transformation state was not calculated.");
|
||
Zn(An(e), t, m), $l(e, z, M, R), AD(e, t);
|
||
}
|
||
}
|
||
}
|
||
var KU = function(e, t) {
|
||
var n = e.isInitialized, i = e.setup, o = e.wrapperComponent, l = i.doubleClick, f = l.disabled, h = l.excluded, y = t.target, m = o == null ? void 0 : o.contains(y), x = n && y && m && !f;
|
||
if (!x)
|
||
return !1;
|
||
var b = C0(y, h);
|
||
return !b;
|
||
}, ZU = (
|
||
/** @class */
|
||
function() {
|
||
function e(t) {
|
||
var n = this;
|
||
this.mounted = !0, this.onChangeCallbacks = /* @__PURE__ */ new Set(), this.wrapperComponent = null, this.contentComponent = null, this.isInitialized = !1, this.bounds = null, this.previousWheelEvent = null, this.wheelStopEventTimer = null, this.wheelAnimationTimer = null, this.isPanning = !1, this.startCoords = null, this.lastTouch = null, this.distance = null, this.lastDistance = null, this.pinchStartDistance = null, this.pinchStartScale = null, this.pinchMidpoint = null, this.doubleClickStopEventTimer = null, this.velocity = null, this.velocityTime = null, this.lastMousePosition = null, this.animate = !1, this.animation = null, this.maxBounds = null, this.pressedKeys = {}, this.mount = function() {
|
||
n.initializeWindowEvents();
|
||
}, this.unmount = function() {
|
||
n.cleanupWindowEvents();
|
||
}, this.update = function(i) {
|
||
mf(n, n.transformState.scale), n.setup = ME(i);
|
||
}, this.initializeWindowEvents = function() {
|
||
var i, o = U2(), l = (i = n.wrapperComponent) === null || i === void 0 ? void 0 : i.ownerDocument, f = l == null ? void 0 : l.defaultView;
|
||
f == null || f.addEventListener("mousedown", n.onPanningStart, o), f == null || f.addEventListener("mousemove", n.onPanning, o), f == null || f.addEventListener("mouseup", n.onPanningStop, o), l == null || l.addEventListener("mouseleave", n.clearPanning, o), f == null || f.addEventListener("keyup", n.setKeyUnPressed, o), f == null || f.addEventListener("keydown", n.setKeyPressed, o);
|
||
}, this.cleanupWindowEvents = function() {
|
||
var i, o, l = U2(), f = (i = n.wrapperComponent) === null || i === void 0 ? void 0 : i.ownerDocument, h = f == null ? void 0 : f.defaultView;
|
||
h == null || h.removeEventListener("mousedown", n.onPanningStart, l), h == null || h.removeEventListener("mousemove", n.onPanning, l), h == null || h.removeEventListener("mouseup", n.onPanningStop, l), f == null || f.removeEventListener("mouseleave", n.clearPanning, l), h == null || h.removeEventListener("keyup", n.setKeyUnPressed, l), h == null || h.removeEventListener("keydown", n.setKeyPressed, l), document.removeEventListener("mouseleave", n.clearPanning, l), $o(n), (o = n.observer) === null || o === void 0 || o.disconnect();
|
||
}, this.handleInitializeWrapperEvents = function(i) {
|
||
var o = U2();
|
||
i.addEventListener("wheel", n.onWheelZoom, o), i.addEventListener("dblclick", n.onDoubleClick, o), i.addEventListener("touchstart", n.onTouchPanningStart, o), i.addEventListener("touchmove", n.onTouchPanning, o), i.addEventListener("touchend", n.onTouchPanningStop, o);
|
||
}, this.handleInitialize = function(i) {
|
||
var o = n.setup.centerOnInit;
|
||
n.applyTransformation(), o && (n.setCenter(), n.observer = new ResizeObserver(function() {
|
||
var l;
|
||
n.setCenter(), (l = n.observer) === null || l === void 0 || l.disconnect();
|
||
}), n.observer.observe(i));
|
||
}, this.onWheelZoom = function(i) {
|
||
var o = n.setup.disabled;
|
||
if (!o) {
|
||
var l = PU(n, i);
|
||
if (l) {
|
||
var f = n.isPressingKeys(n.setup.wheel.activationKeys);
|
||
f && (HU(n, i), VU(n, i), WU(n, i));
|
||
}
|
||
}
|
||
}, this.onPanningStart = function(i) {
|
||
var o = n.setup.disabled, l = n.props.onPanningStart;
|
||
if (!o) {
|
||
var f = CE(n, i);
|
||
if (f) {
|
||
var h = n.isPressingKeys(n.setup.panning.activationKeys);
|
||
h && (i.preventDefault(), i.stopPropagation(), $o(n), jE(n, i), Zn(An(n), i, l));
|
||
}
|
||
}
|
||
}, this.onPanning = function(i) {
|
||
var o = n.setup.disabled, l = n.props.onPanning;
|
||
if (!o) {
|
||
var f = wE(n);
|
||
if (f) {
|
||
var h = n.isPressingKeys(n.setup.panning.activationKeys);
|
||
h && (i.preventDefault(), i.stopPropagation(), TE(n, i.clientX, i.clientY), Zn(An(n), i, l));
|
||
}
|
||
}
|
||
}, this.onPanningStop = function(i) {
|
||
var o = n.props.onPanningStop;
|
||
n.isPanning && (SU(n), Zn(An(n), i, o));
|
||
}, this.onPinchStart = function(i) {
|
||
var o = n.setup.disabled, l = n.props, f = l.onPinchingStart, h = l.onZoomStart;
|
||
if (!o) {
|
||
var y = IU(n, i);
|
||
y && (GU(n, i), $o(n), Zn(An(n), i, f), Zn(An(n), i, h));
|
||
}
|
||
}, this.onPinch = function(i) {
|
||
var o = n.setup.disabled, l = n.props, f = l.onPinching, h = l.onZoom;
|
||
if (!o) {
|
||
var y = LU(n);
|
||
y && (i.preventDefault(), i.stopPropagation(), qU(n, i), Zn(An(n), i, f), Zn(An(n), i, h));
|
||
}
|
||
}, this.onPinchStop = function(i) {
|
||
var o = n.props, l = o.onPinchingStop, f = o.onZoomStop;
|
||
n.pinchStartScale && (YU(n), Zn(An(n), i, l), Zn(An(n), i, f));
|
||
}, this.onTouchPanningStart = function(i) {
|
||
var o = n.setup.disabled, l = n.props.onPanningStart;
|
||
if (!o) {
|
||
var f = CE(n, i);
|
||
if (f) {
|
||
var h = n.lastTouch && +new Date() - n.lastTouch < 200;
|
||
if (h && i.touches.length === 1)
|
||
n.onDoubleClick(i);
|
||
else {
|
||
n.lastTouch = +new Date(), $o(n);
|
||
var y = i.touches, m = y.length === 1, x = y.length === 2;
|
||
m && ($o(n), jE(n, i), Zn(An(n), i, l)), x && n.onPinchStart(i);
|
||
}
|
||
}
|
||
}
|
||
}, this.onTouchPanning = function(i) {
|
||
var o = n.setup.disabled, l = n.props.onPanning;
|
||
if (n.isPanning && i.touches.length === 1) {
|
||
if (o)
|
||
return;
|
||
var f = wE(n);
|
||
if (!f)
|
||
return;
|
||
i.preventDefault(), i.stopPropagation();
|
||
var h = i.touches[0];
|
||
TE(n, h.clientX, h.clientY), Zn(An(n), i, l);
|
||
} else
|
||
i.touches.length > 1 && n.onPinch(i);
|
||
}, this.onTouchPanningStop = function(i) {
|
||
n.onPanningStop(i), n.onPinchStop(i);
|
||
}, this.onDoubleClick = function(i) {
|
||
var o = n.setup.disabled;
|
||
if (!o) {
|
||
var l = KU(n, i);
|
||
l && XU(n, i);
|
||
}
|
||
}, this.clearPanning = function(i) {
|
||
n.isPanning && n.onPanningStop(i);
|
||
}, this.setKeyPressed = function(i) {
|
||
n.pressedKeys[i.key] = !0;
|
||
}, this.setKeyUnPressed = function(i) {
|
||
n.pressedKeys[i.key] = !1;
|
||
}, this.isPressingKeys = function(i) {
|
||
return i.length ? Boolean(i.find(function(o) {
|
||
return n.pressedKeys[o];
|
||
})) : !0;
|
||
}, this.setTransformState = function(i, o, l) {
|
||
var f = n.props.onTransformed;
|
||
if (!Number.isNaN(i) && !Number.isNaN(o) && !Number.isNaN(l)) {
|
||
i !== n.transformState.scale && (n.transformState.previousScale = n.transformState.scale, n.transformState.scale = i), n.transformState.positionX = o, n.transformState.positionY = l;
|
||
var h = An(n);
|
||
n.onChangeCallbacks.forEach(function(y) {
|
||
return y(h);
|
||
}), Zn(h, { scale: i, positionX: o, positionY: l }, f), n.applyTransformation();
|
||
} else
|
||
console.error("Detected NaN set state values");
|
||
}, this.setCenter = function() {
|
||
if (n.wrapperComponent && n.contentComponent) {
|
||
var i = kD(n.transformState.scale, n.wrapperComponent, n.contentComponent);
|
||
n.setTransformState(i.scale, i.positionX, i.positionY);
|
||
}
|
||
}, this.handleTransformStyles = function(i, o, l) {
|
||
return n.props.customTransform ? n.props.customTransform(i, o, l) : RU(i, o, l);
|
||
}, this.applyTransformation = function() {
|
||
if (!(!n.mounted || !n.contentComponent)) {
|
||
var i = n.transformState, o = i.scale, l = i.positionX, f = i.positionY, h = n.handleTransformStyles(l, f, o);
|
||
n.contentComponent.style.transform = h;
|
||
}
|
||
}, this.getContext = function() {
|
||
return An(n);
|
||
}, this.onChange = function(i) {
|
||
return n.onChangeCallbacks.has(i) || n.onChangeCallbacks.add(i), function() {
|
||
n.onChangeCallbacks.delete(i);
|
||
};
|
||
}, this.init = function(i, o) {
|
||
n.cleanupWindowEvents(), n.wrapperComponent = i, n.contentComponent = o, mf(n, n.transformState.scale), n.handleInitializeWrapperEvents(i), n.handleInitialize(o), n.initializeWindowEvents(), n.isInitialized = !0, Zn(An(n), void 0, n.props.onInit);
|
||
}, this.props = t, this.setup = ME(this.props), this.transformState = TD(this.props);
|
||
}
|
||
return e;
|
||
}()
|
||
), w0 = pt.createContext(null), JU = function(e, t) {
|
||
return typeof e == "function" ? e(t) : e;
|
||
}, $U = pt.forwardRef(function(e, t) {
|
||
var n = qe(0), i = n[1], o = e.children, l = He(new ZU(e)).current, f = JU(e.children, An(l)), h = Q(function() {
|
||
typeof o == "function" && i(function(y) {
|
||
return y + 1;
|
||
});
|
||
}, [o]);
|
||
return oS(t, function() {
|
||
return An(l);
|
||
}, [l]), rt(function() {
|
||
l.update(e);
|
||
}, [l, e]), rt(function() {
|
||
return l.onChange(h);
|
||
}, [l, e, h]), pt.createElement(w0.Provider, { value: l }, f);
|
||
});
|
||
function eH(e, t) {
|
||
t === void 0 && (t = {});
|
||
var n = t.insertAt;
|
||
if (!(!e || typeof document > "u")) {
|
||
var i = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
|
||
o.type = "text/css", n === "top" && i.firstChild ? i.insertBefore(o, i.firstChild) : i.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
|
||
}
|
||
}
|
||
var tH = `.transform-component-module_wrapper__7HFJe {
|
||
position: relative;
|
||
width: -moz-fit-content;
|
||
width: fit-content;
|
||
height: -moz-fit-content;
|
||
height: fit-content;
|
||
overflow: hidden;
|
||
-webkit-touch-callout: none; /* iOS Safari */
|
||
-webkit-user-select: none; /* Safari */
|
||
-khtml-user-select: none; /* Konqueror HTML */
|
||
-moz-user-select: none; /* Firefox */
|
||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||
user-select: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
.transform-component-module_content__uCDPE {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
width: -moz-fit-content;
|
||
width: fit-content;
|
||
height: -moz-fit-content;
|
||
height: fit-content;
|
||
margin: 0;
|
||
padding: 0;
|
||
transform-origin: 0% 0%;
|
||
}
|
||
.transform-component-module_content__uCDPE img {
|
||
pointer-events: none;
|
||
}
|
||
`, RE = { wrapper: "transform-component-module_wrapper__7HFJe", content: "transform-component-module_content__uCDPE" };
|
||
eH(tH);
|
||
var nH = function(e) {
|
||
var t = e.children, n = e.wrapperClass, i = n === void 0 ? "" : n, o = e.contentClass, l = o === void 0 ? "" : o, f = e.wrapperStyle, h = e.contentStyle, y = e.wrapperProps, m = y === void 0 ? {} : y, x = e.contentProps, b = x === void 0 ? {} : x, E = Zl(w0).init, j = He(null), M = He(null);
|
||
return rt(function() {
|
||
var R = j.current, k = M.current;
|
||
R !== null && k !== null && E && E(R, k);
|
||
}, []), pt.createElement(
|
||
"div",
|
||
Vl({}, m, { ref: j, className: "react-transform-wrapper ".concat(RE.wrapper, " ").concat(i), style: f }),
|
||
pt.createElement("div", Vl({}, b, { ref: M, className: "react-transform-component ".concat(RE.content, " ").concat(l), style: h }), t)
|
||
);
|
||
}, ND = function() {
|
||
var e = Zl(w0), t = qe(An(e || {})), n = t[0], i = t[1];
|
||
if (!e)
|
||
throw new Error("Transform context mus be placed inside TransformWrapper");
|
||
return rt(function() {
|
||
e.onChange(function(o) {
|
||
i(o);
|
||
});
|
||
}, [e]), n;
|
||
};
|
||
pt.forwardRef(function(e, t) {
|
||
var n = He(null), i = Zl(w0);
|
||
return rt(function() {
|
||
return i.onChange(function(o) {
|
||
if (n.current) {
|
||
var l = 0, f = 0;
|
||
n.current.style.transform = i.handleTransformStyles(l, f, 1 / o.state.scale);
|
||
}
|
||
});
|
||
}, [i]), pt.createElement("div", Vl({}, e, { ref: kU([n, t]) }));
|
||
});
|
||
const rH = () => {
|
||
const [e, t] = qe(0), [n, i] = qe(1), [o, l] = qe(1);
|
||
return {
|
||
rotation: e,
|
||
scaleX: n,
|
||
scaleY: o,
|
||
flipHorizontally: () => {
|
||
i(n * -1);
|
||
},
|
||
flipVertically: () => {
|
||
l(o * -1);
|
||
},
|
||
rotateCounterClockwise: () => {
|
||
t(e === -270 ? 0 : e - 90);
|
||
},
|
||
rotateClockwise: () => {
|
||
t(e === 270 ? 0 : e + 90);
|
||
},
|
||
reset: () => {
|
||
t(0), i(1), l(1);
|
||
}
|
||
};
|
||
}, aH = ({
|
||
flipHorizontally: e,
|
||
flipVertically: t,
|
||
rotateCounterClockwise: n,
|
||
rotateClockwise: i,
|
||
reset: o
|
||
}) => {
|
||
const { zoomIn: l, zoomOut: f, resetTransform: h } = ND();
|
||
return /* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, orientation: "vertical", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(eB, {}),
|
||
"aria-label": "Zoom In",
|
||
tooltip: "Zoom In",
|
||
onClick: () => l(),
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(tB, {}),
|
||
"aria-label": "Zoom Out",
|
||
tooltip: "Zoom Out",
|
||
onClick: () => f(),
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(JF, {}),
|
||
"aria-label": "Rotate Counter-Clockwise",
|
||
tooltip: "Rotate Counter-Clockwise",
|
||
onClick: n,
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx($F, {}),
|
||
"aria-label": "Rotate Clockwise",
|
||
tooltip: "Rotate Clockwise",
|
||
onClick: i,
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(hE, {}),
|
||
"aria-label": "Flip Horizontally",
|
||
tooltip: "Flip Horizontally",
|
||
onClick: e,
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(hE, { style: { transform: "rotate(90deg)" } }),
|
||
"aria-label": "Flip Vertically",
|
||
tooltip: "Flip Vertically",
|
||
onClick: t,
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(sb, {}),
|
||
"aria-label": "Reset",
|
||
tooltip: "Reset",
|
||
onClick: () => {
|
||
h(), o();
|
||
},
|
||
fontSize: 20
|
||
}
|
||
)
|
||
] });
|
||
};
|
||
function iH({
|
||
image: e,
|
||
alt: t,
|
||
ref: n,
|
||
styleClass: i,
|
||
rotation: o,
|
||
scaleX: l,
|
||
scaleY: f
|
||
}) {
|
||
const { centerView: h } = ND();
|
||
return /* @__PURE__ */ c.jsx(
|
||
nH,
|
||
{
|
||
wrapperStyle: {
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
"img",
|
||
{
|
||
style: {
|
||
transform: `rotate(${o}deg) scaleX(${l}) scaleY(${f})`,
|
||
width: "100%"
|
||
},
|
||
src: e,
|
||
alt: t,
|
||
ref: n,
|
||
className: i || "",
|
||
onLoad: () => h(1, 0, "easeOut")
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
const oH = ct(
|
||
[Gs, vc],
|
||
(e, t) => {
|
||
const { currentImage: n } = e, { shouldShowImageDetails: i } = t;
|
||
return {
|
||
viewerImageToDisplay: n,
|
||
shouldShowImageDetails: i
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function sH() {
|
||
const e = je(), t = Z(
|
||
(E) => E.lightbox.isLightboxOpen
|
||
), {
|
||
rotation: n,
|
||
scaleX: i,
|
||
scaleY: o,
|
||
flipHorizontally: l,
|
||
flipVertically: f,
|
||
rotateCounterClockwise: h,
|
||
rotateClockwise: y,
|
||
reset: m
|
||
} = rH(), { viewerImageToDisplay: x, shouldShowImageDetails: b } = Z(oH);
|
||
return Ze(
|
||
"Esc",
|
||
() => {
|
||
t && e(Ku(!1));
|
||
},
|
||
[t]
|
||
), /* @__PURE__ */ c.jsx(
|
||
$U,
|
||
{
|
||
centerOnInit: !0,
|
||
minScale: 0.1,
|
||
initialPositionX: 50,
|
||
initialPositionY: 50,
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
overflow: "hidden",
|
||
position: "absolute",
|
||
insetInlineStart: 0,
|
||
top: 0,
|
||
zIndex: 30,
|
||
animation: "popIn 0.3s ease-in",
|
||
bg: "base.800"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDir: "column",
|
||
position: "absolute",
|
||
top: 4,
|
||
insetInlineStart: 4,
|
||
gap: 4,
|
||
zIndex: 3
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(ZF, {}),
|
||
"aria-label": "Exit Viewer",
|
||
onClick: () => {
|
||
e(Ku(!1));
|
||
},
|
||
fontSize: 20
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
aH,
|
||
{
|
||
flipHorizontally: l,
|
||
flipVertically: f,
|
||
rotateCounterClockwise: h,
|
||
rotateClockwise: y,
|
||
reset: m
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(ce, { children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
_i,
|
||
{
|
||
sx: {
|
||
overflow: "hidden",
|
||
gridTemplateColumns: "auto max-content",
|
||
placeItems: "center",
|
||
width: "100vw",
|
||
height: "100vh",
|
||
bg: "base.850"
|
||
},
|
||
children: [
|
||
x && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
iH,
|
||
{
|
||
rotation: n,
|
||
scaleX: i,
|
||
scaleY: o,
|
||
image: x.url,
|
||
styleClass: "lightbox-image"
|
||
}
|
||
),
|
||
b && /* @__PURE__ */ c.jsx(Sb, { image: x })
|
||
] }),
|
||
!b && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
position: "absolute",
|
||
top: 0,
|
||
insetInlineStart: 0,
|
||
w: `calc(100vw - ${8 * 2 * 4}px)`,
|
||
h: "100vh",
|
||
mx: 8,
|
||
pointerEvents: "none"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(SD, {})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
position: "absolute",
|
||
top: 4
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(uD, {})
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(yD, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}
|
||
function lH(e) {
|
||
const {
|
||
menuType: t = "icon",
|
||
iconTooltip: n,
|
||
buttonText: i,
|
||
isLazy: o = !0,
|
||
menuItems: l,
|
||
menuProps: f,
|
||
menuButtonProps: h,
|
||
menuListProps: y,
|
||
menuItemProps: m
|
||
} = e, x = () => {
|
||
const b = [];
|
||
return l.forEach((E, j) => {
|
||
b.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Ko,
|
||
{
|
||
onClick: E.onClick,
|
||
fontSize: "sm",
|
||
...m,
|
||
children: E.item
|
||
},
|
||
j
|
||
)
|
||
);
|
||
}), b;
|
||
};
|
||
return /* @__PURE__ */ c.jsx(VS, { ...f, isLazy: o, children: ({ isOpen: b }) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
GS,
|
||
{
|
||
as: t === "icon" ? Wl : pc,
|
||
tooltip: n,
|
||
"aria-label": n,
|
||
icon: b ? /* @__PURE__ */ c.jsx(C_, {}) : /* @__PURE__ */ c.jsx(b_, {}),
|
||
paddingX: 0,
|
||
paddingY: t === "regular" ? 2 : 0,
|
||
...h,
|
||
children: t === "regular" && i
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(WS, { zIndex: 15, padding: 0, ...y, children: x() })
|
||
] }) });
|
||
}
|
||
const uH = ct(
|
||
Xn,
|
||
(e) => ({
|
||
isProcessing: e.isProcessing,
|
||
isConnected: e.isConnected,
|
||
isCancelable: e.isCancelable,
|
||
currentIteration: e.currentIteration,
|
||
totalIterations: e.totalIterations,
|
||
cancelType: e.cancelOptions.cancelType,
|
||
cancelAfter: e.cancelOptions.cancelAfter
|
||
}),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function wb(e) {
|
||
const t = je(), { btnGroupWidth: n = "auto", ...i } = e, {
|
||
isProcessing: o,
|
||
isConnected: l,
|
||
isCancelable: f,
|
||
currentIteration: h,
|
||
totalIterations: y,
|
||
cancelType: m,
|
||
cancelAfter: x
|
||
} = Z(uH), b = Q(() => {
|
||
t(QR()), t(l2(null));
|
||
}, [t]), { t: E } = Pe(), j = x !== null;
|
||
Ze(
|
||
"shift+x",
|
||
() => {
|
||
(l || o) && f && b();
|
||
},
|
||
[l, o, f]
|
||
), rt(() => {
|
||
x !== null && x < h && b();
|
||
}, [x, h, b]);
|
||
const M = [
|
||
{
|
||
item: E("parameters.cancel.immediate"),
|
||
onClick: () => t(W3("immediate"))
|
||
},
|
||
{
|
||
item: E("parameters.cancel.schedule"),
|
||
onClick: () => t(W3("scheduled"))
|
||
}
|
||
];
|
||
return /* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, width: n, children: [
|
||
m === "immediate" ? /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(w_, {}),
|
||
tooltip: E("parameters.cancel.immediate"),
|
||
"aria-label": E("parameters.cancel.immediate"),
|
||
isDisabled: !l || !o || !f,
|
||
onClick: b,
|
||
colorScheme: "error",
|
||
...i
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: j ? /* @__PURE__ */ c.jsx(Fg, {}) : /* @__PURE__ */ c.jsx(f_, {}),
|
||
tooltip: E(j ? "parameters.cancel.isScheduled" : "parameters.cancel.schedule"),
|
||
"aria-label": E(j ? "parameters.cancel.isScheduled" : "parameters.cancel.schedule"),
|
||
isDisabled: !l || !o || !f || h === y,
|
||
onClick: () => {
|
||
t(j ? l2(null) : l2(h));
|
||
},
|
||
colorScheme: "error",
|
||
...i
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
lH,
|
||
{
|
||
menuItems: M,
|
||
iconTooltip: E("parameters.cancel.setType"),
|
||
menuButtonProps: {
|
||
colorScheme: "error",
|
||
minWidth: 5
|
||
}
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
const Eb = (e) => e.generation;
|
||
ct(
|
||
Eb,
|
||
({ shouldRandomizeSeed: e, shouldGenerateVariations: t }) => e || t,
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
const zD = ct(
|
||
[
|
||
Eb,
|
||
Xn,
|
||
lD,
|
||
Sr
|
||
],
|
||
(e, t, n, i) => {
|
||
const {
|
||
prompt: o,
|
||
shouldGenerateVariations: l,
|
||
seedWeights: f,
|
||
initialImage: h,
|
||
seed: y
|
||
} = e, { isProcessing: m, isConnected: x } = t;
|
||
let b = !0;
|
||
const E = [];
|
||
return (!o || Boolean(o.match(/^[\s\r\n]+$/))) && (b = !1, E.push("Missing prompt")), i === "img2img" && !h && (b = !1, E.push("No initial image selected")), m && (b = !1, E.push("System Busy")), x || (b = !1, E.push("System Disconnected")), l && (!(p6(f) || f === "") || y === -1) && (b = !1, E.push("Seed-Weights badly formatted.")), { isReady: b, reasonsWhyNotReady: E };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
equalityCheck: Ie.isEqual,
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function jb(e) {
|
||
const { iconButton: t = !1, ...n } = e, i = je(), { isReady: o } = Z(zD), l = Z(Sr), f = () => {
|
||
i(dx(l));
|
||
}, { t: h } = Pe();
|
||
return Ze(
|
||
["ctrl+enter", "meta+enter"],
|
||
() => {
|
||
i(h6()), i(dx(l));
|
||
},
|
||
{
|
||
enabled: () => o,
|
||
preventDefault: !0,
|
||
enableOnFormTags: ["input", "textarea", "select"]
|
||
},
|
||
[o, l]
|
||
), /* @__PURE__ */ c.jsx(Ut, { style: { flexGrow: 4 }, children: t ? /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": h("parameters.invoke"),
|
||
type: "submit",
|
||
icon: /* @__PURE__ */ c.jsx(WB, {}),
|
||
isDisabled: !o,
|
||
onClick: f,
|
||
flexGrow: 1,
|
||
w: "100%",
|
||
tooltip: h("parameters.invoke"),
|
||
tooltipProps: { placement: "bottom" },
|
||
colorScheme: "accent",
|
||
...n
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
"aria-label": h("parameters.invoke"),
|
||
type: "submit",
|
||
isDisabled: !o,
|
||
onClick: f,
|
||
flexGrow: 1,
|
||
w: "100%",
|
||
colorScheme: "accent",
|
||
fontWeight: 700,
|
||
...n,
|
||
children: "Invoke"
|
||
}
|
||
) });
|
||
}
|
||
const H2 = {
|
||
borderStartStartRadius: 0,
|
||
borderEndStartRadius: 0
|
||
}, Tb = ct(
|
||
[Gs, vc, Sr],
|
||
(e, t, n) => {
|
||
const {
|
||
shouldPinParametersPanel: i,
|
||
shouldShowParametersPanel: o,
|
||
shouldHoldParametersPanelOpen: l,
|
||
shouldUseCanvasBetaLayout: f
|
||
} = t, { shouldShowGallery: h, shouldPinGallery: y, shouldHoldGalleryOpen: m } = e, x = f && n === "unifiedCanvas", b = !x && !(o || l && !i) && ["txt2img", "img2img", "unifiedCanvas"].includes(n), E = !(h || m && !y) && ["txt2img", "img2img", "unifiedCanvas"].includes(n);
|
||
return {
|
||
shouldPinParametersPanel: i,
|
||
shouldShowProcessButtons: !x && (!i || !o),
|
||
shouldShowParametersPanelButton: b,
|
||
shouldShowParametersPanel: o,
|
||
shouldShowGallery: h,
|
||
shouldPinGallery: y,
|
||
shouldShowGalleryButton: E
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), cH = () => {
|
||
const e = je(), {
|
||
shouldShowParametersPanelButton: t,
|
||
shouldShowProcessButtons: n,
|
||
shouldPinParametersPanel: i
|
||
} = Z(Tb), o = () => {
|
||
e(Zu(!0)), i && setTimeout(() => e(ca(!0)), 400);
|
||
};
|
||
return t ? /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
pos: "absolute",
|
||
transform: "translate(0, -50%)",
|
||
zIndex: 20,
|
||
minW: 8,
|
||
top: "50%",
|
||
insetInlineStart: "4.5rem",
|
||
direction: "column",
|
||
gap: 2,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: "Show Options Panel (O)",
|
||
tooltipProps: { placement: "top" },
|
||
"aria-label": "Show Options Panel",
|
||
onClick: o,
|
||
sx: H2,
|
||
children: /* @__PURE__ */ c.jsx(pb, {})
|
||
}
|
||
),
|
||
n && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(jb, { iconButton: !0, sx: H2 }),
|
||
/* @__PURE__ */ c.jsx(wb, { sx: H2 })
|
||
] })
|
||
]
|
||
}
|
||
) : null;
|
||
}, dH = ct(Gs, (e) => ({
|
||
resultImages: e.categories.result.images,
|
||
userImages: e.categories.user.images
|
||
})), fH = () => {
|
||
const { resultImages: e, userImages: t } = Z(dH);
|
||
return (n) => {
|
||
const i = e.find(
|
||
(l) => l.uuid === n
|
||
);
|
||
if (i)
|
||
return i;
|
||
const o = t.find((l) => l.uuid === n);
|
||
if (o)
|
||
return o;
|
||
};
|
||
}, pH = ct(
|
||
[vc, g0, Sr],
|
||
(e, t, n) => {
|
||
const { shouldPinParametersPanel: i } = e, { isLightboxOpen: o } = t;
|
||
return {
|
||
shouldPinParametersPanel: i,
|
||
isLightboxOpen: o,
|
||
activeTabName: n
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), Db = (e) => {
|
||
const t = je(), { optionsPanel: n, children: i, ...o } = e, { activeTabName: l, isLightboxOpen: f } = Z(pH), h = fH(), y = (m) => {
|
||
const x = m.dataTransfer.getData("invokeai/imageUuid"), b = h(x);
|
||
b && (l === "img2img" ? t(Ph(b)) : l === "unifiedCanvas" && t(t0(b)));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Ut, { ...o, pos: "relative", w: "100%", h: "100%", children: /* @__PURE__ */ c.jsxs(ce, { gap: 4, h: "100%", children: [
|
||
n,
|
||
/* @__PURE__ */ c.jsx(Ut, { pos: "relative", w: "100%", h: "100%", onDrop: y, children: i }),
|
||
!f && /* @__PURE__ */ c.jsx(yD, {})
|
||
] }) });
|
||
}, hH = (e) => {
|
||
const { styleClass: t } = e, n = Zl(ab), i = () => {
|
||
n && n();
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
alignItems: "center",
|
||
justifyContent: "center"
|
||
},
|
||
className: t,
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
onClick: i,
|
||
sx: {
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
rowGap: 8,
|
||
p: 8,
|
||
borderRadius: "base",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
textAlign: "center",
|
||
cursor: "pointer",
|
||
color: "base.600",
|
||
bg: "base.800",
|
||
_hover: {
|
||
bg: "base.700"
|
||
}
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Zr, { as: x0, boxSize: 24 }),
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "md", children: "Click or Drag and Drop" })
|
||
]
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, vH = ct(
|
||
[Gs, vc],
|
||
(e, t) => {
|
||
const { currentImage: n, intermediateImage: i } = e, { shouldShowImageDetails: o } = t;
|
||
return {
|
||
imageToDisplay: i || n,
|
||
isIntermediate: Boolean(i),
|
||
shouldShowImageDetails: o
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function mH() {
|
||
const { shouldShowImageDetails: e, imageToDisplay: t, isIntermediate: n } = Z(vH);
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
position: "relative",
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: [
|
||
t && /* @__PURE__ */ c.jsx(
|
||
Fh,
|
||
{
|
||
src: t.url,
|
||
sx: {
|
||
objectFit: "contain",
|
||
maxWidth: "100%",
|
||
maxHeight: "100%",
|
||
height: "auto",
|
||
position: "absolute",
|
||
imageRendering: n ? "pixelated" : "initial",
|
||
borderRadius: "base"
|
||
},
|
||
...n && {
|
||
width: t.width,
|
||
height: t.height
|
||
}
|
||
}
|
||
),
|
||
!e && /* @__PURE__ */ c.jsx(SD, {}),
|
||
e && t && /* @__PURE__ */ c.jsx(
|
||
Sb,
|
||
{
|
||
image: t,
|
||
styleClass: "current-image-metadata"
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
}
|
||
const gH = ct(
|
||
[Gs],
|
||
(e) => {
|
||
const { currentImage: t, intermediateImage: n } = e;
|
||
return {
|
||
hasAnImageToDisplay: t || n
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), ID = () => {
|
||
const { hasAnImageToDisplay: e } = Z(gH);
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
height: "100%",
|
||
width: "100%",
|
||
rowGap: 4,
|
||
borderRadius: "base"
|
||
},
|
||
children: e ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(uD, {}),
|
||
/* @__PURE__ */ c.jsx(mH, {})
|
||
] }) : /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
as: S_,
|
||
sx: {
|
||
boxSize: 24,
|
||
color: "base.500"
|
||
}
|
||
}
|
||
)
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, yH = () => {
|
||
const e = Zl(ab);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": "Upload Image",
|
||
tooltip: "Upload Image",
|
||
icon: /* @__PURE__ */ c.jsx(x0, {}),
|
||
onClick: e || void 0
|
||
}
|
||
);
|
||
};
|
||
function xH() {
|
||
const e = Z(
|
||
(l) => l.generation.initialImage
|
||
), { t } = Pe(), n = je(), i = Lh(), o = () => {
|
||
i({
|
||
title: t("toast.parametersFailed"),
|
||
description: t("toast.parametersFailedDesc"),
|
||
status: "error",
|
||
isClosable: !0
|
||
}), n(XR());
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
w: "100%",
|
||
gap: 4
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontSize: "lg"
|
||
},
|
||
variant: "subtext",
|
||
children: t("parameters.initialImage")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(yH, {})
|
||
]
|
||
}
|
||
),
|
||
e && /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
position: "relative",
|
||
height: "100%",
|
||
width: "100%",
|
||
alignItems: "center",
|
||
justifyContent: "center"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Fh,
|
||
{
|
||
sx: {
|
||
fit: "contain",
|
||
maxWidth: "100%",
|
||
maxHeight: "100%",
|
||
borderRadius: "base",
|
||
objectFit: "contain",
|
||
position: "absolute"
|
||
},
|
||
src: typeof e == "string" ? e : e.url,
|
||
onError: o
|
||
}
|
||
)
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
const kE = {
|
||
flexDirection: "column",
|
||
height: "100%",
|
||
width: "100%",
|
||
gap: 4,
|
||
padding: 4
|
||
}, SH = () => {
|
||
const t = Z(
|
||
(n) => n.generation.initialImage
|
||
) ? /* @__PURE__ */ c.jsx(ce, { flexDirection: "column", gap: 4, w: "100%", h: "100%", children: /* @__PURE__ */ c.jsx(xH, {}) }) : /* @__PURE__ */ c.jsx(hH, {});
|
||
return /* @__PURE__ */ c.jsxs(
|
||
_i,
|
||
{
|
||
sx: {
|
||
w: "100%",
|
||
h: "100%",
|
||
gridTemplateColumns: "1fr 1fr",
|
||
borderRadius: "base",
|
||
bg: "base.850"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(ce, { sx: { ...kE, paddingInlineEnd: 2 }, children: t }),
|
||
/* @__PURE__ */ c.jsx(ce, { sx: { ...kE, paddingInlineStart: 2 }, children: /* @__PURE__ */ c.jsx(ID, {}) })
|
||
]
|
||
}
|
||
);
|
||
};
|
||
var Ta = /* @__PURE__ */ ((e) => (e[e.PROMPT = 0] = "PROMPT", e[e.GALLERY = 1] = "GALLERY", e[e.OTHER = 2] = "OTHER", e[e.SEED = 3] = "SEED", e[e.VARIATIONS = 4] = "VARIATIONS", e[e.UPSCALE = 5] = "UPSCALE", e[e.FACE_CORRECTION = 6] = "FACE_CORRECTION", e[e.IMAGE_TO_IMAGE = 7] = "IMAGE_TO_IMAGE", e[e.BOUNDING_BOX = 8] = "BOUNDING_BOX", e[e.SEAM_CORRECTION = 9] = "SEAM_CORRECTION", e[e.INFILL_AND_SCALING = 10] = "INFILL_AND_SCALING", e))(Ta || {});
|
||
const bH = () => {
|
||
const { t: e } = Pe();
|
||
return an(
|
||
() => ({
|
||
[
|
||
0
|
||
/* PROMPT */
|
||
]: {
|
||
text: e("tooltip.feature.prompt"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
1
|
||
/* GALLERY */
|
||
]: {
|
||
text: e("tooltip.feature.gallery"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
2
|
||
/* OTHER */
|
||
]: {
|
||
text: e("tooltip.feature.other"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
3
|
||
/* SEED */
|
||
]: {
|
||
text: e("tooltip.feature.seed"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
4
|
||
/* VARIATIONS */
|
||
]: {
|
||
text: e("tooltip.feature.variations"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
5
|
||
/* UPSCALE */
|
||
]: {
|
||
text: e("tooltip.feature.upscale"),
|
||
href: "link/to/docs/feature1.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
6
|
||
/* FACE_CORRECTION */
|
||
]: {
|
||
text: e("tooltip.feature.faceCorrection"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
7
|
||
/* IMAGE_TO_IMAGE */
|
||
]: {
|
||
text: e("tooltip.feature.imageToImage"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
8
|
||
/* BOUNDING_BOX */
|
||
]: {
|
||
text: e("tooltip.feature.boundingBox"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
9
|
||
/* SEAM_CORRECTION */
|
||
]: {
|
||
text: e("tooltip.feature.seamCorrection"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
},
|
||
[
|
||
10
|
||
/* INFILL_AND_SCALING */
|
||
]: {
|
||
text: e("tooltip.feature.infillAndScaling"),
|
||
href: "link/to/docs/feature3.html",
|
||
guideImage: "asset/path.gif"
|
||
}
|
||
}),
|
||
[e]
|
||
);
|
||
}, CH = (e) => bH()[e];
|
||
function LD() {
|
||
const e = Z(
|
||
(o) => o.system.isGFPGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.shouldRunFacetool
|
||
), n = je(), i = (o) => n(KR(o.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
isDisabled: !e,
|
||
isChecked: t,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
const FD = () => {
|
||
const e = je(), t = Z(
|
||
(o) => o.generation.seamless
|
||
), n = (o) => e(c6(o.target.checked)), { t: i } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: i("parameters.seamlessTiling"),
|
||
fontSize: "md",
|
||
isChecked: t,
|
||
onChange: n
|
||
}
|
||
);
|
||
}, wH = () => /* @__PURE__ */ c.jsx(Bt, { gap: 2, alignItems: "stretch", children: /* @__PURE__ */ c.jsx(FD, {}) });
|
||
function Mb() {
|
||
const e = Z(
|
||
(l) => l.generation.horizontalSymmetrySteps
|
||
), t = Z(
|
||
(l) => l.generation.verticalSymmetrySteps
|
||
), n = Z((l) => l.generation.steps), i = je(), { t: o } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: o("parameters.hSymmetryStep"),
|
||
value: e,
|
||
onChange: (l) => i(G3(l)),
|
||
min: 0,
|
||
max: n,
|
||
step: 1,
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => i(G3(0))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: o("parameters.vSymmetryStep"),
|
||
value: t,
|
||
onChange: (l) => i(q3(l)),
|
||
min: 0,
|
||
max: n,
|
||
step: 1,
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => i(q3(0))
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
function Rb() {
|
||
const e = Z(
|
||
(n) => n.generation.shouldUseSymmetry
|
||
), t = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
isChecked: e,
|
||
onChange: (n) => t(ZR(n.target.checked))
|
||
}
|
||
);
|
||
}
|
||
function EH() {
|
||
const e = je(), t = Z((i) => i.generation.perlin), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.perlinNoise"),
|
||
min: 0,
|
||
max: 1,
|
||
step: 0.05,
|
||
onChange: (i) => e(sx(i)),
|
||
handleReset: () => e(sx(0)),
|
||
value: t,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0
|
||
}
|
||
);
|
||
}
|
||
function jH() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(o) => o.generation.shouldRandomizeSeed
|
||
), i = (o) => e(JR(o.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: t("parameters.randomizeSeed"),
|
||
isChecked: n,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
const PE = /^-?(0\.)?\.?$/, Us = (e) => {
|
||
const {
|
||
label: t,
|
||
isDisabled: n = !1,
|
||
showStepper: i = !0,
|
||
isInvalid: o,
|
||
value: l,
|
||
onChange: f,
|
||
min: h,
|
||
max: y,
|
||
isInteger: m = !0,
|
||
formControlProps: x,
|
||
formLabelProps: b,
|
||
numberInputFieldProps: E,
|
||
numberInputStepperProps: j,
|
||
tooltipProps: M,
|
||
...R
|
||
} = e, [k, A] = qe(String(l));
|
||
rt(() => {
|
||
!k.match(PE) && l !== Number(k) && A(String(l));
|
||
}, [l, k]);
|
||
const L = (I) => {
|
||
A(I), I.match(PE) || f(m ? Math.floor(Number(I)) : Number(I));
|
||
}, z = (I) => {
|
||
const _ = Ie.clamp(
|
||
m ? Math.floor(Number(I.target.value)) : Number(I.target.value),
|
||
h,
|
||
y
|
||
);
|
||
A(String(_)), f(_);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Wr, { ...M, children: /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isDisabled: n,
|
||
isInvalid: o,
|
||
...x,
|
||
children: [
|
||
t && /* @__PURE__ */ c.jsx(wn, { ...b, children: t }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
YS,
|
||
{
|
||
value: k,
|
||
min: h,
|
||
max: y,
|
||
keepWithinRange: !0,
|
||
clampValueOnBlur: !1,
|
||
onChange: L,
|
||
onBlur: z,
|
||
...R,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(XS, { ...E }),
|
||
i && /* @__PURE__ */ c.jsxs(QS, { children: [
|
||
/* @__PURE__ */ c.jsx(ZS, { ...j }),
|
||
/* @__PURE__ */ c.jsx(KS, { ...j })
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
]
|
||
}
|
||
) });
|
||
};
|
||
function TH() {
|
||
const e = je(), t = Z(
|
||
(o) => o.generation.shouldRandomizeSeed
|
||
), { t: n } = Pe(), i = () => e(Oh($R(m6, v6)));
|
||
return /* @__PURE__ */ c.jsx(
|
||
pc,
|
||
{
|
||
size: "sm",
|
||
isDisabled: t,
|
||
onClick: i,
|
||
padding: "0 1.5rem",
|
||
children: /* @__PURE__ */ c.jsx("p", { children: n("parameters.shuffle") })
|
||
}
|
||
);
|
||
}
|
||
function DH() {
|
||
const e = Z((f) => f.generation.seed), t = Z(
|
||
(f) => f.generation.shouldRandomizeSeed
|
||
), n = Z(
|
||
(f) => f.generation.shouldGenerateVariations
|
||
), { t: i } = Pe(), o = je(), l = (f) => o(Oh(f));
|
||
return /* @__PURE__ */ c.jsxs(wf, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
label: i("parameters.seed"),
|
||
step: 1,
|
||
precision: 0,
|
||
flexGrow: 1,
|
||
min: m6,
|
||
max: v6,
|
||
isDisabled: t,
|
||
isInvalid: e < 0 && n,
|
||
onChange: l,
|
||
value: e,
|
||
formControlProps: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
gap: 3
|
||
// really this should work with 2 but seems to need to be 3 to match gap 2?
|
||
}
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(TH, {})
|
||
] });
|
||
}
|
||
function MH() {
|
||
const e = je(), t = Z(
|
||
(i) => i.generation.threshold
|
||
), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.noiseThreshold"),
|
||
min: 0,
|
||
max: 20,
|
||
step: 0.1,
|
||
onChange: (i) => e(ox(i)),
|
||
handleReset: () => e(ox(0)),
|
||
value: t,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0
|
||
}
|
||
);
|
||
}
|
||
const kb = () => /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(jH, {}),
|
||
/* @__PURE__ */ c.jsx(DH, {}),
|
||
/* @__PURE__ */ c.jsx(MH, {}),
|
||
/* @__PURE__ */ c.jsx(EH, {})
|
||
] });
|
||
function BD() {
|
||
const e = Z(
|
||
(o) => o.system.isESRGANAvailable
|
||
), t = Z(
|
||
(o) => o.postprocessing.shouldRunESRGAN
|
||
), n = je(), i = (o) => n(ek(o.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
isDisabled: !e,
|
||
isChecked: t,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
function Pb() {
|
||
const e = Z(
|
||
(i) => i.generation.shouldGenerateVariations
|
||
), t = je(), n = (i) => t(tk(i.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
isChecked: e,
|
||
width: "auto",
|
||
onChange: n
|
||
}
|
||
);
|
||
}
|
||
function _n(e) {
|
||
const {
|
||
label: t = "",
|
||
isDisabled: n = !1,
|
||
isInvalid: i,
|
||
formControlProps: o,
|
||
...l
|
||
} = e;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: i,
|
||
isDisabled: n,
|
||
...o,
|
||
children: [
|
||
t !== "" && /* @__PURE__ */ c.jsx(wn, { children: t }),
|
||
/* @__PURE__ */ c.jsx(PS, { ...l })
|
||
]
|
||
}
|
||
);
|
||
}
|
||
function RH() {
|
||
const e = Z(
|
||
(l) => l.generation.seedWeights
|
||
), t = Z(
|
||
(l) => l.generation.shouldGenerateVariations
|
||
), { t: n } = Pe(), i = je(), o = (l) => i(u6(l.target.value));
|
||
return /* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
label: n("parameters.seedWeights"),
|
||
value: e,
|
||
isInvalid: t && !(p6(e) || e === ""),
|
||
isDisabled: !t,
|
||
onChange: o
|
||
}
|
||
);
|
||
}
|
||
function kH() {
|
||
const e = Z(
|
||
(o) => o.generation.variationAmount
|
||
), t = Z(
|
||
(o) => o.generation.shouldGenerateVariations
|
||
), { t: n } = Pe(), i = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.variationAmount"),
|
||
value: e,
|
||
step: 0.01,
|
||
min: 0,
|
||
max: 1,
|
||
isSliderDisabled: !t,
|
||
isInputDisabled: !t,
|
||
isResetDisabled: !t,
|
||
onChange: (o) => i(Y3(o)),
|
||
handleReset: () => i(Y3(0.1)),
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0
|
||
}
|
||
);
|
||
}
|
||
const Ob = () => /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(kH, {}),
|
||
/* @__PURE__ */ c.jsx(RH, {})
|
||
] });
|
||
function OE() {
|
||
const e = je(), t = Z(
|
||
(l) => l.generation.cfgScale
|
||
), n = Z(
|
||
(l) => l.ui.shouldUseSliders
|
||
), { t: i } = Pe(), o = (l) => e(ux(l));
|
||
return n ? /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: i("parameters.cfgScale"),
|
||
step: 0.5,
|
||
min: 1.01,
|
||
max: 30,
|
||
onChange: o,
|
||
handleReset: () => e(ux(7.5)),
|
||
value: t,
|
||
sliderNumberInputProps: { max: 200 },
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
label: i("parameters.cfgScale"),
|
||
step: 0.5,
|
||
min: 1.01,
|
||
max: 200,
|
||
onChange: o,
|
||
value: t,
|
||
isInteger: !1,
|
||
numberInputFieldProps: { textAlign: "center" }
|
||
}
|
||
);
|
||
}
|
||
function AE() {
|
||
const e = Z((l) => l.generation.height), t = Z(
|
||
(l) => l.ui.shouldUseSliders
|
||
), n = Z(Sr), i = je(), { t: o } = Pe();
|
||
return t ? /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isSliderDisabled: n === "unifiedCanvas",
|
||
isInputDisabled: n === "unifiedCanvas",
|
||
isResetDisabled: n === "unifiedCanvas",
|
||
label: o("parameters.height"),
|
||
value: e,
|
||
min: 64,
|
||
step: 64,
|
||
max: 2048,
|
||
onChange: (l) => i(jg(l)),
|
||
handleReset: () => i(jg(512)),
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
sliderNumberInputProps: { max: 15360 }
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
isDisabled: n === "unifiedCanvas",
|
||
label: o("parameters.height"),
|
||
value: e,
|
||
flexGrow: 1,
|
||
onChange: (l) => i(jg(Number(l.target.value))),
|
||
validValues: nk
|
||
}
|
||
);
|
||
}
|
||
function NE() {
|
||
const e = Z(
|
||
(l) => l.generation.iterations
|
||
), t = Z(
|
||
(l) => l.ui.shouldUseSliders
|
||
), n = je(), { t: i } = Pe(), o = (l) => n(Q3(l));
|
||
return t ? /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: i("parameters.images"),
|
||
step: 1,
|
||
min: 1,
|
||
max: 16,
|
||
onChange: o,
|
||
handleReset: () => n(Q3(1)),
|
||
value: e,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
sliderNumberInputProps: { max: 9999 }
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
label: i("parameters.images"),
|
||
step: 1,
|
||
min: 1,
|
||
max: 9999,
|
||
onChange: o,
|
||
value: e,
|
||
numberInputFieldProps: { textAlign: "center" }
|
||
}
|
||
);
|
||
}
|
||
function zE() {
|
||
const e = Z(
|
||
(l) => l.generation.sampler
|
||
), t = Z(QT), n = je(), { t: i } = Pe(), o = (l) => n(l6(l.target.value));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: i("parameters.sampler"),
|
||
value: e,
|
||
onChange: o,
|
||
validValues: t.format === "diffusers" ? rk : ak,
|
||
minWidth: 36
|
||
}
|
||
);
|
||
}
|
||
function IE() {
|
||
const e = je(), t = Z((f) => f.generation.steps), n = Z(
|
||
(f) => f.ui.shouldUseSliders
|
||
), { t: i } = Pe(), o = (f) => {
|
||
e(lx(f));
|
||
}, l = () => {
|
||
e(h6());
|
||
};
|
||
return n ? /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: i("parameters.steps"),
|
||
min: 1,
|
||
step: 1,
|
||
onChange: o,
|
||
handleReset: () => e(lx(20)),
|
||
value: t,
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
sliderNumberInputProps: { max: 9999 }
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
label: i("parameters.steps"),
|
||
min: 1,
|
||
max: 9999,
|
||
step: 1,
|
||
onChange: o,
|
||
value: t,
|
||
numberInputFieldProps: { textAlign: "center" },
|
||
onBlur: l
|
||
}
|
||
);
|
||
}
|
||
function LE() {
|
||
const e = Z((l) => l.generation.width), t = Z(
|
||
(l) => l.ui.shouldUseSliders
|
||
), n = Z(Sr), { t: i } = Pe(), o = je();
|
||
return t ? /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isSliderDisabled: n === "unifiedCanvas",
|
||
isInputDisabled: n === "unifiedCanvas",
|
||
isResetDisabled: n === "unifiedCanvas",
|
||
label: i("parameters.width"),
|
||
value: e,
|
||
min: 64,
|
||
step: 64,
|
||
max: 2048,
|
||
onChange: (l) => o(Eg(l)),
|
||
handleReset: () => o(Eg(512)),
|
||
withInput: !0,
|
||
withReset: !0,
|
||
withSliderMarks: !0,
|
||
inputReadOnly: !0,
|
||
sliderNumberInputProps: { max: 15360 }
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
isDisabled: n === "unifiedCanvas",
|
||
label: i("parameters.width"),
|
||
value: e,
|
||
flexGrow: 1,
|
||
onChange: (l) => o(Eg(Number(l.target.value))),
|
||
validValues: ik
|
||
}
|
||
);
|
||
}
|
||
function Ab() {
|
||
return Z(
|
||
(t) => t.ui.shouldUseSliders
|
||
) ? /* @__PURE__ */ c.jsxs(Bt, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(NE, {}),
|
||
/* @__PURE__ */ c.jsx(IE, {}),
|
||
/* @__PURE__ */ c.jsx(OE, {}),
|
||
/* @__PURE__ */ c.jsx(LE, {}),
|
||
/* @__PURE__ */ c.jsx(AE, {}),
|
||
/* @__PURE__ */ c.jsx(zE, {})
|
||
] }) : /* @__PURE__ */ c.jsxs(ce, { rowGap: 2, flexDirection: "column", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 1, children: [
|
||
/* @__PURE__ */ c.jsx(NE, {}),
|
||
/* @__PURE__ */ c.jsx(IE, {}),
|
||
/* @__PURE__ */ c.jsx(OE, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 1, children: [
|
||
/* @__PURE__ */ c.jsx(LE, {}),
|
||
/* @__PURE__ */ c.jsx(AE, {}),
|
||
/* @__PURE__ */ c.jsx(zE, {})
|
||
] })
|
||
] });
|
||
}
|
||
const PH = ct(
|
||
Xn,
|
||
(e) => e.shouldDisplayGuides
|
||
), OH = ({ children: e, feature: t }) => {
|
||
const n = Z(PH), { text: i } = CH(t);
|
||
return n ? /* @__PURE__ */ c.jsxs(eb, { trigger: "hover", children: [
|
||
/* @__PURE__ */ c.jsx($S, { children: /* @__PURE__ */ c.jsx(Ut, { children: e }) }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
nb,
|
||
{
|
||
maxWidth: "400px",
|
||
onClick: (o) => o.preventDefault(),
|
||
cursor: "initial",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(tb, {}),
|
||
/* @__PURE__ */ c.jsx(wT, { children: i })
|
||
]
|
||
}
|
||
)
|
||
] }) : null;
|
||
}, AH = $e(
|
||
({ feature: e, icon: t = p_ }, n) => /* @__PURE__ */ c.jsx(OH, { feature: e, children: /* @__PURE__ */ c.jsx(Ut, { ref: n, children: /* @__PURE__ */ c.jsx(Zr, { marginBottom: "-.15rem", as: t }) }) })
|
||
);
|
||
function NH(e) {
|
||
const { header: t, feature: n, content: i, additionalHeaderComponents: o } = e;
|
||
return /* @__PURE__ */ c.jsxs(Jd, { children: [
|
||
/* @__PURE__ */ c.jsx(Kd, { children: /* @__PURE__ */ c.jsxs(ce, { width: "100%", gap: 2, align: "center", children: [
|
||
/* @__PURE__ */ c.jsx(Ut, { flexGrow: 1, textAlign: "start", children: t }),
|
||
o,
|
||
n && /* @__PURE__ */ c.jsx(AH, { feature: n }),
|
||
/* @__PURE__ */ c.jsx(Zd, {})
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsx(ef, { children: i })
|
||
] });
|
||
}
|
||
const Nb = (e) => {
|
||
const { accordionInfo: t } = e, n = Z(
|
||
(f) => f.system.openAccordions
|
||
), i = je(), o = (f) => i(ok(f)), l = () => {
|
||
const f = [];
|
||
return t && Object.keys(t).forEach((h) => {
|
||
const { header: y, feature: m, content: x, additionalHeaderComponents: b } = t[h];
|
||
f.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
NH,
|
||
{
|
||
header: y,
|
||
feature: m,
|
||
content: x,
|
||
additionalHeaderComponents: b
|
||
},
|
||
h
|
||
)
|
||
);
|
||
}), f;
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
hS,
|
||
{
|
||
defaultIndex: n,
|
||
allowMultiple: !0,
|
||
reduceMotion: !0,
|
||
onChange: o,
|
||
children: l()
|
||
}
|
||
);
|
||
}, zH = ct(
|
||
cb,
|
||
({ shouldLoopback: e }) => e
|
||
), IH = () => {
|
||
const e = je(), t = Z(zH), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": n("parameters.toggleLoopback"),
|
||
tooltip: n("parameters.toggleLoopback"),
|
||
isChecked: t,
|
||
icon: /* @__PURE__ */ c.jsx(qB, {}),
|
||
onClick: () => {
|
||
e(sk(!t));
|
||
}
|
||
}
|
||
);
|
||
}, zb = () => {
|
||
const e = Z(Sr);
|
||
return /* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(jb, {}),
|
||
e === "img2img" && /* @__PURE__ */ c.jsx(IH, {}),
|
||
/* @__PURE__ */ c.jsx(wb, {})
|
||
] });
|
||
}, Ib = () => {
|
||
const e = Z(
|
||
(i) => i.generation.negativePrompt
|
||
), t = je(), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(vn, { children: /* @__PURE__ */ c.jsx(
|
||
rb,
|
||
{
|
||
id: "negativePrompt",
|
||
name: "negativePrompt",
|
||
value: e,
|
||
onChange: (i) => t(r6(i.target.value)),
|
||
placeholder: n("parameters.negativePrompts"),
|
||
_focusVisible: {
|
||
borderColor: "error.600"
|
||
},
|
||
fontSize: "sm"
|
||
}
|
||
) });
|
||
}, LH = ct(
|
||
[(e) => e.generation, Sr],
|
||
(e, t) => ({
|
||
prompt: e.prompt,
|
||
activeTabName: t
|
||
}),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), Lb = () => {
|
||
const e = je(), { prompt: t, activeTabName: n } = Z(LH), { isReady: i } = Z(zD), o = He(null), { t: l } = Pe(), f = (y) => {
|
||
e(n6(y.target.value));
|
||
};
|
||
Ze(
|
||
"alt+a",
|
||
() => {
|
||
var y;
|
||
(y = o.current) == null || y.focus();
|
||
},
|
||
[]
|
||
);
|
||
const h = (y) => {
|
||
y.key === "Enter" && y.shiftKey === !1 && i && (y.preventDefault(), e(dx(n)));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Ut, { children: /* @__PURE__ */ c.jsx(
|
||
vn,
|
||
{
|
||
isInvalid: t.length === 0 || Boolean(t.match(/^[\s\r\n]+$/)),
|
||
children: /* @__PURE__ */ c.jsx(
|
||
rb,
|
||
{
|
||
id: "prompt",
|
||
name: "prompt",
|
||
placeholder: l("parameters.promptPlaceholder"),
|
||
value: t,
|
||
onChange: f,
|
||
onKeyDown: h,
|
||
resize: "vertical",
|
||
ref: o,
|
||
minH: 40
|
||
}
|
||
)
|
||
}
|
||
) });
|
||
}, FH = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdMAAAHTCAYAAAB8/vKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFyWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZWRhMmIzZiwgMjAyMS8xMS8xNC0xMjozMDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjEgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMi0wOS0yMFQyMDo0NDoyNSsxMjowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjItMDktMjBUMjM6NDM6MjgrMTI6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjItMDktMjBUMjM6NDM6MjgrMTI6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc0ZmY2YTc5LWE0MzktOTk0Yi1hYWEyLWQwODBiMTM5Mjg1MyIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjVhMjE5M2IzLTU1NjAtOGQ0Ny1iN2M1LWFmZGJjMDEzZDRkMiIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOjkwZmM0N2Y0LWYzODAtNTY0YS04MWUzLWJhYmExMmIwNjkyNyI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6OTBmYzQ3ZjQtZjM4MC01NjRhLTgxZTMtYmFiYTEyYjA2OTI3IiBzdEV2dDp3aGVuPSIyMDIyLTA5LTIwVDIwOjQ0OjI1KzEyOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjMuMSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjc0ZmY2YTc5LWE0MzktOTk0Yi1hYWEyLWQwODBiMTM5Mjg1MyIgc3RFdnQ6d2hlbj0iMjAyMi0wOS0yMFQyMzo0MzoyOCsxMjowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIzLjEgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvQowIwAAKYwSURBVHic7J13mCRV1YffW1Wd8/Tk2ciyyy45ZwmSBQQFAwbEAGb5EMyomAiKiGJAMSsCEiSIIDnnnBY27+zkPJ1DVd3vj5pFRGBnZ2anp2ru+zzDstBVdXq6+v7qnHuCkFKiUCgUCoVi4mi1NkChUCgUCrejxFShUCgUikmixFShUCgUikmixFShUCgUikmixFShUCgUikmixFShUCgUikmixFShUCgUiklibOoF9q3102GHQuFmQkACaAEagMaxPxNAHZAGUmOva8R5iG0EfGP/HpkCG4qAOfbvvUAVGAJyY3+OAANjf+8Z+299QOfY/8tPgQ0KhWfRjhx4y/+/STFVKBSEgGZgK2AhMBdHOFuAtrG/x4BArQzEsXEjsc04rgIUgC6gG9gw9tMNrAfWjv09NzVmKhTeRImpQvEfUsBiYDtg0djPwrE/U4BeO9O2GP6xnySw7Zu8JoMjrCvHfjqAF4GXcLxda4tbqVDMcJSYKmYjAWAOsAewFFgC7AQsAMK1M2vGEgd2GPt5LSWckPGzOMK6GngcWIXj7SoUswYlpgqvI4D5wN7AMmBXHBFtQCXgTZYgzgPIAuC41/z3IeBp4CngFeB+nHBxdXrNUyimDyWmCq8RxPGgDsTxOg/ECdV6MUQ7U6kDDhn72UgH8DCOyD4OPIYTPlYoPIHY1NQYlc2rmOEEgL2A/cb+3BtoqqlFivGQxRHXh4GHgEdQ4qqYwahsXoUXWQYcDuyD43k219YcxQSI4XyGh4/9PYcTDn4AuAsnRFypjWkKxeajxFThBuLAEcD+wJE4CUMKbxEFjhr7AadU51Ycr/WWsb8rFDMWFeZVzFQWAMcAb8fZe4vX1BpFLangeKx3AP8Enq+tOYrZyKbCvEpMFTOJHXAE9ChgX1TSkOKNeQG4EbgBJ5FJodjiKDFVzHR2AN6JU1qxR41tUbiPFTje6tU4SUwKxRZBialiJrIIRzxPwPFAFYqpYKPHejXwTG1NUXgNJaaKmUIMRzxPAN6Bapig2LI8BPwduA6nt7BCMSmUmCpqzSHAe4ETcYr5FYrpxASuB67A2WNVfYQVE0LVmSpqwVwc8fwITs9bhaJWGDj34onAOhxR/QuwvIY2KTyI8kwVU8mhOAL6XpxJJArFTOWfwF+Bq2ptiMIdbMozVftWiskSAU7DKVG4HfgQSkgVM59jgCtxsoG/iTMMQaGYMEpMFRNlGfBjnLFbv0aVtSjcyWLguzhj4/6A09tZodhslJgqNpe34TzRvwR8EdVUXuENDOAUnMb7/waOr6UxCvehxFQxXt6Ns8jcB7yvxrYoFFuSw4F/4GxdnIxaJxXjQN0kik1xMvAgcC3/mfChUMwG9gD+hLOv+gWcWbkKxRuixFTxZpwMPIuzmKguRYrZzCLgp/wnWUmVOCj+ByWmitfzWhHdsca2KBQzibk4yUovA+egRFXxGpSYKjaiRFShGB9p4Ns4ovpNIFRbcxQzASWminejRFShmAhpHE91Oc6eqhoZOItRYjp7OYr/JBYpEVUoJs58nD3VF3AiPIpZiBLT2cd+wL/GflRikUIxdSzFifA8iNNhSTGLUGI6e1iI0+HlARyvVKFQbBn2BW7CeWDdq8a2KKYJJabeRwe+gROCOqW2pigUs4qjgEdw2m221NgWxRZGiam3eQ+OiH4fCNfYFoVitnIa8CJweq0NUWw5lJh6k91wQkx/x9nHUSgUtSUFXAw8gdpm8SRKTL1FEPgR6gurUMxUNj7oXoka++YplJh6h+Nw6kXPqrUhCoVik7wPeA74XK0NUUwNSkzdz0Lg+rGfJTW1RKFQbA5x4BLgbmCfGtuimCRKTN3Np3G80eNqbYhCoZgwBwEPARcAoramKCaKElN3sgPObNFfArEa26JQKKaGLwNPAYfW2hDF5qPE1H18CXgGNVtUofAiOwO34zwoB2primJzUGLqHpYBdwA/RH1uCoXX+TTOQ/NBtTVDMV7UouwOPg08DRxSa0MUCsW0sRQnOemCWhui2DRKTGc2rTg9PlXIR6GYvXwZpy3hrrU2RPHmKDGduRyH442q6RMKhWIv4ElUS8IZixLTmcnPcepGG2tsh0KhmFlcjBOtaqqxHYrXocR0ZrEL8Bjw2VobolAoZizH4EStVEb/DEKJ6czhFOBxYI8a26FQKGY+LTi15ufW2hCFgxLT2qPjDO3+w9i/KxQKxXj5GnAXal5qzTFqbcAsZxlwOU54V+FBNM0GTTqPrWLjjwDNBp/lvEiXzn+XOI9T42koJwH7NX83x05g6WDqzr9vfI0EbIFtqWdnj3IwTuekk3EaPihqgBLT2vEe4I+ood2uRtMtRwA1AboNftP5Vmk4f5YDUPRDBahC1ZSUpEWhEKJzKIGUkr6MgWWDrsFIQZIvO//+Ztg2+A2oi4hXhbcxZmLoglS0SF08S0DT8RsCYQA+IGihhcrOwRZgAlUdTM0RWwtsc6PiK1xIM3Abjqd6fo1tmZUoMa0N5+Lc9AoXIJAIw3ZE05AQMMEnQdOhEIKCRrVkMpILsronRfewxkhBMlSq0j0Yo3skzFBOkClCriwZKZlUqjq5YhAJFMoCKR2HVVZxxG5TaDgiOUY4INEEhPwmAX+ZeFAnHtSIBQXJiKQpUaGtbpS6CDREdRrjsLBplHS8SMCnQ1iiRUsgTagKKI8JrQXS1JBSiaxLOA+nJeGHgWptTZldCCnlW77AvrV+mkyZFcSBvwDvrLUhijdGiNcIZ8CCoAmaAZkwdtFmKOPjxQ11dAzbdAwJVnQn6Bzy0ZWx6M/AaD5IsSScZawiQTPBN3Y+zfnRNYEQEkN34rS6Jv8T5RUgxKaFSyKxXxPmtWzhOJi2wLY1LCmdEK8twRJOGNg0wNAgAIEAJMJl6mMWTTGDefUmi1tGaU1ZzE3pbDcnQ2OqiB7UIVYCrQIlAWWfI/ZVDdsWypGduTwDvB94pcZ2eAbtyIG3/P9KTKeP7YBrgW1qbYhiDAmaYTvept+CsAnCByNhykWTVZ1Jnt0QZF0/PN+eYnU/dA5BfyZItSigbIGv6niphsDQwafb6LpEF45ozjRsCZYtMW0wLZ2qCVjS8UYrBvh0tLCgIVaitU6yIC3Yfk6WrVsqLG2WbDtniGjchkQF9DLkDajoYIJtqvy5GUYG+BBOXapikigxnRm8G/grEKq1IbOa14pn0IKIBaUQ9ojO+t4IT6wP80qHxhNrUqzqt1k/4CM36oeKCf4q+MEwwG9YGDoYM1AsJ8tGoa2YGtWqgKp0RNbwEYzZtKTKLGkS7L4wy5K2KrvNL7G4bRR/HIgUoSShaDieq0p4mimcCVxUayPcjhLT2nMW8KNaGzErkSA0ifDZTsg26ohndUTjlQ0JHlwd4Jk1EZ5YF2JNr2BoxA8lEwJV8AuCfonfsD0pmpuLZUsqlqBc1bArY4Lp8xNNVljQYLLrPIs9F2fZa2GZHRZkCKRMR1zzAkoGVMeyidWvslb8CvhMrY1wM0pMa8svcSa+KKaLjd6n34ZIFXQ/DPtZ2xHlnpVBHlsR48FVAdb06uSHfSDLEJb4/ZKAYePT1Wo/XixbUq5qlKoCioAdIJCwWdRksvvCCnssynPg0jzbL8gikiboJcj6oKKNZQ4rppnbgROAbK0NcSNKTGtDCGd/9KhaGzJb0HQbgjbEqlAJUOoL8cDKOPe+EOHuVyK81KEzPDAmniFJMCAJ+mx04STuKCaHACwpKZuCYllAUYAVIJK2WNpmcsCSIvsty3HosiyJ5hKEx7zWgk8J6/SyHDgWWF1rQ9yGEtPpZy5wC07CkWJLsdEDDZkQtaEUZLgzxK0vxbnr+Sj3LQ+zosuAvA2hKv4QhHxOyFaJ55ZHALaUFKuCUklAQQe/j/ktVfbausKhO+Q4dNssC7fKQrQEeZSwTh/9OFOpHq61IW5Cien0shNwK04BtWKqkaDp0ilXSZhQCtKzNs4tL8S55Zkoj670097lA6sKUYtoQOJXldQzAgFULKem1soLsAOkGi32W1Lm6J1zHLFjhoULsxB5nbCqqPuW5EScCJpiHCgxnT7eDtwMBGttiKeQgAAtYEKiCtJPtj3GTS/EuPmJOHc8H6GvVwNRQY/aRAI2PuV9zmiEcPZbCxVBJauB5SfVYLPvNmWO2zXHMbuM0rIgA4ESjPqgpKua1i3HF4BLam2EG1BiOj18EKf0RTFVbAzjxioQFtAT598vxLnxiTi3PhNhTbsBVDFiJtGARNecLkIKd/FGwtrQDIdsn+Nde4/yrp0y+NqyULVg1KdqWbcM3wK+V2sjZjpKTLc8p+MM7FVMltd6oSknkWjlK0muezTB1Y8meHKVH8omRE0SIbX/6TU2CmuuLDAzBmg+li6scvzuOd691zB7bD8KkbLTiqDoU97q1PJjnDI+xZugxHTL8mXgglob4XokaJp0vNAI0BfnH0/FufKBJLc+HSXTLyFSIRqV+JVjMisQwnFGM3kBWR/+pMaB2xf54N5Z3rv3IKF5WShZkPGrvdWp4684PX0Vb4AS0y3HhTidRRQTZWMoN1kBw6BnVZIrH0zxpwcSPPOKH+wqgYRJJPCfCWWK2cVGjSxWoTCqge1n8QKLE/fO8sG3DbPdtkNgVGDYh11VT1pTwBXAB2ptxExEiemWQQnpZJCg+S0nlGv6eeLZOv54Tz3XPhKlpwsIVYhHJT4DtQ+qeBUnDAwjeQEZH+G0zrG7Z/n424c5bLcRiOZhVMMu+TZ5LsVbchdwBM6gPsUYSkynnkuAz9XaCFciQQtWIWVDLsKtjye57M46bng0ipW10BIVEmFnNKgSUcWbsdFbzZWhPGqAz8eBO5T57OFDvGffAUjnIKMhCz7nPlIh4IlwP06FghLUMZSYTi1/A06qtRGu41URtWA0ytX3NnDpnXXc9WwAqiahVJWwXwmoYvMRwslJy41oIP3svI3J5w8b5sMH9ONrzUBWIHN+JaoTQwnqa1BiOnUoId1cXi+i9zVw8b/SPPScD7QK0ZRNQIVyFVOAEGBaMJrRoOJnyUKLTx46zKcO6yM8d9TxVJWoTgQlqGMoMZ0alJBuDnKsvKXO/F8RNSrEkzY+XYmoYup5dV81KyAfYNFWFp85YkxU2zIwKrAL/lqb6TaUoKLEdCpQQjpepEDzmVBfhUyEq+9p5OJblIgqph8hnN7Aw1kNcgG2WmjzxWMG+ewRfVCfhRENu+hTXur4mfWCqsR0cvwc+GytjZjxyLGpLfVlqIb41/1N/OiGeu55MgC+shJRRc14VVQzGhQD7LTE4sxjB/jwYb0Qy8OQgV3xgVA35zi4HzgEqNbakFqgxHTiqPKXTSGdzFuSZfD5eOTJNOdf18QND0ZAlImnTHy6avOnqD1CgG3D8KgGZT/77mzyjeMHeMeB3WAUYSCoOiqNj3uBg2ptRC1QYjoxlJBuCglatAoJm/UvNfLd65r4w51RZLFKtL5KwFAiqph5vJqoNKKD9HPcvgXOfk8Pu+86ACULORpQSUqb5mrgvbU2YrpRYrr5nAX8qNZGzFhe3RetwGCcC29s5vx/1DPYbxGsqxANCGwloooZjlNSI8kN+NDCBp89KsM3T+ilYeEgDKv91HEw61oPKjHdPD6HGkf0xmwM6aZLQJCb727mW1c28NSLBiRKpKPOa5SOKtyEJiBTgsqQn7Y2wbffM8CpR3dDJA8DfmxL9f19Cy5iFkXwlJiOn/cCV9XaiBmJBC3sdC5a9WI9Z/+tjavuCYNWJlVnoQkV0lW4FzEmloMZp5zmwF2rnPehbvbZtwdyEjvjV4L65nwHOKfWRkwHSkzHx4HAPbU2YsYhQdNsaKhALspF17VwztX1ZIdMovVVgj4V0lV4ByHAtCWjAwYEfHz+HRnO+0AHkdZR6Dewqyrr9034PE7lg6dRYrpplgFPAcFaGzKjkKDFqhCXPPJQC2f+sZWHnjYQyRLpCEpEFZ5FE5AtQXnQz5JFcP4H+3nXkZ1glpFDQWcrQ3mqr+e9OIlJnkWJ6VvTCLwANNTakBnDxprRxgrV/jjfunIOF1yfQFaqJOtNdBXSVcwCnNCvZHBYBzPAhw7J88OPdNCyaAj6dVWb+sbsAzxSayO2FEpM3xwf8DSwXa0NmTHY//FG772vjdN/18KzL2n468vEg8obVcw+NAHFqiTf76elRefHH+nlpGM7oFrBHg4qD/W/GQV2BtbV1owtgxLTN+dm4B21NmJGIEETEhrLkInyzcvn8f2rkyDL1NVZCOWNKmYxAsdTHRgVUAhw8hEFfvLxDurmDMGAgW3qSlT/wzpgJyBTYzumHCWmb4xqE7gRW6CFK1Bn8cwTrXz60jYeeVYnkC4TU96oQvEqr9am9vtZMEfnl6d1cdRhHZADO+MDrdYWzhjuAQ6utRFTzabEdDZ+/GeghNRBgpYuQsDPT/+0hD2/uoBHlktSrSWiSkgViv9CSgjognRLlXUDZd7x/Ra+8KPtsMsRtJYSmiq03shBwG9rbcR0M9s806OAf9XaiJqzMcmoqUr/+hSnXbKA6+8PoieKpFSmrkKxSTQB+bKkOBBkjx0sLvtcJzvt2g0DOnZZJSeN8VXgglobMVWoMO9/2Bp4ntleAmMLtEgVkja33zmHT/6qjbUdFvHGimpKr1BsBq9OpBkwCAYD/Py0Hj7+7g1QNrFH/LMz7ve/vAO4pdZGTAVKTB0CwIvAolobUlMkaHUlkCF+8OeFnP3XBOhl6lM2UgoVoVIoJoCmwVAW7GyQjx5Z5NefXY2vLovsCyDlrJ9EUwJ2AFbV2pDJovZMHa5iNgupBE3YaC1lBvvqOO7sZZz9+ziBaIn6lMRWQqpQTBjbhlQUog1F/vCvAHt9aSnLX2xBtJbRfBbIWa2mQeBWHIfG08wGMT0HOK7WRtQMKdACJrRUeOihuex51jbc+KBBvFklGSkUU4WUEDAEdW1lnl4l2esrC7jq+q0hDVqkDPasFtRFzIK+514X03cC3661ETXDFmjRMiQFv7tya/Y/ew5resukWyr4VO2oQjGlSAlIQX2jRbZa4v0XNPL1ny0Ff8DZXrFrbWFNOQ74Rq2N2JJ4ec90HvAyEKq1ITXBBq2+CJUIZ/xqMRf/I4weK5GKOmEphUKx5Xhttu+7D6zwl7NWEm7IIntn/T7qYcAdtTZiIszmPdObmY1CKkEg0VpKZAbqOPqby7j4mhDh9FjZixJShWKLY0sIBwSJlhLX3edjr7OWsuKlZkRLxSlLm71RoWvxaC90r4rppcD2tTZi2hmrHxXNFZa/2MxeX1rCvx4xSLSUCKlxaQrFtCIlGEKQbi3zwlrJ3l/eitvvnActFTT/rE1MigPX19qILYEXxfT9wCdrbcS0I4XzBW0uc9e989j3K1vxcrtFuqWMofZHFYqaIAEpBQ2NFsPFEod/t43fXrE11EunjefsTEzaFzi/1kZMNV4T04XAn2ptxLQjBVqoAmnJn65ezCHntDFSLNHQaKn6UYViBmDZUJ+S6IEip17cyHd+sQ2EfWiJ0mwV1K/gdKTzDF4T038A/lobMa3Ywkm9jxn88LdLOOWiJnR/kfqUxFL7owrFjMG2IRWBYKrIOX+Kcdq5y0CG0NKzVlCvwkP7p14S04txRv/MHmyBFi+DP8CXfrINX/ltgmCioBKNFIoZii0hEoBYU4nL/uXnnd/alkoujNZUnI2lMzHgilobMVV4RUyPBE6vtRHTii2cJ1oR4uTvL+PCq0NE6otEVCMGhWJGIyX4DUGytcxND+oc9o1lDPem0Bors1FQDwHOrLURU4EXxDSKh55uxoUt0BpKlHNh3vXtpfzlDh+xpjJBv0o0UijcgJSg43RMuu85jQO+vA0DnXVorUVm4Zf4QmDnWhsxWbwgpn8FkrU2YtqwcYQ0E+aos7fl+vsMki1l/IYSUoXCTUhASEG6ucILay3e9rWtWL28Ba2pwiwsRP17rQ2YLG7vgPRh4M+1NmLasEFrLFMYjnL0t7bhnqd1Ui1lNFTG7kzHsmws23L+tCxM08K2JdiWk+ppms5Mr0oV5HhifQL8PudPQ3dGl2gamq6h6zq6rmEYOpqmo2sCIWZlgotr0DTJQK9BQ9rP/d9bxzY7dGH3BphlrZIuAb5QayPeDC+PYGsFVgLhWhsyLdigNZfo35DmyG8v4qkVkGqqKCGdQdi2xLRMKhWTStV0BLJYAsuEYBAjFCQUChKJhknFIkRCQcLhENFomLpUgmrVpLW1kWgsjGlab3odTdOoVqt0d/VjWTajmSzFYol8oUgmm2c0X6SQL5LLFTBLJSiWnf52wQD4ffgNA5/fh2Ho6JoXglPeQNNgoF+jvs7PA99ZzzY7zkpBPQi4t9ZGvBFeFtN7gANrbcS0YIPWVKa/I81B31jES2ts6pqrCFVDWjNsW1KpVimXK1iVCuRLoGsYsSjpdIKmdIqGdJJ589uYN7eFuniEdF2SurokrW2NxGMRdCHw+3z4/D5CoQC2ZRONRQBjPBZQLBSwpaRcrlCtVqlWHREvlSv09g7Q3d3P0NAIo/kC7R29bGjvpqevn96BUQaHRyiPZh1POBxCBPwEA378Ph+6rgS2VihBpROnX0C11oa8Hq+K6aeAX9XaiGnBFmiNRfo76zj464t5cZ1NuqnqNMtWTBuWZVMqVyiXypAvABCur6OtpYG5LY0s3WYhW281h5bGehYvWUBDfYqg308yFcfvDyExqVZNTNOkUqliWhZSSmxbIqXEsmyE4NXw73iisoahgxBomoYmnFCupjl/9/t8+P0+DJ+BhoFllhkZyVAslxkcyrB6dTsdXb20d/Xx4gsrWd/ZQ0d3P9n+IUdgo2H8wQCBoB+fMR5xV0wVSlC5FPh0rY14PV4U0znAGsBXa0O2OBuzdjMR9v/SMp5YDukWJaRbGiEcz7NUrlAslCCbB79BfUsjC+e1ssN2i9lh20UsWTSfbbZZSDwaIV2fRNN8VKolisUylWoV25ZjAmqNSxy3JJqm4fMZ6GN/BoMBgoEgAIMDg+QKRVat3sArK9awYvUGnnpmOavXd9LV1ec8PIRDBCJhgkE/hq6pZLctzH8J6nfXO3uoPQFqfiNNHwcxw8K9XhTTu4CDa23EFscWaPUlylkna/fu5zTqmsqztTn2tGBZNoViiWomC1WLeEsDSxbNY49dt2PH7Raz047bsHB+K+m6JD5/kEKpQLFQenWf1LIsVyX6SCkdL9bvQ9d1QqEA0XAEpE3/wBA9fYM8+9zLPPnMyzzx1Iu8vGo9Ax09ICVaIkYkFMTnN2Zh4un08Kqgpvw8+oN1bLVdN3Z30Bs1GJumE2eoeLnWhmzEa2I6O7J3bYFWV6JaDHPEN5Zx91Mqa3dLIISgaprk8kXs0SzoOnMWzmH3nbdl7z13YO/dd2CbJQtobEij6TqZXI5SqUyl4oRr3SSc40VKiaZrBPx+/H4fiXgUDRgYHGHV6naefGY5Dz/+HI8+8Tyr1nRALg+JGLFoGJ9PCetUo2kw0Kez9Rydh85fTcOcQSfkOzsE9WfMoGY8XhLTBNCF17N3bYGWKIMMccJ3lnLdfQapViWkU4UQAsuyyRWKmCOjYPjYavF8Dth3F/bba2f22mMHtt5qHqFwlHwhS75QpFyuus7rnCo2iqvf5yMcChKPxalUimzo6OHJp5dz172Pcd9DT7P8lTWQLyCScUdYDYNNrS2K8bGxbGa7BTr3n7+KVPMgdl8ItFnx+90DeKLWRoC3xPRK4H21NmKLYgu0aBkCAT5y7jL+fKuPxMYRarW2zcUIHIepVK5QGBoB06J10TwO2GcXjjpsP/bZa0e2WjAX3fAxPDrqhHor5izanho/UkoMwyAUDJBMxtCEYH17F489/jx33/c4d93/BCuWrwLTIlCfIhwKogmhhHWSCCEZ7Pbzth0lt527nGAkjz0UnA2C+jywY62NAO+I6RHArbU2YosiBVqwAjGDL/90KT+6OkisUXU2mgxCCEzLYjSTg5EswYY63rbPzrzj0P047O17s2TJQnw+H4PDIxSLpbFEIaWg40VK+epeayqVQBeC1Wvauf+hp/nXv+/n9nseY6SjB2Jh4sm48lYni5AMdfo5Zj+Lm777MlDEzgZAeP53ehbw41ob4QUxFcBaYH6tDdliSNB8FjTY/Ox323D6ZQki6aLqtTtBhBCUK1VyA8NgWyxatjXHHL4/x77jIPbaYwei0QgjmazT1MCje5/TjSOsGuFwiHQqSbVa5amnX+Jftz3Ajf+6l2eeehEsi3BDHcGA/9VogWL8CMCUktHuIB89qszvv74cClXsot/rgloFFuBs89UML4jpOcC3a23ElkQIG9FS4arrFvH+HzUTSOSJBYWa/rIZiLF/FIplin2DEAlz8P67c+Jxh3DkYfux1VbzKVfKDA6NUq3OuHpwT7ExFJxKxYmEwnR39XD3/U9w1XW38e87H6I8NIqRThKPhhEqBLxZCAEVU5LtC/LtD+Y453OvwBDYFd3rZag3A8fU0gC3i+lCnJpSzyKkRLRUuP++eRxwThuaUaQupuaRjhdHRAXZXIFK/xDB+hTHHnUAH3rf0bz9wD2JRiMMjYySyxWwbVt5odOIlBIhBKFwkMZ0HeVymYcefoYrr72V6266m4H1nZCMkUrG1b7qZiAElCqS/HCIyz43yCc+uALZ40damtcF9Ujg37W6uNvF9BacX6A3GWsTuP6VJnb5ykKGc2Ua6iSWEtJN8t8iOkispZGTTjiCk95zFG/bb1cQgr7+IcqVqsfXF3cgpcTnM2ioT+H3+Xjm2eVcec2/ueoft7PuxZWQiFKXSihPdZxoAkYLUC0Fuf1bXRx6SDuy24/09t2+HtiKGk19dbOYejvpyBZo6SKF4QR7fmkZL66rUt9oK490E7yZiH785OPZc4+dKFcr9PcPq73QGcrGvdVUKkE0HGXNmnX85cqb+cPlN7L+pZWIVIJUMoZAieqm0DQYGBbEQkGeOHcdS7bvng01qN8Azq3Fhd0spqtxnkK8hxRokQroQY795jb882FdtQkcB0II8sUSpb5BYk31/yWixXKJ/v5hFcp1CRtDwMlkjEQsOSaq/+TXf7iW7lVrMerTJGIRkFIlKr0FG7skLZvr47ELlxOtG8Ue9HQNahknGalnui/sVjE9A7ioFhfe4rwmc/erP17GBVdGSbaW0FUt6ZsihKBSNcl296HFwnzghCP5/CdPYs89dlQi6nJeL6ovvfQKv/vzP/j95Tcy0tlDqKmecCiovNS3QGiSwS4fR+9j8c/vvQJWCTvv6QzfK4GTpvuibhTTONCNRzsdCZyEoyuuXcgHLmwiUlci6EeVwLwBQghsWzLcNwimxVHHHMSZn/swBx+0J+WqSX//kBJRjyClBAHpuhSxSJQnn3yOi395OZdfeyuyUCLR3IBh6EpU34D/lMyE+PpJWX7wf8thQMOuejrDd3fgyem8oBvF9JfMwPE7U4INWkuZ555oZbevLUBqBVIqc/cN0YRgOJPDGhxmhz124kv/9xHed8IR6D6D7p5+1WDBo2z0VBsb6wj6/dx62wNc8JM/cO8dD0E4RLo+9errFP9BCChWJIXhIH//ci/vOW6dk+HrXTV9CNhvOi/oNjHdGlg5nRecNmyBVlckP5xg1zOXsqLTpKHeVpm7r+PVkG5XD5HGer70+ZP5zKnvpaGhnu7ePkqlCprm2QVCMcbGWtWW5nqKhSJ/vvwmLvjpn2hfvopQcwORcBBbFWL/F5oGg1kwCPPUeevYfucuryckvRv4x3RdzG1ieiNw7HRecFqQoIVM8Pt59znb8I/7faRbK0hbicJGxFjXhcGBYSiVOe5dh3H2l09l9912ZmhkiEwmpzzRWYiUklA4RFN9A+vWree8H/+O3/zhWjAt6loaVCnN69A0GBjQ2HGBj8d++DKB2Cj2iGd7+K7BGdM2LWxKTGfSM8u+eFFIcRIEqLP40eXz+ce9QRJNFVBC+iqaJihXTAbXdtDWXM9vf/N9rrn8x+y441LWb9ighHQWI4SgWCiyrr2ddEOKX19yDjf9/afsvMu2DK3bQC5fRNNm0jJWW2wb6tIWz71i84mfLwRfAC1Y9Wrvxq2YQVuCM8kzfYBpjoFPB8IG0Vrm/vvmcMC35hAMl4gEVcIRjOVGaILB/mEolXjf+4/le9/8DIsXL6K7r49SsaxCuopX2dhYf25bM4MDw5x34W/58S8uh2qFupZG5aWOIYCKJcn2j3VI+tBKZ//Um6V3fcBcoLKlL+QWz/RIPCik2AKRKpPrinPKL1uBCtGQElIAoQkqpsXg2g5am9L8/rJz+dsfzqNtTgvr2jdQLikhVfw3Tna3zdr1HWg+nQvP/zK3XnsJO+2yHUPrOigUS8pLxXFCA4bAlyjxyT/W89xjbYj6So36Bm1xGoGv1toImDli+sNaGzDlSNBCVRBBPnbJVqxZb5NOWypzF9A0jZGRLNnuPo5/7zu4++bL+OhHTqR3YJjevkGEECqsq3hTNE1jdDRLe2cXRxy+P3f+8zd8/osfoziSYaB3AE3TvJvDOk5sCYkI2JUyp/yyjepQAi1eAW96p18GorU2YiaI6THADrU2YqoRwtkn/d2187j6niDxxuqs3ycVQoAQDHT2YAAXXfR1rv3bRcyZ1+p4o2WVqasYH0IIpC1Zu74TzdD52Y+/wVV/uZC2lkYG1nZg2nLWP5DZNtTVWTy9HM76/VyIaGiGWWuztgQRnJmnNWUm7Jm+CGy7pS8yrdgCrbHIqhdb2PErC6jKEskIs3qkmtAE5XKVXGc3O+61C7+46Gvsv+8e9Pb3UyiUlIgqJszGMpo5rS2sWLGaz37xXO64+W4CjWli0Qj2LA4HCQGlqiQ/EuSmr/dwzJHtzv6p975ueWAOMLKlLjDT90w/gteEVIIWqUI+ykd/3UYxVyUZnd1CqmkamUyOXHcfH/roe7jjxkvZd59dWL+hg2JRCalicgghME2Ltes3MG9BKzf+/Wd8/Zufo5zNM9A/NKv3UaWEkF+Av8Kpl7Uyui6JSJW9GO6NAN+ppQG1vsu+UePrTzlCSEhanHfFPB54ykeywZzV+6SapjHQM4BZqnDhRV/jL78/j0A4yPr2LoBZH4pTTA1COCVW3d395EtlfvDdL/L3v1xIOhlnYJbfa7YN6aSkp6fKp343DzQfmr9aa7O2BJ8GajaZpZZiehywuIbXn3psgWgs89QjLZx9dYJgndPAfjYixhr3D6zvpKW1kRuv/Clnnv4JevuHGBwcndXegmLLoWkauVyejq5u3nPCO7j9hkvZZc8dGVrXSXUWj+WTNsTqq1x5d4jr/tUGacuLffB9wOdqdfFarmg1dcmnnLHwrjUa5dO/a8WuVmdtGYwQgqppMryuk7323427b/4Nxxx9MO2dKqyr2PI4YV+Tde0b2GHHJdx2w6844f1Hk9nQPVY+Mzvvv4AhEKEyn/pTMyNrU14N954JxGpx4VqJ6bHATjW69hbBCe/anHfFPB571kdd/ewM72qaoFAsk9nQxYknHcst//glWy2ax9r1G7AtlWGpmB42lldt6OghGArytz/+kC997dMUB4YZGc3NysiILaEuIenvNfn07+aC5kN4L9wbxRHUaadWd5S39kptgagv89KTTXzvhgSBuhJiFla6aZrGaCZPsW+AM7/yKf76h/Mw/D46Onqc2r/Z9ytR1BhN0+gfGCZbKPDDc8/ikp+djVWpMjAwOxOT/hPujXD9rW0Ib4Z7Pwf4p/uitbib9gf2qsF1twwbmzMUw3z2D61UClVi4dkX3tV0jcGhEaq5PD++6OtceP6XyRWKDAwMz8pFSzFzcLLJ83T39vG5T3+Eq/5wPtFgiIGe/ll5bwYMAaESX/hrM9n2JCLuuXBvmhr07K3FnTQjWj9NFQIgZXPZDXO55wk/iVkY3tU0jYHeQXxC8KfLfsAXT/843X39ZDL5WblYKWYemiYolyts6OrkPSe8g39e/VMaGtMMdPQgZtk9aktIx202tFt89W9zIGQgdKvWZk01XwT06bzgdN9F2wJHT/M1txxSIJJlBlam+No1deixEsYsi2U6QjpAJBTiit+fz8kfOoGOri7VW1cx4xBCYJkW6zs6OeCAPbj9+l+xaJuFDK7vdPZYa23gdCIFkfoKv/x3jIceaEbUl73WoW0ecMJ0XnC6xfSL03y9LYowTND9fOlvcxjsM0nGZld4V9M0Brp6SadT3HzNJbz7+MPZ0NmJOYtLEBQzm41tCNe1d7HTTsv4599/xpLtFjO4vgs5iwRVAqGAAKvMmX9rhGwULey5UW1fms6LTaeYNgMfnsbrbVlsgaivcP+DjfzxrgjRdBU5i8K7rwppQ5rr/3YRBx6wJ+s7urAsSwmpYkYjBGhCsHZ9B4u2ns9tN17KnvvvytC6jlklqLYNybTFI8/6+c1NcyBpe+29744zJ3tamE4xPZUaZFhtKbRwFTkS5YtXNIIoE/R57DZ8C14rpDdc8RP232831m3oRKrm4goXoWkaHZ09tM1p5sa//4y93rbHrBNUXQj0WImvX1PHwMoUIum5ZKQvT9eFpktMfcAnp+laWxwhgaTNZf9s44nnAyRT1qzpvft6Id1vv91Yt6ELJKr0ReE6NE2jfUMPyboEN/z9p46gtnfBLNnvlxKSMRjstfjm1a3g93ktGek4YOF0XGi6xPREoG2arrVlkSDiFUbXpvj29XXoseKsaRm4Mdmovqme65WQKjyCrmt0dvZRV5/imr/+mKU7LGFwfdesyfKVNkTSFX5zV5SnHmtA1FW8low0LY7cdN0tn5+m62xxhJAQEpx7fRM9XZJkVM6KpCNN1xjoHyIYCvD3P17A/vvtoYRU4Rl0XWNDRw+NLfX844qLWbzdYgY7e2dNaVcoILBLVb5+dRNUgoiApzojfRQIbumLTMedsguwzzRcZ8sjBaKuwsvPNvDTf8cJpTw7uf6/0DSNwcERDF3j8st+wMEH7U17R6cSUoWn0DWNzs5eli5dxLV/vZCmlgYGuvvQde8Lqm1DPG3y78eD/OvuZkSdpzojNQLv29IXmY675DPTcI1pQRgm4Oe71zVTzlqEQ17LJP9fNE2QyeaR5SqX/eybvPv4o9jQ2YNt20pIFZ5D0zTWtXey7XaLufovFxJNxunvHUSbBYLq1wUYJb5+bRPWQBwR9pR3+qktfQEhNxGjtG+d1Hi4OLBh7E93IwVaQ5FHHprLPufMJRop4De8rSZCCEqlMvn+QS784Vc584xP0NHdhVlVdaSTxTB0DMNA0zQ0ITB8Oj7DQDd0dE1DAoau/1ePZ4nEsiwkIKXEMi2qVZOqaTp/t2wsy8I0zVmx9bClkGMRl/lz53D9DbdxwslfQug6qVQc2+PtzWwkI31B/vD5QU55/2pkt99LwbcdgBcmerB25MBb/n9joiceJyfhBSEFhM+EUohvX98AVacUxssZvBvHWOV7+jnjrFM584xT6O7tUUK6GUgpMQwdn8+H32cQCgUJBPwIDErFHKOZHMViiYppMTQ0wuDgCJlMnkKhiBCC0Ux2bAanhpQSXddIxmMIAYbhI5mMkU4nqa9PYegaoWCAeDRCNBoFoFwpO+evmlSrJqZp1vg34g6EcD679o5Ojj/uCH7+owE+89lzyAd8hENBNuWAuBldCLRQhe/dWMf73zZAMD6KzHumovHTwGe31Mm3tJh+fAuff3qwBSJd5d67WrjtySCxugK2hx7X3ggJjG7o5l0nHcsF3/8/BoZGKZUqqkXgJjB8BgG/j3A4RDgYxqyWGRwaoau7jxUr1tPV1Uvv0Ahr1nbQ3dXPaDbLUCZPNlegVCxTqVSoVqsgBLJcAcse25h23CURCABOQlgwECAUChCJhIhHQtQl4zQ11jN/fittzfW0NjewZMkC6uuS1KUShMIRypUSuXyBcrnqXEfxhgghsG2bzp5uPn3aB+jo6uXc7/4C35wmfIbhWUGVEpJxmzVrBb++rZHTP5pB5DyTGvJ+nK5IhS1x8i0Z5t0ReHaiB88kNL/TNvDgs5dxz3NQn7Y97ZVqmsZAezd77LMzN1/7c4LhoJr+8gZIKdE0jUDATyQSIhqOUizk6e4d4OWX17B8xVpeemUtK1euY21nD/39w5RzeSiVwTAgGABdx9A1dEN3Qr6a5jywSOdzeH33ANu2QToPO7bthHWd8K6NtEwoV6FSAb8PfyxKOp2kpSHNNosXsP22W7Fs8UK2334xLU31RGNxSpUi2WyeUqmiule9AbYtiUbD1CVjnHTKV7j6rzeSWtDm6aYOAhjNQ2PCz4sXrCTZOIKd9f/PvehSPgRcPpEDNxXm3ZJiejFw+kQPnjHYAq21yI03zee489tINBQ8XVeqaRoDfYM01ae486Zfs82yrWnf0D0rMhrHg5ROl6dQKEAqmcBnGPT3D/LSy2t49InnePyp5Tz/0kraO3opDg47j/qRML6AH7/fQNcNjGn4XVq2jWlaVKtVKhUT8gWwbHypBPPnNLHt0kXsuvNSdttpGTvvuA1trU3YAoaHRykWy0pYX4Nt29TVJamWKxxzwud49KGnqJ/X6un9UyEkg90BvvPhUb716ZXIHp9XvNO7gbdP5MBaiakfWI/Tj9fVaH4TND/7fm0ZDy+HdJ3t2eQOTRNkMnnMSoXr//YTjjn6INat71KhXRwR9ft91KUSBAMhenp6eOzx53nwsWe576GnWf7KWka7+0DX0aIRgkE/fp8PXRcz5n6RUlKpmpRKZax8AcpV/OkkS7eezz577sjbD9iDPffYgflzWzClZGholFKpXGuzZwSWZTNvbgvLX1rFoe/8JH2DI9Q31HlWUAUwWoD6mJ8Xzl9FunkYO+eZvdPFwKrNPahWYvpO4IaJHDijkAKtuchNN8/nnRe0kkh7t9uREFCpWmS7+rjggi/x5bM+SXtHB7YtZ20JzMYwbiQSJp1KUijkefTx57n9zke4/Z5HeOq5l7FHcxANE4qECQT96NrMEc+3QgD2mLjm8wXI5CASZumShRz8tt048tD92HevnalvqCeTyzA6mpv13qqUkgXz2rjmun/zng+fRSgaIRwJeXb/dKN3+r2PjHD2J1ciezyT2fst4Hube1CtxPQapnmW3JZAMywIGBz2rW254ylIp73rlSIEQ+s6ee+H3snlvz+PweEMxWJpVi6eGzNn03VJwqEwa9as57Y7H+b6m+/hvoefotg3CNEI0UQUv89Xa3OnBgHVqkk26wiriEXYa7ftOf7ogzjqsP3YccdtqJgm/f1DVGdpRreUTqekuW2tfOcHl3DO2ReTmNeC7tFcAgGM5ATzGwxe+OFKQolRbG9k9r4CLN3cg2ohpnU4taXhzT1wRjFWV3rnXfM49Lw2YvEiPo+GOzVNY6C7j2XLFnH7Db8mnorNyoSjjaUsjY1p/IaPRx97lmv+cTs33HIvK19YCbognE4RDPgZy6/1LJVqldxwBkplmhbM5egj9uOkE4/kwP13RzN0enoHZqWoSimd7OlohHeddAa33HAH6QVzkB4N9yIkQz0hLj51iNNPWeWlvdN9gYc354BaiOkngMs296CZhqZZENM57pxl3PigTn2jNyfDaMLpcIRlc8s1l3DQwXuxrr3Ls0/bb4Tjieo0NaUxhMY99z3G366+hWtvuouRjh5IxknGo+i67tmQ3huxsTwkmy9gDgzjSyU56rD9+MTJx3Pk4fuhGwbdPf2zTlRt26apMU1v7wAHH/UJ1m/opr6p3pP7pwIYygoWNft44YcrCEQy2EVPRGMuBs7YnAM2JaZbYsV8zxY45/QiBaRMnniynn89HSSaMj0ppABVy6IyOMI5XzuNt799PzZ09MwaId0ojE1Naea2NfHgA0/yoU98jSNP/Dy/+9XfKJSr1C2YQzoVR9O0WSWk8J/M5Xg0QnrhXHxBPzdeeyvvfP//ccIHz+TmW+6jsb6OOW1Ns+r3o2kavX2DLFwwlx+fdxbAq402vIYEkjGbVes0rnogBXHbKxNlTgQCU3nCqV41W4ADp/ic047QLJABfn5nGjNvenbwt6ZpjHb18o53H8YZnz+ZvoH+WbEgSimRUpJMxpk/t42XXlzFxz/zbQ4/4bNc8efrMfw+0gvnEo2Exl5fY4NnAFJKggE/6XmtRONRbrruNt75vtN59we/yD33PMbctiYaGupebXXodTRNo72jmxOOP4IzPvdhCj39SI8G/jUhwFfh0ruTyOEQWtATnbTmAAdN5QmnWkzfzxSrfS0Q8SprX45z3RMhgomqJ71STRMMDo7Q0NbMhd87A4Qgn/fm0/VrsW1JIBBgwbw55DI5vnr2j3n7sZ/k97/6G4bPT3p+G6FgYFYIwkTYWCKUntdKJB7ln9f+myNO/BynfPKbrF3dzoK5c4nFIp4Meb4e27YZHB7i7C9/gj0P3JOhrn5P5hlICYmExcMvBrj10XpIVr3SEmlKk2Sn+pM/dorPN+0IAL/O7++tIztoEwl64qb5H8qVKrJY4rxzvsCyZVvT3TvgyYVgI1JKJJLWlgYa0gl+94drePvRp3LBD35JoVwhvXAukZAS0fEipSTg95Ge34Y/GOBPv7mKg485jXMv+CU6sGB+G0ITnv59CiEYHc2RSCW44Dun4w8HyebynnwgNTQBVPn1PWkohtB0q9YmTQXHMIXO31Sunq3A3lN4vpogIlXyHTH++lAcI1r1ZIhPaIJsdz/vf//RfPTk4+nu7fdIp7A3xrZtwuEQC+bO5cUXV3LCB87kE588m5Wr26lbMIdEPDomtorNRUpJJBggvXAOg5kc3/jqjzji+M9w220PMK+tlUQi5mkvVdc1Ojp6OOjAvfnSF06m3DeE7cFFQ0qIJEz+9UyQ516og4Qn+jq3MIWh3qkU02OA0BSeb/qRAqI2f384xbp2jXjUe18KIQTDQxka57Xyra9+imKpQqlU8eTT9Ma90eaWBhLRMBf99PccfMxp3HjNLcSa6kk3pl99nWLibNwnrUvGSc1v47FHnubIEz7PWV/9IXbVZP68VhDe/T1LKRkYGuas0z/CXgftyXB3nyejPEGfoJqz+OP9CdB1rzyAT1modyo/8XdP4blqguY3YSTEHx9Igr+K8Ma+wH9RtSzsXJ5vfeU0li1bRP/AkCfbBUop8fkMFsyby7rVGzj+/Wdw5hk/IFsoUb9wDj5jdpW5TAcbs3/r57QQCAf58QWXcuhxn+Le+x5j/pw5hMNBT3qpQggymRzxZJzvffOz+EKhsezeWls2tUgJvmiVvz8WZWhdAhH1hHd6KKBPxYmmSkzrgf2m6Fy1QQJxk/ufSXPf8gCxuOW5sJ+maWS6+zjimIP5+EfeRW//W9dNuRXLtonHo7S1NPOXv13PwUd9gltvvJP4nBbqUnFsL2aUzSBs2yYaCZFaMJdnnnyBw4/7DOdf+BtSiTgNHu1nq+saGzp6OOzt+/Lpj59Ioacfz6kpEItIOjs1rnk0BRHbC4lIC3EaOEyaqRLTQ4HoFJ2rJjgjIw3+8lAcShZ+3fU3yX8hhCCXyxNJJfnWl09F0zUKBY+1C5ROtm5bayOG0Pj8Gd/n5I9+hd6hYccb1WdPLWStkVIigPq2ZjB0vvalC3jvh85idDjDwvltniyhkVIyksnwxc+fzNY7LmVwYNgpK/ESUoC/yhWPxGEk5ETz3M+RU3GSqRLTo6boPDVDxCp0r4lz/ZMR/PGK5xKPJFDqG+Izn3gP++6zK1093srelVKCBgvmtbJhfRfHvvd0fn7x7wjVpahvSGPbtuciDW7Atm0S8Sjxuc1c//d/8vZjTuXBh55mwdw5+HzeGrIthGB4OMP8+W18/cyPQ6lCxfSE2PwX0bjFvcuDPPRsPcQ98f7eMRUnmYrVNIjjmboXKSAsuenJJP19GtGQt54mhRAMDQyzeKelfP5TJzE8OuqpTgRSSgyfwfw5c7nr7kc4+OhTue+OB0jOn0s4FPBkWNFNSCnxGTrpreax4qXVHPbOT/GHP11DW0sz4XDIU5+Ppmn09PXzvhOP4MijDiDTO+iph1aAgC6QRZMrHosBhhcSkXYGtpnsSabiU94bpyzGtWh+E4bDXPloAnxVz3UwNy0LSmXO/NyHmTu3jZGRrGfCu7YtCQYDzGlp4Y9/voZj3vsFOtq7qV/Qhi68XefoJqQEaUvq5zRTMk0+durX+fb3LyGdjJNMxj0lqMViGZ/fx1e/+DGCsSj5QrHWJk0pUoIRrXLTUxFGNsQQEU8kIh082RNMhZi62ysFiJk8+VKK+5YHiMY8UYz8KpqmMdo7wEGH7ssHTzqanj7vdGmxbZtYLExzYz3n/ehSPnrqNyiZJg2tjdi2qhudidi2TTqdJFiX5LvfvJhPfeF7BHwG6foUlkcEVdM0unsGOOBtu/Phk46m2DeI8FjGfDwsWd+pcdOTSYhILyQiTXrfdCpW1UOm4Bw1QwBoBtc+FcMqWAQN198U/0WpXEH4/Xzxcx8iFA5SLJZqbdKUYNs2iUSMeDTCGV86n69/9UL8iSj1ae8syl7Ftm0i4RDRtiZ++6u/ctIpX0FYNi3NDViWNz4727bJF4p87rT30Ti/jcxozlPJvQIBmsk1j8ehEPRCR6S3AbHJnGCyYjoP2G2S56gpIlil2h/mpqcjiJC3psMITSPXN8h7jjuUww/Zl26PJB29KqSRMJ//4nlcfOFvCDfVE58lPWG9gNOO0E98bis3XnMrx7///xgdztDW1ugJQRVCMDA4wo47LOW0U95NdTjjqVIZCYSiJncvD7JmdRRirg/11jHJ8s7Jrqz7A+4ebheR3PlsghfWGcSj7v8Sv5ZisYg/FuFTHz8RoQmqFfdn3r1WSD97xg/4zS/+QrSthVAwoOpHXYaTmGSQmt/GXbfcw7vedzojQ6OeEVSAkUyGj334eOZts5DhoVHP5CoAhAOC7LDkpqfjEBBeCPVOat90smJ62CSPrykCQOrc+HQMqvZYM2dvIDRBoW+YD7znSPbfbzd6+9zf6eh/hfSvRNuaCPj9KtHIpUgp0YC6hfN45P7HOf59/8fQwDDNzfWuD9c7pTJZFi6cy6c/egJ2toCXCrSkBAyTm56OwWgYzef6h/WDJnPwZMXU1Y3tRbhCvifCnS+F0cPeamqfzxWIN9XzmVPfh2lZWJa79zRsWxKLRYiEgnz2jHOVkHoICQgpqVswh0fufYSTTvkqVrVKQ33K9R6qpgkGh0c4+YPvZNtdljEyOOIp7zQSs7h/RYDnV0TB/cmbO+PMOZ0QkxHT7YElkzi+9oTh3pfirOjQiYW9syALISgNjvKB9xzBbrtsS1//kKu/wFI65S/1dSm+9q2f8ptf/EkJqcfYKKjJ+XO4946H+ODHvo4mIV2XcP0+eCaTo7W1iY996DhkoeypvIygT1DJSv75bAwM3N7P3A/sOdGDJyOm+0/y+JoiAGydm59xQry6y0Ogr6VQLBGuT/LB976DcrXqasGRUmIYBi1NTZz/o8v4yY9/R6SlWQmpB5GArmkk5jRx0zU38/mzzicaCRGNhpEuViBN0xgaGeWEdx7CVsu2YnRk1DO5SFICPot/Px/FGgkj3N9e8ICJHjgZMXR3iDdUIdcd4Y4XvRXiFUJQHBzh+HccxO67bsfAgLvDSkII5rQ28efLr+Nr37wYf12CkBri7VmklBi6TmxOG3/49RV8+/u/pCFdjy/gc/VnPprJsWDhHE5+/9HY2QJ4oW/QGKGoyeNrgqxcF4Go68V0n4keOFEx1ZiEOzwjiMAjK2Ks6PRWiLdUqeKLRfjISceg6bqr90oty2b+3BbuvucRTv389xChAPFYVGXtehwpJX6fQbCpgR+ceymX/f4q2pobXf1QqAnBSCbLSe85inlLFjA6mq21SVNGyBAUMha3Ph8DXeDyB4WdmOC+6UTFdAlT0MuwVjgftcZtL3grxCuEID8wxOEH781+++5C34B790oty6a1pYE1azfw8c9+h0q5RLou6fr9M8X4kFISjYTQIiE+c+Z53H33I8yb2+LqDN+RkSyLt57Pu485GHMk462uSJrN7S9EnAYOmnsf4IEAsMdEDpyomO46iWNrjvBXqQxEuGd5CPymZ0K8pmWDYXDSCUcQDAVdW1cqbUkiEaVarvDxz36HtctXkW5uVEI6y7Btm7pUArNc5dQvfJf16zppaky79j4QAgrFMu894QiSrU0U8t7p2RuImjy2JkRHewTcPzR8QluYExXEKRmmWjOikhfXBnmm3Uc04s4v5hsxOjjCnrvvwOGH7kv/wLBr60oNn0E6leTb3/8l99xyL8l5rUiXLqCKyWHbNumWBla/uJLPfPFcDKERjYRdun8qGBwaYbedl3LkIftQ9FATh4hfMDBoc+8rMfDptTZnskxoC3OiYrr7BI+rOU5PScHdy+NUC7Z3hoALAZUK7333YTQ0pF3bg9e2JXNam7jiqpv5ySV/IdzcgO6BFoiKiSNtm8TcFm75x2388Ce/p6G+3rUhUtu2EbrOiccdiggFqLg4p+F/kIL7Xg6DJdy9awrbAcnNPWgiq1TL2MVcidAsKAS49+UwCO94O9lsjjmL5nHUYfszksm4sgevbds0NtaxYsUazjr7IvDphMMhl3ohiqnE0HUCDXV85/xf8+/b72Nua7Mr90+dnr2jHPi23dlnjx3JDo7U2qQpQwQqPLw6SKk/ighWam3OZGgAtt3cgyay4m4DRCdw3MwgUqWvK8yT60IYYXfuKb4eIQTVkSxHHbIPixfPZ3Q0V2uTNhspJaFQEL9hcNbZF9O1up36BvfujymmFiklsVgUq2Lyxa//mN6efupScVdmdpdKZerrU5x4/KFQrbo8+fU/xMKSlzp0nlwTgrDr39Sum3vARMR0lwkcM3Pwazy+NkTngE0s4PoPHICKaWLEIhx71AFIKV2ZUCWB5sYGfvvHa7npH7cRn9OshFTxX9i2TV1LAy898TzfveDXJGNRDMN9+3OaJhjJ5Djs4L1pWziXXK5Qa5OmBJ8msEqS+16JgxC4PNi72fumExHTSY2pqSXOhyt5YEUUqsIzXUiyQxn22m179t5zZwaH3NddxbYljQ11vPDiK3zrB79Ci4bxGUatzVLMQAQQbmnk0t9dzQ033c0cl06YGR3NsmTxAg45YA8qI1lPJCJJACF5cp0Pyj5nS829TEuYd9EEjpkRCMPEzoR5dI0fdO+EeKlUOPqIt9HQkKJUct9eRSDgw28YfOe8XzOwoZu6uqTaJ1W8IVJKwqEg2DbnXPAbBvqHiccjrrtfpJRomuCow/aDYADTI1EYI1zl8dUR+jrDEHZ1icxSoG1zDthcMW0Dtt7MY2YOEZP2ziDPrg8TcH/bKwDyhSLptiYOOXBPsvmC68phbNumtbmBq669lWuuvZVYq6onVbw1tm2Tam7gmYee4heXXkF9XV2tTdpshBAMjWR42z67stP2S8gMjdbapCkhGhC0D0ieaQ9BwH1JkK8hwmYOctncd7sENycfGRpPt4cYGrUI+1z9Qb9KaSTL/nvtxPbbbs3wSKbW5mwWUjrNGbq6+zjvx38AXSfgd/esecX0oCHwpZP87DdX8dTTL9LYUOc677RQKNHS0sAhB+yBLJU9EerVBFCVPLo6DtL1+6bbb86LN1dRNuvkMwmBAAmProp5oQ7KQQBCcPDbdicQ9GNb7lpMAOqSCS797dW89MTz1DWmXZmdqZh+nAexGMNdvVz40z/i9xnoLktGEkJQsUwOffveBBIxyqY3omUIyXPtGlRcv2+6WSWgs0dMdRPyQZ5t18HdH/Cr5PMlGlsb2X+fXcgXS65KPJJSkk4nef6FFfz699dgpJPeeMBRTBu2bRNtaeCqf9zOv29/iJbmetdtEQwPZ9h1p6XsutNScsPuiiy9GVqwynMbIgz1RCHo6n3TLSqmrm1uT8ikpzvMi51RjJCrP+BXKY9m2Wf3HdhmyULXTaEQQhAJh/jV766hb30XiUTUdWE6Re0JBgLYpTIX//JyivkSwWCg1iZtFuVyhYbGNAfutyuUK54I9UaDsKYPVvcBQVe/n4U4e6fjYnPENApstdnmzBT8Giv6DDqHbKJ+b+yXIgQHH7A7oVAAy0UhXikl9fUpnnjiBf76938RbEi5evizonbYtk28qZ477niIm26+x3WN8IUQVKsm++21C0YsQtUD7QUNTWCWJI+vTuHieSjgJNyOu3plc97pQmDuZpszAxAAUvD4miR2VeLCTnv/Q6FUpr65nr322JFiqeKqEK8QgnAgwO/+cj3Znn4i0XCtTVK4GL+hA5LL/vQPctmc67zTkdEsO+2wmB2WLSLrkVAvUvBsuwHS9Q2etoiYblbNzYxDwvIuwHb5RztGaTTLLjsuZemSBQyPuucLKCXUp5M89sTzXHXdbQTrlVeqmBy2lMQb0txz32PcdPO9NDbUuSqRrVgs0dzSwJ67bocsl2ttztSgV1neHcAajSB8rk6sGnd5zOaI6bIJGDIjED4TKxNhZW8QdPfvlwohwLLZfZdlRKMRbJeFhsKhAH++4iZGu/uUV6qYEvyGDpbFH/92E4V8Eb+LSqyEcCoN9tt7ZwgEsD2QO+APW6zoDtHe44eQu9an17F0vC+cFWJKyKK9x88rXSH8YVd/sABULQtfNMw+e+40NjnDPd52XSrGCy+t5rp/3o2/Lqm8UsWUYEtJtCHN3Q88yd33PkZDfcpVCW35Yokdt1/CvLkt5AvuHJ/4WsI+jd5Rk/WDOhiu3lcbd57Q5rzL+RMwZGZgaKwf1OkdNT3RrCGXybPN1vNZtngBmWy+1uaMG9uWxGNRrrvhDnrWdhCLjztRTqHYJAGfgZXLc+W1/0baNprunu96Jptjq4Vz2H7ZVlSz7pv69Ho0AZjwzLoUSM1VOR2voxkYV5hjvHebhkv3TIUApOZ8qObYh+xy7GKJHbdfTNvcZgqFYq3NGTfRaIiOzl6uveFORCSkvFLFlCKlJJhOcuudD/HMs8upS8ZrbdK4kbYkGPSz645jAUAPrFPYwimPwQbp2jc0j3Em3o5XTFuAORM2p5ZIAdis6sMzyUfoGrvuuBTDRU/eUkrqUgnuuPNhnn9+BYlUotYmKTxIJBxiuLuP6/95DxGXDZaXwB67bY8RCrlyEs7/oFms7NWhEHCa5riTION0JMe7GjcDrlz9hGZB2c+6AQ2E+/dLK6ZJNB5jx+2XuGrShKZrlItlbrzlXrAsdC/UJylmHFJKRCjEv25/kK6uPsLhYK1NGjfZXIGtF7axaGEbWQ/MONWCJmv6YvT3xiDoWjGFKfZMmydhSG0Jmgz3xljbF0Nz9wcKQD5bYKsFbWw1311fuLpUgudfXMndDz5JqC7uKo9B4S7idQmee3El9z34JCkXhXpzuQILFraxdMkC7Lx7vttvRsgH3SOSnqwJfldHBceVLzReMZ03CUNqix86R206hyHor7Uxk0eWyixeNJeWtkaKBXfUpDkzKAPcdvcjjPQMEA6Fam2SwsMYmgbFErfd9QhIp7bZLeiazjaL5uOFzjJ+XZArWLQPBt2erDIu/RvvJ+beTF5d0DOqM5q3COiu/kAddMG222w1FiZ1xyrh8/kYHspwxz2PgmEor1SxRZFSYiRi3PvgU6xZs4G4m7LGNcHOOy1F+P3urzcVgBS82JEEy9UZvVMqpgsmbkftEAKwNV7pqvNE8pEtJZrfz47bL0G46EkvlYrz3AsrePKZl4mk3BN2U7iXWDzC2tXrufv+x4lH3SOm1WqVeW1NNNYlKFYqtTZnUggA2xkW7qrwwP/SNJ4XjVdMGydhSG2xoH1Qd3pEukd/3pBCuUJzQx1zWhopld3xRZNSEvAZ3Pfgk+SHRggEPBBrV8x4hAQsmwceeQbLRR3CstkCC+a3sdVWcyln3b9vipR0ZyywXT1Dug7YZKu28YipANKTNqcGCClAt+geLYPl4o9yjEquwPx5rcyd10w+7476UsMwyGTyPPjos6Brbn9CVbgIPRLiiaeXs259J1GXtK2sVKqk0ykWzmuFqvsTJvFX2TAYozQUA79rW7m2jP28JeMR0yQuFVMMEzsXYsNQEHT3PJ2+KVWThfNaqatLUqm448ZMJKKsXLWeZ55fQTARq7U5illELB5hxer1PPv8CmIuEVOnTa9kwdwWMHTXP3v6/JK+UR+9Iz7wufbNBIH6Tb1oPGJaP54TzUgCJoP9MbqH3F8WIyVg6Mxrc6qU3BKyDvr9PPP8K/T3DRB22WgshbvRhYYsVXj8yRcQQrhCmKQEQ9dYumwR6M5oOTfj12EgazNUsMCotTWTYpPJHuMR0xTgzlVQEwwVbUYLNj691sZMDoEETWPJNgsxdPc8sUpp8/Bjz4HpgciAwlVIAF3jqedeYXQki88li0DVsmltSpOIRai6/Hvj0wX5ks1IAXB3NUXDpl4wHjF1ZecjAHwwWqwykLMJGK7+IKlYFrFomLmtjZguSagIBPz09A7y4surwa8SjxTTTyAe5YWXVrFy1Xri8WitzRkXpVKZ+nSS5sY0hZI7asnfDAEgBWt6U25PQmrd1AvGI6abVOQZi9DozwQxqxKXaymlcpX6VIJ4NEy56o790ngswtp1HaxcvYFwzB0LmcJbhAN++gaGWbW2g4BLZpwWCkXmzWtl7rwWbBcNsnhDBCCha9jv9El37zo8JZ6pK5OPBIAlWNeXZCxI6mrMQpHWOU3Mm99KwS2ZvLrOilXtjIxkCPrdvWGicCdCCDAtnn3+FaRLZv9alk0wGKA5nXJ99rvjmcJgDnBPK/E3IrmpF4x3z9R9jD0R9Wc1Z/Nk5n+H3hrTpLW5nmQyTqXihmQqgWXbPP/8K+CSsLTCo9g2q9ZuwLRsVyTuCSGQtqSpoQ5clB/xptgwXDBBSDcvw1Pimbozk3eM0aJ0GjbU2pDJous0JBNYloXmgu5HQoBt27R397v+6VrhbrRwkJWr2mlf3+WKKTJSSnRdo21O08aBzLU2adIM5aXba/03mTvk2QQkJ7wgGcxZbg8vOL1sNUE6nURzw6M1EA4HaV/fxcpV69FCM38BU3iXUChEd88A3b0DhF1yL2qaxpw5LWPlMS7HV2UwF6c6GgOfO/I93oBNJn2MR0zrpsCQmpEpuf+pTgAIwbz5bei67opG8aFQkO7eAXp6Bwi5ZAFTeJOAX2d4NEtXzwA+wx1791XTJB4NkYiEXF8eoxmS0bxOpqCDMfPXrjdhStoJurPG1DCxMlGGclHwuWGP8c2xpUT3+WhqTLumW4PPMOgdGGY4k8Pvc8cCpvAmUgqwbVasWIdpWk5S0gzHtCwioRDRSAjT5WJq6JAraoyWNHCvoz0lnqk7e8DpknLJR75sgObuOG/VskiEQwR9BlVz5j8YCCGwLYvVq9qRKvlIUWOc6VE2HV292NIda4FpmsRjEeKxKBXTtaFRwGnJna9ICmU5/tEqM48p8UzdOTNLl4wUBZmCwHDv0xAApmkRDgcJh4OumYBh2TY9Pf1gS1d4AgqPY0sGRzIArtgmqVRMUnUJkqk4tkv6cL8ZmoCKJTGtmf97fws2WaQ8HjF1x+r9egSYNli2cEtk9E0xTZNoNEI0GsF0gWcqpSOgg6MZsN3hCSg8jt9HT+8ggwPDrhgDWKlUSaXiJFNxcEUp3JtjaIJ82SZbkm5uKbjJElHPNm1Ag3zZ+dHdG1oAwDLt13imM1+cdF2jXK4wMJxxzR6vwtsYAT+DgyP09w8TDM58MXUQJCJh13+HhADbAqGZbg7zbpLxvDV39OB6PQJKVUmxKt2fXV6tkkzGSSXjrhi9Fgj46e8bYqB/CFzgBSi8j89nkMvlyeTyGK5ZECR+Q3d9kbwY++dgNgq2y9/MW+DdMC+OR+qJedSWRTAUIBwJuiKzz+czyGRyZDJ5fCqTVzEDMHSdQrFEsVhCd4mYCiGc5vwu90wBkNA5FPNGA503YTxi6k7HXBdkS5JcSWK4oGPQW6JpRIIBbJck8+i6TqFUolhyz8Kl8DaGrpErVShVTdd4pgKBz+cDl8xi3RSGPvMdgcng3akxAsqmxDSli/e8/0PERYO1dU2jWCxTLJZds3ApvI+0bfJumsIi8NT3x6974IngLRiPmLpWijQBCC90tsQ1M0wVihmLtOnu7HVFeZmUEk0I6utTYwuZi1exMQUZyuluH8P2lrgzhKuY0Ri6Tq5QJFsoYrg9lVrhKVzSs+FV3LCtMy4kDOZ0Vz8TbAq10rkBIUgmYq75YmlCYFo2lmW7pjG/Ynaguezhzg0NJsaLT4V5FbVESkAIAoEAwiXxEcdk4SRO1NoYheI1eEmcFDMLJaYuwVadhBSKyWHD0PAotnRHVrzCXSgxdQmapj4qhWJSCIiEQ2NCqjxUxdSiVugZjvO9l5TLZaRLFgDHZAlSuiQwrZgVCGfO7thXSqGYUpSYugEpGRnNuma/x5YSQ9fQdQ3bJTYrZgeWCzqIvRYvhaOrlnfeyxuhxFQx5ZiWRTQcIhYOYbqgMb9i9iBctuK55QF6kwhIRy3P1pjC+MTUtZ+mLfFML0gvdUJRKGqC0Ghta3JFi0shBLaUDAwMjy1kLl7FxhSkLmqBkC5WlLdmPGLav8Wt2BJICBgCwxC4eyatQ75UrrUJ48aybUKhAKFQQHVuUswchCAUCtXaivEjvdX5rKLCvLgzTmdJYkFBNCgwbZerqW2TL5XRNOGKsI9lWYSDQULBoCtatym8j2XbRIJ+Aj7dNfekRFKtVp1EPg/okGnN/IjAZBiPmLr2N2DZzo/rb0Rdp1QsU8iXMIyZ/3FUqybxeJR4PEK1atbaHIWCquns40fDIdd4e1JKMpmcN1KPBbTVZT3TK/2NGI+Yzvxp1G+EhKBPEPIJXPLdeXN8PkZGMgyPZPD7Z/6s9nK5QkNjHfUNdVCu1NochYJq1SQajRCLRlwjpiComJbr1UeO/TMdy4Hm8jfzFoxHTAe3uBVbAhsiAefH7QmluqFRKJQoFEroLugtalk2gYCfdCI2ljyhUNQWs1whnU7S0JCiVHLLA55kNF9wvWcqJWg6SNtw66bhuPBumFeCoYGuSbffixiGQTabJ5vNYxhGrc3ZJEIIpC1JJWLgAvFXzAIqVZqb0qTrU5RdEC3x+30MD2cYGc6Af+Z/598K05ZEAhqxoMDF2aDDm3rBeFa6zBQYMv1YgmRIEg9LXFan/T8Yuk6pVKZYKqO7pK2grmu0tTWBS5KmFB5HE6STccAdjRD8foPhoVFGhjNoLtjaeStsCX5dYOgz//f+Fmxyu3M8K3N2CgyZfixBIFglHDDBcocAvRmGoZMpFClXTXwu8EyllGi6zqJF8xAuqOlTeBspAU1jTmsTmku6NhiGQSabJ5PN4TfcLaaWDRG/IBwQbg7zFjb1gvHcWe4pcHwtpoEez1Efy4E58wXordA1QbVSobtnwDWl21XTpKk+RSoepaIyehU1RAgJmsaSJQswDN0VkRJD18kXi+TyRVdk8L8VpgXRkE0iaIN7o4SbdCrHI6ZDU2DItLPx65IMuUV+3hwpnX9saO/EtCxXhKmKxRItTfU0N9VTLJZqbY5iFlOuWKQSMVqb66ma7niw8xkGmVyR0XwRn8vF1DYFiYhFPGyBOfPXrjdhk07leMR0dAoMqQ1CkAzpru9ALIQAWzI4OOKaxvGFQol581tZvPV8bCWmihpSLBZpaa6npamegkvuRdu26ejoxv11fUDVRzqawZfIQtW1IevZ65luJBEW3igUtiz6R0bRdR3bBeUmUjozWOe1NHiga4bCzdiFEou3nse8+a0UCjNfTIUQWJZNZ0fvWFjK/d+fuogAfeavW2/BlGTzjkzejhowdg82xOyxAZu1NmiSGAZdPQOMjGTwuyJVXqJrGjvssA2oJCRFLdE0tl44F0PXXFEmJ6VEaILe/iGwLPc/i2qQChsghZuX4YFNvWA8Yto7BYZMOxJAlyxoHAHcP6TaCIfo6uilfX0X4Yg7mnWblsWSreeRTMYpVdyxV6XwFlJKMHR22mEbhKbhhqdqXdcolcr0DA67PqojYWz8Gm7fbhvZ1AvG8/Y2qcgzFmnTEC9h+ATmzP8OvSXBgI+B4VEyuQIBnzv2HTLZPAsXzGHxorkUsrlam6OYhRTKFRrrU2y9cA7lijs6o4bDIdrbu9jQ3o0WdseD85syFiFsTVXcPn6tb1Mv8HYCUhUSIR/1UY2yy9XUr+tkcwU2dPW5ZrZpuVyhuSnNdksXQWXmd51ReI9yJsf2227N4q3nO03jXUAwGGBgcISevkHCwUCtzZkUjmcq2appGDTpYi3d9CjS8YjpMG6tNbUldSGNRFij6vKkOIkA22bFK2vHymNqbdH4EEJjnz13BJen9yvchwCwbHbdcRsSyRhVlywCPl2jq3eQ0Wze9WUxVUsSCWokw7i5lSBAz6ZeMN4wrztDvWWDdEOWlrosdskNSTtvjhCAadHe6XymbkikAChVKuy8wzY0NNZTcNGAc4X7saSNCPrZY7ftnaQeFzyACgGmZfPy8tVjZTEuMPotqFhQH9OoC+vg7rSJkU29YLzZvO4sjzENtGiRuXUl8MJgWp/B2vYuhoZGXDGKDWB0NMfireez8w5LKI26szOlwp1kM3mWLJrPTjssIZvbZDe4GYGUIBCs29ANpnsiUG9GtSJoTFRpSlah6to3U2Ic09PGI6aScWy+zkSkkGDptCQCbq9xAsAfDbO+vYsN7T1E3JLRa5rE4xH222snj0xqV7gFK19k912WsWB+GzmXiKnf72NwcJi17V3gc3c0DYCKj7npLMG6LFTc4QC8Ad1jP2/JeJOVNxkvnrHoMC9tOY0bXK6n4YCfnv4hOrr7CAb8tTZnXAghKFdNDthvNyJ1SVeMv1K4HykAXWP/vXdGd0nCHkAsFmbd+k7WrNlAIBautTmTRwha4rrbk4+GmKJG9wAdk7OlNjjTImy2aR3yxIR3TQjsSoXnXliBdEEXpI0MD2fYcfsl7LbzUvLD7pzop3AX2UyehYvmc/Db9iCTy9fanHHj8/lo7+ylb2iUkN8dD8xvhgTQJPPqhdsjUuPqtTBeMV0/CUNqiyVpTlgkIjpld2eTOViSl15Zg2XbuCU5oVqtkqqLc+hBe4FpuqJRv8K9CCEwR7McuN+ubLXVXDIZ94gptuSZZ19GVipobv+eSEBItpszArrt5shg+3heNF4xHdfJZiQVaEtotKWg5IEIowgGWLl6A92dfYTC7qhBE0JQKJY5/OC9STbXUygWa22SwsOYtg2hIIe/fW9wmVNk2RavrF4PtnsHf26kYkmiYZ156ZIzIdy9TKmYunfPtGSQasqysNH95TEAkViYNes6WbO+k1jUPXsqQ8Oj7LDdYg7ebzeKQxnlnSq2GJmhUXbcbjEH7LcbwyPu2VaIRsOsW9vJyyvWoUXc891+M4pVaEkKmmMGVFwtpuOKzG6OmLqyE5K0dQhUWFBvg3RPIsKb4TcMcpksz72wAkNzT7NL27IJhAK886gDQdfHwtQKxdQihEAWi7zjsP1obW10xZSYjcSiYVat7WT1Wnc9KL8Zdslgq8YsDU1ZcLcjs2E8LxrvatyNS5OQEBLQ2LoRTyQhAWDZPPXcy5iWewRJCMHQ8CiHHrIPO+ywhNFhVz6bKWY4+UKRVEsjxx9zEPlC0VUREAE8/uQLmMUiuu6eB+U3xdZZ3GRBuIy0XCumJaBzPC8c7ydmA10TNqeGOOMAbXZeMAyG20P3DlooyHMvrKRzQw9hFzXCzuWKzGlr4oTjDkHmiwjNPQudYuYjhKA0OMKRh+zLzjstY8hFIV6hCUqlCk89t9z5Dx5Yp9AkixoBtDGnxpW0M8WeKcDqidkyAzBt5qctmhIGhap7vLk3IxqP8Mqq9SxfuY54LFJrc8aNpgky2RzvPu5QmhfOIeumLEvFjKdcNdGjEd5/whEITcN2UeQmHouyZm0HLyxfgy8WrbU5k8aWgIHjxAhXZ/L2AOMaN7Q5YvryxGyZARR15jVX2Ka1SKXg/n1Tn65TzRV4+LFn0V0yo3EjQ8NZtt92Ee8+5mAqQyPKO1VMCZoQ5PoHOXj/3Tj4wD3pHxh2VYg3Egry3AsraN/QTSQcrLU5k6ZQtWlKGMxPW2C656HmDVgz3hdujpiumIAhMwJZNdDjeRY3lcBybUurV5FSgq7xxNPLyeXyaC7q8AJQKJY5+aRjSbQ0kndJmzfFzKZiWqDrnPKBYwlHQlRcMrsUxr7PAh585Bkol91fXwpUCjpLWorMa65A0V3r0+sYtxO5OWLqzgSkjQhY1opnkpCCiRhPP/cyL69YRyoRr7U540YIGBgcYc/dd+B97z6c0sCw8k4Vk0ITgkz/IAcdsCfHHn0gff1DaC66p0KhIL09Azz21IuIgDtqxzeJ5WNZSxk9kUdWXZt8BJvhRG6OmK5lnBuxM42NA2r32GoEzSe8UA9NOBhgoGeARx9/jlDQ76o9CSklhXKZj3/4eGLNDco7VUyKiumMKjv1I+8iGotSctmov2QixhNPvcjzy1cTS7nnwfgtEZKd5plOT/Ra2zI5xp0rtDlimmMz4sczjorNkkaTtjqNXMUDagogJXff9wTFYhldd8+TuBCCgYFhdt99ez703ndQ6lfeqWJiaJpGpneAQw/dl2OPPojevkE0F9VfSynx+XQefvw5zGwen8u2bN4I05YYQcEei4ZxCkFcSwdbSEwBXtnM188cigbNLQW2a8thFt2/bwoQSMR4+InneWXFWhKJWK3N2SyklOQLRT798RNpWtDG6GjOVQkjiplBqVxGCwb4v898kFAk6DqvNBDw0983xAMPPwMBv7N/6nJyJdiqEacspuTq97MeGHfJweaK6Qub+foZg7QMiJTYaZ4Ftvuf/gAikSB9XX088PDTREJBV4V6hRAMDo6ww/ZL+NTHT8QcGnF7OEgxzWiaRq67n/e96zCOOGxfunsGXOWVAqRScZ569mWefPZloh4J8dolHzvOzVPXnIOSqx2XzapgmT1iipMxt9fWWdBdPVvvP0icUO/9T1AuVdBcFOrdyNDIKKd99ES23W0HhvoGXZU4oqgdQghGR7OkWps46/RTqFRNLNOqtVmbhZQSv25wx12PUB7NEjBcnajzH6Rgx3k2+KtOO1f38szmvHhzxXQFzt6pOzFtdplXpC6he6J5A0AwGeOBR5/lxeWrSCXd9WTrLIg5Wlsb+dqZHwXLouyikgZF7bCRVAdH+MJp72PXXbajr3/IddsE4XCQ7u5+7rzvcUQw4IkQry0Bn2CvRRkQEpe7LS9uzos3V0w7gVWbeczMIW8wr63ETvMLlHPeeAqMhEMMdvTw77seIRYJY7usX6KmaXT19PO+E47kxBOOJNvV57pQnWJ60TSN4Z5+dt53Vz77qZMYGBqqtUmbjZSSumSc+x9+imdfWEG8LlFrk6aEXNkZBr7zvCKUXe2w5NnM3goTWbVcm4QkTQMtXmCvrSrg3sbL/4WUEgJ+brntAfr7hwgG/bU2abMpl6tUTJNvf+2T1M9tYWhoxHVehmJ6cGbjlkDTOOcrp1HfkCKTybvufhFCYNuSW25/EEplV02AeivMgo89FuVpbCtAwfX7peNqcL+RiXyCD0/gmBmBE3IQ7L8kBz7pqoSdtyJWl+Cxp17kkceeI12XcN370jRBX/8Q22+3Dd/9xqexcwWqpllrsxQzEAkUuvv41Mffw3HHHkxHZ58rJ6wkEjFWrFzHnfc9jj8Z80SIVwBIwW4LqhBw/X7pS5t7wETuwucmcMzMoWKzx8IibfUa2bL7b2BwZpya2Tw33XIvQghc9pAOOF/Enr5+PnHKCRz7rsPJdPSocK/iv9A0jaHufrbdfQe+9ZVPMpLNYbos6QjAtiXJeJTb736EzrUbiHpgdilA1ZboQcEB22RAun6/9LHNPWAiq9XLuDkJKe+jsbXAbguKmAXvhHp9yRi33PkwK1euJ5Fw39QJIQTFYomKaXLh9/+P1kXzGOh3VwG+YsshhCCbzaH7DS4690yamhsYGs64Mvs7GAwwMDDMNdffAT6f61sEbSRbEGw7x2K3rYpQcP2bempzD5jIStXNZmY5zSSkrUO4zIFLCyC9s1DHYlE6Vrdzy+0PkIzHsV3YM1HTNPr6hliyZCsu/P4XoWpRcNmAZ8WWwbQsyv1DfPurn+SIww5gQ1fP2MQkdyGlpD6d4N77n+Dhx58jlk7W2qQpQ5b97LOoRLAhhyy5L3fjNfQzTWFegCcmeFzNkUiwJQcvy+ALa1Qs1z9BOUgJfj9/v+52+vsHCYXcOcZJ0wQdXb2c9L6jOePzH6bQ04/lwgcDxdQhNI3RDd0c9a7D+fIZH6N/YADpsqz1jWiahrQsrrnhDmSxjN8D7QNfRUgOWFrwQh3/C8DI5h40UTF9aILHzQxygu0Wlth5XpVc3n1Pt29GIp3ksSee57Y7HqKhPuW6MpmNmFWTweERvnP2ZzjoqAMZae9CuNALUUweTdMY7O5n0XaL+eVFX8eUNrl8wZXRCikl6XSSp555mVvvfJhQXcITiUcA+Yqkvk7jwG2yUHXfPvbreHoiB010hXoKF3cwlhUf/vo8By0rQsVwZcLOG2HoGpgmV1z7b0rFEj6/O/eEheY0c/AF/PzuF99m4bKtGexR9aezDU3TGBoexQj4uOxn32L+gjbXNbJ/LUJAMODnymtuZaS7j3AkVGuTpoxyzmCfxSXmzM9DztUlMTBBZ3Gid+UK3FxvCoDN4dtnwadhudSDez1SSiL1ddx29yM8+NDTNNbXufbJV9c1urr72WrhXH73i2/jDwQZHBpx7UKq2DyEEOTyRex8kV/++GscfPDetG/oduU+6UaSyTgrVqzj2pvuwkjGXRuqfkNsjUO2y0GohO3ukpgy8OhEDpzonWkDj0/w2JlBHvZekmVJm0W24BHXFAj6fVSzef50xT+xLQvdxXsyuq6xfkM3Bx+0N5dd8k1ksUwmm3NlBqdi/AghqFRNSr39fOPrn+LUj72Pzp4+1z4YglMOk4hFufoft9Gxup1E3H0Z929G0ZSE4zpHbJcFS+Ly9ORncUavbTaTecy7fxLH1hxZ9BNtyXPodgWsgs8zoV4pJaF0kuv/dQ9PPPUi9fVJVy9CUko6uno5+YPv5rzv/R+VoVGKxbIr98wUm0YIgWlZZDs6+egnT+I7Z3+G/sEBquWqqz/zRCLKmjUb+MPlN6FHw7hccP6LYs5gj61KLF6YB/e3aZ1wU6LJiOkDuHnfFECzOHpnb4V6AcKhIIWBES7/+78I+HyuXoSEEJimSXdvL1/90qmccebHyXf3UK5UXP2+FP+LACzbZrSjl2NPPJpLLvwquXyRXK7g6uHxtm1Tl0zwjxvvZN0ra4in3Nel7M0QAqjqHLFDDj1ZQFZcL6b3TfTAyYjpK2xmI+AZRwEO3DbDkjneCvVKKQmmE/zt6n/z5NMv0djg3r1TcAS1VCozMDTMed89ndM++xFynb1KUD2EAKQQjKzv4MBD9+Xy35+LLWBwaNT1++TxeJSurl5+f/lNiHAIzb1fxf+hVJX4Y4JjdsqCCVK4+s1VmEDno41M5i6VwCOTOL7myIKfSHOeQ7b1VqgXIBINk+kd4JeXXYWh667eOwWn/jSbzZMvlvjFT77OaZ/9kBJUj7BRSIfWdbD3gXtzxR/PR/f56B8YdmXf3ddi25J0KsmfL7+Rl55+iWQ64fY2e/9FPqvztiVldliSg6y71xic+aUT2i+FyYkpwO2TPL6mSABh8c5dnFCv6aFQr7Ql4cYUf7v6Vh548EmaGutcW3e6EU3TGB3NkskX+MVPvqEE1QMIIbCBobXt7P22Pbj+qoupq0/R0zPg6sxdcCJEqVSMtWs38Ks/XIsWC6PhnftUCMA0OHaXLCQK2FXXh3jvmczBk71bHwDcPc05Lzhkp1G2X2CSybn7y/t6QqEQlWyeS393DdKWrq07fS3/K6gfJtfZRbFUVlm+LkMIQdU0GV7fyduPOoh/XPVTknUJOl06CeaNSMbj/P4v19P+ylpSHmrSAFAoS2IpwbG7ZKAswd0hXoC7J3PwZO/YduDJSZ6jpsiSD19DgWN3ySOLBl5aj6VtE21Mc/UNd3DbnQ/R0lzvyp69r+e1gnrJRV/jrK9+lkLvAJls3vX7a7MFIQTlSoXMhi7eeeKRXH/lxSRScc8IqdODN8lzz7/Mb/54Hb5UHM9kHeGE5os5g4OXldhqUQ6yrm/UMAg8OJkTTMVde+cUnKNmSADb5IRds+hhnZLpnRsenI4rslLhop//lWKh5Nqeva/nVUHNFfjReV/i3PPPojKaY2Bw2PXhQa+jaRr5QpFcZy+f+PSHuOKPFyB1je6efk8IKTjvMRIO8fPfXEXf+k7iiaiXtHSsx7nBiXtkIFzCtly/X/oIkJ3MCabizr1jCs5RW7IGu207zAHLyuTcv4n+X9i2TaKpnnvueIjLr7iZ5sYGT3in4CxY2Wye7r5+vvalT/GHy35A0DDo7+pD04SHdqe8g6ZpDA6OUBoa4Vvf+z8u/dk3KVdNBge88xBk2zYtzfXcd/8T/OWKmwk1pr3V7QjIFATz22yO3W0E8sILId6bJ3uCqbh7HwG6puA8NcOuGJAq8P69RqHqw2ursKHrEAzw45//hQ0bOkkmY57Zu9E0QblUpqO7m1NOPpF//v1nzJnXwsC6TiwpVWLSDEEIp+fyQEcPQcPg95edy3fO/jyDIxlGRjKeCs+HQkEq5Srn/fj3lLI5ImHv9OAF57M0cz6O3TVPcm4WmXd9iBfgrsmeYCru4BJu906FhILg2N1GaGi0yRW9ITQbkVJSV59i5bMvc8mlV5BKJPBSHZAQArNqsr5jA28/eG/uvvkyDjh0f0bWb6BQLHtqoXYjTqKRxeCadpZsu4jbb7yUj37kRDq7eygUip76fGzbprmxgSuvuYV/33Iv8ea0ZyJBGylbEhEyOGnPLGB6odDnGaag1/xU3cW3TNF5aobM+mnZKsPxu+WpZPxe0hrAcbaDjXX88rdX89DDT9HqkWSkjQghwIZ17V3Mnd/KTX//KZ/7v49THBpmoN+ZNOKxj9QVaJrGaCZHZkMPx7/3GO7652Xst+8urNvQQbVqeipy4JTCxFm/voMLfvJHCAXw6e7PoH89uYzOgctK7LvTAGQ88f7+NRUnmSoxvQPITdG5aoKUgDD58L4ZCOreGRo+hpSSaDRCfniE7/7wMmzLJhwOeibcC4Bwwr6dXX2Y0uaSn5zNn/9wAU11KQbWdlC1bE8t3jMZIQQSGOjsAdPivB99hb//9UISqThr13cixl7jJYQQJONxLrrkz6x8djnp+pS3vl/gRPEqPk7aOwPJorNF5n5unYqTTJWYDjDJtOKaI4CMwdt2HuSAZWWyGd1znoxt28RbGvn3P+/md3/6B00N9bU2aYugaxqZTI7O7h4+/IHjufuW33LkOw8h09HN0HBG1aNuYTRNI5cvMrxuAzvvtj233fBLvnrWaQyPZujvH/JUWHcjlmUzd04zt9/1EL/63TWEmxs8VQqzkWxe0NZmc+Jew5DXvJB4tJYJzi99PVN5V183heeqCXbFgGSRU/YfgYrP7X0m3xCfrqNFI3z3gt+wfPlqGurd3xnpjRBCUK2arGvfwIJFc7n+yp/w4598g1g46HippuU5z6jWCCGQUjLQ0U25UOLMr3yKO264lAMP2JP1HR0UCiVPCqmUkng8SmYkwze/9wuqxSLhcMhzWioEVHM+3rtnjroFo0j3DwEHJ6pqTcWJpvLO/idOMpJ7ERJyGu/dZ5gF82wyOe8ttlJKUnVx+tq7+O75lxIK+gkG/d4LR+Es7kIIerr7Gc0V+OLpH+Puf/6Gd554FNneAQb7Bl99nWLibAzZDo1kGF7fyZ5778Kt117Ched/Gc1nsL69C6R3f89CCOrrUlz40z/x6D2PkWpp9FQ+wkZKVYkvqnHK20bBsryQeARw7VSdaCrFtItJzIKbKci8j8icLB/aN4OZ81bz+41IWxJraeDKK2/mD3++npamBq98Md4QTdMoFIqs27CB7bZbzLV/+zG//fX3WbxoHkPrOhjJZB3hrbWhLkQIQb5UZnBtB+l4lB+c/yX+ff0vOfzw/Wnv7GJ0NOtJb3QjlmUzZ04z99z7CD/62Z8JNNaheXDREALyowbH7Fpmx+2HYNQTXmk3k+zH+1qm+i6fMpWvFRKgYvGxA4eIpTXyJW/KTMDvQ4SCfO2cn7F8+SpamryV3ft6HLEUdHX30z84ysc/eiJ33XwZX/nGZ4iHQgyu3UBeDR0fN047wCqD6zuplMp85LT3cfc/f8PXv/IZLGDd+k6k7e06XykliUSU0eFRvvLtn1IplIhFI56M8pi2BOHjtAMGIVT0QscjcKKp5ak62VSL6XVMoXG1QmZ8LFya4d27FymN+jzVr3cjti1Jp5P0d/Zw1jd/AlISiYQ8uRC8Fk0TlMtl1rV3EI1HOf/7Z3LnjZfysU9/ALNaYXB9J8WSEtU3QwhBpVJlsL2LfCbHMSccwb+v+Tl//PX3WLhoHus2bCA7S3oka5pGOlXH93/4Wx679zHqWr3TXey1CAGjozr7bFvmiL0GYMTnhcQjmGLnb6rv+G7g3ik+57QjbR1Emc8dMogRMShVPXHj/A+2bZNobeJf193OTy75M431DbNCRDbupY6MZFi/oZOlyxbxu19+h9uu/QUnnXw8ZqXK4NoN5PLFsdfX2OAZgBCCUrnCYHsXuUyOY999ODde9VOuu/wiDjpoTzZ09tLfP+TJkpc3wrZt5s1p4drr/81Pfv4Xws0NeHWjwJISTD+ffvsIIlXELnmiHKaDKQzxAohNeSL2rZtdPvEJ4LKJGjRT0DQLYjrHnbOMGx/UqW+08GDSK5oQZLJ5sGxuueYSDjp4L9a1d3mmT+p4kFKi6zpNTWkMoXHPfY/xt6tv4dqb7mKkoweScZLxKLque95zfy1CCGzbJpsvYA4M40slOeqw/fjEycdz5OH7oRsG3T39nmu+sCls26apMU1v7wAHH/UJ1m/opt6j2yQCGMoKFrf4eOGHK/CFM9hFT+yXXgycsTkHaEcOvOX/3xJiWgdsAMKbe+CMQgq0hiJ33jWPQ89rIxYv4vNivBcnXDXQ3ceyZYu4/YZfE0/FGBgYnhWhutcipcQwdBob0/gNH48+9izX/ON2brjlXla+sBJ0QTidIhjwI8DTSVuVapXccAZKZZoWzOXoI/bjpBOP5MD9d0czdHp6B2adiIJzj0QiIeLRCO866QxuueEO0gvmID0opAAIyVBPiItPHeL0U1Yhe3xIb3zk+7KZCbO1EFOAa4ATJnLgTEIzLAgYHPatbbnjKUinbc/Vjr2KEAyt6+S9H3onf/v9eQwMZygWS7NusYSNnqpGui5JOBRmzZr13Hbnw1x/8z3c9/BTFPsGIRohmoji93niKR0EVKsm2WwBMjlELMJeu23P8UcfxFGH7ceOO25DxTTp7x+alSIKTg8GXdeY29bKd35wCeecfTGJeS2ejeIIYCQnmN9g8MIPVxJKjGLn/bU2ayp4BVi6uQdtSky3VPD7z3hATO2qgZYu8oVDBrjjiVZMu4ju0UVEIIm1NfH3v93Erjss5StfOo0NnV1Ylj3r9gyd8Kakr38ITRshkUrwqVPfz8kfPJZHH3+e2+98hNvveYSnnnuZ3GgOomFCkTCBoB9dE6544BKALSWVqkk+7wgokTBLlyzk4LftxpGH7se+e+1MfUM9mVyGDZ29WJb16n7z7EQyt62Za667hXPOvZRQYxrDy6F/IbFyfj56wgihtlFkj98rE7Uu3xIn3VKeqR9YDzRP5OCZhOY3QfOz79eW8fBySNd51zvVNGf/tFIsc/3ffsJxxx7M2vVdqv0ejrfq9/uoSyUIBkL09PTw2OPP8+Bjz3LfQ0+z/JW1jHb3wViHqWDQj9/nQ9dnjrjKMfEslcpY+QKUq/jTSZZuPZ999tyRtx+wB3vusQPz57ZgSsnQ0CilkuuT86cEy7KZN7eF5S+t4tB3fpK+wRHqG+o8uU8KjmaOFqA+5ueF81eRbh7GznnCKwVYDKza3INqFeYFZ4P39IkePGOwBVprkRtvms9x57eRaCh41juFsf3T/kGa0nXccdOlLF22Ne0butF1b4ayNhc5NiM1FAqQSibwGQb9/YO89PIaHn3iOR5/ajnPv7SS9o5eioPDTmwwEsYX8OP3G+i6gTENv0vLtjFNi2q1SqViQr4Alo0vlWD+nCa2XbqIXXdeym47LWPnHbehrbUJW8Dw8CjFYvlVL1ThJBzV1SWpliscc8LnePShp6if1+pZIQUQQjLYHeA7Hx7lW59e6aW90ruBt0/kwFqK6Y7AsxM9eCah+U3Q/Rx89jLueQ7q07YnM3s3omkaA+3d7LHPztx87c8JhoOzMiFpU0gp0TSNQMBPJBIiGo5SLOTp7h3g5ZfXsHzFWl56ZS0rV65jbWcP/f3DlHN5KJXBMCAYAF3H0DV0Q0fTtLEfAdL5HF4fVtu4gEtbYtk2ti2xLAvTssEyoVyFSgX8PvyxKOl0kpaGNNssXsD2227FssUL2X77xbQ01RONxSlVimSzeUqlihLQN8C2JdFomLpkjJNO+QpX//VGUgvaPBLtfGMEMJqHxoSfFy9YSbJxBDvrmRDvh5hgmLeWYgrwGLDHZE4wI7AFWkuRe++ax0HfnUMsWfBsZu+rCMHQ2g2866RjueqPFzCaK4wV43v8fU8Sw2cQ8PsIh0OEg2HMapnBoREGhkZYsWI9XV299A6NsGZtB91d/Yxmswxl8mRzBUrFMpVKhWq1CkIgyxWw7LFCVwlCIAIBAHRDJxjwEwj4icUiJCIhkvEYTU31zJ/fSltzPa3NDSxZsoD6uiR1qQShcIRypUQuX6BcrjrXUbwpUkp8fh9tzc1845yfcO53f0F8ThM+w/DuPik4GbzdQS4+bZjTP7oK2e0Zr3QImAsUJnJwrRKQNvI7vCCmmkQO+jhwr34O362e2x7XqW/wtncqgMTcFv5x5T/5ypwWLvrhl6hWq5TLFeW9vAVm1cSsmuTzRaQcxDB0fD4frS2NLNpqHoGAH4FBqZhjNJOjXK5QMS2GhkYYHBwhk8lTKBQRQjCayVI1TYTQXs0wTsZjICAYCJBIxEim4jQ0pPDpjrhGoxGi0SgA5UqZYrFEpWoyNJrFHByu8W/HPWyMOrQ1t/Cr31zOuT/4FaGmtOeFVAgYzmhstVDyycP7ICu9IqQAVzJBIR0PW9ozjePUnMYnc5IZwVjd6SMPzWWfc+YSjRTwG965y94IIQSlUpl8/yAX/vCrnHnGJ+jo7sKcpaURU4lh6BiG4YR1hcDw6fgMA93Q0TUNCRi6/l9ddSROSBec8KNpmpiWRbViIqUT9rUsC9M0Z0zSkxuRThCA+XPncP0Nt3HCyV9C6DqpVNzT+6QANpKRviB/+Pwgp7x/NbLb7yUx3QF4YaIH19ozzQB/x+mK5G6ERA772HvvPk7aL80Vd/lIN5tID3+3pJSEQgGqqSRnfeMi0vVJTvnwiWzo7FT7a5PENC1Mc0rGKCqmHMmctmbuf+AxPvzpb2HbNvUNKWzLw192QBMwNKyx0zaSDx/SB6PCS0L6CJMQ0vEwHRklv5yGa0wL0jSACt96dw+BmE6h6JU9+TfHtiXxWAQR8HHqF77Hddffwty2ZjRNU96PwnPYts2CeW289OJK3vPhs8iNZGhoSnteSAEqlgQzyLkn9KLXZ5AFjzQkcbh0S19gOsT0aTww5xRwvNMhP0t36uf0IzIUh/1emZ7wlti2TTqdxLRsPnjqN7j7nkeYN6cNBEpQFZ7Bsm3mtDXz8surOeFDZ9Hb3U99SyPWLBBSTYPMoMERe5R4x8E9yCHdS15pP3DVlr7IdNU6XDJN19niSCmgKPn68b00twpGcmJWdAiyLZv6hjpKxTLvPeUrPPDg4yyY26oEVeEJLMtm7pxmurv6OO59p7PyxZWk25o8v0e6kWJZogV9nPueXvCXkGVPeaV/Akpb+iLTJabXAJ3TdK0tiwCZ8ZNYOMx3jh/CyoacEUWzANu2qW+qZ6B3gONPOoMHH3xSCarC9ViWTVtbI0MDw7znQ2ey4sWVpOe3ebd5/esQGuQH/Zz29hy77tmPHPKD5qkv9C+m4yLTJaZV4NfTdK0tjhTAiMapx3Sy+w5lRoZ1Tw4QfyNs26a+tYnB/kGOU4KqcDm2bTNvbjMjQ6Mc997TeeyBJ6mb1zp7hFTASBbSTTrfe08XVKpIS6+1WVPJDcC66bjQdLa0uQyoTOP1tih2wYdI5rjopD6QAc8OEH8jXi+oDzz4JAvmtiE04ekaPIW3sMf2SDs7enjne7/Ao/c/Tt2CNsQsuoctKbGyQc49cYj6xcPIkYDX8kB+OF0Xmk4x7QH+Mo3X27JoEjng52379XHK2/PkBn2IWdRt77WCevwHvsi99z3G/Dmts26AtsJ9SOlMzFk4fw6rV63n8Hd+isceeIq6BXMQUnp6Tu1r0TQYGdTZe6cKpx3bASPa/7d333Fy1fX+x1/fc6bvbJ/dzWbTlkBCCF2agPRIF6QpIJeriAUFvcBVEFRUpIOiXvHaQJQryI8qTSxUIzUQlBRIQhKS7XVmd9op398fZzcEJMmG7M6Znfk8H499pJLzCdmd93zb51tqf/eXgIWFelihX/5vKvDzJpS2A+Dkuf6MddQ3BhhIURabkUZtCNTefo495Xzuvf9xpre0ECjxLjFi8tJaowzFrBlTWbx4KceddsHIGunUsgpShbfpCDPMjWd0QeUQbjpYamf9ri/kwwodpkuAhwv8zImjNHogTGKHfq4+pQ8nFcEusxAZ3ZQ0nMlw+mcu4fbf3cO0qVMJR8K4pdxvUUw6WmvMgMnMaS08/fSLLDjxi6xc/pa32aiMghQApRnuCXHekSn2P7AD3RMutU1Ha4F7CvlAPyYmr/HhmRNGA/QbnHvC2xyyV57BngDldrmKF6j1WFpz9rmXcdPNv6K5sYGqqoqyOVogipvrasLhENOntnD3PY9w3Klfoburl8S0KWWz2WiUoaA3aTB9hsk1Z6yDjF1qm47AmwUtaIsxP172nwWe9+G5E0OBmwlCNM3/fLqNUCxIKl1e073gnUOtr6shGK/goguv4uJLriMei5JI1EqgCl+5rktVVQXNTY385Jbf8IlPX8JQNkNiSkNZfm7mbA2ZCD/6VAeVMwbQyZLbdNQL3FLoh/o1hvq+T8+dGIZG94TZ6UOdfPOEQXJ9Ecps0gjwXrSqqyqINia48dqf8alPX4qdt5g2bQqu68rRGVFwruvSkKilMhbja9+4gfMvuBIzFCSRqCvLIFUGpHqCfPLQYU48aj26t6Q6HY36CT6cHJnoW2M251Vgt4n6wwtOgxGzcdwI+399R15YBokGhzL8ekUphWXbJN/uYN+D9+Y3P7+SuXNms3Z9G67jSoN8MeFGX9emtTQx0D/IF87/Hvfc+RDRKQ1UxCJluZ7vTe8qEpVh3rhpOTXN/bj9kVIblQ4DzUBqvP/gLd0a4+fq3jd9fPb4U+AOBzGrh7jlnDaMYJChTPlN98LIpcqBALWzWnj+2Zc59NjP8dDDTzCjZRrRaHm+kInC0VoTCASYNWM6/3ztDT56whe5586HqZreTKyMP/9ytkZnwvzs7A5qWvvR/SU3vQveDt5xD9Kx8DNM/wgs8/H548/Q6K4we+7XzpWnDpLti5RNq8H30lqjgMTMFtrbuvjYJ7/CjTf/kqaGOurrq8tyik1MPNd1iccrmDa1mbvveYQFJ3yBV154jbpZLSV/sffmvDO9m+GkY9ZDaU7vWsCP/Hq43/tOS2pnL4w0wh8wufT0tRy4p8VAd/nt7t2Y67okpiQIREJcfOHVnPWZS8mls8ycMRWgbF/cxPjS2tux29zcQEUkzGXfuonTzrqY3oEkiTL/XDMM6B1QTJkS5GfnrAXXws2XVCP7UbcA/X493O+X+d/gnT0tHSPTvVQMcevn1xONBxkYomx6974fbzdlnHhzI7+79W6O+NgXWPiPV5g5XaZ9xbbzpnVNWmdOZ+3qNj522gVc9b2fEK6sINFQnhuNRikFmbyGfIhfnNtG9ayBUp3eHQa+7WcBfocpwNf9LmDcjezu3X73Dn58Vh92MkLe0SXWXGTraFcTDgWpa53Ba68u4YjjP88PfnQrDfU1NDXVe4fmy3TkID4413Wprq5k2tQp/OH/Pcxhx57LXx55iuoZLcQrYmUdpOC90RjuDnPBccMcd9Q66CnJ6V2AG4ABPwsohjB9CPin30WMN60V9Jmcc/JaTj0kS7IrWGodRraa1hq0JtEyBRu48MKrOPmMC1m3to1ZM6YTDodklCrGZLQtYOvMFlzb4YKLvs8nzrqY9e1dJFqnEZBLFzAM6Osz2WMe3PCZt2HYxbUDfpc1EYbxwtRXxRCmAF/zu4BxN9rMQWf59fmr2G6mQW+vWdbrp6Nc16WmppLK5kbu/8MjHHrsudz6m/9HU6KWpkYZpYrNGx2NzmiZyp8ef5bDj/scP77p10Rrqkg0JbwzzX4X6TNDweAwGKEwt523nmDdIG4yVIrTu+DdDDPkdxHF8tL+GPB3v4sYd4ZG94eJT01y23ltQKhsj8u8l3Y1oYBJfes02jp7+cy53+CMT1/K+nXt3ihVevuK99BaYxgGrTOn4VoOF19yHUedfD6LX3mdulnTRo69lPe0Lni96nO2xhqM8L//2cOu+6xH94SK59V+fHVTJBtZi+l/b+mNTgFtgO4M8ZFD1nHdmQNkeyPYbnmvn47SeKGaaKgl3pjgrt/ez6HHnsuvbrubhrpqWqY2er9PRqllbXSmor6+huktzTz0yBMccfznuPHanxGORUi0TNnw+wRopUl1hfjUEVk+e9pa7xiMW7KvOJdTJPdk+9kB6f08CBxfyAcWhAYjakMoxElXzOW+Z4LUT82X8if4VvNG64renn7I5jjh4wu4/GvnsteHdqd/sJ+BgRRGOW+JLlNaa6KxKE2JBlavXsPVN/6Kn996D9gOdc0NKCVroxszDOjpMdh1VpAXrltGuHIQdyBSqvs1VgGzC/WwLXVAKrYw3R54s5APLBhXYdRlGO6vZs+LduSN9TYNCRdHZqXeRSlF3rJJtXUQb2zgwi+dyXnnnkZTUyPtnV1ks3kJ1TIw2sWoeUqCTDrD7Xf8kWtv/g1rl64o65aAm2Mo6B2CADEWXb2anXdvw+0MF9f84/g6CbivUA+bbGEK8FPgi4V+aEG4YDTneO2lqXzo0lloI01tJWXZv3dLDKUYSA5h9/Yxf6/duOS//pPTTj4SMxigvaMb23akx28J0lqjlKKxsY5IKMRjjz/LtT+4laf+shBiUeoTtRt+n3jH6HnS9ECEP/x3J6eesBrdEaKEF5QWAgcU8oGTMUyrgHYgVugHF4JCo5rz/P6eVs64oYmKuiyREHKjyvtQSuFqTX9nL9gORx93CBd9+SwOPWQfcpZNd3cfriuN80uB1hoU1NfVUlkR5+WXX+OHP72DO+55DJ3OUj2lgUDAlBB9HwqwtWawI8o3zxjiuxcsgR4D1zIp3SxlL+DlQj5wMoYpwH/hXe5aejQYQQcaXC65cR7X3hmnZmoWU6my386/KRumftu7MCpjnHHyUZz/+dPZZ+9dyeSydHf3S6hOUqMj0ZqaSqora1iyZDm/uv0+fn3Hgwys7yDalCAWjUiIboYyNL1tQY79sMND31sGTg53uGSPwQDcCZxe6IdO1jAFWAls59fDJ5RWGBV5MCMc/825PPQPk/pmy2v0IDZJKcVwJku2q5fKpgSnn3wk5/zHieyz924SqpPMaNOFmuoqqiurWbVqNb+98yH+99Z7aF/xFoFEPdWVFaDL8WbgsTMM6Ok2mDc9yAs3LCVeN4jbGy3VDUcAOWAW0FHoB0/mMD0S7/xpaXIVRn2GdH81+/z3PF5fbZFodGX9dAu8Tb+K1FCafHcvlc2N7wrVnJWnu7sf27YlVIuQ1hrTNKitrSYeq2DlytX87q5HuPWOB1mz5E1UbTW1NZUoZJfulhgG9PQrKqMRXrpqNXN2bi/1DUcAlwFX+fHgyRymAI8CR/lZwIRywWjKsWZ5E3t8vZX+oRwNdVp2+I7BpkL19FOP5iMH7AlK0dXdRy5vlfCy0eShtSYYDNCQqCUUDLJ48TLu+MMj3HXfn1m7bCVUxamrrZajLmNkKBhMg5WN8OdvtXHE4WvR7SW94QhgDd5spS+vkJM9TFvxzhKVLKW9DUnPPD2Dg65owQhkqJMdvmP27lDtI5Ko5fijD+JTnziWww7eh3i8gr6BQYaG0jIFXGCj66HRWITG+jpyuRwL//Eqd97zGPf+8W/0rG2D6ipqqysxpJfumCkF2bxmuD/KL77cy2fPfMPbuesYpbzhCLyB1Z/8evhkD1OAK/D5ap2JppSLas5z172z+eT1UwhXD1MZUcgxurEb6flAOpMj09ULFTEOPXAvTjnhcI5acADbbTeTXD5Hb98glmX5XW5JGz0jWltbRUU0RntbB0888xJ33fs4f/rrQnJ9gwTqa6iKx2QkupWUgrytSXVF+PaZQ1zx5eXQB26+pHfuAjwMHOdnAaUQpgpvM1Kr34VMmI12+P7oV3P5yi+qqajPEAkpOTLzASilyOUthnr6wXWYPW97jvvogRx/zCHsu/cuxOMVDCRTDA2lZW11nIyuhcZiUepra7Asi0WvLOGRx5/lwUee4tVFr4PjEGuoIxIOoUA2Fm2lDUdg2iN8+ugcv/7GUkhbuJmS3rkLYOFtOmrzs4hSCFOAw4G/+F3EhNIKI5KHygBfu3lHrr87QmVjjlBAAvWDUkphOw6DySEYSBFpqOMjH96dY444gAWH7cecOa0Eg0F6+wfIZLLSCGIreQFqEo2Gqa2txlSKlavW8szCV3jkT8/w5ydfYGBdB1TGqKqpIhgIyCh0WyhN3/oQxx3g8MfvLgMyuKmSvOj7vS4GbvS7iFIJU/DOFn3C7yImlKsw4jkIhzn7qnnc/liQ6uYcATmDuk1GR0HZXJ503wDYDlNnz+CgD+/B0QsO4MP77sp2s6ZjBoL0Dw6SzmSx8rbc7vM+Rqdwo9EwtTVVKGDN2jZeePGfPPH0i/ztmZd4Y+kKsB3CiVpi0QiGTOVuM6U0ve0hPrKr5vGrlhKpGMbtK9meuxv7J7Cr30VAaYVpNd4wvyQ7I23gKozqHOgoJ39nR+59OkDt1BwGEqjjQSmF47gMpTPYA4MQCLLdDjM5aP89OGDf3dl3713YfrsZRGNxhtMphtMZcjkLxynPUavWGsM0CAWDxKIRqiqrsKwsb61ez6JXlvLU31/mqb8vYunyVTCcRtVUURmPySh0HBmGpqczwPxZJs9cs4LaKb24XSV9lnRjewMv+V0ElFaYApwF3O53ERPOVRh1WaxMjCMvm8cTi0xqmyVQx5tSCsu2GRrO4A6mwDSZ1jqNvXbfif322YX99tqFuXNm0dhQj2GaJIeGyGZz5PN2ya61joZnOBQiFApSXRXHAHp6B1ixci0vv7qU5158jYUvvMaqt9bBcAaq416ABgOyEDrODAN6uky2n2ay8JqVNEzrLYezpKN+BHzF7yJGlVqYAvwZOMLvIiacqzASWXKpGEdfvhNPvGZQ15QD6ZI0YRzH9aZ4kymwHKqaG5gzewZ77zmfXefvwG67zqV15lTq62oIhiKks2ky6Sy2Y5PP25Nu9Dp62XYoFNyw9hmPVYB26e7po6Orl8WvLePlV5fx0qLXWbZiDT3rOkBrzOpKYrEIwUDA779GyRrtbpSoDfH891ez3fx23PZIuQTperzr1XJ+FzKqFMO0BXgLCPpdyIRzFUZDllyyggP/ex4vLUXaDhaAUuC6mmwuTyadhdQwhAIkmhtpnTGVXebvwC47zWbO7JnMndtKVbyC+kQNhhEkb2XJZHLkLQvX1ViWPbKxyd+/k2EYBIMBzJFvI5EwkXAEgN6eXobSWVasXMvSZSt58611vPLqUlauWU9bWxcMpyEWJVwRIxIJETAN2RQ3wTYEaV2IZ7+7hrm7tOF2hPH9E6lwDgGe8ruIjZVimAJ8AbjF7yIKwlUYjRm619dx6Dd24PXVLvVNEqiF5jgu2VyeXDbnhQsQS9TR0tzA9OZGdpzbyvbbTaO5McEOc2bRkKglEgpRU1tFKBRFY48Eq00+b2E7DlprXFejtcZxXJQC23ZwXT2m18xAwASlMAwDQymUUhiG9+NQMEgoFCQQDGAQwLFzDAwkyeRy9PYlWblyLevaOlnb1sXr/3qTNes7WNfWTaq7Fywb4jFCkTDhSEhGnwX2riD9zhrm7jpyL2mJHyTdyM8owms4SzVMAZ4EDva7iIIYaTvYva6eQy6bzZJVLnVTLJSWNVS/uK4mb1nkcnmcfB6Gs2AaBCrj1NdX01RfS0N9DTNmtjBjejN1VRXU19VQV1fD1JZGKuMxAiOhFwwFiUbDuI5LvLICGEt4uWTSaVytyeXyWJaFZdnkLZtsLk9nZw/t7d309Q3QnxpmXVsXb69tp6Orm86eQXr7B8gNpiBvQSyKCoeIhL11UtMoj3nEYiRBynq8ngJF11mllMN0KvAmpb67d5QLxpQs3W/Xc9S3Z7PoDahtysumpCLiunrD+mnessG2IZMFx4ZIhEA0QjQaoaIiRlVljMpYlIpYlHg8Rl1tNZZlM3VqI/HKGLbtbPI5hmFgWRbtbd04jstgMkUmk2U4nSGZGmZwOEN6OOM1pchmvRoMAyJhCAUJBQIEQ0ECAVOCs4hIkAJFOL07qpTDFMpld+8oF4zGHOn+OMd+ay5PviK7fCcLx3FxXMf71nGwbRfXdcF1wHG94FXKGynqsTRmVhAKet8GTO+V2DAwTAPTNDFNg0DAxDC8wCyfpbbJafT4S0N9iGe+t9pbIy2/IP0xcIHfRWxKqYcpwP3ACX4XUTAuGA05csmRXb4vG9S05LzLxSVRhZhUvJ7Smt7OIDvOVDz0zbXMntuJ2xWizIL0TWCO30VszpbCtBTmeD4FDPhdRMEY4HZHCFelefTKJZx4kM1Ae5i8PbZNK0KI4qAArTS9HSF2bjV55upVzJ7XjttZdkEKcJrfBWyrUgjTIeB0v4soKEN7gRpPc993lnHWERapzjDZvASqEJOBUuCg6VsX5qBdXZ6+bjmJlj7ctmg5HX8ZdTHwqt9FbKtSCFOAx4Cb/S6ioAyN2xsBneH2y5dy8akZhnuiDGe9i4OFEMVp9Bq1gbYwJx7k8OfvL6W2qd+b2i2VV+Sx+ytF0MR+PJTSP91XgcV+F1FQhsZNhiGf4/r/Ws61nx0kOxijf9jbjyKEKC6GguEcpDojnHtMnvu+s4RQPI3bGS2tV+OxSVFCs4ql9s/3cSDvdxEFZWjc4TCkbL722Te47cJOnHyUnn6FWWr/ukJMYoYB/cOQ7Y9yxdkpfv6NpaAz3gxTeTStf69PAN1+FzFeSu3l9i3gbL+LKDilvQuCexVnn/omf71iPTXRCN1dJkrp8tvKIESRMQ3o6Vc4uSi/+GoX3/7Scu9i72TZBum1wKN+FzGeSi1Mwbv39H/9LqLglMbNm9AR5rCD17Lw2lXsOMOktz2MrWVjkhB+UHh3kXZ3mdRGIzz+rfV89vQV0KNw06FyDdKFwCV+FzHeSjFMwevd+y+/iyg4Ba5joDtCzJvfwfPXv8Ex+9kMtkfIWFo2JglRQEqBrTW9bWF2blU8d90qFhy+FtpD3htfVZZBmgRO9LuIiVCqYQpwLJDxu4iCU6BRuO0RqhJ9PPy9pXz1lAzp3qhsTBKiQAwF6ZxmsD3CSQdZPH/DMubs1IFuD+E6RhkeI93gZEponXRjpfzSuhb4pN9F+MYAtycGOssPLlrCL7/ajWtF6elVso4qxAQyDOhJQWYgxqVnDHPPd5cSqxrCbY+gUeUcpJcDf/G7iIlSymEK8CDwHb+L8I2hcYfCMKA555MrePbKdWzXFKa3PYQl66hCjCulAKXp6TKpDEa48+tdXHXBMsjncPvK5lLvTXkA+L7fRUykUujNOxb3U079e99Lg2G40GTR+3Ytn7l5Fg8+GyJcl6MyAm5ZLt0IMX6UgpytGeoMs8dOLndcuI55u7VDVxDXCpTr+uiolcB8IOd3IduiHHrzjsUngFV+F+EbBa42cNvD1Df28cCVS7nyM0lyQxF6+hWGTPsK8YEZBvQPwVB3lE8fk+P565cxb347ui2Ma5XtRqNRWeAoJnmQjkW5hGkOOAJI+12IrxS4vVHIWVz2+WU8fsV6WhNhetpDWK5M+wqxNZQCjTetG9IxfnlhF7++fAnB2DBuR9mvj446CVjhdxGFUC5hCl5Dh5P9LsJ3hsZNB6AzwILD3+b5G5dz4oE2yc4YA8PS11eIsRjdrdvfFmHvuYrnrn+Lcz6xCgZd3MFweb2ybtollFhjhs0pt3/yx4AL/S7Cdwpc18BtC9PQ1Md9313KD7/Ug6Gj9HSbaGSUKsT78ZoweN2MMkMRzj8lzXPXLme33dqgLYSbK/v10VG/wutyVDbKZQPSe/0E+JLfRRQFV2HE8lDn8OpLU/niz1p4brFJuF42JwmxsQ2bjLpDzJpm8tPPtXH0gnUwBG4yWH5Dk017EjjU7yLG25Y2IJVrmAI8DBzjdxFFQYOhNDTmIBnnm3fM4Mq7a0DnqKtzUEqxhU8TIUrWhtHooIJ0mP84Ms0PzllH3bQ+6Ang2qasjb7jLWB3vE5HJUXCdNOCwCt4W7YFgAtGpQVVmqeebuErv2pm8RKDUCJHlYxSRRkyFGQszXB3iOZmkxvP7uT049eBlcftj0iIvtsgsAvwtt+FTAQJ081rxOvh2+B3IUVDg2G60JjH6q7iW3dO49r7q9F5i5qEjSmjVFEGvD0Dmt5+E+wwnzp8mOvOXkfz7D7oNnHzQVkbfTcXOAB4zu9CJoqE6ZbNAxYBEb8LKSr6nVHqcwubuei2qSx8JYCqyVJfIaNUUboMBaks5HpDzJkN15zZzcePWg92Dt0XQYOMSP/dScB9fhcxkSRMx+ZgvEVzsbHRzkkNeRiKc9O9zVxxd4JUn008YREJKglVUTKUAtvVDPYEIBzk/GOSXH3GOiqmDkJ3ANeS0egmnI+3qbOkSZiO3WnAXX4XUZQ0GDELal1WvJ7g8v9r4a4nY2DkqK1zMGTqV0xio8fAepMKhsMcvKfF1Z9q58P7d8CQxk2GZCS6ad8BrvC7iEKQMN06XwZ+7HcRRUmPNHSozwIRHn5iCt+6s4FFrwegOkt93Ps9kqliMjEUJLOQ7wvR0qL49qk9nHtsO1QMQ0/ZX5e2JTcBF/ldRKFImG69i4Hr/S6iaGmFEbQhkYfeKm54cArX3Jegt8shXG9RGZb1VFH8NpwZ7QlixAJ86egk3zy5k4bWXug3cDNBCdHN+x1wlt9FFJKE6QdzA2X0jusD0WDELah2WbO0gavua+IXf6lEpy3iCYtwQKZ+RfFRCmwHBgdM0CFO2D/N5ad2sNeePZB10INh7/NWgnRz7qIM74qWMP3gJFC3ZHTqtyYH4QDPvZjgmnubeODvFaByVNXaBE0JVeE/pcB1oX/QgFyI/Xe3uezEHo45uB0CGeiJ4LrSmH4M/gYc7ncRfpAw3TY3Axf4XUTR02CYGhJZsKI88kwT1z+Q4MmXwxDMUVXjEjSRUBUFpxS4WtOfNCATZrc5Dhcd38NZCzqhchj6AnJmdOyewbt9K+93IX6QMN12/wec7ncRk8KG9VQLkhXc/WQjP3y0noWvBSGQl1AVBbMhRFMGDIXZrtXlwuN6+dKRXZBIwYCsi26lZ4DDANvvQvwiYTo+JFC3hgYjbEOdDYNx7n66gR8+IqEqJp5S4LgwkPKOuczezuG8I/v5woIuYi1JGFS46ZDfZU42ZR+kIGE6niRQt5YGI2JBrfPvoWrkide6hAMSqmLbbdhYlDQgH2JOq8PnjxgJ0emDkDTQQyHZXLT1JEhHSJiOLwnUD+K9ofpUAz/7ax1/WxwGyyZaaxELSaiKrecdcYGhAQN0iN3n2py/oJ+zDuomODUJKSUh+sFJkG5EwnT8/RivuYPYWhtC1YWhCh57sYZf/LWOB56P46QcjOo81TFvh7AEq9iU0UwcykFuMADBIAfvkuNLH+3j1P17oH7IG4mmgxKiH5wE6XtImE4MOTazLTQYIQdqLbBDvLS4jtueTHDPc3E62oBonqq4JihTwGIjG9ZDhxUkg8TqTY7fK8U5h/Wz4EMDEB+GQQM3G/S71Mnub8CRSJC+i4TpxJFA3VYajIALNXkIBOhYUcOdf6/lN89W8+ryELgW4WqbirA3uJBcLT+jg8qMBelBA9wQO8xyOGW/FGd+pJ/5O/VBIA/9QVzL9LXWEvF74Ay/iyhGEqYT62vAtX4XMelpMAwNlXmoALqquG9RFXc+W8Njr8RJdmuoyBOv0N6GJb/rFRNOKbAcSA4rSAUJ1RgcvHOGM/dLcdp+vURnpCDrQDKEa0v/3HFSdi0Ct4aE6cT7CvBDv4soCSPrW0bY9qaA82HeXF7Dvc/XcPcLlby8IgQZByptqqMuAUNJsJYQbxpXM5RT2IMBMIPs2Gpx4l5DnLRvP3vvPAgVOUgCmaB0LBpfN+L1JRebIGFaGGfivasT42V0CrgyD1EDuiv4y+tV3PtcDX9aXMGqtQHQFoEqm3hYYxrStnAyGg3QdF6RTxnghGicolmw6xAf2yfJx3dNEpyW8oapg0FcW6ZyJ8C3gO/5XUSxkzAtnMOAh4GI34WUFA0ojRF2oMoGgqTWVvLHf1Xy2KJK/rQ4TlenASqPGXepCLsEZcRa1BTg6HcHaG2Dy/5zc5yw5xDH7TFAc2sSQjkYDELWlFHoxLkAuXZyTCRMC2s34DFgit+FlKTRHsARG6ptyIXpWFXNo/+q4tFX4zz/Zoi1bUFwLIg7xMOaUMDvogV4OWg5MJRTuMMKdJjaBocD5uQ4dvchjtw1SWtrCiqyMAykg7IWOvFOAe7xu4jJQsK08KYDjwLz/S6kpI1OA0dtiLuQjdC/PspjS6r42z/jPL00xhttARh2IWoRikI0KOushaLweuNmLEU2qyBtQihI61SLfXfIc8TOQxy+U4pZrSmIvydAxUTrBk4A/uF3IZOJhKk/onjv+I72u5ByYZguRFyo9DYuZbuiPPtmFU/9q4InllewdJ1JX3cQdB5iLpGwJhJ0MZWE63gYnbrN2YpMTkFGgROmot5hxxabg+ZkOGDeEEfMS1HdnIVoBoaUt5FIArSQlgLHAyv9LmSykTD110+BL/pdRFkZHbGGXKiwwAxBf4hV6+I8tSLCojcreOqNKKs6TYb7g6BzENOEQppwwCVoyrziWDmuJmcZZC0FGcANE652md1ks1drnr1nD3PwjsPsPCuFqrHBzEIqCDkD15EA9cGfgZOBlN+FTEYSpv67GLje7yLKkgZlaFTQhbADcQdyUax+g+VvV/P3lWFeXVXBS6ujrOpU9A2EIGtD2IKQIhLShALe1HC5c1xN3lHkLAM3ryETgGCIeE2eWQ02e85w2GeHFPu25thlVpJwrQ0VGRhWkA2ApbwAlf+VfrkFOM/vIiYzCdPicBLe0Zmo34WUNT0yHRzUEHGgwoFsFHfAZE1nBS+tibF8ncFLq2pZ0e2ypifI0GAI8jYELQhDIAChgEPApCRD1nE1tgt528CyFFga8gEIBIlUujTX5pjTpNirNcWcFosPzcyyQ8sgoSq88MyOBK0lo88ichFwk99FTHYSpsVjPt466ly/CxEjRqeEAxpCDsRsUEEYiJHL2KxYX8PityOs7oYl62p5oxPW90F3MoKVUZBzvJANaggogiYETBfT1JgKzCIMW1e/E5i2Y2LZgKPBUl5oBk2MmKKhMsvUOs2sesXO01Js35xnxymanab1Ea9yoToPZg6GA5A3wUbOgBafJN4tV4/4XUgpkDAtLlXAb4GP+V2IeH9KaVTABRNvajhigxGAVAyddulNBnn97TrW9bus61O80V7N+r4gbUmH7iQk0xHSWQV5IK/BsCE48ucZ3odpKJTSBEwXANPQG3oPmwqU2nIIazSO+86sqeN6G6kcV+G6Bo7W4DKSngpsBXYAAgaEIRyG6liORKVDU2WAGQmbHZoHmVrrML3WZP60JI21GcyICZVZMPKQVZALgoM38pSzn8XsVeCTwHKf6ygZEqbF6SrgUr+LEGOlvRGsiTeKDdveaNQwIR2FtIFl2fSngqzuqqV9wKB3SNOftWjvraR9IEbfkCKZgaGcZiBrk7dMhjIRQJPOG7iu1w1IW3hhtSUGEGJDo+JYWGMoiIZswqEcVRGTqohBZURRU6Fpqs7TUjdIXQU0xE0aq6C1aZD6qgzhoAkx7R1R0bY3Ss2ZYBvggLYNtJbUnETuwuuxa/ldSCmRMC1epwK3ATGf6xDbwDCdkVGnAtOFoA0BRoIXyIUhE/RGqjZYtiarHdLpMOt7q1FK0500ydmKgAkDac1wDszNLDc6LkSDUBdX3uhUQWOlTcBU1MYz1FWlCBsmoYBCBYAg3hpxNAeu64W1DVgjgakBh5EjKhKak9ylwDV+F1GKJEyL2zzgDmAPvwsRE8MwXDC0N5JUox8KDBeCI0NQU79zx5zJ2PJsJAA3/F575A9wTLBN7/sab6pXA66SDUGlrQP4D7zjL2ICbClMpdmav5YCewO/BP7T31LERHBdwwu0f2MgX35inPwZOBto97uQciZvVf3nAJ8e+RjLapkQQoy6GvgoEqS+kzAtHrfhjVJf9LkOIUTxaweOBL7hdyHCI2FaXF4B9gH+x+9ChBBF6yG8fRaP+12IeIeEaXH6MnAi0OVzHUKI4vJVvEb1nT7XId5DwrR4PYD37vMhvwsRQvjueeBDwM1+FyLen4RpcWvDexd6HpDzuRYhhD+uA/YDFvldiNg0CdPJ4Ra8Uepf/S5ECFEwrwOHAl/3uxCxZRKmk8dS4Ajga2zi5KIQomSMvoF+0uc6xBhJmE4+1wO7Izv5hChFr+KNRs9DeutOKhKmk9M/8c6YnQekfK5FCDE+rgP2REajk5KE6eR2C7Ab3s5fIcTk9CSwP97a6OabpYuiJWE6+b2Fdyb1ROANXysRQmyNJHA+3rTuP3yuRWwjCdPS8QDeKPUGvwsRQmzRXcCuwE/8LkSMDwnT0pIF/hvYC3jU51qEEP/ueeAY4JPAGp9rEeNIwrQ0vYz3BXsasMznWoQQ0I/XCnA/5I1uSZIwLW13AzsDlwNpn2sRolz9HJiPtAIsaRKmpc8Bvo8Xqrf5W4oQZeVRvJHo55H7RkuehGn5eAvvAvIDkWkmISbSQrye2sfgrZGKMiBhWn7+jvdFfgzeF70QYnwsA84GDkBueyo7Eqbl61G8L/qTgdd8rkWIyWw18BW8pZTb/S1F+EXCVNyLdz71bCRUhdgavXib+3YEfoS3P0GUKQlTMep2JFSFGIte4Dt4Ifp95K5hgYSp+HcSqkK8v9W8MxK9AujxsxhRXCRMxaZsHKqyUUmUs5V4a6KjI1EJUfFvJEzFltyOt1Hp48gdqqK8vIj3ZnIO3pqoTOeKTZIwFWN1P94dqgfhNekWolQ9jvfmcR+8N5Ouv+WIyUDCVGytZ/CadM8FbgQ6/S1HiHFh43UI+zDem8b7/SxGTD4SpuKDegO4GJiN1y7tRX/LEeIDeQO4DNger0PYc/6WIyYrCVOxrYbxGnnvAywAfgfkfa1IiC17CO9WpbnAVch1aGIbKa31Zn+D+1iiQKWIEjIdOAVv88ZuPtcixKjVwO+B3wJL/S1FTDbGUZvfxC1hKiba4XgjgFOAOp9rEeXHxlv//D3wANKlSHxAEqaiWFTi9QE+Ga/JviwxiIm0EPgDXrvMt32uRZQACVNRjGYDJ+AF6/4+1yJKx7/wRqF/AP7pbymi1EiYimK3C/AxvHDd2+daxOTzL+BBvCncF3yuRZQwCVMxmewCHAccjTdiNf0tRxQpCVBRcBKmYrKahResh+FtYqrytRrhpzzwLPAXvCMtMoUrCk7CVJSCKryuNAcCR+H1ShWlrQ14DG8j0aMjPxbCN1sK00CB6hBiWySBu0c+AOYBH8Vr/XYwMMWnusT4SQFPAf8A/gYsQpp/iElERqZisgsD++LdbLMvsB/Q5GtFYixSeMH5D7zR53N4b5qEKEoyMhWlLgc8PfIBEMHbyHQw3v2TBwOtyGYmv63DC85X8Po4v4CEpyghEqai1GTxXqxHG+8rYCbeiHUesAewJ9CMNI6YKH14obkIWI5309BbgOVnUUJMJAlTUeo0Xk/W1Rv9XAivf/DeeKPXOXg9hGcBsYJWN7llgfXAYrzbV5YDLwMrgbSPdQlRcBKmohzl8V7wV77n52uBHYD5eF2aZuNNEc8e+bVynSpO4t2q8ubIxxpgGbAE6EYuzxZCwlSIjfTjreW9txFAFG/H8HZ44Todb5q4GWgZ+XEl3maoySaPN4psA9rx+ti+DXQAq/CmZ9vwNgwJITZBwlSILcvghcpbm/j1KFCNF64NQOPIt9V4N+XU441soyO/Zox8Gxz5fsU41JjGuxHFBTpHvt89UnsfMAD0AIMjP98HdOFN0w7g3UsrhPiAJEyF2HaZkY+OTfx6GK/xRBgvVI2RbwN4U8dT8ILVxbsyLD7yc+83fWriheDgyH+v8NaF2/E2+Lh4QenijbRzeNO02W37KwohNmeL50yFEEIIsXlyNEAIIYTYRhKmQgghxDaSMBVCCCG2kYSpEEIIsY0kTIUQQohtJGEqhBBCbKP/D8/Q3MAstNOAAAAAAElFTkSuQmCC", _D = () => {
|
||
const e = Z(
|
||
(t) => t.system.app_version
|
||
);
|
||
return /* @__PURE__ */ c.jsxs(ce, { alignItems: "center", gap: 3, ps: 1, children: [
|
||
/* @__PURE__ */ c.jsx(Fh, { src: FH, alt: "invoke-ai-logo", w: "32px", h: "32px" }),
|
||
/* @__PURE__ */ c.jsxs(mt, { fontSize: "xl", children: [
|
||
"invoke ",
|
||
/* @__PURE__ */ c.jsx("strong", { children: "ai" })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontWeight: 300,
|
||
marginTop: 1
|
||
},
|
||
variant: "subtext",
|
||
children: e
|
||
}
|
||
)
|
||
] });
|
||
};
|
||
const BH = ct(
|
||
vc,
|
||
(e) => {
|
||
const {
|
||
shouldShowParametersPanel: t,
|
||
shouldHoldParametersPanelOpen: n,
|
||
shouldPinParametersPanel: i,
|
||
parametersPanelScrollPosition: o
|
||
} = e;
|
||
return {
|
||
shouldShowParametersPanel: t,
|
||
shouldHoldParametersPanelOpen: n,
|
||
shouldPinParametersPanel: i,
|
||
parametersPanelScrollPosition: o
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), Fb = (e) => {
|
||
const t = je(), { direction: n } = cc(), {
|
||
shouldShowParametersPanel: i,
|
||
shouldHoldParametersPanelOpen: o,
|
||
shouldPinParametersPanel: l
|
||
} = Z(BH), f = He(null), h = He(null), y = He(null), { children: m } = e, { t: x } = Pe();
|
||
Ze(
|
||
"o",
|
||
() => {
|
||
t(Zu(!i)), l && setTimeout(() => t(ca(!0)), 400);
|
||
},
|
||
[i, l]
|
||
), Ze(
|
||
"esc",
|
||
() => {
|
||
t(Zu(!1));
|
||
},
|
||
{
|
||
enabled: () => !l,
|
||
preventDefault: !0
|
||
},
|
||
[l]
|
||
), Ze(
|
||
"shift+o",
|
||
() => {
|
||
M(), t(ca(!0));
|
||
},
|
||
[l]
|
||
);
|
||
const b = Q(() => {
|
||
l || (t(
|
||
lk(
|
||
h.current ? h.current.scrollTop : 0
|
||
)
|
||
), t(Zu(!1)), t(uk(!1)));
|
||
}, [t, l]), E = () => {
|
||
y.current = window.setTimeout(
|
||
() => b(),
|
||
500
|
||
);
|
||
}, j = () => {
|
||
y.current && window.clearTimeout(y.current);
|
||
}, M = () => {
|
||
t(ck(!l)), t(ca(!0));
|
||
};
|
||
return rt(() => {
|
||
function R(k) {
|
||
f.current && !f.current.contains(k.target) && b();
|
||
}
|
||
return document.addEventListener("mousedown", R), () => {
|
||
document.removeEventListener("mousedown", R);
|
||
};
|
||
}, [b]), /* @__PURE__ */ c.jsx(
|
||
mD,
|
||
{
|
||
nodeRef: f,
|
||
in: i || o && !l,
|
||
unmountOnExit: !0,
|
||
timeout: 200,
|
||
classNames: `${n}-parameters-panel-transition`,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
className: `${n}-parameters-panel-transition`,
|
||
tabIndex: 1,
|
||
ref: f,
|
||
onMouseEnter: l ? void 0 : j,
|
||
onMouseOver: l ? void 0 : j,
|
||
sx: {
|
||
borderInlineEndWidth: l ? 0 : 5,
|
||
borderInlineEndStyle: "solid",
|
||
bg: "base.900",
|
||
borderColor: "base.700",
|
||
height: I_,
|
||
width: mg,
|
||
maxWidth: mg,
|
||
flexShrink: 0,
|
||
position: "relative",
|
||
overflowY: "scroll",
|
||
overflowX: "hidden",
|
||
..._6,
|
||
...!l && {
|
||
zIndex: 20,
|
||
position: "fixed",
|
||
top: 0,
|
||
insetInlineStart: 0,
|
||
width: `calc(${mg} + 2rem)`,
|
||
maxWidth: `calc(${mg} + 2rem)`,
|
||
height: "100%"
|
||
}
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(Ut, { sx: { margin: !l && 4 }, children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
ref: h,
|
||
onMouseLeave: (R) => {
|
||
R.target !== h.current ? j() : !l && E();
|
||
},
|
||
sx: {
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
rowGap: 2,
|
||
height: "100%"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Wr, { label: x("common.pinOptionsPanel"), children: /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
onClick: M,
|
||
sx: {
|
||
position: "absolute",
|
||
cursor: "pointer",
|
||
padding: 2,
|
||
top: 4,
|
||
insetInlineEnd: 4,
|
||
zIndex: 20,
|
||
...l && {
|
||
top: 0,
|
||
insetInlineEnd: 0
|
||
}
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Zr,
|
||
{
|
||
sx: { opacity: 0.2 },
|
||
as: l ? dD : fD
|
||
}
|
||
)
|
||
}
|
||
) }),
|
||
!l && /* @__PURE__ */ c.jsx(Ut, { sx: { pt: xb, pb: 2 }, children: /* @__PURE__ */ c.jsx(_D, {}) }),
|
||
m
|
||
]
|
||
}
|
||
) })
|
||
}
|
||
)
|
||
}
|
||
);
|
||
};
|
||
function _H() {
|
||
const e = je(), t = Z(
|
||
(o) => o.generation.shouldFitToWidthHeight
|
||
), n = (o) => e(f6(o.target.checked)), { t: i } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: i("parameters.imageFit"),
|
||
isChecked: t,
|
||
onChange: n
|
||
}
|
||
);
|
||
}
|
||
function UD(e) {
|
||
const { t } = Pe(), { label: n = `${t("parameters.strength")}` } = e, i = Z(
|
||
(h) => h.generation.img2imgStrength
|
||
), o = je(), l = (h) => o(cx(h)), f = () => {
|
||
o(cx(0.75));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n,
|
||
step: 0.01,
|
||
min: 0.01,
|
||
max: 1,
|
||
onChange: l,
|
||
value: i,
|
||
isInteger: !1,
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
inputWidth: 22,
|
||
withReset: !0,
|
||
handleReset: f
|
||
}
|
||
);
|
||
}
|
||
function UH() {
|
||
const { t: e } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(UD, { label: e("parameters.img2imgStrength") }),
|
||
/* @__PURE__ */ c.jsx(_H, {})
|
||
] });
|
||
}
|
||
function HH() {
|
||
const { t: e } = Pe(), t = {
|
||
general: {
|
||
header: `${e("parameters.general")}`,
|
||
feature: void 0,
|
||
content: /* @__PURE__ */ c.jsx(Ab, {})
|
||
},
|
||
imageToImage: {
|
||
header: `${e("parameters.imageToImage")}`,
|
||
feature: void 0,
|
||
content: /* @__PURE__ */ c.jsx(UH, {})
|
||
},
|
||
seed: {
|
||
header: `${e("parameters.seed")}`,
|
||
feature: Ta.SEED,
|
||
content: /* @__PURE__ */ c.jsx(kb, {})
|
||
},
|
||
variations: {
|
||
header: `${e("parameters.variations")}`,
|
||
feature: Ta.VARIATIONS,
|
||
content: /* @__PURE__ */ c.jsx(Ob, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Pb, {})
|
||
},
|
||
face_restore: {
|
||
header: `${e("parameters.faceRestoration")}`,
|
||
feature: Ta.FACE_CORRECTION,
|
||
content: /* @__PURE__ */ c.jsx(lb, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(LD, {})
|
||
},
|
||
upscale: {
|
||
header: `${e("parameters.upscaling")}`,
|
||
feature: Ta.UPSCALE,
|
||
content: /* @__PURE__ */ c.jsx(ub, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(BD, {})
|
||
},
|
||
symmetry: {
|
||
header: `${e("parameters.symmetry")}`,
|
||
content: /* @__PURE__ */ c.jsx(Mb, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Rb, {})
|
||
},
|
||
other: {
|
||
header: `${e("parameters.otherOptions")}`,
|
||
feature: Ta.OTHER,
|
||
content: /* @__PURE__ */ c.jsx(wH, {})
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Fb, { children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { flexDir: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(Lb, {}),
|
||
/* @__PURE__ */ c.jsx(Ib, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(zb, {}),
|
||
/* @__PURE__ */ c.jsx(Nb, { accordionInfo: t })
|
||
] });
|
||
}
|
||
function VH() {
|
||
return /* @__PURE__ */ c.jsx(Db, { optionsPanel: /* @__PURE__ */ c.jsx(HH, {}), children: /* @__PURE__ */ c.jsx(SH, {}) });
|
||
}
|
||
const WH = () => /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
borderRadius: "base",
|
||
bg: "base.850"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(ce, { sx: { p: 4, width: "100%", height: "100%" }, children: /* @__PURE__ */ c.jsx(ID, {}) })
|
||
}
|
||
), GH = ct(
|
||
[cb],
|
||
({ hiresFix: e, hiresStrength: t }) => ({ hiresFix: e, hiresStrength: t }),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), qH = () => {
|
||
const { hiresFix: e, hiresStrength: t } = Z(GH), n = je(), { t: i } = Pe(), o = (f) => {
|
||
n(X3(f));
|
||
}, l = () => {
|
||
n(X3(0.75));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: i("parameters.hiresStrength"),
|
||
step: 0.01,
|
||
min: 0.01,
|
||
max: 0.99,
|
||
onChange: o,
|
||
value: t,
|
||
isInteger: !1,
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: l,
|
||
isSliderDisabled: !e,
|
||
isInputDisabled: !e,
|
||
isResetDisabled: !e
|
||
}
|
||
);
|
||
}, YH = () => {
|
||
const e = je(), t = Z(
|
||
(o) => o.postprocessing.hiresFix
|
||
), { t: n } = Pe(), i = (o) => e(d6(o.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("parameters.hiresOptim"),
|
||
fontSize: "md",
|
||
isChecked: t,
|
||
onChange: i
|
||
}
|
||
);
|
||
}, QH = () => /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(FD, {}),
|
||
/* @__PURE__ */ c.jsx(YH, {}),
|
||
/* @__PURE__ */ c.jsx(qH, {})
|
||
] });
|
||
function XH() {
|
||
const { t: e } = Pe(), t = {
|
||
general: {
|
||
header: `${e("parameters.general")}`,
|
||
feature: void 0,
|
||
content: /* @__PURE__ */ c.jsx(Ab, {})
|
||
},
|
||
seed: {
|
||
header: `${e("parameters.seed")}`,
|
||
feature: Ta.SEED,
|
||
content: /* @__PURE__ */ c.jsx(kb, {})
|
||
},
|
||
variations: {
|
||
header: `${e("parameters.variations")}`,
|
||
feature: Ta.VARIATIONS,
|
||
content: /* @__PURE__ */ c.jsx(Ob, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Pb, {})
|
||
},
|
||
face_restore: {
|
||
header: `${e("parameters.faceRestoration")}`,
|
||
feature: Ta.FACE_CORRECTION,
|
||
content: /* @__PURE__ */ c.jsx(lb, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(LD, {})
|
||
},
|
||
upscale: {
|
||
header: `${e("parameters.upscaling")}`,
|
||
feature: Ta.UPSCALE,
|
||
content: /* @__PURE__ */ c.jsx(ub, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(BD, {})
|
||
},
|
||
symmetry: {
|
||
header: `${e("parameters.symmetry")}`,
|
||
content: /* @__PURE__ */ c.jsx(Mb, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Rb, {})
|
||
},
|
||
other: {
|
||
header: `${e("parameters.otherOptions")}`,
|
||
feature: Ta.OTHER,
|
||
content: /* @__PURE__ */ c.jsx(QH, {})
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Fb, { children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { flexDir: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(Lb, {}),
|
||
/* @__PURE__ */ c.jsx(Ib, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(zb, {}),
|
||
/* @__PURE__ */ c.jsx(Nb, { accordionInfo: t })
|
||
] });
|
||
}
|
||
function KH() {
|
||
return /* @__PURE__ */ c.jsx(Db, { optionsPanel: /* @__PURE__ */ c.jsx(XH, {}), children: /* @__PURE__ */ c.jsx(WH, {}) });
|
||
}
|
||
var _x = {}, ZH = {
|
||
get exports() {
|
||
return _x;
|
||
},
|
||
set exports(e) {
|
||
_x = e;
|
||
}
|
||
}, rc = {}, JH = {
|
||
get exports() {
|
||
return rc;
|
||
},
|
||
set exports(e) {
|
||
rc = e;
|
||
}
|
||
}, V2 = {};
|
||
/**
|
||
* @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.
|
||
*/
|
||
var FE;
|
||
function $H() {
|
||
return FE || (FE = 1, function(e) {
|
||
function t(Y, te) {
|
||
var V = Y.length;
|
||
Y.push(te);
|
||
e:
|
||
for (; 0 < V; ) {
|
||
var ne = V - 1 >>> 1, we = Y[ne];
|
||
if (0 < o(we, te))
|
||
Y[ne] = te, Y[V] = we, V = ne;
|
||
else
|
||
break e;
|
||
}
|
||
}
|
||
function n(Y) {
|
||
return Y.length === 0 ? null : Y[0];
|
||
}
|
||
function i(Y) {
|
||
if (Y.length === 0)
|
||
return null;
|
||
var te = Y[0], V = Y.pop();
|
||
if (V !== te) {
|
||
Y[0] = V;
|
||
e:
|
||
for (var ne = 0, we = Y.length, Ee = we >>> 1; ne < Ee; ) {
|
||
var se = 2 * (ne + 1) - 1, ve = Y[se], Ce = se + 1, Ae = Y[Ce];
|
||
if (0 > o(ve, V))
|
||
Ce < we && 0 > o(Ae, ve) ? (Y[ne] = Ae, Y[Ce] = V, ne = Ce) : (Y[ne] = ve, Y[se] = V, ne = se);
|
||
else if (Ce < we && 0 > o(Ae, V))
|
||
Y[ne] = Ae, Y[Ce] = V, ne = Ce;
|
||
else
|
||
break e;
|
||
}
|
||
}
|
||
return te;
|
||
}
|
||
function o(Y, te) {
|
||
var V = Y.sortIndex - te.sortIndex;
|
||
return V !== 0 ? V : Y.id - te.id;
|
||
}
|
||
if (typeof performance == "object" && typeof performance.now == "function") {
|
||
var l = performance;
|
||
e.unstable_now = function() {
|
||
return l.now();
|
||
};
|
||
} else {
|
||
var f = Date, h = f.now();
|
||
e.unstable_now = function() {
|
||
return f.now() - h;
|
||
};
|
||
}
|
||
var y = [], m = [], x = 1, b = null, E = 3, j = !1, M = !1, R = !1, k = typeof setTimeout == "function" ? setTimeout : null, A = typeof clearTimeout == "function" ? clearTimeout : null, L = typeof setImmediate < "u" ? setImmediate : null;
|
||
typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
|
||
function z(Y) {
|
||
for (var te = n(m); te !== null; ) {
|
||
if (te.callback === null)
|
||
i(m);
|
||
else if (te.startTime <= Y)
|
||
i(m), te.sortIndex = te.expirationTime, t(y, te);
|
||
else
|
||
break;
|
||
te = n(m);
|
||
}
|
||
}
|
||
function I(Y) {
|
||
if (R = !1, z(Y), !M)
|
||
if (n(y) !== null)
|
||
M = !0, xe(_);
|
||
else {
|
||
var te = n(m);
|
||
te !== null && $(I, te.startTime - Y);
|
||
}
|
||
}
|
||
function _(Y, te) {
|
||
M = !1, R && (R = !1, A(q), q = -1), j = !0;
|
||
var V = E;
|
||
try {
|
||
for (z(te), b = n(y); b !== null && (!(b.expirationTime > te) || Y && !H()); ) {
|
||
var ne = b.callback;
|
||
if (typeof ne == "function") {
|
||
b.callback = null, E = b.priorityLevel;
|
||
var we = ne(b.expirationTime <= te);
|
||
te = e.unstable_now(), typeof we == "function" ? b.callback = we : b === n(y) && i(y), z(te);
|
||
} else
|
||
i(y);
|
||
b = n(y);
|
||
}
|
||
if (b !== null)
|
||
var Ee = !0;
|
||
else {
|
||
var se = n(m);
|
||
se !== null && $(I, se.startTime - te), Ee = !1;
|
||
}
|
||
return Ee;
|
||
} finally {
|
||
b = null, E = V, j = !1;
|
||
}
|
||
}
|
||
var U = !1, B = null, q = -1, J = 5, G = -1;
|
||
function H() {
|
||
return !(e.unstable_now() - G < J);
|
||
}
|
||
function le() {
|
||
if (B !== null) {
|
||
var Y = e.unstable_now();
|
||
G = Y;
|
||
var te = !0;
|
||
try {
|
||
te = B(!0, Y);
|
||
} finally {
|
||
te ? ae() : (U = !1, B = null);
|
||
}
|
||
} else
|
||
U = !1;
|
||
}
|
||
var ae;
|
||
if (typeof L == "function")
|
||
ae = function() {
|
||
L(le);
|
||
};
|
||
else if (typeof MessageChannel < "u") {
|
||
var he = new MessageChannel(), Te = he.port2;
|
||
he.port1.onmessage = le, ae = function() {
|
||
Te.postMessage(null);
|
||
};
|
||
} else
|
||
ae = function() {
|
||
k(le, 0);
|
||
};
|
||
function xe(Y) {
|
||
B = Y, U || (U = !0, ae());
|
||
}
|
||
function $(Y, te) {
|
||
q = k(function() {
|
||
Y(e.unstable_now());
|
||
}, te);
|
||
}
|
||
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(Y) {
|
||
Y.callback = null;
|
||
}, e.unstable_continueExecution = function() {
|
||
M || j || (M = !0, xe(_));
|
||
}, e.unstable_forceFrameRate = function(Y) {
|
||
0 > Y || 125 < Y ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : J = 0 < Y ? Math.floor(1e3 / Y) : 5;
|
||
}, e.unstable_getCurrentPriorityLevel = function() {
|
||
return E;
|
||
}, e.unstable_getFirstCallbackNode = function() {
|
||
return n(y);
|
||
}, e.unstable_next = function(Y) {
|
||
switch (E) {
|
||
case 1:
|
||
case 2:
|
||
case 3:
|
||
var te = 3;
|
||
break;
|
||
default:
|
||
te = E;
|
||
}
|
||
var V = E;
|
||
E = te;
|
||
try {
|
||
return Y();
|
||
} finally {
|
||
E = V;
|
||
}
|
||
}, e.unstable_pauseExecution = function() {
|
||
}, e.unstable_requestPaint = function() {
|
||
}, e.unstable_runWithPriority = function(Y, te) {
|
||
switch (Y) {
|
||
case 1:
|
||
case 2:
|
||
case 3:
|
||
case 4:
|
||
case 5:
|
||
break;
|
||
default:
|
||
Y = 3;
|
||
}
|
||
var V = E;
|
||
E = Y;
|
||
try {
|
||
return te();
|
||
} finally {
|
||
E = V;
|
||
}
|
||
}, e.unstable_scheduleCallback = function(Y, te, V) {
|
||
var ne = e.unstable_now();
|
||
switch (typeof V == "object" && V !== null ? (V = V.delay, V = typeof V == "number" && 0 < V ? ne + V : ne) : V = ne, Y) {
|
||
case 1:
|
||
var we = -1;
|
||
break;
|
||
case 2:
|
||
we = 250;
|
||
break;
|
||
case 5:
|
||
we = 1073741823;
|
||
break;
|
||
case 4:
|
||
we = 1e4;
|
||
break;
|
||
default:
|
||
we = 5e3;
|
||
}
|
||
return we = V + we, Y = { id: x++, callback: te, priorityLevel: Y, startTime: V, expirationTime: we, sortIndex: -1 }, V > ne ? (Y.sortIndex = V, t(m, Y), n(y) === null && Y === n(m) && (R ? (A(q), q = -1) : R = !0, $(I, V - ne))) : (Y.sortIndex = we, t(y, Y), M || j || (M = !0, xe(_))), Y;
|
||
}, e.unstable_shouldYield = H, e.unstable_wrapCallback = function(Y) {
|
||
var te = E;
|
||
return function() {
|
||
var V = E;
|
||
E = te;
|
||
try {
|
||
return Y.apply(this, arguments);
|
||
} finally {
|
||
E = V;
|
||
}
|
||
};
|
||
};
|
||
}(V2)), V2;
|
||
}
|
||
var W2 = {};
|
||
/**
|
||
* @license React
|
||
* scheduler.development.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 BE;
|
||
function eV() {
|
||
return BE || (BE = 1, function(e) {
|
||
process.env.NODE_ENV !== "production" && function() {
|
||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||
var t = !1, n = !1, i = 5;
|
||
function o(Ne, ge) {
|
||
var _e = Ne.length;
|
||
Ne.push(ge), h(Ne, ge, _e);
|
||
}
|
||
function l(Ne) {
|
||
return Ne.length === 0 ? null : Ne[0];
|
||
}
|
||
function f(Ne) {
|
||
if (Ne.length === 0)
|
||
return null;
|
||
var ge = Ne[0], _e = Ne.pop();
|
||
return _e !== ge && (Ne[0] = _e, y(Ne, _e, 0)), ge;
|
||
}
|
||
function h(Ne, ge, _e) {
|
||
for (var yt = _e; yt > 0; ) {
|
||
var Qt = yt - 1 >>> 1, yn = Ne[Qt];
|
||
if (m(yn, ge) > 0)
|
||
Ne[Qt] = ge, Ne[yt] = yn, yt = Qt;
|
||
else
|
||
return;
|
||
}
|
||
}
|
||
function y(Ne, ge, _e) {
|
||
for (var yt = _e, Qt = Ne.length, yn = Qt >>> 1; yt < yn; ) {
|
||
var vt = (yt + 1) * 2 - 1, dt = Ne[vt], Nn = vt + 1, jn = Ne[Nn];
|
||
if (m(dt, ge) < 0)
|
||
Nn < Qt && m(jn, dt) < 0 ? (Ne[yt] = jn, Ne[Nn] = ge, yt = Nn) : (Ne[yt] = dt, Ne[vt] = ge, yt = vt);
|
||
else if (Nn < Qt && m(jn, ge) < 0)
|
||
Ne[yt] = jn, Ne[Nn] = ge, yt = Nn;
|
||
else
|
||
return;
|
||
}
|
||
}
|
||
function m(Ne, ge) {
|
||
var _e = Ne.sortIndex - ge.sortIndex;
|
||
return _e !== 0 ? _e : Ne.id - ge.id;
|
||
}
|
||
var x = 1, b = 2, E = 3, j = 4, M = 5;
|
||
function R(Ne, ge) {
|
||
}
|
||
var k = typeof performance == "object" && typeof performance.now == "function";
|
||
if (k) {
|
||
var A = performance;
|
||
e.unstable_now = function() {
|
||
return A.now();
|
||
};
|
||
} else {
|
||
var L = Date, z = L.now();
|
||
e.unstable_now = function() {
|
||
return L.now() - z;
|
||
};
|
||
}
|
||
var I = 1073741823, _ = -1, U = 250, B = 5e3, q = 1e4, J = I, G = [], H = [], le = 1, ae = null, he = E, Te = !1, xe = !1, $ = !1, Y = typeof setTimeout == "function" ? setTimeout : null, te = typeof clearTimeout == "function" ? clearTimeout : null, V = typeof setImmediate < "u" ? setImmediate : null;
|
||
typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
|
||
function ne(Ne) {
|
||
for (var ge = l(H); ge !== null; ) {
|
||
if (ge.callback === null)
|
||
f(H);
|
||
else if (ge.startTime <= Ne)
|
||
f(H), ge.sortIndex = ge.expirationTime, o(G, ge);
|
||
else
|
||
return;
|
||
ge = l(H);
|
||
}
|
||
}
|
||
function we(Ne) {
|
||
if ($ = !1, ne(Ne), !xe)
|
||
if (l(G) !== null)
|
||
xe = !0, Dt(Ee);
|
||
else {
|
||
var ge = l(H);
|
||
ge !== null && Vt(we, ge.startTime - Ne);
|
||
}
|
||
}
|
||
function Ee(Ne, ge) {
|
||
xe = !1, $ && ($ = !1, ke()), Te = !0;
|
||
var _e = he;
|
||
try {
|
||
var yt;
|
||
if (!n)
|
||
return se(Ne, ge);
|
||
} finally {
|
||
ae = null, he = _e, Te = !1;
|
||
}
|
||
}
|
||
function se(Ne, ge) {
|
||
var _e = ge;
|
||
for (ne(_e), ae = l(G); ae !== null && !t && !(ae.expirationTime > _e && (!Ne || En())); ) {
|
||
var yt = ae.callback;
|
||
if (typeof yt == "function") {
|
||
ae.callback = null, he = ae.priorityLevel;
|
||
var Qt = ae.expirationTime <= _e, yn = yt(Qt);
|
||
_e = e.unstable_now(), typeof yn == "function" ? ae.callback = yn : ae === l(G) && f(G), ne(_e);
|
||
} else
|
||
f(G);
|
||
ae = l(G);
|
||
}
|
||
if (ae !== null)
|
||
return !0;
|
||
var vt = l(H);
|
||
return vt !== null && Vt(we, vt.startTime - _e), !1;
|
||
}
|
||
function ve(Ne, ge) {
|
||
switch (Ne) {
|
||
case x:
|
||
case b:
|
||
case E:
|
||
case j:
|
||
case M:
|
||
break;
|
||
default:
|
||
Ne = E;
|
||
}
|
||
var _e = he;
|
||
he = Ne;
|
||
try {
|
||
return ge();
|
||
} finally {
|
||
he = _e;
|
||
}
|
||
}
|
||
function Ce(Ne) {
|
||
var ge;
|
||
switch (he) {
|
||
case x:
|
||
case b:
|
||
case E:
|
||
ge = E;
|
||
break;
|
||
default:
|
||
ge = he;
|
||
break;
|
||
}
|
||
var _e = he;
|
||
he = ge;
|
||
try {
|
||
return Ne();
|
||
} finally {
|
||
he = _e;
|
||
}
|
||
}
|
||
function Ae(Ne) {
|
||
var ge = he;
|
||
return function() {
|
||
var _e = he;
|
||
he = ge;
|
||
try {
|
||
return Ne.apply(this, arguments);
|
||
} finally {
|
||
he = _e;
|
||
}
|
||
};
|
||
}
|
||
function Ve(Ne, ge, _e) {
|
||
var yt = e.unstable_now(), Qt;
|
||
if (typeof _e == "object" && _e !== null) {
|
||
var yn = _e.delay;
|
||
typeof yn == "number" && yn > 0 ? Qt = yt + yn : Qt = yt;
|
||
} else
|
||
Qt = yt;
|
||
var vt;
|
||
switch (Ne) {
|
||
case x:
|
||
vt = _;
|
||
break;
|
||
case b:
|
||
vt = U;
|
||
break;
|
||
case M:
|
||
vt = J;
|
||
break;
|
||
case j:
|
||
vt = q;
|
||
break;
|
||
case E:
|
||
default:
|
||
vt = B;
|
||
break;
|
||
}
|
||
var dt = Qt + vt, Nn = {
|
||
id: le++,
|
||
callback: ge,
|
||
priorityLevel: Ne,
|
||
startTime: Qt,
|
||
expirationTime: dt,
|
||
sortIndex: -1
|
||
};
|
||
return Qt > yt ? (Nn.sortIndex = Qt, o(H, Nn), l(G) === null && Nn === l(H) && ($ ? ke() : $ = !0, Vt(we, Qt - yt))) : (Nn.sortIndex = dt, o(G, Nn), !xe && !Te && (xe = !0, Dt(Ee))), Nn;
|
||
}
|
||
function tt() {
|
||
}
|
||
function at() {
|
||
!xe && !Te && (xe = !0, Dt(Ee));
|
||
}
|
||
function ze() {
|
||
return l(G);
|
||
}
|
||
function Qe(Ne) {
|
||
Ne.callback = null;
|
||
}
|
||
function Et() {
|
||
return he;
|
||
}
|
||
var Xe = !1, ht = null, Ht = -1, Ot = i, on = -1;
|
||
function En() {
|
||
var Ne = e.unstable_now() - on;
|
||
return !(Ne < Ot);
|
||
}
|
||
function ee() {
|
||
}
|
||
function We(Ne) {
|
||
if (Ne < 0 || Ne > 125) {
|
||
console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");
|
||
return;
|
||
}
|
||
Ne > 0 ? Ot = Math.floor(1e3 / Ne) : Ot = i;
|
||
}
|
||
var Fe = function() {
|
||
if (ht !== null) {
|
||
var Ne = e.unstable_now();
|
||
on = Ne;
|
||
var ge = !0, _e = !0;
|
||
try {
|
||
_e = ht(ge, Ne);
|
||
} finally {
|
||
_e ? ot() : (Xe = !1, ht = null);
|
||
}
|
||
} else
|
||
Xe = !1;
|
||
}, ot;
|
||
if (typeof V == "function")
|
||
ot = function() {
|
||
V(Fe);
|
||
};
|
||
else if (typeof MessageChannel < "u") {
|
||
var me = new MessageChannel(), Le = me.port2;
|
||
me.port1.onmessage = Fe, ot = function() {
|
||
Le.postMessage(null);
|
||
};
|
||
} else
|
||
ot = function() {
|
||
Y(Fe, 0);
|
||
};
|
||
function Dt(Ne) {
|
||
ht = Ne, Xe || (Xe = !0, ot());
|
||
}
|
||
function Vt(Ne, ge) {
|
||
Ht = Y(function() {
|
||
Ne(e.unstable_now());
|
||
}, ge);
|
||
}
|
||
function ke() {
|
||
te(Ht), Ht = -1;
|
||
}
|
||
var Nt = ee, tn = null;
|
||
e.unstable_IdlePriority = M, e.unstable_ImmediatePriority = x, e.unstable_LowPriority = j, e.unstable_NormalPriority = E, e.unstable_Profiling = tn, e.unstable_UserBlockingPriority = b, e.unstable_cancelCallback = Qe, e.unstable_continueExecution = at, e.unstable_forceFrameRate = We, e.unstable_getCurrentPriorityLevel = Et, e.unstable_getFirstCallbackNode = ze, e.unstable_next = Ce, e.unstable_pauseExecution = tt, e.unstable_requestPaint = Nt, e.unstable_runWithPriority = ve, e.unstable_scheduleCallback = Ve, e.unstable_shouldYield = En, e.unstable_wrapCallback = Ae, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
||
}();
|
||
}(W2)), W2;
|
||
}
|
||
(function(e) {
|
||
process.env.NODE_ENV === "production" ? e.exports = $H() : e.exports = eV();
|
||
})(JH);
|
||
/**
|
||
* @license React
|
||
* react-reconciler.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 G2, _E;
|
||
function tV() {
|
||
return _E || (_E = 1, G2 = function(t) {
|
||
var n = {}, i = pt, o = rc, l = Object.assign;
|
||
function f(s) {
|
||
for (var u = "https://reactjs.org/docs/error-decoder.html?invariant=" + s, v = 1; v < arguments.length; v++)
|
||
u += "&args[]=" + encodeURIComponent(arguments[v]);
|
||
return "Minified React error #" + s + "; visit " + u + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
||
}
|
||
var h = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, y = Symbol.for("react.element"), m = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), M = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), _ = Symbol.iterator;
|
||
function U(s) {
|
||
return s === null || typeof s != "object" ? null : (s = _ && s[_] || s["@@iterator"], typeof s == "function" ? s : null);
|
||
}
|
||
function B(s) {
|
||
if (s == null)
|
||
return null;
|
||
if (typeof s == "function")
|
||
return s.displayName || s.name || null;
|
||
if (typeof s == "string")
|
||
return s;
|
||
switch (s) {
|
||
case x:
|
||
return "Fragment";
|
||
case m:
|
||
return "Portal";
|
||
case E:
|
||
return "Profiler";
|
||
case b:
|
||
return "StrictMode";
|
||
case k:
|
||
return "Suspense";
|
||
case A:
|
||
return "SuspenseList";
|
||
}
|
||
if (typeof s == "object")
|
||
switch (s.$$typeof) {
|
||
case M:
|
||
return (s.displayName || "Context") + ".Consumer";
|
||
case j:
|
||
return (s._context.displayName || "Context") + ".Provider";
|
||
case R:
|
||
var u = s.render;
|
||
return s = s.displayName, s || (s = u.displayName || u.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
||
case L:
|
||
return u = s.displayName || null, u !== null ? u : B(s.type) || "Memo";
|
||
case z:
|
||
u = s._payload, s = s._init;
|
||
try {
|
||
return B(s(u));
|
||
} catch {
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
function q(s) {
|
||
var u = s.type;
|
||
switch (s.tag) {
|
||
case 24:
|
||
return "Cache";
|
||
case 9:
|
||
return (u.displayName || "Context") + ".Consumer";
|
||
case 10:
|
||
return (u._context.displayName || "Context") + ".Provider";
|
||
case 18:
|
||
return "DehydratedFragment";
|
||
case 11:
|
||
return s = u.render, s = s.displayName || s.name || "", u.displayName || (s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef");
|
||
case 7:
|
||
return "Fragment";
|
||
case 5:
|
||
return u;
|
||
case 4:
|
||
return "Portal";
|
||
case 3:
|
||
return "Root";
|
||
case 6:
|
||
return "Text";
|
||
case 16:
|
||
return B(u);
|
||
case 8:
|
||
return u === b ? "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 u == "function")
|
||
return u.displayName || u.name || null;
|
||
if (typeof u == "string")
|
||
return u;
|
||
}
|
||
return null;
|
||
}
|
||
function J(s) {
|
||
var u = s, v = s;
|
||
if (s.alternate)
|
||
for (; u.return; )
|
||
u = u.return;
|
||
else {
|
||
s = u;
|
||
do
|
||
u = s, u.flags & 4098 && (v = u.return), s = u.return;
|
||
while (s);
|
||
}
|
||
return u.tag === 3 ? v : null;
|
||
}
|
||
function G(s) {
|
||
if (J(s) !== s)
|
||
throw Error(f(188));
|
||
}
|
||
function H(s) {
|
||
var u = s.alternate;
|
||
if (!u) {
|
||
if (u = J(s), u === null)
|
||
throw Error(f(188));
|
||
return u !== s ? null : s;
|
||
}
|
||
for (var v = s, S = u; ; ) {
|
||
var w = v.return;
|
||
if (w === null)
|
||
break;
|
||
var T = w.alternate;
|
||
if (T === null) {
|
||
if (S = w.return, S !== null) {
|
||
v = S;
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
if (w.child === T.child) {
|
||
for (T = w.child; T; ) {
|
||
if (T === v)
|
||
return G(w), s;
|
||
if (T === S)
|
||
return G(w), u;
|
||
T = T.sibling;
|
||
}
|
||
throw Error(f(188));
|
||
}
|
||
if (v.return !== S.return)
|
||
v = w, S = T;
|
||
else {
|
||
for (var N = !1, X = w.child; X; ) {
|
||
if (X === v) {
|
||
N = !0, v = w, S = T;
|
||
break;
|
||
}
|
||
if (X === S) {
|
||
N = !0, S = w, v = T;
|
||
break;
|
||
}
|
||
X = X.sibling;
|
||
}
|
||
if (!N) {
|
||
for (X = T.child; X; ) {
|
||
if (X === v) {
|
||
N = !0, v = T, S = w;
|
||
break;
|
||
}
|
||
if (X === S) {
|
||
N = !0, S = T, v = w;
|
||
break;
|
||
}
|
||
X = X.sibling;
|
||
}
|
||
if (!N)
|
||
throw Error(f(189));
|
||
}
|
||
}
|
||
if (v.alternate !== S)
|
||
throw Error(f(190));
|
||
}
|
||
if (v.tag !== 3)
|
||
throw Error(f(188));
|
||
return v.stateNode.current === v ? s : u;
|
||
}
|
||
function le(s) {
|
||
return s = H(s), s !== null ? ae(s) : null;
|
||
}
|
||
function ae(s) {
|
||
if (s.tag === 5 || s.tag === 6)
|
||
return s;
|
||
for (s = s.child; s !== null; ) {
|
||
var u = ae(s);
|
||
if (u !== null)
|
||
return u;
|
||
s = s.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
function he(s) {
|
||
if (s.tag === 5 || s.tag === 6)
|
||
return s;
|
||
for (s = s.child; s !== null; ) {
|
||
if (s.tag !== 4) {
|
||
var u = he(s);
|
||
if (u !== null)
|
||
return u;
|
||
}
|
||
s = s.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
var Te = Array.isArray, xe = t.getPublicInstance, $ = t.getRootHostContext, Y = t.getChildHostContext, te = t.prepareForCommit, V = t.resetAfterCommit, ne = t.createInstance, we = t.appendInitialChild, Ee = t.finalizeInitialChildren, se = t.prepareUpdate, ve = t.shouldSetTextContent, Ce = t.createTextInstance, Ae = t.scheduleTimeout, Ve = t.cancelTimeout, tt = t.noTimeout, at = t.isPrimaryRenderer, ze = t.supportsMutation, Qe = t.supportsPersistence, Et = t.supportsHydration, Xe = t.getInstanceFromNode, ht = t.preparePortalMount, Ht = t.getCurrentEventPriority, Ot = t.detachDeletedInstance, on = t.supportsMicrotasks, En = t.scheduleMicrotask, ee = t.supportsTestSelectors, We = t.findFiberRoot, Fe = t.getBoundingRect, ot = t.getTextContent, me = t.isHiddenSubtree, Le = t.matchAccessibilityRole, Dt = t.setFocusIfFocusable, Vt = t.setupIntersectionObserver, ke = t.appendChild, Nt = t.appendChildToContainer, tn = t.commitTextUpdate, Ne = t.commitMount, ge = t.commitUpdate, _e = t.insertBefore, yt = t.insertInContainerBefore, Qt = t.removeChild, yn = t.removeChildFromContainer, vt = t.resetTextContent, dt = t.hideInstance, Nn = t.hideTextInstance, jn = t.unhideInstance, Wt = t.unhideTextInstance, da = t.clearContainer, nu = t.cloneInstance, bc = t.createContainerChildSet, sn = t.appendChildToContainerChildSet, Wi = t.finalizeContainerChildren, wi = t.replaceContainerChildren, Co = t.cloneHiddenInstance, Va = t.cloneHiddenTextInstance, Gi = t.canHydrateInstance, os = t.canHydrateTextInstance, Cc = t.canHydrateSuspenseInstance, Zh = t.isSuspenseInstancePending, Df = t.isSuspenseInstanceFallback, ru = t.getSuspenseInstanceFallbackErrorDetails, $r = t.registerSuspenseInstanceRetry, Qs = t.getNextHydratableSibling, Jh = t.getFirstHydratableChild, Mf = t.getFirstHydratableChildWithinContainer, ss = t.getFirstHydratableChildWithinSuspenseInstance, Rf = t.hydrateInstance, qi = t.hydrateTextInstance, wc = t.hydrateSuspenseInstance, kf = t.getNextHydratableInstanceAfterSuspenseInstance, au = t.commitHydratedContainer, iu = t.commitHydratedSuspenseInstance, Xs = t.clearSuspenseBoundary, Yi = t.clearSuspenseBoundaryFromContainer, A0 = t.shouldDeleteUnhydratedTailInstances, Ec = t.didNotMatchHydratedContainerTextInstance, N0 = t.didNotMatchHydratedTextInstance, Pf;
|
||
function Ks(s) {
|
||
if (Pf === void 0)
|
||
try {
|
||
throw Error();
|
||
} catch (v) {
|
||
var u = v.stack.trim().match(/\n( *(at )?)/);
|
||
Pf = u && u[1] || "";
|
||
}
|
||
return `
|
||
` + Pf + s;
|
||
}
|
||
var jc = !1;
|
||
function ou(s, u) {
|
||
if (!s || jc)
|
||
return "";
|
||
jc = !0;
|
||
var v = Error.prepareStackTrace;
|
||
Error.prepareStackTrace = void 0;
|
||
try {
|
||
if (u)
|
||
if (u = function() {
|
||
throw Error();
|
||
}, Object.defineProperty(u.prototype, "props", { set: function() {
|
||
throw Error();
|
||
} }), typeof Reflect == "object" && Reflect.construct) {
|
||
try {
|
||
Reflect.construct(u, []);
|
||
} catch (Ue) {
|
||
var S = Ue;
|
||
}
|
||
Reflect.construct(s, [], u);
|
||
} else {
|
||
try {
|
||
u.call();
|
||
} catch (Ue) {
|
||
S = Ue;
|
||
}
|
||
s.call(u.prototype);
|
||
}
|
||
else {
|
||
try {
|
||
throw Error();
|
||
} catch (Ue) {
|
||
S = Ue;
|
||
}
|
||
s();
|
||
}
|
||
} catch (Ue) {
|
||
if (Ue && S && typeof Ue.stack == "string") {
|
||
for (var w = Ue.stack.split(`
|
||
`), T = S.stack.split(`
|
||
`), N = w.length - 1, X = T.length - 1; 1 <= N && 0 <= X && w[N] !== T[X]; )
|
||
X--;
|
||
for (; 1 <= N && 0 <= X; N--, X--)
|
||
if (w[N] !== T[X]) {
|
||
if (N !== 1 || X !== 1)
|
||
do
|
||
if (N--, X--, 0 > X || w[N] !== T[X]) {
|
||
var fe = `
|
||
` + w[N].replace(" at new ", " at ");
|
||
return s.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", s.displayName)), fe;
|
||
}
|
||
while (1 <= N && 0 <= X);
|
||
break;
|
||
}
|
||
}
|
||
} finally {
|
||
jc = !1, Error.prepareStackTrace = v;
|
||
}
|
||
return (s = s ? s.displayName || s.name : "") ? Ks(s) : "";
|
||
}
|
||
var $h = Object.prototype.hasOwnProperty, Of = [], ls = -1;
|
||
function wo(s) {
|
||
return { current: s };
|
||
}
|
||
function Kt(s) {
|
||
0 > ls || (s.current = Of[ls], Of[ls] = null, ls--);
|
||
}
|
||
function xn(s, u) {
|
||
ls++, Of[ls] = s.current, s.current = u;
|
||
}
|
||
var Eo = {}, Gr = wo(Eo), fa = wo(!1), us = Eo;
|
||
function Zs(s, u) {
|
||
var v = s.type.contextTypes;
|
||
if (!v)
|
||
return Eo;
|
||
var S = s.stateNode;
|
||
if (S && S.__reactInternalMemoizedUnmaskedChildContext === u)
|
||
return S.__reactInternalMemoizedMaskedChildContext;
|
||
var w = {}, T;
|
||
for (T in v)
|
||
w[T] = u[T];
|
||
return S && (s = s.stateNode, s.__reactInternalMemoizedUnmaskedChildContext = u, s.__reactInternalMemoizedMaskedChildContext = w), w;
|
||
}
|
||
function qr(s) {
|
||
return s = s.childContextTypes, s != null;
|
||
}
|
||
function su() {
|
||
Kt(fa), Kt(Gr);
|
||
}
|
||
function Af(s, u, v) {
|
||
if (Gr.current !== Eo)
|
||
throw Error(f(168));
|
||
xn(Gr, u), xn(fa, v);
|
||
}
|
||
function Tc(s, u, v) {
|
||
var S = s.stateNode;
|
||
if (u = u.childContextTypes, typeof S.getChildContext != "function")
|
||
return v;
|
||
S = S.getChildContext();
|
||
for (var w in S)
|
||
if (!(w in u))
|
||
throw Error(f(108, q(s) || "Unknown", w));
|
||
return l({}, v, S);
|
||
}
|
||
function lu(s) {
|
||
return s = (s = s.stateNode) && s.__reactInternalMemoizedMergedChildContext || Eo, us = Gr.current, xn(Gr, s), xn(fa, fa.current), !0;
|
||
}
|
||
function Nf(s, u, v) {
|
||
var S = s.stateNode;
|
||
if (!S)
|
||
throw Error(f(169));
|
||
v ? (s = Tc(s, u, us), S.__reactInternalMemoizedMergedChildContext = s, Kt(fa), Kt(Gr), xn(Gr, s)) : Kt(fa), xn(fa, v);
|
||
}
|
||
var ii = Math.clz32 ? Math.clz32 : z0, zf = Math.log, Dc = Math.LN2;
|
||
function z0(s) {
|
||
return s >>>= 0, s === 0 ? 32 : 31 - (zf(s) / Dc | 0) | 0;
|
||
}
|
||
var Yr = 64, cs = 4194304;
|
||
function Qr(s) {
|
||
switch (s & -s) {
|
||
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 s & 4194240;
|
||
case 4194304:
|
||
case 8388608:
|
||
case 16777216:
|
||
case 33554432:
|
||
case 67108864:
|
||
return s & 130023424;
|
||
case 134217728:
|
||
return 134217728;
|
||
case 268435456:
|
||
return 268435456;
|
||
case 536870912:
|
||
return 536870912;
|
||
case 1073741824:
|
||
return 1073741824;
|
||
default:
|
||
return s;
|
||
}
|
||
}
|
||
function Mc(s, u) {
|
||
var v = s.pendingLanes;
|
||
if (v === 0)
|
||
return 0;
|
||
var S = 0, w = s.suspendedLanes, T = s.pingedLanes, N = v & 268435455;
|
||
if (N !== 0) {
|
||
var X = N & ~w;
|
||
X !== 0 ? S = Qr(X) : (T &= N, T !== 0 && (S = Qr(T)));
|
||
} else
|
||
N = v & ~w, N !== 0 ? S = Qr(N) : T !== 0 && (S = Qr(T));
|
||
if (S === 0)
|
||
return 0;
|
||
if (u !== 0 && u !== S && !(u & w) && (w = S & -S, T = u & -u, w >= T || w === 16 && (T & 4194240) !== 0))
|
||
return u;
|
||
if (S & 4 && (S |= v & 16), u = s.entangledLanes, u !== 0)
|
||
for (s = s.entanglements, u &= S; 0 < u; )
|
||
v = 31 - ii(u), w = 1 << v, S |= s[v], u &= ~w;
|
||
return S;
|
||
}
|
||
function I0(s, u) {
|
||
switch (s) {
|
||
case 1:
|
||
case 2:
|
||
case 4:
|
||
return u + 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 u + 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 L0(s, u) {
|
||
for (var v = s.suspendedLanes, S = s.pingedLanes, w = s.expirationTimes, T = s.pendingLanes; 0 < T; ) {
|
||
var N = 31 - ii(T), X = 1 << N, fe = w[N];
|
||
fe === -1 ? (!(X & v) || X & S) && (w[N] = I0(X, u)) : fe <= u && (s.expiredLanes |= X), T &= ~X;
|
||
}
|
||
}
|
||
function If(s) {
|
||
return s = s.pendingLanes & -1073741825, s !== 0 ? s : s & 1073741824 ? 1073741824 : 0;
|
||
}
|
||
function ev() {
|
||
var s = Yr;
|
||
return Yr <<= 1, !(Yr & 4194240) && (Yr = 64), s;
|
||
}
|
||
function Lf(s) {
|
||
for (var u = [], v = 0; 31 > v; v++)
|
||
u.push(s);
|
||
return u;
|
||
}
|
||
function Ei(s, u, v) {
|
||
s.pendingLanes |= u, u !== 536870912 && (s.suspendedLanes = 0, s.pingedLanes = 0), s = s.eventTimes, u = 31 - ii(u), s[u] = v;
|
||
}
|
||
function F0(s, u) {
|
||
var v = s.pendingLanes & ~u;
|
||
s.pendingLanes = u, s.suspendedLanes = 0, s.pingedLanes = 0, s.expiredLanes &= u, s.mutableReadLanes &= u, s.entangledLanes &= u, u = s.entanglements;
|
||
var S = s.eventTimes;
|
||
for (s = s.expirationTimes; 0 < v; ) {
|
||
var w = 31 - ii(v), T = 1 << w;
|
||
u[w] = 0, S[w] = -1, s[w] = -1, v &= ~T;
|
||
}
|
||
}
|
||
function Ff(s, u) {
|
||
var v = s.entangledLanes |= u;
|
||
for (s = s.entanglements; v; ) {
|
||
var S = 31 - ii(v), w = 1 << S;
|
||
w & u | s[S] & u && (s[S] |= u), v &= ~w;
|
||
}
|
||
}
|
||
var dn = 0;
|
||
function Js(s) {
|
||
return s &= -s, 1 < s ? 4 < s ? s & 268435455 ? 16 : 536870912 : 4 : 1;
|
||
}
|
||
var Bf = o.unstable_scheduleCallback, tv = o.unstable_cancelCallback, B0 = o.unstable_shouldYield, _0 = o.unstable_requestPaint, br = o.unstable_now, _f = o.unstable_ImmediatePriority, U0 = o.unstable_UserBlockingPriority, Uf = o.unstable_NormalPriority, H0 = o.unstable_IdlePriority, Rc = null, ji = null;
|
||
function V0(s) {
|
||
if (ji && typeof ji.onCommitFiberRoot == "function")
|
||
try {
|
||
ji.onCommitFiberRoot(Rc, s, void 0, (s.current.flags & 128) === 128);
|
||
} catch {
|
||
}
|
||
}
|
||
function nv(s, u) {
|
||
return s === u && (s !== 0 || 1 / s === 1 / u) || s !== s && u !== u;
|
||
}
|
||
var oi = typeof Object.is == "function" ? Object.is : nv, Qi = null, kc = !1, Hf = !1;
|
||
function rv(s) {
|
||
Qi === null ? Qi = [s] : Qi.push(s);
|
||
}
|
||
function W0(s) {
|
||
kc = !0, rv(s);
|
||
}
|
||
function si() {
|
||
if (!Hf && Qi !== null) {
|
||
Hf = !0;
|
||
var s = 0, u = dn;
|
||
try {
|
||
var v = Qi;
|
||
for (dn = 1; s < v.length; s++) {
|
||
var S = v[s];
|
||
do
|
||
S = S(!0);
|
||
while (S !== null);
|
||
}
|
||
Qi = null, kc = !1;
|
||
} catch (w) {
|
||
throw Qi !== null && (Qi = Qi.slice(s + 1)), Bf(_f, si), w;
|
||
} finally {
|
||
dn = u, Hf = !1;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
var ds = [], $s = 0, el = null, uu = 0, Ma = [], Wa = 0, fs = null, Xi = 1, Ti = "";
|
||
function Ki(s, u) {
|
||
ds[$s++] = uu, ds[$s++] = el, el = s, uu = u;
|
||
}
|
||
function av(s, u, v) {
|
||
Ma[Wa++] = Xi, Ma[Wa++] = Ti, Ma[Wa++] = fs, fs = s;
|
||
var S = Xi;
|
||
s = Ti;
|
||
var w = 32 - ii(S) - 1;
|
||
S &= ~(1 << w), v += 1;
|
||
var T = 32 - ii(u) + w;
|
||
if (30 < T) {
|
||
var N = w - w % 5;
|
||
T = (S & (1 << N) - 1).toString(32), S >>= N, w -= N, Xi = 1 << 32 - ii(u) + w | v << w | S, Ti = T + s;
|
||
} else
|
||
Xi = 1 << T | v << w | S, Ti = s;
|
||
}
|
||
function Vf(s) {
|
||
s.return !== null && (Ki(s, 1), av(s, 1, 0));
|
||
}
|
||
function tl(s) {
|
||
for (; s === el; )
|
||
el = ds[--$s], ds[$s] = null, uu = ds[--$s], ds[$s] = null;
|
||
for (; s === fs; )
|
||
fs = Ma[--Wa], Ma[Wa] = null, Ti = Ma[--Wa], Ma[Wa] = null, Xi = Ma[--Wa], Ma[Wa] = null;
|
||
}
|
||
var Ra = null, Ga = null, Un = !1, cu = !1, li = null;
|
||
function iv(s, u) {
|
||
var v = Xa(5, null, null, 0);
|
||
v.elementType = "DELETED", v.stateNode = u, v.return = s, u = s.deletions, u === null ? (s.deletions = [v], s.flags |= 16) : u.push(v);
|
||
}
|
||
function ov(s, u) {
|
||
switch (s.tag) {
|
||
case 5:
|
||
return u = Gi(u, s.type, s.pendingProps), u !== null ? (s.stateNode = u, Ra = s, Ga = Jh(u), !0) : !1;
|
||
case 6:
|
||
return u = os(u, s.pendingProps), u !== null ? (s.stateNode = u, Ra = s, Ga = null, !0) : !1;
|
||
case 13:
|
||
if (u = Cc(u), u !== null) {
|
||
var v = fs !== null ? { id: Xi, overflow: Ti } : null;
|
||
return s.memoizedState = { dehydrated: u, treeContext: v, retryLane: 1073741824 }, v = Xa(18, null, null, 0), v.stateNode = u, v.return = s, s.child = v, Ra = s, Ga = null, !0;
|
||
}
|
||
return !1;
|
||
default:
|
||
return !1;
|
||
}
|
||
}
|
||
function Wf(s) {
|
||
return (s.mode & 1) !== 0 && (s.flags & 128) === 0;
|
||
}
|
||
function Gf(s) {
|
||
if (Un) {
|
||
var u = Ga;
|
||
if (u) {
|
||
var v = u;
|
||
if (!ov(s, u)) {
|
||
if (Wf(s))
|
||
throw Error(f(418));
|
||
u = Qs(v);
|
||
var S = Ra;
|
||
u && ov(s, u) ? iv(S, v) : (s.flags = s.flags & -4097 | 2, Un = !1, Ra = s);
|
||
}
|
||
} else {
|
||
if (Wf(s))
|
||
throw Error(f(418));
|
||
s.flags = s.flags & -4097 | 2, Un = !1, Ra = s;
|
||
}
|
||
}
|
||
}
|
||
function sv(s) {
|
||
for (s = s.return; s !== null && s.tag !== 5 && s.tag !== 3 && s.tag !== 13; )
|
||
s = s.return;
|
||
Ra = s;
|
||
}
|
||
function Pc(s) {
|
||
if (!Et || s !== Ra)
|
||
return !1;
|
||
if (!Un)
|
||
return sv(s), Un = !0, !1;
|
||
if (s.tag !== 3 && (s.tag !== 5 || A0(s.type) && !ve(s.type, s.memoizedProps))) {
|
||
var u = Ga;
|
||
if (u) {
|
||
if (Wf(s))
|
||
throw lv(), Error(f(418));
|
||
for (; u; )
|
||
iv(s, u), u = Qs(u);
|
||
}
|
||
}
|
||
if (sv(s), s.tag === 13) {
|
||
if (!Et)
|
||
throw Error(f(316));
|
||
if (s = s.memoizedState, s = s !== null ? s.dehydrated : null, !s)
|
||
throw Error(f(317));
|
||
Ga = kf(s);
|
||
} else
|
||
Ga = Ra ? Qs(s.stateNode) : null;
|
||
return !0;
|
||
}
|
||
function lv() {
|
||
for (var s = Ga; s; )
|
||
s = Qs(s);
|
||
}
|
||
function nl() {
|
||
Et && (Ga = Ra = null, cu = Un = !1);
|
||
}
|
||
function qf(s) {
|
||
li === null ? li = [s] : li.push(s);
|
||
}
|
||
var G0 = h.ReactCurrentBatchConfig;
|
||
function Oc(s, u) {
|
||
if (oi(s, u))
|
||
return !0;
|
||
if (typeof s != "object" || s === null || typeof u != "object" || u === null)
|
||
return !1;
|
||
var v = Object.keys(s), S = Object.keys(u);
|
||
if (v.length !== S.length)
|
||
return !1;
|
||
for (S = 0; S < v.length; S++) {
|
||
var w = v[S];
|
||
if (!$h.call(u, w) || !oi(s[w], u[w]))
|
||
return !1;
|
||
}
|
||
return !0;
|
||
}
|
||
function q0(s) {
|
||
switch (s.tag) {
|
||
case 5:
|
||
return Ks(s.type);
|
||
case 16:
|
||
return Ks("Lazy");
|
||
case 13:
|
||
return Ks("Suspense");
|
||
case 19:
|
||
return Ks("SuspenseList");
|
||
case 0:
|
||
case 2:
|
||
case 15:
|
||
return s = ou(s.type, !1), s;
|
||
case 11:
|
||
return s = ou(s.type.render, !1), s;
|
||
case 1:
|
||
return s = ou(s.type, !0), s;
|
||
default:
|
||
return "";
|
||
}
|
||
}
|
||
function ui(s, u) {
|
||
if (s && s.defaultProps) {
|
||
u = l({}, u), s = s.defaultProps;
|
||
for (var v in s)
|
||
u[v] === void 0 && (u[v] = s[v]);
|
||
return u;
|
||
}
|
||
return u;
|
||
}
|
||
var Ac = wo(null), Nc = null, rl = null, Yf = null;
|
||
function Qf() {
|
||
Yf = rl = Nc = null;
|
||
}
|
||
function uv(s, u, v) {
|
||
at ? (xn(Ac, u._currentValue), u._currentValue = v) : (xn(Ac, u._currentValue2), u._currentValue2 = v);
|
||
}
|
||
function Xf(s) {
|
||
var u = Ac.current;
|
||
Kt(Ac), at ? s._currentValue = u : s._currentValue2 = u;
|
||
}
|
||
function Kf(s, u, v) {
|
||
for (; s !== null; ) {
|
||
var S = s.alternate;
|
||
if ((s.childLanes & u) !== u ? (s.childLanes |= u, S !== null && (S.childLanes |= u)) : S !== null && (S.childLanes & u) !== u && (S.childLanes |= u), s === v)
|
||
break;
|
||
s = s.return;
|
||
}
|
||
}
|
||
function al(s, u) {
|
||
Nc = s, Yf = rl = null, s = s.dependencies, s !== null && s.firstContext !== null && (s.lanes & u && (Pr = !0), s.firstContext = null);
|
||
}
|
||
function Xr(s) {
|
||
var u = at ? s._currentValue : s._currentValue2;
|
||
if (Yf !== s)
|
||
if (s = { context: s, memoizedValue: u, next: null }, rl === null) {
|
||
if (Nc === null)
|
||
throw Error(f(308));
|
||
rl = s, Nc.dependencies = { lanes: 0, firstContext: s };
|
||
} else
|
||
rl = rl.next = s;
|
||
return u;
|
||
}
|
||
var jo = null;
|
||
function zc(s) {
|
||
jo === null ? jo = [s] : jo.push(s);
|
||
}
|
||
function Zf(s, u, v, S) {
|
||
var w = u.interleaved;
|
||
return w === null ? (v.next = v, zc(u)) : (v.next = w.next, w.next = v), u.interleaved = v, ci(s, S);
|
||
}
|
||
function ci(s, u) {
|
||
s.lanes |= u;
|
||
var v = s.alternate;
|
||
for (v !== null && (v.lanes |= u), v = s, s = s.return; s !== null; )
|
||
s.childLanes |= u, v = s.alternate, v !== null && (v.childLanes |= u), v = s, s = s.return;
|
||
return v.tag === 3 ? v.stateNode : null;
|
||
}
|
||
var Zi = !1;
|
||
function Ic(s) {
|
||
s.updateQueue = { baseState: s.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
|
||
}
|
||
function Jf(s, u) {
|
||
s = s.updateQueue, u.updateQueue === s && (u.updateQueue = { baseState: s.baseState, firstBaseUpdate: s.firstBaseUpdate, lastBaseUpdate: s.lastBaseUpdate, shared: s.shared, effects: s.effects });
|
||
}
|
||
function Di(s, u) {
|
||
return { eventTime: s, lane: u, tag: 0, payload: null, callback: null, next: null };
|
||
}
|
||
function To(s, u, v) {
|
||
var S = s.updateQueue;
|
||
if (S === null)
|
||
return null;
|
||
if (S = S.shared, Xt & 2) {
|
||
var w = S.pending;
|
||
return w === null ? u.next = u : (u.next = w.next, w.next = u), S.pending = u, ci(s, v);
|
||
}
|
||
return w = S.interleaved, w === null ? (u.next = u, zc(S)) : (u.next = w.next, w.next = u), S.interleaved = u, ci(s, v);
|
||
}
|
||
function Lc(s, u, v) {
|
||
if (u = u.updateQueue, u !== null && (u = u.shared, (v & 4194240) !== 0)) {
|
||
var S = u.lanes;
|
||
S &= s.pendingLanes, v |= S, u.lanes = v, Ff(s, v);
|
||
}
|
||
}
|
||
function Fc(s, u) {
|
||
var v = s.updateQueue, S = s.alternate;
|
||
if (S !== null && (S = S.updateQueue, v === S)) {
|
||
var w = null, T = null;
|
||
if (v = v.firstBaseUpdate, v !== null) {
|
||
do {
|
||
var N = { eventTime: v.eventTime, lane: v.lane, tag: v.tag, payload: v.payload, callback: v.callback, next: null };
|
||
T === null ? w = T = N : T = T.next = N, v = v.next;
|
||
} while (v !== null);
|
||
T === null ? w = T = u : T = T.next = u;
|
||
} else
|
||
w = T = u;
|
||
v = { baseState: S.baseState, firstBaseUpdate: w, lastBaseUpdate: T, shared: S.shared, effects: S.effects }, s.updateQueue = v;
|
||
return;
|
||
}
|
||
s = v.lastBaseUpdate, s === null ? v.firstBaseUpdate = u : s.next = u, v.lastBaseUpdate = u;
|
||
}
|
||
function il(s, u, v, S) {
|
||
var w = s.updateQueue;
|
||
Zi = !1;
|
||
var T = w.firstBaseUpdate, N = w.lastBaseUpdate, X = w.shared.pending;
|
||
if (X !== null) {
|
||
w.shared.pending = null;
|
||
var fe = X, Ue = fe.next;
|
||
fe.next = null, N === null ? T = Ue : N.next = Ue, N = fe;
|
||
var gt = s.alternate;
|
||
gt !== null && (gt = gt.updateQueue, X = gt.lastBaseUpdate, X !== N && (X === null ? gt.firstBaseUpdate = Ue : X.next = Ue, gt.lastBaseUpdate = fe));
|
||
}
|
||
if (T !== null) {
|
||
var jt = w.baseState;
|
||
N = 0, gt = Ue = fe = null, X = T;
|
||
do {
|
||
var nt = X.lane, In = X.eventTime;
|
||
if ((S & nt) === nt) {
|
||
gt !== null && (gt = gt.next = {
|
||
eventTime: In,
|
||
lane: 0,
|
||
tag: X.tag,
|
||
payload: X.payload,
|
||
callback: X.callback,
|
||
next: null
|
||
});
|
||
e: {
|
||
var Dn = s, Sn = X;
|
||
switch (nt = u, In = v, Sn.tag) {
|
||
case 1:
|
||
if (Dn = Sn.payload, typeof Dn == "function") {
|
||
jt = Dn.call(In, jt, nt);
|
||
break e;
|
||
}
|
||
jt = Dn;
|
||
break e;
|
||
case 3:
|
||
Dn.flags = Dn.flags & -65537 | 128;
|
||
case 0:
|
||
if (Dn = Sn.payload, nt = typeof Dn == "function" ? Dn.call(In, jt, nt) : Dn, nt == null)
|
||
break e;
|
||
jt = l({}, jt, nt);
|
||
break e;
|
||
case 2:
|
||
Zi = !0;
|
||
}
|
||
}
|
||
X.callback !== null && X.lane !== 0 && (s.flags |= 64, nt = w.effects, nt === null ? w.effects = [X] : nt.push(X));
|
||
} else
|
||
In = { eventTime: In, lane: nt, tag: X.tag, payload: X.payload, callback: X.callback, next: null }, gt === null ? (Ue = gt = In, fe = jt) : gt = gt.next = In, N |= nt;
|
||
if (X = X.next, X === null) {
|
||
if (X = w.shared.pending, X === null)
|
||
break;
|
||
nt = X, X = nt.next, nt.next = null, w.lastBaseUpdate = nt, w.shared.pending = null;
|
||
}
|
||
} while (1);
|
||
if (gt === null && (fe = jt), w.baseState = fe, w.firstBaseUpdate = Ue, w.lastBaseUpdate = gt, u = w.shared.interleaved, u !== null) {
|
||
w = u;
|
||
do
|
||
N |= w.lane, w = w.next;
|
||
while (w !== u);
|
||
} else
|
||
T === null && (w.shared.lanes = 0);
|
||
bs |= N, s.lanes = N, s.memoizedState = jt;
|
||
}
|
||
}
|
||
function Ji(s, u, v) {
|
||
if (s = u.effects, u.effects = null, s !== null)
|
||
for (u = 0; u < s.length; u++) {
|
||
var S = s[u], w = S.callback;
|
||
if (w !== null) {
|
||
if (S.callback = null, S = v, typeof w != "function")
|
||
throw Error(f(191, w));
|
||
w.call(S);
|
||
}
|
||
}
|
||
}
|
||
var Bc = new i.Component().refs;
|
||
function ol(s, u, v, S) {
|
||
u = s.memoizedState, v = v(S, u), v = v == null ? u : l({}, u, v), s.memoizedState = v, s.lanes === 0 && (s.updateQueue.baseState = v);
|
||
}
|
||
var _c = { isMounted: function(s) {
|
||
return (s = s._reactInternals) ? J(s) === s : !1;
|
||
}, enqueueSetState: function(s, u, v) {
|
||
s = s._reactInternals;
|
||
var S = Ir(), w = Lr(s), T = Di(S, w);
|
||
T.payload = u, v != null && (T.callback = v), u = To(s, T, w), u !== null && (Na(u, s, w, S), Lc(u, s, w));
|
||
}, enqueueReplaceState: function(s, u, v) {
|
||
s = s._reactInternals;
|
||
var S = Ir(), w = Lr(s), T = Di(S, w);
|
||
T.tag = 1, T.payload = u, v != null && (T.callback = v), u = To(s, T, w), u !== null && (Na(u, s, w, S), Lc(u, s, w));
|
||
}, enqueueForceUpdate: function(s, u) {
|
||
s = s._reactInternals;
|
||
var v = Ir(), S = Lr(s), w = Di(v, S);
|
||
w.tag = 2, u != null && (w.callback = u), u = To(s, w, S), u !== null && (Na(u, s, S, v), Lc(u, s, S));
|
||
} };
|
||
function Uc(s, u, v, S, w, T, N) {
|
||
return s = s.stateNode, typeof s.shouldComponentUpdate == "function" ? s.shouldComponentUpdate(S, T, N) : u.prototype && u.prototype.isPureReactComponent ? !Oc(v, S) || !Oc(w, T) : !0;
|
||
}
|
||
function cv(s, u, v) {
|
||
var S = !1, w = Eo, T = u.contextType;
|
||
return typeof T == "object" && T !== null ? T = Xr(T) : (w = qr(u) ? us : Gr.current, S = u.contextTypes, T = (S = S != null) ? Zs(s, w) : Eo), u = new u(v, T), s.memoizedState = u.state !== null && u.state !== void 0 ? u.state : null, u.updater = _c, s.stateNode = u, u._reactInternals = s, S && (s = s.stateNode, s.__reactInternalMemoizedUnmaskedChildContext = w, s.__reactInternalMemoizedMaskedChildContext = T), u;
|
||
}
|
||
function Hc(s, u, v, S) {
|
||
s = u.state, typeof u.componentWillReceiveProps == "function" && u.componentWillReceiveProps(v, S), typeof u.UNSAFE_componentWillReceiveProps == "function" && u.UNSAFE_componentWillReceiveProps(v, S), u.state !== s && _c.enqueueReplaceState(u, u.state, null);
|
||
}
|
||
function $f(s, u, v, S) {
|
||
var w = s.stateNode;
|
||
w.props = v, w.state = s.memoizedState, w.refs = Bc, Ic(s);
|
||
var T = u.contextType;
|
||
typeof T == "object" && T !== null ? w.context = Xr(T) : (T = qr(u) ? us : Gr.current, w.context = Zs(s, T)), w.state = s.memoizedState, T = u.getDerivedStateFromProps, typeof T == "function" && (ol(s, u, T, v), w.state = s.memoizedState), typeof u.getDerivedStateFromProps == "function" || typeof w.getSnapshotBeforeUpdate == "function" || typeof w.UNSAFE_componentWillMount != "function" && typeof w.componentWillMount != "function" || (u = w.state, typeof w.componentWillMount == "function" && w.componentWillMount(), typeof w.UNSAFE_componentWillMount == "function" && w.UNSAFE_componentWillMount(), u !== w.state && _c.enqueueReplaceState(w, w.state, null), il(s, v, w, S), w.state = s.memoizedState), typeof w.componentDidMount == "function" && (s.flags |= 4194308);
|
||
}
|
||
function ps(s, u, v) {
|
||
if (s = v.ref, s !== null && typeof s != "function" && typeof s != "object") {
|
||
if (v._owner) {
|
||
if (v = v._owner, v) {
|
||
if (v.tag !== 1)
|
||
throw Error(f(309));
|
||
var S = v.stateNode;
|
||
}
|
||
if (!S)
|
||
throw Error(f(147, s));
|
||
var w = S, T = "" + s;
|
||
return u !== null && u.ref !== null && typeof u.ref == "function" && u.ref._stringRef === T ? u.ref : (u = function(N) {
|
||
var X = w.refs;
|
||
X === Bc && (X = w.refs = {}), N === null ? delete X[T] : X[T] = N;
|
||
}, u._stringRef = T, u);
|
||
}
|
||
if (typeof s != "string")
|
||
throw Error(f(284));
|
||
if (!v._owner)
|
||
throw Error(f(290, s));
|
||
}
|
||
return s;
|
||
}
|
||
function du(s, u) {
|
||
throw s = Object.prototype.toString.call(u), Error(f(31, s === "[object Object]" ? "object with keys {" + Object.keys(u).join(", ") + "}" : s));
|
||
}
|
||
function ep(s) {
|
||
var u = s._init;
|
||
return u(s._payload);
|
||
}
|
||
function tp(s) {
|
||
function u(ue, K) {
|
||
if (s) {
|
||
var pe = ue.deletions;
|
||
pe === null ? (ue.deletions = [K], ue.flags |= 16) : pe.push(K);
|
||
}
|
||
}
|
||
function v(ue, K) {
|
||
if (!s)
|
||
return null;
|
||
for (; K !== null; )
|
||
u(ue, K), K = K.sibling;
|
||
return null;
|
||
}
|
||
function S(ue, K) {
|
||
for (ue = /* @__PURE__ */ new Map(); K !== null; )
|
||
K.key !== null ? ue.set(K.key, K) : ue.set(K.index, K), K = K.sibling;
|
||
return ue;
|
||
}
|
||
function w(ue, K) {
|
||
return ue = Oi(ue, K), ue.index = 0, ue.sibling = null, ue;
|
||
}
|
||
function T(ue, K, pe) {
|
||
return ue.index = pe, s ? (pe = ue.alternate, pe !== null ? (pe = pe.index, pe < K ? (ue.flags |= 2, K) : pe) : (ue.flags |= 2, K)) : (ue.flags |= 1048576, K);
|
||
}
|
||
function N(ue) {
|
||
return s && ue.alternate === null && (ue.flags |= 2), ue;
|
||
}
|
||
function X(ue, K, pe, st) {
|
||
return K === null || K.tag !== 6 ? (K = Ru(pe, ue.mode, st), K.return = ue, K) : (K = w(K, pe), K.return = ue, K);
|
||
}
|
||
function fe(ue, K, pe, st) {
|
||
var Ct = pe.type;
|
||
return Ct === x ? gt(ue, K, pe.props.children, st, pe.key) : K !== null && (K.elementType === Ct || typeof Ct == "object" && Ct !== null && Ct.$$typeof === z && ep(Ct) === K.type) ? (st = w(K, pe.props), st.ref = ps(ue, K, pe), st.return = ue, st) : (st = Mu(pe.type, pe.key, pe.props, null, ue.mode, st), st.ref = ps(ue, K, pe), st.return = ue, st);
|
||
}
|
||
function Ue(ue, K, pe, st) {
|
||
return K === null || K.tag !== 4 || K.stateNode.containerInfo !== pe.containerInfo || K.stateNode.implementation !== pe.implementation ? (K = ku(pe, ue.mode, st), K.return = ue, K) : (K = w(K, pe.children || []), K.return = ue, K);
|
||
}
|
||
function gt(ue, K, pe, st, Ct) {
|
||
return K === null || K.tag !== 7 ? (K = Lo(pe, ue.mode, st, Ct), K.return = ue, K) : (K = w(K, pe), K.return = ue, K);
|
||
}
|
||
function jt(ue, K, pe) {
|
||
if (typeof K == "string" && K !== "" || typeof K == "number")
|
||
return K = Ru("" + K, ue.mode, pe), K.return = ue, K;
|
||
if (typeof K == "object" && K !== null) {
|
||
switch (K.$$typeof) {
|
||
case y:
|
||
return pe = Mu(K.type, K.key, K.props, null, ue.mode, pe), pe.ref = ps(ue, null, K), pe.return = ue, pe;
|
||
case m:
|
||
return K = ku(K, ue.mode, pe), K.return = ue, K;
|
||
case z:
|
||
var st = K._init;
|
||
return jt(ue, st(K._payload), pe);
|
||
}
|
||
if (Te(K) || U(K))
|
||
return K = Lo(K, ue.mode, pe, null), K.return = ue, K;
|
||
du(ue, K);
|
||
}
|
||
return null;
|
||
}
|
||
function nt(ue, K, pe, st) {
|
||
var Ct = K !== null ? K.key : null;
|
||
if (typeof pe == "string" && pe !== "" || typeof pe == "number")
|
||
return Ct !== null ? null : X(ue, K, "" + pe, st);
|
||
if (typeof pe == "object" && pe !== null) {
|
||
switch (pe.$$typeof) {
|
||
case y:
|
||
return pe.key === Ct ? fe(ue, K, pe, st) : null;
|
||
case m:
|
||
return pe.key === Ct ? Ue(ue, K, pe, st) : null;
|
||
case z:
|
||
return Ct = pe._init, nt(
|
||
ue,
|
||
K,
|
||
Ct(pe._payload),
|
||
st
|
||
);
|
||
}
|
||
if (Te(pe) || U(pe))
|
||
return Ct !== null ? null : gt(ue, K, pe, st, null);
|
||
du(ue, pe);
|
||
}
|
||
return null;
|
||
}
|
||
function In(ue, K, pe, st, Ct) {
|
||
if (typeof st == "string" && st !== "" || typeof st == "number")
|
||
return ue = ue.get(pe) || null, X(K, ue, "" + st, Ct);
|
||
if (typeof st == "object" && st !== null) {
|
||
switch (st.$$typeof) {
|
||
case y:
|
||
return ue = ue.get(st.key === null ? pe : st.key) || null, fe(K, ue, st, Ct);
|
||
case m:
|
||
return ue = ue.get(st.key === null ? pe : st.key) || null, Ue(K, ue, st, Ct);
|
||
case z:
|
||
var _t = st._init;
|
||
return In(ue, K, pe, _t(st._payload), Ct);
|
||
}
|
||
if (Te(st) || U(st))
|
||
return ue = ue.get(pe) || null, gt(K, ue, st, Ct, null);
|
||
du(K, st);
|
||
}
|
||
return null;
|
||
}
|
||
function Dn(ue, K, pe, st) {
|
||
for (var Ct = null, _t = null, It = K, $t = K = 0, Kn = null; It !== null && $t < pe.length; $t++) {
|
||
It.index > $t ? (Kn = It, It = null) : Kn = It.sibling;
|
||
var en = nt(ue, It, pe[$t], st);
|
||
if (en === null) {
|
||
It === null && (It = Kn);
|
||
break;
|
||
}
|
||
s && It && en.alternate === null && u(ue, It), K = T(en, K, $t), _t === null ? Ct = en : _t.sibling = en, _t = en, It = Kn;
|
||
}
|
||
if ($t === pe.length)
|
||
return v(ue, It), Un && Ki(ue, $t), Ct;
|
||
if (It === null) {
|
||
for (; $t < pe.length; $t++)
|
||
It = jt(ue, pe[$t], st), It !== null && (K = T(It, K, $t), _t === null ? Ct = It : _t.sibling = It, _t = It);
|
||
return Un && Ki(ue, $t), Ct;
|
||
}
|
||
for (It = S(ue, It); $t < pe.length; $t++)
|
||
Kn = In(It, ue, $t, pe[$t], st), Kn !== null && (s && Kn.alternate !== null && It.delete(Kn.key === null ? $t : Kn.key), K = T(Kn, K, $t), _t === null ? Ct = Kn : _t.sibling = Kn, _t = Kn);
|
||
return s && It.forEach(function(Ka) {
|
||
return u(ue, Ka);
|
||
}), Un && Ki(ue, $t), Ct;
|
||
}
|
||
function Sn(ue, K, pe, st) {
|
||
var Ct = U(pe);
|
||
if (typeof Ct != "function")
|
||
throw Error(f(150));
|
||
if (pe = Ct.call(pe), pe == null)
|
||
throw Error(f(151));
|
||
for (var _t = Ct = null, It = K, $t = K = 0, Kn = null, en = pe.next(); It !== null && !en.done; $t++, en = pe.next()) {
|
||
It.index > $t ? (Kn = It, It = null) : Kn = It.sibling;
|
||
var Ka = nt(ue, It, en.value, st);
|
||
if (Ka === null) {
|
||
It === null && (It = Kn);
|
||
break;
|
||
}
|
||
s && It && Ka.alternate === null && u(ue, It), K = T(Ka, K, $t), _t === null ? Ct = Ka : _t.sibling = Ka, _t = Ka, It = Kn;
|
||
}
|
||
if (en.done)
|
||
return v(
|
||
ue,
|
||
It
|
||
), Un && Ki(ue, $t), Ct;
|
||
if (It === null) {
|
||
for (; !en.done; $t++, en = pe.next())
|
||
en = jt(ue, en.value, st), en !== null && (K = T(en, K, $t), _t === null ? Ct = en : _t.sibling = en, _t = en);
|
||
return Un && Ki(ue, $t), Ct;
|
||
}
|
||
for (It = S(ue, It); !en.done; $t++, en = pe.next())
|
||
en = In(It, ue, $t, en.value, st), en !== null && (s && en.alternate !== null && It.delete(en.key === null ? $t : en.key), K = T(en, K, $t), _t === null ? Ct = en : _t.sibling = en, _t = en);
|
||
return s && It.forEach(function(Ms) {
|
||
return u(ue, Ms);
|
||
}), Un && Ki(ue, $t), Ct;
|
||
}
|
||
function gn(ue, K, pe, st) {
|
||
if (typeof pe == "object" && pe !== null && pe.type === x && pe.key === null && (pe = pe.props.children), typeof pe == "object" && pe !== null) {
|
||
switch (pe.$$typeof) {
|
||
case y:
|
||
e: {
|
||
for (var Ct = pe.key, _t = K; _t !== null; ) {
|
||
if (_t.key === Ct) {
|
||
if (Ct = pe.type, Ct === x) {
|
||
if (_t.tag === 7) {
|
||
v(ue, _t.sibling), K = w(_t, pe.props.children), K.return = ue, ue = K;
|
||
break e;
|
||
}
|
||
} else if (_t.elementType === Ct || typeof Ct == "object" && Ct !== null && Ct.$$typeof === z && ep(Ct) === _t.type) {
|
||
v(ue, _t.sibling), K = w(_t, pe.props), K.ref = ps(ue, _t, pe), K.return = ue, ue = K;
|
||
break e;
|
||
}
|
||
v(ue, _t);
|
||
break;
|
||
} else
|
||
u(ue, _t);
|
||
_t = _t.sibling;
|
||
}
|
||
pe.type === x ? (K = Lo(pe.props.children, ue.mode, st, pe.key), K.return = ue, ue = K) : (st = Mu(pe.type, pe.key, pe.props, null, ue.mode, st), st.ref = ps(ue, K, pe), st.return = ue, ue = st);
|
||
}
|
||
return N(ue);
|
||
case m:
|
||
e: {
|
||
for (_t = pe.key; K !== null; ) {
|
||
if (K.key === _t)
|
||
if (K.tag === 4 && K.stateNode.containerInfo === pe.containerInfo && K.stateNode.implementation === pe.implementation) {
|
||
v(ue, K.sibling), K = w(K, pe.children || []), K.return = ue, ue = K;
|
||
break e;
|
||
} else {
|
||
v(ue, K);
|
||
break;
|
||
}
|
||
else
|
||
u(ue, K);
|
||
K = K.sibling;
|
||
}
|
||
K = ku(pe, ue.mode, st), K.return = ue, ue = K;
|
||
}
|
||
return N(ue);
|
||
case z:
|
||
return _t = pe._init, gn(ue, K, _t(pe._payload), st);
|
||
}
|
||
if (Te(pe))
|
||
return Dn(ue, K, pe, st);
|
||
if (U(pe))
|
||
return Sn(ue, K, pe, st);
|
||
du(ue, pe);
|
||
}
|
||
return typeof pe == "string" && pe !== "" || typeof pe == "number" ? (pe = "" + pe, K !== null && K.tag === 6 ? (v(ue, K.sibling), K = w(K, pe), K.return = ue, ue = K) : (v(ue, K), K = Ru(pe, ue.mode, st), K.return = ue, ue = K), N(ue)) : v(ue, K);
|
||
}
|
||
return gn;
|
||
}
|
||
var $i = tp(!0), qa = tp(!1), hs = {}, ea = wo(hs), ka = wo(hs), Pa = wo(hs);
|
||
function zn(s) {
|
||
if (s === hs)
|
||
throw Error(f(174));
|
||
return s;
|
||
}
|
||
function pr(s, u) {
|
||
xn(Pa, u), xn(ka, s), xn(ea, hs), s = $(u), Kt(ea), xn(ea, s);
|
||
}
|
||
function Do() {
|
||
Kt(ea), Kt(ka), Kt(Pa);
|
||
}
|
||
function pa(s) {
|
||
var u = zn(Pa.current), v = zn(ea.current);
|
||
u = Y(v, s.type, u), v !== u && (xn(ka, s), xn(ea, u));
|
||
}
|
||
function di(s) {
|
||
ka.current === s && (Kt(ea), Kt(ka));
|
||
}
|
||
var fn = wo(0);
|
||
function sl(s) {
|
||
for (var u = s; u !== null; ) {
|
||
if (u.tag === 13) {
|
||
var v = u.memoizedState;
|
||
if (v !== null && (v = v.dehydrated, v === null || Zh(v) || Df(v)))
|
||
return u;
|
||
} else if (u.tag === 19 && u.memoizedProps.revealOrder !== void 0) {
|
||
if (u.flags & 128)
|
||
return u;
|
||
} else if (u.child !== null) {
|
||
u.child.return = u, u = u.child;
|
||
continue;
|
||
}
|
||
if (u === s)
|
||
break;
|
||
for (; u.sibling === null; ) {
|
||
if (u.return === null || u.return === s)
|
||
return null;
|
||
u = u.return;
|
||
}
|
||
u.sibling.return = u.return, u = u.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
var Mo = [];
|
||
function Vc() {
|
||
for (var s = 0; s < Mo.length; s++) {
|
||
var u = Mo[s];
|
||
at ? u._workInProgressVersionPrimary = null : u._workInProgressVersionSecondary = null;
|
||
}
|
||
Mo.length = 0;
|
||
}
|
||
var eo = h.ReactCurrentDispatcher, ll = h.ReactCurrentBatchConfig, Kr = 0, Pn = null, Jn = null, hr = null, fu = !1, Ro = !1, ul = 0, Y0 = 0;
|
||
function $n() {
|
||
throw Error(f(321));
|
||
}
|
||
function Wc(s, u) {
|
||
if (u === null)
|
||
return !1;
|
||
for (var v = 0; v < u.length && v < s.length; v++)
|
||
if (!oi(s[v], u[v]))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
function Mt(s, u, v, S, w, T) {
|
||
if (Kr = T, Pn = u, u.memoizedState = null, u.updateQueue = null, u.lanes = 0, eo.current = s === null || s.memoizedState === null ? op : sp, s = v(S, w), Ro) {
|
||
T = 0;
|
||
do {
|
||
if (Ro = !1, ul = 0, 25 <= T)
|
||
throw Error(f(301));
|
||
T += 1, hr = Jn = null, u.updateQueue = null, eo.current = lp, s = v(S, w);
|
||
} while (Ro);
|
||
}
|
||
if (eo.current = no, u = Jn !== null && Jn.next !== null, Kr = 0, hr = Jn = Pn = null, fu = !1, u)
|
||
throw Error(f(300));
|
||
return s;
|
||
}
|
||
function Zt() {
|
||
var s = ul !== 0;
|
||
return ul = 0, s;
|
||
}
|
||
function Gt() {
|
||
var s = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
|
||
return hr === null ? Pn.memoizedState = hr = s : hr = hr.next = s, hr;
|
||
}
|
||
function hn() {
|
||
if (Jn === null) {
|
||
var s = Pn.alternate;
|
||
s = s !== null ? s.memoizedState : null;
|
||
} else
|
||
s = Jn.next;
|
||
var u = hr === null ? Pn.memoizedState : hr.next;
|
||
if (u !== null)
|
||
hr = u, Jn = s;
|
||
else {
|
||
if (s === null)
|
||
throw Error(f(310));
|
||
Jn = s, s = { memoizedState: Jn.memoizedState, baseState: Jn.baseState, baseQueue: Jn.baseQueue, queue: Jn.queue, next: null }, hr === null ? Pn.memoizedState = hr = s : hr = hr.next = s;
|
||
}
|
||
return hr;
|
||
}
|
||
function ha(s, u) {
|
||
return typeof u == "function" ? u(s) : u;
|
||
}
|
||
function Gc(s) {
|
||
var u = hn(), v = u.queue;
|
||
if (v === null)
|
||
throw Error(f(311));
|
||
v.lastRenderedReducer = s;
|
||
var S = Jn, w = S.baseQueue, T = v.pending;
|
||
if (T !== null) {
|
||
if (w !== null) {
|
||
var N = w.next;
|
||
w.next = T.next, T.next = N;
|
||
}
|
||
S.baseQueue = w = T, v.pending = null;
|
||
}
|
||
if (w !== null) {
|
||
T = w.next, S = S.baseState;
|
||
var X = N = null, fe = null, Ue = T;
|
||
do {
|
||
var gt = Ue.lane;
|
||
if ((Kr & gt) === gt)
|
||
fe !== null && (fe = fe.next = { lane: 0, action: Ue.action, hasEagerState: Ue.hasEagerState, eagerState: Ue.eagerState, next: null }), S = Ue.hasEagerState ? Ue.eagerState : s(S, Ue.action);
|
||
else {
|
||
var jt = {
|
||
lane: gt,
|
||
action: Ue.action,
|
||
hasEagerState: Ue.hasEagerState,
|
||
eagerState: Ue.eagerState,
|
||
next: null
|
||
};
|
||
fe === null ? (X = fe = jt, N = S) : fe = fe.next = jt, Pn.lanes |= gt, bs |= gt;
|
||
}
|
||
Ue = Ue.next;
|
||
} while (Ue !== null && Ue !== T);
|
||
fe === null ? N = S : fe.next = X, oi(S, u.memoizedState) || (Pr = !0), u.memoizedState = S, u.baseState = N, u.baseQueue = fe, v.lastRenderedState = S;
|
||
}
|
||
if (s = v.interleaved, s !== null) {
|
||
w = s;
|
||
do
|
||
T = w.lane, Pn.lanes |= T, bs |= T, w = w.next;
|
||
while (w !== s);
|
||
} else
|
||
w === null && (v.lanes = 0);
|
||
return [u.memoizedState, v.dispatch];
|
||
}
|
||
function np(s) {
|
||
var u = hn(), v = u.queue;
|
||
if (v === null)
|
||
throw Error(f(311));
|
||
v.lastRenderedReducer = s;
|
||
var S = v.dispatch, w = v.pending, T = u.memoizedState;
|
||
if (w !== null) {
|
||
v.pending = null;
|
||
var N = w = w.next;
|
||
do
|
||
T = s(T, N.action), N = N.next;
|
||
while (N !== w);
|
||
oi(T, u.memoizedState) || (Pr = !0), u.memoizedState = T, u.baseQueue === null && (u.baseState = T), v.lastRenderedState = T;
|
||
}
|
||
return [T, S];
|
||
}
|
||
function dv() {
|
||
}
|
||
function fv(s, u) {
|
||
var v = Pn, S = hn(), w = u(), T = !oi(S.memoizedState, w);
|
||
if (T && (S.memoizedState = w, Pr = !0), S = S.queue, pu(vr.bind(null, v, S, s), [s]), S.getSnapshot !== u || T || hr !== null && hr.memoizedState.tag & 1) {
|
||
if (v.flags |= 2048, fi(9, Me.bind(null, v, S, w, u), void 0, null), wr === null)
|
||
throw Error(f(349));
|
||
Kr & 30 || qc(v, u, w);
|
||
}
|
||
return w;
|
||
}
|
||
function qc(s, u, v) {
|
||
s.flags |= 16384, s = { getSnapshot: u, value: v }, u = Pn.updateQueue, u === null ? (u = { lastEffect: null, stores: null }, Pn.updateQueue = u, u.stores = [s]) : (v = u.stores, v === null ? u.stores = [s] : v.push(s));
|
||
}
|
||
function Me(s, u, v, S) {
|
||
u.value = v, u.getSnapshot = S, Pt(u) && vs(s);
|
||
}
|
||
function vr(s, u, v) {
|
||
return v(function() {
|
||
Pt(u) && vs(s);
|
||
});
|
||
}
|
||
function Pt(s) {
|
||
var u = s.getSnapshot;
|
||
s = s.value;
|
||
try {
|
||
var v = u();
|
||
return !oi(s, v);
|
||
} catch {
|
||
return !0;
|
||
}
|
||
}
|
||
function vs(s) {
|
||
var u = ci(s, 1);
|
||
u !== null && Na(u, s, 1, -1);
|
||
}
|
||
function Mi(s) {
|
||
var u = Gt();
|
||
return typeof s == "function" && (s = s()), u.memoizedState = u.baseState = s, s = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: ha, lastRenderedState: s }, u.queue = s, s = s.dispatch = ip.bind(null, Pn, s), [u.memoizedState, s];
|
||
}
|
||
function fi(s, u, v, S) {
|
||
return s = { tag: s, create: u, destroy: v, deps: S, next: null }, u = Pn.updateQueue, u === null ? (u = { lastEffect: null, stores: null }, Pn.updateQueue = u, u.lastEffect = s.next = s) : (v = u.lastEffect, v === null ? u.lastEffect = s.next = s : (S = v.next, v.next = s, s.next = S, u.lastEffect = s)), s;
|
||
}
|
||
function pi() {
|
||
return hn().memoizedState;
|
||
}
|
||
function ko(s, u, v, S) {
|
||
var w = Gt();
|
||
Pn.flags |= s, w.memoizedState = fi(1 | u, v, void 0, S === void 0 ? null : S);
|
||
}
|
||
function to(s, u, v, S) {
|
||
var w = hn();
|
||
S = S === void 0 ? null : S;
|
||
var T = void 0;
|
||
if (Jn !== null) {
|
||
var N = Jn.memoizedState;
|
||
if (T = N.destroy, S !== null && Wc(S, N.deps)) {
|
||
w.memoizedState = fi(u, v, T, S);
|
||
return;
|
||
}
|
||
}
|
||
Pn.flags |= s, w.memoizedState = fi(1 | u, v, T, S);
|
||
}
|
||
function cl(s, u) {
|
||
return ko(8390656, 8, s, u);
|
||
}
|
||
function pu(s, u) {
|
||
return to(2048, 8, s, u);
|
||
}
|
||
function Yc(s, u) {
|
||
return to(4, 2, s, u);
|
||
}
|
||
function Qc(s, u) {
|
||
return to(4, 4, s, u);
|
||
}
|
||
function Xc(s, u) {
|
||
if (typeof u == "function")
|
||
return s = s(), u(s), function() {
|
||
u(null);
|
||
};
|
||
if (u != null)
|
||
return s = s(), u.current = s, function() {
|
||
u.current = null;
|
||
};
|
||
}
|
||
function Kc(s, u, v) {
|
||
return v = v != null ? v.concat([s]) : null, to(4, 4, Xc.bind(null, u, s), v);
|
||
}
|
||
function hu() {
|
||
}
|
||
function Zc(s, u) {
|
||
var v = hn();
|
||
u = u === void 0 ? null : u;
|
||
var S = v.memoizedState;
|
||
return S !== null && u !== null && Wc(u, S[1]) ? S[0] : (v.memoizedState = [s, u], s);
|
||
}
|
||
function Jc(s, u) {
|
||
var v = hn();
|
||
u = u === void 0 ? null : u;
|
||
var S = v.memoizedState;
|
||
return S !== null && u !== null && Wc(u, S[1]) ? S[0] : (s = s(), v.memoizedState = [s, u], s);
|
||
}
|
||
function $c(s, u, v) {
|
||
return Kr & 21 ? (oi(v, u) || (v = ev(), Pn.lanes |= v, bs |= v, s.baseState = !0), u) : (s.baseState && (s.baseState = !1, Pr = !0), s.memoizedState = v);
|
||
}
|
||
function rp(s, u) {
|
||
var v = dn;
|
||
dn = v !== 0 && 4 > v ? v : 4, s(!0);
|
||
var S = ll.transition;
|
||
ll.transition = {};
|
||
try {
|
||
s(!1), u();
|
||
} finally {
|
||
dn = v, ll.transition = S;
|
||
}
|
||
}
|
||
function ed() {
|
||
return hn().memoizedState;
|
||
}
|
||
function ap(s, u, v) {
|
||
var S = Lr(s);
|
||
if (v = { lane: S, action: v, hasEagerState: !1, eagerState: null, next: null }, td(s))
|
||
nd(u, v);
|
||
else if (v = Zf(s, u, v, S), v !== null) {
|
||
var w = Ir();
|
||
Na(v, s, S, w), vu(v, u, S);
|
||
}
|
||
}
|
||
function ip(s, u, v) {
|
||
var S = Lr(s), w = { lane: S, action: v, hasEagerState: !1, eagerState: null, next: null };
|
||
if (td(s))
|
||
nd(u, w);
|
||
else {
|
||
var T = s.alternate;
|
||
if (s.lanes === 0 && (T === null || T.lanes === 0) && (T = u.lastRenderedReducer, T !== null))
|
||
try {
|
||
var N = u.lastRenderedState, X = T(N, v);
|
||
if (w.hasEagerState = !0, w.eagerState = X, oi(X, N)) {
|
||
var fe = u.interleaved;
|
||
fe === null ? (w.next = w, zc(u)) : (w.next = fe.next, fe.next = w), u.interleaved = w;
|
||
return;
|
||
}
|
||
} catch {
|
||
} finally {
|
||
}
|
||
v = Zf(s, u, w, S), v !== null && (w = Ir(), Na(v, s, S, w), vu(v, u, S));
|
||
}
|
||
}
|
||
function td(s) {
|
||
var u = s.alternate;
|
||
return s === Pn || u !== null && u === Pn;
|
||
}
|
||
function nd(s, u) {
|
||
Ro = fu = !0;
|
||
var v = s.pending;
|
||
v === null ? u.next = u : (u.next = v.next, v.next = u), s.pending = u;
|
||
}
|
||
function vu(s, u, v) {
|
||
if (v & 4194240) {
|
||
var S = u.lanes;
|
||
S &= s.pendingLanes, v |= S, u.lanes = v, Ff(s, v);
|
||
}
|
||
}
|
||
var no = { readContext: Xr, useCallback: $n, useContext: $n, useEffect: $n, useImperativeHandle: $n, useInsertionEffect: $n, useLayoutEffect: $n, useMemo: $n, useReducer: $n, useRef: $n, useState: $n, useDebugValue: $n, useDeferredValue: $n, useTransition: $n, useMutableSource: $n, useSyncExternalStore: $n, useId: $n, unstable_isNewReconciler: !1 }, op = { readContext: Xr, useCallback: function(s, u) {
|
||
return Gt().memoizedState = [s, u === void 0 ? null : u], s;
|
||
}, useContext: Xr, useEffect: cl, useImperativeHandle: function(s, u, v) {
|
||
return v = v != null ? v.concat([s]) : null, ko(
|
||
4194308,
|
||
4,
|
||
Xc.bind(null, u, s),
|
||
v
|
||
);
|
||
}, useLayoutEffect: function(s, u) {
|
||
return ko(4194308, 4, s, u);
|
||
}, useInsertionEffect: function(s, u) {
|
||
return ko(4, 2, s, u);
|
||
}, useMemo: function(s, u) {
|
||
var v = Gt();
|
||
return u = u === void 0 ? null : u, s = s(), v.memoizedState = [s, u], s;
|
||
}, useReducer: function(s, u, v) {
|
||
var S = Gt();
|
||
return u = v !== void 0 ? v(u) : u, S.memoizedState = S.baseState = u, s = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: s, lastRenderedState: u }, S.queue = s, s = s.dispatch = ap.bind(null, Pn, s), [S.memoizedState, s];
|
||
}, useRef: function(s) {
|
||
var u = Gt();
|
||
return s = { current: s }, u.memoizedState = s;
|
||
}, useState: Mi, useDebugValue: hu, useDeferredValue: function(s) {
|
||
return Gt().memoizedState = s;
|
||
}, useTransition: function() {
|
||
var s = Mi(!1), u = s[0];
|
||
return s = rp.bind(null, s[1]), Gt().memoizedState = s, [u, s];
|
||
}, useMutableSource: function() {
|
||
}, useSyncExternalStore: function(s, u, v) {
|
||
var S = Pn, w = Gt();
|
||
if (Un) {
|
||
if (v === void 0)
|
||
throw Error(f(407));
|
||
v = v();
|
||
} else {
|
||
if (v = u(), wr === null)
|
||
throw Error(f(349));
|
||
Kr & 30 || qc(S, u, v);
|
||
}
|
||
w.memoizedState = v;
|
||
var T = { value: v, getSnapshot: u };
|
||
return w.queue = T, cl(vr.bind(
|
||
null,
|
||
S,
|
||
T,
|
||
s
|
||
), [s]), S.flags |= 2048, fi(9, Me.bind(null, S, T, v, u), void 0, null), v;
|
||
}, useId: function() {
|
||
var s = Gt(), u = wr.identifierPrefix;
|
||
if (Un) {
|
||
var v = Ti, S = Xi;
|
||
v = (S & ~(1 << 32 - ii(S) - 1)).toString(32) + v, u = ":" + u + "R" + v, v = ul++, 0 < v && (u += "H" + v.toString(32)), u += ":";
|
||
} else
|
||
v = Y0++, u = ":" + u + "r" + v.toString(32) + ":";
|
||
return s.memoizedState = u;
|
||
}, unstable_isNewReconciler: !1 }, sp = {
|
||
readContext: Xr,
|
||
useCallback: Zc,
|
||
useContext: Xr,
|
||
useEffect: pu,
|
||
useImperativeHandle: Kc,
|
||
useInsertionEffect: Yc,
|
||
useLayoutEffect: Qc,
|
||
useMemo: Jc,
|
||
useReducer: Gc,
|
||
useRef: pi,
|
||
useState: function() {
|
||
return Gc(ha);
|
||
},
|
||
useDebugValue: hu,
|
||
useDeferredValue: function(s) {
|
||
var u = hn();
|
||
return $c(u, Jn.memoizedState, s);
|
||
},
|
||
useTransition: function() {
|
||
var s = Gc(ha)[0], u = hn().memoizedState;
|
||
return [s, u];
|
||
},
|
||
useMutableSource: dv,
|
||
useSyncExternalStore: fv,
|
||
useId: ed,
|
||
unstable_isNewReconciler: !1
|
||
}, lp = { readContext: Xr, useCallback: Zc, useContext: Xr, useEffect: pu, useImperativeHandle: Kc, useInsertionEffect: Yc, useLayoutEffect: Qc, useMemo: Jc, useReducer: np, useRef: pi, useState: function() {
|
||
return np(ha);
|
||
}, useDebugValue: hu, useDeferredValue: function(s) {
|
||
var u = hn();
|
||
return Jn === null ? u.memoizedState = s : $c(u, Jn.memoizedState, s);
|
||
}, useTransition: function() {
|
||
var s = np(ha)[0], u = hn().memoizedState;
|
||
return [s, u];
|
||
}, useMutableSource: dv, useSyncExternalStore: fv, useId: ed, unstable_isNewReconciler: !1 };
|
||
function Po(s, u) {
|
||
try {
|
||
var v = "", S = u;
|
||
do
|
||
v += q0(S), S = S.return;
|
||
while (S);
|
||
var w = v;
|
||
} catch (T) {
|
||
w = `
|
||
Error generating stack: ` + T.message + `
|
||
` + T.stack;
|
||
}
|
||
return { value: s, source: u, stack: w, digest: null };
|
||
}
|
||
function rd(s, u, v) {
|
||
return { value: s, source: null, stack: v ?? null, digest: u ?? null };
|
||
}
|
||
function ms(s, u) {
|
||
try {
|
||
console.error(u.value);
|
||
} catch (v) {
|
||
setTimeout(function() {
|
||
throw v;
|
||
});
|
||
}
|
||
}
|
||
var pv = typeof WeakMap == "function" ? WeakMap : Map;
|
||
function dl(s, u, v) {
|
||
v = Di(-1, v), v.tag = 3, v.payload = { element: null };
|
||
var S = u.value;
|
||
return v.callback = function() {
|
||
vd || (vd = !0, Sp = S), ms(s, u);
|
||
}, v;
|
||
}
|
||
function Oo(s, u, v) {
|
||
v = Di(-1, v), v.tag = 3;
|
||
var S = s.type.getDerivedStateFromError;
|
||
if (typeof S == "function") {
|
||
var w = u.value;
|
||
v.payload = function() {
|
||
return S(w);
|
||
}, v.callback = function() {
|
||
ms(s, u);
|
||
};
|
||
}
|
||
var T = s.stateNode;
|
||
return T !== null && typeof T.componentDidCatch == "function" && (v.callback = function() {
|
||
ms(s, u), typeof S != "function" && (ki === null ? ki = /* @__PURE__ */ new Set([this]) : ki.add(this));
|
||
var N = u.stack;
|
||
this.componentDidCatch(u.value, { componentStack: N !== null ? N : "" });
|
||
}), v;
|
||
}
|
||
function va(s, u, v) {
|
||
var S = s.pingCache;
|
||
if (S === null) {
|
||
S = s.pingCache = new pv();
|
||
var w = /* @__PURE__ */ new Set();
|
||
S.set(u, w);
|
||
} else
|
||
w = S.get(u), w === void 0 && (w = /* @__PURE__ */ new Set(), S.set(u, w));
|
||
w.has(v) || (w.add(v), s = mi.bind(null, s, u, v), u.then(s, s));
|
||
}
|
||
function hv(s) {
|
||
do {
|
||
var u;
|
||
if ((u = s.tag === 13) && (u = s.memoizedState, u = u !== null ? u.dehydrated !== null : !0), u)
|
||
return s;
|
||
s = s.return;
|
||
} while (s !== null);
|
||
return null;
|
||
}
|
||
function Tn(s, u, v, S, w) {
|
||
return s.mode & 1 ? (s.flags |= 65536, s.lanes = w, s) : (s === u ? s.flags |= 65536 : (s.flags |= 128, v.flags |= 131072, v.flags &= -52805, v.tag === 1 && (v.alternate === null ? v.tag = 17 : (u = Di(-1, 1), u.tag = 2, To(v, u, 1))), v.lanes |= 1), s);
|
||
}
|
||
var ad = h.ReactCurrentOwner, Pr = !1;
|
||
function mr(s, u, v, S) {
|
||
u.child = s === null ? qa(u, null, v, S) : $i(u, s.child, v, S);
|
||
}
|
||
function mu(s, u, v, S, w) {
|
||
v = v.render;
|
||
var T = u.ref;
|
||
return al(u, w), S = Mt(s, u, v, S, T, w), v = Zt(), s !== null && !Pr ? (u.updateQueue = s.updateQueue, u.flags &= -2053, s.lanes &= ~w, er(s, u, w)) : (Un && v && Vf(u), u.flags |= 1, mr(s, u, S, w), u.child);
|
||
}
|
||
function vv(s, u, v, S, w) {
|
||
if (s === null) {
|
||
var T = v.type;
|
||
return typeof T == "function" && !Sd(T) && T.defaultProps === void 0 && v.compare === null && v.defaultProps === void 0 ? (u.tag = 15, u.type = T, mv(s, u, T, S, w)) : (s = Mu(v.type, null, S, u, u.mode, w), s.ref = u.ref, s.return = u, u.child = s);
|
||
}
|
||
if (T = s.child, !(s.lanes & w)) {
|
||
var N = T.memoizedProps;
|
||
if (v = v.compare, v = v !== null ? v : Oc, v(N, S) && s.ref === u.ref)
|
||
return er(s, u, w);
|
||
}
|
||
return u.flags |= 1, s = Oi(T, S), s.ref = u.ref, s.return = u, u.child = s;
|
||
}
|
||
function mv(s, u, v, S, w) {
|
||
if (s !== null) {
|
||
var T = s.memoizedProps;
|
||
if (Oc(T, S) && s.ref === u.ref)
|
||
if (Pr = !1, u.pendingProps = S = T, (s.lanes & w) !== 0)
|
||
s.flags & 131072 && (Pr = !0);
|
||
else
|
||
return u.lanes = s.lanes, er(s, u, w);
|
||
}
|
||
return gu(s, u, v, S, w);
|
||
}
|
||
function gv(s, u, v) {
|
||
var S = u.pendingProps, w = S.children, T = s !== null ? s.memoizedState : null;
|
||
if (S.mode === "hidden")
|
||
if (!(u.mode & 1))
|
||
u.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, xn(xl, Aa), Aa |= v;
|
||
else {
|
||
if (!(v & 1073741824))
|
||
return s = T !== null ? T.baseLanes | v : v, u.lanes = u.childLanes = 1073741824, u.memoizedState = { baseLanes: s, cachePool: null, transitions: null }, u.updateQueue = null, xn(xl, Aa), Aa |= s, null;
|
||
u.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, S = T !== null ? T.baseLanes : v, xn(xl, Aa), Aa |= S;
|
||
}
|
||
else
|
||
T !== null ? (S = T.baseLanes | v, u.memoizedState = null) : S = v, xn(xl, Aa), Aa |= S;
|
||
return mr(s, u, w, v), u.child;
|
||
}
|
||
function yv(s, u) {
|
||
var v = u.ref;
|
||
(s === null && v !== null || s !== null && s.ref !== v) && (u.flags |= 512, u.flags |= 2097152);
|
||
}
|
||
function gu(s, u, v, S, w) {
|
||
var T = qr(v) ? us : Gr.current;
|
||
return T = Zs(u, T), al(u, w), v = Mt(s, u, v, S, T, w), S = Zt(), s !== null && !Pr ? (u.updateQueue = s.updateQueue, u.flags &= -2053, s.lanes &= ~w, er(s, u, w)) : (Un && S && Vf(u), u.flags |= 1, mr(s, u, v, w), u.child);
|
||
}
|
||
function xv(s, u, v, S, w) {
|
||
if (qr(v)) {
|
||
var T = !0;
|
||
lu(u);
|
||
} else
|
||
T = !1;
|
||
if (al(u, w), u.stateNode === null)
|
||
pl(s, u), cv(u, v, S), $f(u, v, S, w), S = !0;
|
||
else if (s === null) {
|
||
var N = u.stateNode, X = u.memoizedProps;
|
||
N.props = X;
|
||
var fe = N.context, Ue = v.contextType;
|
||
typeof Ue == "object" && Ue !== null ? Ue = Xr(Ue) : (Ue = qr(v) ? us : Gr.current, Ue = Zs(u, Ue));
|
||
var gt = v.getDerivedStateFromProps, jt = typeof gt == "function" || typeof N.getSnapshotBeforeUpdate == "function";
|
||
jt || typeof N.UNSAFE_componentWillReceiveProps != "function" && typeof N.componentWillReceiveProps != "function" || (X !== S || fe !== Ue) && Hc(u, N, S, Ue), Zi = !1;
|
||
var nt = u.memoizedState;
|
||
N.state = nt, il(u, S, N, w), fe = u.memoizedState, X !== S || nt !== fe || fa.current || Zi ? (typeof gt == "function" && (ol(u, v, gt, S), fe = u.memoizedState), (X = Zi || Uc(u, v, X, S, nt, fe, Ue)) ? (jt || typeof N.UNSAFE_componentWillMount != "function" && typeof N.componentWillMount != "function" || (typeof N.componentWillMount == "function" && N.componentWillMount(), typeof N.UNSAFE_componentWillMount == "function" && N.UNSAFE_componentWillMount()), typeof N.componentDidMount == "function" && (u.flags |= 4194308)) : (typeof N.componentDidMount == "function" && (u.flags |= 4194308), u.memoizedProps = S, u.memoizedState = fe), N.props = S, N.state = fe, N.context = Ue, S = X) : (typeof N.componentDidMount == "function" && (u.flags |= 4194308), S = !1);
|
||
} else {
|
||
N = u.stateNode, Jf(s, u), X = u.memoizedProps, Ue = u.type === u.elementType ? X : ui(u.type, X), N.props = Ue, jt = u.pendingProps, nt = N.context, fe = v.contextType, typeof fe == "object" && fe !== null ? fe = Xr(fe) : (fe = qr(v) ? us : Gr.current, fe = Zs(u, fe));
|
||
var In = v.getDerivedStateFromProps;
|
||
(gt = typeof In == "function" || typeof N.getSnapshotBeforeUpdate == "function") || typeof N.UNSAFE_componentWillReceiveProps != "function" && typeof N.componentWillReceiveProps != "function" || (X !== jt || nt !== fe) && Hc(u, N, S, fe), Zi = !1, nt = u.memoizedState, N.state = nt, il(u, S, N, w);
|
||
var Dn = u.memoizedState;
|
||
X !== jt || nt !== Dn || fa.current || Zi ? (typeof In == "function" && (ol(u, v, In, S), Dn = u.memoizedState), (Ue = Zi || Uc(u, v, Ue, S, nt, Dn, fe) || !1) ? (gt || typeof N.UNSAFE_componentWillUpdate != "function" && typeof N.componentWillUpdate != "function" || (typeof N.componentWillUpdate == "function" && N.componentWillUpdate(S, Dn, fe), typeof N.UNSAFE_componentWillUpdate == "function" && N.UNSAFE_componentWillUpdate(S, Dn, fe)), typeof N.componentDidUpdate == "function" && (u.flags |= 4), typeof N.getSnapshotBeforeUpdate == "function" && (u.flags |= 1024)) : (typeof N.componentDidUpdate != "function" || X === s.memoizedProps && nt === s.memoizedState || (u.flags |= 4), typeof N.getSnapshotBeforeUpdate != "function" || X === s.memoizedProps && nt === s.memoizedState || (u.flags |= 1024), u.memoizedProps = S, u.memoizedState = Dn), N.props = S, N.state = Dn, N.context = fe, S = Ue) : (typeof N.componentDidUpdate != "function" || X === s.memoizedProps && nt === s.memoizedState || (u.flags |= 4), typeof N.getSnapshotBeforeUpdate != "function" || X === s.memoizedProps && nt === s.memoizedState || (u.flags |= 1024), S = !1);
|
||
}
|
||
return yu(s, u, v, S, T, w);
|
||
}
|
||
function yu(s, u, v, S, w, T) {
|
||
yv(s, u);
|
||
var N = (u.flags & 128) !== 0;
|
||
if (!S && !N)
|
||
return w && Nf(u, v, !1), er(s, u, T);
|
||
S = u.stateNode, ad.current = u;
|
||
var X = N && typeof v.getDerivedStateFromError != "function" ? null : S.render();
|
||
return u.flags |= 1, s !== null && N ? (u.child = $i(u, s.child, null, T), u.child = $i(u, null, X, T)) : mr(s, u, X, T), u.memoizedState = S.state, w && Nf(u, v, !0), u.child;
|
||
}
|
||
function up(s) {
|
||
var u = s.stateNode;
|
||
u.pendingContext ? Af(s, u.pendingContext, u.pendingContext !== u.context) : u.context && Af(s, u.context, !1), pr(s, u.containerInfo);
|
||
}
|
||
function Sv(s, u, v, S, w) {
|
||
return nl(), qf(w), u.flags |= 256, mr(s, u, v, S), u.child;
|
||
}
|
||
var cp = { dehydrated: null, treeContext: null, retryLane: 0 };
|
||
function fl(s) {
|
||
return { baseLanes: s, cachePool: null, transitions: null };
|
||
}
|
||
function bv(s, u, v) {
|
||
var S = u.pendingProps, w = fn.current, T = !1, N = (u.flags & 128) !== 0, X;
|
||
if ((X = N) || (X = s !== null && s.memoizedState === null ? !1 : (w & 2) !== 0), X ? (T = !0, u.flags &= -129) : (s === null || s.memoizedState !== null) && (w |= 1), xn(fn, w & 1), s === null)
|
||
return Gf(u), s = u.memoizedState, s !== null && (s = s.dehydrated, s !== null) ? (u.mode & 1 ? Df(s) ? u.lanes = 8 : u.lanes = 1073741824 : u.lanes = 1, null) : (N = S.children, s = S.fallback, T ? (S = u.mode, T = u.child, N = { mode: "hidden", children: N }, !(S & 1) && T !== null ? (T.childLanes = 0, T.pendingProps = N) : T = wl(N, S, 0, null), s = Lo(s, S, v, null), T.return = u, s.return = u, T.sibling = s, u.child = T, u.child.memoizedState = fl(v), u.memoizedState = cp, s) : id(u, N));
|
||
if (w = s.memoizedState, w !== null && (X = w.dehydrated, X !== null))
|
||
return Q0(s, u, N, S, X, w, v);
|
||
if (T) {
|
||
T = S.fallback, N = u.mode, w = s.child, X = w.sibling;
|
||
var fe = { mode: "hidden", children: S.children };
|
||
return !(N & 1) && u.child !== w ? (S = u.child, S.childLanes = 0, S.pendingProps = fe, u.deletions = null) : (S = Oi(w, fe), S.subtreeFlags = w.subtreeFlags & 14680064), X !== null ? T = Oi(X, T) : (T = Lo(T, N, v, null), T.flags |= 2), T.return = u, S.return = u, S.sibling = T, u.child = S, S = T, T = u.child, N = s.child.memoizedState, N = N === null ? fl(v) : { baseLanes: N.baseLanes | v, cachePool: null, transitions: N.transitions }, T.memoizedState = N, T.childLanes = s.childLanes & ~v, u.memoizedState = cp, S;
|
||
}
|
||
return T = s.child, s = T.sibling, S = Oi(T, { mode: "visible", children: S.children }), !(u.mode & 1) && (S.lanes = v), S.return = u, S.sibling = null, s !== null && (v = u.deletions, v === null ? (u.deletions = [s], u.flags |= 16) : v.push(s)), u.child = S, u.memoizedState = null, S;
|
||
}
|
||
function id(s, u) {
|
||
return u = wl({ mode: "visible", children: u }, s.mode, 0, null), u.return = s, s.child = u;
|
||
}
|
||
function xu(s, u, v, S) {
|
||
return S !== null && qf(S), $i(u, s.child, null, v), s = id(u, u.pendingProps.children), s.flags |= 2, u.memoizedState = null, s;
|
||
}
|
||
function Q0(s, u, v, S, w, T, N) {
|
||
if (v)
|
||
return u.flags & 256 ? (u.flags &= -257, S = rd(Error(f(422))), xu(s, u, N, S)) : u.memoizedState !== null ? (u.child = s.child, u.flags |= 128, null) : (T = S.fallback, w = u.mode, S = wl({ mode: "visible", children: S.children }, w, 0, null), T = Lo(T, w, N, null), T.flags |= 2, S.return = u, T.return = u, S.sibling = T, u.child = S, u.mode & 1 && $i(u, s.child, null, N), u.child.memoizedState = fl(N), u.memoizedState = cp, T);
|
||
if (!(u.mode & 1))
|
||
return xu(s, u, N, null);
|
||
if (Df(w))
|
||
return S = ru(w).digest, T = Error(f(419)), S = rd(
|
||
T,
|
||
S,
|
||
void 0
|
||
), xu(s, u, N, S);
|
||
if (v = (N & s.childLanes) !== 0, Pr || v) {
|
||
if (S = wr, S !== null) {
|
||
switch (N & -N) {
|
||
case 4:
|
||
w = 2;
|
||
break;
|
||
case 16:
|
||
w = 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:
|
||
w = 32;
|
||
break;
|
||
case 536870912:
|
||
w = 268435456;
|
||
break;
|
||
default:
|
||
w = 0;
|
||
}
|
||
w = w & (S.suspendedLanes | N) ? 0 : w, w !== 0 && w !== T.retryLane && (T.retryLane = w, ci(s, w), Na(
|
||
S,
|
||
s,
|
||
w,
|
||
-1
|
||
));
|
||
}
|
||
return io(), S = rd(Error(f(421))), xu(s, u, N, S);
|
||
}
|
||
return Zh(w) ? (u.flags |= 128, u.child = s.child, u = Io.bind(null, s), $r(w, u), null) : (s = T.treeContext, Et && (Ga = ss(w), Ra = u, Un = !0, li = null, cu = !1, s !== null && (Ma[Wa++] = Xi, Ma[Wa++] = Ti, Ma[Wa++] = fs, Xi = s.id, Ti = s.overflow, fs = u)), u = id(u, S.children), u.flags |= 4096, u);
|
||
}
|
||
function Ao(s, u, v) {
|
||
s.lanes |= u;
|
||
var S = s.alternate;
|
||
S !== null && (S.lanes |= u), Kf(s.return, u, v);
|
||
}
|
||
function gs(s, u, v, S, w) {
|
||
var T = s.memoizedState;
|
||
T === null ? s.memoizedState = { isBackwards: u, rendering: null, renderingStartTime: 0, last: S, tail: v, tailMode: w } : (T.isBackwards = u, T.rendering = null, T.renderingStartTime = 0, T.last = S, T.tail = v, T.tailMode = w);
|
||
}
|
||
function No(s, u, v) {
|
||
var S = u.pendingProps, w = S.revealOrder, T = S.tail;
|
||
if (mr(s, u, S.children, v), S = fn.current, S & 2)
|
||
S = S & 1 | 2, u.flags |= 128;
|
||
else {
|
||
if (s !== null && s.flags & 128)
|
||
e:
|
||
for (s = u.child; s !== null; ) {
|
||
if (s.tag === 13)
|
||
s.memoizedState !== null && Ao(s, v, u);
|
||
else if (s.tag === 19)
|
||
Ao(s, v, u);
|
||
else if (s.child !== null) {
|
||
s.child.return = s, s = s.child;
|
||
continue;
|
||
}
|
||
if (s === u)
|
||
break e;
|
||
for (; s.sibling === null; ) {
|
||
if (s.return === null || s.return === u)
|
||
break e;
|
||
s = s.return;
|
||
}
|
||
s.sibling.return = s.return, s = s.sibling;
|
||
}
|
||
S &= 1;
|
||
}
|
||
if (xn(fn, S), !(u.mode & 1))
|
||
u.memoizedState = null;
|
||
else
|
||
switch (w) {
|
||
case "forwards":
|
||
for (v = u.child, w = null; v !== null; )
|
||
s = v.alternate, s !== null && sl(s) === null && (w = v), v = v.sibling;
|
||
v = w, v === null ? (w = u.child, u.child = null) : (w = v.sibling, v.sibling = null), gs(u, !1, w, v, T);
|
||
break;
|
||
case "backwards":
|
||
for (v = null, w = u.child, u.child = null; w !== null; ) {
|
||
if (s = w.alternate, s !== null && sl(s) === null) {
|
||
u.child = w;
|
||
break;
|
||
}
|
||
s = w.sibling, w.sibling = v, v = w, w = s;
|
||
}
|
||
gs(u, !0, v, null, T);
|
||
break;
|
||
case "together":
|
||
gs(u, !1, null, null, void 0);
|
||
break;
|
||
default:
|
||
u.memoizedState = null;
|
||
}
|
||
return u.child;
|
||
}
|
||
function pl(s, u) {
|
||
!(u.mode & 1) && s !== null && (s.alternate = null, u.alternate = null, u.flags |= 2);
|
||
}
|
||
function er(s, u, v) {
|
||
if (s !== null && (u.dependencies = s.dependencies), bs |= u.lanes, !(v & u.childLanes))
|
||
return null;
|
||
if (s !== null && u.child !== s.child)
|
||
throw Error(f(153));
|
||
if (u.child !== null) {
|
||
for (s = u.child, v = Oi(s, s.pendingProps), u.child = v, v.return = u; s.sibling !== null; )
|
||
s = s.sibling, v = v.sibling = Oi(s, s.pendingProps), v.return = u;
|
||
v.sibling = null;
|
||
}
|
||
return u.child;
|
||
}
|
||
function hl(s, u, v) {
|
||
switch (u.tag) {
|
||
case 3:
|
||
up(u), nl();
|
||
break;
|
||
case 5:
|
||
pa(u);
|
||
break;
|
||
case 1:
|
||
qr(u.type) && lu(u);
|
||
break;
|
||
case 4:
|
||
pr(u, u.stateNode.containerInfo);
|
||
break;
|
||
case 10:
|
||
uv(u, u.type._context, u.memoizedProps.value);
|
||
break;
|
||
case 13:
|
||
var S = u.memoizedState;
|
||
if (S !== null)
|
||
return S.dehydrated !== null ? (xn(fn, fn.current & 1), u.flags |= 128, null) : v & u.child.childLanes ? bv(s, u, v) : (xn(fn, fn.current & 1), s = er(s, u, v), s !== null ? s.sibling : null);
|
||
xn(fn, fn.current & 1);
|
||
break;
|
||
case 19:
|
||
if (S = (v & u.childLanes) !== 0, s.flags & 128) {
|
||
if (S)
|
||
return No(
|
||
s,
|
||
u,
|
||
v
|
||
);
|
||
u.flags |= 128;
|
||
}
|
||
var w = u.memoizedState;
|
||
if (w !== null && (w.rendering = null, w.tail = null, w.lastEffect = null), xn(fn, fn.current), S)
|
||
break;
|
||
return null;
|
||
case 22:
|
||
case 23:
|
||
return u.lanes = 0, gv(s, u, v);
|
||
}
|
||
return er(s, u, v);
|
||
}
|
||
function kt(s) {
|
||
s.flags |= 4;
|
||
}
|
||
function Su(s, u) {
|
||
if (s !== null && s.child === u.child)
|
||
return !0;
|
||
if (u.flags & 16)
|
||
return !1;
|
||
for (s = u.child; s !== null; ) {
|
||
if (s.flags & 12854 || s.subtreeFlags & 12854)
|
||
return !1;
|
||
s = s.sibling;
|
||
}
|
||
return !0;
|
||
}
|
||
var vl, od, sd, ml;
|
||
if (ze)
|
||
vl = function(s, u) {
|
||
for (var v = u.child; v !== null; ) {
|
||
if (v.tag === 5 || v.tag === 6)
|
||
we(s, v.stateNode);
|
||
else if (v.tag !== 4 && v.child !== null) {
|
||
v.child.return = v, v = v.child;
|
||
continue;
|
||
}
|
||
if (v === u)
|
||
break;
|
||
for (; v.sibling === null; ) {
|
||
if (v.return === null || v.return === u)
|
||
return;
|
||
v = v.return;
|
||
}
|
||
v.sibling.return = v.return, v = v.sibling;
|
||
}
|
||
}, od = function() {
|
||
}, sd = function(s, u, v, S, w) {
|
||
if (s = s.memoizedProps, s !== S) {
|
||
var T = u.stateNode, N = zn(ea.current);
|
||
v = se(T, v, s, S, w, N), (u.updateQueue = v) && kt(u);
|
||
}
|
||
}, ml = function(s, u, v, S) {
|
||
v !== S && kt(u);
|
||
};
|
||
else if (Qe) {
|
||
vl = function(s, u, v, S) {
|
||
for (var w = u.child; w !== null; ) {
|
||
if (w.tag === 5) {
|
||
var T = w.stateNode;
|
||
v && S && (T = Co(T, w.type, w.memoizedProps, w)), we(s, T);
|
||
} else if (w.tag === 6)
|
||
T = w.stateNode, v && S && (T = Va(T, w.memoizedProps, w)), we(s, T);
|
||
else if (w.tag !== 4) {
|
||
if (w.tag === 22 && w.memoizedState !== null)
|
||
T = w.child, T !== null && (T.return = w), vl(s, w, !0, !0);
|
||
else if (w.child !== null) {
|
||
w.child.return = w, w = w.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (w === u)
|
||
break;
|
||
for (; w.sibling === null; ) {
|
||
if (w.return === null || w.return === u)
|
||
return;
|
||
w = w.return;
|
||
}
|
||
w.sibling.return = w.return, w = w.sibling;
|
||
}
|
||
};
|
||
var gl = function(s, u, v, S) {
|
||
for (var w = u.child; w !== null; ) {
|
||
if (w.tag === 5) {
|
||
var T = w.stateNode;
|
||
v && S && (T = Co(T, w.type, w.memoizedProps, w)), sn(s, T);
|
||
} else if (w.tag === 6)
|
||
T = w.stateNode, v && S && (T = Va(T, w.memoizedProps, w)), sn(s, T);
|
||
else if (w.tag !== 4) {
|
||
if (w.tag === 22 && w.memoizedState !== null)
|
||
T = w.child, T !== null && (T.return = w), gl(s, w, !0, !0);
|
||
else if (w.child !== null) {
|
||
w.child.return = w, w = w.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (w === u)
|
||
break;
|
||
for (; w.sibling === null; ) {
|
||
if (w.return === null || w.return === u)
|
||
return;
|
||
w = w.return;
|
||
}
|
||
w.sibling.return = w.return, w = w.sibling;
|
||
}
|
||
};
|
||
od = function(s, u) {
|
||
var v = u.stateNode;
|
||
if (!Su(s, u)) {
|
||
s = v.containerInfo;
|
||
var S = bc(s);
|
||
gl(S, u, !1, !1), v.pendingChildren = S, kt(u), Wi(s, S);
|
||
}
|
||
}, sd = function(s, u, v, S, w) {
|
||
var T = s.stateNode, N = s.memoizedProps;
|
||
if ((s = Su(s, u)) && N === S)
|
||
u.stateNode = T;
|
||
else {
|
||
var X = u.stateNode, fe = zn(ea.current), Ue = null;
|
||
N !== S && (Ue = se(X, v, N, S, w, fe)), s && Ue === null ? u.stateNode = T : (T = nu(T, Ue, v, N, S, u, s, X), Ee(T, v, S, w, fe) && kt(u), u.stateNode = T, s ? kt(u) : vl(T, u, !1, !1));
|
||
}
|
||
}, ml = function(s, u, v, S) {
|
||
v !== S ? (s = zn(Pa.current), v = zn(ea.current), u.stateNode = Ce(S, s, v, u), kt(u)) : u.stateNode = s.stateNode;
|
||
};
|
||
} else
|
||
od = function() {
|
||
}, sd = function() {
|
||
}, ml = function() {
|
||
};
|
||
function bu(s, u) {
|
||
if (!Un)
|
||
switch (s.tailMode) {
|
||
case "hidden":
|
||
u = s.tail;
|
||
for (var v = null; u !== null; )
|
||
u.alternate !== null && (v = u), u = u.sibling;
|
||
v === null ? s.tail = null : v.sibling = null;
|
||
break;
|
||
case "collapsed":
|
||
v = s.tail;
|
||
for (var S = null; v !== null; )
|
||
v.alternate !== null && (S = v), v = v.sibling;
|
||
S === null ? u || s.tail === null ? s.tail = null : s.tail.sibling = null : S.sibling = null;
|
||
}
|
||
}
|
||
function Or(s) {
|
||
var u = s.alternate !== null && s.alternate.child === s.child, v = 0, S = 0;
|
||
if (u)
|
||
for (var w = s.child; w !== null; )
|
||
v |= w.lanes | w.childLanes, S |= w.subtreeFlags & 14680064, S |= w.flags & 14680064, w.return = s, w = w.sibling;
|
||
else
|
||
for (w = s.child; w !== null; )
|
||
v |= w.lanes | w.childLanes, S |= w.subtreeFlags, S |= w.flags, w.return = s, w = w.sibling;
|
||
return s.subtreeFlags |= S, s.childLanes = v, u;
|
||
}
|
||
function X0(s, u, v) {
|
||
var S = u.pendingProps;
|
||
switch (tl(u), u.tag) {
|
||
case 2:
|
||
case 16:
|
||
case 15:
|
||
case 0:
|
||
case 11:
|
||
case 7:
|
||
case 8:
|
||
case 12:
|
||
case 9:
|
||
case 14:
|
||
return Or(u), null;
|
||
case 1:
|
||
return qr(u.type) && su(), Or(u), null;
|
||
case 3:
|
||
return v = u.stateNode, Do(), Kt(fa), Kt(Gr), Vc(), v.pendingContext && (v.context = v.pendingContext, v.pendingContext = null), (s === null || s.child === null) && (Pc(u) ? kt(u) : s === null || s.memoizedState.isDehydrated && !(u.flags & 256) || (u.flags |= 1024, li !== null && (Cl(li), li = null))), od(s, u), Or(u), null;
|
||
case 5:
|
||
di(u), v = zn(Pa.current);
|
||
var w = u.type;
|
||
if (s !== null && u.stateNode != null)
|
||
sd(s, u, w, S, v), s.ref !== u.ref && (u.flags |= 512, u.flags |= 2097152);
|
||
else {
|
||
if (!S) {
|
||
if (u.stateNode === null)
|
||
throw Error(f(166));
|
||
return Or(u), null;
|
||
}
|
||
if (s = zn(ea.current), Pc(u)) {
|
||
if (!Et)
|
||
throw Error(f(175));
|
||
s = Rf(u.stateNode, u.type, u.memoizedProps, v, s, u, !cu), u.updateQueue = s, s !== null && kt(u);
|
||
} else {
|
||
var T = ne(w, S, v, s, u);
|
||
vl(T, u, !1, !1), u.stateNode = T, Ee(T, w, S, v, s) && kt(u);
|
||
}
|
||
u.ref !== null && (u.flags |= 512, u.flags |= 2097152);
|
||
}
|
||
return Or(u), null;
|
||
case 6:
|
||
if (s && u.stateNode != null)
|
||
ml(s, u, s.memoizedProps, S);
|
||
else {
|
||
if (typeof S != "string" && u.stateNode === null)
|
||
throw Error(f(166));
|
||
if (s = zn(Pa.current), v = zn(ea.current), Pc(u)) {
|
||
if (!Et)
|
||
throw Error(f(176));
|
||
if (s = u.stateNode, v = u.memoizedProps, (S = qi(s, v, u, !cu)) && (w = Ra, w !== null))
|
||
switch (w.tag) {
|
||
case 3:
|
||
Ec(w.stateNode.containerInfo, s, v, (w.mode & 1) !== 0);
|
||
break;
|
||
case 5:
|
||
N0(w.type, w.memoizedProps, w.stateNode, s, v, (w.mode & 1) !== 0);
|
||
}
|
||
S && kt(u);
|
||
} else
|
||
u.stateNode = Ce(S, s, v, u);
|
||
}
|
||
return Or(u), null;
|
||
case 13:
|
||
if (Kt(fn), S = u.memoizedState, s === null || s.memoizedState !== null && s.memoizedState.dehydrated !== null) {
|
||
if (Un && Ga !== null && u.mode & 1 && !(u.flags & 128))
|
||
lv(), nl(), u.flags |= 98560, w = !1;
|
||
else if (w = Pc(u), S !== null && S.dehydrated !== null) {
|
||
if (s === null) {
|
||
if (!w)
|
||
throw Error(f(318));
|
||
if (!Et)
|
||
throw Error(f(344));
|
||
if (w = u.memoizedState, w = w !== null ? w.dehydrated : null, !w)
|
||
throw Error(f(317));
|
||
wc(w, u);
|
||
} else
|
||
nl(), !(u.flags & 128) && (u.memoizedState = null), u.flags |= 4;
|
||
Or(u), w = !1;
|
||
} else
|
||
li !== null && (Cl(li), li = null), w = !0;
|
||
if (!w)
|
||
return u.flags & 65536 ? u : null;
|
||
}
|
||
return u.flags & 128 ? (u.lanes = v, u) : (v = S !== null, v !== (s !== null && s.memoizedState !== null) && v && (u.child.flags |= 8192, u.mode & 1 && (s === null || fn.current & 1 ? ur === 0 && (ur = 3) : io())), u.updateQueue !== null && (u.flags |= 4), Or(u), null);
|
||
case 4:
|
||
return Do(), od(s, u), s === null && ht(u.stateNode.containerInfo), Or(u), null;
|
||
case 10:
|
||
return Xf(u.type._context), Or(u), null;
|
||
case 17:
|
||
return qr(u.type) && su(), Or(u), null;
|
||
case 19:
|
||
if (Kt(fn), w = u.memoizedState, w === null)
|
||
return Or(u), null;
|
||
if (S = (u.flags & 128) !== 0, T = w.rendering, T === null)
|
||
if (S)
|
||
bu(w, !1);
|
||
else {
|
||
if (ur !== 0 || s !== null && s.flags & 128)
|
||
for (s = u.child; s !== null; ) {
|
||
if (T = sl(s), T !== null) {
|
||
for (u.flags |= 128, bu(w, !1), s = T.updateQueue, s !== null && (u.updateQueue = s, u.flags |= 4), u.subtreeFlags = 0, s = v, v = u.child; v !== null; )
|
||
S = v, w = s, S.flags &= 14680066, T = S.alternate, T === null ? (S.childLanes = 0, S.lanes = w, S.child = null, S.subtreeFlags = 0, S.memoizedProps = null, S.memoizedState = null, S.updateQueue = null, S.dependencies = null, S.stateNode = null) : (S.childLanes = T.childLanes, S.lanes = T.lanes, S.child = T.child, S.subtreeFlags = 0, S.deletions = null, S.memoizedProps = T.memoizedProps, S.memoizedState = T.memoizedState, S.updateQueue = T.updateQueue, S.type = T.type, w = T.dependencies, S.dependencies = w === null ? null : { lanes: w.lanes, firstContext: w.firstContext }), v = v.sibling;
|
||
return xn(fn, fn.current & 1 | 2), u.child;
|
||
}
|
||
s = s.sibling;
|
||
}
|
||
w.tail !== null && br() > hd && (u.flags |= 128, S = !0, bu(w, !1), u.lanes = 4194304);
|
||
}
|
||
else {
|
||
if (!S)
|
||
if (s = sl(T), s !== null) {
|
||
if (u.flags |= 128, S = !0, s = s.updateQueue, s !== null && (u.updateQueue = s, u.flags |= 4), bu(w, !0), w.tail === null && w.tailMode === "hidden" && !T.alternate && !Un)
|
||
return Or(u), null;
|
||
} else
|
||
2 * br() - w.renderingStartTime > hd && v !== 1073741824 && (u.flags |= 128, S = !0, bu(w, !1), u.lanes = 4194304);
|
||
w.isBackwards ? (T.sibling = u.child, u.child = T) : (s = w.last, s !== null ? s.sibling = T : u.child = T, w.last = T);
|
||
}
|
||
return w.tail !== null ? (u = w.tail, w.rendering = u, w.tail = u.sibling, w.renderingStartTime = br(), u.sibling = null, s = fn.current, xn(fn, S ? s & 1 | 2 : s & 1), u) : (Or(u), null);
|
||
case 22:
|
||
case 23:
|
||
return vi(), v = u.memoizedState !== null, s !== null && s.memoizedState !== null !== v && (u.flags |= 8192), v && u.mode & 1 ? Aa & 1073741824 && (Or(u), ze && u.subtreeFlags & 6 && (u.flags |= 8192)) : Or(u), null;
|
||
case 24:
|
||
return null;
|
||
case 25:
|
||
return null;
|
||
}
|
||
throw Error(f(
|
||
156,
|
||
u.tag
|
||
));
|
||
}
|
||
function dp(s, u) {
|
||
switch (tl(u), u.tag) {
|
||
case 1:
|
||
return qr(u.type) && su(), s = u.flags, s & 65536 ? (u.flags = s & -65537 | 128, u) : null;
|
||
case 3:
|
||
return Do(), Kt(fa), Kt(Gr), Vc(), s = u.flags, s & 65536 && !(s & 128) ? (u.flags = s & -65537 | 128, u) : null;
|
||
case 5:
|
||
return di(u), null;
|
||
case 13:
|
||
if (Kt(fn), s = u.memoizedState, s !== null && s.dehydrated !== null) {
|
||
if (u.alternate === null)
|
||
throw Error(f(340));
|
||
nl();
|
||
}
|
||
return s = u.flags, s & 65536 ? (u.flags = s & -65537 | 128, u) : null;
|
||
case 19:
|
||
return Kt(fn), null;
|
||
case 4:
|
||
return Do(), null;
|
||
case 10:
|
||
return Xf(u.type._context), null;
|
||
case 22:
|
||
case 23:
|
||
return vi(), null;
|
||
case 24:
|
||
return null;
|
||
default:
|
||
return null;
|
||
}
|
||
}
|
||
var ld = !1, Ar = !1, Cv = typeof WeakSet == "function" ? WeakSet : Set, ft = null;
|
||
function ta(s, u) {
|
||
var v = s.ref;
|
||
if (v !== null)
|
||
if (typeof v == "function")
|
||
try {
|
||
v(null);
|
||
} catch (S) {
|
||
nn(s, u, S);
|
||
}
|
||
else
|
||
v.current = null;
|
||
}
|
||
function ys(s, u, v) {
|
||
try {
|
||
v();
|
||
} catch (S) {
|
||
nn(s, u, S);
|
||
}
|
||
}
|
||
var yl = !1;
|
||
function fp(s, u) {
|
||
for (te(s.containerInfo), ft = u; ft !== null; )
|
||
if (s = ft, u = s.child, (s.subtreeFlags & 1028) !== 0 && u !== null)
|
||
u.return = s, ft = u;
|
||
else
|
||
for (; ft !== null; ) {
|
||
s = ft;
|
||
try {
|
||
var v = s.alternate;
|
||
if (s.flags & 1024)
|
||
switch (s.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
break;
|
||
case 1:
|
||
if (v !== null) {
|
||
var S = v.memoizedProps, w = v.memoizedState, T = s.stateNode, N = T.getSnapshotBeforeUpdate(s.elementType === s.type ? S : ui(s.type, S), w);
|
||
T.__reactInternalSnapshotBeforeUpdate = N;
|
||
}
|
||
break;
|
||
case 3:
|
||
ze && da(s.stateNode.containerInfo);
|
||
break;
|
||
case 5:
|
||
case 6:
|
||
case 4:
|
||
case 17:
|
||
break;
|
||
default:
|
||
throw Error(f(163));
|
||
}
|
||
} catch (X) {
|
||
nn(s, s.return, X);
|
||
}
|
||
if (u = s.sibling, u !== null) {
|
||
u.return = s.return, ft = u;
|
||
break;
|
||
}
|
||
ft = s.return;
|
||
}
|
||
return v = yl, yl = !1, v;
|
||
}
|
||
function ro(s, u, v) {
|
||
var S = u.updateQueue;
|
||
if (S = S !== null ? S.lastEffect : null, S !== null) {
|
||
var w = S = S.next;
|
||
do {
|
||
if ((w.tag & s) === s) {
|
||
var T = w.destroy;
|
||
w.destroy = void 0, T !== void 0 && ys(u, v, T);
|
||
}
|
||
w = w.next;
|
||
} while (w !== S);
|
||
}
|
||
}
|
||
function ma(s, u) {
|
||
if (u = u.updateQueue, u = u !== null ? u.lastEffect : null, u !== null) {
|
||
var v = u = u.next;
|
||
do {
|
||
if ((v.tag & s) === s) {
|
||
var S = v.create;
|
||
v.destroy = S();
|
||
}
|
||
v = v.next;
|
||
} while (v !== u);
|
||
}
|
||
}
|
||
function or(s) {
|
||
var u = s.ref;
|
||
if (u !== null) {
|
||
var v = s.stateNode;
|
||
switch (s.tag) {
|
||
case 5:
|
||
s = xe(v);
|
||
break;
|
||
default:
|
||
s = v;
|
||
}
|
||
typeof u == "function" ? u(s) : u.current = s;
|
||
}
|
||
}
|
||
function wv(s) {
|
||
var u = s.alternate;
|
||
u !== null && (s.alternate = null, wv(u)), s.child = null, s.deletions = null, s.sibling = null, s.tag === 5 && (u = s.stateNode, u !== null && Ot(u)), s.stateNode = null, s.return = null, s.dependencies = null, s.memoizedProps = null, s.memoizedState = null, s.pendingProps = null, s.stateNode = null, s.updateQueue = null;
|
||
}
|
||
function Ev(s) {
|
||
return s.tag === 5 || s.tag === 3 || s.tag === 4;
|
||
}
|
||
function jv(s) {
|
||
e:
|
||
for (; ; ) {
|
||
for (; s.sibling === null; ) {
|
||
if (s.return === null || Ev(s.return))
|
||
return null;
|
||
s = s.return;
|
||
}
|
||
for (s.sibling.return = s.return, s = s.sibling; s.tag !== 5 && s.tag !== 6 && s.tag !== 18; ) {
|
||
if (s.flags & 2 || s.child === null || s.tag === 4)
|
||
continue e;
|
||
s.child.return = s, s = s.child;
|
||
}
|
||
if (!(s.flags & 2))
|
||
return s.stateNode;
|
||
}
|
||
}
|
||
function ud(s, u, v) {
|
||
var S = s.tag;
|
||
if (S === 5 || S === 6)
|
||
s = s.stateNode, u ? yt(v, s, u) : Nt(v, s);
|
||
else if (S !== 4 && (s = s.child, s !== null))
|
||
for (ud(s, u, v), s = s.sibling; s !== null; )
|
||
ud(s, u, v), s = s.sibling;
|
||
}
|
||
function cd(s, u, v) {
|
||
var S = s.tag;
|
||
if (S === 5 || S === 6)
|
||
s = s.stateNode, u ? _e(v, s, u) : ke(v, s);
|
||
else if (S !== 4 && (s = s.child, s !== null))
|
||
for (cd(s, u, v), s = s.sibling; s !== null; )
|
||
cd(s, u, v), s = s.sibling;
|
||
}
|
||
var Cr = null, hi = !1;
|
||
function Ri(s, u, v) {
|
||
for (v = v.child; v !== null; )
|
||
pp(s, u, v), v = v.sibling;
|
||
}
|
||
function pp(s, u, v) {
|
||
if (ji && typeof ji.onCommitFiberUnmount == "function")
|
||
try {
|
||
ji.onCommitFiberUnmount(Rc, v);
|
||
} catch {
|
||
}
|
||
switch (v.tag) {
|
||
case 5:
|
||
Ar || ta(v, u);
|
||
case 6:
|
||
if (ze) {
|
||
var S = Cr, w = hi;
|
||
Cr = null, Ri(s, u, v), Cr = S, hi = w, Cr !== null && (hi ? yn(Cr, v.stateNode) : Qt(Cr, v.stateNode));
|
||
} else
|
||
Ri(s, u, v);
|
||
break;
|
||
case 18:
|
||
ze && Cr !== null && (hi ? Yi(Cr, v.stateNode) : Xs(Cr, v.stateNode));
|
||
break;
|
||
case 4:
|
||
ze ? (S = Cr, w = hi, Cr = v.stateNode.containerInfo, hi = !0, Ri(s, u, v), Cr = S, hi = w) : (Qe && (S = v.stateNode.containerInfo, w = bc(S), wi(S, w)), Ri(s, u, v));
|
||
break;
|
||
case 0:
|
||
case 11:
|
||
case 14:
|
||
case 15:
|
||
if (!Ar && (S = v.updateQueue, S !== null && (S = S.lastEffect, S !== null))) {
|
||
w = S = S.next;
|
||
do {
|
||
var T = w, N = T.destroy;
|
||
T = T.tag, N !== void 0 && (T & 2 || T & 4) && ys(v, u, N), w = w.next;
|
||
} while (w !== S);
|
||
}
|
||
Ri(s, u, v);
|
||
break;
|
||
case 1:
|
||
if (!Ar && (ta(v, u), S = v.stateNode, typeof S.componentWillUnmount == "function"))
|
||
try {
|
||
S.props = v.memoizedProps, S.state = v.memoizedState, S.componentWillUnmount();
|
||
} catch (X) {
|
||
nn(v, u, X);
|
||
}
|
||
Ri(s, u, v);
|
||
break;
|
||
case 21:
|
||
Ri(s, u, v);
|
||
break;
|
||
case 22:
|
||
v.mode & 1 ? (Ar = (S = Ar) || v.memoizedState !== null, Ri(s, u, v), Ar = S) : Ri(s, u, v);
|
||
break;
|
||
default:
|
||
Ri(
|
||
s,
|
||
u,
|
||
v
|
||
);
|
||
}
|
||
}
|
||
function gr(s) {
|
||
var u = s.updateQueue;
|
||
if (u !== null) {
|
||
s.updateQueue = null;
|
||
var v = s.stateNode;
|
||
v === null && (v = s.stateNode = new Cv()), u.forEach(function(S) {
|
||
var w = J0.bind(null, s, S);
|
||
v.has(S) || (v.add(S), S.then(w, w));
|
||
});
|
||
}
|
||
}
|
||
function ga(s, u) {
|
||
var v = u.deletions;
|
||
if (v !== null)
|
||
for (var S = 0; S < v.length; S++) {
|
||
var w = v[S];
|
||
try {
|
||
var T = s, N = u;
|
||
if (ze) {
|
||
var X = N;
|
||
e:
|
||
for (; X !== null; ) {
|
||
switch (X.tag) {
|
||
case 5:
|
||
Cr = X.stateNode, hi = !1;
|
||
break e;
|
||
case 3:
|
||
Cr = X.stateNode.containerInfo, hi = !0;
|
||
break e;
|
||
case 4:
|
||
Cr = X.stateNode.containerInfo, hi = !0;
|
||
break e;
|
||
}
|
||
X = X.return;
|
||
}
|
||
if (Cr === null)
|
||
throw Error(f(160));
|
||
pp(T, N, w), Cr = null, hi = !1;
|
||
} else
|
||
pp(T, N, w);
|
||
var fe = w.alternate;
|
||
fe !== null && (fe.return = null), w.return = null;
|
||
} catch (Ue) {
|
||
nn(w, u, Ue);
|
||
}
|
||
}
|
||
if (u.subtreeFlags & 12854)
|
||
for (u = u.child; u !== null; )
|
||
hp(u, s), u = u.sibling;
|
||
}
|
||
function hp(s, u) {
|
||
var v = s.alternate, S = s.flags;
|
||
switch (s.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 14:
|
||
case 15:
|
||
if (ga(u, s), na(s), S & 4) {
|
||
try {
|
||
ro(3, s, s.return), ma(3, s);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
try {
|
||
ro(5, s, s.return);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
break;
|
||
case 1:
|
||
ga(u, s), na(s), S & 512 && v !== null && ta(v, v.return);
|
||
break;
|
||
case 5:
|
||
if (ga(u, s), na(s), S & 512 && v !== null && ta(v, v.return), ze) {
|
||
if (s.flags & 32) {
|
||
var w = s.stateNode;
|
||
try {
|
||
vt(w);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
if (S & 4 && (w = s.stateNode, w != null)) {
|
||
var T = s.memoizedProps;
|
||
if (v = v !== null ? v.memoizedProps : T, S = s.type, u = s.updateQueue, s.updateQueue = null, u !== null)
|
||
try {
|
||
ge(w, u, S, v, T, s);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 6:
|
||
if (ga(u, s), na(s), S & 4 && ze) {
|
||
if (s.stateNode === null)
|
||
throw Error(f(162));
|
||
w = s.stateNode, T = s.memoizedProps, v = v !== null ? v.memoizedProps : T;
|
||
try {
|
||
tn(w, v, T);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
break;
|
||
case 3:
|
||
if (ga(u, s), na(s), S & 4) {
|
||
if (ze && Et && v !== null && v.memoizedState.isDehydrated)
|
||
try {
|
||
au(u.containerInfo);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
if (Qe) {
|
||
w = u.containerInfo, T = u.pendingChildren;
|
||
try {
|
||
wi(w, T);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 4:
|
||
if (ga(
|
||
u,
|
||
s
|
||
), na(s), S & 4 && Qe) {
|
||
T = s.stateNode, w = T.containerInfo, T = T.pendingChildren;
|
||
try {
|
||
wi(w, T);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
break;
|
||
case 13:
|
||
ga(u, s), na(s), w = s.child, w.flags & 8192 && (T = w.memoizedState !== null, w.stateNode.isHidden = T, !T || w.alternate !== null && w.alternate.memoizedState !== null || (xp = br())), S & 4 && gr(s);
|
||
break;
|
||
case 22:
|
||
var N = v !== null && v.memoizedState !== null;
|
||
if (s.mode & 1 ? (Ar = (v = Ar) || N, ga(u, s), Ar = v) : ga(u, s), na(s), S & 8192) {
|
||
if (v = s.memoizedState !== null, (s.stateNode.isHidden = v) && !N && s.mode & 1)
|
||
for (ft = s, S = s.child; S !== null; ) {
|
||
for (u = ft = S; ft !== null; ) {
|
||
N = ft;
|
||
var X = N.child;
|
||
switch (N.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 14:
|
||
case 15:
|
||
ro(4, N, N.return);
|
||
break;
|
||
case 1:
|
||
ta(N, N.return);
|
||
var fe = N.stateNode;
|
||
if (typeof fe.componentWillUnmount == "function") {
|
||
var Ue = N, gt = N.return;
|
||
try {
|
||
var jt = Ue;
|
||
fe.props = jt.memoizedProps, fe.state = jt.memoizedState, fe.componentWillUnmount();
|
||
} catch (nt) {
|
||
nn(Ue, gt, nt);
|
||
}
|
||
}
|
||
break;
|
||
case 5:
|
||
ta(N, N.return);
|
||
break;
|
||
case 22:
|
||
if (N.memoizedState !== null) {
|
||
xs(u);
|
||
continue;
|
||
}
|
||
}
|
||
X !== null ? (X.return = N, ft = X) : xs(u);
|
||
}
|
||
S = S.sibling;
|
||
}
|
||
if (ze) {
|
||
e:
|
||
if (S = null, ze)
|
||
for (u = s; ; ) {
|
||
if (u.tag === 5) {
|
||
if (S === null) {
|
||
S = u;
|
||
try {
|
||
w = u.stateNode, v ? dt(w) : jn(u.stateNode, u.memoizedProps);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
}
|
||
} else if (u.tag === 6) {
|
||
if (S === null)
|
||
try {
|
||
T = u.stateNode, v ? Nn(T) : Wt(T, u.memoizedProps);
|
||
} catch (nt) {
|
||
nn(s, s.return, nt);
|
||
}
|
||
} else if ((u.tag !== 22 && u.tag !== 23 || u.memoizedState === null || u === s) && u.child !== null) {
|
||
u.child.return = u, u = u.child;
|
||
continue;
|
||
}
|
||
if (u === s)
|
||
break e;
|
||
for (; u.sibling === null; ) {
|
||
if (u.return === null || u.return === s)
|
||
break e;
|
||
S === u && (S = null), u = u.return;
|
||
}
|
||
S === u && (S = null), u.sibling.return = u.return, u = u.sibling;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 19:
|
||
ga(u, s), na(s), S & 4 && gr(s);
|
||
break;
|
||
case 21:
|
||
break;
|
||
default:
|
||
ga(u, s), na(s);
|
||
}
|
||
}
|
||
function na(s) {
|
||
var u = s.flags;
|
||
if (u & 2) {
|
||
try {
|
||
if (ze) {
|
||
e: {
|
||
for (var v = s.return; v !== null; ) {
|
||
if (Ev(v)) {
|
||
var S = v;
|
||
break e;
|
||
}
|
||
v = v.return;
|
||
}
|
||
throw Error(f(160));
|
||
}
|
||
switch (S.tag) {
|
||
case 5:
|
||
var w = S.stateNode;
|
||
S.flags & 32 && (vt(w), S.flags &= -33);
|
||
var T = jv(s);
|
||
cd(s, T, w);
|
||
break;
|
||
case 3:
|
||
case 4:
|
||
var N = S.stateNode.containerInfo, X = jv(s);
|
||
ud(s, X, N);
|
||
break;
|
||
default:
|
||
throw Error(f(161));
|
||
}
|
||
}
|
||
} catch (fe) {
|
||
nn(s, s.return, fe);
|
||
}
|
||
s.flags &= -3;
|
||
}
|
||
u & 4096 && (s.flags &= -4097);
|
||
}
|
||
function Tv(s, u, v) {
|
||
ft = s, Dv(s);
|
||
}
|
||
function Dv(s, u, v) {
|
||
for (var S = (s.mode & 1) !== 0; ft !== null; ) {
|
||
var w = ft, T = w.child;
|
||
if (w.tag === 22 && S) {
|
||
var N = w.memoizedState !== null || ld;
|
||
if (!N) {
|
||
var X = w.alternate, fe = X !== null && X.memoizedState !== null || Ar;
|
||
X = ld;
|
||
var Ue = Ar;
|
||
if (ld = N, (Ar = fe) && !Ue)
|
||
for (ft = w; ft !== null; )
|
||
N = ft, fe = N.child, N.tag === 22 && N.memoizedState !== null ? Nr(w) : fe !== null ? (fe.return = N, ft = fe) : Nr(w);
|
||
for (; T !== null; )
|
||
ft = T, Dv(T), T = T.sibling;
|
||
ft = w, ld = X, Ar = Ue;
|
||
}
|
||
Mv(s);
|
||
} else
|
||
w.subtreeFlags & 8772 && T !== null ? (T.return = w, ft = T) : Mv(s);
|
||
}
|
||
}
|
||
function Mv(s) {
|
||
for (; ft !== null; ) {
|
||
var u = ft;
|
||
if (u.flags & 8772) {
|
||
var v = u.alternate;
|
||
try {
|
||
if (u.flags & 8772)
|
||
switch (u.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
Ar || ma(5, u);
|
||
break;
|
||
case 1:
|
||
var S = u.stateNode;
|
||
if (u.flags & 4 && !Ar)
|
||
if (v === null)
|
||
S.componentDidMount();
|
||
else {
|
||
var w = u.elementType === u.type ? v.memoizedProps : ui(u.type, v.memoizedProps);
|
||
S.componentDidUpdate(w, v.memoizedState, S.__reactInternalSnapshotBeforeUpdate);
|
||
}
|
||
var T = u.updateQueue;
|
||
T !== null && Ji(u, T, S);
|
||
break;
|
||
case 3:
|
||
var N = u.updateQueue;
|
||
if (N !== null) {
|
||
if (v = null, u.child !== null)
|
||
switch (u.child.tag) {
|
||
case 5:
|
||
v = xe(u.child.stateNode);
|
||
break;
|
||
case 1:
|
||
v = u.child.stateNode;
|
||
}
|
||
Ji(u, N, v);
|
||
}
|
||
break;
|
||
case 5:
|
||
var X = u.stateNode;
|
||
v === null && u.flags & 4 && Ne(X, u.type, u.memoizedProps, u);
|
||
break;
|
||
case 6:
|
||
break;
|
||
case 4:
|
||
break;
|
||
case 12:
|
||
break;
|
||
case 13:
|
||
if (Et && u.memoizedState === null) {
|
||
var fe = u.alternate;
|
||
if (fe !== null) {
|
||
var Ue = fe.memoizedState;
|
||
if (Ue !== null) {
|
||
var gt = Ue.dehydrated;
|
||
gt !== null && iu(gt);
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
case 19:
|
||
case 17:
|
||
case 21:
|
||
case 22:
|
||
case 23:
|
||
case 25:
|
||
break;
|
||
default:
|
||
throw Error(f(163));
|
||
}
|
||
Ar || u.flags & 512 && or(u);
|
||
} catch (jt) {
|
||
nn(u, u.return, jt);
|
||
}
|
||
}
|
||
if (u === s) {
|
||
ft = null;
|
||
break;
|
||
}
|
||
if (v = u.sibling, v !== null) {
|
||
v.return = u.return, ft = v;
|
||
break;
|
||
}
|
||
ft = u.return;
|
||
}
|
||
}
|
||
function xs(s) {
|
||
for (; ft !== null; ) {
|
||
var u = ft;
|
||
if (u === s) {
|
||
ft = null;
|
||
break;
|
||
}
|
||
var v = u.sibling;
|
||
if (v !== null) {
|
||
v.return = u.return, ft = v;
|
||
break;
|
||
}
|
||
ft = u.return;
|
||
}
|
||
}
|
||
function Nr(s) {
|
||
for (; ft !== null; ) {
|
||
var u = ft;
|
||
try {
|
||
switch (u.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
var v = u.return;
|
||
try {
|
||
ma(4, u);
|
||
} catch (fe) {
|
||
nn(u, v, fe);
|
||
}
|
||
break;
|
||
case 1:
|
||
var S = u.stateNode;
|
||
if (typeof S.componentDidMount == "function") {
|
||
var w = u.return;
|
||
try {
|
||
S.componentDidMount();
|
||
} catch (fe) {
|
||
nn(u, w, fe);
|
||
}
|
||
}
|
||
var T = u.return;
|
||
try {
|
||
or(u);
|
||
} catch (fe) {
|
||
nn(u, T, fe);
|
||
}
|
||
break;
|
||
case 5:
|
||
var N = u.return;
|
||
try {
|
||
or(u);
|
||
} catch (fe) {
|
||
nn(u, N, fe);
|
||
}
|
||
}
|
||
} catch (fe) {
|
||
nn(u, u.return, fe);
|
||
}
|
||
if (u === s) {
|
||
ft = null;
|
||
break;
|
||
}
|
||
var X = u.sibling;
|
||
if (X !== null) {
|
||
X.return = u.return, ft = X;
|
||
break;
|
||
}
|
||
ft = u.return;
|
||
}
|
||
}
|
||
var et = 0, Oa = 1, ya = 2, dd = 3, fd = 4;
|
||
if (typeof Symbol == "function" && Symbol.for) {
|
||
var Cu = Symbol.for;
|
||
et = Cu("selector.component"), Oa = Cu("selector.has_pseudo_class"), ya = Cu("selector.role"), dd = Cu("selector.test_id"), fd = Cu("selector.text");
|
||
}
|
||
function vp(s) {
|
||
var u = Xe(s);
|
||
if (u != null) {
|
||
if (typeof u.memoizedProps["data-testname"] != "string")
|
||
throw Error(f(364));
|
||
return u;
|
||
}
|
||
if (s = We(s), s === null)
|
||
throw Error(f(362));
|
||
return s.stateNode.current;
|
||
}
|
||
function mp(s, u) {
|
||
switch (u.$$typeof) {
|
||
case et:
|
||
if (s.type === u.value)
|
||
return !0;
|
||
break;
|
||
case Oa:
|
||
e: {
|
||
u = u.value, s = [s, 0];
|
||
for (var v = 0; v < s.length; ) {
|
||
var S = s[v++], w = s[v++], T = u[w];
|
||
if (S.tag !== 5 || !me(S)) {
|
||
for (; T != null && mp(S, T); )
|
||
w++, T = u[w];
|
||
if (w === u.length) {
|
||
u = !0;
|
||
break e;
|
||
} else
|
||
for (S = S.child; S !== null; )
|
||
s.push(S, w), S = S.sibling;
|
||
}
|
||
}
|
||
u = !1;
|
||
}
|
||
return u;
|
||
case ya:
|
||
if (s.tag === 5 && Le(s.stateNode, u.value))
|
||
return !0;
|
||
break;
|
||
case fd:
|
||
if ((s.tag === 5 || s.tag === 6) && (s = ot(s), s !== null && 0 <= s.indexOf(u.value)))
|
||
return !0;
|
||
break;
|
||
case dd:
|
||
if (s.tag === 5 && (s = s.memoizedProps["data-testname"], typeof s == "string" && s.toLowerCase() === u.value.toLowerCase()))
|
||
return !0;
|
||
break;
|
||
default:
|
||
throw Error(f(365));
|
||
}
|
||
return !1;
|
||
}
|
||
function sr(s) {
|
||
switch (s.$$typeof) {
|
||
case et:
|
||
return "<" + (B(s.value) || "Unknown") + ">";
|
||
case Oa:
|
||
return ":has(" + (sr(s) || "") + ")";
|
||
case ya:
|
||
return '[role="' + s.value + '"]';
|
||
case fd:
|
||
return '"' + s.value + '"';
|
||
case dd:
|
||
return '[data-testname="' + s.value + '"]';
|
||
default:
|
||
throw Error(f(365));
|
||
}
|
||
}
|
||
function Rv(s, u) {
|
||
var v = [];
|
||
s = [s, 0];
|
||
for (var S = 0; S < s.length; ) {
|
||
var w = s[S++], T = s[S++], N = u[T];
|
||
if (w.tag !== 5 || !me(w)) {
|
||
for (; N != null && mp(w, N); )
|
||
T++, N = u[T];
|
||
if (T === u.length)
|
||
v.push(w);
|
||
else
|
||
for (w = w.child; w !== null; )
|
||
s.push(w, T), w = w.sibling;
|
||
}
|
||
}
|
||
return v;
|
||
}
|
||
function gp(s, u) {
|
||
if (!ee)
|
||
throw Error(f(363));
|
||
s = vp(s), s = Rv(s, u), u = [], s = Array.from(s);
|
||
for (var v = 0; v < s.length; ) {
|
||
var S = s[v++];
|
||
if (S.tag === 5)
|
||
me(S) || u.push(S.stateNode);
|
||
else
|
||
for (S = S.child; S !== null; )
|
||
s.push(S), S = S.sibling;
|
||
}
|
||
return u;
|
||
}
|
||
var K0 = Math.ceil, wu = h.ReactCurrentDispatcher, Ss = h.ReactCurrentOwner, On = h.ReactCurrentBatchConfig, Xt = 0, wr = null, lr = null, zr = 0, Aa = 0, xl = wo(0), ur = 0, Sl = null, bs = 0, pd = 0, yp = 0, Eu = null, xa = null, xp = 0, hd = 1 / 0, ao = null;
|
||
function Cs() {
|
||
hd = br() + 500;
|
||
}
|
||
var vd = !1, Sp = null, ki = null, md = !1, cr = null, Ya = 0, ws = 0, ju = null, Tu = -1, gd = 0;
|
||
function Ir() {
|
||
return Xt & 6 ? br() : Tu !== -1 ? Tu : Tu = br();
|
||
}
|
||
function Lr(s) {
|
||
return s.mode & 1 ? Xt & 2 && zr !== 0 ? zr & -zr : G0.transition !== null ? (gd === 0 && (gd = ev()), gd) : (s = dn, s !== 0 ? s : Ht()) : 1;
|
||
}
|
||
function Na(s, u, v, S) {
|
||
if (50 < ws)
|
||
throw ws = 0, ju = null, Error(f(185));
|
||
Ei(s, v, S), (!(Xt & 2) || s !== wr) && (s === wr && (!(Xt & 2) && (pd |= v), ur === 4 && xr(s, zr)), yr(s, S), v === 1 && Xt === 0 && !(u.mode & 1) && (Cs(), kc && si()));
|
||
}
|
||
function yr(s, u) {
|
||
var v = s.callbackNode;
|
||
L0(s, u);
|
||
var S = Mc(s, s === wr ? zr : 0);
|
||
if (S === 0)
|
||
v !== null && tv(v), s.callbackNode = null, s.callbackPriority = 0;
|
||
else if (u = S & -S, s.callbackPriority !== u) {
|
||
if (v != null && tv(v), u === 1)
|
||
s.tag === 0 ? W0(zo.bind(null, s)) : rv(zo.bind(null, s)), on ? En(function() {
|
||
!(Xt & 6) && si();
|
||
}) : Bf(_f, si), v = null;
|
||
else {
|
||
switch (Js(S)) {
|
||
case 1:
|
||
v = _f;
|
||
break;
|
||
case 4:
|
||
v = U0;
|
||
break;
|
||
case 16:
|
||
v = Uf;
|
||
break;
|
||
case 536870912:
|
||
v = H0;
|
||
break;
|
||
default:
|
||
v = Uf;
|
||
}
|
||
v = Av(v, Es.bind(null, s));
|
||
}
|
||
s.callbackPriority = u, s.callbackNode = v;
|
||
}
|
||
}
|
||
function Es(s, u) {
|
||
if (Tu = -1, gd = 0, Xt & 6)
|
||
throw Error(f(327));
|
||
var v = s.callbackNode;
|
||
if (za() && s.callbackNode !== v)
|
||
return null;
|
||
var S = Mc(s, s === wr ? zr : 0);
|
||
if (S === 0)
|
||
return null;
|
||
if (S & 30 || S & s.expiredLanes || u)
|
||
u = Du(s, S);
|
||
else {
|
||
u = S;
|
||
var w = Xt;
|
||
Xt |= 2;
|
||
var T = Pv();
|
||
(wr !== s || zr !== u) && (ao = null, Cs(), js(s, u));
|
||
do
|
||
try {
|
||
yd();
|
||
break;
|
||
} catch (X) {
|
||
kv(s, X);
|
||
}
|
||
while (1);
|
||
Qf(), wu.current = T, Xt = w, lr !== null ? u = 0 : (wr = null, zr = 0, u = ur);
|
||
}
|
||
if (u !== 0) {
|
||
if (u === 2 && (w = If(s), w !== 0 && (S = w, u = bl(s, w))), u === 1)
|
||
throw v = Sl, js(s, 0), xr(s, S), yr(s, br()), v;
|
||
if (u === 6)
|
||
xr(s, S);
|
||
else {
|
||
if (w = s.current.alternate, !(S & 30) && !Qa(w) && (u = Du(s, S), u === 2 && (T = If(s), T !== 0 && (S = T, u = bl(s, T))), u === 1))
|
||
throw v = Sl, js(s, 0), xr(s, S), yr(s, br()), v;
|
||
switch (s.finishedWork = w, s.finishedLanes = S, u) {
|
||
case 0:
|
||
case 1:
|
||
throw Error(f(345));
|
||
case 2:
|
||
Ts(s, xa, ao);
|
||
break;
|
||
case 3:
|
||
if (xr(s, S), (S & 130023424) === S && (u = xp + 500 - br(), 10 < u)) {
|
||
if (Mc(s, 0) !== 0)
|
||
break;
|
||
if (w = s.suspendedLanes, (w & S) !== S) {
|
||
Ir(), s.pingedLanes |= s.suspendedLanes & w;
|
||
break;
|
||
}
|
||
s.timeoutHandle = Ae(Ts.bind(null, s, xa, ao), u);
|
||
break;
|
||
}
|
||
Ts(s, xa, ao);
|
||
break;
|
||
case 4:
|
||
if (xr(s, S), (S & 4194240) === S)
|
||
break;
|
||
for (u = s.eventTimes, w = -1; 0 < S; ) {
|
||
var N = 31 - ii(S);
|
||
T = 1 << N, N = u[N], N > w && (w = N), S &= ~T;
|
||
}
|
||
if (S = w, S = br() - S, S = (120 > S ? 120 : 480 > S ? 480 : 1080 > S ? 1080 : 1920 > S ? 1920 : 3e3 > S ? 3e3 : 4320 > S ? 4320 : 1960 * K0(S / 1960)) - S, 10 < S) {
|
||
s.timeoutHandle = Ae(Ts.bind(null, s, xa, ao), S);
|
||
break;
|
||
}
|
||
Ts(s, xa, ao);
|
||
break;
|
||
case 5:
|
||
Ts(s, xa, ao);
|
||
break;
|
||
default:
|
||
throw Error(f(329));
|
||
}
|
||
}
|
||
}
|
||
return yr(s, br()), s.callbackNode === v ? Es.bind(null, s) : null;
|
||
}
|
||
function bl(s, u) {
|
||
var v = Eu;
|
||
return s.current.memoizedState.isDehydrated && (js(s, u).flags |= 256), s = Du(s, u), s !== 2 && (u = xa, xa = v, u !== null && Cl(u)), s;
|
||
}
|
||
function Cl(s) {
|
||
xa === null ? xa = s : xa.push.apply(xa, s);
|
||
}
|
||
function Qa(s) {
|
||
for (var u = s; ; ) {
|
||
if (u.flags & 16384) {
|
||
var v = u.updateQueue;
|
||
if (v !== null && (v = v.stores, v !== null))
|
||
for (var S = 0; S < v.length; S++) {
|
||
var w = v[S], T = w.getSnapshot;
|
||
w = w.value;
|
||
try {
|
||
if (!oi(T(), w))
|
||
return !1;
|
||
} catch {
|
||
return !1;
|
||
}
|
||
}
|
||
}
|
||
if (v = u.child, u.subtreeFlags & 16384 && v !== null)
|
||
v.return = u, u = v;
|
||
else {
|
||
if (u === s)
|
||
break;
|
||
for (; u.sibling === null; ) {
|
||
if (u.return === null || u.return === s)
|
||
return !0;
|
||
u = u.return;
|
||
}
|
||
u.sibling.return = u.return, u = u.sibling;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
function xr(s, u) {
|
||
for (u &= ~yp, u &= ~pd, s.suspendedLanes |= u, s.pingedLanes &= ~u, s = s.expirationTimes; 0 < u; ) {
|
||
var v = 31 - ii(u), S = 1 << v;
|
||
s[v] = -1, u &= ~S;
|
||
}
|
||
}
|
||
function zo(s) {
|
||
if (Xt & 6)
|
||
throw Error(f(327));
|
||
za();
|
||
var u = Mc(s, 0);
|
||
if (!(u & 1))
|
||
return yr(s, br()), null;
|
||
var v = Du(s, u);
|
||
if (s.tag !== 0 && v === 2) {
|
||
var S = If(s);
|
||
S !== 0 && (u = S, v = bl(s, S));
|
||
}
|
||
if (v === 1)
|
||
throw v = Sl, js(s, 0), xr(s, u), yr(s, br()), v;
|
||
if (v === 6)
|
||
throw Error(f(345));
|
||
return s.finishedWork = s.current.alternate, s.finishedLanes = u, Ts(s, xa, ao), yr(s, br()), null;
|
||
}
|
||
function Pi(s) {
|
||
cr !== null && cr.tag === 0 && !(Xt & 6) && za();
|
||
var u = Xt;
|
||
Xt |= 1;
|
||
var v = On.transition, S = dn;
|
||
try {
|
||
if (On.transition = null, dn = 1, s)
|
||
return s();
|
||
} finally {
|
||
dn = S, On.transition = v, Xt = u, !(Xt & 6) && si();
|
||
}
|
||
}
|
||
function vi() {
|
||
Aa = xl.current, Kt(xl);
|
||
}
|
||
function js(s, u) {
|
||
s.finishedWork = null, s.finishedLanes = 0;
|
||
var v = s.timeoutHandle;
|
||
if (v !== tt && (s.timeoutHandle = tt, Ve(v)), lr !== null)
|
||
for (v = lr.return; v !== null; ) {
|
||
var S = v;
|
||
switch (tl(S), S.tag) {
|
||
case 1:
|
||
S = S.type.childContextTypes, S != null && su();
|
||
break;
|
||
case 3:
|
||
Do(), Kt(fa), Kt(Gr), Vc();
|
||
break;
|
||
case 5:
|
||
di(S);
|
||
break;
|
||
case 4:
|
||
Do();
|
||
break;
|
||
case 13:
|
||
Kt(fn);
|
||
break;
|
||
case 19:
|
||
Kt(fn);
|
||
break;
|
||
case 10:
|
||
Xf(S.type._context);
|
||
break;
|
||
case 22:
|
||
case 23:
|
||
vi();
|
||
}
|
||
v = v.return;
|
||
}
|
||
if (wr = s, lr = s = Oi(s.current, null), zr = Aa = u, ur = 0, Sl = null, yp = pd = bs = 0, xa = Eu = null, jo !== null) {
|
||
for (u = 0; u < jo.length; u++)
|
||
if (v = jo[u], S = v.interleaved, S !== null) {
|
||
v.interleaved = null;
|
||
var w = S.next, T = v.pending;
|
||
if (T !== null) {
|
||
var N = T.next;
|
||
T.next = w, S.next = N;
|
||
}
|
||
v.pending = S;
|
||
}
|
||
jo = null;
|
||
}
|
||
return s;
|
||
}
|
||
function kv(s, u) {
|
||
do {
|
||
var v = lr;
|
||
try {
|
||
if (Qf(), eo.current = no, fu) {
|
||
for (var S = Pn.memoizedState; S !== null; ) {
|
||
var w = S.queue;
|
||
w !== null && (w.pending = null), S = S.next;
|
||
}
|
||
fu = !1;
|
||
}
|
||
if (Kr = 0, hr = Jn = Pn = null, Ro = !1, ul = 0, Ss.current = null, v === null || v.return === null) {
|
||
ur = 1, Sl = u, lr = null;
|
||
break;
|
||
}
|
||
e: {
|
||
var T = s, N = v.return, X = v, fe = u;
|
||
if (u = zr, X.flags |= 32768, fe !== null && typeof fe == "object" && typeof fe.then == "function") {
|
||
var Ue = fe, gt = X, jt = gt.tag;
|
||
if (!(gt.mode & 1) && (jt === 0 || jt === 11 || jt === 15)) {
|
||
var nt = gt.alternate;
|
||
nt ? (gt.updateQueue = nt.updateQueue, gt.memoizedState = nt.memoizedState, gt.lanes = nt.lanes) : (gt.updateQueue = null, gt.memoizedState = null);
|
||
}
|
||
var In = hv(N);
|
||
if (In !== null) {
|
||
In.flags &= -257, Tn(In, N, X, T, u), In.mode & 1 && va(T, Ue, u), u = In, fe = Ue;
|
||
var Dn = u.updateQueue;
|
||
if (Dn === null) {
|
||
var Sn = /* @__PURE__ */ new Set();
|
||
Sn.add(fe), u.updateQueue = Sn;
|
||
} else
|
||
Dn.add(fe);
|
||
break e;
|
||
} else {
|
||
if (!(u & 1)) {
|
||
va(T, Ue, u), io();
|
||
break e;
|
||
}
|
||
fe = Error(f(426));
|
||
}
|
||
} else if (Un && X.mode & 1) {
|
||
var gn = hv(N);
|
||
if (gn !== null) {
|
||
!(gn.flags & 65536) && (gn.flags |= 256), Tn(gn, N, X, T, u), qf(Po(fe, X));
|
||
break e;
|
||
}
|
||
}
|
||
T = fe = Po(fe, X), ur !== 4 && (ur = 2), Eu === null ? Eu = [T] : Eu.push(T), T = N;
|
||
do {
|
||
switch (T.tag) {
|
||
case 3:
|
||
T.flags |= 65536, u &= -u, T.lanes |= u;
|
||
var ue = dl(T, fe, u);
|
||
Fc(T, ue);
|
||
break e;
|
||
case 1:
|
||
X = fe;
|
||
var K = T.type, pe = T.stateNode;
|
||
if (!(T.flags & 128) && (typeof K.getDerivedStateFromError == "function" || pe !== null && typeof pe.componentDidCatch == "function" && (ki === null || !ki.has(pe)))) {
|
||
T.flags |= 65536, u &= -u, T.lanes |= u;
|
||
var st = Oo(T, X, u);
|
||
Fc(T, st);
|
||
break e;
|
||
}
|
||
}
|
||
T = T.return;
|
||
} while (T !== null);
|
||
}
|
||
xd(v);
|
||
} catch (Ct) {
|
||
u = Ct, lr === v && v !== null && (lr = v = v.return);
|
||
continue;
|
||
}
|
||
break;
|
||
} while (1);
|
||
}
|
||
function Pv() {
|
||
var s = wu.current;
|
||
return wu.current = no, s === null ? no : s;
|
||
}
|
||
function io() {
|
||
(ur === 0 || ur === 3 || ur === 2) && (ur = 4), wr === null || !(bs & 268435455) && !(pd & 268435455) || xr(wr, zr);
|
||
}
|
||
function Du(s, u) {
|
||
var v = Xt;
|
||
Xt |= 2;
|
||
var S = Pv();
|
||
(wr !== s || zr !== u) && (ao = null, js(s, u));
|
||
do
|
||
try {
|
||
bp();
|
||
break;
|
||
} catch (w) {
|
||
kv(s, w);
|
||
}
|
||
while (1);
|
||
if (Qf(), Xt = v, wu.current = S, lr !== null)
|
||
throw Error(f(261));
|
||
return wr = null, zr = 0, ur;
|
||
}
|
||
function bp() {
|
||
for (; lr !== null; )
|
||
Ov(lr);
|
||
}
|
||
function yd() {
|
||
for (; lr !== null && !B0(); )
|
||
Ov(lr);
|
||
}
|
||
function Ov(s) {
|
||
var u = Cp(s.alternate, s, Aa);
|
||
s.memoizedProps = s.pendingProps, u === null ? xd(s) : lr = u, Ss.current = null;
|
||
}
|
||
function xd(s) {
|
||
var u = s;
|
||
do {
|
||
var v = u.alternate;
|
||
if (s = u.return, u.flags & 32768) {
|
||
if (v = dp(v, u), v !== null) {
|
||
v.flags &= 32767, lr = v;
|
||
return;
|
||
}
|
||
if (s !== null)
|
||
s.flags |= 32768, s.subtreeFlags = 0, s.deletions = null;
|
||
else {
|
||
ur = 6, lr = null;
|
||
return;
|
||
}
|
||
} else if (v = X0(v, u, Aa), v !== null) {
|
||
lr = v;
|
||
return;
|
||
}
|
||
if (u = u.sibling, u !== null) {
|
||
lr = u;
|
||
return;
|
||
}
|
||
lr = u = s;
|
||
} while (u !== null);
|
||
ur === 0 && (ur = 5);
|
||
}
|
||
function Ts(s, u, v) {
|
||
var S = dn, w = On.transition;
|
||
try {
|
||
On.transition = null, dn = 1, Z0(s, u, v, S);
|
||
} finally {
|
||
On.transition = w, dn = S;
|
||
}
|
||
return null;
|
||
}
|
||
function Z0(s, u, v, S) {
|
||
do
|
||
za();
|
||
while (cr !== null);
|
||
if (Xt & 6)
|
||
throw Error(f(327));
|
||
v = s.finishedWork;
|
||
var w = s.finishedLanes;
|
||
if (v === null)
|
||
return null;
|
||
if (s.finishedWork = null, s.finishedLanes = 0, v === s.current)
|
||
throw Error(f(177));
|
||
s.callbackNode = null, s.callbackPriority = 0;
|
||
var T = v.lanes | v.childLanes;
|
||
if (F0(s, T), s === wr && (lr = wr = null, zr = 0), !(v.subtreeFlags & 2064) && !(v.flags & 2064) || md || (md = !0, Av(Uf, function() {
|
||
return za(), null;
|
||
})), T = (v.flags & 15990) !== 0, v.subtreeFlags & 15990 || T) {
|
||
T = On.transition, On.transition = null;
|
||
var N = dn;
|
||
dn = 1;
|
||
var X = Xt;
|
||
Xt |= 4, Ss.current = null, fp(s, v), hp(v, s), V(s.containerInfo), s.current = v, Tv(v), _0(), Xt = X, dn = N, On.transition = T;
|
||
} else
|
||
s.current = v;
|
||
if (md && (md = !1, cr = s, Ya = w), T = s.pendingLanes, T === 0 && (ki = null), V0(v.stateNode), yr(s, br()), u !== null)
|
||
for (S = s.onRecoverableError, v = 0; v < u.length; v++)
|
||
w = u[v], S(w.value, { componentStack: w.stack, digest: w.digest });
|
||
if (vd)
|
||
throw vd = !1, s = Sp, Sp = null, s;
|
||
return Ya & 1 && s.tag !== 0 && za(), T = s.pendingLanes, T & 1 ? s === ju ? ws++ : (ws = 0, ju = s) : ws = 0, si(), null;
|
||
}
|
||
function za() {
|
||
if (cr !== null) {
|
||
var s = Js(Ya), u = On.transition, v = dn;
|
||
try {
|
||
if (On.transition = null, dn = 16 > s ? 16 : s, cr === null)
|
||
var S = !1;
|
||
else {
|
||
if (s = cr, cr = null, Ya = 0, Xt & 6)
|
||
throw Error(f(331));
|
||
var w = Xt;
|
||
for (Xt |= 4, ft = s.current; ft !== null; ) {
|
||
var T = ft, N = T.child;
|
||
if (ft.flags & 16) {
|
||
var X = T.deletions;
|
||
if (X !== null) {
|
||
for (var fe = 0; fe < X.length; fe++) {
|
||
var Ue = X[fe];
|
||
for (ft = Ue; ft !== null; ) {
|
||
var gt = ft;
|
||
switch (gt.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
ro(8, gt, T);
|
||
}
|
||
var jt = gt.child;
|
||
if (jt !== null)
|
||
jt.return = gt, ft = jt;
|
||
else
|
||
for (; ft !== null; ) {
|
||
gt = ft;
|
||
var nt = gt.sibling, In = gt.return;
|
||
if (wv(gt), gt === Ue) {
|
||
ft = null;
|
||
break;
|
||
}
|
||
if (nt !== null) {
|
||
nt.return = In, ft = nt;
|
||
break;
|
||
}
|
||
ft = In;
|
||
}
|
||
}
|
||
}
|
||
var Dn = T.alternate;
|
||
if (Dn !== null) {
|
||
var Sn = Dn.child;
|
||
if (Sn !== null) {
|
||
Dn.child = null;
|
||
do {
|
||
var gn = Sn.sibling;
|
||
Sn.sibling = null, Sn = gn;
|
||
} while (Sn !== null);
|
||
}
|
||
}
|
||
ft = T;
|
||
}
|
||
}
|
||
if (T.subtreeFlags & 2064 && N !== null)
|
||
N.return = T, ft = N;
|
||
else
|
||
e:
|
||
for (; ft !== null; ) {
|
||
if (T = ft, T.flags & 2048)
|
||
switch (T.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
ro(9, T, T.return);
|
||
}
|
||
var ue = T.sibling;
|
||
if (ue !== null) {
|
||
ue.return = T.return, ft = ue;
|
||
break e;
|
||
}
|
||
ft = T.return;
|
||
}
|
||
}
|
||
var K = s.current;
|
||
for (ft = K; ft !== null; ) {
|
||
N = ft;
|
||
var pe = N.child;
|
||
if (N.subtreeFlags & 2064 && pe !== null)
|
||
pe.return = N, ft = pe;
|
||
else
|
||
e:
|
||
for (N = K; ft !== null; ) {
|
||
if (X = ft, X.flags & 2048)
|
||
try {
|
||
switch (X.tag) {
|
||
case 0:
|
||
case 11:
|
||
case 15:
|
||
ma(9, X);
|
||
}
|
||
} catch (Ct) {
|
||
nn(X, X.return, Ct);
|
||
}
|
||
if (X === N) {
|
||
ft = null;
|
||
break e;
|
||
}
|
||
var st = X.sibling;
|
||
if (st !== null) {
|
||
st.return = X.return, ft = st;
|
||
break e;
|
||
}
|
||
ft = X.return;
|
||
}
|
||
}
|
||
if (Xt = w, si(), ji && typeof ji.onPostCommitFiberRoot == "function")
|
||
try {
|
||
ji.onPostCommitFiberRoot(Rc, s);
|
||
} catch {
|
||
}
|
||
S = !0;
|
||
}
|
||
return S;
|
||
} finally {
|
||
dn = v, On.transition = u;
|
||
}
|
||
}
|
||
return !1;
|
||
}
|
||
function Er(s, u, v) {
|
||
u = Po(v, u), u = dl(s, u, 1), s = To(s, u, 1), u = Ir(), s !== null && (Ei(s, 1, u), yr(s, u));
|
||
}
|
||
function nn(s, u, v) {
|
||
if (s.tag === 3)
|
||
Er(s, s, v);
|
||
else
|
||
for (; u !== null; ) {
|
||
if (u.tag === 3) {
|
||
Er(u, s, v);
|
||
break;
|
||
} else if (u.tag === 1) {
|
||
var S = u.stateNode;
|
||
if (typeof u.type.getDerivedStateFromError == "function" || typeof S.componentDidCatch == "function" && (ki === null || !ki.has(S))) {
|
||
s = Po(v, s), s = Oo(u, s, 1), u = To(u, s, 1), s = Ir(), u !== null && (Ei(u, 1, s), yr(u, s));
|
||
break;
|
||
}
|
||
}
|
||
u = u.return;
|
||
}
|
||
}
|
||
function mi(s, u, v) {
|
||
var S = s.pingCache;
|
||
S !== null && S.delete(u), u = Ir(), s.pingedLanes |= s.suspendedLanes & v, wr === s && (zr & v) === v && (ur === 4 || ur === 3 && (zr & 130023424) === zr && 500 > br() - xp ? js(s, 0) : yp |= v), yr(s, u);
|
||
}
|
||
function oo(s, u) {
|
||
u === 0 && (s.mode & 1 ? (u = cs, cs <<= 1, !(cs & 130023424) && (cs = 4194304)) : u = 1);
|
||
var v = Ir();
|
||
s = ci(s, u), s !== null && (Ei(s, u, v), yr(s, v));
|
||
}
|
||
function Io(s) {
|
||
var u = s.memoizedState, v = 0;
|
||
u !== null && (v = u.retryLane), oo(s, v);
|
||
}
|
||
function J0(s, u) {
|
||
var v = 0;
|
||
switch (s.tag) {
|
||
case 13:
|
||
var S = s.stateNode, w = s.memoizedState;
|
||
w !== null && (v = w.retryLane);
|
||
break;
|
||
case 19:
|
||
S = s.stateNode;
|
||
break;
|
||
default:
|
||
throw Error(f(314));
|
||
}
|
||
S !== null && S.delete(u), oo(s, v);
|
||
}
|
||
var Cp;
|
||
Cp = function(s, u, v) {
|
||
if (s !== null)
|
||
if (s.memoizedProps !== u.pendingProps || fa.current)
|
||
Pr = !0;
|
||
else {
|
||
if (!(s.lanes & v) && !(u.flags & 128))
|
||
return Pr = !1, hl(s, u, v);
|
||
Pr = !!(s.flags & 131072);
|
||
}
|
||
else
|
||
Pr = !1, Un && u.flags & 1048576 && av(u, uu, u.index);
|
||
switch (u.lanes = 0, u.tag) {
|
||
case 2:
|
||
var S = u.type;
|
||
pl(s, u), s = u.pendingProps;
|
||
var w = Zs(u, Gr.current);
|
||
al(u, v), w = Mt(null, u, S, s, w, v);
|
||
var T = Zt();
|
||
return u.flags |= 1, typeof w == "object" && w !== null && typeof w.render == "function" && w.$$typeof === void 0 ? (u.tag = 1, u.memoizedState = null, u.updateQueue = null, qr(S) ? (T = !0, lu(u)) : T = !1, u.memoizedState = w.state !== null && w.state !== void 0 ? w.state : null, Ic(u), w.updater = _c, u.stateNode = w, w._reactInternals = u, $f(u, S, s, v), u = yu(null, u, S, !0, T, v)) : (u.tag = 0, Un && T && Vf(u), mr(null, u, w, v), u = u.child), u;
|
||
case 16:
|
||
S = u.elementType;
|
||
e: {
|
||
switch (pl(s, u), s = u.pendingProps, w = S._init, S = w(S._payload), u.type = S, w = u.tag = Nv(S), s = ui(S, s), w) {
|
||
case 0:
|
||
u = gu(null, u, S, s, v);
|
||
break e;
|
||
case 1:
|
||
u = xv(null, u, S, s, v);
|
||
break e;
|
||
case 11:
|
||
u = mu(null, u, S, s, v);
|
||
break e;
|
||
case 14:
|
||
u = vv(null, u, S, ui(S.type, s), v);
|
||
break e;
|
||
}
|
||
throw Error(f(
|
||
306,
|
||
S,
|
||
""
|
||
));
|
||
}
|
||
return u;
|
||
case 0:
|
||
return S = u.type, w = u.pendingProps, w = u.elementType === S ? w : ui(S, w), gu(s, u, S, w, v);
|
||
case 1:
|
||
return S = u.type, w = u.pendingProps, w = u.elementType === S ? w : ui(S, w), xv(s, u, S, w, v);
|
||
case 3:
|
||
e: {
|
||
if (up(u), s === null)
|
||
throw Error(f(387));
|
||
S = u.pendingProps, T = u.memoizedState, w = T.element, Jf(s, u), il(u, S, null, v);
|
||
var N = u.memoizedState;
|
||
if (S = N.element, Et && T.isDehydrated)
|
||
if (T = { element: S, isDehydrated: !1, cache: N.cache, pendingSuspenseBoundaries: N.pendingSuspenseBoundaries, transitions: N.transitions }, u.updateQueue.baseState = T, u.memoizedState = T, u.flags & 256) {
|
||
w = Po(Error(f(423)), u), u = Sv(s, u, S, v, w);
|
||
break e;
|
||
} else if (S !== w) {
|
||
w = Po(Error(f(424)), u), u = Sv(s, u, S, v, w);
|
||
break e;
|
||
} else
|
||
for (Et && (Ga = Mf(u.stateNode.containerInfo), Ra = u, Un = !0, li = null, cu = !1), v = qa(u, null, S, v), u.child = v; v; )
|
||
v.flags = v.flags & -3 | 4096, v = v.sibling;
|
||
else {
|
||
if (nl(), S === w) {
|
||
u = er(s, u, v);
|
||
break e;
|
||
}
|
||
mr(s, u, S, v);
|
||
}
|
||
u = u.child;
|
||
}
|
||
return u;
|
||
case 5:
|
||
return pa(u), s === null && Gf(u), S = u.type, w = u.pendingProps, T = s !== null ? s.memoizedProps : null, N = w.children, ve(S, w) ? N = null : T !== null && ve(S, T) && (u.flags |= 32), yv(s, u), mr(s, u, N, v), u.child;
|
||
case 6:
|
||
return s === null && Gf(u), null;
|
||
case 13:
|
||
return bv(s, u, v);
|
||
case 4:
|
||
return pr(u, u.stateNode.containerInfo), S = u.pendingProps, s === null ? u.child = $i(u, null, S, v) : mr(s, u, S, v), u.child;
|
||
case 11:
|
||
return S = u.type, w = u.pendingProps, w = u.elementType === S ? w : ui(S, w), mu(s, u, S, w, v);
|
||
case 7:
|
||
return mr(s, u, u.pendingProps, v), u.child;
|
||
case 8:
|
||
return mr(s, u, u.pendingProps.children, v), u.child;
|
||
case 12:
|
||
return mr(s, u, u.pendingProps.children, v), u.child;
|
||
case 10:
|
||
e: {
|
||
if (S = u.type._context, w = u.pendingProps, T = u.memoizedProps, N = w.value, uv(u, S, N), T !== null)
|
||
if (oi(T.value, N)) {
|
||
if (T.children === w.children && !fa.current) {
|
||
u = er(s, u, v);
|
||
break e;
|
||
}
|
||
} else
|
||
for (T = u.child, T !== null && (T.return = u); T !== null; ) {
|
||
var X = T.dependencies;
|
||
if (X !== null) {
|
||
N = T.child;
|
||
for (var fe = X.firstContext; fe !== null; ) {
|
||
if (fe.context === S) {
|
||
if (T.tag === 1) {
|
||
fe = Di(-1, v & -v), fe.tag = 2;
|
||
var Ue = T.updateQueue;
|
||
if (Ue !== null) {
|
||
Ue = Ue.shared;
|
||
var gt = Ue.pending;
|
||
gt === null ? fe.next = fe : (fe.next = gt.next, gt.next = fe), Ue.pending = fe;
|
||
}
|
||
}
|
||
T.lanes |= v, fe = T.alternate, fe !== null && (fe.lanes |= v), Kf(T.return, v, u), X.lanes |= v;
|
||
break;
|
||
}
|
||
fe = fe.next;
|
||
}
|
||
} else if (T.tag === 10)
|
||
N = T.type === u.type ? null : T.child;
|
||
else if (T.tag === 18) {
|
||
if (N = T.return, N === null)
|
||
throw Error(f(341));
|
||
N.lanes |= v, X = N.alternate, X !== null && (X.lanes |= v), Kf(N, v, u), N = T.sibling;
|
||
} else
|
||
N = T.child;
|
||
if (N !== null)
|
||
N.return = T;
|
||
else
|
||
for (N = T; N !== null; ) {
|
||
if (N === u) {
|
||
N = null;
|
||
break;
|
||
}
|
||
if (T = N.sibling, T !== null) {
|
||
T.return = N.return, N = T;
|
||
break;
|
||
}
|
||
N = N.return;
|
||
}
|
||
T = N;
|
||
}
|
||
mr(s, u, w.children, v), u = u.child;
|
||
}
|
||
return u;
|
||
case 9:
|
||
return w = u.type, S = u.pendingProps.children, al(u, v), w = Xr(w), S = S(w), u.flags |= 1, mr(s, u, S, v), u.child;
|
||
case 14:
|
||
return S = u.type, w = ui(S, u.pendingProps), w = ui(S.type, w), vv(s, u, S, w, v);
|
||
case 15:
|
||
return mv(s, u, u.type, u.pendingProps, v);
|
||
case 17:
|
||
return S = u.type, w = u.pendingProps, w = u.elementType === S ? w : ui(S, w), pl(s, u), u.tag = 1, qr(S) ? (s = !0, lu(u)) : s = !1, al(u, v), cv(u, S, w), $f(u, S, w, v), yu(null, u, S, !0, s, v);
|
||
case 19:
|
||
return No(s, u, v);
|
||
case 22:
|
||
return gv(s, u, v);
|
||
}
|
||
throw Error(f(156, u.tag));
|
||
};
|
||
function Av(s, u) {
|
||
return Bf(s, u);
|
||
}
|
||
function $0(s, u, v, S) {
|
||
this.tag = s, this.key = v, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = u, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = S, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
|
||
}
|
||
function Xa(s, u, v, S) {
|
||
return new $0(s, u, v, S);
|
||
}
|
||
function Sd(s) {
|
||
return s = s.prototype, !(!s || !s.isReactComponent);
|
||
}
|
||
function Nv(s) {
|
||
if (typeof s == "function")
|
||
return Sd(s) ? 1 : 0;
|
||
if (s != null) {
|
||
if (s = s.$$typeof, s === R)
|
||
return 11;
|
||
if (s === L)
|
||
return 14;
|
||
}
|
||
return 2;
|
||
}
|
||
function Oi(s, u) {
|
||
var v = s.alternate;
|
||
return v === null ? (v = Xa(s.tag, u, s.key, s.mode), v.elementType = s.elementType, v.type = s.type, v.stateNode = s.stateNode, v.alternate = s, s.alternate = v) : (v.pendingProps = u, v.type = s.type, v.flags = 0, v.subtreeFlags = 0, v.deletions = null), v.flags = s.flags & 14680064, v.childLanes = s.childLanes, v.lanes = s.lanes, v.child = s.child, v.memoizedProps = s.memoizedProps, v.memoizedState = s.memoizedState, v.updateQueue = s.updateQueue, u = s.dependencies, v.dependencies = u === null ? null : { lanes: u.lanes, firstContext: u.firstContext }, v.sibling = s.sibling, v.index = s.index, v.ref = s.ref, v;
|
||
}
|
||
function Mu(s, u, v, S, w, T) {
|
||
var N = 2;
|
||
if (S = s, typeof s == "function")
|
||
Sd(s) && (N = 1);
|
||
else if (typeof s == "string")
|
||
N = 5;
|
||
else
|
||
e:
|
||
switch (s) {
|
||
case x:
|
||
return Lo(v.children, w, T, u);
|
||
case b:
|
||
N = 8, w |= 8;
|
||
break;
|
||
case E:
|
||
return s = Xa(12, v, u, w | 2), s.elementType = E, s.lanes = T, s;
|
||
case k:
|
||
return s = Xa(13, v, u, w), s.elementType = k, s.lanes = T, s;
|
||
case A:
|
||
return s = Xa(19, v, u, w), s.elementType = A, s.lanes = T, s;
|
||
case I:
|
||
return wl(v, w, T, u);
|
||
default:
|
||
if (typeof s == "object" && s !== null)
|
||
switch (s.$$typeof) {
|
||
case j:
|
||
N = 10;
|
||
break e;
|
||
case M:
|
||
N = 9;
|
||
break e;
|
||
case R:
|
||
N = 11;
|
||
break e;
|
||
case L:
|
||
N = 14;
|
||
break e;
|
||
case z:
|
||
N = 16, S = null;
|
||
break e;
|
||
}
|
||
throw Error(f(130, s == null ? s : typeof s, ""));
|
||
}
|
||
return u = Xa(N, v, u, w), u.elementType = s, u.type = S, u.lanes = T, u;
|
||
}
|
||
function Lo(s, u, v, S) {
|
||
return s = Xa(7, s, S, u), s.lanes = v, s;
|
||
}
|
||
function wl(s, u, v, S) {
|
||
return s = Xa(22, s, S, u), s.elementType = I, s.lanes = v, s.stateNode = { isHidden: !1 }, s;
|
||
}
|
||
function Ru(s, u, v) {
|
||
return s = Xa(6, s, null, u), s.lanes = v, s;
|
||
}
|
||
function ku(s, u, v) {
|
||
return u = Xa(4, s.children !== null ? s.children : [], s.key, u), u.lanes = v, u.stateNode = { containerInfo: s.containerInfo, pendingChildren: null, implementation: s.implementation }, u;
|
||
}
|
||
function e1(s, u, v, S, w) {
|
||
this.tag = u, this.containerInfo = s, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = tt, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = Lf(0), this.expirationTimes = Lf(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Lf(0), this.identifierPrefix = S, this.onRecoverableError = w, Et && (this.mutableSourceEagerHydrationData = null);
|
||
}
|
||
function zv(s, u, v, S, w, T, N, X, fe) {
|
||
return s = new e1(s, u, v, X, fe), u === 1 ? (u = 1, T === !0 && (u |= 8)) : u = 0, T = Xa(3, null, null, u), s.current = T, T.stateNode = s, T.memoizedState = { element: S, isDehydrated: v, cache: null, transitions: null, pendingSuspenseBoundaries: null }, Ic(T), s;
|
||
}
|
||
function Iv(s) {
|
||
if (!s)
|
||
return Eo;
|
||
s = s._reactInternals;
|
||
e: {
|
||
if (J(s) !== s || s.tag !== 1)
|
||
throw Error(f(170));
|
||
var u = s;
|
||
do {
|
||
switch (u.tag) {
|
||
case 3:
|
||
u = u.stateNode.context;
|
||
break e;
|
||
case 1:
|
||
if (qr(u.type)) {
|
||
u = u.stateNode.__reactInternalMemoizedMergedChildContext;
|
||
break e;
|
||
}
|
||
}
|
||
u = u.return;
|
||
} while (u !== null);
|
||
throw Error(f(171));
|
||
}
|
||
if (s.tag === 1) {
|
||
var v = s.type;
|
||
if (qr(v))
|
||
return Tc(s, v, u);
|
||
}
|
||
return u;
|
||
}
|
||
function Lv(s) {
|
||
var u = s._reactInternals;
|
||
if (u === void 0)
|
||
throw typeof s.render == "function" ? Error(f(188)) : (s = Object.keys(s).join(","), Error(f(268, s)));
|
||
return s = le(u), s === null ? null : s.stateNode;
|
||
}
|
||
function wp(s, u) {
|
||
if (s = s.memoizedState, s !== null && s.dehydrated !== null) {
|
||
var v = s.retryLane;
|
||
s.retryLane = v !== 0 && v < u ? v : u;
|
||
}
|
||
}
|
||
function Ds(s, u) {
|
||
wp(s, u), (s = s.alternate) && wp(s, u);
|
||
}
|
||
function t1(s) {
|
||
return s = le(s), s === null ? null : s.stateNode;
|
||
}
|
||
function Fv() {
|
||
return null;
|
||
}
|
||
return n.attemptContinuousHydration = function(s) {
|
||
if (s.tag === 13) {
|
||
var u = ci(s, 134217728);
|
||
if (u !== null) {
|
||
var v = Ir();
|
||
Na(u, s, 134217728, v);
|
||
}
|
||
Ds(s, 134217728);
|
||
}
|
||
}, n.attemptDiscreteHydration = function(s) {
|
||
if (s.tag === 13) {
|
||
var u = ci(s, 1);
|
||
if (u !== null) {
|
||
var v = Ir();
|
||
Na(u, s, 1, v);
|
||
}
|
||
Ds(s, 1);
|
||
}
|
||
}, n.attemptHydrationAtCurrentPriority = function(s) {
|
||
if (s.tag === 13) {
|
||
var u = Lr(s), v = ci(s, u);
|
||
if (v !== null) {
|
||
var S = Ir();
|
||
Na(v, s, u, S);
|
||
}
|
||
Ds(s, u);
|
||
}
|
||
}, n.attemptSynchronousHydration = function(s) {
|
||
switch (s.tag) {
|
||
case 3:
|
||
var u = s.stateNode;
|
||
if (u.current.memoizedState.isDehydrated) {
|
||
var v = Qr(u.pendingLanes);
|
||
v !== 0 && (Ff(u, v | 1), yr(u, br()), !(Xt & 6) && (Cs(), si()));
|
||
}
|
||
break;
|
||
case 13:
|
||
Pi(function() {
|
||
var S = ci(s, 1);
|
||
if (S !== null) {
|
||
var w = Ir();
|
||
Na(S, s, 1, w);
|
||
}
|
||
}), Ds(s, 1);
|
||
}
|
||
}, n.batchedUpdates = function(s, u) {
|
||
var v = Xt;
|
||
Xt |= 1;
|
||
try {
|
||
return s(u);
|
||
} finally {
|
||
Xt = v, Xt === 0 && (Cs(), kc && si());
|
||
}
|
||
}, n.createComponentSelector = function(s) {
|
||
return { $$typeof: et, value: s };
|
||
}, n.createContainer = function(s, u, v, S, w, T, N) {
|
||
return zv(s, u, !1, null, v, S, w, T, N);
|
||
}, n.createHasPseudoClassSelector = function(s) {
|
||
return { $$typeof: Oa, value: s };
|
||
}, n.createHydrationContainer = function(s, u, v, S, w, T, N, X, fe) {
|
||
return s = zv(v, S, !0, s, w, T, N, X, fe), s.context = Iv(null), v = s.current, S = Ir(), w = Lr(v), T = Di(S, w), T.callback = u ?? null, To(v, T, w), s.current.lanes = w, Ei(s, w, S), yr(s, S), s;
|
||
}, n.createPortal = function(s, u, v) {
|
||
var S = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
||
return { $$typeof: m, key: S == null ? null : "" + S, children: s, containerInfo: u, implementation: v };
|
||
}, n.createRoleSelector = function(s) {
|
||
return { $$typeof: ya, value: s };
|
||
}, n.createTestNameSelector = function(s) {
|
||
return { $$typeof: dd, value: s };
|
||
}, n.createTextSelector = function(s) {
|
||
return { $$typeof: fd, value: s };
|
||
}, n.deferredUpdates = function(s) {
|
||
var u = dn, v = On.transition;
|
||
try {
|
||
return On.transition = null, dn = 16, s();
|
||
} finally {
|
||
dn = u, On.transition = v;
|
||
}
|
||
}, n.discreteUpdates = function(s, u, v, S, w) {
|
||
var T = dn, N = On.transition;
|
||
try {
|
||
return On.transition = null, dn = 1, s(u, v, S, w);
|
||
} finally {
|
||
dn = T, On.transition = N, Xt === 0 && Cs();
|
||
}
|
||
}, n.findAllNodes = gp, n.findBoundingRects = function(s, u) {
|
||
if (!ee)
|
||
throw Error(f(363));
|
||
u = gp(s, u), s = [];
|
||
for (var v = 0; v < u.length; v++)
|
||
s.push(Fe(u[v]));
|
||
for (u = s.length - 1; 0 < u; u--) {
|
||
v = s[u];
|
||
for (var S = v.x, w = S + v.width, T = v.y, N = T + v.height, X = u - 1; 0 <= X; X--)
|
||
if (u !== X) {
|
||
var fe = s[X], Ue = fe.x, gt = Ue + fe.width, jt = fe.y, nt = jt + fe.height;
|
||
if (S >= Ue && T >= jt && w <= gt && N <= nt) {
|
||
s.splice(u, 1);
|
||
break;
|
||
} else if (S !== Ue || v.width !== fe.width || nt < T || jt > N) {
|
||
if (!(T !== jt || v.height !== fe.height || gt < S || Ue > w)) {
|
||
Ue > S && (fe.width += Ue - S, fe.x = S), gt < w && (fe.width = w - Ue), s.splice(u, 1);
|
||
break;
|
||
}
|
||
} else {
|
||
jt > T && (fe.height += jt - T, fe.y = T), nt < N && (fe.height = N - jt), s.splice(u, 1);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
return s;
|
||
}, n.findHostInstance = Lv, n.findHostInstanceWithNoPortals = function(s) {
|
||
return s = H(s), s = s !== null ? he(s) : null, s === null ? null : s.stateNode;
|
||
}, n.findHostInstanceWithWarning = function(s) {
|
||
return Lv(s);
|
||
}, n.flushControlled = function(s) {
|
||
var u = Xt;
|
||
Xt |= 1;
|
||
var v = On.transition, S = dn;
|
||
try {
|
||
On.transition = null, dn = 1, s();
|
||
} finally {
|
||
dn = S, On.transition = v, Xt = u, Xt === 0 && (Cs(), si());
|
||
}
|
||
}, n.flushPassiveEffects = za, n.flushSync = Pi, n.focusWithin = function(s, u) {
|
||
if (!ee)
|
||
throw Error(f(363));
|
||
for (s = vp(s), u = Rv(s, u), u = Array.from(u), s = 0; s < u.length; ) {
|
||
var v = u[s++];
|
||
if (!me(v)) {
|
||
if (v.tag === 5 && Dt(v.stateNode))
|
||
return !0;
|
||
for (v = v.child; v !== null; )
|
||
u.push(v), v = v.sibling;
|
||
}
|
||
}
|
||
return !1;
|
||
}, n.getCurrentUpdatePriority = function() {
|
||
return dn;
|
||
}, n.getFindAllNodesFailureDescription = function(s, u) {
|
||
if (!ee)
|
||
throw Error(f(363));
|
||
var v = 0, S = [];
|
||
s = [vp(s), 0];
|
||
for (var w = 0; w < s.length; ) {
|
||
var T = s[w++], N = s[w++], X = u[N];
|
||
if ((T.tag !== 5 || !me(T)) && (mp(T, X) && (S.push(sr(X)), N++, N > v && (v = N)), N < u.length))
|
||
for (T = T.child; T !== null; )
|
||
s.push(T, N), T = T.sibling;
|
||
}
|
||
if (v < u.length) {
|
||
for (s = []; v < u.length; v++)
|
||
s.push(sr(u[v]));
|
||
return `findAllNodes was able to match part of the selector:
|
||
` + (S.join(" > ") + `
|
||
|
||
No matching component was found for:
|
||
`) + s.join(" > ");
|
||
}
|
||
return null;
|
||
}, n.getPublicRootInstance = function(s) {
|
||
if (s = s.current, !s.child)
|
||
return null;
|
||
switch (s.child.tag) {
|
||
case 5:
|
||
return xe(s.child.stateNode);
|
||
default:
|
||
return s.child.stateNode;
|
||
}
|
||
}, n.injectIntoDevTools = function(s) {
|
||
if (s = { bundleType: s.bundleType, version: s.version, rendererPackageName: s.rendererPackageName, rendererConfig: s.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: h.ReactCurrentDispatcher, findHostInstanceByFiber: t1, findFiberByHostInstance: s.findFiberByHostInstance || Fv, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.2.0" }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u")
|
||
s = !1;
|
||
else {
|
||
var u = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||
if (u.isDisabled || !u.supportsFiber)
|
||
s = !0;
|
||
else {
|
||
try {
|
||
Rc = u.inject(s), ji = u;
|
||
} catch {
|
||
}
|
||
s = !!u.checkDCE;
|
||
}
|
||
}
|
||
return s;
|
||
}, n.isAlreadyRendering = function() {
|
||
return !1;
|
||
}, n.observeVisibleRects = function(s, u, v, S) {
|
||
if (!ee)
|
||
throw Error(f(363));
|
||
s = gp(s, u);
|
||
var w = Vt(s, v, S).disconnect;
|
||
return { disconnect: function() {
|
||
w();
|
||
} };
|
||
}, n.registerMutableSourceForHydration = function(s, u) {
|
||
var v = u._getVersion;
|
||
v = v(u._source), s.mutableSourceEagerHydrationData == null ? s.mutableSourceEagerHydrationData = [u, v] : s.mutableSourceEagerHydrationData.push(u, v);
|
||
}, n.runWithPriority = function(s, u) {
|
||
var v = dn;
|
||
try {
|
||
return dn = s, u();
|
||
} finally {
|
||
dn = v;
|
||
}
|
||
}, n.shouldError = function() {
|
||
return null;
|
||
}, n.shouldSuspend = function() {
|
||
return !1;
|
||
}, n.updateContainer = function(s, u, v, S) {
|
||
var w = u.current, T = Ir(), N = Lr(w);
|
||
return v = Iv(v), u.context === null ? u.context = v : u.pendingContext = v, u = Di(T, N), u.payload = { element: s }, S = S === void 0 ? null : S, S !== null && (u.callback = S), s = To(w, u, N), s !== null && (Na(s, w, N, T), Lc(s, w, N)), N;
|
||
}, n;
|
||
}), G2;
|
||
}
|
||
var qg = {}, nV = {
|
||
get exports() {
|
||
return qg;
|
||
},
|
||
set exports(e) {
|
||
qg = e;
|
||
}
|
||
};
|
||
/**
|
||
* @license React
|
||
* react-reconciler.development.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 UE;
|
||
function rV() {
|
||
return UE || (UE = 1, process.env.NODE_ENV !== "production" && (nV.exports = function(t) {
|
||
var n = {}, i = pt, o = rc, l = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, f = !1;
|
||
function h(r) {
|
||
f = r;
|
||
}
|
||
function y(r) {
|
||
if (!f) {
|
||
for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
|
||
d[p - 1] = arguments[p];
|
||
x("warn", r, d);
|
||
}
|
||
}
|
||
function m(r) {
|
||
if (!f) {
|
||
for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
|
||
d[p - 1] = arguments[p];
|
||
x("error", r, d);
|
||
}
|
||
}
|
||
function x(r, a, d) {
|
||
{
|
||
var p = l.ReactDebugCurrentFrame, g = p.getStackAddendum();
|
||
g !== "" && (a += "%s", d = d.concat([g]));
|
||
var C = d.map(function(D) {
|
||
return String(D);
|
||
});
|
||
C.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, C);
|
||
}
|
||
}
|
||
var b = Object.assign;
|
||
function E(r) {
|
||
return r._reactInternals;
|
||
}
|
||
function j(r, a) {
|
||
r._reactInternals = a;
|
||
}
|
||
var M = !1, R = !1, k = !1, A = !1, L = !1, z = !0, I = !0, _ = !0, U = 0, B = 1, q = 2, J = 3, G = 4, H = 5, le = 6, ae = 7, he = 8, Te = 9, xe = 10, $ = 11, Y = 12, te = 13, V = 14, ne = 15, we = 16, Ee = 17, se = 18, ve = 19, Ce = 21, Ae = 22, Ve = 23, tt = 24, at = 25, ze = Symbol.for("react.element"), Qe = Symbol.for("react.portal"), Et = Symbol.for("react.fragment"), Xe = Symbol.for("react.strict_mode"), ht = Symbol.for("react.profiler"), Ht = Symbol.for("react.provider"), Ot = Symbol.for("react.context"), on = Symbol.for("react.forward_ref"), En = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), We = Symbol.for("react.memo"), Fe = Symbol.for("react.lazy"), ot = Symbol.for("react.scope"), me = Symbol.for("react.debug_trace_mode"), Le = Symbol.for("react.offscreen"), Dt = Symbol.for("react.legacy_hidden"), Vt = Symbol.for("react.cache"), ke = Symbol.for("react.tracing_marker"), Nt = Symbol.iterator, tn = "@@iterator";
|
||
function Ne(r) {
|
||
if (r === null || typeof r != "object")
|
||
return null;
|
||
var a = Nt && r[Nt] || r[tn];
|
||
return typeof a == "function" ? a : null;
|
||
}
|
||
function ge(r, a, d) {
|
||
var p = r.displayName;
|
||
if (p)
|
||
return p;
|
||
var g = a.displayName || a.name || "";
|
||
return g !== "" ? d + "(" + g + ")" : d;
|
||
}
|
||
function _e(r) {
|
||
return r.displayName || "Context";
|
||
}
|
||
function yt(r) {
|
||
if (r == null)
|
||
return null;
|
||
if (typeof r.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
||
return r.displayName || r.name || null;
|
||
if (typeof r == "string")
|
||
return r;
|
||
switch (r) {
|
||
case Et:
|
||
return "Fragment";
|
||
case Qe:
|
||
return "Portal";
|
||
case ht:
|
||
return "Profiler";
|
||
case Xe:
|
||
return "StrictMode";
|
||
case En:
|
||
return "Suspense";
|
||
case ee:
|
||
return "SuspenseList";
|
||
}
|
||
if (typeof r == "object")
|
||
switch (r.$$typeof) {
|
||
case Ot:
|
||
var a = r;
|
||
return _e(a) + ".Consumer";
|
||
case Ht:
|
||
var d = r;
|
||
return _e(d._context) + ".Provider";
|
||
case on:
|
||
return ge(r, r.render, "ForwardRef");
|
||
case We:
|
||
var p = r.displayName || null;
|
||
return p !== null ? p : yt(r.type) || "Memo";
|
||
case Fe: {
|
||
var g = r, C = g._payload, D = g._init;
|
||
try {
|
||
return yt(D(C));
|
||
} catch {
|
||
return null;
|
||
}
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
function Qt(r, a, d) {
|
||
var p = a.displayName || a.name || "";
|
||
return r.displayName || (p !== "" ? d + "(" + p + ")" : d);
|
||
}
|
||
function yn(r) {
|
||
return r.displayName || "Context";
|
||
}
|
||
function vt(r) {
|
||
var a = r.tag, d = r.type;
|
||
switch (a) {
|
||
case tt:
|
||
return "Cache";
|
||
case Te:
|
||
var p = d;
|
||
return yn(p) + ".Consumer";
|
||
case xe:
|
||
var g = d;
|
||
return yn(g._context) + ".Provider";
|
||
case se:
|
||
return "DehydratedFragment";
|
||
case $:
|
||
return Qt(d, d.render, "ForwardRef");
|
||
case ae:
|
||
return "Fragment";
|
||
case H:
|
||
return d;
|
||
case G:
|
||
return "Portal";
|
||
case J:
|
||
return "Root";
|
||
case le:
|
||
return "Text";
|
||
case we:
|
||
return yt(d);
|
||
case he:
|
||
return d === Xe ? "StrictMode" : "Mode";
|
||
case Ae:
|
||
return "Offscreen";
|
||
case Y:
|
||
return "Profiler";
|
||
case Ce:
|
||
return "Scope";
|
||
case te:
|
||
return "Suspense";
|
||
case ve:
|
||
return "SuspenseList";
|
||
case at:
|
||
return "TracingMarker";
|
||
case B:
|
||
case U:
|
||
case Ee:
|
||
case q:
|
||
case V:
|
||
case ne:
|
||
if (typeof d == "function")
|
||
return d.displayName || d.name || null;
|
||
if (typeof d == "string")
|
||
return d;
|
||
break;
|
||
}
|
||
return null;
|
||
}
|
||
var dt = (
|
||
/* */
|
||
0
|
||
), Nn = (
|
||
/* */
|
||
1
|
||
), jn = (
|
||
/* */
|
||
2
|
||
), Wt = (
|
||
/* */
|
||
4
|
||
), da = (
|
||
/* */
|
||
16
|
||
), nu = (
|
||
/* */
|
||
32
|
||
), bc = (
|
||
/* */
|
||
64
|
||
), sn = (
|
||
/* */
|
||
128
|
||
), Wi = (
|
||
/* */
|
||
256
|
||
), wi = (
|
||
/* */
|
||
512
|
||
), Co = (
|
||
/* */
|
||
1024
|
||
), Va = (
|
||
/* */
|
||
2048
|
||
), Gi = (
|
||
/* */
|
||
4096
|
||
), os = (
|
||
/* */
|
||
8192
|
||
), Cc = (
|
||
/* */
|
||
16384
|
||
), Zh = Va | Wt | bc | wi | Co | Cc, Df = (
|
||
/* */
|
||
32767
|
||
), ru = (
|
||
/* */
|
||
32768
|
||
), $r = (
|
||
/* */
|
||
65536
|
||
), Qs = (
|
||
/* */
|
||
131072
|
||
), Jh = (
|
||
/* */
|
||
1048576
|
||
), Mf = (
|
||
/* */
|
||
2097152
|
||
), ss = (
|
||
/* */
|
||
4194304
|
||
), Rf = (
|
||
/* */
|
||
8388608
|
||
), qi = (
|
||
/* */
|
||
16777216
|
||
), wc = (
|
||
/* */
|
||
33554432
|
||
), kf = (
|
||
// TODO: Remove Update flag from before mutation phase by re-landing Visibility
|
||
// flag logic (see #20043)
|
||
Wt | Co | 0
|
||
), au = jn | Wt | da | nu | wi | Gi | os, iu = Wt | bc | wi | os, Xs = Va | da, Yi = ss | Rf | Mf, A0 = l.ReactCurrentOwner;
|
||
function Ec(r) {
|
||
var a = r, d = r;
|
||
if (r.alternate)
|
||
for (; a.return; )
|
||
a = a.return;
|
||
else {
|
||
var p = a;
|
||
do
|
||
a = p, (a.flags & (jn | Gi)) !== dt && (d = a.return), p = a.return;
|
||
while (p);
|
||
}
|
||
return a.tag === J ? d : null;
|
||
}
|
||
function N0(r) {
|
||
return Ec(r) === r;
|
||
}
|
||
function Pf(r) {
|
||
{
|
||
var a = A0.current;
|
||
if (a !== null && a.tag === B) {
|
||
var d = a, p = d.stateNode;
|
||
p._warnedAboutRefsInRender || m("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", vt(d) || "A component"), p._warnedAboutRefsInRender = !0;
|
||
}
|
||
}
|
||
var g = E(r);
|
||
return g ? Ec(g) === g : !1;
|
||
}
|
||
function Ks(r) {
|
||
if (Ec(r) !== r)
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
}
|
||
function jc(r) {
|
||
var a = r.alternate;
|
||
if (!a) {
|
||
var d = Ec(r);
|
||
if (d === null)
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
return d !== r ? null : r;
|
||
}
|
||
for (var p = r, g = a; ; ) {
|
||
var C = p.return;
|
||
if (C === null)
|
||
break;
|
||
var D = C.alternate;
|
||
if (D === null) {
|
||
var P = C.return;
|
||
if (P !== null) {
|
||
p = g = P;
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
if (C.child === D.child) {
|
||
for (var O = C.child; O; ) {
|
||
if (O === p)
|
||
return Ks(C), r;
|
||
if (O === g)
|
||
return Ks(C), a;
|
||
O = O.sibling;
|
||
}
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
}
|
||
if (p.return !== g.return)
|
||
p = C, g = D;
|
||
else {
|
||
for (var F = !1, W = C.child; W; ) {
|
||
if (W === p) {
|
||
F = !0, p = C, g = D;
|
||
break;
|
||
}
|
||
if (W === g) {
|
||
F = !0, g = C, p = D;
|
||
break;
|
||
}
|
||
W = W.sibling;
|
||
}
|
||
if (!F) {
|
||
for (W = D.child; W; ) {
|
||
if (W === p) {
|
||
F = !0, p = D, g = C;
|
||
break;
|
||
}
|
||
if (W === g) {
|
||
F = !0, g = D, p = C;
|
||
break;
|
||
}
|
||
W = W.sibling;
|
||
}
|
||
if (!F)
|
||
throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.");
|
||
}
|
||
}
|
||
if (p.alternate !== g)
|
||
throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
if (p.tag !== J)
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
return p.stateNode.current === p ? r : a;
|
||
}
|
||
function ou(r) {
|
||
var a = jc(r);
|
||
return a !== null ? $h(a) : null;
|
||
}
|
||
function $h(r) {
|
||
if (r.tag === H || r.tag === le)
|
||
return r;
|
||
for (var a = r.child; a !== null; ) {
|
||
var d = $h(a);
|
||
if (d !== null)
|
||
return d;
|
||
a = a.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
function Of(r) {
|
||
var a = jc(r);
|
||
return a !== null ? ls(a) : null;
|
||
}
|
||
function ls(r) {
|
||
if (r.tag === H || r.tag === le)
|
||
return r;
|
||
for (var a = r.child; a !== null; ) {
|
||
if (a.tag !== G) {
|
||
var d = ls(a);
|
||
if (d !== null)
|
||
return d;
|
||
}
|
||
a = a.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
var wo = Array.isArray;
|
||
function Kt(r) {
|
||
return wo(r);
|
||
}
|
||
var xn = t.getPublicInstance, Eo = t.getRootHostContext, Gr = t.getChildHostContext, fa = t.prepareForCommit, us = t.resetAfterCommit, Zs = t.createInstance, qr = t.appendInitialChild, su = t.finalizeInitialChildren, Af = t.prepareUpdate, Tc = t.shouldSetTextContent, lu = t.createTextInstance, Nf = t.scheduleTimeout, ii = t.cancelTimeout, zf = t.noTimeout, Dc = t.isPrimaryRenderer, z0 = t.warnsIfNotActing, Yr = t.supportsMutation, cs = t.supportsPersistence, Qr = t.supportsHydration, Mc = t.getInstanceFromNode;
|
||
t.beforeActiveInstanceBlur, t.afterActiveInstanceBlur;
|
||
var I0 = t.preparePortalMount;
|
||
t.prepareScopeUpdate, t.getInstanceFromScope;
|
||
var L0 = t.getCurrentEventPriority, If = t.detachDeletedInstance, ev = t.supportsMicrotasks, Lf = t.scheduleMicrotask, Ei = t.supportsTestSelectors, F0 = t.findFiberRoot, Ff = t.getBoundingRect, dn = t.getTextContent, Js = t.isHiddenSubtree, Bf = t.matchAccessibilityRole, tv = t.setFocusIfFocusable, B0 = t.setupIntersectionObserver, _0 = t.appendChild, br = t.appendChildToContainer, _f = t.commitTextUpdate, U0 = t.commitMount, Uf = t.commitUpdate, H0 = t.insertBefore, Rc = t.insertInContainerBefore, ji = t.removeChild, V0 = t.removeChildFromContainer, nv = t.resetTextContent, oi = t.hideInstance, Qi = t.hideTextInstance, kc = t.unhideInstance, Hf = t.unhideTextInstance, rv = t.clearContainer, W0 = t.cloneInstance, si = t.createContainerChildSet, ds = t.appendChildToContainerChildSet, $s = t.finalizeContainerChildren, el = t.replaceContainerChildren, uu = t.cloneHiddenInstance, Ma = t.cloneHiddenTextInstance, Wa = t.canHydrateInstance, fs = t.canHydrateTextInstance, Xi = t.canHydrateSuspenseInstance, Ti = t.isSuspenseInstancePending, Ki = t.isSuspenseInstanceFallback, av = t.getSuspenseInstanceFallbackErrorDetails, Vf = t.registerSuspenseInstanceRetry, tl = t.getNextHydratableSibling, Ra = t.getFirstHydratableChild, Ga = t.getFirstHydratableChildWithinContainer, Un = t.getFirstHydratableChildWithinSuspenseInstance, cu = t.hydrateInstance, li = t.hydrateTextInstance, iv = t.hydrateSuspenseInstance, ov = t.getNextHydratableInstanceAfterSuspenseInstance, Wf = t.commitHydratedContainer, Gf = t.commitHydratedSuspenseInstance, sv = t.clearSuspenseBoundary, Pc = t.clearSuspenseBoundaryFromContainer, lv = t.shouldDeleteUnhydratedTailInstances, nl = t.didNotMatchHydratedContainerTextInstance, qf = t.didNotMatchHydratedTextInstance, G0 = t.didNotHydrateInstanceWithinContainer, Oc = t.didNotHydrateInstanceWithinSuspenseInstance, q0 = t.didNotHydrateInstance, ui = t.didNotFindHydratableInstanceWithinContainer, Ac = t.didNotFindHydratableTextInstanceWithinContainer, Nc = t.didNotFindHydratableSuspenseInstanceWithinContainer, rl = t.didNotFindHydratableInstanceWithinSuspenseInstance, Yf = t.didNotFindHydratableTextInstanceWithinSuspenseInstance, Qf = t.didNotFindHydratableSuspenseInstanceWithinSuspenseInstance, uv = t.didNotFindHydratableInstance, Xf = t.didNotFindHydratableTextInstance, Kf = t.didNotFindHydratableSuspenseInstance, al = t.errorHydratingContainer, Xr = 0, jo, zc, Zf, ci, Zi, Ic, Jf;
|
||
function Di() {
|
||
}
|
||
Di.__reactDisabledLog = !0;
|
||
function To() {
|
||
{
|
||
if (Xr === 0) {
|
||
jo = console.log, zc = console.info, Zf = console.warn, ci = console.error, Zi = console.group, Ic = console.groupCollapsed, Jf = console.groupEnd;
|
||
var r = {
|
||
configurable: !0,
|
||
enumerable: !0,
|
||
value: Di,
|
||
writable: !0
|
||
};
|
||
Object.defineProperties(console, {
|
||
info: r,
|
||
log: r,
|
||
warn: r,
|
||
error: r,
|
||
group: r,
|
||
groupCollapsed: r,
|
||
groupEnd: r
|
||
});
|
||
}
|
||
Xr++;
|
||
}
|
||
}
|
||
function Lc() {
|
||
{
|
||
if (Xr--, Xr === 0) {
|
||
var r = {
|
||
configurable: !0,
|
||
enumerable: !0,
|
||
writable: !0
|
||
};
|
||
Object.defineProperties(console, {
|
||
log: b({}, r, {
|
||
value: jo
|
||
}),
|
||
info: b({}, r, {
|
||
value: zc
|
||
}),
|
||
warn: b({}, r, {
|
||
value: Zf
|
||
}),
|
||
error: b({}, r, {
|
||
value: ci
|
||
}),
|
||
group: b({}, r, {
|
||
value: Zi
|
||
}),
|
||
groupCollapsed: b({}, r, {
|
||
value: Ic
|
||
}),
|
||
groupEnd: b({}, r, {
|
||
value: Jf
|
||
})
|
||
});
|
||
}
|
||
Xr < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
||
}
|
||
}
|
||
var Fc = l.ReactCurrentDispatcher, il;
|
||
function Ji(r, a, d) {
|
||
{
|
||
if (il === void 0)
|
||
try {
|
||
throw Error();
|
||
} catch (g) {
|
||
var p = g.stack.trim().match(/\n( *(at )?)/);
|
||
il = p && p[1] || "";
|
||
}
|
||
return `
|
||
` + il + r;
|
||
}
|
||
}
|
||
var Bc = !1, ol;
|
||
{
|
||
var _c = typeof WeakMap == "function" ? WeakMap : Map;
|
||
ol = new _c();
|
||
}
|
||
function Uc(r, a) {
|
||
if (!r || Bc)
|
||
return "";
|
||
{
|
||
var d = ol.get(r);
|
||
if (d !== void 0)
|
||
return d;
|
||
}
|
||
var p;
|
||
Bc = !0;
|
||
var g = Error.prepareStackTrace;
|
||
Error.prepareStackTrace = void 0;
|
||
var C;
|
||
C = Fc.current, Fc.current = null, To();
|
||
try {
|
||
if (a) {
|
||
var D = function() {
|
||
throw Error();
|
||
};
|
||
if (Object.defineProperty(D.prototype, "props", {
|
||
set: function() {
|
||
throw Error();
|
||
}
|
||
}), typeof Reflect == "object" && Reflect.construct) {
|
||
try {
|
||
Reflect.construct(D, []);
|
||
} catch (Re) {
|
||
p = Re;
|
||
}
|
||
Reflect.construct(r, [], D);
|
||
} else {
|
||
try {
|
||
D.call();
|
||
} catch (Re) {
|
||
p = Re;
|
||
}
|
||
r.call(D.prototype);
|
||
}
|
||
} else {
|
||
try {
|
||
throw Error();
|
||
} catch (Re) {
|
||
p = Re;
|
||
}
|
||
r();
|
||
}
|
||
} catch (Re) {
|
||
if (Re && p && typeof Re.stack == "string") {
|
||
for (var P = Re.stack.split(`
|
||
`), O = p.stack.split(`
|
||
`), F = P.length - 1, W = O.length - 1; F >= 1 && W >= 0 && P[F] !== O[W]; )
|
||
W--;
|
||
for (; F >= 1 && W >= 0; F--, W--)
|
||
if (P[F] !== O[W]) {
|
||
if (F !== 1 || W !== 1)
|
||
do
|
||
if (F--, W--, W < 0 || P[F] !== O[W]) {
|
||
var re = `
|
||
` + P[F].replace(" at new ", " at ");
|
||
return r.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", r.displayName)), typeof r == "function" && ol.set(r, re), re;
|
||
}
|
||
while (F >= 1 && W >= 0);
|
||
break;
|
||
}
|
||
}
|
||
} finally {
|
||
Bc = !1, Fc.current = C, Lc(), Error.prepareStackTrace = g;
|
||
}
|
||
var de = r ? r.displayName || r.name : "", be = de ? Ji(de) : "";
|
||
return typeof r == "function" && ol.set(r, be), be;
|
||
}
|
||
function cv(r, a, d) {
|
||
return Uc(r, !0);
|
||
}
|
||
function Hc(r, a, d) {
|
||
return Uc(r, !1);
|
||
}
|
||
function $f(r) {
|
||
var a = r.prototype;
|
||
return !!(a && a.isReactComponent);
|
||
}
|
||
function ps(r, a, d) {
|
||
if (r == null)
|
||
return "";
|
||
if (typeof r == "function")
|
||
return Uc(r, $f(r));
|
||
if (typeof r == "string")
|
||
return Ji(r);
|
||
switch (r) {
|
||
case En:
|
||
return Ji("Suspense");
|
||
case ee:
|
||
return Ji("SuspenseList");
|
||
}
|
||
if (typeof r == "object")
|
||
switch (r.$$typeof) {
|
||
case on:
|
||
return Hc(r.render);
|
||
case We:
|
||
return ps(r.type, a, d);
|
||
case Fe: {
|
||
var p = r, g = p._payload, C = p._init;
|
||
try {
|
||
return ps(C(g), a, d);
|
||
} catch {
|
||
}
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
var du = Object.prototype.hasOwnProperty, ep = {}, tp = l.ReactDebugCurrentFrame;
|
||
function $i(r) {
|
||
if (r) {
|
||
var a = r._owner, d = ps(r.type, r._source, a ? a.type : null);
|
||
tp.setExtraStackFrame(d);
|
||
} else
|
||
tp.setExtraStackFrame(null);
|
||
}
|
||
function qa(r, a, d, p, g) {
|
||
{
|
||
var C = Function.call.bind(du);
|
||
for (var D in r)
|
||
if (C(r, D)) {
|
||
var P = void 0;
|
||
try {
|
||
if (typeof r[D] != "function") {
|
||
var O = Error((p || "React class") + ": " + d + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
||
throw O.name = "Invariant Violation", O;
|
||
}
|
||
P = r[D](a, D, p, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
||
} catch (F) {
|
||
P = F;
|
||
}
|
||
P && !(P instanceof Error) && ($i(g), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", d, D, typeof P), $i(null)), P instanceof Error && !(P.message in ep) && (ep[P.message] = !0, $i(g), m("Failed %s type: %s", d, P.message), $i(null));
|
||
}
|
||
}
|
||
}
|
||
var hs = [], ea;
|
||
ea = [];
|
||
var ka = -1;
|
||
function Pa(r) {
|
||
return {
|
||
current: r
|
||
};
|
||
}
|
||
function zn(r, a) {
|
||
if (ka < 0) {
|
||
m("Unexpected pop.");
|
||
return;
|
||
}
|
||
a !== ea[ka] && m("Unexpected Fiber popped."), r.current = hs[ka], hs[ka] = null, ea[ka] = null, ka--;
|
||
}
|
||
function pr(r, a, d) {
|
||
ka++, hs[ka] = r.current, ea[ka] = d, r.current = a;
|
||
}
|
||
var Do;
|
||
Do = {};
|
||
var pa = {};
|
||
Object.freeze(pa);
|
||
var di = Pa(pa), fn = Pa(!1), sl = pa;
|
||
function Mo(r, a, d) {
|
||
return d && Kr(a) ? sl : di.current;
|
||
}
|
||
function Vc(r, a, d) {
|
||
{
|
||
var p = r.stateNode;
|
||
p.__reactInternalMemoizedUnmaskedChildContext = a, p.__reactInternalMemoizedMaskedChildContext = d;
|
||
}
|
||
}
|
||
function eo(r, a) {
|
||
{
|
||
var d = r.type, p = d.contextTypes;
|
||
if (!p)
|
||
return pa;
|
||
var g = r.stateNode;
|
||
if (g && g.__reactInternalMemoizedUnmaskedChildContext === a)
|
||
return g.__reactInternalMemoizedMaskedChildContext;
|
||
var C = {};
|
||
for (var D in p)
|
||
C[D] = a[D];
|
||
{
|
||
var P = vt(r) || "Unknown";
|
||
qa(p, C, "context", P);
|
||
}
|
||
return g && Vc(r, a, C), C;
|
||
}
|
||
}
|
||
function ll() {
|
||
return fn.current;
|
||
}
|
||
function Kr(r) {
|
||
{
|
||
var a = r.childContextTypes;
|
||
return a != null;
|
||
}
|
||
}
|
||
function Pn(r) {
|
||
zn(fn, r), zn(di, r);
|
||
}
|
||
function Jn(r) {
|
||
zn(fn, r), zn(di, r);
|
||
}
|
||
function hr(r, a, d) {
|
||
{
|
||
if (di.current !== pa)
|
||
throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");
|
||
pr(di, a, r), pr(fn, d, r);
|
||
}
|
||
}
|
||
function fu(r, a, d) {
|
||
{
|
||
var p = r.stateNode, g = a.childContextTypes;
|
||
if (typeof p.getChildContext != "function") {
|
||
{
|
||
var C = vt(r) || "Unknown";
|
||
Do[C] || (Do[C] = !0, m("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.", C, C));
|
||
}
|
||
return d;
|
||
}
|
||
var D = p.getChildContext();
|
||
for (var P in D)
|
||
if (!(P in g))
|
||
throw new Error((vt(r) || "Unknown") + '.getChildContext(): key "' + P + '" is not defined in childContextTypes.');
|
||
{
|
||
var O = vt(r) || "Unknown";
|
||
qa(g, D, "child context", O);
|
||
}
|
||
return b({}, d, D);
|
||
}
|
||
}
|
||
function Ro(r) {
|
||
{
|
||
var a = r.stateNode, d = a && a.__reactInternalMemoizedMergedChildContext || pa;
|
||
return sl = di.current, pr(di, d, r), pr(fn, fn.current, r), !0;
|
||
}
|
||
}
|
||
function ul(r, a, d) {
|
||
{
|
||
var p = r.stateNode;
|
||
if (!p)
|
||
throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");
|
||
if (d) {
|
||
var g = fu(r, a, sl);
|
||
p.__reactInternalMemoizedMergedChildContext = g, zn(fn, r), zn(di, r), pr(di, g, r), pr(fn, d, r);
|
||
} else
|
||
zn(fn, r), pr(fn, d, r);
|
||
}
|
||
}
|
||
function Y0(r) {
|
||
{
|
||
if (!N0(r) || r.tag !== B)
|
||
throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");
|
||
var a = r;
|
||
do {
|
||
switch (a.tag) {
|
||
case J:
|
||
return a.stateNode.context;
|
||
case B: {
|
||
var d = a.type;
|
||
if (Kr(d))
|
||
return a.stateNode.__reactInternalMemoizedMergedChildContext;
|
||
break;
|
||
}
|
||
}
|
||
a = a.return;
|
||
} while (a !== null);
|
||
throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
}
|
||
var $n = 0, Wc = 1, Mt = (
|
||
/* */
|
||
0
|
||
), Zt = (
|
||
/* */
|
||
1
|
||
), Gt = (
|
||
/* */
|
||
2
|
||
), hn = (
|
||
/* */
|
||
8
|
||
), ha = (
|
||
/* */
|
||
16
|
||
), Gc = Math.clz32 ? Math.clz32 : fv, np = Math.log, dv = Math.LN2;
|
||
function fv(r) {
|
||
var a = r >>> 0;
|
||
return a === 0 ? 32 : 31 - (np(a) / dv | 0) | 0;
|
||
}
|
||
var qc = 31, Me = (
|
||
/* */
|
||
0
|
||
), vr = (
|
||
/* */
|
||
0
|
||
), Pt = (
|
||
/* */
|
||
1
|
||
), vs = (
|
||
/* */
|
||
2
|
||
), Mi = (
|
||
/* */
|
||
4
|
||
), fi = (
|
||
/* */
|
||
8
|
||
), pi = (
|
||
/* */
|
||
16
|
||
), ko = (
|
||
/* */
|
||
32
|
||
), to = (
|
||
/* */
|
||
4194240
|
||
), cl = (
|
||
/* */
|
||
64
|
||
), pu = (
|
||
/* */
|
||
128
|
||
), Yc = (
|
||
/* */
|
||
256
|
||
), Qc = (
|
||
/* */
|
||
512
|
||
), Xc = (
|
||
/* */
|
||
1024
|
||
), Kc = (
|
||
/* */
|
||
2048
|
||
), hu = (
|
||
/* */
|
||
4096
|
||
), Zc = (
|
||
/* */
|
||
8192
|
||
), Jc = (
|
||
/* */
|
||
16384
|
||
), $c = (
|
||
/* */
|
||
32768
|
||
), rp = (
|
||
/* */
|
||
65536
|
||
), ed = (
|
||
/* */
|
||
131072
|
||
), ap = (
|
||
/* */
|
||
262144
|
||
), ip = (
|
||
/* */
|
||
524288
|
||
), td = (
|
||
/* */
|
||
1048576
|
||
), nd = (
|
||
/* */
|
||
2097152
|
||
), vu = (
|
||
/* */
|
||
130023424
|
||
), no = (
|
||
/* */
|
||
4194304
|
||
), op = (
|
||
/* */
|
||
8388608
|
||
), sp = (
|
||
/* */
|
||
16777216
|
||
), lp = (
|
||
/* */
|
||
33554432
|
||
), Po = (
|
||
/* */
|
||
67108864
|
||
), rd = no, ms = (
|
||
/* */
|
||
134217728
|
||
), pv = (
|
||
/* */
|
||
268435455
|
||
), dl = (
|
||
/* */
|
||
268435456
|
||
), Oo = (
|
||
/* */
|
||
536870912
|
||
), va = (
|
||
/* */
|
||
1073741824
|
||
);
|
||
function hv(r) {
|
||
{
|
||
if (r & Pt)
|
||
return "Sync";
|
||
if (r & vs)
|
||
return "InputContinuousHydration";
|
||
if (r & Mi)
|
||
return "InputContinuous";
|
||
if (r & fi)
|
||
return "DefaultHydration";
|
||
if (r & pi)
|
||
return "Default";
|
||
if (r & ko)
|
||
return "TransitionHydration";
|
||
if (r & to)
|
||
return "Transition";
|
||
if (r & vu)
|
||
return "Retry";
|
||
if (r & ms)
|
||
return "SelectiveHydration";
|
||
if (r & dl)
|
||
return "IdleHydration";
|
||
if (r & Oo)
|
||
return "Idle";
|
||
if (r & va)
|
||
return "Offscreen";
|
||
}
|
||
}
|
||
var Tn = -1, ad = cl, Pr = no;
|
||
function mr(r) {
|
||
switch (Ao(r)) {
|
||
case Pt:
|
||
return Pt;
|
||
case vs:
|
||
return vs;
|
||
case Mi:
|
||
return Mi;
|
||
case fi:
|
||
return fi;
|
||
case pi:
|
||
return pi;
|
||
case ko:
|
||
return ko;
|
||
case cl:
|
||
case pu:
|
||
case Yc:
|
||
case Qc:
|
||
case Xc:
|
||
case Kc:
|
||
case hu:
|
||
case Zc:
|
||
case Jc:
|
||
case $c:
|
||
case rp:
|
||
case ed:
|
||
case ap:
|
||
case ip:
|
||
case td:
|
||
case nd:
|
||
return r & to;
|
||
case no:
|
||
case op:
|
||
case sp:
|
||
case lp:
|
||
case Po:
|
||
return r & vu;
|
||
case ms:
|
||
return ms;
|
||
case dl:
|
||
return dl;
|
||
case Oo:
|
||
return Oo;
|
||
case va:
|
||
return va;
|
||
default:
|
||
return m("Should have found matching lanes. This is a bug in React."), r;
|
||
}
|
||
}
|
||
function mu(r, a) {
|
||
var d = r.pendingLanes;
|
||
if (d === Me)
|
||
return Me;
|
||
var p = Me, g = r.suspendedLanes, C = r.pingedLanes, D = d & pv;
|
||
if (D !== Me) {
|
||
var P = D & ~g;
|
||
if (P !== Me)
|
||
p = mr(P);
|
||
else {
|
||
var O = D & C;
|
||
O !== Me && (p = mr(O));
|
||
}
|
||
} else {
|
||
var F = d & ~g;
|
||
F !== Me ? p = mr(F) : C !== Me && (p = mr(C));
|
||
}
|
||
if (p === Me)
|
||
return Me;
|
||
if (a !== Me && a !== p && // If we already suspended with a delay, then interrupting is fine. Don't
|
||
// bother waiting until the root is complete.
|
||
(a & g) === Me) {
|
||
var W = Ao(p), re = Ao(a);
|
||
if (
|
||
// Tests whether the next lane is equal or lower priority than the wip
|
||
// one. This works because the bits decrease in priority as you go left.
|
||
W >= re || // Default priority updates should not interrupt transition updates. The
|
||
// only difference between default updates and transition updates is that
|
||
// default updates do not support refresh transitions.
|
||
W === pi && (re & to) !== Me
|
||
)
|
||
return a;
|
||
}
|
||
(p & Mi) !== Me && (p |= d & pi);
|
||
var de = r.entangledLanes;
|
||
if (de !== Me)
|
||
for (var be = r.entanglements, Re = p & de; Re > 0; ) {
|
||
var De = No(Re), wt = 1 << De;
|
||
p |= be[De], Re &= ~wt;
|
||
}
|
||
return p;
|
||
}
|
||
function vv(r, a) {
|
||
for (var d = r.eventTimes, p = Tn; a > 0; ) {
|
||
var g = No(a), C = 1 << g, D = d[g];
|
||
D > p && (p = D), a &= ~C;
|
||
}
|
||
return p;
|
||
}
|
||
function mv(r, a) {
|
||
switch (r) {
|
||
case Pt:
|
||
case vs:
|
||
case Mi:
|
||
return a + 250;
|
||
case fi:
|
||
case pi:
|
||
case ko:
|
||
case cl:
|
||
case pu:
|
||
case Yc:
|
||
case Qc:
|
||
case Xc:
|
||
case Kc:
|
||
case hu:
|
||
case Zc:
|
||
case Jc:
|
||
case $c:
|
||
case rp:
|
||
case ed:
|
||
case ap:
|
||
case ip:
|
||
case td:
|
||
case nd:
|
||
return a + 5e3;
|
||
case no:
|
||
case op:
|
||
case sp:
|
||
case lp:
|
||
case Po:
|
||
return Tn;
|
||
case ms:
|
||
case dl:
|
||
case Oo:
|
||
case va:
|
||
return Tn;
|
||
default:
|
||
return m("Should have found matching lanes. This is a bug in React."), Tn;
|
||
}
|
||
}
|
||
function gv(r, a) {
|
||
for (var d = r.pendingLanes, p = r.suspendedLanes, g = r.pingedLanes, C = r.expirationTimes, D = d; D > 0; ) {
|
||
var P = No(D), O = 1 << P, F = C[P];
|
||
F === Tn ? ((O & p) === Me || (O & g) !== Me) && (C[P] = mv(O, a)) : F <= a && (r.expiredLanes |= O), D &= ~O;
|
||
}
|
||
}
|
||
function yv(r) {
|
||
return mr(r.pendingLanes);
|
||
}
|
||
function gu(r) {
|
||
var a = r.pendingLanes & ~va;
|
||
return a !== Me ? a : a & va ? va : Me;
|
||
}
|
||
function xv(r) {
|
||
return (r & Pt) !== Me;
|
||
}
|
||
function yu(r) {
|
||
return (r & pv) !== Me;
|
||
}
|
||
function up(r) {
|
||
return (r & vu) === r;
|
||
}
|
||
function Sv(r) {
|
||
var a = Pt | Mi | pi;
|
||
return (r & a) === Me;
|
||
}
|
||
function cp(r) {
|
||
return (r & to) === r;
|
||
}
|
||
function fl(r, a) {
|
||
var d = vs | Mi | fi | pi;
|
||
return (a & d) !== Me;
|
||
}
|
||
function bv(r, a) {
|
||
return (a & r.expiredLanes) !== Me;
|
||
}
|
||
function id(r) {
|
||
return (r & to) !== Me;
|
||
}
|
||
function xu() {
|
||
var r = ad;
|
||
return ad <<= 1, (ad & to) === Me && (ad = cl), r;
|
||
}
|
||
function Q0() {
|
||
var r = Pr;
|
||
return Pr <<= 1, (Pr & vu) === Me && (Pr = no), r;
|
||
}
|
||
function Ao(r) {
|
||
return r & -r;
|
||
}
|
||
function gs(r) {
|
||
return Ao(r);
|
||
}
|
||
function No(r) {
|
||
return 31 - Gc(r);
|
||
}
|
||
function pl(r) {
|
||
return No(r);
|
||
}
|
||
function er(r, a) {
|
||
return (r & a) !== Me;
|
||
}
|
||
function hl(r, a) {
|
||
return (r & a) === a;
|
||
}
|
||
function kt(r, a) {
|
||
return r | a;
|
||
}
|
||
function Su(r, a) {
|
||
return r & ~a;
|
||
}
|
||
function vl(r, a) {
|
||
return r & a;
|
||
}
|
||
function od(r) {
|
||
return r;
|
||
}
|
||
function sd(r, a) {
|
||
return r !== vr && r < a ? r : a;
|
||
}
|
||
function ml(r) {
|
||
for (var a = [], d = 0; d < qc; d++)
|
||
a.push(r);
|
||
return a;
|
||
}
|
||
function gl(r, a, d) {
|
||
r.pendingLanes |= a, a !== Oo && (r.suspendedLanes = Me, r.pingedLanes = Me);
|
||
var p = r.eventTimes, g = pl(a);
|
||
p[g] = d;
|
||
}
|
||
function bu(r, a) {
|
||
r.suspendedLanes |= a, r.pingedLanes &= ~a;
|
||
for (var d = r.expirationTimes, p = a; p > 0; ) {
|
||
var g = No(p), C = 1 << g;
|
||
d[g] = Tn, p &= ~C;
|
||
}
|
||
}
|
||
function Or(r, a, d) {
|
||
r.pingedLanes |= r.suspendedLanes & a;
|
||
}
|
||
function X0(r, a) {
|
||
var d = r.pendingLanes & ~a;
|
||
r.pendingLanes = a, r.suspendedLanes = Me, r.pingedLanes = Me, r.expiredLanes &= a, r.mutableReadLanes &= a, r.entangledLanes &= a;
|
||
for (var p = r.entanglements, g = r.eventTimes, C = r.expirationTimes, D = d; D > 0; ) {
|
||
var P = No(D), O = 1 << P;
|
||
p[P] = Me, g[P] = Tn, C[P] = Tn, D &= ~O;
|
||
}
|
||
}
|
||
function dp(r, a) {
|
||
for (var d = r.entangledLanes |= a, p = r.entanglements, g = d; g; ) {
|
||
var C = No(g), D = 1 << C;
|
||
// Is this one of the newly entangled lanes?
|
||
D & a | // Is this lane transitively entangled with the newly entangled lanes?
|
||
p[C] & a && (p[C] |= a), g &= ~D;
|
||
}
|
||
}
|
||
function ld(r, a) {
|
||
var d = Ao(a), p;
|
||
switch (d) {
|
||
case Mi:
|
||
p = vs;
|
||
break;
|
||
case pi:
|
||
p = fi;
|
||
break;
|
||
case cl:
|
||
case pu:
|
||
case Yc:
|
||
case Qc:
|
||
case Xc:
|
||
case Kc:
|
||
case hu:
|
||
case Zc:
|
||
case Jc:
|
||
case $c:
|
||
case rp:
|
||
case ed:
|
||
case ap:
|
||
case ip:
|
||
case td:
|
||
case nd:
|
||
case no:
|
||
case op:
|
||
case sp:
|
||
case lp:
|
||
case Po:
|
||
p = ko;
|
||
break;
|
||
case Oo:
|
||
p = dl;
|
||
break;
|
||
default:
|
||
p = vr;
|
||
break;
|
||
}
|
||
return (p & (r.suspendedLanes | a)) !== vr ? vr : p;
|
||
}
|
||
function Ar(r, a, d) {
|
||
if (ya)
|
||
for (var p = r.pendingUpdatersLaneMap; d > 0; ) {
|
||
var g = pl(d), C = 1 << g, D = p[g];
|
||
D.add(a), d &= ~C;
|
||
}
|
||
}
|
||
function Cv(r, a) {
|
||
if (ya)
|
||
for (var d = r.pendingUpdatersLaneMap, p = r.memoizedUpdaters; a > 0; ) {
|
||
var g = pl(a), C = 1 << g, D = d[g];
|
||
D.size > 0 && (D.forEach(function(P) {
|
||
var O = P.alternate;
|
||
(O === null || !p.has(O)) && p.add(P);
|
||
}), D.clear()), a &= ~C;
|
||
}
|
||
}
|
||
function ft(r, a) {
|
||
return null;
|
||
}
|
||
var ta = Pt, ys = Mi, yl = pi, fp = Oo, ro = vr;
|
||
function ma() {
|
||
return ro;
|
||
}
|
||
function or(r) {
|
||
ro = r;
|
||
}
|
||
function wv(r, a) {
|
||
var d = ro;
|
||
try {
|
||
return ro = r, a();
|
||
} finally {
|
||
ro = d;
|
||
}
|
||
}
|
||
function Ev(r, a) {
|
||
return r !== 0 && r < a ? r : a;
|
||
}
|
||
function jv(r, a) {
|
||
return r === 0 || r > a ? r : a;
|
||
}
|
||
function ud(r, a) {
|
||
return r !== 0 && r < a;
|
||
}
|
||
function cd(r) {
|
||
var a = Ao(r);
|
||
return ud(ta, a) ? ud(ys, a) ? yu(a) ? yl : fp : ys : ta;
|
||
}
|
||
var Cr = o.unstable_scheduleCallback, hi = o.unstable_cancelCallback, Ri = o.unstable_shouldYield, pp = o.unstable_requestPaint, gr = o.unstable_now, ga = o.unstable_ImmediatePriority, hp = o.unstable_UserBlockingPriority, na = o.unstable_NormalPriority, Tv = o.unstable_IdlePriority, Dv = o.unstable_yieldValue, Mv = o.unstable_setDisableYieldValue, xs = null, Nr = null, et = null, Oa = !1, ya = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u";
|
||
function dd(r) {
|
||
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u")
|
||
return !1;
|
||
var a = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||
if (a.isDisabled)
|
||
return !0;
|
||
if (!a.supportsFiber)
|
||
return m("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"), !0;
|
||
try {
|
||
z && (r = b({}, r, {
|
||
getLaneLabelMap: gp,
|
||
injectProfilingHooks: Rv
|
||
})), xs = a.inject(r), Nr = a;
|
||
} catch (d) {
|
||
m("React instrumentation encountered an error: %s.", d);
|
||
}
|
||
return !!a.checkDCE;
|
||
}
|
||
function fd(r, a) {
|
||
if (Nr && typeof Nr.onScheduleFiberRoot == "function")
|
||
try {
|
||
Nr.onScheduleFiberRoot(xs, r, a);
|
||
} catch (d) {
|
||
Oa || (Oa = !0, m("React instrumentation encountered an error: %s", d));
|
||
}
|
||
}
|
||
function Cu(r, a) {
|
||
if (Nr && typeof Nr.onCommitFiberRoot == "function")
|
||
try {
|
||
var d = (r.current.flags & sn) === sn;
|
||
if (I) {
|
||
var p;
|
||
switch (a) {
|
||
case ta:
|
||
p = ga;
|
||
break;
|
||
case ys:
|
||
p = hp;
|
||
break;
|
||
case yl:
|
||
p = na;
|
||
break;
|
||
case fp:
|
||
p = Tv;
|
||
break;
|
||
default:
|
||
p = na;
|
||
break;
|
||
}
|
||
Nr.onCommitFiberRoot(xs, r, p, d);
|
||
}
|
||
} catch (g) {
|
||
Oa || (Oa = !0, m("React instrumentation encountered an error: %s", g));
|
||
}
|
||
}
|
||
function vp(r) {
|
||
if (Nr && typeof Nr.onPostCommitFiberRoot == "function")
|
||
try {
|
||
Nr.onPostCommitFiberRoot(xs, r);
|
||
} catch (a) {
|
||
Oa || (Oa = !0, m("React instrumentation encountered an error: %s", a));
|
||
}
|
||
}
|
||
function mp(r) {
|
||
if (Nr && typeof Nr.onCommitFiberUnmount == "function")
|
||
try {
|
||
Nr.onCommitFiberUnmount(xs, r);
|
||
} catch (a) {
|
||
Oa || (Oa = !0, m("React instrumentation encountered an error: %s", a));
|
||
}
|
||
}
|
||
function sr(r) {
|
||
if (typeof Dv == "function" && (Mv(r), h(r)), Nr && typeof Nr.setStrictMode == "function")
|
||
try {
|
||
Nr.setStrictMode(xs, r);
|
||
} catch (a) {
|
||
Oa || (Oa = !0, m("React instrumentation encountered an error: %s", a));
|
||
}
|
||
}
|
||
function Rv(r) {
|
||
et = r;
|
||
}
|
||
function gp() {
|
||
{
|
||
for (var r = /* @__PURE__ */ new Map(), a = 1, d = 0; d < qc; d++) {
|
||
var p = hv(a);
|
||
r.set(a, p), a *= 2;
|
||
}
|
||
return r;
|
||
}
|
||
}
|
||
function K0(r) {
|
||
et !== null && typeof et.markCommitStarted == "function" && et.markCommitStarted(r);
|
||
}
|
||
function wu() {
|
||
et !== null && typeof et.markCommitStopped == "function" && et.markCommitStopped();
|
||
}
|
||
function Ss(r) {
|
||
et !== null && typeof et.markComponentRenderStarted == "function" && et.markComponentRenderStarted(r);
|
||
}
|
||
function On() {
|
||
et !== null && typeof et.markComponentRenderStopped == "function" && et.markComponentRenderStopped();
|
||
}
|
||
function Xt(r) {
|
||
et !== null && typeof et.markComponentPassiveEffectMountStarted == "function" && et.markComponentPassiveEffectMountStarted(r);
|
||
}
|
||
function wr() {
|
||
et !== null && typeof et.markComponentPassiveEffectMountStopped == "function" && et.markComponentPassiveEffectMountStopped();
|
||
}
|
||
function lr(r) {
|
||
et !== null && typeof et.markComponentPassiveEffectUnmountStarted == "function" && et.markComponentPassiveEffectUnmountStarted(r);
|
||
}
|
||
function zr() {
|
||
et !== null && typeof et.markComponentPassiveEffectUnmountStopped == "function" && et.markComponentPassiveEffectUnmountStopped();
|
||
}
|
||
function Aa(r) {
|
||
et !== null && typeof et.markComponentLayoutEffectMountStarted == "function" && et.markComponentLayoutEffectMountStarted(r);
|
||
}
|
||
function xl() {
|
||
et !== null && typeof et.markComponentLayoutEffectMountStopped == "function" && et.markComponentLayoutEffectMountStopped();
|
||
}
|
||
function ur(r) {
|
||
et !== null && typeof et.markComponentLayoutEffectUnmountStarted == "function" && et.markComponentLayoutEffectUnmountStarted(r);
|
||
}
|
||
function Sl() {
|
||
et !== null && typeof et.markComponentLayoutEffectUnmountStopped == "function" && et.markComponentLayoutEffectUnmountStopped();
|
||
}
|
||
function bs(r, a, d) {
|
||
et !== null && typeof et.markComponentErrored == "function" && et.markComponentErrored(r, a, d);
|
||
}
|
||
function pd(r, a, d) {
|
||
et !== null && typeof et.markComponentSuspended == "function" && et.markComponentSuspended(r, a, d);
|
||
}
|
||
function yp(r) {
|
||
et !== null && typeof et.markLayoutEffectsStarted == "function" && et.markLayoutEffectsStarted(r);
|
||
}
|
||
function Eu() {
|
||
et !== null && typeof et.markLayoutEffectsStopped == "function" && et.markLayoutEffectsStopped();
|
||
}
|
||
function xa(r) {
|
||
et !== null && typeof et.markPassiveEffectsStarted == "function" && et.markPassiveEffectsStarted(r);
|
||
}
|
||
function xp() {
|
||
et !== null && typeof et.markPassiveEffectsStopped == "function" && et.markPassiveEffectsStopped();
|
||
}
|
||
function hd(r) {
|
||
et !== null && typeof et.markRenderStarted == "function" && et.markRenderStarted(r);
|
||
}
|
||
function ao() {
|
||
et !== null && typeof et.markRenderYielded == "function" && et.markRenderYielded();
|
||
}
|
||
function Cs() {
|
||
et !== null && typeof et.markRenderStopped == "function" && et.markRenderStopped();
|
||
}
|
||
function vd(r) {
|
||
et !== null && typeof et.markRenderScheduled == "function" && et.markRenderScheduled(r);
|
||
}
|
||
function Sp(r, a) {
|
||
et !== null && typeof et.markForceUpdateScheduled == "function" && et.markForceUpdateScheduled(r, a);
|
||
}
|
||
function ki(r, a) {
|
||
et !== null && typeof et.markStateUpdateScheduled == "function" && et.markStateUpdateScheduled(r, a);
|
||
}
|
||
function md(r, a) {
|
||
return r === a && (r !== 0 || 1 / r === 1 / a) || r !== r && a !== a;
|
||
}
|
||
var cr = typeof Object.is == "function" ? Object.is : md, Ya = null, ws = !1, ju = !1;
|
||
function Tu(r) {
|
||
Ya === null ? Ya = [r] : Ya.push(r);
|
||
}
|
||
function gd(r) {
|
||
ws = !0, Tu(r);
|
||
}
|
||
function Ir() {
|
||
ws && Lr();
|
||
}
|
||
function Lr() {
|
||
if (!ju && Ya !== null) {
|
||
ju = !0;
|
||
var r = 0, a = ma();
|
||
try {
|
||
var d = !0, p = Ya;
|
||
for (or(ta); r < p.length; r++) {
|
||
var g = p[r];
|
||
do
|
||
g = g(d);
|
||
while (g !== null);
|
||
}
|
||
Ya = null, ws = !1;
|
||
} catch (C) {
|
||
throw Ya !== null && (Ya = Ya.slice(r + 1)), Cr(ga, Lr), C;
|
||
} finally {
|
||
or(a), ju = !1;
|
||
}
|
||
}
|
||
return null;
|
||
}
|
||
function Na(r) {
|
||
var a = r.current.memoizedState;
|
||
return a.isDehydrated;
|
||
}
|
||
var yr = [], Es = 0, bl = null, Cl = 0, Qa = [], xr = 0, zo = null, Pi = 1, vi = "";
|
||
function js(r) {
|
||
return za(), (r.flags & Jh) !== dt;
|
||
}
|
||
function kv(r) {
|
||
return za(), Cl;
|
||
}
|
||
function Pv() {
|
||
var r = vi, a = Pi, d = a & ~Ov(a);
|
||
return d.toString(32) + r;
|
||
}
|
||
function io(r, a) {
|
||
za(), yr[Es++] = Cl, yr[Es++] = bl, bl = r, Cl = a;
|
||
}
|
||
function Du(r, a, d) {
|
||
za(), Qa[xr++] = Pi, Qa[xr++] = vi, Qa[xr++] = zo, zo = r;
|
||
var p = Pi, g = vi, C = yd(p) - 1, D = p & ~(1 << C), P = d + 1, O = yd(a) + C;
|
||
if (O > 30) {
|
||
var F = C - C % 5, W = (1 << F) - 1, re = (D & W).toString(32), de = D >> F, be = C - F, Re = yd(a) + be, De = P << be, wt = De | de, zt = re + g;
|
||
Pi = 1 << Re | wt, vi = zt;
|
||
} else {
|
||
var Tt = P << C, Cn = Tt | D, ln = g;
|
||
Pi = 1 << O | Cn, vi = ln;
|
||
}
|
||
}
|
||
function bp(r) {
|
||
za();
|
||
var a = r.return;
|
||
if (a !== null) {
|
||
var d = 1, p = 0;
|
||
io(r, d), Du(r, d, p);
|
||
}
|
||
}
|
||
function yd(r) {
|
||
return 32 - Gc(r);
|
||
}
|
||
function Ov(r) {
|
||
return 1 << yd(r) - 1;
|
||
}
|
||
function xd(r) {
|
||
for (; r === bl; )
|
||
bl = yr[--Es], yr[Es] = null, Cl = yr[--Es], yr[Es] = null;
|
||
for (; r === zo; )
|
||
zo = Qa[--xr], Qa[xr] = null, vi = Qa[--xr], Qa[xr] = null, Pi = Qa[--xr], Qa[xr] = null;
|
||
}
|
||
function Ts() {
|
||
return za(), zo !== null ? {
|
||
id: Pi,
|
||
overflow: vi
|
||
} : null;
|
||
}
|
||
function Z0(r, a) {
|
||
za(), Qa[xr++] = Pi, Qa[xr++] = vi, Qa[xr++] = zo, Pi = a.id, vi = a.overflow, zo = r;
|
||
}
|
||
function za() {
|
||
v() || m("Expected to be hydrating. This is a bug in React. Please file an issue.");
|
||
}
|
||
var Er = null, nn = null, mi = !1, oo = !1, Io = null;
|
||
function J0() {
|
||
mi && m("We should not be hydrating here. This is a bug in React. Please file a bug.");
|
||
}
|
||
function Cp() {
|
||
oo = !0;
|
||
}
|
||
function Av() {
|
||
return oo;
|
||
}
|
||
function $0(r) {
|
||
if (!Qr)
|
||
return !1;
|
||
var a = r.stateNode.containerInfo;
|
||
return nn = Ga(a), Er = r, mi = !0, Io = null, oo = !1, !0;
|
||
}
|
||
function Xa(r, a, d) {
|
||
return Qr ? (nn = Un(a), Er = r, mi = !0, Io = null, oo = !1, d !== null && Z0(r, d), !0) : !1;
|
||
}
|
||
function Sd(r, a) {
|
||
switch (r.tag) {
|
||
case J: {
|
||
G0(r.stateNode.containerInfo, a);
|
||
break;
|
||
}
|
||
case H: {
|
||
var d = (r.mode & Zt) !== Mt;
|
||
q0(
|
||
r.type,
|
||
r.memoizedProps,
|
||
r.stateNode,
|
||
a,
|
||
// TODO: Delete this argument when we remove the legacy root API.
|
||
d
|
||
);
|
||
break;
|
||
}
|
||
case te: {
|
||
var p = r.memoizedState;
|
||
p.dehydrated !== null && Oc(p.dehydrated, a);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function Nv(r, a) {
|
||
Sd(r, a);
|
||
var d = oR();
|
||
d.stateNode = a, d.return = r;
|
||
var p = r.deletions;
|
||
p === null ? (r.deletions = [d], r.flags |= da) : p.push(d);
|
||
}
|
||
function Oi(r, a) {
|
||
{
|
||
if (oo)
|
||
return;
|
||
switch (r.tag) {
|
||
case J: {
|
||
var d = r.stateNode.containerInfo;
|
||
switch (a.tag) {
|
||
case H:
|
||
var p = a.type, g = a.pendingProps;
|
||
ui(d, p, g);
|
||
break;
|
||
case le:
|
||
var C = a.pendingProps;
|
||
Ac(d, C);
|
||
break;
|
||
case te:
|
||
Nc(d);
|
||
break;
|
||
}
|
||
break;
|
||
}
|
||
case H: {
|
||
var D = r.type, P = r.memoizedProps, O = r.stateNode;
|
||
switch (a.tag) {
|
||
case H: {
|
||
var F = a.type, W = a.pendingProps, re = (r.mode & Zt) !== Mt;
|
||
uv(
|
||
D,
|
||
P,
|
||
O,
|
||
F,
|
||
W,
|
||
// TODO: Delete this argument when we remove the legacy root API.
|
||
re
|
||
);
|
||
break;
|
||
}
|
||
case le: {
|
||
var de = a.pendingProps, be = (r.mode & Zt) !== Mt;
|
||
Xf(
|
||
D,
|
||
P,
|
||
O,
|
||
de,
|
||
// TODO: Delete this argument when we remove the legacy root API.
|
||
be
|
||
);
|
||
break;
|
||
}
|
||
case te: {
|
||
Kf(D, P, O);
|
||
break;
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case te: {
|
||
var Re = r.memoizedState, De = Re.dehydrated;
|
||
if (De !== null)
|
||
switch (a.tag) {
|
||
case H:
|
||
var wt = a.type, zt = a.pendingProps;
|
||
rl(De, wt, zt);
|
||
break;
|
||
case le:
|
||
var Tt = a.pendingProps;
|
||
Yf(De, Tt);
|
||
break;
|
||
case te:
|
||
Qf(De);
|
||
break;
|
||
}
|
||
break;
|
||
}
|
||
default:
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
function Mu(r, a) {
|
||
a.flags = a.flags & ~Gi | jn, Oi(r, a);
|
||
}
|
||
function Lo(r, a) {
|
||
switch (r.tag) {
|
||
case H: {
|
||
var d = r.type, p = r.pendingProps, g = Wa(a, d, p);
|
||
return g !== null ? (r.stateNode = g, Er = r, nn = Ra(g), !0) : !1;
|
||
}
|
||
case le: {
|
||
var C = r.pendingProps, D = fs(a, C);
|
||
return D !== null ? (r.stateNode = D, Er = r, nn = null, !0) : !1;
|
||
}
|
||
case te: {
|
||
var P = Xi(a);
|
||
if (P !== null) {
|
||
var O = {
|
||
dehydrated: P,
|
||
treeContext: Ts(),
|
||
retryLane: va
|
||
};
|
||
r.memoizedState = O;
|
||
var F = sR(P);
|
||
return F.return = r, r.child = F, Er = r, nn = null, !0;
|
||
}
|
||
return !1;
|
||
}
|
||
default:
|
||
return !1;
|
||
}
|
||
}
|
||
function wl(r) {
|
||
return (r.mode & Zt) !== Mt && (r.flags & sn) === dt;
|
||
}
|
||
function Ru(r) {
|
||
throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.");
|
||
}
|
||
function ku(r) {
|
||
if (mi) {
|
||
var a = nn;
|
||
if (!a) {
|
||
wl(r) && (Oi(Er, r), Ru()), Mu(Er, r), mi = !1, Er = r;
|
||
return;
|
||
}
|
||
var d = a;
|
||
if (!Lo(r, a)) {
|
||
wl(r) && (Oi(Er, r), Ru()), a = tl(d);
|
||
var p = Er;
|
||
if (!a || !Lo(r, a)) {
|
||
Mu(Er, r), mi = !1, Er = r;
|
||
return;
|
||
}
|
||
Nv(p, d);
|
||
}
|
||
}
|
||
}
|
||
function e1(r, a, d) {
|
||
if (!Qr)
|
||
throw new Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");
|
||
var p = r.stateNode, g = !oo, C = cu(p, r.type, r.memoizedProps, a, d, r, g);
|
||
return r.updateQueue = C, C !== null;
|
||
}
|
||
function zv(r) {
|
||
if (!Qr)
|
||
throw new Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");
|
||
var a = r.stateNode, d = r.memoizedProps, p = !oo, g = li(a, d, r, p);
|
||
if (g) {
|
||
var C = Er;
|
||
if (C !== null)
|
||
switch (C.tag) {
|
||
case J: {
|
||
var D = C.stateNode.containerInfo, P = (C.mode & Zt) !== Mt;
|
||
nl(
|
||
D,
|
||
a,
|
||
d,
|
||
// TODO: Delete this argument when we remove the legacy root API.
|
||
P
|
||
);
|
||
break;
|
||
}
|
||
case H: {
|
||
var O = C.type, F = C.memoizedProps, W = C.stateNode, re = (C.mode & Zt) !== Mt;
|
||
qf(
|
||
O,
|
||
F,
|
||
W,
|
||
a,
|
||
d,
|
||
// TODO: Delete this argument when we remove the legacy root API.
|
||
re
|
||
);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
return g;
|
||
}
|
||
function Iv(r) {
|
||
if (!Qr)
|
||
throw new Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");
|
||
var a = r.memoizedState, d = a !== null ? a.dehydrated : null;
|
||
if (!d)
|
||
throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
|
||
iv(d, r);
|
||
}
|
||
function Lv(r) {
|
||
if (!Qr)
|
||
throw new Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");
|
||
var a = r.memoizedState, d = a !== null ? a.dehydrated : null;
|
||
if (!d)
|
||
throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
|
||
return ov(d);
|
||
}
|
||
function wp(r) {
|
||
for (var a = r.return; a !== null && a.tag !== H && a.tag !== J && a.tag !== te; )
|
||
a = a.return;
|
||
Er = a;
|
||
}
|
||
function Ds(r) {
|
||
if (!Qr || r !== Er)
|
||
return !1;
|
||
if (!mi)
|
||
return wp(r), mi = !0, !1;
|
||
if (r.tag !== J && (r.tag !== H || lv(r.type) && !Tc(r.type, r.memoizedProps))) {
|
||
var a = nn;
|
||
if (a)
|
||
if (wl(r))
|
||
Fv(r), Ru();
|
||
else
|
||
for (; a; )
|
||
Nv(r, a), a = tl(a);
|
||
}
|
||
return wp(r), r.tag === te ? nn = Lv(r) : nn = Er ? tl(r.stateNode) : null, !0;
|
||
}
|
||
function t1() {
|
||
return mi && nn !== null;
|
||
}
|
||
function Fv(r) {
|
||
for (var a = nn; a; )
|
||
Sd(r, a), a = tl(a);
|
||
}
|
||
function s() {
|
||
Qr && (Er = null, nn = null, mi = !1, oo = !1);
|
||
}
|
||
function u() {
|
||
Io !== null && (J4(Io), Io = null);
|
||
}
|
||
function v() {
|
||
return mi;
|
||
}
|
||
function S(r) {
|
||
Io === null ? Io = [r] : Io.push(r);
|
||
}
|
||
var w = l.ReactCurrentBatchConfig, T = null;
|
||
function N() {
|
||
return w.transition;
|
||
}
|
||
function X(r, a) {
|
||
if (cr(r, a))
|
||
return !0;
|
||
if (typeof r != "object" || r === null || typeof a != "object" || a === null)
|
||
return !1;
|
||
var d = Object.keys(r), p = Object.keys(a);
|
||
if (d.length !== p.length)
|
||
return !1;
|
||
for (var g = 0; g < d.length; g++) {
|
||
var C = d[g];
|
||
if (!du.call(a, C) || !cr(r[C], a[C]))
|
||
return !1;
|
||
}
|
||
return !0;
|
||
}
|
||
function fe(r) {
|
||
switch (r._debugOwner && r._debugOwner.type, r._debugSource, r.tag) {
|
||
case H:
|
||
return Ji(r.type);
|
||
case we:
|
||
return Ji("Lazy");
|
||
case te:
|
||
return Ji("Suspense");
|
||
case ve:
|
||
return Ji("SuspenseList");
|
||
case U:
|
||
case q:
|
||
case ne:
|
||
return Hc(r.type);
|
||
case $:
|
||
return Hc(r.type.render);
|
||
case B:
|
||
return cv(r.type);
|
||
default:
|
||
return "";
|
||
}
|
||
}
|
||
function Ue(r) {
|
||
try {
|
||
var a = "", d = r;
|
||
do
|
||
a += fe(d), d = d.return;
|
||
while (d);
|
||
return a;
|
||
} catch (p) {
|
||
return `
|
||
Error generating stack: ` + p.message + `
|
||
` + p.stack;
|
||
}
|
||
}
|
||
var gt = l.ReactDebugCurrentFrame, jt = null, nt = !1;
|
||
function In() {
|
||
{
|
||
if (jt === null)
|
||
return null;
|
||
var r = jt._debugOwner;
|
||
if (r !== null && typeof r < "u")
|
||
return vt(r);
|
||
}
|
||
return null;
|
||
}
|
||
function Dn() {
|
||
return jt === null ? "" : Ue(jt);
|
||
}
|
||
function Sn() {
|
||
gt.getCurrentStack = null, jt = null, nt = !1;
|
||
}
|
||
function gn(r) {
|
||
gt.getCurrentStack = r === null ? null : Dn, jt = r, nt = !1;
|
||
}
|
||
function ue() {
|
||
return jt;
|
||
}
|
||
function K(r) {
|
||
nt = r;
|
||
}
|
||
var pe = {
|
||
recordUnsafeLifecycleWarnings: function(r, a) {
|
||
},
|
||
flushPendingUnsafeLifecycleWarnings: function() {
|
||
},
|
||
recordLegacyContextWarning: function(r, a) {
|
||
},
|
||
flushLegacyContextWarning: function() {
|
||
},
|
||
discardPendingWarnings: function() {
|
||
}
|
||
};
|
||
{
|
||
var st = function(r) {
|
||
for (var a = null, d = r; d !== null; )
|
||
d.mode & hn && (a = d), d = d.return;
|
||
return a;
|
||
}, Ct = function(r) {
|
||
var a = [];
|
||
return r.forEach(function(d) {
|
||
a.push(d);
|
||
}), a.sort().join(", ");
|
||
}, _t = [], It = [], $t = [], Kn = [], en = [], Ka = [], Ms = /* @__PURE__ */ new Set();
|
||
pe.recordUnsafeLifecycleWarnings = function(r, a) {
|
||
Ms.has(r.type) || (typeof a.componentWillMount == "function" && // Don't warn about react-lifecycles-compat polyfilled components.
|
||
a.componentWillMount.__suppressDeprecationWarning !== !0 && _t.push(r), r.mode & hn && typeof a.UNSAFE_componentWillMount == "function" && It.push(r), typeof a.componentWillReceiveProps == "function" && a.componentWillReceiveProps.__suppressDeprecationWarning !== !0 && $t.push(r), r.mode & hn && typeof a.UNSAFE_componentWillReceiveProps == "function" && Kn.push(r), typeof a.componentWillUpdate == "function" && a.componentWillUpdate.__suppressDeprecationWarning !== !0 && en.push(r), r.mode & hn && typeof a.UNSAFE_componentWillUpdate == "function" && Ka.push(r));
|
||
}, pe.flushPendingUnsafeLifecycleWarnings = function() {
|
||
var r = /* @__PURE__ */ new Set();
|
||
_t.length > 0 && (_t.forEach(function(de) {
|
||
r.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), _t = []);
|
||
var a = /* @__PURE__ */ new Set();
|
||
It.length > 0 && (It.forEach(function(de) {
|
||
a.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), It = []);
|
||
var d = /* @__PURE__ */ new Set();
|
||
$t.length > 0 && ($t.forEach(function(de) {
|
||
d.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), $t = []);
|
||
var p = /* @__PURE__ */ new Set();
|
||
Kn.length > 0 && (Kn.forEach(function(de) {
|
||
p.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), Kn = []);
|
||
var g = /* @__PURE__ */ new Set();
|
||
en.length > 0 && (en.forEach(function(de) {
|
||
g.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), en = []);
|
||
var C = /* @__PURE__ */ new Set();
|
||
if (Ka.length > 0 && (Ka.forEach(function(de) {
|
||
C.add(vt(de) || "Component"), Ms.add(de.type);
|
||
}), Ka = []), a.size > 0) {
|
||
var D = Ct(a);
|
||
m(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
|
||
Please update the following components: %s`, D);
|
||
}
|
||
if (p.size > 0) {
|
||
var P = Ct(p);
|
||
m(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
||
|
||
Please update the following components: %s`, P);
|
||
}
|
||
if (C.size > 0) {
|
||
var O = Ct(C);
|
||
m(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
|
||
Please update the following components: %s`, O);
|
||
}
|
||
if (r.size > 0) {
|
||
var F = Ct(r);
|
||
y(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
||
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`, F);
|
||
}
|
||
if (d.size > 0) {
|
||
var W = Ct(d);
|
||
y(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
||
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`, W);
|
||
}
|
||
if (g.size > 0) {
|
||
var re = Ct(g);
|
||
y(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
||
|
||
* Move data fetching code or side effects to componentDidUpdate.
|
||
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
||
|
||
Please update the following components: %s`, re);
|
||
}
|
||
};
|
||
var Bv = /* @__PURE__ */ new Map(), nC = /* @__PURE__ */ new Set();
|
||
pe.recordLegacyContextWarning = function(r, a) {
|
||
var d = st(r);
|
||
if (d === null) {
|
||
m("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");
|
||
return;
|
||
}
|
||
if (!nC.has(r.type)) {
|
||
var p = Bv.get(d);
|
||
(r.type.contextTypes != null || r.type.childContextTypes != null || a !== null && typeof a.getChildContext == "function") && (p === void 0 && (p = [], Bv.set(d, p)), p.push(r));
|
||
}
|
||
}, pe.flushLegacyContextWarning = function() {
|
||
Bv.forEach(function(r, a) {
|
||
if (r.length !== 0) {
|
||
var d = r[0], p = /* @__PURE__ */ new Set();
|
||
r.forEach(function(C) {
|
||
p.add(vt(C) || "Component"), nC.add(C.type);
|
||
});
|
||
var g = Ct(p);
|
||
try {
|
||
gn(d), m(`Legacy context API has been detected within a strict-mode tree.
|
||
|
||
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
||
|
||
Please update the following components: %s
|
||
|
||
Learn more about this warning here: https://reactjs.org/link/legacy-context`, g);
|
||
} finally {
|
||
Sn();
|
||
}
|
||
}
|
||
});
|
||
}, pe.discardPendingWarnings = function() {
|
||
_t = [], It = [], $t = [], Kn = [], en = [], Ka = [], Bv = /* @__PURE__ */ new Map();
|
||
};
|
||
}
|
||
function rC(r) {
|
||
{
|
||
var a = typeof Symbol == "function" && Symbol.toStringTag, d = a && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
||
return d;
|
||
}
|
||
}
|
||
function aC(r) {
|
||
try {
|
||
return n1(r), !1;
|
||
} catch {
|
||
return !0;
|
||
}
|
||
}
|
||
function n1(r) {
|
||
return "" + r;
|
||
}
|
||
function QM(r) {
|
||
if (aC(r))
|
||
return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rC(r)), n1(r);
|
||
}
|
||
function XM(r, a) {
|
||
if (aC(r))
|
||
return m("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", a, rC(r)), n1(r);
|
||
}
|
||
function so(r, a) {
|
||
if (r && r.defaultProps) {
|
||
var d = b({}, a), p = r.defaultProps;
|
||
for (var g in p)
|
||
d[g] === void 0 && (d[g] = p[g]);
|
||
return d;
|
||
}
|
||
return a;
|
||
}
|
||
var _v = Pa(null), Ep;
|
||
Ep = {};
|
||
var Uv = null, bd = null, r1 = null, Hv = !1;
|
||
function Vv() {
|
||
Uv = null, bd = null, r1 = null, Hv = !1;
|
||
}
|
||
function iC() {
|
||
Hv = !0;
|
||
}
|
||
function oC() {
|
||
Hv = !1;
|
||
}
|
||
function sC(r, a, d) {
|
||
Dc ? (pr(_v, a._currentValue, r), a._currentValue = d, a._currentRenderer !== void 0 && a._currentRenderer !== null && a._currentRenderer !== Ep && m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."), a._currentRenderer = Ep) : (pr(_v, a._currentValue2, r), a._currentValue2 = d, a._currentRenderer2 !== void 0 && a._currentRenderer2 !== null && a._currentRenderer2 !== Ep && m("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."), a._currentRenderer2 = Ep);
|
||
}
|
||
function a1(r, a) {
|
||
var d = _v.current;
|
||
zn(_v, a), Dc ? r._currentValue = d : r._currentValue2 = d;
|
||
}
|
||
function i1(r, a, d) {
|
||
for (var p = r; p !== null; ) {
|
||
var g = p.alternate;
|
||
if (hl(p.childLanes, a) ? g !== null && !hl(g.childLanes, a) && (g.childLanes = kt(g.childLanes, a)) : (p.childLanes = kt(p.childLanes, a), g !== null && (g.childLanes = kt(g.childLanes, a))), p === d)
|
||
break;
|
||
p = p.return;
|
||
}
|
||
p !== d && m("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
function KM(r, a, d) {
|
||
ZM(r, a, d);
|
||
}
|
||
function ZM(r, a, d) {
|
||
var p = r.child;
|
||
for (p !== null && (p.return = r); p !== null; ) {
|
||
var g = void 0, C = p.dependencies;
|
||
if (C !== null) {
|
||
g = p.child;
|
||
for (var D = C.firstContext; D !== null; ) {
|
||
if (D.context === a) {
|
||
if (p.tag === B) {
|
||
var P = gs(d), O = Rs(Tn, P);
|
||
O.tag = Gv;
|
||
var F = p.updateQueue;
|
||
if (F !== null) {
|
||
var W = F.shared, re = W.pending;
|
||
re === null ? O.next = O : (O.next = re.next, re.next = O), W.pending = O;
|
||
}
|
||
}
|
||
p.lanes = kt(p.lanes, d);
|
||
var de = p.alternate;
|
||
de !== null && (de.lanes = kt(de.lanes, d)), i1(p.return, d, r), C.lanes = kt(C.lanes, d);
|
||
break;
|
||
}
|
||
D = D.next;
|
||
}
|
||
} else if (p.tag === xe)
|
||
g = p.type === r.type ? null : p.child;
|
||
else if (p.tag === se) {
|
||
var be = p.return;
|
||
if (be === null)
|
||
throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");
|
||
be.lanes = kt(be.lanes, d);
|
||
var Re = be.alternate;
|
||
Re !== null && (Re.lanes = kt(Re.lanes, d)), i1(be, d, r), g = p.sibling;
|
||
} else
|
||
g = p.child;
|
||
if (g !== null)
|
||
g.return = p;
|
||
else
|
||
for (g = p; g !== null; ) {
|
||
if (g === r) {
|
||
g = null;
|
||
break;
|
||
}
|
||
var De = g.sibling;
|
||
if (De !== null) {
|
||
De.return = g.return, g = De;
|
||
break;
|
||
}
|
||
g = g.return;
|
||
}
|
||
p = g;
|
||
}
|
||
}
|
||
function Cd(r, a) {
|
||
Uv = r, bd = null, r1 = null;
|
||
var d = r.dependencies;
|
||
if (d !== null) {
|
||
var p = d.firstContext;
|
||
p !== null && (er(d.lanes, a) && Bp(), d.firstContext = null);
|
||
}
|
||
}
|
||
function jr(r) {
|
||
Hv && m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
|
||
var a = Dc ? r._currentValue : r._currentValue2;
|
||
if (r1 !== r) {
|
||
var d = {
|
||
context: r,
|
||
memoizedValue: a,
|
||
next: null
|
||
};
|
||
if (bd === null) {
|
||
if (Uv === null)
|
||
throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
|
||
bd = d, Uv.dependencies = {
|
||
lanes: Me,
|
||
firstContext: d
|
||
};
|
||
} else
|
||
bd = bd.next = d;
|
||
}
|
||
return a;
|
||
}
|
||
var Pu = null;
|
||
function o1(r) {
|
||
Pu === null ? Pu = [r] : Pu.push(r);
|
||
}
|
||
function JM() {
|
||
if (Pu !== null) {
|
||
for (var r = 0; r < Pu.length; r++) {
|
||
var a = Pu[r], d = a.interleaved;
|
||
if (d !== null) {
|
||
a.interleaved = null;
|
||
var p = d.next, g = a.pending;
|
||
if (g !== null) {
|
||
var C = g.next;
|
||
g.next = p, d.next = C;
|
||
}
|
||
a.pending = d;
|
||
}
|
||
}
|
||
Pu = null;
|
||
}
|
||
}
|
||
function lC(r, a, d, p) {
|
||
var g = a.interleaved;
|
||
return g === null ? (d.next = d, o1(a)) : (d.next = g.next, g.next = d), a.interleaved = d, Wv(r, p);
|
||
}
|
||
function $M(r, a, d, p) {
|
||
var g = a.interleaved;
|
||
g === null ? (d.next = d, o1(a)) : (d.next = g.next, g.next = d), a.interleaved = d;
|
||
}
|
||
function e7(r, a, d, p) {
|
||
var g = a.interleaved;
|
||
return g === null ? (d.next = d, o1(a)) : (d.next = g.next, g.next = d), a.interleaved = d, Wv(r, p);
|
||
}
|
||
function Ia(r, a) {
|
||
return Wv(r, a);
|
||
}
|
||
var t7 = Wv;
|
||
function Wv(r, a) {
|
||
r.lanes = kt(r.lanes, a);
|
||
var d = r.alternate;
|
||
d !== null && (d.lanes = kt(d.lanes, a)), d === null && (r.flags & (jn | Gi)) !== dt && u3(r);
|
||
for (var p = r, g = r.return; g !== null; )
|
||
g.childLanes = kt(g.childLanes, a), d = g.alternate, d !== null ? d.childLanes = kt(d.childLanes, a) : (g.flags & (jn | Gi)) !== dt && u3(r), p = g, g = g.return;
|
||
if (p.tag === J) {
|
||
var C = p.stateNode;
|
||
return C;
|
||
} else
|
||
return null;
|
||
}
|
||
var uC = 0, cC = 1, Gv = 2, s1 = 3, qv = !1, l1, Yv;
|
||
l1 = !1, Yv = null;
|
||
function u1(r) {
|
||
var a = {
|
||
baseState: r.memoizedState,
|
||
firstBaseUpdate: null,
|
||
lastBaseUpdate: null,
|
||
shared: {
|
||
pending: null,
|
||
interleaved: null,
|
||
lanes: Me
|
||
},
|
||
effects: null
|
||
};
|
||
r.updateQueue = a;
|
||
}
|
||
function dC(r, a) {
|
||
var d = a.updateQueue, p = r.updateQueue;
|
||
if (d === p) {
|
||
var g = {
|
||
baseState: p.baseState,
|
||
firstBaseUpdate: p.firstBaseUpdate,
|
||
lastBaseUpdate: p.lastBaseUpdate,
|
||
shared: p.shared,
|
||
effects: p.effects
|
||
};
|
||
a.updateQueue = g;
|
||
}
|
||
}
|
||
function Rs(r, a) {
|
||
var d = {
|
||
eventTime: r,
|
||
lane: a,
|
||
tag: uC,
|
||
payload: null,
|
||
callback: null,
|
||
next: null
|
||
};
|
||
return d;
|
||
}
|
||
function El(r, a, d) {
|
||
var p = r.updateQueue;
|
||
if (p === null)
|
||
return null;
|
||
var g = p.shared;
|
||
if (Yv === g && !l1 && (m("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."), l1 = !0), h8()) {
|
||
var C = g.pending;
|
||
return C === null ? a.next = a : (a.next = C.next, C.next = a), g.pending = a, t7(r, d);
|
||
} else
|
||
return e7(r, g, a, d);
|
||
}
|
||
function Qv(r, a, d) {
|
||
var p = a.updateQueue;
|
||
if (p !== null) {
|
||
var g = p.shared;
|
||
if (id(d)) {
|
||
var C = g.lanes;
|
||
C = vl(C, r.pendingLanes);
|
||
var D = kt(C, d);
|
||
g.lanes = D, dp(r, D);
|
||
}
|
||
}
|
||
}
|
||
function c1(r, a) {
|
||
var d = r.updateQueue, p = r.alternate;
|
||
if (p !== null) {
|
||
var g = p.updateQueue;
|
||
if (d === g) {
|
||
var C = null, D = null, P = d.firstBaseUpdate;
|
||
if (P !== null) {
|
||
var O = P;
|
||
do {
|
||
var F = {
|
||
eventTime: O.eventTime,
|
||
lane: O.lane,
|
||
tag: O.tag,
|
||
payload: O.payload,
|
||
callback: O.callback,
|
||
next: null
|
||
};
|
||
D === null ? C = D = F : (D.next = F, D = F), O = O.next;
|
||
} while (O !== null);
|
||
D === null ? C = D = a : (D.next = a, D = a);
|
||
} else
|
||
C = D = a;
|
||
d = {
|
||
baseState: g.baseState,
|
||
firstBaseUpdate: C,
|
||
lastBaseUpdate: D,
|
||
shared: g.shared,
|
||
effects: g.effects
|
||
}, r.updateQueue = d;
|
||
return;
|
||
}
|
||
}
|
||
var W = d.lastBaseUpdate;
|
||
W === null ? d.firstBaseUpdate = a : W.next = a, d.lastBaseUpdate = a;
|
||
}
|
||
function n7(r, a, d, p, g, C) {
|
||
switch (d.tag) {
|
||
case cC: {
|
||
var D = d.payload;
|
||
if (typeof D == "function") {
|
||
iC();
|
||
var P = D.call(C, p, g);
|
||
{
|
||
if (r.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
D.call(C, p, g);
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
oC();
|
||
}
|
||
return P;
|
||
}
|
||
return D;
|
||
}
|
||
case s1:
|
||
r.flags = r.flags & ~$r | sn;
|
||
case uC: {
|
||
var O = d.payload, F;
|
||
if (typeof O == "function") {
|
||
iC(), F = O.call(C, p, g);
|
||
{
|
||
if (r.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
O.call(C, p, g);
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
oC();
|
||
}
|
||
} else
|
||
F = O;
|
||
return F == null ? p : b({}, p, F);
|
||
}
|
||
case Gv:
|
||
return qv = !0, p;
|
||
}
|
||
return p;
|
||
}
|
||
function Xv(r, a, d, p) {
|
||
var g = r.updateQueue;
|
||
qv = !1, Yv = g.shared;
|
||
var C = g.firstBaseUpdate, D = g.lastBaseUpdate, P = g.shared.pending;
|
||
if (P !== null) {
|
||
g.shared.pending = null;
|
||
var O = P, F = O.next;
|
||
O.next = null, D === null ? C = F : D.next = F, D = O;
|
||
var W = r.alternate;
|
||
if (W !== null) {
|
||
var re = W.updateQueue, de = re.lastBaseUpdate;
|
||
de !== D && (de === null ? re.firstBaseUpdate = F : de.next = F, re.lastBaseUpdate = O);
|
||
}
|
||
}
|
||
if (C !== null) {
|
||
var be = g.baseState, Re = Me, De = null, wt = null, zt = null, Tt = C;
|
||
do {
|
||
var Cn = Tt.lane, ln = Tt.eventTime;
|
||
if (hl(p, Cn)) {
|
||
if (zt !== null) {
|
||
var ye = {
|
||
eventTime: ln,
|
||
// This update is going to be committed so we never want uncommit
|
||
// it. Using NoLane works because 0 is a subset of all bitmasks, so
|
||
// this will never be skipped by the check above.
|
||
lane: vr,
|
||
tag: Tt.tag,
|
||
payload: Tt.payload,
|
||
callback: Tt.callback,
|
||
next: null
|
||
};
|
||
zt = zt.next = ye;
|
||
}
|
||
be = n7(r, g, Tt, be, a, d);
|
||
var ie = Tt.callback;
|
||
if (ie !== null && // If the update was already committed, we should not queue its
|
||
// callback again.
|
||
Tt.lane !== vr) {
|
||
r.flags |= bc;
|
||
var Ge = g.effects;
|
||
Ge === null ? g.effects = [Tt] : Ge.push(Tt);
|
||
}
|
||
} else {
|
||
var oe = {
|
||
eventTime: ln,
|
||
lane: Cn,
|
||
tag: Tt.tag,
|
||
payload: Tt.payload,
|
||
callback: Tt.callback,
|
||
next: null
|
||
};
|
||
zt === null ? (wt = zt = oe, De = be) : zt = zt.next = oe, Re = kt(Re, Cn);
|
||
}
|
||
if (Tt = Tt.next, Tt === null) {
|
||
if (P = g.shared.pending, P === null)
|
||
break;
|
||
var bt = P, ut = bt.next;
|
||
bt.next = null, Tt = ut, g.lastBaseUpdate = bt, g.shared.pending = null;
|
||
}
|
||
} while (!0);
|
||
zt === null && (De = be), g.baseState = De, g.firstBaseUpdate = wt, g.lastBaseUpdate = zt;
|
||
var rn = g.shared.interleaved;
|
||
if (rn !== null) {
|
||
var Lt = rn;
|
||
do
|
||
Re = kt(Re, Lt.lane), Lt = Lt.next;
|
||
while (Lt !== rn);
|
||
} else
|
||
C === null && (g.shared.lanes = Me);
|
||
$p(Re), r.lanes = Re, r.memoizedState = be;
|
||
}
|
||
Yv = null;
|
||
}
|
||
function r7(r, a) {
|
||
if (typeof r != "function")
|
||
throw new Error("Invalid argument passed as callback. Expected a function. Instead " + ("received: " + r));
|
||
r.call(a);
|
||
}
|
||
function fC() {
|
||
qv = !1;
|
||
}
|
||
function Kv() {
|
||
return qv;
|
||
}
|
||
function pC(r, a, d) {
|
||
var p = a.effects;
|
||
if (a.effects = null, p !== null)
|
||
for (var g = 0; g < p.length; g++) {
|
||
var C = p[g], D = C.callback;
|
||
D !== null && (C.callback = null, r7(D, d));
|
||
}
|
||
}
|
||
var d1 = {}, hC = new i.Component().refs, f1, p1, h1, v1, m1, vC, Zv, g1, y1, x1;
|
||
{
|
||
f1 = /* @__PURE__ */ new Set(), p1 = /* @__PURE__ */ new Set(), h1 = /* @__PURE__ */ new Set(), v1 = /* @__PURE__ */ new Set(), g1 = /* @__PURE__ */ new Set(), m1 = /* @__PURE__ */ new Set(), y1 = /* @__PURE__ */ new Set(), x1 = /* @__PURE__ */ new Set();
|
||
var mC = /* @__PURE__ */ new Set();
|
||
Zv = function(r, a) {
|
||
if (!(r === null || typeof r == "function")) {
|
||
var d = a + "_" + r;
|
||
mC.has(d) || (mC.add(d), m("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", a, r));
|
||
}
|
||
}, vC = function(r, a) {
|
||
if (a === void 0) {
|
||
var d = yt(r) || "Component";
|
||
m1.has(d) || (m1.add(d), m("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", d));
|
||
}
|
||
}, Object.defineProperty(d1, "_processChildContext", {
|
||
enumerable: !1,
|
||
value: function() {
|
||
throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).");
|
||
}
|
||
}), Object.freeze(d1);
|
||
}
|
||
function S1(r, a, d, p) {
|
||
var g = r.memoizedState, C = d(p, g);
|
||
{
|
||
if (r.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
C = d(p, g);
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
vC(a, C);
|
||
}
|
||
var D = C == null ? g : b({}, g, C);
|
||
if (r.memoizedState = D, r.lanes === Me) {
|
||
var P = r.updateQueue;
|
||
P.baseState = D;
|
||
}
|
||
}
|
||
var b1 = {
|
||
isMounted: Pf,
|
||
enqueueSetState: function(r, a, d) {
|
||
var p = E(r), g = ba(), C = Pl(p), D = Rs(g, C);
|
||
D.payload = a, d != null && (Zv(d, "setState"), D.callback = d);
|
||
var P = El(p, D, C);
|
||
P !== null && (Dr(P, p, C, g), Qv(P, p, C)), ki(p, C);
|
||
},
|
||
enqueueReplaceState: function(r, a, d) {
|
||
var p = E(r), g = ba(), C = Pl(p), D = Rs(g, C);
|
||
D.tag = cC, D.payload = a, d != null && (Zv(d, "replaceState"), D.callback = d);
|
||
var P = El(p, D, C);
|
||
P !== null && (Dr(P, p, C, g), Qv(P, p, C)), ki(p, C);
|
||
},
|
||
enqueueForceUpdate: function(r, a) {
|
||
var d = E(r), p = ba(), g = Pl(d), C = Rs(p, g);
|
||
C.tag = Gv, a != null && (Zv(a, "forceUpdate"), C.callback = a);
|
||
var D = El(d, C, g);
|
||
D !== null && (Dr(D, d, g, p), Qv(D, d, g)), Sp(d, g);
|
||
}
|
||
};
|
||
function gC(r, a, d, p, g, C, D) {
|
||
var P = r.stateNode;
|
||
if (typeof P.shouldComponentUpdate == "function") {
|
||
var O = P.shouldComponentUpdate(p, C, D);
|
||
{
|
||
if (r.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
O = P.shouldComponentUpdate(p, C, D);
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
O === void 0 && m("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", yt(a) || "Component");
|
||
}
|
||
return O;
|
||
}
|
||
return a.prototype && a.prototype.isPureReactComponent ? !X(d, p) || !X(g, C) : !0;
|
||
}
|
||
function a7(r, a, d) {
|
||
var p = r.stateNode;
|
||
{
|
||
var g = yt(a) || "Component", C = p.render;
|
||
C || (a.prototype && typeof a.prototype.render == "function" ? m("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?", g) : m("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.", g)), p.getInitialState && !p.getInitialState.isReactClassApproved && !p.state && m("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", g), p.getDefaultProps && !p.getDefaultProps.isReactClassApproved && m("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", g), p.propTypes && m("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.", g), p.contextType && m("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", g), p.contextTypes && m("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", g), a.contextType && a.contextTypes && !y1.has(a) && (y1.add(a), m("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", g)), typeof p.componentShouldUpdate == "function" && m("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", g), a.prototype && a.prototype.isPureReactComponent && typeof p.shouldComponentUpdate < "u" && m("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", yt(a) || "A pure component"), typeof p.componentDidUnmount == "function" && m("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", g), typeof p.componentDidReceiveProps == "function" && m("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", g), typeof p.componentWillRecieveProps == "function" && m("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", g), typeof p.UNSAFE_componentWillRecieveProps == "function" && m("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", g);
|
||
var D = p.props !== d;
|
||
p.props !== void 0 && D && m("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", g, g), p.defaultProps && m("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", g, g), typeof p.getSnapshotBeforeUpdate == "function" && typeof p.componentDidUpdate != "function" && !h1.has(a) && (h1.add(a), m("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", yt(a))), typeof p.getDerivedStateFromProps == "function" && m("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", g), typeof p.getDerivedStateFromError == "function" && m("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", g), typeof a.getSnapshotBeforeUpdate == "function" && m("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", g);
|
||
var P = p.state;
|
||
P && (typeof P != "object" || Kt(P)) && m("%s.state: must be set to an object or null", g), typeof p.getChildContext == "function" && typeof a.childContextTypes != "object" && m("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", g);
|
||
}
|
||
}
|
||
function yC(r, a) {
|
||
a.updater = b1, r.stateNode = a, j(a, r), a._reactInternalInstance = d1;
|
||
}
|
||
function xC(r, a, d) {
|
||
var p = !1, g = pa, C = pa, D = a.contextType;
|
||
if ("contextType" in a) {
|
||
var P = (
|
||
// Allow null for conditional declaration
|
||
D === null || D !== void 0 && D.$$typeof === Ot && D._context === void 0
|
||
);
|
||
if (!P && !x1.has(a)) {
|
||
x1.add(a);
|
||
var O = "";
|
||
D === void 0 ? O = " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : typeof D != "object" ? O = " However, it is set to a " + typeof D + "." : D.$$typeof === Ht ? O = " Did you accidentally pass the Context.Provider instead?" : D._context !== void 0 ? O = " Did you accidentally pass the Context.Consumer instead?" : O = " However, it is set to an object with keys {" + Object.keys(D).join(", ") + "}.", m("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", yt(a) || "Component", O);
|
||
}
|
||
}
|
||
if (typeof D == "object" && D !== null)
|
||
C = jr(D);
|
||
else {
|
||
g = Mo(r, a, !0);
|
||
var F = a.contextTypes;
|
||
p = F != null, C = p ? eo(r, g) : pa;
|
||
}
|
||
var W = new a(d, C);
|
||
if (r.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
W = new a(d, C);
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
var re = r.memoizedState = W.state !== null && W.state !== void 0 ? W.state : null;
|
||
yC(r, W);
|
||
{
|
||
if (typeof a.getDerivedStateFromProps == "function" && re === null) {
|
||
var de = yt(a) || "Component";
|
||
p1.has(de) || (p1.add(de), m("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", de, W.state === null ? "null" : "undefined", de));
|
||
}
|
||
if (typeof a.getDerivedStateFromProps == "function" || typeof W.getSnapshotBeforeUpdate == "function") {
|
||
var be = null, Re = null, De = null;
|
||
if (typeof W.componentWillMount == "function" && W.componentWillMount.__suppressDeprecationWarning !== !0 ? be = "componentWillMount" : typeof W.UNSAFE_componentWillMount == "function" && (be = "UNSAFE_componentWillMount"), typeof W.componentWillReceiveProps == "function" && W.componentWillReceiveProps.__suppressDeprecationWarning !== !0 ? Re = "componentWillReceiveProps" : typeof W.UNSAFE_componentWillReceiveProps == "function" && (Re = "UNSAFE_componentWillReceiveProps"), typeof W.componentWillUpdate == "function" && W.componentWillUpdate.__suppressDeprecationWarning !== !0 ? De = "componentWillUpdate" : typeof W.UNSAFE_componentWillUpdate == "function" && (De = "UNSAFE_componentWillUpdate"), be !== null || Re !== null || De !== null) {
|
||
var wt = yt(a) || "Component", zt = typeof a.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
||
v1.has(wt) || (v1.add(wt), m(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
||
|
||
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
||
|
||
The above lifecycles should be removed. Learn more about this warning here:
|
||
https://reactjs.org/link/unsafe-component-lifecycles`, wt, zt, be !== null ? `
|
||
` + be : "", Re !== null ? `
|
||
` + Re : "", De !== null ? `
|
||
` + De : ""));
|
||
}
|
||
}
|
||
}
|
||
return p && Vc(r, g, C), W;
|
||
}
|
||
function i7(r, a) {
|
||
var d = a.state;
|
||
typeof a.componentWillMount == "function" && a.componentWillMount(), typeof a.UNSAFE_componentWillMount == "function" && a.UNSAFE_componentWillMount(), d !== a.state && (m("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", vt(r) || "Component"), b1.enqueueReplaceState(a, a.state, null));
|
||
}
|
||
function SC(r, a, d, p) {
|
||
var g = a.state;
|
||
if (typeof a.componentWillReceiveProps == "function" && a.componentWillReceiveProps(d, p), typeof a.UNSAFE_componentWillReceiveProps == "function" && a.UNSAFE_componentWillReceiveProps(d, p), a.state !== g) {
|
||
{
|
||
var C = vt(r) || "Component";
|
||
f1.has(C) || (f1.add(C), m("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", C));
|
||
}
|
||
b1.enqueueReplaceState(a, a.state, null);
|
||
}
|
||
}
|
||
function C1(r, a, d, p) {
|
||
a7(r, a, d);
|
||
var g = r.stateNode;
|
||
g.props = d, g.state = r.memoizedState, g.refs = hC, u1(r);
|
||
var C = a.contextType;
|
||
if (typeof C == "object" && C !== null)
|
||
g.context = jr(C);
|
||
else {
|
||
var D = Mo(r, a, !0);
|
||
g.context = eo(r, D);
|
||
}
|
||
{
|
||
if (g.state === d) {
|
||
var P = yt(a) || "Component";
|
||
g1.has(P) || (g1.add(P), m("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", P));
|
||
}
|
||
r.mode & hn && pe.recordLegacyContextWarning(r, g), pe.recordUnsafeLifecycleWarnings(r, g);
|
||
}
|
||
g.state = r.memoizedState;
|
||
var O = a.getDerivedStateFromProps;
|
||
if (typeof O == "function" && (S1(r, a, O, d), g.state = r.memoizedState), typeof a.getDerivedStateFromProps != "function" && typeof g.getSnapshotBeforeUpdate != "function" && (typeof g.UNSAFE_componentWillMount == "function" || typeof g.componentWillMount == "function") && (i7(r, g), Xv(r, d, g, p), g.state = r.memoizedState), typeof g.componentDidMount == "function") {
|
||
var F = Wt;
|
||
F |= ss, (r.mode & ha) !== Mt && (F |= qi), r.flags |= F;
|
||
}
|
||
}
|
||
function o7(r, a, d, p) {
|
||
var g = r.stateNode, C = r.memoizedProps;
|
||
g.props = C;
|
||
var D = g.context, P = a.contextType, O = pa;
|
||
if (typeof P == "object" && P !== null)
|
||
O = jr(P);
|
||
else {
|
||
var F = Mo(r, a, !0);
|
||
O = eo(r, F);
|
||
}
|
||
var W = a.getDerivedStateFromProps, re = typeof W == "function" || typeof g.getSnapshotBeforeUpdate == "function";
|
||
!re && (typeof g.UNSAFE_componentWillReceiveProps == "function" || typeof g.componentWillReceiveProps == "function") && (C !== d || D !== O) && SC(r, g, d, O), fC();
|
||
var de = r.memoizedState, be = g.state = de;
|
||
if (Xv(r, d, g, p), be = r.memoizedState, C === d && de === be && !ll() && !Kv()) {
|
||
if (typeof g.componentDidMount == "function") {
|
||
var Re = Wt;
|
||
Re |= ss, (r.mode & ha) !== Mt && (Re |= qi), r.flags |= Re;
|
||
}
|
||
return !1;
|
||
}
|
||
typeof W == "function" && (S1(r, a, W, d), be = r.memoizedState);
|
||
var De = Kv() || gC(r, a, C, d, de, be, O);
|
||
if (De) {
|
||
if (!re && (typeof g.UNSAFE_componentWillMount == "function" || typeof g.componentWillMount == "function") && (typeof g.componentWillMount == "function" && g.componentWillMount(), typeof g.UNSAFE_componentWillMount == "function" && g.UNSAFE_componentWillMount()), typeof g.componentDidMount == "function") {
|
||
var wt = Wt;
|
||
wt |= ss, (r.mode & ha) !== Mt && (wt |= qi), r.flags |= wt;
|
||
}
|
||
} else {
|
||
if (typeof g.componentDidMount == "function") {
|
||
var zt = Wt;
|
||
zt |= ss, (r.mode & ha) !== Mt && (zt |= qi), r.flags |= zt;
|
||
}
|
||
r.memoizedProps = d, r.memoizedState = be;
|
||
}
|
||
return g.props = d, g.state = be, g.context = O, De;
|
||
}
|
||
function s7(r, a, d, p, g) {
|
||
var C = a.stateNode;
|
||
dC(r, a);
|
||
var D = a.memoizedProps, P = a.type === a.elementType ? D : so(a.type, D);
|
||
C.props = P;
|
||
var O = a.pendingProps, F = C.context, W = d.contextType, re = pa;
|
||
if (typeof W == "object" && W !== null)
|
||
re = jr(W);
|
||
else {
|
||
var de = Mo(a, d, !0);
|
||
re = eo(a, de);
|
||
}
|
||
var be = d.getDerivedStateFromProps, Re = typeof be == "function" || typeof C.getSnapshotBeforeUpdate == "function";
|
||
!Re && (typeof C.UNSAFE_componentWillReceiveProps == "function" || typeof C.componentWillReceiveProps == "function") && (D !== O || F !== re) && SC(a, C, p, re), fC();
|
||
var De = a.memoizedState, wt = C.state = De;
|
||
if (Xv(a, p, C, g), wt = a.memoizedState, D === O && De === wt && !ll() && !Kv() && !R)
|
||
return typeof C.componentDidUpdate == "function" && (D !== r.memoizedProps || De !== r.memoizedState) && (a.flags |= Wt), typeof C.getSnapshotBeforeUpdate == "function" && (D !== r.memoizedProps || De !== r.memoizedState) && (a.flags |= Co), !1;
|
||
typeof be == "function" && (S1(a, d, be, p), wt = a.memoizedState);
|
||
var zt = Kv() || gC(a, d, P, p, De, wt, re) || // TODO: In some cases, we'll end up checking if context has changed twice,
|
||
// both before and after `shouldComponentUpdate` has been called. Not ideal,
|
||
// but I'm loath to refactor this function. This only happens for memoized
|
||
// components so it's not that common.
|
||
R;
|
||
return zt ? (!Re && (typeof C.UNSAFE_componentWillUpdate == "function" || typeof C.componentWillUpdate == "function") && (typeof C.componentWillUpdate == "function" && C.componentWillUpdate(p, wt, re), typeof C.UNSAFE_componentWillUpdate == "function" && C.UNSAFE_componentWillUpdate(p, wt, re)), typeof C.componentDidUpdate == "function" && (a.flags |= Wt), typeof C.getSnapshotBeforeUpdate == "function" && (a.flags |= Co)) : (typeof C.componentDidUpdate == "function" && (D !== r.memoizedProps || De !== r.memoizedState) && (a.flags |= Wt), typeof C.getSnapshotBeforeUpdate == "function" && (D !== r.memoizedProps || De !== r.memoizedState) && (a.flags |= Co), a.memoizedProps = p, a.memoizedState = wt), C.props = p, C.state = wt, C.context = re, zt;
|
||
}
|
||
var w1, E1, j1, T1, D1, bC = function(r, a) {
|
||
};
|
||
w1 = !1, E1 = !1, j1 = {}, T1 = {}, D1 = {}, bC = function(r, a) {
|
||
if (!(r === null || typeof r != "object") && !(!r._store || r._store.validated || r.key != null)) {
|
||
if (typeof r._store != "object")
|
||
throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");
|
||
r._store.validated = !0;
|
||
var d = vt(a) || "Component";
|
||
T1[d] || (T1[d] = !0, m('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.'));
|
||
}
|
||
};
|
||
function jp(r, a, d) {
|
||
var p = d.ref;
|
||
if (p !== null && typeof p != "function" && typeof p != "object") {
|
||
if ((r.mode & hn || L) && // We warn in ReactElement.js if owner and self are equal for string refs
|
||
// because these cannot be automatically converted to an arrow function
|
||
// using a codemod. Therefore, we don't have to warn about string refs again.
|
||
!(d._owner && d._self && d._owner.stateNode !== d._self)) {
|
||
var g = vt(r) || "Component";
|
||
j1[g] || (m('A string ref, "%s", has been found within a strict mode tree. String refs are a source of potential bugs and should be avoided. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', p), j1[g] = !0);
|
||
}
|
||
if (d._owner) {
|
||
var C = d._owner, D;
|
||
if (C) {
|
||
var P = C;
|
||
if (P.tag !== B)
|
||
throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");
|
||
D = P.stateNode;
|
||
}
|
||
if (!D)
|
||
throw new Error("Missing owner for string ref " + p + ". This error is likely caused by a bug in React. Please file an issue.");
|
||
var O = D;
|
||
XM(p, "ref");
|
||
var F = "" + p;
|
||
if (a !== null && a.ref !== null && typeof a.ref == "function" && a.ref._stringRef === F)
|
||
return a.ref;
|
||
var W = function(re) {
|
||
var de = O.refs;
|
||
de === hC && (de = O.refs = {}), re === null ? delete de[F] : de[F] = re;
|
||
};
|
||
return W._stringRef = F, W;
|
||
} else {
|
||
if (typeof p != "string")
|
||
throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");
|
||
if (!d._owner)
|
||
throw new Error("Element ref was specified as a string (" + p + `) but no owner was set. This could happen for one of the following reasons:
|
||
1. You may be adding a ref to a function component
|
||
2. You may be adding a ref to a component that was not created inside a component's render method
|
||
3. You have multiple copies of React loaded
|
||
See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
||
}
|
||
}
|
||
return p;
|
||
}
|
||
function Jv(r, a) {
|
||
var d = Object.prototype.toString.call(a);
|
||
throw new Error("Objects are not valid as a React child (found: " + (d === "[object Object]" ? "object with keys {" + Object.keys(a).join(", ") + "}" : d) + "). If you meant to render a collection of children, use an array instead.");
|
||
}
|
||
function $v(r) {
|
||
{
|
||
var a = vt(r) || "Component";
|
||
if (D1[a])
|
||
return;
|
||
D1[a] = !0, m("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.");
|
||
}
|
||
}
|
||
function CC(r) {
|
||
var a = r._payload, d = r._init;
|
||
return d(a);
|
||
}
|
||
function wC(r) {
|
||
function a(oe, ye) {
|
||
if (r) {
|
||
var ie = oe.deletions;
|
||
ie === null ? (oe.deletions = [ye], oe.flags |= da) : ie.push(ye);
|
||
}
|
||
}
|
||
function d(oe, ye) {
|
||
if (!r)
|
||
return null;
|
||
for (var ie = ye; ie !== null; )
|
||
a(oe, ie), ie = ie.sibling;
|
||
return null;
|
||
}
|
||
function p(oe, ye) {
|
||
for (var ie = /* @__PURE__ */ new Map(), Ge = ye; Ge !== null; )
|
||
Ge.key !== null ? ie.set(Ge.key, Ge) : ie.set(Ge.index, Ge), Ge = Ge.sibling;
|
||
return ie;
|
||
}
|
||
function g(oe, ye) {
|
||
var ie = Bu(oe, ye);
|
||
return ie.index = 0, ie.sibling = null, ie;
|
||
}
|
||
function C(oe, ye, ie) {
|
||
if (oe.index = ie, !r)
|
||
return oe.flags |= Jh, ye;
|
||
var Ge = oe.alternate;
|
||
if (Ge !== null) {
|
||
var bt = Ge.index;
|
||
return bt < ye ? (oe.flags |= jn, ye) : bt;
|
||
} else
|
||
return oe.flags |= jn, ye;
|
||
}
|
||
function D(oe) {
|
||
return r && oe.alternate === null && (oe.flags |= jn), oe;
|
||
}
|
||
function P(oe, ye, ie, Ge) {
|
||
if (ye === null || ye.tag !== le) {
|
||
var bt = r2(ie, oe.mode, Ge);
|
||
return bt.return = oe, bt;
|
||
} else {
|
||
var ut = g(ye, ie);
|
||
return ut.return = oe, ut;
|
||
}
|
||
}
|
||
function O(oe, ye, ie, Ge) {
|
||
var bt = ie.type;
|
||
if (bt === Et)
|
||
return W(oe, ye, ie.props.children, Ge, ie.key);
|
||
if (ye !== null && (ye.elementType === bt || // Keep this check inline so it only runs on the false path:
|
||
p3(ye, ie) || // Lazy types should reconcile their resolved type.
|
||
// We need to do this after the Hot Reloading check above,
|
||
// because hot reloading has different semantics than prod because
|
||
// it doesn't resuspend. So we can't let the call below suspend.
|
||
typeof bt == "object" && bt !== null && bt.$$typeof === Fe && CC(bt) === ye.type)) {
|
||
var ut = g(ye, ie.props);
|
||
return ut.ref = jp(oe, ye, ie), ut.return = oe, ut._debugSource = ie._source, ut._debugOwner = ie._owner, ut;
|
||
}
|
||
var rn = n2(ie, oe.mode, Ge);
|
||
return rn.ref = jp(oe, ye, ie), rn.return = oe, rn;
|
||
}
|
||
function F(oe, ye, ie, Ge) {
|
||
if (ye === null || ye.tag !== G || ye.stateNode.containerInfo !== ie.containerInfo || ye.stateNode.implementation !== ie.implementation) {
|
||
var bt = a2(ie, oe.mode, Ge);
|
||
return bt.return = oe, bt;
|
||
} else {
|
||
var ut = g(ye, ie.children || []);
|
||
return ut.return = oe, ut;
|
||
}
|
||
}
|
||
function W(oe, ye, ie, Ge, bt) {
|
||
if (ye === null || ye.tag !== ae) {
|
||
var ut = Al(ie, oe.mode, Ge, bt);
|
||
return ut.return = oe, ut;
|
||
} else {
|
||
var rn = g(ye, ie);
|
||
return rn.return = oe, rn;
|
||
}
|
||
}
|
||
function re(oe, ye, ie) {
|
||
if (typeof ye == "string" && ye !== "" || typeof ye == "number") {
|
||
var Ge = r2("" + ye, oe.mode, ie);
|
||
return Ge.return = oe, Ge;
|
||
}
|
||
if (typeof ye == "object" && ye !== null) {
|
||
switch (ye.$$typeof) {
|
||
case ze: {
|
||
var bt = n2(ye, oe.mode, ie);
|
||
return bt.ref = jp(oe, null, ye), bt.return = oe, bt;
|
||
}
|
||
case Qe: {
|
||
var ut = a2(ye, oe.mode, ie);
|
||
return ut.return = oe, ut;
|
||
}
|
||
case Fe: {
|
||
var rn = ye._payload, Lt = ye._init;
|
||
return re(oe, Lt(rn), ie);
|
||
}
|
||
}
|
||
if (Kt(ye) || Ne(ye)) {
|
||
var pn = Al(ye, oe.mode, ie, null);
|
||
return pn.return = oe, pn;
|
||
}
|
||
Jv(oe, ye);
|
||
}
|
||
return typeof ye == "function" && $v(oe), null;
|
||
}
|
||
function de(oe, ye, ie, Ge) {
|
||
var bt = ye !== null ? ye.key : null;
|
||
if (typeof ie == "string" && ie !== "" || typeof ie == "number")
|
||
return bt !== null ? null : P(oe, ye, "" + ie, Ge);
|
||
if (typeof ie == "object" && ie !== null) {
|
||
switch (ie.$$typeof) {
|
||
case ze:
|
||
return ie.key === bt ? O(oe, ye, ie, Ge) : null;
|
||
case Qe:
|
||
return ie.key === bt ? F(oe, ye, ie, Ge) : null;
|
||
case Fe: {
|
||
var ut = ie._payload, rn = ie._init;
|
||
return de(oe, ye, rn(ut), Ge);
|
||
}
|
||
}
|
||
if (Kt(ie) || Ne(ie))
|
||
return bt !== null ? null : W(oe, ye, ie, Ge, null);
|
||
Jv(oe, ie);
|
||
}
|
||
return typeof ie == "function" && $v(oe), null;
|
||
}
|
||
function be(oe, ye, ie, Ge, bt) {
|
||
if (typeof Ge == "string" && Ge !== "" || typeof Ge == "number") {
|
||
var ut = oe.get(ie) || null;
|
||
return P(ye, ut, "" + Ge, bt);
|
||
}
|
||
if (typeof Ge == "object" && Ge !== null) {
|
||
switch (Ge.$$typeof) {
|
||
case ze: {
|
||
var rn = oe.get(Ge.key === null ? ie : Ge.key) || null;
|
||
return O(ye, rn, Ge, bt);
|
||
}
|
||
case Qe: {
|
||
var Lt = oe.get(Ge.key === null ? ie : Ge.key) || null;
|
||
return F(ye, Lt, Ge, bt);
|
||
}
|
||
case Fe:
|
||
var pn = Ge._payload, Jt = Ge._init;
|
||
return be(oe, ye, ie, Jt(pn), bt);
|
||
}
|
||
if (Kt(Ge) || Ne(Ge)) {
|
||
var Ln = oe.get(ie) || null;
|
||
return W(ye, Ln, Ge, bt, null);
|
||
}
|
||
Jv(ye, Ge);
|
||
}
|
||
return typeof Ge == "function" && $v(ye), null;
|
||
}
|
||
function Re(oe, ye, ie) {
|
||
{
|
||
if (typeof oe != "object" || oe === null)
|
||
return ye;
|
||
switch (oe.$$typeof) {
|
||
case ze:
|
||
case Qe:
|
||
bC(oe, ie);
|
||
var Ge = oe.key;
|
||
if (typeof Ge != "string")
|
||
break;
|
||
if (ye === null) {
|
||
ye = /* @__PURE__ */ new Set(), ye.add(Ge);
|
||
break;
|
||
}
|
||
if (!ye.has(Ge)) {
|
||
ye.add(Ge);
|
||
break;
|
||
}
|
||
m("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.", Ge);
|
||
break;
|
||
case Fe:
|
||
var bt = oe._payload, ut = oe._init;
|
||
Re(ut(bt), ye, ie);
|
||
break;
|
||
}
|
||
}
|
||
return ye;
|
||
}
|
||
function De(oe, ye, ie, Ge) {
|
||
for (var bt = null, ut = 0; ut < ie.length; ut++) {
|
||
var rn = ie[ut];
|
||
bt = Re(rn, bt, oe);
|
||
}
|
||
for (var Lt = null, pn = null, Jt = ye, Ln = 0, Rt = 0, dr = null; Jt !== null && Rt < ie.length; Rt++) {
|
||
Jt.index > Rt ? (dr = Jt, Jt = null) : dr = Jt.sibling;
|
||
var Ca = de(oe, Jt, ie[Rt], Ge);
|
||
if (Ca === null) {
|
||
Jt === null && (Jt = dr);
|
||
break;
|
||
}
|
||
r && Jt && Ca.alternate === null && a(oe, Jt), Ln = C(Ca, Ln, Rt), pn === null ? Lt = Ca : pn.sibling = Ca, pn = Ca, Jt = dr;
|
||
}
|
||
if (Rt === ie.length) {
|
||
if (d(oe, Jt), v()) {
|
||
var la = Rt;
|
||
io(oe, la);
|
||
}
|
||
return Lt;
|
||
}
|
||
if (Jt === null) {
|
||
for (; Rt < ie.length; Rt++) {
|
||
var yi = re(oe, ie[Rt], Ge);
|
||
yi !== null && (Ln = C(yi, Ln, Rt), pn === null ? Lt = yi : pn.sibling = yi, pn = yi);
|
||
}
|
||
if (v()) {
|
||
var Ba = Rt;
|
||
io(oe, Ba);
|
||
}
|
||
return Lt;
|
||
}
|
||
for (var _a = p(oe, Jt); Rt < ie.length; Rt++) {
|
||
var wa = be(_a, oe, Rt, ie[Rt], Ge);
|
||
wa !== null && (r && wa.alternate !== null && _a.delete(wa.key === null ? Rt : wa.key), Ln = C(wa, Ln, Rt), pn === null ? Lt = wa : pn.sibling = wa, pn = wa);
|
||
}
|
||
if (r && _a.forEach(function(Bd) {
|
||
return a(oe, Bd);
|
||
}), v()) {
|
||
var As = Rt;
|
||
io(oe, As);
|
||
}
|
||
return Lt;
|
||
}
|
||
function wt(oe, ye, ie, Ge) {
|
||
var bt = Ne(ie);
|
||
if (typeof bt != "function")
|
||
throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");
|
||
{
|
||
typeof Symbol == "function" && // $FlowFixMe Flow doesn't know about toStringTag
|
||
ie[Symbol.toStringTag] === "Generator" && (E1 || m("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."), E1 = !0), ie.entries === bt && (w1 || m("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), w1 = !0);
|
||
var ut = bt.call(ie);
|
||
if (ut)
|
||
for (var rn = null, Lt = ut.next(); !Lt.done; Lt = ut.next()) {
|
||
var pn = Lt.value;
|
||
rn = Re(pn, rn, oe);
|
||
}
|
||
}
|
||
var Jt = bt.call(ie);
|
||
if (Jt == null)
|
||
throw new Error("An iterable object provided no iterator.");
|
||
for (var Ln = null, Rt = null, dr = ye, Ca = 0, la = 0, yi = null, Ba = Jt.next(); dr !== null && !Ba.done; la++, Ba = Jt.next()) {
|
||
dr.index > la ? (yi = dr, dr = null) : yi = dr.sibling;
|
||
var _a = de(oe, dr, Ba.value, Ge);
|
||
if (_a === null) {
|
||
dr === null && (dr = yi);
|
||
break;
|
||
}
|
||
r && dr && _a.alternate === null && a(oe, dr), Ca = C(_a, Ca, la), Rt === null ? Ln = _a : Rt.sibling = _a, Rt = _a, dr = yi;
|
||
}
|
||
if (Ba.done) {
|
||
if (d(oe, dr), v()) {
|
||
var wa = la;
|
||
io(oe, wa);
|
||
}
|
||
return Ln;
|
||
}
|
||
if (dr === null) {
|
||
for (; !Ba.done; la++, Ba = Jt.next()) {
|
||
var As = re(oe, Ba.value, Ge);
|
||
As !== null && (Ca = C(As, Ca, la), Rt === null ? Ln = As : Rt.sibling = As, Rt = As);
|
||
}
|
||
if (v()) {
|
||
var Bd = la;
|
||
io(oe, Bd);
|
||
}
|
||
return Ln;
|
||
}
|
||
for (var nh = p(oe, dr); !Ba.done; la++, Ba = Jt.next()) {
|
||
var Qo = be(nh, oe, la, Ba.value, Ge);
|
||
Qo !== null && (r && Qo.alternate !== null && nh.delete(Qo.key === null ? la : Qo.key), Ca = C(Qo, Ca, la), Rt === null ? Ln = Qo : Rt.sibling = Qo, Rt = Qo);
|
||
}
|
||
if (r && nh.forEach(function(TR) {
|
||
return a(oe, TR);
|
||
}), v()) {
|
||
var jR = la;
|
||
io(oe, jR);
|
||
}
|
||
return Ln;
|
||
}
|
||
function zt(oe, ye, ie, Ge) {
|
||
if (ye !== null && ye.tag === le) {
|
||
d(oe, ye.sibling);
|
||
var bt = g(ye, ie);
|
||
return bt.return = oe, bt;
|
||
}
|
||
d(oe, ye);
|
||
var ut = r2(ie, oe.mode, Ge);
|
||
return ut.return = oe, ut;
|
||
}
|
||
function Tt(oe, ye, ie, Ge) {
|
||
for (var bt = ie.key, ut = ye; ut !== null; ) {
|
||
if (ut.key === bt) {
|
||
var rn = ie.type;
|
||
if (rn === Et) {
|
||
if (ut.tag === ae) {
|
||
d(oe, ut.sibling);
|
||
var Lt = g(ut, ie.props.children);
|
||
return Lt.return = oe, Lt._debugSource = ie._source, Lt._debugOwner = ie._owner, Lt;
|
||
}
|
||
} else if (ut.elementType === rn || // Keep this check inline so it only runs on the false path:
|
||
p3(ut, ie) || // Lazy types should reconcile their resolved type.
|
||
// We need to do this after the Hot Reloading check above,
|
||
// because hot reloading has different semantics than prod because
|
||
// it doesn't resuspend. So we can't let the call below suspend.
|
||
typeof rn == "object" && rn !== null && rn.$$typeof === Fe && CC(rn) === ut.type) {
|
||
d(oe, ut.sibling);
|
||
var pn = g(ut, ie.props);
|
||
return pn.ref = jp(oe, ut, ie), pn.return = oe, pn._debugSource = ie._source, pn._debugOwner = ie._owner, pn;
|
||
}
|
||
d(oe, ut);
|
||
break;
|
||
} else
|
||
a(oe, ut);
|
||
ut = ut.sibling;
|
||
}
|
||
if (ie.type === Et) {
|
||
var Jt = Al(ie.props.children, oe.mode, Ge, ie.key);
|
||
return Jt.return = oe, Jt;
|
||
} else {
|
||
var Ln = n2(ie, oe.mode, Ge);
|
||
return Ln.ref = jp(oe, ye, ie), Ln.return = oe, Ln;
|
||
}
|
||
}
|
||
function Cn(oe, ye, ie, Ge) {
|
||
for (var bt = ie.key, ut = ye; ut !== null; ) {
|
||
if (ut.key === bt)
|
||
if (ut.tag === G && ut.stateNode.containerInfo === ie.containerInfo && ut.stateNode.implementation === ie.implementation) {
|
||
d(oe, ut.sibling);
|
||
var rn = g(ut, ie.children || []);
|
||
return rn.return = oe, rn;
|
||
} else {
|
||
d(oe, ut);
|
||
break;
|
||
}
|
||
else
|
||
a(oe, ut);
|
||
ut = ut.sibling;
|
||
}
|
||
var Lt = a2(ie, oe.mode, Ge);
|
||
return Lt.return = oe, Lt;
|
||
}
|
||
function ln(oe, ye, ie, Ge) {
|
||
var bt = typeof ie == "object" && ie !== null && ie.type === Et && ie.key === null;
|
||
if (bt && (ie = ie.props.children), typeof ie == "object" && ie !== null) {
|
||
switch (ie.$$typeof) {
|
||
case ze:
|
||
return D(Tt(oe, ye, ie, Ge));
|
||
case Qe:
|
||
return D(Cn(oe, ye, ie, Ge));
|
||
case Fe:
|
||
var ut = ie._payload, rn = ie._init;
|
||
return ln(oe, ye, rn(ut), Ge);
|
||
}
|
||
if (Kt(ie))
|
||
return De(oe, ye, ie, Ge);
|
||
if (Ne(ie))
|
||
return wt(oe, ye, ie, Ge);
|
||
Jv(oe, ie);
|
||
}
|
||
return typeof ie == "string" && ie !== "" || typeof ie == "number" ? D(zt(oe, ye, "" + ie, Ge)) : (typeof ie == "function" && $v(oe), d(oe, ye));
|
||
}
|
||
return ln;
|
||
}
|
||
var wd = wC(!0), EC = wC(!1);
|
||
function l7(r, a) {
|
||
if (r !== null && a.child !== r.child)
|
||
throw new Error("Resuming work not yet implemented.");
|
||
if (a.child !== null) {
|
||
var d = a.child, p = Bu(d, d.pendingProps);
|
||
for (a.child = p, p.return = a; d.sibling !== null; )
|
||
d = d.sibling, p = p.sibling = Bu(d, d.pendingProps), p.return = a;
|
||
p.sibling = null;
|
||
}
|
||
}
|
||
function u7(r, a) {
|
||
for (var d = r.child; d !== null; )
|
||
tR(d, a), d = d.sibling;
|
||
}
|
||
var Tp = {}, jl = Pa(Tp), Dp = Pa(Tp), em = Pa(Tp);
|
||
function tm(r) {
|
||
if (r === Tp)
|
||
throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");
|
||
return r;
|
||
}
|
||
function M1() {
|
||
var r = tm(em.current);
|
||
return r;
|
||
}
|
||
function R1(r, a) {
|
||
pr(em, a, r), pr(Dp, r, r), pr(jl, Tp, r);
|
||
var d = Eo(a);
|
||
zn(jl, r), pr(jl, d, r);
|
||
}
|
||
function Ed(r) {
|
||
zn(jl, r), zn(Dp, r), zn(em, r);
|
||
}
|
||
function Mp() {
|
||
var r = tm(jl.current);
|
||
return r;
|
||
}
|
||
function jC(r) {
|
||
var a = tm(em.current), d = tm(jl.current), p = Gr(d, r.type, a);
|
||
d !== p && (pr(Dp, r, r), pr(jl, p, r));
|
||
}
|
||
function k1(r) {
|
||
Dp.current === r && (zn(jl, r), zn(Dp, r));
|
||
}
|
||
var c7 = 0, TC = 1, DC = 1, Rp = 2, lo = Pa(c7);
|
||
function P1(r, a) {
|
||
return (r & a) !== 0;
|
||
}
|
||
function jd(r) {
|
||
return r & TC;
|
||
}
|
||
function O1(r, a) {
|
||
return r & TC | a;
|
||
}
|
||
function d7(r, a) {
|
||
return r | a;
|
||
}
|
||
function Tl(r, a) {
|
||
pr(lo, a, r);
|
||
}
|
||
function Td(r) {
|
||
zn(lo, r);
|
||
}
|
||
function f7(r, a) {
|
||
var d = r.memoizedState;
|
||
return d !== null ? d.dehydrated !== null : (r.memoizedProps, !0);
|
||
}
|
||
function nm(r) {
|
||
for (var a = r; a !== null; ) {
|
||
if (a.tag === te) {
|
||
var d = a.memoizedState;
|
||
if (d !== null) {
|
||
var p = d.dehydrated;
|
||
if (p === null || Ti(p) || Ki(p))
|
||
return a;
|
||
}
|
||
} else if (a.tag === ve && // revealOrder undefined can't be trusted because it don't
|
||
// keep track of whether it suspended or not.
|
||
a.memoizedProps.revealOrder !== void 0) {
|
||
var g = (a.flags & sn) !== dt;
|
||
if (g)
|
||
return a;
|
||
} else if (a.child !== null) {
|
||
a.child.return = a, a = a.child;
|
||
continue;
|
||
}
|
||
if (a === r)
|
||
return null;
|
||
for (; a.sibling === null; ) {
|
||
if (a.return === null || a.return === r)
|
||
return null;
|
||
a = a.return;
|
||
}
|
||
a.sibling.return = a.return, a = a.sibling;
|
||
}
|
||
return null;
|
||
}
|
||
var Za = (
|
||
/* */
|
||
0
|
||
), Fr = (
|
||
/* */
|
||
1
|
||
), Fo = (
|
||
/* */
|
||
2
|
||
), Br = (
|
||
/* */
|
||
4
|
||
), ra = (
|
||
/* */
|
||
8
|
||
), A1 = [];
|
||
function N1() {
|
||
for (var r = 0; r < A1.length; r++) {
|
||
var a = A1[r];
|
||
Dc ? a._workInProgressVersionPrimary = null : a._workInProgressVersionSecondary = null;
|
||
}
|
||
A1.length = 0;
|
||
}
|
||
function p7(r, a) {
|
||
var d = a._getVersion, p = d(a._source);
|
||
r.mutableSourceEagerHydrationData == null ? r.mutableSourceEagerHydrationData = [a, p] : r.mutableSourceEagerHydrationData.push(a, p);
|
||
}
|
||
var lt = l.ReactCurrentDispatcher, kp = l.ReactCurrentBatchConfig, z1, Dd;
|
||
z1 = /* @__PURE__ */ new Set();
|
||
var Ou = Me, bn = null, _r = null, Ur = null, rm = !1, Pp = !1, Op = 0, h7 = 0, v7 = 25, Se = null, Ai = null, Dl = -1, I1 = !1;
|
||
function mn() {
|
||
{
|
||
var r = Se;
|
||
Ai === null ? Ai = [r] : Ai.push(r);
|
||
}
|
||
}
|
||
function Ke() {
|
||
{
|
||
var r = Se;
|
||
Ai !== null && (Dl++, Ai[Dl] !== r && m7(r));
|
||
}
|
||
}
|
||
function Md(r) {
|
||
r != null && !Kt(r) && m("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", Se, typeof r);
|
||
}
|
||
function m7(r) {
|
||
{
|
||
var a = vt(bn);
|
||
if (!z1.has(a) && (z1.add(a), Ai !== null)) {
|
||
for (var d = "", p = 30, g = 0; g <= Dl; g++) {
|
||
for (var C = Ai[g], D = g === Dl ? r : C, P = g + 1 + ". " + C; P.length < p; )
|
||
P += " ";
|
||
P += D + `
|
||
`, d += P;
|
||
}
|
||
m(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
|
||
|
||
Previous render Next render
|
||
------------------------------------------------------
|
||
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
`, a, d);
|
||
}
|
||
}
|
||
}
|
||
function Sa() {
|
||
throw new Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
||
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
||
2. You might be breaking the Rules of Hooks
|
||
3. You might have more than one copy of React in the same app
|
||
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);
|
||
}
|
||
function L1(r, a) {
|
||
if (I1)
|
||
return !1;
|
||
if (a === null)
|
||
return m("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", Se), !1;
|
||
r.length !== a.length && m(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
||
|
||
Previous: %s
|
||
Incoming: %s`, Se, "[" + a.join(", ") + "]", "[" + r.join(", ") + "]");
|
||
for (var d = 0; d < a.length && d < r.length; d++)
|
||
if (!cr(r[d], a[d]))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
function Rd(r, a, d, p, g, C) {
|
||
Ou = C, bn = a, Ai = r !== null ? r._debugHookTypes : null, Dl = -1, I1 = r !== null && r.type !== a.type, a.memoizedState = null, a.updateQueue = null, a.lanes = Me, r !== null && r.memoizedState !== null ? lt.current = XC : Ai !== null ? lt.current = QC : lt.current = YC;
|
||
var D = d(p, g);
|
||
if (Pp) {
|
||
var P = 0;
|
||
do {
|
||
if (Pp = !1, Op = 0, P >= v7)
|
||
throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
|
||
P += 1, I1 = !1, _r = null, Ur = null, a.updateQueue = null, Dl = -1, lt.current = KC, D = d(p, g);
|
||
} while (Pp);
|
||
}
|
||
lt.current = mm, a._debugHookTypes = Ai;
|
||
var O = _r !== null && _r.next !== null;
|
||
if (Ou = Me, bn = null, _r = null, Ur = null, Se = null, Ai = null, Dl = -1, r !== null && (r.flags & Yi) !== (a.flags & Yi) && // Disable this warning in legacy mode, because legacy Suspense is weird
|
||
// and creates false positives. To make this work in legacy mode, we'd
|
||
// need to mark fibers that commit in an incomplete state, somehow. For
|
||
// now I'll disable the warning that most of the bugs that would trigger
|
||
// it are either exclusive to concurrent mode or exist in both.
|
||
(r.mode & Zt) !== Mt && m("Internal React error: Expected static flag was missing. Please notify the React team."), rm = !1, O)
|
||
throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");
|
||
return D;
|
||
}
|
||
function kd() {
|
||
var r = Op !== 0;
|
||
return Op = 0, r;
|
||
}
|
||
function MC(r, a, d) {
|
||
a.updateQueue = r.updateQueue, (a.mode & ha) !== Mt ? a.flags &= ~(wc | qi | Va | Wt) : a.flags &= ~(Va | Wt), r.lanes = Su(r.lanes, d);
|
||
}
|
||
function RC() {
|
||
if (lt.current = mm, rm) {
|
||
for (var r = bn.memoizedState; r !== null; ) {
|
||
var a = r.queue;
|
||
a !== null && (a.pending = null), r = r.next;
|
||
}
|
||
rm = !1;
|
||
}
|
||
Ou = Me, bn = null, _r = null, Ur = null, Ai = null, Dl = -1, Se = null, HC = !1, Pp = !1, Op = 0;
|
||
}
|
||
function Bo() {
|
||
var r = {
|
||
memoizedState: null,
|
||
baseState: null,
|
||
baseQueue: null,
|
||
queue: null,
|
||
next: null
|
||
};
|
||
return Ur === null ? bn.memoizedState = Ur = r : Ur = Ur.next = r, Ur;
|
||
}
|
||
function Ni() {
|
||
var r;
|
||
if (_r === null) {
|
||
var a = bn.alternate;
|
||
a !== null ? r = a.memoizedState : r = null;
|
||
} else
|
||
r = _r.next;
|
||
var d;
|
||
if (Ur === null ? d = bn.memoizedState : d = Ur.next, d !== null)
|
||
Ur = d, d = Ur.next, _r = r;
|
||
else {
|
||
if (r === null)
|
||
throw new Error("Rendered more hooks than during the previous render.");
|
||
_r = r;
|
||
var p = {
|
||
memoizedState: _r.memoizedState,
|
||
baseState: _r.baseState,
|
||
baseQueue: _r.baseQueue,
|
||
queue: _r.queue,
|
||
next: null
|
||
};
|
||
Ur === null ? bn.memoizedState = Ur = p : Ur = Ur.next = p;
|
||
}
|
||
return Ur;
|
||
}
|
||
function kC() {
|
||
return {
|
||
lastEffect: null,
|
||
stores: null
|
||
};
|
||
}
|
||
function F1(r, a) {
|
||
return typeof a == "function" ? a(r) : a;
|
||
}
|
||
function B1(r, a, d) {
|
||
var p = Bo(), g;
|
||
d !== void 0 ? g = d(a) : g = a, p.memoizedState = p.baseState = g;
|
||
var C = {
|
||
pending: null,
|
||
interleaved: null,
|
||
lanes: Me,
|
||
dispatch: null,
|
||
lastRenderedReducer: r,
|
||
lastRenderedState: g
|
||
};
|
||
p.queue = C;
|
||
var D = C.dispatch = S7.bind(null, bn, C);
|
||
return [p.memoizedState, D];
|
||
}
|
||
function _1(r, a, d) {
|
||
var p = Ni(), g = p.queue;
|
||
if (g === null)
|
||
throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
|
||
g.lastRenderedReducer = r;
|
||
var C = _r, D = C.baseQueue, P = g.pending;
|
||
if (P !== null) {
|
||
if (D !== null) {
|
||
var O = D.next, F = P.next;
|
||
D.next = F, P.next = O;
|
||
}
|
||
C.baseQueue !== D && m("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."), C.baseQueue = D = P, g.pending = null;
|
||
}
|
||
if (D !== null) {
|
||
var W = D.next, re = C.baseState, de = null, be = null, Re = null, De = W;
|
||
do {
|
||
var wt = De.lane;
|
||
if (hl(Ou, wt)) {
|
||
if (Re !== null) {
|
||
var Tt = {
|
||
// This update is going to be committed so we never want uncommit
|
||
// it. Using NoLane works because 0 is a subset of all bitmasks, so
|
||
// this will never be skipped by the check above.
|
||
lane: vr,
|
||
action: De.action,
|
||
hasEagerState: De.hasEagerState,
|
||
eagerState: De.eagerState,
|
||
next: null
|
||
};
|
||
Re = Re.next = Tt;
|
||
}
|
||
if (De.hasEagerState)
|
||
re = De.eagerState;
|
||
else {
|
||
var Cn = De.action;
|
||
re = r(re, Cn);
|
||
}
|
||
} else {
|
||
var zt = {
|
||
lane: wt,
|
||
action: De.action,
|
||
hasEagerState: De.hasEagerState,
|
||
eagerState: De.eagerState,
|
||
next: null
|
||
};
|
||
Re === null ? (be = Re = zt, de = re) : Re = Re.next = zt, bn.lanes = kt(bn.lanes, wt), $p(wt);
|
||
}
|
||
De = De.next;
|
||
} while (De !== null && De !== W);
|
||
Re === null ? de = re : Re.next = be, cr(re, p.memoizedState) || Bp(), p.memoizedState = re, p.baseState = de, p.baseQueue = Re, g.lastRenderedState = re;
|
||
}
|
||
var ln = g.interleaved;
|
||
if (ln !== null) {
|
||
var oe = ln;
|
||
do {
|
||
var ye = oe.lane;
|
||
bn.lanes = kt(bn.lanes, ye), $p(ye), oe = oe.next;
|
||
} while (oe !== ln);
|
||
} else
|
||
D === null && (g.lanes = Me);
|
||
var ie = g.dispatch;
|
||
return [p.memoizedState, ie];
|
||
}
|
||
function U1(r, a, d) {
|
||
var p = Ni(), g = p.queue;
|
||
if (g === null)
|
||
throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
|
||
g.lastRenderedReducer = r;
|
||
var C = g.dispatch, D = g.pending, P = p.memoizedState;
|
||
if (D !== null) {
|
||
g.pending = null;
|
||
var O = D.next, F = O;
|
||
do {
|
||
var W = F.action;
|
||
P = r(P, W), F = F.next;
|
||
} while (F !== O);
|
||
cr(P, p.memoizedState) || Bp(), p.memoizedState = P, p.baseQueue === null && (p.baseState = P), g.lastRenderedState = P;
|
||
}
|
||
return [P, C];
|
||
}
|
||
function IJ(r, a, d) {
|
||
}
|
||
function LJ(r, a, d) {
|
||
}
|
||
function H1(r, a, d) {
|
||
var p = bn, g = Bo(), C, D = v();
|
||
if (D) {
|
||
if (d === void 0)
|
||
throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
|
||
C = d(), Dd || C !== d() && (m("The result of getServerSnapshot should be cached to avoid an infinite loop"), Dd = !0);
|
||
} else {
|
||
if (C = a(), !Dd) {
|
||
var P = a();
|
||
cr(C, P) || (m("The result of getSnapshot should be cached to avoid an infinite loop"), Dd = !0);
|
||
}
|
||
var O = Wm();
|
||
if (O === null)
|
||
throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
|
||
fl(O, Ou) || PC(p, a, C);
|
||
}
|
||
g.memoizedState = C;
|
||
var F = {
|
||
value: C,
|
||
getSnapshot: a
|
||
};
|
||
return g.queue = F, lm(AC.bind(null, p, F, r), [r]), p.flags |= Va, Ap(Fr | ra, OC.bind(null, p, F, C, a), void 0, null), C;
|
||
}
|
||
function am(r, a, d) {
|
||
var p = bn, g = Ni(), C = a();
|
||
if (!Dd) {
|
||
var D = a();
|
||
cr(C, D) || (m("The result of getSnapshot should be cached to avoid an infinite loop"), Dd = !0);
|
||
}
|
||
var P = g.memoizedState, O = !cr(P, C);
|
||
O && (g.memoizedState = C, Bp());
|
||
var F = g.queue;
|
||
if (zp(AC.bind(null, p, F, r), [r]), F.getSnapshot !== a || O || // Check if the susbcribe function changed. We can save some memory by
|
||
// checking whether we scheduled a subscription effect above.
|
||
Ur !== null && Ur.memoizedState.tag & Fr) {
|
||
p.flags |= Va, Ap(Fr | ra, OC.bind(null, p, F, C, a), void 0, null);
|
||
var W = Wm();
|
||
if (W === null)
|
||
throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
|
||
fl(W, Ou) || PC(p, a, C);
|
||
}
|
||
return C;
|
||
}
|
||
function PC(r, a, d) {
|
||
r.flags |= Cc;
|
||
var p = {
|
||
getSnapshot: a,
|
||
value: d
|
||
}, g = bn.updateQueue;
|
||
if (g === null)
|
||
g = kC(), bn.updateQueue = g, g.stores = [p];
|
||
else {
|
||
var C = g.stores;
|
||
C === null ? g.stores = [p] : C.push(p);
|
||
}
|
||
}
|
||
function OC(r, a, d, p) {
|
||
a.value = d, a.getSnapshot = p, NC(a) && zC(r);
|
||
}
|
||
function AC(r, a, d) {
|
||
var p = function() {
|
||
NC(a) && zC(r);
|
||
};
|
||
return d(p);
|
||
}
|
||
function NC(r) {
|
||
var a = r.getSnapshot, d = r.value;
|
||
try {
|
||
var p = a();
|
||
return !cr(d, p);
|
||
} catch {
|
||
return !0;
|
||
}
|
||
}
|
||
function zC(r) {
|
||
var a = Ia(r, Pt);
|
||
a !== null && Dr(a, r, Pt, Tn);
|
||
}
|
||
function im(r) {
|
||
var a = Bo();
|
||
typeof r == "function" && (r = r()), a.memoizedState = a.baseState = r;
|
||
var d = {
|
||
pending: null,
|
||
interleaved: null,
|
||
lanes: Me,
|
||
dispatch: null,
|
||
lastRenderedReducer: F1,
|
||
lastRenderedState: r
|
||
};
|
||
a.queue = d;
|
||
var p = d.dispatch = b7.bind(null, bn, d);
|
||
return [a.memoizedState, p];
|
||
}
|
||
function V1(r) {
|
||
return _1(F1);
|
||
}
|
||
function W1(r) {
|
||
return U1(F1);
|
||
}
|
||
function Ap(r, a, d, p) {
|
||
var g = {
|
||
tag: r,
|
||
create: a,
|
||
destroy: d,
|
||
deps: p,
|
||
// Circular
|
||
next: null
|
||
}, C = bn.updateQueue;
|
||
if (C === null)
|
||
C = kC(), bn.updateQueue = C, C.lastEffect = g.next = g;
|
||
else {
|
||
var D = C.lastEffect;
|
||
if (D === null)
|
||
C.lastEffect = g.next = g;
|
||
else {
|
||
var P = D.next;
|
||
D.next = g, g.next = P, C.lastEffect = g;
|
||
}
|
||
}
|
||
return g;
|
||
}
|
||
function G1(r) {
|
||
var a = Bo();
|
||
{
|
||
var d = {
|
||
current: r
|
||
};
|
||
return a.memoizedState = d, d;
|
||
}
|
||
}
|
||
function om(r) {
|
||
var a = Ni();
|
||
return a.memoizedState;
|
||
}
|
||
function Np(r, a, d, p) {
|
||
var g = Bo(), C = p === void 0 ? null : p;
|
||
bn.flags |= r, g.memoizedState = Ap(Fr | a, d, void 0, C);
|
||
}
|
||
function sm(r, a, d, p) {
|
||
var g = Ni(), C = p === void 0 ? null : p, D = void 0;
|
||
if (_r !== null) {
|
||
var P = _r.memoizedState;
|
||
if (D = P.destroy, C !== null) {
|
||
var O = P.deps;
|
||
if (L1(C, O)) {
|
||
g.memoizedState = Ap(a, d, D, C);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
bn.flags |= r, g.memoizedState = Ap(Fr | a, d, D, C);
|
||
}
|
||
function lm(r, a) {
|
||
return (bn.mode & ha) !== Mt ? Np(wc | Va | Rf, ra, r, a) : Np(Va | Rf, ra, r, a);
|
||
}
|
||
function zp(r, a) {
|
||
return sm(Va, ra, r, a);
|
||
}
|
||
function q1(r, a) {
|
||
return Np(Wt, Fo, r, a);
|
||
}
|
||
function um(r, a) {
|
||
return sm(Wt, Fo, r, a);
|
||
}
|
||
function Y1(r, a) {
|
||
var d = Wt;
|
||
return d |= ss, (bn.mode & ha) !== Mt && (d |= qi), Np(d, Br, r, a);
|
||
}
|
||
function cm(r, a) {
|
||
return sm(Wt, Br, r, a);
|
||
}
|
||
function IC(r, a) {
|
||
if (typeof a == "function") {
|
||
var d = a, p = r();
|
||
return d(p), function() {
|
||
d(null);
|
||
};
|
||
} else if (a != null) {
|
||
var g = a;
|
||
g.hasOwnProperty("current") || m("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(g).join(", ") + "}");
|
||
var C = r();
|
||
return g.current = C, function() {
|
||
g.current = null;
|
||
};
|
||
}
|
||
}
|
||
function Q1(r, a, d) {
|
||
typeof a != "function" && m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", a !== null ? typeof a : "null");
|
||
var p = d != null ? d.concat([r]) : null, g = Wt;
|
||
return g |= ss, (bn.mode & ha) !== Mt && (g |= qi), Np(g, Br, IC.bind(null, a, r), p);
|
||
}
|
||
function dm(r, a, d) {
|
||
typeof a != "function" && m("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", a !== null ? typeof a : "null");
|
||
var p = d != null ? d.concat([r]) : null;
|
||
return sm(Wt, Br, IC.bind(null, a, r), p);
|
||
}
|
||
function g7(r, a) {
|
||
}
|
||
var fm = g7;
|
||
function X1(r, a) {
|
||
var d = Bo(), p = a === void 0 ? null : a;
|
||
return d.memoizedState = [r, p], r;
|
||
}
|
||
function pm(r, a) {
|
||
var d = Ni(), p = a === void 0 ? null : a, g = d.memoizedState;
|
||
if (g !== null && p !== null) {
|
||
var C = g[1];
|
||
if (L1(p, C))
|
||
return g[0];
|
||
}
|
||
return d.memoizedState = [r, p], r;
|
||
}
|
||
function K1(r, a) {
|
||
var d = Bo(), p = a === void 0 ? null : a, g = r();
|
||
return d.memoizedState = [g, p], g;
|
||
}
|
||
function hm(r, a) {
|
||
var d = Ni(), p = a === void 0 ? null : a, g = d.memoizedState;
|
||
if (g !== null && p !== null) {
|
||
var C = g[1];
|
||
if (L1(p, C))
|
||
return g[0];
|
||
}
|
||
var D = r();
|
||
return d.memoizedState = [D, p], D;
|
||
}
|
||
function Z1(r) {
|
||
var a = Bo();
|
||
return a.memoizedState = r, r;
|
||
}
|
||
function LC(r) {
|
||
var a = Ni(), d = _r, p = d.memoizedState;
|
||
return BC(a, p, r);
|
||
}
|
||
function FC(r) {
|
||
var a = Ni();
|
||
if (_r === null)
|
||
return a.memoizedState = r, r;
|
||
var d = _r.memoizedState;
|
||
return BC(a, d, r);
|
||
}
|
||
function BC(r, a, d) {
|
||
var p = !Sv(Ou);
|
||
if (p) {
|
||
if (!cr(d, a)) {
|
||
var g = xu();
|
||
bn.lanes = kt(bn.lanes, g), $p(g), r.baseState = !0;
|
||
}
|
||
return a;
|
||
} else
|
||
return r.baseState && (r.baseState = !1, Bp()), r.memoizedState = d, d;
|
||
}
|
||
function y7(r, a, d) {
|
||
var p = ma();
|
||
or(Ev(p, ys)), r(!0);
|
||
var g = kp.transition;
|
||
kp.transition = {};
|
||
var C = kp.transition;
|
||
kp.transition._updatedFibers = /* @__PURE__ */ new Set();
|
||
try {
|
||
r(!1), a();
|
||
} finally {
|
||
if (or(p), kp.transition = g, g === null && C._updatedFibers) {
|
||
var D = C._updatedFibers.size;
|
||
D > 10 && y("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), C._updatedFibers.clear();
|
||
}
|
||
}
|
||
}
|
||
function J1() {
|
||
var r = im(!1), a = r[0], d = r[1], p = y7.bind(null, d), g = Bo();
|
||
return g.memoizedState = p, [a, p];
|
||
}
|
||
function _C() {
|
||
var r = V1(), a = r[0], d = Ni(), p = d.memoizedState;
|
||
return [a, p];
|
||
}
|
||
function UC() {
|
||
var r = W1(), a = r[0], d = Ni(), p = d.memoizedState;
|
||
return [a, p];
|
||
}
|
||
var HC = !1;
|
||
function x7() {
|
||
return HC;
|
||
}
|
||
function $1() {
|
||
var r = Bo(), a = Wm(), d = a.identifierPrefix, p;
|
||
if (v()) {
|
||
var g = Pv();
|
||
p = ":" + d + "R" + g;
|
||
var C = Op++;
|
||
C > 0 && (p += "H" + C.toString(32)), p += ":";
|
||
} else {
|
||
var D = h7++;
|
||
p = ":" + d + "r" + D.toString(32) + ":";
|
||
}
|
||
return r.memoizedState = p, p;
|
||
}
|
||
function vm() {
|
||
var r = Ni(), a = r.memoizedState;
|
||
return a;
|
||
}
|
||
function S7(r, a, d) {
|
||
typeof arguments[3] == "function" && m("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
|
||
var p = Pl(r), g = {
|
||
lane: p,
|
||
action: d,
|
||
hasEagerState: !1,
|
||
eagerState: null,
|
||
next: null
|
||
};
|
||
if (VC(r))
|
||
WC(a, g);
|
||
else {
|
||
var C = lC(r, a, g, p);
|
||
if (C !== null) {
|
||
var D = ba();
|
||
Dr(C, r, p, D), GC(C, a, p);
|
||
}
|
||
}
|
||
qC(r, p);
|
||
}
|
||
function b7(r, a, d) {
|
||
typeof arguments[3] == "function" && m("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
|
||
var p = Pl(r), g = {
|
||
lane: p,
|
||
action: d,
|
||
hasEagerState: !1,
|
||
eagerState: null,
|
||
next: null
|
||
};
|
||
if (VC(r))
|
||
WC(a, g);
|
||
else {
|
||
var C = r.alternate;
|
||
if (r.lanes === Me && (C === null || C.lanes === Me)) {
|
||
var D = a.lastRenderedReducer;
|
||
if (D !== null) {
|
||
var P;
|
||
P = lt.current, lt.current = uo;
|
||
try {
|
||
var O = a.lastRenderedState, F = D(O, d);
|
||
if (g.hasEagerState = !0, g.eagerState = F, cr(F, O)) {
|
||
$M(r, a, g, p);
|
||
return;
|
||
}
|
||
} catch {
|
||
} finally {
|
||
lt.current = P;
|
||
}
|
||
}
|
||
}
|
||
var W = lC(r, a, g, p);
|
||
if (W !== null) {
|
||
var re = ba();
|
||
Dr(W, r, p, re), GC(W, a, p);
|
||
}
|
||
}
|
||
qC(r, p);
|
||
}
|
||
function VC(r) {
|
||
var a = r.alternate;
|
||
return r === bn || a !== null && a === bn;
|
||
}
|
||
function WC(r, a) {
|
||
Pp = rm = !0;
|
||
var d = r.pending;
|
||
d === null ? a.next = a : (a.next = d.next, d.next = a), r.pending = a;
|
||
}
|
||
function GC(r, a, d) {
|
||
if (id(d)) {
|
||
var p = a.lanes;
|
||
p = vl(p, r.pendingLanes);
|
||
var g = kt(p, d);
|
||
a.lanes = g, dp(r, g);
|
||
}
|
||
}
|
||
function qC(r, a, d) {
|
||
ki(r, a);
|
||
}
|
||
var mm = {
|
||
readContext: jr,
|
||
useCallback: Sa,
|
||
useContext: Sa,
|
||
useEffect: Sa,
|
||
useImperativeHandle: Sa,
|
||
useInsertionEffect: Sa,
|
||
useLayoutEffect: Sa,
|
||
useMemo: Sa,
|
||
useReducer: Sa,
|
||
useRef: Sa,
|
||
useState: Sa,
|
||
useDebugValue: Sa,
|
||
useDeferredValue: Sa,
|
||
useTransition: Sa,
|
||
useMutableSource: Sa,
|
||
useSyncExternalStore: Sa,
|
||
useId: Sa,
|
||
unstable_isNewReconciler: M
|
||
}, YC = null, QC = null, XC = null, KC = null, _o = null, uo = null, gm = null;
|
||
{
|
||
var ey = function() {
|
||
m("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
|
||
}, Ft = function() {
|
||
m("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks");
|
||
};
|
||
YC = {
|
||
readContext: function(r) {
|
||
return jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", mn(), Md(a), X1(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", mn(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", mn(), Md(a), lm(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", mn(), Md(d), Q1(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", mn(), Md(a), q1(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", mn(), Md(a), Y1(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", mn(), Md(a);
|
||
var d = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return K1(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", mn();
|
||
var p = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return B1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", mn(), G1(r);
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", mn();
|
||
var a = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return im(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", mn(), void 0;
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", mn(), Z1(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", mn(), J1();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", mn(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", mn(), H1(r, a, d);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", mn(), $1();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, QC = {
|
||
readContext: function(r) {
|
||
return jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ke(), X1(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ke(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ke(), lm(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ke(), Q1(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ke(), q1(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ke(), Y1(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ke();
|
||
var d = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return K1(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ke();
|
||
var p = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return B1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ke(), G1(r);
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ke();
|
||
var a = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return im(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ke(), void 0;
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ke(), Z1(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ke(), J1();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ke(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ke(), H1(r, a, d);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ke(), $1();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, XC = {
|
||
readContext: function(r) {
|
||
return jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ke(), pm(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ke(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ke(), zp(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ke(), dm(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ke(), um(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ke(), cm(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ke();
|
||
var d = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return hm(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ke();
|
||
var p = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return _1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ke(), om();
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ke();
|
||
var a = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return V1(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ke(), fm();
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ke(), LC(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ke(), _C();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ke(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ke(), am(r, a);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ke(), vm();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, KC = {
|
||
readContext: function(r) {
|
||
return jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ke(), pm(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ke(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ke(), zp(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ke(), dm(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ke(), um(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ke(), cm(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ke();
|
||
var d = lt.current;
|
||
lt.current = gm;
|
||
try {
|
||
return hm(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ke();
|
||
var p = lt.current;
|
||
lt.current = gm;
|
||
try {
|
||
return U1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ke(), om();
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ke();
|
||
var a = lt.current;
|
||
lt.current = gm;
|
||
try {
|
||
return W1(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ke(), fm();
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ke(), FC(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ke(), UC();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ke(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ke(), am(r, a);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ke(), vm();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, _o = {
|
||
readContext: function(r) {
|
||
return ey(), jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ft(), mn(), X1(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ft(), mn(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ft(), mn(), lm(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ft(), mn(), Q1(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ft(), mn(), q1(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ft(), mn(), Y1(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ft(), mn();
|
||
var d = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return K1(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ft(), mn();
|
||
var p = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return B1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ft(), mn(), G1(r);
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ft(), mn();
|
||
var a = lt.current;
|
||
lt.current = _o;
|
||
try {
|
||
return im(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ft(), mn(), void 0;
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ft(), mn(), Z1(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ft(), mn(), J1();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ft(), mn(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ft(), mn(), H1(r, a, d);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ft(), mn(), $1();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, uo = {
|
||
readContext: function(r) {
|
||
return ey(), jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ft(), Ke(), pm(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ft(), Ke(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ft(), Ke(), zp(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ft(), Ke(), dm(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ft(), Ke(), um(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ft(), Ke(), cm(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ft(), Ke();
|
||
var d = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return hm(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ft(), Ke();
|
||
var p = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return _1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ft(), Ke(), om();
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ft(), Ke();
|
||
var a = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return V1(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ft(), Ke(), fm();
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ft(), Ke(), LC(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ft(), Ke(), _C();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ft(), Ke(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ft(), Ke(), am(r, a);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ft(), Ke(), vm();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
}, gm = {
|
||
readContext: function(r) {
|
||
return ey(), jr(r);
|
||
},
|
||
useCallback: function(r, a) {
|
||
return Se = "useCallback", Ft(), Ke(), pm(r, a);
|
||
},
|
||
useContext: function(r) {
|
||
return Se = "useContext", Ft(), Ke(), jr(r);
|
||
},
|
||
useEffect: function(r, a) {
|
||
return Se = "useEffect", Ft(), Ke(), zp(r, a);
|
||
},
|
||
useImperativeHandle: function(r, a, d) {
|
||
return Se = "useImperativeHandle", Ft(), Ke(), dm(r, a, d);
|
||
},
|
||
useInsertionEffect: function(r, a) {
|
||
return Se = "useInsertionEffect", Ft(), Ke(), um(r, a);
|
||
},
|
||
useLayoutEffect: function(r, a) {
|
||
return Se = "useLayoutEffect", Ft(), Ke(), cm(r, a);
|
||
},
|
||
useMemo: function(r, a) {
|
||
Se = "useMemo", Ft(), Ke();
|
||
var d = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return hm(r, a);
|
||
} finally {
|
||
lt.current = d;
|
||
}
|
||
},
|
||
useReducer: function(r, a, d) {
|
||
Se = "useReducer", Ft(), Ke();
|
||
var p = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return U1(r, a, d);
|
||
} finally {
|
||
lt.current = p;
|
||
}
|
||
},
|
||
useRef: function(r) {
|
||
return Se = "useRef", Ft(), Ke(), om();
|
||
},
|
||
useState: function(r) {
|
||
Se = "useState", Ft(), Ke();
|
||
var a = lt.current;
|
||
lt.current = uo;
|
||
try {
|
||
return W1(r);
|
||
} finally {
|
||
lt.current = a;
|
||
}
|
||
},
|
||
useDebugValue: function(r, a) {
|
||
return Se = "useDebugValue", Ft(), Ke(), fm();
|
||
},
|
||
useDeferredValue: function(r) {
|
||
return Se = "useDeferredValue", Ft(), Ke(), FC(r);
|
||
},
|
||
useTransition: function() {
|
||
return Se = "useTransition", Ft(), Ke(), UC();
|
||
},
|
||
useMutableSource: function(r, a, d) {
|
||
return Se = "useMutableSource", Ft(), Ke(), void 0;
|
||
},
|
||
useSyncExternalStore: function(r, a, d) {
|
||
return Se = "useSyncExternalStore", Ft(), Ke(), am(r, a);
|
||
},
|
||
useId: function() {
|
||
return Se = "useId", Ft(), Ke(), vm();
|
||
},
|
||
unstable_isNewReconciler: M
|
||
};
|
||
}
|
||
var Ml = o.unstable_now, ZC = 0, ym = -1, Ip = -1, xm = -1, ty = !1, Sm = !1;
|
||
function JC() {
|
||
return ty;
|
||
}
|
||
function C7() {
|
||
Sm = !0;
|
||
}
|
||
function w7() {
|
||
ty = !1, Sm = !1;
|
||
}
|
||
function E7() {
|
||
ty = Sm, Sm = !1;
|
||
}
|
||
function $C() {
|
||
return ZC;
|
||
}
|
||
function e4() {
|
||
ZC = Ml();
|
||
}
|
||
function ny(r) {
|
||
Ip = Ml(), r.actualStartTime < 0 && (r.actualStartTime = Ml());
|
||
}
|
||
function t4(r) {
|
||
Ip = -1;
|
||
}
|
||
function bm(r, a) {
|
||
if (Ip >= 0) {
|
||
var d = Ml() - Ip;
|
||
r.actualDuration += d, a && (r.selfBaseDuration = d), Ip = -1;
|
||
}
|
||
}
|
||
function Uo(r) {
|
||
if (ym >= 0) {
|
||
var a = Ml() - ym;
|
||
ym = -1;
|
||
for (var d = r.return; d !== null; ) {
|
||
switch (d.tag) {
|
||
case J:
|
||
var p = d.stateNode;
|
||
p.effectDuration += a;
|
||
return;
|
||
case Y:
|
||
var g = d.stateNode;
|
||
g.effectDuration += a;
|
||
return;
|
||
}
|
||
d = d.return;
|
||
}
|
||
}
|
||
}
|
||
function ry(r) {
|
||
if (xm >= 0) {
|
||
var a = Ml() - xm;
|
||
xm = -1;
|
||
for (var d = r.return; d !== null; ) {
|
||
switch (d.tag) {
|
||
case J:
|
||
var p = d.stateNode;
|
||
p !== null && (p.passiveEffectDuration += a);
|
||
return;
|
||
case Y:
|
||
var g = d.stateNode;
|
||
g !== null && (g.passiveEffectDuration += a);
|
||
return;
|
||
}
|
||
d = d.return;
|
||
}
|
||
}
|
||
}
|
||
function Ho() {
|
||
ym = Ml();
|
||
}
|
||
function ay() {
|
||
xm = Ml();
|
||
}
|
||
function iy(r) {
|
||
for (var a = r.child; a; )
|
||
r.actualDuration += a.actualDuration, a = a.sibling;
|
||
}
|
||
function Au(r, a) {
|
||
return {
|
||
value: r,
|
||
source: a,
|
||
stack: Ue(a),
|
||
digest: null
|
||
};
|
||
}
|
||
function oy(r, a, d) {
|
||
return {
|
||
value: r,
|
||
source: null,
|
||
stack: d ?? null,
|
||
digest: a ?? null
|
||
};
|
||
}
|
||
function j7(r, a) {
|
||
return !0;
|
||
}
|
||
function sy(r, a) {
|
||
try {
|
||
var d = j7(r, a);
|
||
if (d === !1)
|
||
return;
|
||
var p = a.value, g = a.source, C = a.stack, D = C !== null ? C : "";
|
||
if (p != null && p._suppressLogging) {
|
||
if (r.tag === B)
|
||
return;
|
||
console.error(p);
|
||
}
|
||
var P = g ? vt(g) : null, O = P ? "The above error occurred in the <" + P + "> component:" : "The above error occurred in one of your React components:", F;
|
||
if (r.tag === J)
|
||
F = `Consider adding an error boundary to your tree to customize error handling behavior.
|
||
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;
|
||
else {
|
||
var W = vt(r) || "Anonymous";
|
||
F = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + W + ".");
|
||
}
|
||
var re = O + `
|
||
` + D + `
|
||
|
||
` + ("" + F);
|
||
console.error(re);
|
||
} catch (de) {
|
||
setTimeout(function() {
|
||
throw de;
|
||
});
|
||
}
|
||
}
|
||
var T7 = typeof WeakMap == "function" ? WeakMap : Map;
|
||
function n4(r, a, d) {
|
||
var p = Rs(Tn, d);
|
||
p.tag = s1, p.payload = {
|
||
element: null
|
||
};
|
||
var g = a.value;
|
||
return p.callback = function() {
|
||
z8(g), sy(r, a);
|
||
}, p;
|
||
}
|
||
function ly(r, a, d) {
|
||
var p = Rs(Tn, d);
|
||
p.tag = s1;
|
||
var g = r.type.getDerivedStateFromError;
|
||
if (typeof g == "function") {
|
||
var C = a.value;
|
||
p.payload = function() {
|
||
return g(C);
|
||
}, p.callback = function() {
|
||
h3(r), sy(r, a);
|
||
};
|
||
}
|
||
var D = r.stateNode;
|
||
return D !== null && typeof D.componentDidCatch == "function" && (p.callback = function() {
|
||
h3(r), sy(r, a), typeof g != "function" && A8(this);
|
||
var O = a.value, F = a.stack;
|
||
this.componentDidCatch(O, {
|
||
componentStack: F !== null ? F : ""
|
||
}), typeof g != "function" && (er(r.lanes, Pt) || m("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", vt(r) || "Unknown"));
|
||
}), p;
|
||
}
|
||
function r4(r, a, d) {
|
||
var p = r.pingCache, g;
|
||
if (p === null ? (p = r.pingCache = new T7(), g = /* @__PURE__ */ new Set(), p.set(a, g)) : (g = p.get(a), g === void 0 && (g = /* @__PURE__ */ new Set(), p.set(a, g))), !g.has(d)) {
|
||
g.add(d);
|
||
var C = I8.bind(null, r, a, d);
|
||
ya && eh(r, d), a.then(C, C);
|
||
}
|
||
}
|
||
function D7(r, a, d, p) {
|
||
var g = r.updateQueue;
|
||
if (g === null) {
|
||
var C = /* @__PURE__ */ new Set();
|
||
C.add(d), r.updateQueue = C;
|
||
} else
|
||
g.add(d);
|
||
}
|
||
function M7(r, a) {
|
||
var d = r.tag;
|
||
if ((r.mode & Zt) === Mt && (d === U || d === $ || d === ne)) {
|
||
var p = r.alternate;
|
||
p ? (r.updateQueue = p.updateQueue, r.memoizedState = p.memoizedState, r.lanes = p.lanes) : (r.updateQueue = null, r.memoizedState = null);
|
||
}
|
||
}
|
||
function a4(r) {
|
||
var a = r;
|
||
do {
|
||
if (a.tag === te && f7(a))
|
||
return a;
|
||
a = a.return;
|
||
} while (a !== null);
|
||
return null;
|
||
}
|
||
function i4(r, a, d, p, g) {
|
||
if ((r.mode & Zt) === Mt) {
|
||
if (r === a)
|
||
r.flags |= $r;
|
||
else {
|
||
if (r.flags |= sn, d.flags |= Qs, d.flags &= ~(Zh | ru), d.tag === B) {
|
||
var C = d.alternate;
|
||
if (C === null)
|
||
d.tag = Ee;
|
||
else {
|
||
var D = Rs(Tn, Pt);
|
||
D.tag = Gv, El(d, D, Pt);
|
||
}
|
||
}
|
||
d.lanes = kt(d.lanes, Pt);
|
||
}
|
||
return r;
|
||
}
|
||
return r.flags |= $r, r.lanes = g, r;
|
||
}
|
||
function R7(r, a, d, p, g) {
|
||
if (d.flags |= ru, ya && eh(r, g), p !== null && typeof p == "object" && typeof p.then == "function") {
|
||
var C = p;
|
||
M7(d), v() && d.mode & Zt && Cp();
|
||
var D = a4(a);
|
||
if (D !== null) {
|
||
D.flags &= ~Wi, i4(D, a, d, r, g), D.mode & Zt && r4(r, C, g), D7(D, r, C);
|
||
return;
|
||
} else {
|
||
if (!xv(g)) {
|
||
r4(r, C, g), Gy();
|
||
return;
|
||
}
|
||
var P = new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");
|
||
p = P;
|
||
}
|
||
} else if (v() && d.mode & Zt) {
|
||
Cp();
|
||
var O = a4(a);
|
||
if (O !== null) {
|
||
(O.flags & $r) === dt && (O.flags |= Wi), i4(O, a, d, r, g), S(Au(p, d));
|
||
return;
|
||
}
|
||
}
|
||
p = Au(p, d), j8(p);
|
||
var F = a;
|
||
do {
|
||
switch (F.tag) {
|
||
case J: {
|
||
var W = p;
|
||
F.flags |= $r;
|
||
var re = gs(g);
|
||
F.lanes = kt(F.lanes, re);
|
||
var de = n4(F, W, re);
|
||
c1(F, de);
|
||
return;
|
||
}
|
||
case B:
|
||
var be = p, Re = F.type, De = F.stateNode;
|
||
if ((F.flags & sn) === dt && (typeof Re.getDerivedStateFromError == "function" || De !== null && typeof De.componentDidCatch == "function" && !i3(De))) {
|
||
F.flags |= $r;
|
||
var wt = gs(g);
|
||
F.lanes = kt(F.lanes, wt);
|
||
var zt = ly(F, be, wt);
|
||
c1(F, zt);
|
||
return;
|
||
}
|
||
break;
|
||
}
|
||
F = F.return;
|
||
} while (F !== null);
|
||
}
|
||
function k7() {
|
||
return null;
|
||
}
|
||
var Lp = l.ReactCurrentOwner, co = !1, uy, Fp, cy, dy, fy, Nu, py, Cm;
|
||
uy = {}, Fp = {}, cy = {}, dy = {}, fy = {}, Nu = !1, py = {}, Cm = {};
|
||
function La(r, a, d, p) {
|
||
r === null ? a.child = EC(a, null, d, p) : a.child = wd(a, r.child, d, p);
|
||
}
|
||
function P7(r, a, d, p) {
|
||
a.child = wd(a, r.child, null, p), a.child = wd(a, null, d, p);
|
||
}
|
||
function o4(r, a, d, p, g) {
|
||
if (a.type !== a.elementType) {
|
||
var C = d.propTypes;
|
||
C && qa(
|
||
C,
|
||
p,
|
||
// Resolved props
|
||
"prop",
|
||
yt(d)
|
||
);
|
||
}
|
||
var D = d.render, P = a.ref, O, F;
|
||
Cd(a, g), Ss(a);
|
||
{
|
||
if (Lp.current = a, K(!0), O = Rd(r, a, D, p, P, g), F = kd(), a.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
O = Rd(r, a, D, p, P, g), F = kd();
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
K(!1);
|
||
}
|
||
return On(), r !== null && !co ? (MC(r, a, g), ks(r, a, g)) : (v() && F && bp(a), a.flags |= Nn, La(r, a, O, g), a.child);
|
||
}
|
||
function s4(r, a, d, p, g) {
|
||
if (r === null) {
|
||
var C = d.type;
|
||
if ($8(C) && d.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
|
||
d.defaultProps === void 0) {
|
||
var D = C;
|
||
return D = Fd(C), a.tag = ne, a.type = D, my(a, C), l4(r, a, D, p, g);
|
||
}
|
||
{
|
||
var P = C.propTypes;
|
||
P && qa(
|
||
P,
|
||
p,
|
||
// Resolved props
|
||
"prop",
|
||
yt(C)
|
||
);
|
||
}
|
||
var O = t2(d.type, null, p, a, a.mode, g);
|
||
return O.ref = a.ref, O.return = a, a.child = O, O;
|
||
}
|
||
{
|
||
var F = d.type, W = F.propTypes;
|
||
W && qa(
|
||
W,
|
||
p,
|
||
// Resolved props
|
||
"prop",
|
||
yt(F)
|
||
);
|
||
}
|
||
var re = r.child, de = Cy(r, g);
|
||
if (!de) {
|
||
var be = re.memoizedProps, Re = d.compare;
|
||
if (Re = Re !== null ? Re : X, Re(be, p) && r.ref === a.ref)
|
||
return ks(r, a, g);
|
||
}
|
||
a.flags |= Nn;
|
||
var De = Bu(re, p);
|
||
return De.ref = a.ref, De.return = a, a.child = De, De;
|
||
}
|
||
function l4(r, a, d, p, g) {
|
||
if (a.type !== a.elementType) {
|
||
var C = a.elementType;
|
||
if (C.$$typeof === Fe) {
|
||
var D = C, P = D._payload, O = D._init;
|
||
try {
|
||
C = O(P);
|
||
} catch {
|
||
C = null;
|
||
}
|
||
var F = C && C.propTypes;
|
||
F && qa(
|
||
F,
|
||
p,
|
||
// Resolved (SimpleMemoComponent has no defaultProps)
|
||
"prop",
|
||
yt(C)
|
||
);
|
||
}
|
||
}
|
||
if (r !== null) {
|
||
var W = r.memoizedProps;
|
||
if (X(W, p) && r.ref === a.ref && // Prevent bailout if the implementation changed due to hot reload.
|
||
a.type === r.type)
|
||
if (co = !1, a.pendingProps = p = W, Cy(r, g))
|
||
(r.flags & Qs) !== dt && (co = !0);
|
||
else
|
||
return a.lanes = r.lanes, ks(r, a, g);
|
||
}
|
||
return hy(r, a, d, p, g);
|
||
}
|
||
function u4(r, a, d) {
|
||
var p = a.pendingProps, g = p.children, C = r !== null ? r.memoizedState : null;
|
||
if (p.mode === "hidden" || k)
|
||
if ((a.mode & Zt) === Mt) {
|
||
var D = {
|
||
baseLanes: Me,
|
||
cachePool: null,
|
||
transitions: null
|
||
};
|
||
a.memoizedState = D, qm(a, d);
|
||
} else if (er(d, va)) {
|
||
var re = {
|
||
baseLanes: Me,
|
||
cachePool: null,
|
||
transitions: null
|
||
};
|
||
a.memoizedState = re;
|
||
var de = C !== null ? C.baseLanes : d;
|
||
qm(a, de);
|
||
} else {
|
||
var P = null, O;
|
||
if (C !== null) {
|
||
var F = C.baseLanes;
|
||
O = kt(F, d);
|
||
} else
|
||
O = d;
|
||
a.lanes = a.childLanes = va;
|
||
var W = {
|
||
baseLanes: O,
|
||
cachePool: P,
|
||
transitions: null
|
||
};
|
||
return a.memoizedState = W, a.updateQueue = null, qm(a, O), null;
|
||
}
|
||
else {
|
||
var be;
|
||
C !== null ? (be = kt(C.baseLanes, d), a.memoizedState = null) : be = d, qm(a, be);
|
||
}
|
||
return La(r, a, g, d), a.child;
|
||
}
|
||
function O7(r, a, d) {
|
||
var p = a.pendingProps;
|
||
return La(r, a, p, d), a.child;
|
||
}
|
||
function A7(r, a, d) {
|
||
var p = a.pendingProps.children;
|
||
return La(r, a, p, d), a.child;
|
||
}
|
||
function N7(r, a, d) {
|
||
{
|
||
a.flags |= Wt;
|
||
{
|
||
var p = a.stateNode;
|
||
p.effectDuration = 0, p.passiveEffectDuration = 0;
|
||
}
|
||
}
|
||
var g = a.pendingProps, C = g.children;
|
||
return La(r, a, C, d), a.child;
|
||
}
|
||
function c4(r, a) {
|
||
var d = a.ref;
|
||
(r === null && d !== null || r !== null && r.ref !== d) && (a.flags |= wi, a.flags |= Mf);
|
||
}
|
||
function hy(r, a, d, p, g) {
|
||
if (a.type !== a.elementType) {
|
||
var C = d.propTypes;
|
||
C && qa(
|
||
C,
|
||
p,
|
||
// Resolved props
|
||
"prop",
|
||
yt(d)
|
||
);
|
||
}
|
||
var D;
|
||
{
|
||
var P = Mo(a, d, !0);
|
||
D = eo(a, P);
|
||
}
|
||
var O, F;
|
||
Cd(a, g), Ss(a);
|
||
{
|
||
if (Lp.current = a, K(!0), O = Rd(r, a, d, p, D, g), F = kd(), a.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
O = Rd(r, a, d, p, D, g), F = kd();
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
K(!1);
|
||
}
|
||
return On(), r !== null && !co ? (MC(r, a, g), ks(r, a, g)) : (v() && F && bp(a), a.flags |= Nn, La(r, a, O, g), a.child);
|
||
}
|
||
function d4(r, a, d, p, g) {
|
||
{
|
||
switch (w3(a)) {
|
||
case !1: {
|
||
var C = a.stateNode, D = a.type, P = new D(a.memoizedProps, C.context), O = P.state;
|
||
C.updater.enqueueSetState(C, O, null);
|
||
break;
|
||
}
|
||
case !0: {
|
||
a.flags |= sn, a.flags |= $r;
|
||
var F = new Error("Simulated error coming from DevTools"), W = gs(g);
|
||
a.lanes = kt(a.lanes, W);
|
||
var re = ly(a, Au(F, a), W);
|
||
c1(a, re);
|
||
break;
|
||
}
|
||
}
|
||
if (a.type !== a.elementType) {
|
||
var de = d.propTypes;
|
||
de && qa(
|
||
de,
|
||
p,
|
||
// Resolved props
|
||
"prop",
|
||
yt(d)
|
||
);
|
||
}
|
||
}
|
||
var be;
|
||
Kr(d) ? (be = !0, Ro(a)) : be = !1, Cd(a, g);
|
||
var Re = a.stateNode, De;
|
||
Re === null ? (Em(r, a), xC(a, d, p), C1(a, d, p, g), De = !0) : r === null ? De = o7(a, d, p, g) : De = s7(r, a, d, p, g);
|
||
var wt = vy(r, a, d, De, be, g);
|
||
{
|
||
var zt = a.stateNode;
|
||
De && zt.props !== p && (Nu || m("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", vt(a) || "a component"), Nu = !0);
|
||
}
|
||
return wt;
|
||
}
|
||
function vy(r, a, d, p, g, C) {
|
||
c4(r, a);
|
||
var D = (a.flags & sn) !== dt;
|
||
if (!p && !D)
|
||
return g && ul(a, d, !1), ks(r, a, C);
|
||
var P = a.stateNode;
|
||
Lp.current = a;
|
||
var O;
|
||
if (D && typeof d.getDerivedStateFromError != "function")
|
||
O = null, t4();
|
||
else {
|
||
Ss(a);
|
||
{
|
||
if (K(!0), O = P.render(), a.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
P.render();
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
K(!1);
|
||
}
|
||
On();
|
||
}
|
||
return a.flags |= Nn, r !== null && D ? P7(r, a, O, C) : La(r, a, O, C), a.memoizedState = P.state, g && ul(a, d, !0), a.child;
|
||
}
|
||
function f4(r) {
|
||
var a = r.stateNode;
|
||
a.pendingContext ? hr(r, a.pendingContext, a.pendingContext !== a.context) : a.context && hr(r, a.context, !1), R1(r, a.containerInfo);
|
||
}
|
||
function z7(r, a, d) {
|
||
if (f4(a), r === null)
|
||
throw new Error("Should have a current fiber. This is a bug in React.");
|
||
var p = a.pendingProps, g = a.memoizedState, C = g.element;
|
||
dC(r, a), Xv(a, p, null, d);
|
||
var D = a.memoizedState;
|
||
a.stateNode;
|
||
var P = D.element;
|
||
if (Qr && g.isDehydrated) {
|
||
var O = {
|
||
element: P,
|
||
isDehydrated: !1,
|
||
cache: D.cache,
|
||
pendingSuspenseBoundaries: D.pendingSuspenseBoundaries,
|
||
transitions: D.transitions
|
||
}, F = a.updateQueue;
|
||
if (F.baseState = O, a.memoizedState = O, a.flags & Wi) {
|
||
var W = Au(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."), a);
|
||
return p4(r, a, P, d, W);
|
||
} else if (P !== C) {
|
||
var re = Au(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."), a);
|
||
return p4(r, a, P, d, re);
|
||
} else {
|
||
$0(a);
|
||
var de = EC(a, null, P, d);
|
||
a.child = de;
|
||
for (var be = de; be; )
|
||
be.flags = be.flags & ~jn | Gi, be = be.sibling;
|
||
}
|
||
} else {
|
||
if (s(), P === C)
|
||
return ks(r, a, d);
|
||
La(r, a, P, d);
|
||
}
|
||
return a.child;
|
||
}
|
||
function p4(r, a, d, p, g) {
|
||
return s(), S(g), a.flags |= Wi, La(r, a, d, p), a.child;
|
||
}
|
||
function I7(r, a, d) {
|
||
jC(a), r === null && ku(a);
|
||
var p = a.type, g = a.pendingProps, C = r !== null ? r.memoizedProps : null, D = g.children, P = Tc(p, g);
|
||
return P ? D = null : C !== null && Tc(p, C) && (a.flags |= nu), c4(r, a), La(r, a, D, d), a.child;
|
||
}
|
||
function L7(r, a) {
|
||
return r === null && ku(a), null;
|
||
}
|
||
function F7(r, a, d, p) {
|
||
Em(r, a);
|
||
var g = a.pendingProps, C = d, D = C._payload, P = C._init, O = P(D);
|
||
a.type = O;
|
||
var F = a.tag = eR(O), W = so(O, g), re;
|
||
switch (F) {
|
||
case U:
|
||
return my(a, O), a.type = O = Fd(O), re = hy(null, a, O, W, p), re;
|
||
case B:
|
||
return a.type = O = Xy(O), re = d4(null, a, O, W, p), re;
|
||
case $:
|
||
return a.type = O = Ky(O), re = o4(null, a, O, W, p), re;
|
||
case V: {
|
||
if (a.type !== a.elementType) {
|
||
var de = O.propTypes;
|
||
de && qa(
|
||
de,
|
||
W,
|
||
// Resolved for outer only
|
||
"prop",
|
||
yt(O)
|
||
);
|
||
}
|
||
return re = s4(
|
||
null,
|
||
a,
|
||
O,
|
||
so(O.type, W),
|
||
// The inner type can have defaults too
|
||
p
|
||
), re;
|
||
}
|
||
}
|
||
var be = "";
|
||
throw O !== null && typeof O == "object" && O.$$typeof === Fe && (be = " Did you wrap a component in React.lazy() more than once?"), new Error("Element type is invalid. Received a promise that resolves to: " + O + ". " + ("Lazy element type must resolve to a class or function." + be));
|
||
}
|
||
function B7(r, a, d, p, g) {
|
||
Em(r, a), a.tag = B;
|
||
var C;
|
||
return Kr(d) ? (C = !0, Ro(a)) : C = !1, Cd(a, g), xC(a, d, p), C1(a, d, p, g), vy(null, a, d, !0, C, g);
|
||
}
|
||
function _7(r, a, d, p) {
|
||
Em(r, a);
|
||
var g = a.pendingProps, C;
|
||
{
|
||
var D = Mo(a, d, !1);
|
||
C = eo(a, D);
|
||
}
|
||
Cd(a, p);
|
||
var P, O;
|
||
Ss(a);
|
||
{
|
||
if (d.prototype && typeof d.prototype.render == "function") {
|
||
var F = yt(d) || "Unknown";
|
||
uy[F] || (m("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", F, F), uy[F] = !0);
|
||
}
|
||
a.mode & hn && pe.recordLegacyContextWarning(a, null), K(!0), Lp.current = a, P = Rd(null, a, d, g, C, p), O = kd(), K(!1);
|
||
}
|
||
if (On(), a.flags |= Nn, typeof P == "object" && P !== null && typeof P.render == "function" && P.$$typeof === void 0) {
|
||
var W = yt(d) || "Unknown";
|
||
Fp[W] || (m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", W, W, W), Fp[W] = !0);
|
||
}
|
||
if (
|
||
// Run these checks in production only if the flag is off.
|
||
// Eventually we'll delete this branch altogether.
|
||
typeof P == "object" && P !== null && typeof P.render == "function" && P.$$typeof === void 0
|
||
) {
|
||
{
|
||
var re = yt(d) || "Unknown";
|
||
Fp[re] || (m("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", re, re, re), Fp[re] = !0);
|
||
}
|
||
a.tag = B, a.memoizedState = null, a.updateQueue = null;
|
||
var de = !1;
|
||
return Kr(d) ? (de = !0, Ro(a)) : de = !1, a.memoizedState = P.state !== null && P.state !== void 0 ? P.state : null, u1(a), yC(a, P), C1(a, d, g, p), vy(null, a, d, !0, de, p);
|
||
} else {
|
||
if (a.tag = U, a.mode & hn) {
|
||
sr(!0);
|
||
try {
|
||
P = Rd(null, a, d, g, C, p), O = kd();
|
||
} finally {
|
||
sr(!1);
|
||
}
|
||
}
|
||
return v() && O && bp(a), La(null, a, P, p), my(a, d), a.child;
|
||
}
|
||
}
|
||
function my(r, a) {
|
||
{
|
||
if (a && a.childContextTypes && m("%s(...): childContextTypes cannot be defined on a function component.", a.displayName || a.name || "Component"), r.ref !== null) {
|
||
var d = "", p = In();
|
||
p && (d += `
|
||
|
||
Check the render method of \`` + p + "`.");
|
||
var g = p || "", C = r._debugSource;
|
||
C && (g = C.fileName + ":" + C.lineNumber), fy[g] || (fy[g] = !0, m("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s", d));
|
||
}
|
||
if (typeof a.getDerivedStateFromProps == "function") {
|
||
var D = yt(a) || "Unknown";
|
||
dy[D] || (m("%s: Function components do not support getDerivedStateFromProps.", D), dy[D] = !0);
|
||
}
|
||
if (typeof a.contextType == "object" && a.contextType !== null) {
|
||
var P = yt(a) || "Unknown";
|
||
cy[P] || (m("%s: Function components do not support contextType.", P), cy[P] = !0);
|
||
}
|
||
}
|
||
}
|
||
var gy = {
|
||
dehydrated: null,
|
||
treeContext: null,
|
||
retryLane: vr
|
||
};
|
||
function yy(r) {
|
||
return {
|
||
baseLanes: r,
|
||
cachePool: k7(),
|
||
transitions: null
|
||
};
|
||
}
|
||
function U7(r, a) {
|
||
var d = null;
|
||
return {
|
||
baseLanes: kt(r.baseLanes, a),
|
||
cachePool: d,
|
||
transitions: r.transitions
|
||
};
|
||
}
|
||
function H7(r, a, d, p) {
|
||
if (a !== null) {
|
||
var g = a.memoizedState;
|
||
if (g === null)
|
||
return !1;
|
||
}
|
||
return P1(r, Rp);
|
||
}
|
||
function V7(r, a) {
|
||
return Su(r.childLanes, a);
|
||
}
|
||
function h4(r, a, d) {
|
||
var p = a.pendingProps;
|
||
j3(a) && (a.flags |= sn);
|
||
var g = lo.current, C = !1, D = (a.flags & sn) !== dt;
|
||
if (D || H7(g, r) ? (C = !0, a.flags &= ~sn) : (r === null || r.memoizedState !== null) && (g = d7(g, DC)), g = jd(g), Tl(a, g), r === null) {
|
||
ku(a);
|
||
var P = a.memoizedState;
|
||
if (P !== null) {
|
||
var O = P.dehydrated;
|
||
if (O !== null)
|
||
return Q7(a, O);
|
||
}
|
||
var F = p.children, W = p.fallback;
|
||
if (C) {
|
||
var re = W7(a, F, W, d), de = a.child;
|
||
return de.memoizedState = yy(d), a.memoizedState = gy, re;
|
||
} else
|
||
return xy(a, F);
|
||
} else {
|
||
var be = r.memoizedState;
|
||
if (be !== null) {
|
||
var Re = be.dehydrated;
|
||
if (Re !== null)
|
||
return X7(r, a, D, p, Re, be, d);
|
||
}
|
||
if (C) {
|
||
var De = p.fallback, wt = p.children, zt = q7(r, a, wt, De, d), Tt = a.child, Cn = r.child.memoizedState;
|
||
return Tt.memoizedState = Cn === null ? yy(d) : U7(Cn, d), Tt.childLanes = V7(r, d), a.memoizedState = gy, zt;
|
||
} else {
|
||
var ln = p.children, oe = G7(r, a, ln, d);
|
||
return a.memoizedState = null, oe;
|
||
}
|
||
}
|
||
}
|
||
function xy(r, a, d) {
|
||
var p = r.mode, g = {
|
||
mode: "visible",
|
||
children: a
|
||
}, C = Sy(g, p);
|
||
return C.return = r, r.child = C, C;
|
||
}
|
||
function W7(r, a, d, p) {
|
||
var g = r.mode, C = r.child, D = {
|
||
mode: "hidden",
|
||
children: a
|
||
}, P, O;
|
||
return (g & Zt) === Mt && C !== null ? (P = C, P.childLanes = Me, P.pendingProps = D, r.mode & Gt && (P.actualDuration = 0, P.actualStartTime = -1, P.selfBaseDuration = 0, P.treeBaseDuration = 0), O = Al(d, g, p, null)) : (P = Sy(D, g), O = Al(d, g, p, null)), P.return = r, O.return = r, P.sibling = O, r.child = P, O;
|
||
}
|
||
function Sy(r, a, d) {
|
||
return m3(r, a, Me, null);
|
||
}
|
||
function v4(r, a) {
|
||
return Bu(r, a);
|
||
}
|
||
function G7(r, a, d, p) {
|
||
var g = r.child, C = g.sibling, D = v4(g, {
|
||
mode: "visible",
|
||
children: d
|
||
});
|
||
if ((a.mode & Zt) === Mt && (D.lanes = p), D.return = a, D.sibling = null, C !== null) {
|
||
var P = a.deletions;
|
||
P === null ? (a.deletions = [C], a.flags |= da) : P.push(C);
|
||
}
|
||
return a.child = D, D;
|
||
}
|
||
function q7(r, a, d, p, g) {
|
||
var C = a.mode, D = r.child, P = D.sibling, O = {
|
||
mode: "hidden",
|
||
children: d
|
||
}, F;
|
||
if (
|
||
// In legacy mode, we commit the primary tree as if it successfully
|
||
// completed, even though it's in an inconsistent state.
|
||
(C & Zt) === Mt && // Make sure we're on the second pass, i.e. the primary child fragment was
|
||
// already cloned. In legacy mode, the only case where this isn't true is
|
||
// when DevTools forces us to display a fallback; we skip the first render
|
||
// pass entirely and go straight to rendering the fallback. (In Concurrent
|
||
// Mode, SuspenseList can also trigger this scenario, but this is a legacy-
|
||
// only codepath.)
|
||
a.child !== D
|
||
) {
|
||
var W = a.child;
|
||
F = W, F.childLanes = Me, F.pendingProps = O, a.mode & Gt && (F.actualDuration = 0, F.actualStartTime = -1, F.selfBaseDuration = D.selfBaseDuration, F.treeBaseDuration = D.treeBaseDuration), a.deletions = null;
|
||
} else
|
||
F = v4(D, O), F.subtreeFlags = D.subtreeFlags & Yi;
|
||
var re;
|
||
return P !== null ? re = Bu(P, p) : (re = Al(p, C, g, null), re.flags |= jn), re.return = a, F.return = a, F.sibling = re, a.child = F, re;
|
||
}
|
||
function wm(r, a, d, p) {
|
||
p !== null && S(p), wd(a, r.child, null, d);
|
||
var g = a.pendingProps, C = g.children, D = xy(a, C);
|
||
return D.flags |= jn, a.memoizedState = null, D;
|
||
}
|
||
function Y7(r, a, d, p, g) {
|
||
var C = a.mode, D = {
|
||
mode: "visible",
|
||
children: d
|
||
}, P = Sy(D, C), O = Al(p, C, g, null);
|
||
return O.flags |= jn, P.return = a, O.return = a, P.sibling = O, a.child = P, (a.mode & Zt) !== Mt && wd(a, r.child, null, g), O;
|
||
}
|
||
function Q7(r, a, d) {
|
||
return (r.mode & Zt) === Mt ? (m("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."), r.lanes = Pt) : Ki(a) ? r.lanes = fi : r.lanes = va, null;
|
||
}
|
||
function X7(r, a, d, p, g, C, D) {
|
||
if (d)
|
||
if (a.flags & Wi) {
|
||
a.flags &= ~Wi;
|
||
var oe = oy(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));
|
||
return wm(r, a, D, oe);
|
||
} else {
|
||
if (a.memoizedState !== null)
|
||
return a.child = r.child, a.flags |= sn, null;
|
||
var ye = p.children, ie = p.fallback, Ge = Y7(r, a, ye, ie, D), bt = a.child;
|
||
return bt.memoizedState = yy(D), a.memoizedState = gy, Ge;
|
||
}
|
||
else {
|
||
if (J0(), (a.mode & Zt) === Mt)
|
||
return wm(
|
||
r,
|
||
a,
|
||
D,
|
||
// TODO: When we delete legacy mode, we should make this error argument
|
||
// required — every concurrent mode path that causes hydration to
|
||
// de-opt to client rendering should have an error message.
|
||
null
|
||
);
|
||
if (Ki(g)) {
|
||
var P, O, F;
|
||
{
|
||
var W = av(g);
|
||
P = W.digest, O = W.message, F = W.stack;
|
||
}
|
||
var re;
|
||
O ? re = new Error(O) : re = new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");
|
||
var de = oy(re, P, F);
|
||
return wm(r, a, D, de);
|
||
}
|
||
var be = er(D, r.childLanes);
|
||
if (co || be) {
|
||
var Re = Wm();
|
||
if (Re !== null) {
|
||
var De = ld(Re, D);
|
||
if (De !== vr && De !== C.retryLane) {
|
||
C.retryLane = De;
|
||
var wt = Tn;
|
||
Ia(r, De), Dr(Re, r, De, wt);
|
||
}
|
||
}
|
||
Gy();
|
||
var zt = oy(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));
|
||
return wm(r, a, D, zt);
|
||
} else if (Ti(g)) {
|
||
a.flags |= sn, a.child = r.child;
|
||
var Tt = L8.bind(null, r);
|
||
return Vf(g, Tt), null;
|
||
} else {
|
||
Xa(a, g, C.treeContext);
|
||
var Cn = p.children, ln = xy(a, Cn);
|
||
return ln.flags |= Gi, ln;
|
||
}
|
||
}
|
||
}
|
||
function m4(r, a, d) {
|
||
r.lanes = kt(r.lanes, a);
|
||
var p = r.alternate;
|
||
p !== null && (p.lanes = kt(p.lanes, a)), i1(r.return, a, d);
|
||
}
|
||
function K7(r, a, d) {
|
||
for (var p = a; p !== null; ) {
|
||
if (p.tag === te) {
|
||
var g = p.memoizedState;
|
||
g !== null && m4(p, d, r);
|
||
} else if (p.tag === ve)
|
||
m4(p, d, r);
|
||
else if (p.child !== null) {
|
||
p.child.return = p, p = p.child;
|
||
continue;
|
||
}
|
||
if (p === r)
|
||
return;
|
||
for (; p.sibling === null; ) {
|
||
if (p.return === null || p.return === r)
|
||
return;
|
||
p = p.return;
|
||
}
|
||
p.sibling.return = p.return, p = p.sibling;
|
||
}
|
||
}
|
||
function Z7(r) {
|
||
for (var a = r, d = null; a !== null; ) {
|
||
var p = a.alternate;
|
||
p !== null && nm(p) === null && (d = a), a = a.sibling;
|
||
}
|
||
return d;
|
||
}
|
||
function J7(r) {
|
||
if (r !== void 0 && r !== "forwards" && r !== "backwards" && r !== "together" && !py[r])
|
||
if (py[r] = !0, typeof r == "string")
|
||
switch (r.toLowerCase()) {
|
||
case "together":
|
||
case "forwards":
|
||
case "backwards": {
|
||
m('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.', r, r.toLowerCase());
|
||
break;
|
||
}
|
||
case "forward":
|
||
case "backward": {
|
||
m('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.', r, r.toLowerCase());
|
||
break;
|
||
}
|
||
default:
|
||
m('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', r);
|
||
break;
|
||
}
|
||
else
|
||
m('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', r);
|
||
}
|
||
function $7(r, a) {
|
||
r !== void 0 && !Cm[r] && (r !== "collapsed" && r !== "hidden" ? (Cm[r] = !0, m('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?', r)) : a !== "forwards" && a !== "backwards" && (Cm[r] = !0, m('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', r)));
|
||
}
|
||
function g4(r, a) {
|
||
{
|
||
var d = Kt(r), p = !d && typeof Ne(r) == "function";
|
||
if (d || p) {
|
||
var g = d ? "array" : "iterable";
|
||
return m("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>", g, a, g), !1;
|
||
}
|
||
}
|
||
return !0;
|
||
}
|
||
function e9(r, a) {
|
||
if ((a === "forwards" || a === "backwards") && r !== void 0 && r !== null && r !== !1)
|
||
if (Kt(r)) {
|
||
for (var d = 0; d < r.length; d++)
|
||
if (!g4(r[d], d))
|
||
return;
|
||
} else {
|
||
var p = Ne(r);
|
||
if (typeof p == "function") {
|
||
var g = p.call(r);
|
||
if (g)
|
||
for (var C = g.next(), D = 0; !C.done; C = g.next()) {
|
||
if (!g4(C.value, D))
|
||
return;
|
||
D++;
|
||
}
|
||
} else
|
||
m('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', a);
|
||
}
|
||
}
|
||
function by(r, a, d, p, g) {
|
||
var C = r.memoizedState;
|
||
C === null ? r.memoizedState = {
|
||
isBackwards: a,
|
||
rendering: null,
|
||
renderingStartTime: 0,
|
||
last: p,
|
||
tail: d,
|
||
tailMode: g
|
||
} : (C.isBackwards = a, C.rendering = null, C.renderingStartTime = 0, C.last = p, C.tail = d, C.tailMode = g);
|
||
}
|
||
function y4(r, a, d) {
|
||
var p = a.pendingProps, g = p.revealOrder, C = p.tail, D = p.children;
|
||
J7(g), $7(C, g), e9(D, g), La(r, a, D, d);
|
||
var P = lo.current, O = P1(P, Rp);
|
||
if (O)
|
||
P = O1(P, Rp), a.flags |= sn;
|
||
else {
|
||
var F = r !== null && (r.flags & sn) !== dt;
|
||
F && K7(a, a.child, d), P = jd(P);
|
||
}
|
||
if (Tl(a, P), (a.mode & Zt) === Mt)
|
||
a.memoizedState = null;
|
||
else
|
||
switch (g) {
|
||
case "forwards": {
|
||
var W = Z7(a.child), re;
|
||
W === null ? (re = a.child, a.child = null) : (re = W.sibling, W.sibling = null), by(
|
||
a,
|
||
!1,
|
||
// isBackwards
|
||
re,
|
||
W,
|
||
C
|
||
);
|
||
break;
|
||
}
|
||
case "backwards": {
|
||
var de = null, be = a.child;
|
||
for (a.child = null; be !== null; ) {
|
||
var Re = be.alternate;
|
||
if (Re !== null && nm(Re) === null) {
|
||
a.child = be;
|
||
break;
|
||
}
|
||
var De = be.sibling;
|
||
be.sibling = de, de = be, be = De;
|
||
}
|
||
by(
|
||
a,
|
||
!0,
|
||
// isBackwards
|
||
de,
|
||
null,
|
||
// last
|
||
C
|
||
);
|
||
break;
|
||
}
|
||
case "together": {
|
||
by(
|
||
a,
|
||
!1,
|
||
// isBackwards
|
||
null,
|
||
// tail
|
||
null,
|
||
// last
|
||
void 0
|
||
);
|
||
break;
|
||
}
|
||
default:
|
||
a.memoizedState = null;
|
||
}
|
||
return a.child;
|
||
}
|
||
function t9(r, a, d) {
|
||
R1(a, a.stateNode.containerInfo);
|
||
var p = a.pendingProps;
|
||
return r === null ? a.child = wd(a, null, p, d) : La(r, a, p, d), a.child;
|
||
}
|
||
var x4 = !1;
|
||
function n9(r, a, d) {
|
||
var p = a.type, g = p._context, C = a.pendingProps, D = a.memoizedProps, P = C.value;
|
||
{
|
||
"value" in C || x4 || (x4 = !0, m("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"));
|
||
var O = a.type.propTypes;
|
||
O && qa(O, C, "prop", "Context.Provider");
|
||
}
|
||
if (sC(a, g, P), D !== null) {
|
||
var F = D.value;
|
||
if (cr(F, P)) {
|
||
if (D.children === C.children && !ll())
|
||
return ks(r, a, d);
|
||
} else
|
||
KM(a, g, d);
|
||
}
|
||
var W = C.children;
|
||
return La(r, a, W, d), a.child;
|
||
}
|
||
var S4 = !1;
|
||
function r9(r, a, d) {
|
||
var p = a.type;
|
||
p._context === void 0 ? p !== p.Consumer && (S4 || (S4 = !0, m("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))) : p = p._context;
|
||
var g = a.pendingProps, C = g.children;
|
||
typeof C != "function" && m("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."), Cd(a, d);
|
||
var D = jr(p);
|
||
Ss(a);
|
||
var P;
|
||
return Lp.current = a, K(!0), P = C(D), K(!1), On(), a.flags |= Nn, La(r, a, P, d), a.child;
|
||
}
|
||
function Bp() {
|
||
co = !0;
|
||
}
|
||
function Em(r, a) {
|
||
(a.mode & Zt) === Mt && r !== null && (r.alternate = null, a.alternate = null, a.flags |= jn);
|
||
}
|
||
function ks(r, a, d) {
|
||
return r !== null && (a.dependencies = r.dependencies), t4(), $p(a.lanes), er(d, a.childLanes) ? (l7(r, a), a.child) : null;
|
||
}
|
||
function a9(r, a, d) {
|
||
{
|
||
var p = a.return;
|
||
if (p === null)
|
||
throw new Error("Cannot swap the root fiber.");
|
||
if (r.alternate = null, a.alternate = null, d.index = a.index, d.sibling = a.sibling, d.return = a.return, d.ref = a.ref, a === p.child)
|
||
p.child = d;
|
||
else {
|
||
var g = p.child;
|
||
if (g === null)
|
||
throw new Error("Expected parent to have a child.");
|
||
for (; g.sibling !== a; )
|
||
if (g = g.sibling, g === null)
|
||
throw new Error("Expected to find the previous sibling.");
|
||
g.sibling = d;
|
||
}
|
||
var C = p.deletions;
|
||
return C === null ? (p.deletions = [r], p.flags |= da) : C.push(r), d.flags |= jn, d;
|
||
}
|
||
}
|
||
function Cy(r, a) {
|
||
var d = r.lanes;
|
||
return !!er(d, a);
|
||
}
|
||
function i9(r, a, d) {
|
||
switch (a.tag) {
|
||
case J:
|
||
f4(a), a.stateNode, s();
|
||
break;
|
||
case H:
|
||
jC(a);
|
||
break;
|
||
case B: {
|
||
var p = a.type;
|
||
Kr(p) && Ro(a);
|
||
break;
|
||
}
|
||
case G:
|
||
R1(a, a.stateNode.containerInfo);
|
||
break;
|
||
case xe: {
|
||
var g = a.memoizedProps.value, C = a.type._context;
|
||
sC(a, C, g);
|
||
break;
|
||
}
|
||
case Y:
|
||
{
|
||
var D = er(d, a.childLanes);
|
||
D && (a.flags |= Wt);
|
||
{
|
||
var P = a.stateNode;
|
||
P.effectDuration = 0, P.passiveEffectDuration = 0;
|
||
}
|
||
}
|
||
break;
|
||
case te: {
|
||
var O = a.memoizedState;
|
||
if (O !== null) {
|
||
if (O.dehydrated !== null)
|
||
return Tl(a, jd(lo.current)), a.flags |= sn, null;
|
||
var F = a.child, W = F.childLanes;
|
||
if (er(d, W))
|
||
return h4(r, a, d);
|
||
Tl(a, jd(lo.current));
|
||
var re = ks(r, a, d);
|
||
return re !== null ? re.sibling : null;
|
||
} else
|
||
Tl(a, jd(lo.current));
|
||
break;
|
||
}
|
||
case ve: {
|
||
var de = (r.flags & sn) !== dt, be = er(d, a.childLanes);
|
||
if (de) {
|
||
if (be)
|
||
return y4(r, a, d);
|
||
a.flags |= sn;
|
||
}
|
||
var Re = a.memoizedState;
|
||
if (Re !== null && (Re.rendering = null, Re.tail = null, Re.lastEffect = null), Tl(a, lo.current), be)
|
||
break;
|
||
return null;
|
||
}
|
||
case Ae:
|
||
case Ve:
|
||
return a.lanes = Me, u4(r, a, d);
|
||
}
|
||
return ks(r, a, d);
|
||
}
|
||
function b4(r, a, d) {
|
||
if (a._debugNeedsRemount && r !== null)
|
||
return a9(r, a, t2(a.type, a.key, a.pendingProps, a._debugOwner || null, a.mode, a.lanes));
|
||
if (r !== null) {
|
||
var p = r.memoizedProps, g = a.pendingProps;
|
||
if (p !== g || ll() || // Force a re-render if the implementation changed due to hot reload:
|
||
a.type !== r.type)
|
||
co = !0;
|
||
else {
|
||
var C = Cy(r, d);
|
||
if (!C && // If this is the second pass of an error or suspense boundary, there
|
||
// may not be work scheduled on `current`, so we check for this flag.
|
||
(a.flags & sn) === dt)
|
||
return co = !1, i9(r, a, d);
|
||
(r.flags & Qs) !== dt ? co = !0 : co = !1;
|
||
}
|
||
} else if (co = !1, v() && js(a)) {
|
||
var D = a.index, P = kv();
|
||
Du(a, P, D);
|
||
}
|
||
switch (a.lanes = Me, a.tag) {
|
||
case q:
|
||
return _7(r, a, a.type, d);
|
||
case we: {
|
||
var O = a.elementType;
|
||
return F7(r, a, O, d);
|
||
}
|
||
case U: {
|
||
var F = a.type, W = a.pendingProps, re = a.elementType === F ? W : so(F, W);
|
||
return hy(r, a, F, re, d);
|
||
}
|
||
case B: {
|
||
var de = a.type, be = a.pendingProps, Re = a.elementType === de ? be : so(de, be);
|
||
return d4(r, a, de, Re, d);
|
||
}
|
||
case J:
|
||
return z7(r, a, d);
|
||
case H:
|
||
return I7(r, a, d);
|
||
case le:
|
||
return L7(r, a);
|
||
case te:
|
||
return h4(r, a, d);
|
||
case G:
|
||
return t9(r, a, d);
|
||
case $: {
|
||
var De = a.type, wt = a.pendingProps, zt = a.elementType === De ? wt : so(De, wt);
|
||
return o4(r, a, De, zt, d);
|
||
}
|
||
case ae:
|
||
return O7(r, a, d);
|
||
case he:
|
||
return A7(r, a, d);
|
||
case Y:
|
||
return N7(r, a, d);
|
||
case xe:
|
||
return n9(r, a, d);
|
||
case Te:
|
||
return r9(r, a, d);
|
||
case V: {
|
||
var Tt = a.type, Cn = a.pendingProps, ln = so(Tt, Cn);
|
||
if (a.type !== a.elementType) {
|
||
var oe = Tt.propTypes;
|
||
oe && qa(
|
||
oe,
|
||
ln,
|
||
// Resolved for outer only
|
||
"prop",
|
||
yt(Tt)
|
||
);
|
||
}
|
||
return ln = so(Tt.type, ln), s4(r, a, Tt, ln, d);
|
||
}
|
||
case ne:
|
||
return l4(r, a, a.type, a.pendingProps, d);
|
||
case Ee: {
|
||
var ye = a.type, ie = a.pendingProps, Ge = a.elementType === ye ? ie : so(ye, ie);
|
||
return B7(r, a, ye, Ge, d);
|
||
}
|
||
case ve:
|
||
return y4(r, a, d);
|
||
case Ce:
|
||
break;
|
||
case Ae:
|
||
return u4(r, a, d);
|
||
}
|
||
throw new Error("Unknown unit of work tag (" + a.tag + "). This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
function Vo(r) {
|
||
r.flags |= Wt;
|
||
}
|
||
function C4(r) {
|
||
r.flags |= wi, r.flags |= Mf;
|
||
}
|
||
function w4(r, a) {
|
||
var d = r !== null && r.child === a.child;
|
||
if (d)
|
||
return !0;
|
||
if ((a.flags & da) !== dt)
|
||
return !1;
|
||
for (var p = a.child; p !== null; ) {
|
||
if ((p.flags & au) !== dt || (p.subtreeFlags & au) !== dt)
|
||
return !1;
|
||
p = p.sibling;
|
||
}
|
||
return !0;
|
||
}
|
||
var _p, Up, jm, Tm;
|
||
if (Yr)
|
||
_p = function(r, a, d, p) {
|
||
for (var g = a.child; g !== null; ) {
|
||
if (g.tag === H || g.tag === le)
|
||
qr(r, g.stateNode);
|
||
else if (g.tag !== G) {
|
||
if (g.child !== null) {
|
||
g.child.return = g, g = g.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (g === a)
|
||
return;
|
||
for (; g.sibling === null; ) {
|
||
if (g.return === null || g.return === a)
|
||
return;
|
||
g = g.return;
|
||
}
|
||
g.sibling.return = g.return, g = g.sibling;
|
||
}
|
||
}, Up = function(r, a) {
|
||
}, jm = function(r, a, d, p, g) {
|
||
var C = r.memoizedProps;
|
||
if (C !== p) {
|
||
var D = a.stateNode, P = Mp(), O = Af(D, d, C, p, g, P);
|
||
a.updateQueue = O, O && Vo(a);
|
||
}
|
||
}, Tm = function(r, a, d, p) {
|
||
d !== p && Vo(a);
|
||
};
|
||
else if (cs) {
|
||
_p = function(r, a, d, p) {
|
||
for (var g = a.child; g !== null; ) {
|
||
if (g.tag === H) {
|
||
var C = g.stateNode;
|
||
if (d && p) {
|
||
var D = g.memoizedProps, P = g.type;
|
||
C = uu(C, P, D, g);
|
||
}
|
||
qr(r, C);
|
||
} else if (g.tag === le) {
|
||
var O = g.stateNode;
|
||
if (d && p) {
|
||
var F = g.memoizedProps;
|
||
O = Ma(O, F, g);
|
||
}
|
||
qr(r, O);
|
||
} else if (g.tag !== G) {
|
||
if (g.tag === Ae && g.memoizedState !== null) {
|
||
var W = g.child;
|
||
W !== null && (W.return = g), _p(r, g, !0, !0);
|
||
} else if (g.child !== null) {
|
||
g.child.return = g, g = g.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (g = g, g === a)
|
||
return;
|
||
for (; g.sibling === null; ) {
|
||
if (g.return === null || g.return === a)
|
||
return;
|
||
g = g.return;
|
||
}
|
||
g.sibling.return = g.return, g = g.sibling;
|
||
}
|
||
};
|
||
var E4 = function(r, a, d, p) {
|
||
for (var g = a.child; g !== null; ) {
|
||
if (g.tag === H) {
|
||
var C = g.stateNode;
|
||
if (d && p) {
|
||
var D = g.memoizedProps, P = g.type;
|
||
C = uu(C, P, D, g);
|
||
}
|
||
ds(r, C);
|
||
} else if (g.tag === le) {
|
||
var O = g.stateNode;
|
||
if (d && p) {
|
||
var F = g.memoizedProps;
|
||
O = Ma(O, F, g);
|
||
}
|
||
ds(r, O);
|
||
} else if (g.tag !== G) {
|
||
if (g.tag === Ae && g.memoizedState !== null) {
|
||
var W = g.child;
|
||
W !== null && (W.return = g), E4(r, g, !0, !0);
|
||
} else if (g.child !== null) {
|
||
g.child.return = g, g = g.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (g = g, g === a)
|
||
return;
|
||
for (; g.sibling === null; ) {
|
||
if (g.return === null || g.return === a)
|
||
return;
|
||
g = g.return;
|
||
}
|
||
g.sibling.return = g.return, g = g.sibling;
|
||
}
|
||
};
|
||
Up = function(r, a) {
|
||
var d = a.stateNode, p = w4(r, a);
|
||
if (!p) {
|
||
var g = d.containerInfo, C = si(g);
|
||
E4(C, a, !1, !1), d.pendingChildren = C, Vo(a), $s(g, C);
|
||
}
|
||
}, jm = function(r, a, d, p, g) {
|
||
var C = r.stateNode, D = r.memoizedProps, P = w4(r, a);
|
||
if (P && D === p) {
|
||
a.stateNode = C;
|
||
return;
|
||
}
|
||
var O = a.stateNode, F = Mp(), W = null;
|
||
if (D !== p && (W = Af(O, d, D, p, g, F)), P && W === null) {
|
||
a.stateNode = C;
|
||
return;
|
||
}
|
||
var re = W0(C, W, d, D, p, a, P, O);
|
||
su(re, d, p, g, F) && Vo(a), a.stateNode = re, P ? Vo(a) : _p(re, a, !1, !1);
|
||
}, Tm = function(r, a, d, p) {
|
||
if (d !== p) {
|
||
var g = M1(), C = Mp();
|
||
a.stateNode = lu(p, g, C, a), Vo(a);
|
||
} else
|
||
a.stateNode = r.stateNode;
|
||
};
|
||
} else
|
||
Up = function(r, a) {
|
||
}, jm = function(r, a, d, p, g) {
|
||
}, Tm = function(r, a, d, p) {
|
||
};
|
||
function Hp(r, a) {
|
||
if (!v())
|
||
switch (r.tailMode) {
|
||
case "hidden": {
|
||
for (var d = r.tail, p = null; d !== null; )
|
||
d.alternate !== null && (p = d), d = d.sibling;
|
||
p === null ? r.tail = null : p.sibling = null;
|
||
break;
|
||
}
|
||
case "collapsed": {
|
||
for (var g = r.tail, C = null; g !== null; )
|
||
g.alternate !== null && (C = g), g = g.sibling;
|
||
C === null ? !a && r.tail !== null ? r.tail.sibling = null : r.tail = null : C.sibling = null;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function aa(r) {
|
||
var a = r.alternate !== null && r.alternate.child === r.child, d = Me, p = dt;
|
||
if (a) {
|
||
if ((r.mode & Gt) !== Mt) {
|
||
for (var O = r.selfBaseDuration, F = r.child; F !== null; )
|
||
d = kt(d, kt(F.lanes, F.childLanes)), p |= F.subtreeFlags & Yi, p |= F.flags & Yi, O += F.treeBaseDuration, F = F.sibling;
|
||
r.treeBaseDuration = O;
|
||
} else
|
||
for (var W = r.child; W !== null; )
|
||
d = kt(d, kt(W.lanes, W.childLanes)), p |= W.subtreeFlags & Yi, p |= W.flags & Yi, W.return = r, W = W.sibling;
|
||
r.subtreeFlags |= p;
|
||
} else {
|
||
if ((r.mode & Gt) !== Mt) {
|
||
for (var g = r.actualDuration, C = r.selfBaseDuration, D = r.child; D !== null; )
|
||
d = kt(d, kt(D.lanes, D.childLanes)), p |= D.subtreeFlags, p |= D.flags, g += D.actualDuration, C += D.treeBaseDuration, D = D.sibling;
|
||
r.actualDuration = g, r.treeBaseDuration = C;
|
||
} else
|
||
for (var P = r.child; P !== null; )
|
||
d = kt(d, kt(P.lanes, P.childLanes)), p |= P.subtreeFlags, p |= P.flags, P.return = r, P = P.sibling;
|
||
r.subtreeFlags |= p;
|
||
}
|
||
return r.childLanes = d, a;
|
||
}
|
||
function o9(r, a, d) {
|
||
if (t1() && (a.mode & Zt) !== Mt && (a.flags & sn) === dt)
|
||
return Fv(a), s(), a.flags |= Wi | ru | $r, !1;
|
||
var p = Ds(a);
|
||
if (d !== null && d.dehydrated !== null)
|
||
if (r === null) {
|
||
if (!p)
|
||
throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");
|
||
if (Iv(a), aa(a), (a.mode & Gt) !== Mt) {
|
||
var g = d !== null;
|
||
if (g) {
|
||
var C = a.child;
|
||
C !== null && (a.treeBaseDuration -= C.treeBaseDuration);
|
||
}
|
||
}
|
||
return !1;
|
||
} else {
|
||
if (s(), (a.flags & sn) === dt && (a.memoizedState = null), a.flags |= Wt, aa(a), (a.mode & Gt) !== Mt) {
|
||
var D = d !== null;
|
||
if (D) {
|
||
var P = a.child;
|
||
P !== null && (a.treeBaseDuration -= P.treeBaseDuration);
|
||
}
|
||
}
|
||
return !1;
|
||
}
|
||
else
|
||
return u(), !0;
|
||
}
|
||
function j4(r, a, d) {
|
||
var p = a.pendingProps;
|
||
switch (xd(a), a.tag) {
|
||
case q:
|
||
case we:
|
||
case ne:
|
||
case U:
|
||
case $:
|
||
case ae:
|
||
case he:
|
||
case Y:
|
||
case Te:
|
||
case V:
|
||
return aa(a), null;
|
||
case B: {
|
||
var g = a.type;
|
||
return Kr(g) && Pn(a), aa(a), null;
|
||
}
|
||
case J: {
|
||
var C = a.stateNode;
|
||
if (Ed(a), Jn(a), N1(), C.pendingContext && (C.context = C.pendingContext, C.pendingContext = null), r === null || r.child === null) {
|
||
var D = Ds(a);
|
||
if (D)
|
||
Vo(a);
|
||
else if (r !== null) {
|
||
var P = r.memoizedState;
|
||
// Check if this is a client root
|
||
(!P.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)
|
||
(a.flags & Wi) !== dt) && (a.flags |= Co, u());
|
||
}
|
||
}
|
||
return Up(r, a), aa(a), null;
|
||
}
|
||
case H: {
|
||
k1(a);
|
||
var O = M1(), F = a.type;
|
||
if (r !== null && a.stateNode != null)
|
||
jm(r, a, F, p, O), r.ref !== a.ref && C4(a);
|
||
else {
|
||
if (!p) {
|
||
if (a.stateNode === null)
|
||
throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
|
||
return aa(a), null;
|
||
}
|
||
var W = Mp(), re = Ds(a);
|
||
if (re)
|
||
e1(a, O, W) && Vo(a);
|
||
else {
|
||
var de = Zs(F, p, O, W, a);
|
||
_p(de, a, !1, !1), a.stateNode = de, su(de, F, p, O, W) && Vo(a);
|
||
}
|
||
a.ref !== null && C4(a);
|
||
}
|
||
return aa(a), null;
|
||
}
|
||
case le: {
|
||
var be = p;
|
||
if (r && a.stateNode != null) {
|
||
var Re = r.memoizedProps;
|
||
Tm(r, a, Re, be);
|
||
} else {
|
||
if (typeof be != "string" && a.stateNode === null)
|
||
throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
|
||
var De = M1(), wt = Mp(), zt = Ds(a);
|
||
zt ? zv(a) && Vo(a) : a.stateNode = lu(be, De, wt, a);
|
||
}
|
||
return aa(a), null;
|
||
}
|
||
case te: {
|
||
Td(a);
|
||
var Tt = a.memoizedState;
|
||
if (r === null || r.memoizedState !== null && r.memoizedState.dehydrated !== null) {
|
||
var Cn = o9(r, a, Tt);
|
||
if (!Cn)
|
||
return a.flags & $r ? a : null;
|
||
}
|
||
if ((a.flags & sn) !== dt)
|
||
return a.lanes = d, (a.mode & Gt) !== Mt && iy(a), a;
|
||
var ln = Tt !== null, oe = r !== null && r.memoizedState !== null;
|
||
if (ln !== oe && ln) {
|
||
var ye = a.child;
|
||
if (ye.flags |= os, (a.mode & Zt) !== Mt) {
|
||
var ie = r === null && (a.memoizedProps.unstable_avoidThisFallback !== !0 || !A);
|
||
ie || P1(lo.current, DC) ? E8() : Gy();
|
||
}
|
||
}
|
||
var Ge = a.updateQueue;
|
||
if (Ge !== null && (a.flags |= Wt), aa(a), (a.mode & Gt) !== Mt && ln) {
|
||
var bt = a.child;
|
||
bt !== null && (a.treeBaseDuration -= bt.treeBaseDuration);
|
||
}
|
||
return null;
|
||
}
|
||
case G:
|
||
return Ed(a), Up(r, a), r === null && I0(a.stateNode.containerInfo), aa(a), null;
|
||
case xe:
|
||
var ut = a.type._context;
|
||
return a1(ut, a), aa(a), null;
|
||
case Ee: {
|
||
var rn = a.type;
|
||
return Kr(rn) && Pn(a), aa(a), null;
|
||
}
|
||
case ve: {
|
||
Td(a);
|
||
var Lt = a.memoizedState;
|
||
if (Lt === null)
|
||
return aa(a), null;
|
||
var pn = (a.flags & sn) !== dt, Jt = Lt.rendering;
|
||
if (Jt === null)
|
||
if (pn)
|
||
Hp(Lt, !1);
|
||
else {
|
||
var Ln = T8() && (r === null || (r.flags & sn) === dt);
|
||
if (!Ln)
|
||
for (var Rt = a.child; Rt !== null; ) {
|
||
var dr = nm(Rt);
|
||
if (dr !== null) {
|
||
pn = !0, a.flags |= sn, Hp(Lt, !1);
|
||
var Ca = dr.updateQueue;
|
||
return Ca !== null && (a.updateQueue = Ca, a.flags |= Wt), a.subtreeFlags = dt, u7(a, d), Tl(a, O1(lo.current, Rp)), a.child;
|
||
}
|
||
Rt = Rt.sibling;
|
||
}
|
||
Lt.tail !== null && gr() > X4() && (a.flags |= sn, pn = !0, Hp(Lt, !1), a.lanes = rd);
|
||
}
|
||
else {
|
||
if (!pn) {
|
||
var la = nm(Jt);
|
||
if (la !== null) {
|
||
a.flags |= sn, pn = !0;
|
||
var yi = la.updateQueue;
|
||
if (yi !== null && (a.updateQueue = yi, a.flags |= Wt), Hp(Lt, !0), Lt.tail === null && Lt.tailMode === "hidden" && !Jt.alternate && !v())
|
||
return aa(a), null;
|
||
} else
|
||
// The time it took to render last row is greater than the remaining
|
||
// time we have to render. So rendering one more row would likely
|
||
// exceed it.
|
||
gr() * 2 - Lt.renderingStartTime > X4() && d !== va && (a.flags |= sn, pn = !0, Hp(Lt, !1), a.lanes = rd);
|
||
}
|
||
if (Lt.isBackwards)
|
||
Jt.sibling = a.child, a.child = Jt;
|
||
else {
|
||
var Ba = Lt.last;
|
||
Ba !== null ? Ba.sibling = Jt : a.child = Jt, Lt.last = Jt;
|
||
}
|
||
}
|
||
if (Lt.tail !== null) {
|
||
var _a = Lt.tail;
|
||
Lt.rendering = _a, Lt.tail = _a.sibling, Lt.renderingStartTime = gr(), _a.sibling = null;
|
||
var wa = lo.current;
|
||
return pn ? wa = O1(wa, Rp) : wa = jd(wa), Tl(a, wa), _a;
|
||
}
|
||
return aa(a), null;
|
||
}
|
||
case Ce:
|
||
break;
|
||
case Ae:
|
||
case Ve: {
|
||
Wy(a);
|
||
var As = a.memoizedState, Bd = As !== null;
|
||
if (r !== null) {
|
||
var nh = r.memoizedState, Qo = nh !== null;
|
||
Qo !== Bd && // LegacyHidden doesn't do any hiding — it only pre-renders.
|
||
!k && (a.flags |= os);
|
||
}
|
||
return !Bd || (a.mode & Zt) === Mt ? aa(a) : er(qo, va) && (aa(a), Yr && a.subtreeFlags & (jn | Wt) && (a.flags |= os)), null;
|
||
}
|
||
case tt:
|
||
return null;
|
||
case at:
|
||
return null;
|
||
}
|
||
throw new Error("Unknown unit of work tag (" + a.tag + "). This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
function s9(r, a, d) {
|
||
switch (xd(a), a.tag) {
|
||
case B: {
|
||
var p = a.type;
|
||
Kr(p) && Pn(a);
|
||
var g = a.flags;
|
||
return g & $r ? (a.flags = g & ~$r | sn, (a.mode & Gt) !== Mt && iy(a), a) : null;
|
||
}
|
||
case J: {
|
||
a.stateNode, Ed(a), Jn(a), N1();
|
||
var C = a.flags;
|
||
return (C & $r) !== dt && (C & sn) === dt ? (a.flags = C & ~$r | sn, a) : null;
|
||
}
|
||
case H:
|
||
return k1(a), null;
|
||
case te: {
|
||
Td(a);
|
||
var D = a.memoizedState;
|
||
if (D !== null && D.dehydrated !== null) {
|
||
if (a.alternate === null)
|
||
throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");
|
||
s();
|
||
}
|
||
var P = a.flags;
|
||
return P & $r ? (a.flags = P & ~$r | sn, (a.mode & Gt) !== Mt && iy(a), a) : null;
|
||
}
|
||
case ve:
|
||
return Td(a), null;
|
||
case G:
|
||
return Ed(a), null;
|
||
case xe:
|
||
var O = a.type._context;
|
||
return a1(O, a), null;
|
||
case Ae:
|
||
case Ve:
|
||
return Wy(a), null;
|
||
case tt:
|
||
return null;
|
||
default:
|
||
return null;
|
||
}
|
||
}
|
||
function T4(r, a, d) {
|
||
switch (xd(a), a.tag) {
|
||
case B: {
|
||
var p = a.type.childContextTypes;
|
||
p != null && Pn(a);
|
||
break;
|
||
}
|
||
case J: {
|
||
a.stateNode, Ed(a), Jn(a), N1();
|
||
break;
|
||
}
|
||
case H: {
|
||
k1(a);
|
||
break;
|
||
}
|
||
case G:
|
||
Ed(a);
|
||
break;
|
||
case te:
|
||
Td(a);
|
||
break;
|
||
case ve:
|
||
Td(a);
|
||
break;
|
||
case xe:
|
||
var g = a.type._context;
|
||
a1(g, a);
|
||
break;
|
||
case Ae:
|
||
case Ve:
|
||
Wy(a);
|
||
break;
|
||
}
|
||
}
|
||
function D4(r, a, d, p, g, C, D, P, O) {
|
||
var F = Array.prototype.slice.call(arguments, 3);
|
||
try {
|
||
a.apply(d, F);
|
||
} catch (W) {
|
||
this.onError(W);
|
||
}
|
||
}
|
||
var M4 = D4;
|
||
if (typeof window < "u" && typeof window.dispatchEvent == "function" && typeof document < "u" && typeof document.createEvent == "function") {
|
||
var wy = document.createElement("react");
|
||
M4 = function(a, d, p, g, C, D, P, O, F) {
|
||
if (typeof document > "u" || document === null)
|
||
throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");
|
||
var W = document.createEvent("Event"), re = !1, de = !0, be = window.event, Re = Object.getOwnPropertyDescriptor(window, "event");
|
||
function De() {
|
||
wy.removeEventListener(ye, zt, !1), typeof window.event < "u" && window.hasOwnProperty("event") && (window.event = be);
|
||
}
|
||
var wt = Array.prototype.slice.call(arguments, 3);
|
||
function zt() {
|
||
re = !0, De(), d.apply(p, wt), de = !1;
|
||
}
|
||
var Tt, Cn = !1, ln = !1;
|
||
function oe(ie) {
|
||
if (Tt = ie.error, Cn = !0, Tt === null && ie.colno === 0 && ie.lineno === 0 && (ln = !0), ie.defaultPrevented && Tt != null && typeof Tt == "object")
|
||
try {
|
||
Tt._suppressLogging = !0;
|
||
} catch {
|
||
}
|
||
}
|
||
var ye = "react-" + (a || "invokeguardedcallback");
|
||
if (window.addEventListener("error", oe), wy.addEventListener(ye, zt, !1), W.initEvent(ye, !1, !1), wy.dispatchEvent(W), Re && Object.defineProperty(window, "event", Re), re && de && (Cn ? ln && (Tt = new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.")) : Tt = new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`), this.onError(Tt)), window.removeEventListener("error", oe), !re)
|
||
return De(), D4.apply(this, arguments);
|
||
};
|
||
}
|
||
var l9 = M4, Vp = !1, Dm = null, u9 = {
|
||
onError: function(r) {
|
||
Vp = !0, Dm = r;
|
||
}
|
||
};
|
||
function R4(r, a, d, p, g, C, D, P, O) {
|
||
Vp = !1, Dm = null, l9.apply(u9, arguments);
|
||
}
|
||
function c9() {
|
||
return Vp;
|
||
}
|
||
function k4() {
|
||
if (Vp) {
|
||
var r = Dm;
|
||
return Vp = !1, Dm = null, r;
|
||
} else
|
||
throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
var P4 = null;
|
||
P4 = /* @__PURE__ */ new Set();
|
||
var Mm = !1, ia = !1, d9 = typeof WeakSet == "function" ? WeakSet : Set, xt = null, Pd = null, Od = null;
|
||
function f9(r) {
|
||
R4(null, function() {
|
||
throw r;
|
||
}), k4();
|
||
}
|
||
var p9 = function(r, a) {
|
||
if (a.props = r.memoizedProps, a.state = r.memoizedState, r.mode & Gt)
|
||
try {
|
||
Ho(), a.componentWillUnmount();
|
||
} finally {
|
||
Uo(r);
|
||
}
|
||
else
|
||
a.componentWillUnmount();
|
||
};
|
||
function O4(r, a) {
|
||
try {
|
||
Rl(Br, r);
|
||
} catch (d) {
|
||
Mn(r, a, d);
|
||
}
|
||
}
|
||
function Ey(r, a, d) {
|
||
try {
|
||
p9(r, d);
|
||
} catch (p) {
|
||
Mn(r, a, p);
|
||
}
|
||
}
|
||
function h9(r, a, d) {
|
||
try {
|
||
d.componentDidMount();
|
||
} catch (p) {
|
||
Mn(r, a, p);
|
||
}
|
||
}
|
||
function A4(r, a) {
|
||
try {
|
||
z4(r);
|
||
} catch (d) {
|
||
Mn(r, a, d);
|
||
}
|
||
}
|
||
function Ad(r, a) {
|
||
var d = r.ref;
|
||
if (d !== null)
|
||
if (typeof d == "function") {
|
||
var p;
|
||
try {
|
||
if (I && _ && r.mode & Gt)
|
||
try {
|
||
Ho(), p = d(null);
|
||
} finally {
|
||
Uo(r);
|
||
}
|
||
else
|
||
p = d(null);
|
||
} catch (g) {
|
||
Mn(r, a, g);
|
||
}
|
||
typeof p == "function" && m("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", vt(r));
|
||
} else
|
||
d.current = null;
|
||
}
|
||
function Rm(r, a, d) {
|
||
try {
|
||
d();
|
||
} catch (p) {
|
||
Mn(r, a, p);
|
||
}
|
||
}
|
||
var N4 = !1;
|
||
function v9(r, a) {
|
||
fa(r.containerInfo), xt = a, m9();
|
||
var d = N4;
|
||
return N4 = !1, d;
|
||
}
|
||
function m9() {
|
||
for (; xt !== null; ) {
|
||
var r = xt, a = r.child;
|
||
(r.subtreeFlags & kf) !== dt && a !== null ? (a.return = r, xt = a) : g9();
|
||
}
|
||
}
|
||
function g9() {
|
||
for (; xt !== null; ) {
|
||
var r = xt;
|
||
gn(r);
|
||
try {
|
||
y9(r);
|
||
} catch (d) {
|
||
Mn(r, r.return, d);
|
||
}
|
||
Sn();
|
||
var a = r.sibling;
|
||
if (a !== null) {
|
||
a.return = r.return, xt = a;
|
||
return;
|
||
}
|
||
xt = r.return;
|
||
}
|
||
}
|
||
function y9(r) {
|
||
var a = r.alternate, d = r.flags;
|
||
if ((d & Co) !== dt) {
|
||
switch (gn(r), r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne:
|
||
break;
|
||
case B: {
|
||
if (a !== null) {
|
||
var p = a.memoizedProps, g = a.memoizedState, C = r.stateNode;
|
||
r.type === r.elementType && !Nu && (C.props !== r.memoizedProps && m("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", vt(r) || "instance"), C.state !== r.memoizedState && m("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", vt(r) || "instance"));
|
||
var D = C.getSnapshotBeforeUpdate(r.elementType === r.type ? p : so(r.type, p), g);
|
||
{
|
||
var P = P4;
|
||
D === void 0 && !P.has(r.type) && (P.add(r.type), m("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", vt(r)));
|
||
}
|
||
C.__reactInternalSnapshotBeforeUpdate = D;
|
||
}
|
||
break;
|
||
}
|
||
case J: {
|
||
if (Yr) {
|
||
var O = r.stateNode;
|
||
rv(O.containerInfo);
|
||
}
|
||
break;
|
||
}
|
||
case H:
|
||
case le:
|
||
case G:
|
||
case Ee:
|
||
break;
|
||
default:
|
||
throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
Sn();
|
||
}
|
||
}
|
||
function fo(r, a, d) {
|
||
var p = a.updateQueue, g = p !== null ? p.lastEffect : null;
|
||
if (g !== null) {
|
||
var C = g.next, D = C;
|
||
do {
|
||
if ((D.tag & r) === r) {
|
||
var P = D.destroy;
|
||
D.destroy = void 0, P !== void 0 && ((r & ra) !== Za ? lr(a) : (r & Br) !== Za && ur(a), (r & Fo) !== Za && th(!0), Rm(a, d, P), (r & Fo) !== Za && th(!1), (r & ra) !== Za ? zr() : (r & Br) !== Za && Sl());
|
||
}
|
||
D = D.next;
|
||
} while (D !== C);
|
||
}
|
||
}
|
||
function Rl(r, a) {
|
||
var d = a.updateQueue, p = d !== null ? d.lastEffect : null;
|
||
if (p !== null) {
|
||
var g = p.next, C = g;
|
||
do {
|
||
if ((C.tag & r) === r) {
|
||
(r & ra) !== Za ? Xt(a) : (r & Br) !== Za && Aa(a);
|
||
var D = C.create;
|
||
(r & Fo) !== Za && th(!0), C.destroy = D(), (r & Fo) !== Za && th(!1), (r & ra) !== Za ? wr() : (r & Br) !== Za && xl();
|
||
{
|
||
var P = C.destroy;
|
||
if (P !== void 0 && typeof P != "function") {
|
||
var O = void 0;
|
||
(C.tag & Br) !== dt ? O = "useLayoutEffect" : (C.tag & Fo) !== dt ? O = "useInsertionEffect" : O = "useEffect";
|
||
var F = void 0;
|
||
P === null ? F = " You returned null. If your effect does not require clean up, return undefined (or nothing)." : typeof P.then == "function" ? F = `
|
||
|
||
It looks like you wrote ` + O + `(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
||
|
||
` + O + `(() => {
|
||
async function fetchData() {
|
||
// You can await here
|
||
const response = await MyAPI.getData(someId);
|
||
// ...
|
||
}
|
||
fetchData();
|
||
}, [someId]); // Or [] if effect doesn't need props or state
|
||
|
||
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching` : F = " You returned: " + P, m("%s must not return anything besides a function, which is used for clean-up.%s", O, F);
|
||
}
|
||
}
|
||
}
|
||
C = C.next;
|
||
} while (C !== g);
|
||
}
|
||
}
|
||
function x9(r, a) {
|
||
if ((a.flags & Wt) !== dt)
|
||
switch (a.tag) {
|
||
case Y: {
|
||
var d = a.stateNode.passiveEffectDuration, p = a.memoizedProps, g = p.id, C = p.onPostCommit, D = $C(), P = a.alternate === null ? "mount" : "update";
|
||
JC() && (P = "nested-update"), typeof C == "function" && C(g, P, d, D);
|
||
var O = a.return;
|
||
e:
|
||
for (; O !== null; ) {
|
||
switch (O.tag) {
|
||
case J:
|
||
var F = O.stateNode;
|
||
F.passiveEffectDuration += d;
|
||
break e;
|
||
case Y:
|
||
var W = O.stateNode;
|
||
W.passiveEffectDuration += d;
|
||
break e;
|
||
}
|
||
O = O.return;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function S9(r, a, d, p) {
|
||
if ((d.flags & iu) !== dt)
|
||
switch (d.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
if (!ia)
|
||
if (d.mode & Gt)
|
||
try {
|
||
Ho(), Rl(Br | Fr, d);
|
||
} finally {
|
||
Uo(d);
|
||
}
|
||
else
|
||
Rl(Br | Fr, d);
|
||
break;
|
||
}
|
||
case B: {
|
||
var g = d.stateNode;
|
||
if (d.flags & Wt && !ia)
|
||
if (a === null)
|
||
if (d.type === d.elementType && !Nu && (g.props !== d.memoizedProps && m("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", vt(d) || "instance"), g.state !== d.memoizedState && m("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", vt(d) || "instance")), d.mode & Gt)
|
||
try {
|
||
Ho(), g.componentDidMount();
|
||
} finally {
|
||
Uo(d);
|
||
}
|
||
else
|
||
g.componentDidMount();
|
||
else {
|
||
var C = d.elementType === d.type ? a.memoizedProps : so(d.type, a.memoizedProps), D = a.memoizedState;
|
||
if (d.type === d.elementType && !Nu && (g.props !== d.memoizedProps && m("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", vt(d) || "instance"), g.state !== d.memoizedState && m("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", vt(d) || "instance")), d.mode & Gt)
|
||
try {
|
||
Ho(), g.componentDidUpdate(C, D, g.__reactInternalSnapshotBeforeUpdate);
|
||
} finally {
|
||
Uo(d);
|
||
}
|
||
else
|
||
g.componentDidUpdate(C, D, g.__reactInternalSnapshotBeforeUpdate);
|
||
}
|
||
var P = d.updateQueue;
|
||
P !== null && (d.type === d.elementType && !Nu && (g.props !== d.memoizedProps && m("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", vt(d) || "instance"), g.state !== d.memoizedState && m("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", vt(d) || "instance")), pC(d, P, g));
|
||
break;
|
||
}
|
||
case J: {
|
||
var O = d.updateQueue;
|
||
if (O !== null) {
|
||
var F = null;
|
||
if (d.child !== null)
|
||
switch (d.child.tag) {
|
||
case H:
|
||
F = xn(d.child.stateNode);
|
||
break;
|
||
case B:
|
||
F = d.child.stateNode;
|
||
break;
|
||
}
|
||
pC(d, O, F);
|
||
}
|
||
break;
|
||
}
|
||
case H: {
|
||
var W = d.stateNode;
|
||
if (a === null && d.flags & Wt) {
|
||
var re = d.type, de = d.memoizedProps;
|
||
U0(W, re, de, d);
|
||
}
|
||
break;
|
||
}
|
||
case le:
|
||
break;
|
||
case G:
|
||
break;
|
||
case Y: {
|
||
{
|
||
var be = d.memoizedProps, Re = be.onCommit, De = be.onRender, wt = d.stateNode.effectDuration, zt = $C(), Tt = a === null ? "mount" : "update";
|
||
JC() && (Tt = "nested-update"), typeof De == "function" && De(d.memoizedProps.id, Tt, d.actualDuration, d.treeBaseDuration, d.actualStartTime, zt);
|
||
{
|
||
typeof Re == "function" && Re(d.memoizedProps.id, Tt, wt, zt), P8(d);
|
||
var Cn = d.return;
|
||
e:
|
||
for (; Cn !== null; ) {
|
||
switch (Cn.tag) {
|
||
case J:
|
||
var ln = Cn.stateNode;
|
||
ln.effectDuration += wt;
|
||
break e;
|
||
case Y:
|
||
var oe = Cn.stateNode;
|
||
oe.effectDuration += wt;
|
||
break e;
|
||
}
|
||
Cn = Cn.return;
|
||
}
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case te: {
|
||
R9(r, d);
|
||
break;
|
||
}
|
||
case ve:
|
||
case Ee:
|
||
case Ce:
|
||
case Ae:
|
||
case Ve:
|
||
case at:
|
||
break;
|
||
default:
|
||
throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
ia || d.flags & wi && z4(d);
|
||
}
|
||
function b9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
if (r.mode & Gt)
|
||
try {
|
||
Ho(), O4(r, r.return);
|
||
} finally {
|
||
Uo(r);
|
||
}
|
||
else
|
||
O4(r, r.return);
|
||
break;
|
||
}
|
||
case B: {
|
||
var a = r.stateNode;
|
||
typeof a.componentDidMount == "function" && h9(r, r.return, a), A4(r, r.return);
|
||
break;
|
||
}
|
||
case H: {
|
||
A4(r, r.return);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function C9(r, a) {
|
||
var d = null;
|
||
if (Yr)
|
||
for (var p = r; ; ) {
|
||
if (p.tag === H) {
|
||
if (d === null) {
|
||
d = p;
|
||
try {
|
||
var g = p.stateNode;
|
||
a ? oi(g) : kc(p.stateNode, p.memoizedProps);
|
||
} catch (D) {
|
||
Mn(r, r.return, D);
|
||
}
|
||
}
|
||
} else if (p.tag === le) {
|
||
if (d === null)
|
||
try {
|
||
var C = p.stateNode;
|
||
a ? Qi(C) : Hf(C, p.memoizedProps);
|
||
} catch (D) {
|
||
Mn(r, r.return, D);
|
||
}
|
||
} else if (!((p.tag === Ae || p.tag === Ve) && p.memoizedState !== null && p !== r)) {
|
||
if (p.child !== null) {
|
||
p.child.return = p, p = p.child;
|
||
continue;
|
||
}
|
||
}
|
||
if (p === r)
|
||
return;
|
||
for (; p.sibling === null; ) {
|
||
if (p.return === null || p.return === r)
|
||
return;
|
||
d === p && (d = null), p = p.return;
|
||
}
|
||
d === p && (d = null), p.sibling.return = p.return, p = p.sibling;
|
||
}
|
||
}
|
||
function z4(r) {
|
||
var a = r.ref;
|
||
if (a !== null) {
|
||
var d = r.stateNode, p;
|
||
switch (r.tag) {
|
||
case H:
|
||
p = xn(d);
|
||
break;
|
||
default:
|
||
p = d;
|
||
}
|
||
if (typeof a == "function") {
|
||
var g;
|
||
if (r.mode & Gt)
|
||
try {
|
||
Ho(), g = a(p);
|
||
} finally {
|
||
Uo(r);
|
||
}
|
||
else
|
||
g = a(p);
|
||
typeof g == "function" && m("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", vt(r));
|
||
} else
|
||
a.hasOwnProperty("current") || m("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", vt(r)), a.current = p;
|
||
}
|
||
}
|
||
function w9(r) {
|
||
var a = r.alternate;
|
||
a !== null && (a.return = null), r.return = null;
|
||
}
|
||
function I4(r) {
|
||
var a = r.alternate;
|
||
a !== null && (r.alternate = null, I4(a));
|
||
{
|
||
if (r.child = null, r.deletions = null, r.sibling = null, r.tag === H) {
|
||
var d = r.stateNode;
|
||
d !== null && If(d);
|
||
}
|
||
r.stateNode = null, r._debugOwner = null, r.return = null, r.dependencies = null, r.memoizedProps = null, r.memoizedState = null, r.pendingProps = null, r.stateNode = null, r.updateQueue = null;
|
||
}
|
||
}
|
||
function E9(r) {
|
||
if (cs) {
|
||
var a = r.stateNode, d = a.containerInfo, p = si(d);
|
||
el(d, p);
|
||
}
|
||
}
|
||
function j9(r) {
|
||
for (var a = r.return; a !== null; ) {
|
||
if (L4(a))
|
||
return a;
|
||
a = a.return;
|
||
}
|
||
throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
function L4(r) {
|
||
return r.tag === H || r.tag === J || r.tag === G;
|
||
}
|
||
function F4(r) {
|
||
var a = r;
|
||
e:
|
||
for (; ; ) {
|
||
for (; a.sibling === null; ) {
|
||
if (a.return === null || L4(a.return))
|
||
return null;
|
||
a = a.return;
|
||
}
|
||
for (a.sibling.return = a.return, a = a.sibling; a.tag !== H && a.tag !== le && a.tag !== se; ) {
|
||
if (a.flags & jn || a.child === null || a.tag === G)
|
||
continue e;
|
||
a.child.return = a, a = a.child;
|
||
}
|
||
if (!(a.flags & jn))
|
||
return a.stateNode;
|
||
}
|
||
}
|
||
function T9(r) {
|
||
if (Yr) {
|
||
var a = j9(r);
|
||
switch (a.tag) {
|
||
case H: {
|
||
var d = a.stateNode;
|
||
a.flags & nu && (nv(d), a.flags &= ~nu);
|
||
var p = F4(r);
|
||
Ty(r, p, d);
|
||
break;
|
||
}
|
||
case J:
|
||
case G: {
|
||
var g = a.stateNode.containerInfo, C = F4(r);
|
||
jy(r, C, g);
|
||
break;
|
||
}
|
||
default:
|
||
throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");
|
||
}
|
||
}
|
||
}
|
||
function jy(r, a, d) {
|
||
var p = r.tag, g = p === H || p === le;
|
||
if (g) {
|
||
var C = r.stateNode;
|
||
a ? Rc(d, C, a) : br(d, C);
|
||
} else if (p !== G) {
|
||
var D = r.child;
|
||
if (D !== null) {
|
||
jy(D, a, d);
|
||
for (var P = D.sibling; P !== null; )
|
||
jy(P, a, d), P = P.sibling;
|
||
}
|
||
}
|
||
}
|
||
function Ty(r, a, d) {
|
||
var p = r.tag, g = p === H || p === le;
|
||
if (g) {
|
||
var C = r.stateNode;
|
||
a ? H0(d, C, a) : _0(d, C);
|
||
} else if (p !== G) {
|
||
var D = r.child;
|
||
if (D !== null) {
|
||
Ty(D, a, d);
|
||
for (var P = D.sibling; P !== null; )
|
||
Ty(P, a, d), P = P.sibling;
|
||
}
|
||
}
|
||
}
|
||
var oa = null, po = !1;
|
||
function D9(r, a, d) {
|
||
if (Yr) {
|
||
var p = a;
|
||
e:
|
||
for (; p !== null; ) {
|
||
switch (p.tag) {
|
||
case H: {
|
||
oa = p.stateNode, po = !1;
|
||
break e;
|
||
}
|
||
case J: {
|
||
oa = p.stateNode.containerInfo, po = !0;
|
||
break e;
|
||
}
|
||
case G: {
|
||
oa = p.stateNode.containerInfo, po = !0;
|
||
break e;
|
||
}
|
||
}
|
||
p = p.return;
|
||
}
|
||
if (oa === null)
|
||
throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
|
||
Dy(r, a, d), oa = null, po = !1;
|
||
} else
|
||
Dy(r, a, d);
|
||
w9(d);
|
||
}
|
||
function Wo(r, a, d) {
|
||
for (var p = d.child; p !== null; )
|
||
Dy(r, a, p), p = p.sibling;
|
||
}
|
||
function Dy(r, a, d) {
|
||
switch (mp(d), d.tag) {
|
||
case H:
|
||
ia || Ad(d, a);
|
||
case le: {
|
||
if (Yr) {
|
||
var p = oa, g = po;
|
||
oa = null, Wo(r, a, d), oa = p, po = g, oa !== null && (po ? V0(oa, d.stateNode) : ji(oa, d.stateNode));
|
||
} else
|
||
Wo(r, a, d);
|
||
return;
|
||
}
|
||
case se: {
|
||
Yr && oa !== null && (po ? Pc(oa, d.stateNode) : sv(oa, d.stateNode));
|
||
return;
|
||
}
|
||
case G: {
|
||
if (Yr) {
|
||
var C = oa, D = po;
|
||
oa = d.stateNode.containerInfo, po = !0, Wo(r, a, d), oa = C, po = D;
|
||
} else
|
||
E9(d), Wo(r, a, d);
|
||
return;
|
||
}
|
||
case U:
|
||
case $:
|
||
case V:
|
||
case ne: {
|
||
if (!ia) {
|
||
var P = d.updateQueue;
|
||
if (P !== null) {
|
||
var O = P.lastEffect;
|
||
if (O !== null) {
|
||
var F = O.next, W = F;
|
||
do {
|
||
var re = W, de = re.destroy, be = re.tag;
|
||
de !== void 0 && ((be & Fo) !== Za ? Rm(d, a, de) : (be & Br) !== Za && (ur(d), d.mode & Gt ? (Ho(), Rm(d, a, de), Uo(d)) : Rm(d, a, de), Sl())), W = W.next;
|
||
} while (W !== F);
|
||
}
|
||
}
|
||
}
|
||
Wo(r, a, d);
|
||
return;
|
||
}
|
||
case B: {
|
||
if (!ia) {
|
||
Ad(d, a);
|
||
var Re = d.stateNode;
|
||
typeof Re.componentWillUnmount == "function" && Ey(d, a, Re);
|
||
}
|
||
Wo(r, a, d);
|
||
return;
|
||
}
|
||
case Ce: {
|
||
Wo(r, a, d);
|
||
return;
|
||
}
|
||
case Ae: {
|
||
if (
|
||
// TODO: Remove this dead flag
|
||
d.mode & Zt
|
||
) {
|
||
var De = ia;
|
||
ia = De || d.memoizedState !== null, Wo(r, a, d), ia = De;
|
||
} else
|
||
Wo(r, a, d);
|
||
break;
|
||
}
|
||
default: {
|
||
Wo(r, a, d);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
function M9(r) {
|
||
r.memoizedState;
|
||
}
|
||
function R9(r, a) {
|
||
if (Qr) {
|
||
var d = a.memoizedState;
|
||
if (d === null) {
|
||
var p = a.alternate;
|
||
if (p !== null) {
|
||
var g = p.memoizedState;
|
||
if (g !== null) {
|
||
var C = g.dehydrated;
|
||
C !== null && Gf(C);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function B4(r) {
|
||
var a = r.updateQueue;
|
||
if (a !== null) {
|
||
r.updateQueue = null;
|
||
var d = r.stateNode;
|
||
d === null && (d = r.stateNode = new d9()), a.forEach(function(p) {
|
||
var g = F8.bind(null, r, p);
|
||
if (!d.has(p)) {
|
||
if (d.add(p), ya)
|
||
if (Pd !== null && Od !== null)
|
||
eh(Od, Pd);
|
||
else
|
||
throw Error("Expected finished root and lanes to be set. This is a bug in React.");
|
||
p.then(g, g);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
function k9(r, a, d) {
|
||
Pd = d, Od = r, gn(a), _4(a, r), gn(a), Pd = null, Od = null;
|
||
}
|
||
function ho(r, a, d) {
|
||
var p = a.deletions;
|
||
if (p !== null)
|
||
for (var g = 0; g < p.length; g++) {
|
||
var C = p[g];
|
||
try {
|
||
D9(r, a, C);
|
||
} catch (O) {
|
||
Mn(C, a, O);
|
||
}
|
||
}
|
||
var D = ue();
|
||
if (a.subtreeFlags & au)
|
||
for (var P = a.child; P !== null; )
|
||
gn(P), _4(P, r), P = P.sibling;
|
||
gn(D);
|
||
}
|
||
function _4(r, a, d) {
|
||
var p = r.alternate, g = r.flags;
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case V:
|
||
case ne: {
|
||
if (ho(a, r), Go(r), g & Wt) {
|
||
try {
|
||
fo(Fo | Fr, r, r.return), Rl(Fo | Fr, r);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
if (r.mode & Gt) {
|
||
try {
|
||
Ho(), fo(Br | Fr, r, r.return);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
Uo(r);
|
||
} else
|
||
try {
|
||
fo(Br | Fr, r, r.return);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case B: {
|
||
ho(a, r), Go(r), g & wi && p !== null && Ad(p, p.return);
|
||
return;
|
||
}
|
||
case H: {
|
||
if (ho(a, r), Go(r), g & wi && p !== null && Ad(p, p.return), Yr) {
|
||
if (r.flags & nu) {
|
||
var C = r.stateNode;
|
||
try {
|
||
nv(C);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
if (g & Wt) {
|
||
var D = r.stateNode;
|
||
if (D != null) {
|
||
var P = r.memoizedProps, O = p !== null ? p.memoizedProps : P, F = r.type, W = r.updateQueue;
|
||
if (r.updateQueue = null, W !== null)
|
||
try {
|
||
Uf(D, W, F, O, P, r);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case le: {
|
||
if (ho(a, r), Go(r), g & Wt && Yr) {
|
||
if (r.stateNode === null)
|
||
throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");
|
||
var re = r.stateNode, de = r.memoizedProps, be = p !== null ? p.memoizedProps : de;
|
||
try {
|
||
_f(re, be, de);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case J: {
|
||
if (ho(a, r), Go(r), g & Wt) {
|
||
if (Yr && Qr && p !== null) {
|
||
var Re = p.memoizedState;
|
||
if (Re.isDehydrated)
|
||
try {
|
||
Wf(a.containerInfo);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
if (cs) {
|
||
var De = a.containerInfo, wt = a.pendingChildren;
|
||
try {
|
||
el(De, wt);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case G: {
|
||
if (ho(a, r), Go(r), g & Wt && cs) {
|
||
var zt = r.stateNode, Tt = zt.containerInfo, Cn = zt.pendingChildren;
|
||
try {
|
||
el(Tt, Cn);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
case te: {
|
||
ho(a, r), Go(r);
|
||
var ln = r.child;
|
||
if (ln.flags & os) {
|
||
var oe = ln.stateNode, ye = ln.memoizedState, ie = ye !== null;
|
||
if (oe.isHidden = ie, ie) {
|
||
var Ge = ln.alternate !== null && ln.alternate.memoizedState !== null;
|
||
Ge || w8();
|
||
}
|
||
}
|
||
if (g & Wt) {
|
||
try {
|
||
M9(r);
|
||
} catch (Rt) {
|
||
Mn(r, r.return, Rt);
|
||
}
|
||
B4(r);
|
||
}
|
||
return;
|
||
}
|
||
case Ae: {
|
||
var bt = p !== null && p.memoizedState !== null;
|
||
if (
|
||
// TODO: Remove this dead flag
|
||
r.mode & Zt
|
||
) {
|
||
var ut = ia;
|
||
ia = ut || bt, ho(a, r), ia = ut;
|
||
} else
|
||
ho(a, r);
|
||
if (Go(r), g & os) {
|
||
var rn = r.stateNode, Lt = r.memoizedState, pn = Lt !== null, Jt = r;
|
||
if (rn.isHidden = pn, pn && !bt && (Jt.mode & Zt) !== Mt) {
|
||
xt = Jt;
|
||
for (var Ln = Jt.child; Ln !== null; )
|
||
xt = Ln, O9(Ln), Ln = Ln.sibling;
|
||
}
|
||
Yr && C9(Jt, pn);
|
||
}
|
||
return;
|
||
}
|
||
case ve: {
|
||
ho(a, r), Go(r), g & Wt && B4(r);
|
||
return;
|
||
}
|
||
case Ce:
|
||
return;
|
||
default: {
|
||
ho(a, r), Go(r);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
function Go(r) {
|
||
var a = r.flags;
|
||
if (a & jn) {
|
||
try {
|
||
T9(r);
|
||
} catch (d) {
|
||
Mn(r, r.return, d);
|
||
}
|
||
r.flags &= ~jn;
|
||
}
|
||
a & Gi && (r.flags &= ~Gi);
|
||
}
|
||
function P9(r, a, d) {
|
||
Pd = d, Od = a, xt = r, U4(r, a, d), Pd = null, Od = null;
|
||
}
|
||
function U4(r, a, d) {
|
||
for (var p = (r.mode & Zt) !== Mt; xt !== null; ) {
|
||
var g = xt, C = g.child;
|
||
if (g.tag === Ae && p) {
|
||
var D = g.memoizedState !== null, P = D || Mm;
|
||
if (P) {
|
||
My(r, a, d);
|
||
continue;
|
||
} else {
|
||
var O = g.alternate, F = O !== null && O.memoizedState !== null, W = F || ia, re = Mm, de = ia;
|
||
Mm = P, ia = W, ia && !de && (xt = g, A9(g));
|
||
for (var be = C; be !== null; )
|
||
xt = be, U4(
|
||
be,
|
||
// New root; bubble back up to here and stop.
|
||
a,
|
||
d
|
||
), be = be.sibling;
|
||
xt = g, Mm = re, ia = de, My(r, a, d);
|
||
continue;
|
||
}
|
||
}
|
||
(g.subtreeFlags & iu) !== dt && C !== null ? (C.return = g, xt = C) : My(r, a, d);
|
||
}
|
||
}
|
||
function My(r, a, d) {
|
||
for (; xt !== null; ) {
|
||
var p = xt;
|
||
if ((p.flags & iu) !== dt) {
|
||
var g = p.alternate;
|
||
gn(p);
|
||
try {
|
||
S9(a, g, p, d);
|
||
} catch (D) {
|
||
Mn(p, p.return, D);
|
||
}
|
||
Sn();
|
||
}
|
||
if (p === r) {
|
||
xt = null;
|
||
return;
|
||
}
|
||
var C = p.sibling;
|
||
if (C !== null) {
|
||
C.return = p.return, xt = C;
|
||
return;
|
||
}
|
||
xt = p.return;
|
||
}
|
||
}
|
||
function O9(r) {
|
||
for (; xt !== null; ) {
|
||
var a = xt, d = a.child;
|
||
switch (a.tag) {
|
||
case U:
|
||
case $:
|
||
case V:
|
||
case ne: {
|
||
if (a.mode & Gt)
|
||
try {
|
||
Ho(), fo(Br, a, a.return);
|
||
} finally {
|
||
Uo(a);
|
||
}
|
||
else
|
||
fo(Br, a, a.return);
|
||
break;
|
||
}
|
||
case B: {
|
||
Ad(a, a.return);
|
||
var p = a.stateNode;
|
||
typeof p.componentWillUnmount == "function" && Ey(a, a.return, p);
|
||
break;
|
||
}
|
||
case H: {
|
||
Ad(a, a.return);
|
||
break;
|
||
}
|
||
case Ae: {
|
||
var g = a.memoizedState !== null;
|
||
if (g) {
|
||
H4(r);
|
||
continue;
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
d !== null ? (d.return = a, xt = d) : H4(r);
|
||
}
|
||
}
|
||
function H4(r) {
|
||
for (; xt !== null; ) {
|
||
var a = xt;
|
||
if (a === r) {
|
||
xt = null;
|
||
return;
|
||
}
|
||
var d = a.sibling;
|
||
if (d !== null) {
|
||
d.return = a.return, xt = d;
|
||
return;
|
||
}
|
||
xt = a.return;
|
||
}
|
||
}
|
||
function A9(r) {
|
||
for (; xt !== null; ) {
|
||
var a = xt, d = a.child;
|
||
if (a.tag === Ae) {
|
||
var p = a.memoizedState !== null;
|
||
if (p) {
|
||
V4(r);
|
||
continue;
|
||
}
|
||
}
|
||
d !== null ? (d.return = a, xt = d) : V4(r);
|
||
}
|
||
}
|
||
function V4(r) {
|
||
for (; xt !== null; ) {
|
||
var a = xt;
|
||
gn(a);
|
||
try {
|
||
b9(a);
|
||
} catch (p) {
|
||
Mn(a, a.return, p);
|
||
}
|
||
if (Sn(), a === r) {
|
||
xt = null;
|
||
return;
|
||
}
|
||
var d = a.sibling;
|
||
if (d !== null) {
|
||
d.return = a.return, xt = d;
|
||
return;
|
||
}
|
||
xt = a.return;
|
||
}
|
||
}
|
||
function N9(r, a, d, p) {
|
||
xt = a, z9(a, r, d, p);
|
||
}
|
||
function z9(r, a, d, p) {
|
||
for (; xt !== null; ) {
|
||
var g = xt, C = g.child;
|
||
(g.subtreeFlags & Xs) !== dt && C !== null ? (C.return = g, xt = C) : I9(r, a, d, p);
|
||
}
|
||
}
|
||
function I9(r, a, d, p) {
|
||
for (; xt !== null; ) {
|
||
var g = xt;
|
||
if ((g.flags & Va) !== dt) {
|
||
gn(g);
|
||
try {
|
||
L9(a, g, d, p);
|
||
} catch (D) {
|
||
Mn(g, g.return, D);
|
||
}
|
||
Sn();
|
||
}
|
||
if (g === r) {
|
||
xt = null;
|
||
return;
|
||
}
|
||
var C = g.sibling;
|
||
if (C !== null) {
|
||
C.return = g.return, xt = C;
|
||
return;
|
||
}
|
||
xt = g.return;
|
||
}
|
||
}
|
||
function L9(r, a, d, p) {
|
||
switch (a.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
if (a.mode & Gt) {
|
||
ay();
|
||
try {
|
||
Rl(ra | Fr, a);
|
||
} finally {
|
||
ry(a);
|
||
}
|
||
} else
|
||
Rl(ra | Fr, a);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function F9(r) {
|
||
xt = r, B9();
|
||
}
|
||
function B9() {
|
||
for (; xt !== null; ) {
|
||
var r = xt, a = r.child;
|
||
if ((xt.flags & da) !== dt) {
|
||
var d = r.deletions;
|
||
if (d !== null) {
|
||
for (var p = 0; p < d.length; p++) {
|
||
var g = d[p];
|
||
xt = g, H9(g, r);
|
||
}
|
||
{
|
||
var C = r.alternate;
|
||
if (C !== null) {
|
||
var D = C.child;
|
||
if (D !== null) {
|
||
C.child = null;
|
||
do {
|
||
var P = D.sibling;
|
||
D.sibling = null, D = P;
|
||
} while (D !== null);
|
||
}
|
||
}
|
||
}
|
||
xt = r;
|
||
}
|
||
}
|
||
(r.subtreeFlags & Xs) !== dt && a !== null ? (a.return = r, xt = a) : _9();
|
||
}
|
||
}
|
||
function _9() {
|
||
for (; xt !== null; ) {
|
||
var r = xt;
|
||
(r.flags & Va) !== dt && (gn(r), U9(r), Sn());
|
||
var a = r.sibling;
|
||
if (a !== null) {
|
||
a.return = r.return, xt = a;
|
||
return;
|
||
}
|
||
xt = r.return;
|
||
}
|
||
}
|
||
function U9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
r.mode & Gt ? (ay(), fo(ra | Fr, r, r.return), ry(r)) : fo(ra | Fr, r, r.return);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function H9(r, a) {
|
||
for (; xt !== null; ) {
|
||
var d = xt;
|
||
gn(d), W9(d, a), Sn();
|
||
var p = d.child;
|
||
p !== null ? (p.return = d, xt = p) : V9(r);
|
||
}
|
||
}
|
||
function V9(r) {
|
||
for (; xt !== null; ) {
|
||
var a = xt, d = a.sibling, p = a.return;
|
||
if (I4(a), a === r) {
|
||
xt = null;
|
||
return;
|
||
}
|
||
if (d !== null) {
|
||
d.return = p, xt = d;
|
||
return;
|
||
}
|
||
xt = p;
|
||
}
|
||
}
|
||
function W9(r, a) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
r.mode & Gt ? (ay(), fo(ra, r, a), ry(r)) : fo(ra, r, a);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function G9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
try {
|
||
Rl(Br | Fr, r);
|
||
} catch (d) {
|
||
Mn(r, r.return, d);
|
||
}
|
||
break;
|
||
}
|
||
case B: {
|
||
var a = r.stateNode;
|
||
try {
|
||
a.componentDidMount();
|
||
} catch (d) {
|
||
Mn(r, r.return, d);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function q9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
try {
|
||
Rl(ra | Fr, r);
|
||
} catch (a) {
|
||
Mn(r, r.return, a);
|
||
}
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function Y9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
try {
|
||
fo(Br | Fr, r, r.return);
|
||
} catch (d) {
|
||
Mn(r, r.return, d);
|
||
}
|
||
break;
|
||
}
|
||
case B: {
|
||
var a = r.stateNode;
|
||
typeof a.componentWillUnmount == "function" && Ey(r, r.return, a);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function Q9(r) {
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne:
|
||
try {
|
||
fo(ra | Fr, r, r.return);
|
||
} catch (a) {
|
||
Mn(r, r.return, a);
|
||
}
|
||
}
|
||
}
|
||
var km = 0, Pm = 1, Om = 2, Am = 3, Nm = 4;
|
||
if (typeof Symbol == "function" && Symbol.for) {
|
||
var Wp = Symbol.for;
|
||
km = Wp("selector.component"), Pm = Wp("selector.has_pseudo_class"), Om = Wp("selector.role"), Am = Wp("selector.test_id"), Nm = Wp("selector.text");
|
||
}
|
||
function X9(r) {
|
||
return {
|
||
$$typeof: km,
|
||
value: r
|
||
};
|
||
}
|
||
function K9(r) {
|
||
return {
|
||
$$typeof: Pm,
|
||
value: r
|
||
};
|
||
}
|
||
function Z9(r) {
|
||
return {
|
||
$$typeof: Om,
|
||
value: r
|
||
};
|
||
}
|
||
function J9(r) {
|
||
return {
|
||
$$typeof: Nm,
|
||
value: r
|
||
};
|
||
}
|
||
function $9(r) {
|
||
return {
|
||
$$typeof: Am,
|
||
value: r
|
||
};
|
||
}
|
||
function Ry(r) {
|
||
var a = Mc(r);
|
||
if (a != null) {
|
||
if (typeof a.memoizedProps["data-testname"] != "string")
|
||
throw new Error("Invalid host root specified. Should be either a React container or a node with a testname attribute.");
|
||
return a;
|
||
} else {
|
||
var d = F0(r);
|
||
if (d === null)
|
||
throw new Error("Could not find React container within specified host subtree.");
|
||
return d.stateNode.current;
|
||
}
|
||
}
|
||
function ky(r, a) {
|
||
switch (a.$$typeof) {
|
||
case km:
|
||
if (r.type === a.value)
|
||
return !0;
|
||
break;
|
||
case Pm:
|
||
return e8(r, a.value);
|
||
case Om:
|
||
if (r.tag === H) {
|
||
var d = r.stateNode;
|
||
if (Bf(d, a.value))
|
||
return !0;
|
||
}
|
||
break;
|
||
case Nm:
|
||
if (r.tag === H || r.tag === le) {
|
||
var p = dn(r);
|
||
if (p !== null && p.indexOf(a.value) >= 0)
|
||
return !0;
|
||
}
|
||
break;
|
||
case Am:
|
||
if (r.tag === H) {
|
||
var g = r.memoizedProps["data-testname"];
|
||
if (typeof g == "string" && g.toLowerCase() === a.value.toLowerCase())
|
||
return !0;
|
||
}
|
||
break;
|
||
default:
|
||
throw new Error("Invalid selector type specified.");
|
||
}
|
||
return !1;
|
||
}
|
||
function Py(r) {
|
||
switch (r.$$typeof) {
|
||
case km:
|
||
var a = yt(r.value) || "Unknown";
|
||
return "<" + a + ">";
|
||
case Pm:
|
||
return ":has(" + (Py(r) || "") + ")";
|
||
case Om:
|
||
return '[role="' + r.value + '"]';
|
||
case Nm:
|
||
return '"' + r.value + '"';
|
||
case Am:
|
||
return '[data-testname="' + r.value + '"]';
|
||
default:
|
||
throw new Error("Invalid selector type specified.");
|
||
}
|
||
}
|
||
function W4(r, a) {
|
||
for (var d = [], p = [r, 0], g = 0; g < p.length; ) {
|
||
var C = p[g++], D = p[g++], P = a[D];
|
||
if (!(C.tag === H && Js(C))) {
|
||
for (; P != null && ky(C, P); )
|
||
D++, P = a[D];
|
||
if (D === a.length)
|
||
d.push(C);
|
||
else
|
||
for (var O = C.child; O !== null; )
|
||
p.push(O, D), O = O.sibling;
|
||
}
|
||
}
|
||
return d;
|
||
}
|
||
function e8(r, a) {
|
||
for (var d = [r, 0], p = 0; p < d.length; ) {
|
||
var g = d[p++], C = d[p++], D = a[C];
|
||
if (!(g.tag === H && Js(g))) {
|
||
for (; D != null && ky(g, D); )
|
||
C++, D = a[C];
|
||
if (C === a.length)
|
||
return !0;
|
||
for (var P = g.child; P !== null; )
|
||
d.push(P, C), P = P.sibling;
|
||
}
|
||
}
|
||
return !1;
|
||
}
|
||
function zm(r, a) {
|
||
if (!Ei)
|
||
throw new Error("Test selector API is not supported by this renderer.");
|
||
for (var d = Ry(r), p = W4(d, a), g = [], C = Array.from(p), D = 0; D < C.length; ) {
|
||
var P = C[D++];
|
||
if (P.tag === H) {
|
||
if (Js(P))
|
||
continue;
|
||
g.push(P.stateNode);
|
||
} else
|
||
for (var O = P.child; O !== null; )
|
||
C.push(O), O = O.sibling;
|
||
}
|
||
return g;
|
||
}
|
||
function t8(r, a) {
|
||
if (!Ei)
|
||
throw new Error("Test selector API is not supported by this renderer.");
|
||
for (var d = Ry(r), p = 0, g = [], C = [d, 0], D = 0; D < C.length; ) {
|
||
var P = C[D++], O = C[D++], F = a[O];
|
||
if (!(P.tag === H && Js(P)) && (ky(P, F) && (g.push(Py(F)), O++, O > p && (p = O)), O < a.length))
|
||
for (var W = P.child; W !== null; )
|
||
C.push(W, O), W = W.sibling;
|
||
}
|
||
if (p < a.length) {
|
||
for (var re = [], de = p; de < a.length; de++)
|
||
re.push(Py(a[de]));
|
||
return `findAllNodes was able to match part of the selector:
|
||
` + (" " + g.join(" > ") + `
|
||
|
||
`) + `No matching component was found for:
|
||
` + (" " + re.join(" > "));
|
||
}
|
||
return null;
|
||
}
|
||
function n8(r, a) {
|
||
if (!Ei)
|
||
throw new Error("Test selector API is not supported by this renderer.");
|
||
for (var d = zm(r, a), p = [], g = 0; g < d.length; g++)
|
||
p.push(Ff(d[g]));
|
||
for (var C = p.length - 1; C > 0; C--)
|
||
for (var D = p[C], P = D.x, O = P + D.width, F = D.y, W = F + D.height, re = C - 1; re >= 0; re--)
|
||
if (C !== re) {
|
||
var de = p[re], be = de.x, Re = be + de.width, De = de.y, wt = De + de.height;
|
||
if (P >= be && F >= De && O <= Re && W <= wt) {
|
||
p.splice(C, 1);
|
||
break;
|
||
} else if (P === be && D.width === de.width && !(wt < F) && !(De > W)) {
|
||
De > F && (de.height += De - F, de.y = F), wt < W && (de.height = W - De), p.splice(C, 1);
|
||
break;
|
||
} else if (F === De && D.height === de.height && !(Re < P) && !(be > O)) {
|
||
be > P && (de.width += be - P, de.x = P), Re < O && (de.width = O - be), p.splice(C, 1);
|
||
break;
|
||
}
|
||
}
|
||
return p;
|
||
}
|
||
function r8(r, a) {
|
||
if (!Ei)
|
||
throw new Error("Test selector API is not supported by this renderer.");
|
||
for (var d = Ry(r), p = W4(d, a), g = Array.from(p), C = 0; C < g.length; ) {
|
||
var D = g[C++];
|
||
if (!Js(D)) {
|
||
if (D.tag === H) {
|
||
var P = D.stateNode;
|
||
if (tv(P))
|
||
return !0;
|
||
}
|
||
for (var O = D.child; O !== null; )
|
||
g.push(O), O = O.sibling;
|
||
}
|
||
}
|
||
return !1;
|
||
}
|
||
var Im = [];
|
||
function a8() {
|
||
Ei && Im.forEach(function(r) {
|
||
return r();
|
||
});
|
||
}
|
||
function i8(r, a, d, p) {
|
||
if (!Ei)
|
||
throw new Error("Test selector API is not supported by this renderer.");
|
||
var g = zm(r, a), C = B0(g, d, p), D = C.disconnect, P = C.observe, O = C.unobserve, F = function() {
|
||
var W = zm(r, a);
|
||
g.forEach(function(re) {
|
||
W.indexOf(re) < 0 && O(re);
|
||
}), W.forEach(function(re) {
|
||
g.indexOf(re) < 0 && P(re);
|
||
});
|
||
};
|
||
return Im.push(F), {
|
||
disconnect: function() {
|
||
var W = Im.indexOf(F);
|
||
W >= 0 && Im.splice(W, 1), D();
|
||
}
|
||
};
|
||
}
|
||
var o8 = l.ReactCurrentActQueue;
|
||
function s8(r) {
|
||
{
|
||
var a = (
|
||
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
|
||
typeof IS_REACT_ACT_ENVIRONMENT < "u" ? IS_REACT_ACT_ENVIRONMENT : void 0
|
||
), d = typeof jest < "u";
|
||
return z0 && d && a !== !1;
|
||
}
|
||
}
|
||
function G4() {
|
||
{
|
||
var r = (
|
||
// $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
|
||
typeof IS_REACT_ACT_ENVIRONMENT < "u" ? IS_REACT_ACT_ENVIRONMENT : void 0
|
||
);
|
||
return !r && o8.current !== null && m("The current testing environment is not configured to support act(...)"), r;
|
||
}
|
||
}
|
||
var l8 = Math.ceil, Oy = l.ReactCurrentDispatcher, Ay = l.ReactCurrentOwner, tr = l.ReactCurrentBatchConfig, vo = l.ReactCurrentActQueue, Tr = (
|
||
/* */
|
||
0
|
||
), Ny = (
|
||
/* */
|
||
1
|
||
), sa = (
|
||
/* */
|
||
2
|
||
), zi = (
|
||
/* */
|
||
4
|
||
), Ps = 0, Gp = 1, zu = 2, Lm = 3, qp = 4, q4 = 5, zy = 6, qt = Tr, Fa = null, nr = null, Hr = Me, qo = Me, Iy = Pa(Me), Vr = Ps, Yp = null, Fm = Me, Qp = Me, Bm = Me, Xp = null, Ja = null, Ly = 0, Y4 = 500, Q4 = 1 / 0, u8 = 500, Os = null;
|
||
function Nd() {
|
||
Q4 = gr() + u8;
|
||
}
|
||
function X4() {
|
||
return Q4;
|
||
}
|
||
var _m = !1, Fy = null, zd = null, Iu = !1, kl = null, Kp = Me, By = [], _y = null, c8 = 50, Zp = 0, Uy = null, Hy = !1, Um = !1, d8 = 50, Id = 0, Hm = null, Jp = Tn, Vm = Me, K4 = !1;
|
||
function Wm() {
|
||
return Fa;
|
||
}
|
||
function ba() {
|
||
return (qt & (sa | zi)) !== Tr ? gr() : (Jp !== Tn || (Jp = gr()), Jp);
|
||
}
|
||
function Pl(r) {
|
||
var a = r.mode;
|
||
if ((a & Zt) === Mt)
|
||
return Pt;
|
||
if ((qt & sa) !== Tr && Hr !== Me)
|
||
return gs(Hr);
|
||
var d = N() !== T;
|
||
if (d) {
|
||
if (tr.transition !== null) {
|
||
var p = tr.transition;
|
||
p._updatedFibers || (p._updatedFibers = /* @__PURE__ */ new Set()), p._updatedFibers.add(r);
|
||
}
|
||
return Vm === vr && (Vm = xu()), Vm;
|
||
}
|
||
var g = ma();
|
||
if (g !== vr)
|
||
return g;
|
||
var C = L0();
|
||
return C;
|
||
}
|
||
function f8(r) {
|
||
var a = r.mode;
|
||
return (a & Zt) === Mt ? Pt : Q0();
|
||
}
|
||
function Dr(r, a, d, p) {
|
||
_8(), K4 && m("useInsertionEffect must not schedule updates."), Hy && (Um = !0), gl(r, d, p), (qt & sa) !== Me && r === Fa ? V8(a) : (ya && Ar(r, a, d), W8(a), r === Fa && ((qt & sa) === Tr && (Qp = kt(Qp, d)), Vr === qp && Ol(r, Hr)), $a(r, p), d === Pt && qt === Tr && (a.mode & Zt) === Mt && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
|
||
!vo.isBatchingLegacy && (Nd(), Ir()));
|
||
}
|
||
function p8(r, a, d) {
|
||
var p = r.current;
|
||
p.lanes = a, gl(r, a, d), $a(r, d);
|
||
}
|
||
function h8(r) {
|
||
return (
|
||
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
|
||
// decided not to enable it.
|
||
(qt & sa) !== Tr
|
||
);
|
||
}
|
||
function $a(r, a) {
|
||
var d = r.callbackNode;
|
||
gv(r, a);
|
||
var p = mu(r, r === Fa ? Hr : Me);
|
||
if (p === Me) {
|
||
d !== null && d3(d), r.callbackNode = null, r.callbackPriority = vr;
|
||
return;
|
||
}
|
||
var g = Ao(p), C = r.callbackPriority;
|
||
if (C === g && // Special case related to `act`. If the currently scheduled task is a
|
||
// Scheduler task, rather than an `act` task, cancel it and re-scheduled
|
||
// on the `act` queue.
|
||
!(vo.current !== null && d !== Qy)) {
|
||
d == null && C !== Pt && m("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");
|
||
return;
|
||
}
|
||
d != null && d3(d);
|
||
var D;
|
||
if (g === Pt)
|
||
r.tag === $n ? (vo.isBatchingLegacy !== null && (vo.didScheduleLegacyUpdate = !0), gd($4.bind(null, r))) : Tu($4.bind(null, r)), ev ? vo.current !== null ? vo.current.push(Lr) : Lf(function() {
|
||
(qt & (sa | zi)) === Tr && Lr();
|
||
}) : Km(ga, Lr), D = null;
|
||
else {
|
||
var P;
|
||
switch (cd(p)) {
|
||
case ta:
|
||
P = ga;
|
||
break;
|
||
case ys:
|
||
P = hp;
|
||
break;
|
||
case yl:
|
||
P = na;
|
||
break;
|
||
case fp:
|
||
P = Tv;
|
||
break;
|
||
default:
|
||
P = na;
|
||
break;
|
||
}
|
||
D = Km(P, Z4.bind(null, r));
|
||
}
|
||
r.callbackPriority = g, r.callbackNode = D;
|
||
}
|
||
function Z4(r, a) {
|
||
if (w7(), Jp = Tn, Vm = Me, (qt & (sa | zi)) !== Tr)
|
||
throw new Error("Should not already be working.");
|
||
var d = r.callbackNode, p = Yo();
|
||
if (p && r.callbackNode !== d)
|
||
return null;
|
||
var g = mu(r, r === Fa ? Hr : Me);
|
||
if (g === Me)
|
||
return null;
|
||
var C = !fl(r, g) && !bv(r, g) && !a, D = C ? M8(r, g) : Ym(r, g);
|
||
if (D !== Ps) {
|
||
if (D === zu) {
|
||
var P = gu(r);
|
||
P !== Me && (g = P, D = Vy(r, P));
|
||
}
|
||
if (D === Gp) {
|
||
var O = Yp;
|
||
throw Lu(r, Me), Ol(r, g), $a(r, gr()), O;
|
||
}
|
||
if (D === zy)
|
||
Ol(r, g);
|
||
else {
|
||
var F = !fl(r, g), W = r.current.alternate;
|
||
if (F && !m8(W)) {
|
||
if (D = Ym(r, g), D === zu) {
|
||
var re = gu(r);
|
||
re !== Me && (g = re, D = Vy(r, re));
|
||
}
|
||
if (D === Gp) {
|
||
var de = Yp;
|
||
throw Lu(r, Me), Ol(r, g), $a(r, gr()), de;
|
||
}
|
||
}
|
||
r.finishedWork = W, r.finishedLanes = g, v8(r, D, g);
|
||
}
|
||
}
|
||
return $a(r, gr()), r.callbackNode === d ? Z4.bind(null, r) : null;
|
||
}
|
||
function Vy(r, a) {
|
||
var d = Xp;
|
||
if (Na(r)) {
|
||
var p = Lu(r, a);
|
||
p.flags |= Wi, al(r.containerInfo);
|
||
}
|
||
var g = Ym(r, a);
|
||
if (g !== zu) {
|
||
var C = Ja;
|
||
Ja = d, C !== null && J4(C);
|
||
}
|
||
return g;
|
||
}
|
||
function J4(r) {
|
||
Ja === null ? Ja = r : Ja.push.apply(Ja, r);
|
||
}
|
||
function v8(r, a, d) {
|
||
switch (a) {
|
||
case Ps:
|
||
case Gp:
|
||
throw new Error("Root did not complete. This is a bug in React.");
|
||
case zu: {
|
||
Fu(r, Ja, Os);
|
||
break;
|
||
}
|
||
case Lm: {
|
||
if (Ol(r, d), up(d) && // do not delay if we're inside an act() scope
|
||
!f3()) {
|
||
var p = Ly + Y4 - gr();
|
||
if (p > 10) {
|
||
var g = mu(r, Me);
|
||
if (g !== Me)
|
||
break;
|
||
var C = r.suspendedLanes;
|
||
if (!hl(C, d)) {
|
||
ba(), Or(r, C);
|
||
break;
|
||
}
|
||
r.timeoutHandle = Nf(Fu.bind(null, r, Ja, Os), p);
|
||
break;
|
||
}
|
||
}
|
||
Fu(r, Ja, Os);
|
||
break;
|
||
}
|
||
case qp: {
|
||
if (Ol(r, d), cp(d))
|
||
break;
|
||
if (!f3()) {
|
||
var D = vv(r, d), P = D, O = gr() - P, F = B8(O) - O;
|
||
if (F > 10) {
|
||
r.timeoutHandle = Nf(Fu.bind(null, r, Ja, Os), F);
|
||
break;
|
||
}
|
||
}
|
||
Fu(r, Ja, Os);
|
||
break;
|
||
}
|
||
case q4: {
|
||
Fu(r, Ja, Os);
|
||
break;
|
||
}
|
||
default:
|
||
throw new Error("Unknown root exit status.");
|
||
}
|
||
}
|
||
function m8(r) {
|
||
for (var a = r; ; ) {
|
||
if (a.flags & Cc) {
|
||
var d = a.updateQueue;
|
||
if (d !== null) {
|
||
var p = d.stores;
|
||
if (p !== null)
|
||
for (var g = 0; g < p.length; g++) {
|
||
var C = p[g], D = C.getSnapshot, P = C.value;
|
||
try {
|
||
if (!cr(D(), P))
|
||
return !1;
|
||
} catch {
|
||
return !1;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
var O = a.child;
|
||
if (a.subtreeFlags & Cc && O !== null) {
|
||
O.return = a, a = O;
|
||
continue;
|
||
}
|
||
if (a === r)
|
||
return !0;
|
||
for (; a.sibling === null; ) {
|
||
if (a.return === null || a.return === r)
|
||
return !0;
|
||
a = a.return;
|
||
}
|
||
a.sibling.return = a.return, a = a.sibling;
|
||
}
|
||
return !0;
|
||
}
|
||
function Ol(r, a) {
|
||
a = Su(a, Bm), a = Su(a, Qp), bu(r, a);
|
||
}
|
||
function $4(r) {
|
||
if (E7(), (qt & (sa | zi)) !== Tr)
|
||
throw new Error("Should not already be working.");
|
||
Yo();
|
||
var a = mu(r, Me);
|
||
if (!er(a, Pt))
|
||
return $a(r, gr()), null;
|
||
var d = Ym(r, a);
|
||
if (r.tag !== $n && d === zu) {
|
||
var p = gu(r);
|
||
p !== Me && (a = p, d = Vy(r, p));
|
||
}
|
||
if (d === Gp) {
|
||
var g = Yp;
|
||
throw Lu(r, Me), Ol(r, a), $a(r, gr()), g;
|
||
}
|
||
if (d === zy)
|
||
throw new Error("Root did not complete. This is a bug in React.");
|
||
var C = r.current.alternate;
|
||
return r.finishedWork = C, r.finishedLanes = a, Fu(r, Ja, Os), $a(r, gr()), null;
|
||
}
|
||
function g8(r, a) {
|
||
a !== Me && (dp(r, kt(a, Pt)), $a(r, gr()), (qt & (sa | zi)) === Tr && (Nd(), Lr()));
|
||
}
|
||
function y8(r) {
|
||
var a = ma(), d = tr.transition;
|
||
try {
|
||
return tr.transition = null, or(yl), r();
|
||
} finally {
|
||
or(a), tr.transition = d;
|
||
}
|
||
}
|
||
function x8(r, a) {
|
||
var d = qt;
|
||
qt |= Ny;
|
||
try {
|
||
return r(a);
|
||
} finally {
|
||
qt = d, qt === Tr && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
|
||
!vo.isBatchingLegacy && (Nd(), Ir());
|
||
}
|
||
}
|
||
function S8(r, a, d, p, g) {
|
||
var C = ma(), D = tr.transition;
|
||
try {
|
||
return tr.transition = null, or(ta), r(a, d, p, g);
|
||
} finally {
|
||
or(C), tr.transition = D, qt === Tr && Nd();
|
||
}
|
||
}
|
||
function Gm(r) {
|
||
kl !== null && kl.tag === $n && (qt & (sa | zi)) === Tr && Yo();
|
||
var a = qt;
|
||
qt |= Ny;
|
||
var d = tr.transition, p = ma();
|
||
try {
|
||
return tr.transition = null, or(ta), r ? r() : void 0;
|
||
} finally {
|
||
or(p), tr.transition = d, qt = a, (qt & (sa | zi)) === Tr && Lr();
|
||
}
|
||
}
|
||
function b8() {
|
||
return (qt & (sa | zi)) !== Tr;
|
||
}
|
||
function C8(r) {
|
||
var a = qt;
|
||
qt |= Ny;
|
||
var d = tr.transition, p = ma();
|
||
try {
|
||
tr.transition = null, or(ta), r();
|
||
} finally {
|
||
or(p), tr.transition = d, qt = a, qt === Tr && (Nd(), Lr());
|
||
}
|
||
}
|
||
function qm(r, a) {
|
||
pr(Iy, qo, r), qo = kt(qo, a);
|
||
}
|
||
function Wy(r) {
|
||
qo = Iy.current, zn(Iy, r);
|
||
}
|
||
function Lu(r, a) {
|
||
r.finishedWork = null, r.finishedLanes = Me;
|
||
var d = r.timeoutHandle;
|
||
if (d !== zf && (r.timeoutHandle = zf, ii(d)), nr !== null)
|
||
for (var p = nr.return; p !== null; ) {
|
||
var g = p.alternate;
|
||
T4(g, p), p = p.return;
|
||
}
|
||
Fa = r;
|
||
var C = Bu(r.current, null);
|
||
return nr = C, Hr = qo = a, Vr = Ps, Yp = null, Fm = Me, Qp = Me, Bm = Me, Xp = null, Ja = null, JM(), pe.discardPendingWarnings(), C;
|
||
}
|
||
function e3(r, a) {
|
||
do {
|
||
var d = nr;
|
||
try {
|
||
if (Vv(), RC(), Sn(), Ay.current = null, d === null || d.return === null) {
|
||
Vr = Gp, Yp = a, nr = null;
|
||
return;
|
||
}
|
||
if (I && d.mode & Gt && bm(d, !0), z)
|
||
if (On(), a !== null && typeof a == "object" && typeof a.then == "function") {
|
||
var p = a;
|
||
pd(d, p, Hr);
|
||
} else
|
||
bs(d, a, Hr);
|
||
R7(r, d.return, d, a, Hr), a3(d);
|
||
} catch (g) {
|
||
a = g, nr === d && d !== null ? (d = d.return, nr = d) : d = nr;
|
||
continue;
|
||
}
|
||
return;
|
||
} while (!0);
|
||
}
|
||
function t3() {
|
||
var r = Oy.current;
|
||
return Oy.current = mm, r === null ? mm : r;
|
||
}
|
||
function n3(r) {
|
||
Oy.current = r;
|
||
}
|
||
function w8() {
|
||
Ly = gr();
|
||
}
|
||
function $p(r) {
|
||
Fm = kt(r, Fm);
|
||
}
|
||
function E8() {
|
||
Vr === Ps && (Vr = Lm);
|
||
}
|
||
function Gy() {
|
||
(Vr === Ps || Vr === Lm || Vr === zu) && (Vr = qp), Fa !== null && (yu(Fm) || yu(Qp)) && Ol(Fa, Hr);
|
||
}
|
||
function j8(r) {
|
||
Vr !== qp && (Vr = zu), Xp === null ? Xp = [r] : Xp.push(r);
|
||
}
|
||
function T8() {
|
||
return Vr === Ps;
|
||
}
|
||
function Ym(r, a) {
|
||
var d = qt;
|
||
qt |= sa;
|
||
var p = t3();
|
||
if (Fa !== r || Hr !== a) {
|
||
if (ya) {
|
||
var g = r.memoizedUpdaters;
|
||
g.size > 0 && (eh(r, Hr), g.clear()), Cv(r, a);
|
||
}
|
||
Os = ft(), Lu(r, a);
|
||
}
|
||
hd(a);
|
||
do
|
||
try {
|
||
D8();
|
||
break;
|
||
} catch (C) {
|
||
e3(r, C);
|
||
}
|
||
while (!0);
|
||
if (Vv(), qt = d, n3(p), nr !== null)
|
||
throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");
|
||
return Cs(), Fa = null, Hr = Me, Vr;
|
||
}
|
||
function D8() {
|
||
for (; nr !== null; )
|
||
r3(nr);
|
||
}
|
||
function M8(r, a) {
|
||
var d = qt;
|
||
qt |= sa;
|
||
var p = t3();
|
||
if (Fa !== r || Hr !== a) {
|
||
if (ya) {
|
||
var g = r.memoizedUpdaters;
|
||
g.size > 0 && (eh(r, Hr), g.clear()), Cv(r, a);
|
||
}
|
||
Os = ft(), Nd(), Lu(r, a);
|
||
}
|
||
hd(a);
|
||
do
|
||
try {
|
||
R8();
|
||
break;
|
||
} catch (C) {
|
||
e3(r, C);
|
||
}
|
||
while (!0);
|
||
return Vv(), n3(p), qt = d, nr !== null ? (ao(), Ps) : (Cs(), Fa = null, Hr = Me, Vr);
|
||
}
|
||
function R8() {
|
||
for (; nr !== null && !Ri(); )
|
||
r3(nr);
|
||
}
|
||
function r3(r) {
|
||
var a = r.alternate;
|
||
gn(r);
|
||
var d;
|
||
(r.mode & Gt) !== Mt ? (ny(r), d = qy(a, r, qo), bm(r, !0)) : d = qy(a, r, qo), Sn(), r.memoizedProps = r.pendingProps, d === null ? a3(r) : nr = d, Ay.current = null;
|
||
}
|
||
function a3(r) {
|
||
var a = r;
|
||
do {
|
||
var d = a.alternate, p = a.return;
|
||
if ((a.flags & ru) === dt) {
|
||
gn(a);
|
||
var g = void 0;
|
||
if ((a.mode & Gt) === Mt ? g = j4(d, a, qo) : (ny(a), g = j4(d, a, qo), bm(a, !1)), Sn(), g !== null) {
|
||
nr = g;
|
||
return;
|
||
}
|
||
} else {
|
||
var C = s9(d, a);
|
||
if (C !== null) {
|
||
C.flags &= Df, nr = C;
|
||
return;
|
||
}
|
||
if ((a.mode & Gt) !== Mt) {
|
||
bm(a, !1);
|
||
for (var D = a.actualDuration, P = a.child; P !== null; )
|
||
D += P.actualDuration, P = P.sibling;
|
||
a.actualDuration = D;
|
||
}
|
||
if (p !== null)
|
||
p.flags |= ru, p.subtreeFlags = dt, p.deletions = null;
|
||
else {
|
||
Vr = zy, nr = null;
|
||
return;
|
||
}
|
||
}
|
||
var O = a.sibling;
|
||
if (O !== null) {
|
||
nr = O;
|
||
return;
|
||
}
|
||
a = p, nr = a;
|
||
} while (a !== null);
|
||
Vr === Ps && (Vr = q4);
|
||
}
|
||
function Fu(r, a, d) {
|
||
var p = ma(), g = tr.transition;
|
||
try {
|
||
tr.transition = null, or(ta), k8(r, a, d, p);
|
||
} finally {
|
||
tr.transition = g, or(p);
|
||
}
|
||
return null;
|
||
}
|
||
function k8(r, a, d, p) {
|
||
do
|
||
Yo();
|
||
while (kl !== null);
|
||
if (U8(), (qt & (sa | zi)) !== Tr)
|
||
throw new Error("Should not already be working.");
|
||
var g = r.finishedWork, C = r.finishedLanes;
|
||
if (K0(C), g === null)
|
||
return wu(), null;
|
||
if (C === Me && m("root.finishedLanes should not be empty during a commit. This is a bug in React."), r.finishedWork = null, r.finishedLanes = Me, g === r.current)
|
||
throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");
|
||
r.callbackNode = null, r.callbackPriority = vr;
|
||
var D = kt(g.lanes, g.childLanes);
|
||
X0(r, D), r === Fa && (Fa = null, nr = null, Hr = Me), ((g.subtreeFlags & Xs) !== dt || (g.flags & Xs) !== dt) && (Iu || (Iu = !0, _y = d, Km(na, function() {
|
||
return Yo(), null;
|
||
})));
|
||
var P = (g.subtreeFlags & (kf | au | iu | Xs)) !== dt, O = (g.flags & (kf | au | iu | Xs)) !== dt;
|
||
if (P || O) {
|
||
var F = tr.transition;
|
||
tr.transition = null;
|
||
var W = ma();
|
||
or(ta);
|
||
var re = qt;
|
||
qt |= zi, Ay.current = null, v9(r, g), e4(), k9(r, g, C), us(r.containerInfo), r.current = g, yp(C), P9(g, r, C), Eu(), pp(), qt = re, or(W), tr.transition = F;
|
||
} else
|
||
r.current = g, e4();
|
||
var de = Iu;
|
||
if (Iu ? (Iu = !1, kl = r, Kp = C) : (Id = 0, Hm = null), D = r.pendingLanes, D === Me && (zd = null), de || l3(r.current, !1), Cu(g.stateNode, p), ya && r.memoizedUpdaters.clear(), a8(), $a(r, gr()), a !== null)
|
||
for (var be = r.onRecoverableError, Re = 0; Re < a.length; Re++) {
|
||
var De = a[Re], wt = De.stack, zt = De.digest;
|
||
be(De.value, {
|
||
componentStack: wt,
|
||
digest: zt
|
||
});
|
||
}
|
||
if (_m) {
|
||
_m = !1;
|
||
var Tt = Fy;
|
||
throw Fy = null, Tt;
|
||
}
|
||
return er(Kp, Pt) && r.tag !== $n && Yo(), D = r.pendingLanes, er(D, Pt) ? (C7(), r === Uy ? Zp++ : (Zp = 0, Uy = r)) : Zp = 0, Lr(), wu(), null;
|
||
}
|
||
function Yo() {
|
||
if (kl !== null) {
|
||
var r = cd(Kp), a = jv(yl, r), d = tr.transition, p = ma();
|
||
try {
|
||
return tr.transition = null, or(a), O8();
|
||
} finally {
|
||
or(p), tr.transition = d;
|
||
}
|
||
}
|
||
return !1;
|
||
}
|
||
function P8(r) {
|
||
By.push(r), Iu || (Iu = !0, Km(na, function() {
|
||
return Yo(), null;
|
||
}));
|
||
}
|
||
function O8() {
|
||
if (kl === null)
|
||
return !1;
|
||
var r = _y;
|
||
_y = null;
|
||
var a = kl, d = Kp;
|
||
if (kl = null, Kp = Me, (qt & (sa | zi)) !== Tr)
|
||
throw new Error("Cannot flush passive effects while already rendering.");
|
||
Hy = !0, Um = !1, xa(d);
|
||
var p = qt;
|
||
qt |= zi, F9(a.current), N9(a, a.current, d, r);
|
||
{
|
||
var g = By;
|
||
By = [];
|
||
for (var C = 0; C < g.length; C++) {
|
||
var D = g[C];
|
||
x9(a, D);
|
||
}
|
||
}
|
||
xp(), l3(a.current, !0), qt = p, Lr(), Um ? a === Hm ? Id++ : (Id = 0, Hm = a) : Id = 0, Hy = !1, Um = !1, vp(a);
|
||
{
|
||
var P = a.current.stateNode;
|
||
P.effectDuration = 0, P.passiveEffectDuration = 0;
|
||
}
|
||
return !0;
|
||
}
|
||
function i3(r) {
|
||
return zd !== null && zd.has(r);
|
||
}
|
||
function A8(r) {
|
||
zd === null ? zd = /* @__PURE__ */ new Set([r]) : zd.add(r);
|
||
}
|
||
function N8(r) {
|
||
_m || (_m = !0, Fy = r);
|
||
}
|
||
var z8 = N8;
|
||
function o3(r, a, d) {
|
||
var p = Au(d, a), g = n4(r, p, Pt), C = El(r, g, Pt), D = ba();
|
||
C !== null && (gl(C, Pt, D), $a(C, D));
|
||
}
|
||
function Mn(r, a, d) {
|
||
if (f9(d), th(!1), r.tag === J) {
|
||
o3(r, r, d);
|
||
return;
|
||
}
|
||
var p = null;
|
||
for (p = a; p !== null; ) {
|
||
if (p.tag === J) {
|
||
o3(p, r, d);
|
||
return;
|
||
} else if (p.tag === B) {
|
||
var g = p.type, C = p.stateNode;
|
||
if (typeof g.getDerivedStateFromError == "function" || typeof C.componentDidCatch == "function" && !i3(C)) {
|
||
var D = Au(d, r), P = ly(p, D, Pt), O = El(p, P, Pt), F = ba();
|
||
O !== null && (gl(O, Pt, F), $a(O, F));
|
||
return;
|
||
}
|
||
}
|
||
p = p.return;
|
||
}
|
||
m(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
||
|
||
Error message:
|
||
|
||
%s`, d);
|
||
}
|
||
function I8(r, a, d) {
|
||
var p = r.pingCache;
|
||
p !== null && p.delete(a);
|
||
var g = ba();
|
||
Or(r, d), G8(r), Fa === r && hl(Hr, d) && (Vr === qp || Vr === Lm && up(Hr) && gr() - Ly < Y4 ? Lu(r, Me) : Bm = kt(Bm, d)), $a(r, g);
|
||
}
|
||
function s3(r, a) {
|
||
a === vr && (a = f8(r));
|
||
var d = ba(), p = Ia(r, a);
|
||
p !== null && (gl(p, a, d), $a(p, d));
|
||
}
|
||
function L8(r) {
|
||
var a = r.memoizedState, d = vr;
|
||
a !== null && (d = a.retryLane), s3(r, d);
|
||
}
|
||
function F8(r, a) {
|
||
var d = vr, p;
|
||
switch (r.tag) {
|
||
case te:
|
||
p = r.stateNode;
|
||
var g = r.memoizedState;
|
||
g !== null && (d = g.retryLane);
|
||
break;
|
||
case ve:
|
||
p = r.stateNode;
|
||
break;
|
||
default:
|
||
throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.");
|
||
}
|
||
p !== null && p.delete(a), s3(r, d);
|
||
}
|
||
function B8(r) {
|
||
return r < 120 ? 120 : r < 480 ? 480 : r < 1080 ? 1080 : r < 1920 ? 1920 : r < 3e3 ? 3e3 : r < 4320 ? 4320 : l8(r / 1960) * 1960;
|
||
}
|
||
function _8() {
|
||
if (Zp > c8)
|
||
throw Zp = 0, Uy = null, new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");
|
||
Id > d8 && (Id = 0, Hm = null, m("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."));
|
||
}
|
||
function U8() {
|
||
pe.flushLegacyContextWarning(), pe.flushPendingUnsafeLifecycleWarnings();
|
||
}
|
||
function l3(r, a) {
|
||
gn(r), Qm(r, qi, Y9), a && Qm(r, wc, Q9), Qm(r, qi, G9), a && Qm(r, wc, q9), Sn();
|
||
}
|
||
function Qm(r, a, d) {
|
||
for (var p = r, g = null; p !== null; ) {
|
||
var C = p.subtreeFlags & a;
|
||
p !== g && p.child !== null && C !== dt ? p = p.child : ((p.flags & a) !== dt && d(p), p.sibling !== null ? p = p.sibling : p = g = p.return);
|
||
}
|
||
}
|
||
var Xm = null;
|
||
function u3(r) {
|
||
{
|
||
if ((qt & sa) !== Tr || !(r.mode & Zt))
|
||
return;
|
||
var a = r.tag;
|
||
if (a !== q && a !== J && a !== B && a !== U && a !== $ && a !== V && a !== ne)
|
||
return;
|
||
var d = vt(r) || "ReactComponent";
|
||
if (Xm !== null) {
|
||
if (Xm.has(d))
|
||
return;
|
||
Xm.add(d);
|
||
} else
|
||
Xm = /* @__PURE__ */ new Set([d]);
|
||
var p = jt;
|
||
try {
|
||
gn(r), m("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.");
|
||
} finally {
|
||
p ? gn(r) : Sn();
|
||
}
|
||
}
|
||
}
|
||
var qy;
|
||
{
|
||
var H8 = null;
|
||
qy = function(r, a, d) {
|
||
var p = g3(H8, a);
|
||
try {
|
||
return b4(r, a, d);
|
||
} catch (C) {
|
||
if (Av() || C !== null && typeof C == "object" && typeof C.then == "function")
|
||
throw C;
|
||
if (Vv(), RC(), T4(r, a), g3(a, p), a.mode & Gt && ny(a), R4(null, b4, null, r, a, d), c9()) {
|
||
var g = k4();
|
||
typeof g == "object" && g !== null && g._suppressLogging && typeof C == "object" && C !== null && !C._suppressLogging && (C._suppressLogging = !0);
|
||
}
|
||
throw C;
|
||
}
|
||
};
|
||
}
|
||
var c3 = !1, Yy;
|
||
Yy = /* @__PURE__ */ new Set();
|
||
function V8(r) {
|
||
if (nt && !x7())
|
||
switch (r.tag) {
|
||
case U:
|
||
case $:
|
||
case ne: {
|
||
var a = nr && vt(nr) || "Unknown", d = a;
|
||
if (!Yy.has(d)) {
|
||
Yy.add(d);
|
||
var p = vt(r) || "Unknown";
|
||
m("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render", p, a, a);
|
||
}
|
||
break;
|
||
}
|
||
case B: {
|
||
c3 || (m("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."), c3 = !0);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function eh(r, a) {
|
||
if (ya) {
|
||
var d = r.memoizedUpdaters;
|
||
d.forEach(function(p) {
|
||
Ar(r, p, a);
|
||
});
|
||
}
|
||
}
|
||
var Qy = {};
|
||
function Km(r, a) {
|
||
{
|
||
var d = vo.current;
|
||
return d !== null ? (d.push(a), Qy) : Cr(r, a);
|
||
}
|
||
}
|
||
function d3(r) {
|
||
if (r !== Qy)
|
||
return hi(r);
|
||
}
|
||
function f3() {
|
||
return vo.current !== null;
|
||
}
|
||
function W8(r) {
|
||
{
|
||
if (r.mode & Zt) {
|
||
if (!G4())
|
||
return;
|
||
} else if (!s8() || qt !== Tr || r.tag !== U && r.tag !== $ && r.tag !== ne)
|
||
return;
|
||
if (vo.current === null) {
|
||
var a = jt;
|
||
try {
|
||
gn(r), m(`An update to %s inside a test was not wrapped in act(...).
|
||
|
||
When testing, code that causes React state updates should be wrapped into act(...):
|
||
|
||
act(() => {
|
||
/* fire events that update state */
|
||
});
|
||
/* assert on the output */
|
||
|
||
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`, vt(r));
|
||
} finally {
|
||
a ? gn(r) : Sn();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
function G8(r) {
|
||
r.tag !== $n && G4() && vo.current === null && m(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
||
|
||
When testing, code that resolves suspended data should be wrapped into act(...):
|
||
|
||
act(() => {
|
||
/* finish loading suspended data */
|
||
});
|
||
/* assert on the output */
|
||
|
||
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`);
|
||
}
|
||
function th(r) {
|
||
K4 = r;
|
||
}
|
||
var Ii = null, Ld = null, q8 = function(r) {
|
||
Ii = r;
|
||
};
|
||
function Fd(r) {
|
||
{
|
||
if (Ii === null)
|
||
return r;
|
||
var a = Ii(r);
|
||
return a === void 0 ? r : a.current;
|
||
}
|
||
}
|
||
function Xy(r) {
|
||
return Fd(r);
|
||
}
|
||
function Ky(r) {
|
||
{
|
||
if (Ii === null)
|
||
return r;
|
||
var a = Ii(r);
|
||
if (a === void 0) {
|
||
if (r != null && typeof r.render == "function") {
|
||
var d = Fd(r.render);
|
||
if (r.render !== d) {
|
||
var p = {
|
||
$$typeof: on,
|
||
render: d
|
||
};
|
||
return r.displayName !== void 0 && (p.displayName = r.displayName), p;
|
||
}
|
||
}
|
||
return r;
|
||
}
|
||
return a.current;
|
||
}
|
||
}
|
||
function p3(r, a) {
|
||
{
|
||
if (Ii === null)
|
||
return !1;
|
||
var d = r.elementType, p = a.type, g = !1, C = typeof p == "object" && p !== null ? p.$$typeof : null;
|
||
switch (r.tag) {
|
||
case B: {
|
||
typeof p == "function" && (g = !0);
|
||
break;
|
||
}
|
||
case U: {
|
||
(typeof p == "function" || C === Fe) && (g = !0);
|
||
break;
|
||
}
|
||
case $: {
|
||
(C === on || C === Fe) && (g = !0);
|
||
break;
|
||
}
|
||
case V:
|
||
case ne: {
|
||
(C === We || C === Fe) && (g = !0);
|
||
break;
|
||
}
|
||
default:
|
||
return !1;
|
||
}
|
||
if (g) {
|
||
var D = Ii(d);
|
||
if (D !== void 0 && D === Ii(p))
|
||
return !0;
|
||
}
|
||
return !1;
|
||
}
|
||
}
|
||
function h3(r) {
|
||
{
|
||
if (Ii === null || typeof WeakSet != "function")
|
||
return;
|
||
Ld === null && (Ld = /* @__PURE__ */ new WeakSet()), Ld.add(r);
|
||
}
|
||
}
|
||
var Y8 = function(r, a) {
|
||
{
|
||
if (Ii === null)
|
||
return;
|
||
var d = a.staleFamilies, p = a.updatedFamilies;
|
||
Yo(), Gm(function() {
|
||
Zy(r.current, p, d);
|
||
});
|
||
}
|
||
}, Q8 = function(r, a) {
|
||
{
|
||
if (r.context !== pa)
|
||
return;
|
||
Yo(), Gm(function() {
|
||
S3(a, r, null, null);
|
||
});
|
||
}
|
||
};
|
||
function Zy(r, a, d) {
|
||
{
|
||
var p = r.alternate, g = r.child, C = r.sibling, D = r.tag, P = r.type, O = null;
|
||
switch (D) {
|
||
case U:
|
||
case ne:
|
||
case B:
|
||
O = P;
|
||
break;
|
||
case $:
|
||
O = P.render;
|
||
break;
|
||
}
|
||
if (Ii === null)
|
||
throw new Error("Expected resolveFamily to be set during hot reload.");
|
||
var F = !1, W = !1;
|
||
if (O !== null) {
|
||
var re = Ii(O);
|
||
re !== void 0 && (d.has(re) ? W = !0 : a.has(re) && (D === B ? W = !0 : F = !0));
|
||
}
|
||
if (Ld !== null && (Ld.has(r) || p !== null && Ld.has(p)) && (W = !0), W && (r._debugNeedsRemount = !0), W || F) {
|
||
var de = Ia(r, Pt);
|
||
de !== null && Dr(de, r, Pt, Tn);
|
||
}
|
||
g !== null && !W && Zy(g, a, d), C !== null && Zy(C, a, d);
|
||
}
|
||
}
|
||
var X8 = function(r, a) {
|
||
{
|
||
var d = /* @__PURE__ */ new Set(), p = new Set(a.map(function(g) {
|
||
return g.current;
|
||
}));
|
||
return Jy(r.current, p, d), d;
|
||
}
|
||
};
|
||
function Jy(r, a, d) {
|
||
{
|
||
var p = r.child, g = r.sibling, C = r.tag, D = r.type, P = null;
|
||
switch (C) {
|
||
case U:
|
||
case ne:
|
||
case B:
|
||
P = D;
|
||
break;
|
||
case $:
|
||
P = D.render;
|
||
break;
|
||
}
|
||
var O = !1;
|
||
P !== null && a.has(P) && (O = !0), O ? K8(r, d) : p !== null && Jy(p, a, d), g !== null && Jy(g, a, d);
|
||
}
|
||
}
|
||
function K8(r, a) {
|
||
{
|
||
var d = Z8(r, a);
|
||
if (d)
|
||
return;
|
||
for (var p = r; ; ) {
|
||
switch (p.tag) {
|
||
case H:
|
||
a.add(p.stateNode);
|
||
return;
|
||
case G:
|
||
a.add(p.stateNode.containerInfo);
|
||
return;
|
||
case J:
|
||
a.add(p.stateNode.containerInfo);
|
||
return;
|
||
}
|
||
if (p.return === null)
|
||
throw new Error("Expected to reach root first.");
|
||
p = p.return;
|
||
}
|
||
}
|
||
}
|
||
function Z8(r, a) {
|
||
for (var d = r, p = !1; ; ) {
|
||
if (d.tag === H)
|
||
p = !0, a.add(d.stateNode);
|
||
else if (d.child !== null) {
|
||
d.child.return = d, d = d.child;
|
||
continue;
|
||
}
|
||
if (d === r)
|
||
return p;
|
||
for (; d.sibling === null; ) {
|
||
if (d.return === null || d.return === r)
|
||
return p;
|
||
d = d.return;
|
||
}
|
||
d.sibling.return = d.return, d = d.sibling;
|
||
}
|
||
return !1;
|
||
}
|
||
var $y;
|
||
{
|
||
$y = !1;
|
||
try {
|
||
var v3 = Object.preventExtensions({});
|
||
} catch {
|
||
$y = !0;
|
||
}
|
||
}
|
||
function J8(r, a, d, p) {
|
||
this.tag = r, this.key = d, this.elementType = null, this.type = null, this.stateNode = null, this.return = null, this.child = null, this.sibling = null, this.index = 0, this.ref = null, this.pendingProps = a, this.memoizedProps = null, this.updateQueue = null, this.memoizedState = null, this.dependencies = null, this.mode = p, this.flags = dt, this.subtreeFlags = dt, this.deletions = null, this.lanes = Me, this.childLanes = Me, this.alternate = null, this.actualDuration = Number.NaN, this.actualStartTime = Number.NaN, this.selfBaseDuration = Number.NaN, this.treeBaseDuration = Number.NaN, this.actualDuration = 0, this.actualStartTime = -1, this.selfBaseDuration = 0, this.treeBaseDuration = 0, this._debugSource = null, this._debugOwner = null, this._debugNeedsRemount = !1, this._debugHookTypes = null, !$y && typeof Object.preventExtensions == "function" && Object.preventExtensions(this);
|
||
}
|
||
var gi = function(r, a, d, p) {
|
||
return new J8(r, a, d, p);
|
||
};
|
||
function e2(r) {
|
||
var a = r.prototype;
|
||
return !!(a && a.isReactComponent);
|
||
}
|
||
function $8(r) {
|
||
return typeof r == "function" && !e2(r) && r.defaultProps === void 0;
|
||
}
|
||
function eR(r) {
|
||
if (typeof r == "function")
|
||
return e2(r) ? B : U;
|
||
if (r != null) {
|
||
var a = r.$$typeof;
|
||
if (a === on)
|
||
return $;
|
||
if (a === We)
|
||
return V;
|
||
}
|
||
return q;
|
||
}
|
||
function Bu(r, a) {
|
||
var d = r.alternate;
|
||
d === null ? (d = gi(r.tag, a, r.key, r.mode), d.elementType = r.elementType, d.type = r.type, d.stateNode = r.stateNode, d._debugSource = r._debugSource, d._debugOwner = r._debugOwner, d._debugHookTypes = r._debugHookTypes, d.alternate = r, r.alternate = d) : (d.pendingProps = a, d.type = r.type, d.flags = dt, d.subtreeFlags = dt, d.deletions = null, d.actualDuration = 0, d.actualStartTime = -1), d.flags = r.flags & Yi, d.childLanes = r.childLanes, d.lanes = r.lanes, d.child = r.child, d.memoizedProps = r.memoizedProps, d.memoizedState = r.memoizedState, d.updateQueue = r.updateQueue;
|
||
var p = r.dependencies;
|
||
switch (d.dependencies = p === null ? null : {
|
||
lanes: p.lanes,
|
||
firstContext: p.firstContext
|
||
}, d.sibling = r.sibling, d.index = r.index, d.ref = r.ref, d.selfBaseDuration = r.selfBaseDuration, d.treeBaseDuration = r.treeBaseDuration, d._debugNeedsRemount = r._debugNeedsRemount, d.tag) {
|
||
case q:
|
||
case U:
|
||
case ne:
|
||
d.type = Fd(r.type);
|
||
break;
|
||
case B:
|
||
d.type = Xy(r.type);
|
||
break;
|
||
case $:
|
||
d.type = Ky(r.type);
|
||
break;
|
||
}
|
||
return d;
|
||
}
|
||
function tR(r, a) {
|
||
r.flags &= Yi | jn;
|
||
var d = r.alternate;
|
||
if (d === null)
|
||
r.childLanes = Me, r.lanes = a, r.child = null, r.subtreeFlags = dt, r.memoizedProps = null, r.memoizedState = null, r.updateQueue = null, r.dependencies = null, r.stateNode = null, r.selfBaseDuration = 0, r.treeBaseDuration = 0;
|
||
else {
|
||
r.childLanes = d.childLanes, r.lanes = d.lanes, r.child = d.child, r.subtreeFlags = dt, r.deletions = null, r.memoizedProps = d.memoizedProps, r.memoizedState = d.memoizedState, r.updateQueue = d.updateQueue, r.type = d.type;
|
||
var p = d.dependencies;
|
||
r.dependencies = p === null ? null : {
|
||
lanes: p.lanes,
|
||
firstContext: p.firstContext
|
||
}, r.selfBaseDuration = d.selfBaseDuration, r.treeBaseDuration = d.treeBaseDuration;
|
||
}
|
||
return r;
|
||
}
|
||
function nR(r, a, d) {
|
||
var p;
|
||
return r === Wc ? (p = Zt, a === !0 && (p |= hn, p |= ha)) : p = Mt, ya && (p |= Gt), gi(J, null, null, p);
|
||
}
|
||
function t2(r, a, d, p, g, C) {
|
||
var D = q, P = r;
|
||
if (typeof r == "function")
|
||
e2(r) ? (D = B, P = Xy(P)) : P = Fd(P);
|
||
else if (typeof r == "string")
|
||
D = H;
|
||
else {
|
||
e:
|
||
switch (r) {
|
||
case Et:
|
||
return Al(d.children, g, C, a);
|
||
case Xe:
|
||
D = he, g |= hn, (g & Zt) !== Mt && (g |= ha);
|
||
break;
|
||
case ht:
|
||
return rR(d, g, C, a);
|
||
case En:
|
||
return aR(d, g, C, a);
|
||
case ee:
|
||
return iR(d, g, C, a);
|
||
case Le:
|
||
return m3(d, g, C, a);
|
||
case Dt:
|
||
case ot:
|
||
case Vt:
|
||
case ke:
|
||
case me:
|
||
default: {
|
||
if (typeof r == "object" && r !== null)
|
||
switch (r.$$typeof) {
|
||
case Ht:
|
||
D = xe;
|
||
break e;
|
||
case Ot:
|
||
D = Te;
|
||
break e;
|
||
case on:
|
||
D = $, P = Ky(P);
|
||
break e;
|
||
case We:
|
||
D = V;
|
||
break e;
|
||
case Fe:
|
||
D = we, P = null;
|
||
break e;
|
||
}
|
||
var O = "";
|
||
{
|
||
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (O += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
||
var F = p ? vt(p) : null;
|
||
F && (O += `
|
||
|
||
Check the render method of \`` + F + "`.");
|
||
}
|
||
throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) " + ("but got: " + (r == null ? r : typeof r) + "." + O));
|
||
}
|
||
}
|
||
}
|
||
var W = gi(D, d, a, g);
|
||
return W.elementType = r, W.type = P, W.lanes = C, W._debugOwner = p, W;
|
||
}
|
||
function n2(r, a, d) {
|
||
var p = null;
|
||
p = r._owner;
|
||
var g = r.type, C = r.key, D = r.props, P = t2(g, C, D, p, a, d);
|
||
return P._debugSource = r._source, P._debugOwner = r._owner, P;
|
||
}
|
||
function Al(r, a, d, p) {
|
||
var g = gi(ae, r, p, a);
|
||
return g.lanes = d, g;
|
||
}
|
||
function rR(r, a, d, p) {
|
||
typeof r.id != "string" && m('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof r.id);
|
||
var g = gi(Y, r, p, a | Gt);
|
||
return g.elementType = ht, g.lanes = d, g.stateNode = {
|
||
effectDuration: 0,
|
||
passiveEffectDuration: 0
|
||
}, g;
|
||
}
|
||
function aR(r, a, d, p) {
|
||
var g = gi(te, r, p, a);
|
||
return g.elementType = En, g.lanes = d, g;
|
||
}
|
||
function iR(r, a, d, p) {
|
||
var g = gi(ve, r, p, a);
|
||
return g.elementType = ee, g.lanes = d, g;
|
||
}
|
||
function m3(r, a, d, p) {
|
||
var g = gi(Ae, r, p, a);
|
||
g.elementType = Le, g.lanes = d;
|
||
var C = {
|
||
isHidden: !1
|
||
};
|
||
return g.stateNode = C, g;
|
||
}
|
||
function r2(r, a, d) {
|
||
var p = gi(le, r, null, a);
|
||
return p.lanes = d, p;
|
||
}
|
||
function oR() {
|
||
var r = gi(H, null, null, Mt);
|
||
return r.elementType = "DELETED", r;
|
||
}
|
||
function sR(r) {
|
||
var a = gi(se, null, null, Mt);
|
||
return a.stateNode = r, a;
|
||
}
|
||
function a2(r, a, d) {
|
||
var p = r.children !== null ? r.children : [], g = gi(G, p, r.key, a);
|
||
return g.lanes = d, g.stateNode = {
|
||
containerInfo: r.containerInfo,
|
||
pendingChildren: null,
|
||
// Used by persistent updates
|
||
implementation: r.implementation
|
||
}, g;
|
||
}
|
||
function g3(r, a) {
|
||
return r === null && (r = gi(q, null, null, Mt)), r.tag = a.tag, r.key = a.key, r.elementType = a.elementType, r.type = a.type, r.stateNode = a.stateNode, r.return = a.return, r.child = a.child, r.sibling = a.sibling, r.index = a.index, r.ref = a.ref, r.pendingProps = a.pendingProps, r.memoizedProps = a.memoizedProps, r.updateQueue = a.updateQueue, r.memoizedState = a.memoizedState, r.dependencies = a.dependencies, r.mode = a.mode, r.flags = a.flags, r.subtreeFlags = a.subtreeFlags, r.deletions = a.deletions, r.lanes = a.lanes, r.childLanes = a.childLanes, r.alternate = a.alternate, r.actualDuration = a.actualDuration, r.actualStartTime = a.actualStartTime, r.selfBaseDuration = a.selfBaseDuration, r.treeBaseDuration = a.treeBaseDuration, r._debugSource = a._debugSource, r._debugOwner = a._debugOwner, r._debugNeedsRemount = a._debugNeedsRemount, r._debugHookTypes = a._debugHookTypes, r;
|
||
}
|
||
function lR(r, a, d, p, g) {
|
||
this.tag = a, this.containerInfo = r, this.pendingChildren = null, this.current = null, this.pingCache = null, this.finishedWork = null, this.timeoutHandle = zf, this.context = null, this.pendingContext = null, this.callbackNode = null, this.callbackPriority = vr, this.eventTimes = ml(Me), this.expirationTimes = ml(Tn), this.pendingLanes = Me, this.suspendedLanes = Me, this.pingedLanes = Me, this.expiredLanes = Me, this.mutableReadLanes = Me, this.finishedLanes = Me, this.entangledLanes = Me, this.entanglements = ml(Me), this.identifierPrefix = p, this.onRecoverableError = g, Qr && (this.mutableSourceEagerHydrationData = null), this.effectDuration = 0, this.passiveEffectDuration = 0;
|
||
{
|
||
this.memoizedUpdaters = /* @__PURE__ */ new Set();
|
||
for (var C = this.pendingUpdatersLaneMap = [], D = 0; D < qc; D++)
|
||
C.push(/* @__PURE__ */ new Set());
|
||
}
|
||
switch (a) {
|
||
case Wc:
|
||
this._debugRootType = d ? "hydrateRoot()" : "createRoot()";
|
||
break;
|
||
case $n:
|
||
this._debugRootType = d ? "hydrate()" : "render()";
|
||
break;
|
||
}
|
||
}
|
||
function y3(r, a, d, p, g, C, D, P, O, F) {
|
||
var W = new lR(r, a, d, P, O), re = nR(a, C);
|
||
W.current = re, re.stateNode = W;
|
||
{
|
||
var de = {
|
||
element: p,
|
||
isDehydrated: d,
|
||
cache: null,
|
||
// not enabled yet
|
||
transitions: null,
|
||
pendingSuspenseBoundaries: null
|
||
};
|
||
re.memoizedState = de;
|
||
}
|
||
return u1(re), W;
|
||
}
|
||
var uR = "18.2.0";
|
||
function cR(r, a, d) {
|
||
var p = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
|
||
return QM(p), {
|
||
// This tag allow us to uniquely identify this as a React Portal
|
||
$$typeof: Qe,
|
||
key: p == null ? null : "" + p,
|
||
children: r,
|
||
containerInfo: a,
|
||
implementation: d
|
||
};
|
||
}
|
||
var i2, o2;
|
||
i2 = !1, o2 = {};
|
||
function x3(r) {
|
||
if (!r)
|
||
return pa;
|
||
var a = E(r), d = Y0(a);
|
||
if (a.tag === B) {
|
||
var p = a.type;
|
||
if (Kr(p))
|
||
return fu(a, p, d);
|
||
}
|
||
return d;
|
||
}
|
||
function dR(r) {
|
||
var a = E(r);
|
||
if (a === void 0) {
|
||
if (typeof r.render == "function")
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
var d = Object.keys(r).join(",");
|
||
throw new Error("Argument appears to not be a ReactComponent. Keys: " + d);
|
||
}
|
||
var p = ou(a);
|
||
return p === null ? null : p.stateNode;
|
||
}
|
||
function fR(r, a) {
|
||
{
|
||
var d = E(r);
|
||
if (d === void 0) {
|
||
if (typeof r.render == "function")
|
||
throw new Error("Unable to find node on an unmounted component.");
|
||
var p = Object.keys(r).join(",");
|
||
throw new Error("Argument appears to not be a ReactComponent. Keys: " + p);
|
||
}
|
||
var g = ou(d);
|
||
if (g === null)
|
||
return null;
|
||
if (g.mode & hn) {
|
||
var C = vt(d) || "Component";
|
||
if (!o2[C]) {
|
||
o2[C] = !0;
|
||
var D = jt;
|
||
try {
|
||
gn(g), d.mode & hn ? m("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", a, a, C) : m("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", a, a, C);
|
||
} finally {
|
||
D ? gn(D) : Sn();
|
||
}
|
||
}
|
||
}
|
||
return g.stateNode;
|
||
}
|
||
}
|
||
function pR(r, a, d, p, g, C, D, P) {
|
||
var O = !1, F = null;
|
||
return y3(r, a, O, F, d, p, g, C, D);
|
||
}
|
||
function hR(r, a, d, p, g, C, D, P, O, F) {
|
||
var W = !0, re = y3(d, p, W, r, g, C, D, P, O);
|
||
re.context = x3(null);
|
||
var de = re.current, be = ba(), Re = Pl(de), De = Rs(be, Re);
|
||
return De.callback = a ?? null, El(de, De, Re), p8(re, Re, be), re;
|
||
}
|
||
function S3(r, a, d, p) {
|
||
fd(a, r);
|
||
var g = a.current, C = ba(), D = Pl(g);
|
||
vd(D);
|
||
var P = x3(d);
|
||
a.context === null ? a.context = P : a.pendingContext = P, nt && jt !== null && !i2 && (i2 = !0, m(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
||
|
||
Check the render method of %s.`, vt(jt) || "Unknown"));
|
||
var O = Rs(C, D);
|
||
O.payload = {
|
||
element: r
|
||
}, p = p === void 0 ? null : p, p !== null && (typeof p != "function" && m("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", p), O.callback = p);
|
||
var F = El(g, O, D);
|
||
return F !== null && (Dr(F, g, D, C), Qv(F, g, D)), D;
|
||
}
|
||
function vR(r) {
|
||
var a = r.current;
|
||
if (!a.child)
|
||
return null;
|
||
switch (a.child.tag) {
|
||
case H:
|
||
return xn(a.child.stateNode);
|
||
default:
|
||
return a.child.stateNode;
|
||
}
|
||
}
|
||
function mR(r) {
|
||
switch (r.tag) {
|
||
case J: {
|
||
var a = r.stateNode;
|
||
if (Na(a)) {
|
||
var d = yv(a);
|
||
g8(a, d);
|
||
}
|
||
break;
|
||
}
|
||
case te: {
|
||
Gm(function() {
|
||
var g = Ia(r, Pt);
|
||
if (g !== null) {
|
||
var C = ba();
|
||
Dr(g, r, Pt, C);
|
||
}
|
||
});
|
||
var p = Pt;
|
||
Zm(r, p);
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
function b3(r, a) {
|
||
var d = r.memoizedState;
|
||
d !== null && d.dehydrated !== null && (d.retryLane = sd(d.retryLane, a));
|
||
}
|
||
function Zm(r, a) {
|
||
b3(r, a);
|
||
var d = r.alternate;
|
||
d && b3(d, a);
|
||
}
|
||
function gR(r) {
|
||
if (r.tag === te) {
|
||
var a = Pt, d = Ia(r, a);
|
||
if (d !== null) {
|
||
var p = ba();
|
||
Dr(d, r, a, p);
|
||
}
|
||
Zm(r, a);
|
||
}
|
||
}
|
||
function yR(r) {
|
||
if (r.tag === te) {
|
||
var a = ms, d = Ia(r, a);
|
||
if (d !== null) {
|
||
var p = ba();
|
||
Dr(d, r, a, p);
|
||
}
|
||
Zm(r, a);
|
||
}
|
||
}
|
||
function xR(r) {
|
||
if (r.tag === te) {
|
||
var a = Pl(r), d = Ia(r, a);
|
||
if (d !== null) {
|
||
var p = ba();
|
||
Dr(d, r, a, p);
|
||
}
|
||
Zm(r, a);
|
||
}
|
||
}
|
||
function SR(r) {
|
||
var a = Of(r);
|
||
return a === null ? null : a.stateNode;
|
||
}
|
||
var C3 = function(r) {
|
||
return null;
|
||
};
|
||
function w3(r) {
|
||
return C3(r);
|
||
}
|
||
var E3 = function(r) {
|
||
return !1;
|
||
};
|
||
function j3(r) {
|
||
return E3(r);
|
||
}
|
||
var T3 = null, D3 = null, M3 = null, R3 = null, k3 = null, P3 = null, O3 = null, A3 = null, N3 = null;
|
||
{
|
||
var z3 = function(r, a, d) {
|
||
var p = a[d], g = Kt(r) ? r.slice() : b({}, r);
|
||
return d + 1 === a.length ? (Kt(g) ? g.splice(p, 1) : delete g[p], g) : (g[p] = z3(r[p], a, d + 1), g);
|
||
}, I3 = function(r, a) {
|
||
return z3(r, a, 0);
|
||
}, L3 = function(r, a, d, p) {
|
||
var g = a[p], C = Kt(r) ? r.slice() : b({}, r);
|
||
if (p + 1 === a.length) {
|
||
var D = d[p];
|
||
C[D] = C[g], Kt(C) ? C.splice(g, 1) : delete C[g];
|
||
} else
|
||
C[g] = L3(
|
||
// $FlowFixMe number or string is fine here
|
||
r[g],
|
||
a,
|
||
d,
|
||
p + 1
|
||
);
|
||
return C;
|
||
}, F3 = function(r, a, d) {
|
||
if (a.length !== d.length) {
|
||
y("copyWithRename() expects paths of the same length");
|
||
return;
|
||
} else
|
||
for (var p = 0; p < d.length - 1; p++)
|
||
if (a[p] !== d[p]) {
|
||
y("copyWithRename() expects paths to be the same except for the deepest key");
|
||
return;
|
||
}
|
||
return L3(r, a, d, 0);
|
||
}, B3 = function(r, a, d, p) {
|
||
if (d >= a.length)
|
||
return p;
|
||
var g = a[d], C = Kt(r) ? r.slice() : b({}, r);
|
||
return C[g] = B3(r[g], a, d + 1, p), C;
|
||
}, _3 = function(r, a, d) {
|
||
return B3(r, a, 0, d);
|
||
}, s2 = function(r, a) {
|
||
for (var d = r.memoizedState; d !== null && a > 0; )
|
||
d = d.next, a--;
|
||
return d;
|
||
};
|
||
T3 = function(r, a, d, p) {
|
||
var g = s2(r, a);
|
||
if (g !== null) {
|
||
var C = _3(g.memoizedState, d, p);
|
||
g.memoizedState = C, g.baseState = C, r.memoizedProps = b({}, r.memoizedProps);
|
||
var D = Ia(r, Pt);
|
||
D !== null && Dr(D, r, Pt, Tn);
|
||
}
|
||
}, D3 = function(r, a, d) {
|
||
var p = s2(r, a);
|
||
if (p !== null) {
|
||
var g = I3(p.memoizedState, d);
|
||
p.memoizedState = g, p.baseState = g, r.memoizedProps = b({}, r.memoizedProps);
|
||
var C = Ia(r, Pt);
|
||
C !== null && Dr(C, r, Pt, Tn);
|
||
}
|
||
}, M3 = function(r, a, d, p) {
|
||
var g = s2(r, a);
|
||
if (g !== null) {
|
||
var C = F3(g.memoizedState, d, p);
|
||
g.memoizedState = C, g.baseState = C, r.memoizedProps = b({}, r.memoizedProps);
|
||
var D = Ia(r, Pt);
|
||
D !== null && Dr(D, r, Pt, Tn);
|
||
}
|
||
}, R3 = function(r, a, d) {
|
||
r.pendingProps = _3(r.memoizedProps, a, d), r.alternate && (r.alternate.pendingProps = r.pendingProps);
|
||
var p = Ia(r, Pt);
|
||
p !== null && Dr(p, r, Pt, Tn);
|
||
}, k3 = function(r, a) {
|
||
r.pendingProps = I3(r.memoizedProps, a), r.alternate && (r.alternate.pendingProps = r.pendingProps);
|
||
var d = Ia(r, Pt);
|
||
d !== null && Dr(d, r, Pt, Tn);
|
||
}, P3 = function(r, a, d) {
|
||
r.pendingProps = F3(r.memoizedProps, a, d), r.alternate && (r.alternate.pendingProps = r.pendingProps);
|
||
var p = Ia(r, Pt);
|
||
p !== null && Dr(p, r, Pt, Tn);
|
||
}, O3 = function(r) {
|
||
var a = Ia(r, Pt);
|
||
a !== null && Dr(a, r, Pt, Tn);
|
||
}, A3 = function(r) {
|
||
C3 = r;
|
||
}, N3 = function(r) {
|
||
E3 = r;
|
||
};
|
||
}
|
||
function bR(r) {
|
||
var a = ou(r);
|
||
return a === null ? null : a.stateNode;
|
||
}
|
||
function CR(r) {
|
||
return null;
|
||
}
|
||
function wR() {
|
||
return jt;
|
||
}
|
||
function ER(r) {
|
||
var a = r.findFiberByHostInstance, d = l.ReactCurrentDispatcher;
|
||
return dd({
|
||
bundleType: r.bundleType,
|
||
version: r.version,
|
||
rendererPackageName: r.rendererPackageName,
|
||
rendererConfig: r.rendererConfig,
|
||
overrideHookState: T3,
|
||
overrideHookStateDeletePath: D3,
|
||
overrideHookStateRenamePath: M3,
|
||
overrideProps: R3,
|
||
overridePropsDeletePath: k3,
|
||
overridePropsRenamePath: P3,
|
||
setErrorHandler: A3,
|
||
setSuspenseHandler: N3,
|
||
scheduleUpdate: O3,
|
||
currentDispatcherRef: d,
|
||
findHostInstanceByFiber: bR,
|
||
findFiberByHostInstance: a || CR,
|
||
// React Refresh
|
||
findHostInstancesForRefresh: X8,
|
||
scheduleRefresh: Y8,
|
||
scheduleRoot: Q8,
|
||
setRefreshHandler: q8,
|
||
// Enables DevTools to append owner stacks to error messages in DEV mode.
|
||
getCurrentFiber: wR,
|
||
// Enables DevTools to detect reconciler version rather than renderer version
|
||
// which may not match for third party renderers.
|
||
reconcilerVersion: uR
|
||
});
|
||
}
|
||
return n.attemptContinuousHydration = yR, n.attemptDiscreteHydration = gR, n.attemptHydrationAtCurrentPriority = xR, n.attemptSynchronousHydration = mR, n.batchedUpdates = x8, n.createComponentSelector = X9, n.createContainer = pR, n.createHasPseudoClassSelector = K9, n.createHydrationContainer = hR, n.createPortal = cR, n.createRoleSelector = Z9, n.createTestNameSelector = $9, n.createTextSelector = J9, n.deferredUpdates = y8, n.discreteUpdates = S8, n.findAllNodes = zm, n.findBoundingRects = n8, n.findHostInstance = dR, n.findHostInstanceWithNoPortals = SR, n.findHostInstanceWithWarning = fR, n.flushControlled = C8, n.flushPassiveEffects = Yo, n.flushSync = Gm, n.focusWithin = r8, n.getCurrentUpdatePriority = ma, n.getFindAllNodesFailureDescription = t8, n.getPublicRootInstance = vR, n.injectIntoDevTools = ER, n.isAlreadyRendering = b8, n.observeVisibleRects = i8, n.registerMutableSourceForHydration = p7, n.runWithPriority = wv, n.shouldError = w3, n.shouldSuspend = j3, n.updateContainer = S3, n;
|
||
})), qg;
|
||
}
|
||
(function(e) {
|
||
process.env.NODE_ENV === "production" ? e.exports = tV() : e.exports = rV();
|
||
})(ZH);
|
||
const aV = /* @__PURE__ */ dk(_x);
|
||
var Yg = {}, iV = {
|
||
get exports() {
|
||
return Yg;
|
||
},
|
||
set exports(e) {
|
||
Yg = e;
|
||
}
|
||
}, zl = {};
|
||
/**
|
||
* @license React
|
||
* react-reconciler-constants.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 HE;
|
||
function oV() {
|
||
return HE || (HE = 1, zl.ConcurrentRoot = 1, zl.ContinuousEventPriority = 4, zl.DefaultEventPriority = 16, zl.DiscreteEventPriority = 1, zl.IdleEventPriority = 536870912, zl.LegacyRoot = 0), zl;
|
||
}
|
||
var Il = {};
|
||
/**
|
||
* @license React
|
||
* react-reconciler-constants.development.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 VE;
|
||
function sV() {
|
||
return VE || (VE = 1, process.env.NODE_ENV !== "production" && function() {
|
||
var e = (
|
||
/* */
|
||
1
|
||
), t = (
|
||
/* */
|
||
4
|
||
), n = (
|
||
/* */
|
||
16
|
||
), i = (
|
||
/* */
|
||
536870912
|
||
), o = e, l = t, f = n, h = i, y = 0, m = 1;
|
||
Il.ConcurrentRoot = m, Il.ContinuousEventPriority = l, Il.DefaultEventPriority = f, Il.DiscreteEventPriority = o, Il.IdleEventPriority = h, Il.LegacyRoot = y;
|
||
}()), Il;
|
||
}
|
||
(function(e) {
|
||
process.env.NODE_ENV === "production" ? e.exports = oV() : e.exports = sV();
|
||
})(iV);
|
||
const WE = {
|
||
children: !0,
|
||
ref: !0,
|
||
key: !0,
|
||
style: !0,
|
||
forwardedRef: !0,
|
||
unstable_applyCache: !0,
|
||
unstable_applyDrawHitFromCache: !0
|
||
};
|
||
let GE = !1, qE = !1;
|
||
const Bb = ".react-konva-event", lV = `ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
||
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
||
Consider to add onDragMove or onDragEnd events.
|
||
For more info see: https://github.com/konvajs/react-konva/issues/256
|
||
`, uV = `ReactKonva: You are using "zIndex" attribute for a Konva node.
|
||
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
||
For more info see: https://github.com/konvajs/react-konva/issues/194
|
||
`, cV = {};
|
||
function E0(e, t, n = cV) {
|
||
if (!GE && "zIndex" in t && (console.warn(uV), GE = !0), !qE && t.draggable) {
|
||
var i = t.x !== void 0 || t.y !== void 0, o = t.onDragEnd || t.onDragMove;
|
||
i && !o && (console.warn(lV), qE = !0);
|
||
}
|
||
for (var l in n)
|
||
if (!WE[l]) {
|
||
var f = l.slice(0, 2) === "on", h = n[l] !== t[l];
|
||
if (f && h) {
|
||
var y = l.substr(2).toLowerCase();
|
||
y.substr(0, 7) === "content" && (y = "content" + y.substr(7, 1).toUpperCase() + y.substr(8)), e.off(y, n[l]);
|
||
}
|
||
var m = !t.hasOwnProperty(l);
|
||
m && e.setAttr(l, void 0);
|
||
}
|
||
var x = t._useStrictMode, b = {}, E = !1;
|
||
const j = {};
|
||
for (var l in t)
|
||
if (!WE[l]) {
|
||
var f = l.slice(0, 2) === "on", M = n[l] !== t[l];
|
||
if (f && M) {
|
||
var y = l.substr(2).toLowerCase();
|
||
y.substr(0, 7) === "content" && (y = "content" + y.substr(7, 1).toUpperCase() + y.substr(8)), t[l] && (j[y] = t[l]);
|
||
}
|
||
!f && (t[l] !== n[l] || x && t[l] !== e.getAttr(l)) && (E = !0, b[l] = t[l]);
|
||
}
|
||
E && (e.setAttrs(b), eu(e));
|
||
for (var y in j)
|
||
e.on(y + Bb, j[y]);
|
||
}
|
||
function eu(e) {
|
||
if (!fk.autoDrawEnabled) {
|
||
var t = e.getLayer() || e.getStage();
|
||
t && t.batchDraw();
|
||
}
|
||
}
|
||
const HD = {}, dV = {};
|
||
xh.Node.prototype._applyProps = E0;
|
||
function fV(e, t) {
|
||
if (typeof t == "string") {
|
||
console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);
|
||
return;
|
||
}
|
||
e.add(t), eu(e);
|
||
}
|
||
function pV(e, t, n) {
|
||
let i = xh[e];
|
||
i || (console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`), i = xh.Group);
|
||
const o = {}, l = {};
|
||
for (var f in t) {
|
||
var h = f.slice(0, 2) === "on";
|
||
h ? l[f] = t[f] : o[f] = t[f];
|
||
}
|
||
const y = new i(o);
|
||
return E0(y, l), y;
|
||
}
|
||
function hV(e, t, n) {
|
||
console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`);
|
||
}
|
||
function vV(e, t, n) {
|
||
return !1;
|
||
}
|
||
function mV(e) {
|
||
return e;
|
||
}
|
||
function gV() {
|
||
return null;
|
||
}
|
||
function yV() {
|
||
return null;
|
||
}
|
||
function xV(e, t, n, i) {
|
||
return dV;
|
||
}
|
||
function SV() {
|
||
}
|
||
function bV(e) {
|
||
}
|
||
function CV(e, t) {
|
||
return !1;
|
||
}
|
||
function wV() {
|
||
return HD;
|
||
}
|
||
function EV() {
|
||
return HD;
|
||
}
|
||
const jV = setTimeout, TV = clearTimeout, DV = -1;
|
||
function MV(e, t) {
|
||
return !1;
|
||
}
|
||
const RV = !1, kV = !0, PV = !0;
|
||
function OV(e, t) {
|
||
t.parent === e ? t.moveToTop() : e.add(t), eu(e);
|
||
}
|
||
function AV(e, t) {
|
||
t.parent === e ? t.moveToTop() : e.add(t), eu(e);
|
||
}
|
||
function VD(e, t, n) {
|
||
t._remove(), e.add(t), t.setZIndex(n.getZIndex()), eu(e);
|
||
}
|
||
function NV(e, t, n) {
|
||
VD(e, t, n);
|
||
}
|
||
function zV(e, t) {
|
||
t.destroy(), t.off(Bb), eu(e);
|
||
}
|
||
function IV(e, t) {
|
||
t.destroy(), t.off(Bb), eu(e);
|
||
}
|
||
function LV(e, t, n) {
|
||
console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`);
|
||
}
|
||
function FV(e, t, n) {
|
||
}
|
||
function BV(e, t, n, i, o) {
|
||
E0(e, o, i);
|
||
}
|
||
function _V(e) {
|
||
e.hide(), eu(e);
|
||
}
|
||
function UV(e) {
|
||
}
|
||
function HV(e, t) {
|
||
(t.visible == null || t.visible) && e.show();
|
||
}
|
||
function VV(e, t) {
|
||
}
|
||
function WV(e) {
|
||
}
|
||
function GV() {
|
||
}
|
||
const qV = () => Yg.DefaultEventPriority, YV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
||
__proto__: null,
|
||
appendChild: OV,
|
||
appendChildToContainer: AV,
|
||
appendInitialChild: fV,
|
||
cancelTimeout: TV,
|
||
clearContainer: WV,
|
||
commitMount: FV,
|
||
commitTextUpdate: LV,
|
||
commitUpdate: BV,
|
||
createInstance: pV,
|
||
createTextInstance: hV,
|
||
detachDeletedInstance: GV,
|
||
finalizeInitialChildren: vV,
|
||
getChildHostContext: EV,
|
||
getCurrentEventPriority: qV,
|
||
getPublicInstance: mV,
|
||
getRootHostContext: wV,
|
||
hideInstance: _V,
|
||
hideTextInstance: UV,
|
||
idlePriority: rc.unstable_IdlePriority,
|
||
insertBefore: VD,
|
||
insertInContainerBefore: NV,
|
||
isPrimaryRenderer: RV,
|
||
noTimeout: DV,
|
||
now: rc.unstable_now,
|
||
prepareForCommit: gV,
|
||
preparePortalMount: yV,
|
||
prepareUpdate: xV,
|
||
removeChild: zV,
|
||
removeChildFromContainer: IV,
|
||
resetAfterCommit: SV,
|
||
resetTextContent: bV,
|
||
run: rc.unstable_runWithPriority,
|
||
scheduleTimeout: jV,
|
||
shouldDeprioritizeSubtree: CV,
|
||
shouldSetTextContent: MV,
|
||
supportsMutation: PV,
|
||
unhideInstance: HV,
|
||
unhideTextInstance: VV,
|
||
warnsIfNotActing: kV
|
||
}, Symbol.toStringTag, { value: "Module" }));
|
||
var QV = Object.defineProperty, XV = Object.defineProperties, KV = Object.getOwnPropertyDescriptors, YE = Object.getOwnPropertySymbols, ZV = Object.prototype.hasOwnProperty, JV = Object.prototype.propertyIsEnumerable, QE = (e, t, n) => t in e ? QV(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, XE = (e, t) => {
|
||
for (var n in t || (t = {}))
|
||
ZV.call(t, n) && QE(e, n, t[n]);
|
||
if (YE)
|
||
for (var n of YE(t))
|
||
JV.call(t, n) && QE(e, n, t[n]);
|
||
return e;
|
||
}, $V = (e, t) => XV(e, KV(t));
|
||
function WD(e, t, n) {
|
||
if (!e)
|
||
return;
|
||
if (n(e) === !0)
|
||
return e;
|
||
let i = t ? e.return : e.child;
|
||
for (; i; ) {
|
||
const o = WD(i, t, n);
|
||
if (o)
|
||
return o;
|
||
i = t ? null : i.sibling;
|
||
}
|
||
}
|
||
function GD(e) {
|
||
try {
|
||
return Object.defineProperties(e, {
|
||
_currentRenderer: {
|
||
get() {
|
||
return null;
|
||
},
|
||
set() {
|
||
}
|
||
},
|
||
_currentRenderer2: {
|
||
get() {
|
||
return null;
|
||
},
|
||
set() {
|
||
}
|
||
}
|
||
});
|
||
} catch {
|
||
return e;
|
||
}
|
||
}
|
||
const _b = GD(Je.createContext(null));
|
||
class qD extends Je.Component {
|
||
render() {
|
||
return /* @__PURE__ */ Je.createElement(_b.Provider, {
|
||
value: this._reactInternals
|
||
}, this.props.children);
|
||
}
|
||
}
|
||
const { ReactCurrentOwner: eW, ReactCurrentDispatcher: tW } = Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||
function nW() {
|
||
const e = Je.useContext(_b);
|
||
if (!e)
|
||
throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");
|
||
const t = Je.useId();
|
||
return Je.useMemo(
|
||
() => {
|
||
var i;
|
||
return (i = eW.current) != null ? i : WD(e, !1, (o) => {
|
||
let l = o.memoizedState;
|
||
for (; l; ) {
|
||
if (l.memoizedState === t)
|
||
return !0;
|
||
l = l.next;
|
||
}
|
||
});
|
||
},
|
||
[e, t]
|
||
);
|
||
}
|
||
function rW() {
|
||
var e, t;
|
||
const n = nW(), [i] = Je.useState(() => /* @__PURE__ */ new Map());
|
||
i.clear();
|
||
let o = n;
|
||
for (; o; ) {
|
||
const l = (e = o.type) == null ? void 0 : e._context;
|
||
l && l !== _b && !i.has(l) && i.set(l, (t = tW.current) == null ? void 0 : t.readContext(GD(l))), o = o.return;
|
||
}
|
||
return Je.useMemo(
|
||
() => Array.from(i.keys()).reduce(
|
||
(l, f) => (h) => /* @__PURE__ */ Je.createElement(l, null, /* @__PURE__ */ Je.createElement(f.Provider, $V(XE({}, h), {
|
||
value: i.get(f)
|
||
}))),
|
||
(l) => /* @__PURE__ */ Je.createElement(qD, XE({}, l))
|
||
),
|
||
[i]
|
||
);
|
||
}
|
||
function aW(e) {
|
||
const t = pt.useRef();
|
||
return pt.useLayoutEffect(() => {
|
||
t.current = e;
|
||
}), t.current;
|
||
}
|
||
const iW = (e) => {
|
||
const t = pt.useRef(), n = pt.useRef(), i = pt.useRef(), o = aW(e), l = rW(), f = (h) => {
|
||
const { forwardedRef: y } = e;
|
||
y && (typeof y == "function" ? y(h) : y.current = h);
|
||
};
|
||
return pt.useLayoutEffect(() => (n.current = new xh.Stage({
|
||
width: e.width,
|
||
height: e.height,
|
||
container: t.current
|
||
}), f(n.current), i.current = dh.createContainer(n.current, Yg.LegacyRoot, !1, null), dh.updateContainer(pt.createElement(l, {}, e.children), i.current), () => {
|
||
xh.isBrowser && (f(null), dh.updateContainer(null, i.current, null), n.current.destroy());
|
||
}), []), pt.useLayoutEffect(() => {
|
||
f(n.current), E0(n.current, e, o), dh.updateContainer(pt.createElement(l, {}, e.children), i.current, null);
|
||
}), pt.createElement("div", {
|
||
ref: t,
|
||
accessKey: e.accessKey,
|
||
className: e.className,
|
||
role: e.role,
|
||
style: e.style,
|
||
tabIndex: e.tabIndex,
|
||
title: e.title
|
||
});
|
||
}, oh = "Layer", Hs = "Group", Vs = "Rect", Uu = "Circle", Qg = "Line", YD = "Image", oW = "Transformer", dh = aV(YV);
|
||
dh.injectIntoDevTools({
|
||
// @ts-ignore
|
||
findHostInstanceByFiber: () => null,
|
||
bundleType: process.env.NODE_ENV !== "production" ? 1 : 0,
|
||
version: pt.version,
|
||
rendererPackageName: "react-konva"
|
||
});
|
||
const sW = pt.forwardRef((e, t) => pt.createElement(qD, {}, pt.createElement(iW, { ...e, forwardedRef: t }))), lW = ct(
|
||
[cn, ir],
|
||
(e, t) => {
|
||
const { tool: n, isMovingBoundingBox: i } = e;
|
||
return {
|
||
tool: n,
|
||
isStaging: t,
|
||
isMovingBoundingBox: i
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), uW = () => {
|
||
const e = je(), { tool: t, isStaging: n, isMovingBoundingBox: i } = Z(lW);
|
||
return {
|
||
handleDragStart: Q(() => {
|
||
(t === "move" || n) && !i && e(Ag(!0));
|
||
}, [e, i, n, t]),
|
||
handleDragMove: Q(
|
||
(o) => {
|
||
if (!((t === "move" || n) && !i))
|
||
return;
|
||
const l = { x: o.target.x(), y: o.target.y() };
|
||
e(g6(l));
|
||
},
|
||
[e, i, n, t]
|
||
),
|
||
handleDragEnd: Q(() => {
|
||
(t === "move" || n) && !i && e(Ag(!1));
|
||
}, [e, i, n, t])
|
||
};
|
||
}, cW = ct(
|
||
[cn, Sr, ir],
|
||
(e, t, n) => {
|
||
const {
|
||
cursorPosition: i,
|
||
shouldLockBoundingBox: o,
|
||
shouldShowBoundingBox: l,
|
||
tool: f,
|
||
isMaskEnabled: h,
|
||
shouldSnapToGrid: y
|
||
} = e;
|
||
return {
|
||
activeTabName: t,
|
||
isCursorOnCanvas: Boolean(i),
|
||
shouldLockBoundingBox: o,
|
||
shouldShowBoundingBox: l,
|
||
tool: f,
|
||
isStaging: n,
|
||
isMaskEnabled: h,
|
||
shouldSnapToGrid: y
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), dW = () => {
|
||
const e = je(), {
|
||
activeTabName: t,
|
||
shouldShowBoundingBox: n,
|
||
tool: i,
|
||
isStaging: o,
|
||
isMaskEnabled: l,
|
||
shouldSnapToGrid: f
|
||
} = Z(cW), h = He(null), y = y6(), m = () => e(aS());
|
||
Ze(
|
||
["shift+c"],
|
||
() => {
|
||
m();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
);
|
||
const x = () => e(Ah(!l));
|
||
Ze(
|
||
["h"],
|
||
() => {
|
||
x();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[l]
|
||
), Ze(
|
||
["n"],
|
||
() => {
|
||
e(Ng(!f));
|
||
},
|
||
{
|
||
enabled: !0,
|
||
preventDefault: !0
|
||
},
|
||
[f]
|
||
), Ze(
|
||
"esc",
|
||
() => {
|
||
e(pk());
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
"shift+h",
|
||
() => {
|
||
e(hk(!n));
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[t, n]
|
||
), Ze(
|
||
["space"],
|
||
(b) => {
|
||
b.repeat || (y == null || y.container().focus(), i !== "move" && (h.current = i, e(es("move"))), i === "move" && h.current && h.current !== "move" && (e(es(h.current)), h.current = "move"));
|
||
},
|
||
{
|
||
keyup: !0,
|
||
keydown: !0,
|
||
preventDefault: !0
|
||
},
|
||
[i, h]
|
||
);
|
||
}, Ub = (e) => {
|
||
const t = e.getPointerPosition(), n = e.getAbsoluteTransform().copy();
|
||
if (!t || !n)
|
||
return;
|
||
const i = n.invert().point(t);
|
||
return {
|
||
x: i.x,
|
||
y: i.y
|
||
};
|
||
}, QD = () => {
|
||
const e = je(), t = ns(), n = y6();
|
||
return {
|
||
updateColorUnderCursor: () => {
|
||
if (!n || !t)
|
||
return;
|
||
const i = n.getPointerPosition();
|
||
if (!i)
|
||
return;
|
||
const o = vk.pixelRatio, [l, f, h, y] = t.getContext().getImageData(
|
||
i.x * o,
|
||
i.y * o,
|
||
1,
|
||
1
|
||
).data;
|
||
e(mk({ r: l, g: f, b: h, a: y }));
|
||
},
|
||
commitColorUnderCursor: () => {
|
||
e(gk());
|
||
}
|
||
};
|
||
}, fW = ct(
|
||
[Sr, cn, ir],
|
||
(e, t, n) => {
|
||
const { tool: i } = t;
|
||
return {
|
||
tool: i,
|
||
activeTabName: e,
|
||
isStaging: n
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), pW = (e) => {
|
||
const t = je(), { tool: n, isStaging: i } = Z(fW), { commitColorUnderCursor: o } = QD();
|
||
return Q(
|
||
(l) => {
|
||
if (!e.current)
|
||
return;
|
||
if (e.current.container().focus(), n === "move" || i) {
|
||
t(Ag(!0));
|
||
return;
|
||
}
|
||
if (n === "colorPicker") {
|
||
o();
|
||
return;
|
||
}
|
||
const f = Ub(e.current);
|
||
f && (l.evt.preventDefault(), t(x6(!0)), t(yk([f.x, f.y])));
|
||
},
|
||
[e, n, i, t, o]
|
||
);
|
||
}, hW = ct(
|
||
[Sr, cn, ir],
|
||
(e, t, n) => {
|
||
const { tool: i, isDrawing: o } = t;
|
||
return {
|
||
tool: i,
|
||
isDrawing: o,
|
||
activeTabName: e,
|
||
isStaging: n
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), vW = (e, t, n) => {
|
||
const i = je(), { isDrawing: o, tool: l, isStaging: f } = Z(hW), { updateColorUnderCursor: h } = QD();
|
||
return Q(() => {
|
||
if (!e.current)
|
||
return;
|
||
const y = Ub(e.current);
|
||
if (y) {
|
||
if (i(xk(y)), n.current = y, l === "colorPicker") {
|
||
h();
|
||
return;
|
||
}
|
||
!o || l === "move" || f || (t.current = !0, i(
|
||
S6([y.x, y.y])
|
||
));
|
||
}
|
||
}, [
|
||
t,
|
||
i,
|
||
o,
|
||
f,
|
||
n,
|
||
e,
|
||
l,
|
||
h
|
||
]);
|
||
}, mW = () => {
|
||
const e = je();
|
||
return Q(() => {
|
||
e(Sk());
|
||
}, [e]);
|
||
}, gW = ct(
|
||
[Sr, cn, ir],
|
||
(e, t, n) => {
|
||
const { tool: i, isDrawing: o } = t;
|
||
return {
|
||
tool: i,
|
||
isDrawing: o,
|
||
activeTabName: e,
|
||
isStaging: n
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), yW = (e, t) => {
|
||
const n = je(), { tool: i, isDrawing: o, isStaging: l } = Z(gW);
|
||
return Q(() => {
|
||
if (i === "move" || l) {
|
||
n(Ag(!1));
|
||
return;
|
||
}
|
||
if (!t.current && o && e.current) {
|
||
const f = Ub(e.current);
|
||
if (!f)
|
||
return;
|
||
n(
|
||
S6([f.x, f.y])
|
||
);
|
||
} else
|
||
t.current = !1;
|
||
n(x6(!1));
|
||
}, [t, n, o, l, e, i]);
|
||
}, xW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { isMoveStageKeyHeld: t, stageScale: n } = e;
|
||
return {
|
||
isMoveStageKeyHeld: t,
|
||
stageScale: n
|
||
};
|
||
},
|
||
{ memoizeOptions: { resultEqualityCheck: Ie.isEqual } }
|
||
), SW = (e) => {
|
||
const t = je(), { isMoveStageKeyHeld: n, stageScale: i } = Z(xW);
|
||
return Q(
|
||
(o) => {
|
||
if (!e.current || n)
|
||
return;
|
||
o.evt.preventDefault();
|
||
const l = e.current.getPointerPosition();
|
||
if (!l)
|
||
return;
|
||
const f = {
|
||
x: (l.x - e.current.x()) / i,
|
||
y: (l.y - e.current.y()) / i
|
||
};
|
||
let h = o.evt.deltaY;
|
||
o.evt.ctrlKey && (h = -h);
|
||
const y = Ie.clamp(
|
||
i * bk ** h,
|
||
Ck,
|
||
wk
|
||
), m = {
|
||
x: l.x - f.x * y,
|
||
y: l.y - f.y * y
|
||
};
|
||
t(Ek(y)), t(g6(m));
|
||
},
|
||
[e, n, i, t]
|
||
);
|
||
}, bW = ct(
|
||
cn,
|
||
(e) => {
|
||
const {
|
||
boundingBoxCoordinates: t,
|
||
boundingBoxDimensions: n,
|
||
stageDimensions: i,
|
||
stageScale: o,
|
||
shouldDarkenOutsideBoundingBox: l,
|
||
stageCoordinates: f
|
||
} = e;
|
||
return {
|
||
boundingBoxCoordinates: t,
|
||
boundingBoxDimensions: n,
|
||
shouldDarkenOutsideBoundingBox: l,
|
||
stageCoordinates: f,
|
||
stageDimensions: i,
|
||
stageScale: o
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), CW = () => {
|
||
const {
|
||
boundingBoxCoordinates: e,
|
||
boundingBoxDimensions: t,
|
||
shouldDarkenOutsideBoundingBox: n,
|
||
stageCoordinates: i,
|
||
stageDimensions: o,
|
||
stageScale: l
|
||
} = Z(bW);
|
||
return /* @__PURE__ */ c.jsxs(Hs, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
offsetX: i.x / l,
|
||
offsetY: i.y / l,
|
||
height: o.height / l,
|
||
width: o.width / l,
|
||
fill: "rgba(0,0,0,0.4)",
|
||
listening: !1,
|
||
visible: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
x: e.x,
|
||
y: e.y,
|
||
width: t.width,
|
||
height: t.height,
|
||
fill: "rgb(255,255,255)",
|
||
listening: !1,
|
||
visible: n,
|
||
globalCompositeOperation: "destination-out"
|
||
}
|
||
)
|
||
] });
|
||
}, wW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { stageScale: t, stageCoordinates: n, stageDimensions: i } = e;
|
||
return { stageScale: t, stageCoordinates: n, stageDimensions: i };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), EW = {
|
||
dark: "rgba(255, 255, 255, 0.2)",
|
||
green: "rgba(255, 255, 255, 0.2)",
|
||
light: "rgba(0, 0, 0, 0.2)",
|
||
ocean: "rgba(136, 148, 184, 0.2)"
|
||
}, jW = () => {
|
||
const e = Z(
|
||
(h) => h.ui.currentTheme
|
||
), { stageScale: t, stageCoordinates: n, stageDimensions: i } = Z(wW), [o, l] = qe([]), f = Q(
|
||
(h) => h / t,
|
||
[t]
|
||
);
|
||
return bo(() => {
|
||
const h = EW[e], { width: y, height: m } = i, { x, y: b } = n, E = {
|
||
x1: 0,
|
||
y1: 0,
|
||
x2: y,
|
||
y2: m,
|
||
offset: {
|
||
x: f(x),
|
||
y: f(b)
|
||
}
|
||
}, j = {
|
||
x: Math.ceil(f(x) / 64) * 64,
|
||
y: Math.ceil(f(b) / 64) * 64
|
||
}, M = {
|
||
x1: -j.x,
|
||
y1: -j.y,
|
||
x2: f(y) - j.x + 64,
|
||
y2: f(m) - j.y + 64
|
||
}, k = {
|
||
x1: Math.min(E.x1, M.x1),
|
||
y1: Math.min(E.y1, M.y1),
|
||
x2: Math.max(E.x2, M.x2),
|
||
y2: Math.max(E.y2, M.y2)
|
||
}, A = k.x2 - k.x1, L = k.y2 - k.y1, z = Math.round(A / 64) + 1, I = Math.round(L / 64) + 1, _ = Ie.range(0, z).map((B) => /* @__PURE__ */ c.jsx(
|
||
Qg,
|
||
{
|
||
x: k.x1 + B * 64,
|
||
y: k.y1,
|
||
points: [0, 0, 0, L],
|
||
stroke: h,
|
||
strokeWidth: 1
|
||
},
|
||
`x_${B}`
|
||
)), U = Ie.range(0, I).map((B) => /* @__PURE__ */ c.jsx(
|
||
Qg,
|
||
{
|
||
x: k.x1,
|
||
y: k.y1 + B * 64,
|
||
points: [0, 0, A, 0],
|
||
stroke: h,
|
||
strokeWidth: 1
|
||
},
|
||
`y_${B}`
|
||
));
|
||
l(_.concat(U));
|
||
}, [t, n, i, e, f]), /* @__PURE__ */ c.jsx(Hs, { children: o });
|
||
}, TW = ct(
|
||
[(e) => e.gallery],
|
||
(e) => e.intermediateImage ? e.intermediateImage : null,
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), DW = (e) => {
|
||
const { ...t } = e, n = Z(TW), [i, o] = qe(null);
|
||
if (rt(() => {
|
||
if (!n)
|
||
return;
|
||
const m = new Image();
|
||
m.onload = () => {
|
||
o(m);
|
||
}, m.src = n.url;
|
||
}, [n]), !(n != null && n.boundingBox))
|
||
return null;
|
||
const {
|
||
boundingBox: { x: l, y: f, width: h, height: y }
|
||
} = n;
|
||
return i ? /* @__PURE__ */ c.jsx(
|
||
YD,
|
||
{
|
||
x: l,
|
||
y: f,
|
||
width: h,
|
||
height: y,
|
||
image: i,
|
||
listening: !1,
|
||
...t
|
||
}
|
||
) : null;
|
||
}, ac = (e) => {
|
||
const { r: t, g: n, b: i, a: o } = e;
|
||
return `rgba(${t}, ${n}, ${i}, ${o})`;
|
||
}, MW = ct(
|
||
cn,
|
||
(e) => {
|
||
const { maskColor: t, stageCoordinates: n, stageDimensions: i, stageScale: o } = e;
|
||
return {
|
||
stageCoordinates: n,
|
||
stageDimensions: i,
|
||
stageScale: o,
|
||
maskColorString: ac(t)
|
||
};
|
||
}
|
||
), KE = (e) => `data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||
<svg width="60px" height="60px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
|
||
<g transform="matrix(0.5,0,0,0.5,0,0)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,2.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,7.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,10)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,12.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,15)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,17.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,20)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,22.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,25)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,27.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,30)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-2.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-7.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-10)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-12.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-15)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-17.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-20)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-22.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-25)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-27.5)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
<g transform="matrix(0.5,0,0,0.5,0,-30)">
|
||
<path d="M-3.5,63.5L64,-4" style="fill:none;stroke:black;stroke-width:1px;"/>
|
||
</g>
|
||
</svg>`.replaceAll("black", e), RW = (e) => {
|
||
const { ...t } = e, { maskColorString: n, stageCoordinates: i, stageDimensions: o, stageScale: l } = Z(MW), [f, h] = qe(null), [y, m] = qe(0), x = He(null), b = Q(() => {
|
||
m(y + 1), setTimeout(b, 500);
|
||
}, [y]);
|
||
return rt(() => {
|
||
if (f)
|
||
return;
|
||
const E = new Image();
|
||
E.onload = () => {
|
||
h(E);
|
||
}, E.src = KE(n);
|
||
}, [f, n]), rt(() => {
|
||
f && (f.src = KE(n));
|
||
}, [f, n]), rt(() => {
|
||
const E = setInterval(() => m((j) => (j + 1) % 5), 50);
|
||
return () => clearInterval(E);
|
||
}, []), !f || !Ie.isNumber(i.x) || !Ie.isNumber(i.y) || !Ie.isNumber(l) || !Ie.isNumber(o.width) || !Ie.isNumber(o.height) ? null : /* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
ref: x,
|
||
offsetX: i.x / l,
|
||
offsetY: i.y / l,
|
||
height: o.height / l,
|
||
width: o.width / l,
|
||
fillPatternImage: f,
|
||
fillPatternOffsetY: Ie.isNumber(y) ? y : 0,
|
||
fillPatternRepeat: "repeat",
|
||
fillPatternScale: { x: 1 / l, y: 1 / l },
|
||
listening: !0,
|
||
globalCompositeOperation: "source-in",
|
||
...t
|
||
}
|
||
);
|
||
}, kW = ct(
|
||
[cn],
|
||
(e) => ({ objects: e.layerState.objects }),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), PW = (e) => {
|
||
const { ...t } = e, { objects: n } = Z(kW);
|
||
return /* @__PURE__ */ c.jsx(Hs, { listening: !1, ...t, children: n.filter(jk).map((i, o) => /* @__PURE__ */ c.jsx(
|
||
Qg,
|
||
{
|
||
points: i.points,
|
||
stroke: "rgb(0,0,0)",
|
||
strokeWidth: i.strokeWidth * 2,
|
||
tension: 0,
|
||
lineCap: "round",
|
||
lineJoin: "round",
|
||
shadowForStrokeEnabled: !1,
|
||
listening: !1,
|
||
globalCompositeOperation: i.tool === "brush" ? "source-over" : "destination-out"
|
||
},
|
||
o
|
||
)) });
|
||
};
|
||
var Hu = pt, OW = function(t, n, i) {
|
||
const o = Hu.useRef("loading"), l = Hu.useRef(), [f, h] = Hu.useState(0), y = Hu.useRef(), m = Hu.useRef(), x = Hu.useRef();
|
||
return (y.current !== t || m.current !== n || x.current !== i) && (o.current = "loading", l.current = void 0, y.current = t, m.current = n, x.current = i), Hu.useLayoutEffect(
|
||
function() {
|
||
if (!t)
|
||
return;
|
||
var b = document.createElement("img");
|
||
function E() {
|
||
o.current = "loaded", l.current = b, h(Math.random());
|
||
}
|
||
function j() {
|
||
o.current = "failed", l.current = void 0, h(Math.random());
|
||
}
|
||
return b.addEventListener("load", E), b.addEventListener("error", j), n && (b.crossOrigin = n), i && (b.referrerpolicy = i), b.src = t, function() {
|
||
b.removeEventListener("load", E), b.removeEventListener("error", j);
|
||
};
|
||
},
|
||
[t, n, i]
|
||
), [l.current, o.current];
|
||
};
|
||
const XD = (e) => {
|
||
const { url: t, x: n, y: i } = e, [o] = OW(t);
|
||
return /* @__PURE__ */ c.jsx(YD, { x: n, y: i, image: o, listening: !1 });
|
||
}, AW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
layerState: { objects: t }
|
||
} = e;
|
||
return {
|
||
objects: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), NW = () => {
|
||
const { objects: e } = Z(AW);
|
||
return e ? /* @__PURE__ */ c.jsx(Hs, { name: "outpainting-objects", listening: !1, children: e.map((t, n) => {
|
||
if ($5(t))
|
||
return /* @__PURE__ */ c.jsx(XD, { x: t.x, y: t.y, url: t.image.url }, n);
|
||
if (Tk(t)) {
|
||
const i = /* @__PURE__ */ c.jsx(
|
||
Qg,
|
||
{
|
||
points: t.points,
|
||
stroke: t.color ? ac(t.color) : "rgb(0,0,0)",
|
||
strokeWidth: t.strokeWidth * 2,
|
||
tension: 0,
|
||
lineCap: "round",
|
||
lineJoin: "round",
|
||
shadowForStrokeEnabled: !1,
|
||
listening: !1,
|
||
globalCompositeOperation: t.tool === "brush" ? "source-over" : "destination-out"
|
||
},
|
||
n
|
||
);
|
||
return t.clip ? /* @__PURE__ */ c.jsx(
|
||
Hs,
|
||
{
|
||
clipX: t.clip.x,
|
||
clipY: t.clip.y,
|
||
clipWidth: t.clip.width,
|
||
clipHeight: t.clip.height,
|
||
children: i
|
||
},
|
||
n
|
||
) : i;
|
||
} else {
|
||
if (Dk(t))
|
||
return /* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
x: t.x,
|
||
y: t.y,
|
||
width: t.width,
|
||
height: t.height,
|
||
fill: ac(t.color)
|
||
},
|
||
n
|
||
);
|
||
if (Mk(t))
|
||
return /* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
x: t.x,
|
||
y: t.y,
|
||
width: t.width,
|
||
height: t.height,
|
||
fill: "rgb(255, 255, 255)",
|
||
globalCompositeOperation: "destination-out"
|
||
},
|
||
n
|
||
);
|
||
}
|
||
}) }) : null;
|
||
}, zW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
layerState: {
|
||
stagingArea: { images: t, selectedImageIndex: n }
|
||
},
|
||
shouldShowStagingImage: i,
|
||
shouldShowStagingOutline: o,
|
||
boundingBoxCoordinates: { x: l, y: f },
|
||
boundingBoxDimensions: { width: h, height: y }
|
||
} = e;
|
||
return {
|
||
currentStagingAreaImage: t.length > 0 ? t[n] : void 0,
|
||
isOnFirstImage: n === 0,
|
||
isOnLastImage: n === t.length - 1,
|
||
shouldShowStagingImage: i,
|
||
shouldShowStagingOutline: o,
|
||
x: l,
|
||
y: f,
|
||
width: h,
|
||
height: y
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), IW = (e) => {
|
||
const { ...t } = e, {
|
||
currentStagingAreaImage: n,
|
||
shouldShowStagingImage: i,
|
||
shouldShowStagingOutline: o,
|
||
x: l,
|
||
y: f,
|
||
width: h,
|
||
height: y
|
||
} = Z(zW);
|
||
return /* @__PURE__ */ c.jsxs(Hs, { ...t, children: [
|
||
i && n && /* @__PURE__ */ c.jsx(XD, { url: n.image.url, x: l, y: f }),
|
||
o && /* @__PURE__ */ c.jsxs(Hs, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
x: l,
|
||
y: f,
|
||
width: h,
|
||
height: y,
|
||
strokeWidth: 1,
|
||
stroke: "white",
|
||
strokeScaleEnabled: !1
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
x: l,
|
||
y: f,
|
||
width: h,
|
||
height: y,
|
||
dash: [4, 4],
|
||
strokeWidth: 1,
|
||
stroke: "black",
|
||
strokeScaleEnabled: !1
|
||
}
|
||
)
|
||
] })
|
||
] });
|
||
}, LW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
layerState: {
|
||
stagingArea: { images: t, selectedImageIndex: n }
|
||
},
|
||
shouldShowStagingOutline: i,
|
||
shouldShowStagingImage: o
|
||
} = e;
|
||
return {
|
||
currentStagingAreaImage: t.length > 0 ? t[n] : void 0,
|
||
isOnFirstImage: n === 0,
|
||
isOnLastImage: n === t.length - 1,
|
||
shouldShowStagingImage: o,
|
||
shouldShowStagingOutline: i
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), FW = () => {
|
||
const e = je(), {
|
||
isOnFirstImage: t,
|
||
isOnLastImage: n,
|
||
currentStagingAreaImage: i,
|
||
shouldShowStagingImage: o
|
||
} = Z(LW), { t: l } = Pe(), f = Q(() => {
|
||
e(K3(!0));
|
||
}, [e]), h = Q(() => {
|
||
e(K3(!1));
|
||
}, [e]);
|
||
Ze(
|
||
["left"],
|
||
() => {
|
||
y();
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
["right"],
|
||
() => {
|
||
m();
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
["enter"],
|
||
() => {
|
||
x();
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
}
|
||
);
|
||
const y = () => e(Rk()), m = () => e(kk()), x = () => e(Pk());
|
||
return i ? /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
pos: "absolute",
|
||
bottom: 4,
|
||
w: "100%",
|
||
align: "center",
|
||
justify: "center",
|
||
filter: "drop-shadow(0 0.5rem 1rem rgba(0,0,0))",
|
||
onMouseOver: f,
|
||
onMouseOut: h,
|
||
children: /* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: `${l("unifiedCanvas.previous")} (Left)`,
|
||
"aria-label": `${l("unifiedCanvas.previous")} (Left)`,
|
||
icon: /* @__PURE__ */ c.jsx(MB, {}),
|
||
onClick: y,
|
||
colorScheme: "accent",
|
||
isDisabled: t
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: `${l("unifiedCanvas.next")} (Right)`,
|
||
"aria-label": `${l("unifiedCanvas.next")} (Right)`,
|
||
icon: /* @__PURE__ */ c.jsx(RB, {}),
|
||
onClick: m,
|
||
colorScheme: "accent",
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: `${l("unifiedCanvas.accept")} (Enter)`,
|
||
"aria-label": `${l("unifiedCanvas.accept")} (Enter)`,
|
||
icon: /* @__PURE__ */ c.jsx(y0, {}),
|
||
onClick: x,
|
||
colorScheme: "accent"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: l("unifiedCanvas.showHide"),
|
||
"aria-label": l("unifiedCanvas.showHide"),
|
||
"data-alert": !o,
|
||
icon: o ? /* @__PURE__ */ c.jsx(IB, {}) : /* @__PURE__ */ c.jsx(zB, {}),
|
||
onClick: () => e(Ok(!o)),
|
||
colorScheme: "accent"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: l("unifiedCanvas.saveToGallery"),
|
||
"aria-label": l("unifiedCanvas.saveToGallery"),
|
||
icon: /* @__PURE__ */ c.jsx(fb, {}),
|
||
onClick: () => e(
|
||
Ak(i.image.url)
|
||
),
|
||
colorScheme: "accent"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: l("unifiedCanvas.discardAll"),
|
||
"aria-label": l("unifiedCanvas.discardAll"),
|
||
icon: /* @__PURE__ */ c.jsx(Gh, { style: { transform: "rotate(45deg)" } }),
|
||
onClick: () => e(Nk()),
|
||
colorScheme: "error",
|
||
fontSize: 20
|
||
}
|
||
)
|
||
] })
|
||
}
|
||
) : null;
|
||
}, nf = (e) => Math.round(e * 100) / 100, BW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { cursorPosition: t } = e, { cursorX: n, cursorY: i } = t ? { cursorX: t.x, cursorY: t.y } : { cursorX: -1, cursorY: -1 };
|
||
return {
|
||
cursorCoordinatesString: `(${nf(n)}, ${nf(
|
||
i
|
||
)})`
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function _W() {
|
||
const { cursorCoordinatesString: e } = Z(BW), { t } = Pe();
|
||
return /* @__PURE__ */ c.jsx(Ut, { children: `${t(
|
||
"unifiedCanvas.cursorPosition"
|
||
)}: ${e}` });
|
||
}
|
||
const Ux = "var(--invokeai-colors-warning-500)", UW = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
stageDimensions: { width: t, height: n },
|
||
stageCoordinates: { x: i, y: o },
|
||
boundingBoxDimensions: { width: l, height: f },
|
||
scaledBoundingBoxDimensions: {
|
||
width: h,
|
||
height: y
|
||
},
|
||
boundingBoxCoordinates: { x: m, y: x },
|
||
stageScale: b,
|
||
shouldShowCanvasDebugInfo: E,
|
||
layer: j,
|
||
boundingBoxScaleMethod: M,
|
||
shouldPreserveMaskedArea: R
|
||
} = e;
|
||
let k = "inherit";
|
||
return (M === "none" && (l < 512 || f < 512) || M === "manual" && h * y < 512 * 512) && (k = Ux), {
|
||
activeLayerColor: j === "mask" ? Ux : "inherit",
|
||
activeLayerString: j.charAt(0).toUpperCase() + j.slice(1),
|
||
boundingBoxColor: k,
|
||
boundingBoxCoordinatesString: `(${nf(
|
||
m
|
||
)}, ${nf(x)})`,
|
||
boundingBoxDimensionsString: `${l}×${f}`,
|
||
scaledBoundingBoxDimensionsString: `${h}×${y}`,
|
||
canvasCoordinatesString: `${nf(i)}×${nf(
|
||
o
|
||
)}`,
|
||
canvasDimensionsString: `${t}×${n}`,
|
||
canvasScaleString: Math.round(b * 100),
|
||
shouldShowCanvasDebugInfo: E,
|
||
shouldShowBoundingBox: M !== "auto",
|
||
shouldShowScaledBoundingBox: M !== "none",
|
||
shouldPreserveMaskedArea: R
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), HW = () => {
|
||
const {
|
||
activeLayerColor: e,
|
||
activeLayerString: t,
|
||
boundingBoxColor: n,
|
||
boundingBoxCoordinatesString: i,
|
||
boundingBoxDimensionsString: o,
|
||
scaledBoundingBoxDimensionsString: l,
|
||
shouldShowScaledBoundingBox: f,
|
||
canvasCoordinatesString: h,
|
||
canvasDimensionsString: y,
|
||
canvasScaleString: m,
|
||
shouldShowCanvasDebugInfo: x,
|
||
shouldShowBoundingBox: b,
|
||
shouldPreserveMaskedArea: E
|
||
} = Z(UW), { t: j } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
position: "absolute",
|
||
top: 0,
|
||
insetInlineStart: 0,
|
||
opacity: 0.65,
|
||
display: "flex",
|
||
fontSize: "sm",
|
||
padding: 1,
|
||
px: 2,
|
||
minWidth: 48,
|
||
margin: 1,
|
||
borderRadius: "base",
|
||
pointerEvents: "none",
|
||
bg: "blackAlpha.500"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
style: {
|
||
color: e
|
||
},
|
||
children: `${j("unifiedCanvas.activeLayer")}: ${t}`
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(Ut, { children: `${j("unifiedCanvas.canvasScale")}: ${m}%` }),
|
||
E && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
style: {
|
||
color: Ux
|
||
},
|
||
children: "Preserve Masked Area: On"
|
||
}
|
||
),
|
||
b && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
style: {
|
||
color: n
|
||
},
|
||
children: `${j(
|
||
"unifiedCanvas.boundingBox"
|
||
)}: ${o}`
|
||
}
|
||
),
|
||
f && /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
style: {
|
||
color: n
|
||
},
|
||
children: `${j(
|
||
"unifiedCanvas.scaledBoundingBox"
|
||
)}: ${l}`
|
||
}
|
||
),
|
||
x && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(Ut, { children: `${j(
|
||
"unifiedCanvas.boundingBoxPosition"
|
||
)}: ${i}` }),
|
||
/* @__PURE__ */ c.jsx(Ut, { children: `${j(
|
||
"unifiedCanvas.canvasDimensions"
|
||
)}: ${y}` }),
|
||
/* @__PURE__ */ c.jsx(Ut, { children: `${j(
|
||
"unifiedCanvas.canvasPosition"
|
||
)}: ${h}` }),
|
||
/* @__PURE__ */ c.jsx(_W, {})
|
||
] })
|
||
]
|
||
}
|
||
);
|
||
}, VW = ct(
|
||
cn,
|
||
(e) => {
|
||
const {
|
||
boundingBoxCoordinates: t,
|
||
boundingBoxDimensions: n,
|
||
stageScale: i,
|
||
isDrawing: o,
|
||
isTransformingBoundingBox: l,
|
||
isMovingBoundingBox: f,
|
||
tool: h,
|
||
shouldSnapToGrid: y
|
||
} = e;
|
||
return {
|
||
boundingBoxCoordinates: t,
|
||
boundingBoxDimensions: n,
|
||
isDrawing: o,
|
||
isMovingBoundingBox: f,
|
||
isTransformingBoundingBox: l,
|
||
stageScale: i,
|
||
shouldSnapToGrid: y,
|
||
tool: h,
|
||
hitStrokeWidth: 20 / i
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), WW = (e) => {
|
||
const { ...t } = e, n = je(), {
|
||
boundingBoxCoordinates: i,
|
||
boundingBoxDimensions: o,
|
||
isDrawing: l,
|
||
isMovingBoundingBox: f,
|
||
isTransformingBoundingBox: h,
|
||
stageScale: y,
|
||
shouldSnapToGrid: m,
|
||
tool: x,
|
||
hitStrokeWidth: b
|
||
} = Z(VW), E = He(null), j = He(null), [M, R] = qe(!1);
|
||
rt(() => {
|
||
var le;
|
||
!E.current || !j.current || (E.current.nodes([j.current]), (le = E.current.getLayer()) == null || le.batchDraw());
|
||
}, []);
|
||
const k = 64 * y, A = Q(
|
||
(le) => {
|
||
if (!m) {
|
||
n(
|
||
u2({
|
||
x: Math.floor(le.target.x()),
|
||
y: Math.floor(le.target.y())
|
||
})
|
||
);
|
||
return;
|
||
}
|
||
const ae = le.target.x(), he = le.target.y(), Te = Z3(ae, 64), xe = Z3(he, 64);
|
||
le.target.x(Te), le.target.y(xe), n(
|
||
u2({
|
||
x: Te,
|
||
y: xe
|
||
})
|
||
);
|
||
},
|
||
[n, m]
|
||
), L = Q(() => {
|
||
if (!j.current)
|
||
return;
|
||
const le = j.current, ae = le.scaleX(), he = le.scaleY(), Te = Math.round(le.width() * ae), xe = Math.round(le.height() * he), $ = Math.round(le.x()), Y = Math.round(le.y());
|
||
n(
|
||
lh({
|
||
width: Te,
|
||
height: xe
|
||
})
|
||
), n(
|
||
u2({
|
||
x: m ? $m($, 64) : $,
|
||
y: m ? $m(Y, 64) : Y
|
||
})
|
||
), le.scaleX(1), le.scaleY(1);
|
||
}, [n, m]), z = Q(
|
||
(le, ae, he) => {
|
||
const Te = le.x % k, xe = le.y % k;
|
||
return {
|
||
x: $m(ae.x, k) + Te,
|
||
y: $m(ae.y, k) + xe
|
||
};
|
||
},
|
||
[k]
|
||
), I = () => {
|
||
n(c2(!0));
|
||
}, _ = () => {
|
||
n(c2(!1)), n(d2(!1)), n(eg(!1)), R(!1);
|
||
}, U = () => {
|
||
n(d2(!0));
|
||
}, B = () => {
|
||
n(c2(!1)), n(d2(!1)), n(eg(!1)), R(!1);
|
||
}, q = () => {
|
||
R(!0);
|
||
}, J = () => {
|
||
!h && !f && R(!1);
|
||
}, G = () => {
|
||
n(eg(!0));
|
||
}, H = () => {
|
||
n(eg(!1));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Hs, { ...t, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
height: o.height,
|
||
width: o.width,
|
||
x: i.x,
|
||
y: i.y,
|
||
onMouseEnter: G,
|
||
onMouseOver: G,
|
||
onMouseLeave: H,
|
||
onMouseOut: H
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Vs,
|
||
{
|
||
draggable: !0,
|
||
fillEnabled: !1,
|
||
height: o.height,
|
||
hitStrokeWidth: b,
|
||
listening: !l && x === "move",
|
||
onDragStart: U,
|
||
onDragEnd: B,
|
||
onDragMove: A,
|
||
onMouseDown: U,
|
||
onMouseOut: J,
|
||
onMouseOver: q,
|
||
onMouseEnter: q,
|
||
onMouseUp: B,
|
||
onTransform: L,
|
||
onTransformEnd: _,
|
||
ref: j,
|
||
stroke: M ? "rgba(255,255,255,0.7)" : "white",
|
||
strokeWidth: (M ? 8 : 1) / y,
|
||
width: o.width,
|
||
x: i.x,
|
||
y: i.y
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
oW,
|
||
{
|
||
anchorCornerRadius: 3,
|
||
anchorDragBoundFunc: z,
|
||
anchorFill: "rgba(212,216,234,1)",
|
||
anchorSize: 15,
|
||
anchorStroke: "rgb(42,42,42)",
|
||
borderDash: [4, 4],
|
||
borderEnabled: !0,
|
||
borderStroke: "black",
|
||
draggable: !1,
|
||
enabledAnchors: x === "move" ? void 0 : [],
|
||
flipEnabled: !1,
|
||
ignoreStroke: !0,
|
||
keepRatio: !1,
|
||
listening: !l && x === "move",
|
||
onDragStart: U,
|
||
onDragEnd: B,
|
||
onMouseDown: I,
|
||
onMouseUp: _,
|
||
onTransformEnd: _,
|
||
ref: E,
|
||
rotateEnabled: !1
|
||
}
|
||
)
|
||
] });
|
||
}, GW = ct(
|
||
cn,
|
||
(e) => {
|
||
const {
|
||
cursorPosition: t,
|
||
brushSize: n,
|
||
colorPickerColor: i,
|
||
maskColor: o,
|
||
brushColor: l,
|
||
tool: f,
|
||
layer: h,
|
||
shouldShowBrush: y,
|
||
isMovingBoundingBox: m,
|
||
isTransformingBoundingBox: x,
|
||
stageScale: b,
|
||
stageDimensions: E,
|
||
boundingBoxCoordinates: j,
|
||
boundingBoxDimensions: M,
|
||
shouldRestrictStrokesToBox: R
|
||
} = e, k = R ? {
|
||
clipX: j.x,
|
||
clipY: j.y,
|
||
clipWidth: M.width,
|
||
clipHeight: M.height
|
||
} : {};
|
||
return {
|
||
cursorPosition: t,
|
||
brushX: t ? t.x : E.width / 2,
|
||
brushY: t ? t.y : E.height / 2,
|
||
radius: n / 2,
|
||
colorPickerOuterRadius: J3 / b,
|
||
colorPickerInnerRadius: (J3 - fx + 1) / b,
|
||
maskColorString: ac({ ...o, a: 0.5 }),
|
||
brushColorString: ac(l),
|
||
colorPickerColorString: ac(i),
|
||
tool: f,
|
||
layer: h,
|
||
shouldShowBrush: y,
|
||
shouldDrawBrushPreview: !(m || x || !t) && y,
|
||
strokeWidth: 1.5 / b,
|
||
dotRadius: 1.5 / b,
|
||
clip: k
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), qW = (e) => {
|
||
const { ...t } = e, {
|
||
brushX: n,
|
||
brushY: i,
|
||
radius: o,
|
||
maskColorString: l,
|
||
tool: f,
|
||
layer: h,
|
||
shouldDrawBrushPreview: y,
|
||
dotRadius: m,
|
||
strokeWidth: x,
|
||
brushColorString: b,
|
||
colorPickerColorString: E,
|
||
colorPickerInnerRadius: j,
|
||
colorPickerOuterRadius: M,
|
||
clip: R
|
||
} = Z(GW);
|
||
return y ? /* @__PURE__ */ c.jsxs(Hs, { listening: !1, ...R, ...t, children: [
|
||
f === "colorPicker" ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: M,
|
||
stroke: b,
|
||
strokeWidth: fx,
|
||
strokeScaleEnabled: !1
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: j,
|
||
stroke: E,
|
||
strokeWidth: fx,
|
||
strokeScaleEnabled: !1
|
||
}
|
||
)
|
||
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: o,
|
||
fill: h === "mask" ? l : b,
|
||
globalCompositeOperation: f === "eraser" ? "destination-out" : "source-out"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: o,
|
||
stroke: "rgba(255,255,255,0.4)",
|
||
strokeWidth: x * 2,
|
||
strokeEnabled: !0,
|
||
listening: !1
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: o,
|
||
stroke: "rgba(0,0,0,1)",
|
||
strokeWidth: x,
|
||
strokeEnabled: !0,
|
||
listening: !1
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: m * 2,
|
||
fill: "rgba(255,255,255,0.4)",
|
||
listening: !1
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Uu,
|
||
{
|
||
x: n,
|
||
y: i,
|
||
radius: m,
|
||
fill: "rgba(0,0,0,1)",
|
||
listening: !1
|
||
}
|
||
)
|
||
] }) : null;
|
||
}, YW = ct(
|
||
[cn, ir],
|
||
(e, t) => {
|
||
const {
|
||
isMaskEnabled: n,
|
||
stageScale: i,
|
||
shouldShowBoundingBox: o,
|
||
isTransformingBoundingBox: l,
|
||
isMouseOverBoundingBox: f,
|
||
isMovingBoundingBox: h,
|
||
stageDimensions: y,
|
||
stageCoordinates: m,
|
||
tool: x,
|
||
isMovingStage: b,
|
||
shouldShowIntermediates: E,
|
||
shouldShowGrid: j,
|
||
shouldRestrictStrokesToBox: M
|
||
} = e;
|
||
let R = "none";
|
||
return x === "move" || t ? b ? R = "grabbing" : R = "grab" : l ? R = void 0 : M && !f && (R = "default"), {
|
||
isMaskEnabled: n,
|
||
isModifyingBoundingBox: l || h,
|
||
shouldShowBoundingBox: o,
|
||
shouldShowGrid: j,
|
||
stageCoordinates: m,
|
||
stageCursor: R,
|
||
stageDimensions: y,
|
||
stageScale: i,
|
||
tool: x,
|
||
isStaging: t,
|
||
shouldShowIntermediates: E
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), QW = Be(sW, {
|
||
shouldForwardProp: (e) => !["sx"].includes(e)
|
||
}), KD = () => {
|
||
const {
|
||
isMaskEnabled: e,
|
||
isModifyingBoundingBox: t,
|
||
shouldShowBoundingBox: n,
|
||
shouldShowGrid: i,
|
||
stageCoordinates: o,
|
||
stageCursor: l,
|
||
stageDimensions: f,
|
||
stageScale: h,
|
||
tool: y,
|
||
isStaging: m,
|
||
shouldShowIntermediates: x
|
||
} = Z(YW);
|
||
dW();
|
||
const b = He(null), E = He(null), j = Q((J) => {
|
||
Ik(J), b.current = J;
|
||
}, []), M = Q((J) => {
|
||
zk(J), E.current = J;
|
||
}, []), R = He({ x: 0, y: 0 }), k = He(!1), A = SW(b), L = pW(b), z = yW(b, k), I = vW(
|
||
b,
|
||
k,
|
||
R
|
||
), _ = mW(), { handleDragStart: U, handleDragMove: B, handleDragEnd: q } = uW();
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
position: "relative",
|
||
height: "100%",
|
||
width: "100%",
|
||
borderRadius: "base"
|
||
},
|
||
children: /* @__PURE__ */ c.jsxs(Ut, { sx: { position: "relative" }, children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
QW,
|
||
{
|
||
tabIndex: -1,
|
||
ref: j,
|
||
sx: {
|
||
outline: "none",
|
||
// boxShadow: '0px 0px 0px 1px var(--border-color-light)',
|
||
overflow: "hidden",
|
||
cursor: l || void 0,
|
||
canvas: {
|
||
outline: "none"
|
||
}
|
||
},
|
||
x: o.x,
|
||
y: o.y,
|
||
width: f.width,
|
||
height: f.height,
|
||
scale: { x: h, y: h },
|
||
onTouchStart: L,
|
||
onTouchMove: I,
|
||
onTouchEnd: z,
|
||
onMouseDown: L,
|
||
onMouseLeave: _,
|
||
onMouseMove: I,
|
||
onMouseUp: z,
|
||
onDragStart: U,
|
||
onDragMove: B,
|
||
onDragEnd: q,
|
||
onContextMenu: (J) => J.evt.preventDefault(),
|
||
onWheel: A,
|
||
draggable: (y === "move" || m) && !t,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(oh, { id: "grid", visible: i, children: /* @__PURE__ */ c.jsx(jW, {}) }),
|
||
/* @__PURE__ */ c.jsx(
|
||
oh,
|
||
{
|
||
id: "base",
|
||
ref: M,
|
||
listening: !1,
|
||
imageSmoothingEnabled: !1,
|
||
children: /* @__PURE__ */ c.jsx(NW, {})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(oh, { id: "mask", visible: e, listening: !1, children: [
|
||
/* @__PURE__ */ c.jsx(PW, { visible: !0, listening: !1 }),
|
||
/* @__PURE__ */ c.jsx(RW, { listening: !1 })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(oh, { children: /* @__PURE__ */ c.jsx(CW, {}) }),
|
||
/* @__PURE__ */ c.jsxs(oh, { id: "preview", imageSmoothingEnabled: !1, children: [
|
||
!m && /* @__PURE__ */ c.jsx(
|
||
qW,
|
||
{
|
||
visible: y !== "move",
|
||
listening: !1
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(IW, { visible: m }),
|
||
x && /* @__PURE__ */ c.jsx(DW, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
WW,
|
||
{
|
||
visible: n && !m
|
||
}
|
||
)
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(HW, {}),
|
||
/* @__PURE__ */ c.jsx(FW, {})
|
||
] })
|
||
}
|
||
);
|
||
}, XW = ct(
|
||
cn,
|
||
lD,
|
||
Sr,
|
||
(e, t, n) => {
|
||
const { doesCanvasNeedScaling: i, isCanvasInitialized: o } = e;
|
||
return {
|
||
doesCanvasNeedScaling: i,
|
||
activeTabName: n,
|
||
initialCanvasImage: t,
|
||
isCanvasInitialized: o
|
||
};
|
||
}
|
||
), ZD = () => {
|
||
const e = je(), {
|
||
doesCanvasNeedScaling: t,
|
||
activeTabName: n,
|
||
initialCanvasImage: i,
|
||
isCanvasInitialized: o
|
||
} = Z(XW), l = He(null);
|
||
return bo(() => {
|
||
window.setTimeout(() => {
|
||
if (!l.current)
|
||
return;
|
||
const { clientWidth: f, clientHeight: h } = l.current;
|
||
e(
|
||
Lk({
|
||
width: f,
|
||
height: h
|
||
})
|
||
), e(o ? Fk() : n0()), e(ca(!1));
|
||
}, 0);
|
||
}, [
|
||
e,
|
||
i,
|
||
t,
|
||
n,
|
||
o
|
||
]), /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
ref: l,
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
gap: 4,
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(rS, { thickness: "2px", speed: "1s", size: "xl" })
|
||
}
|
||
);
|
||
}, KW = ct(
|
||
[cn, Sr, Xn],
|
||
(e, t, n) => {
|
||
const { futureLayerStates: i } = e;
|
||
return {
|
||
canRedo: i.length > 0 && !n.isProcessing,
|
||
activeTabName: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function JD() {
|
||
const e = je(), { canRedo: t, activeTabName: n } = Z(KW), { t: i } = Pe(), o = () => {
|
||
e(Bk());
|
||
};
|
||
return Ze(
|
||
["meta+shift+z", "ctrl+shift+z", "control+y", "meta+y"],
|
||
() => {
|
||
o();
|
||
},
|
||
{
|
||
enabled: () => t,
|
||
preventDefault: !0
|
||
},
|
||
[n, t]
|
||
), /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${i("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,
|
||
tooltip: `${i("unifiedCanvas.redo")} (Ctrl+Shift+Z)`,
|
||
icon: /* @__PURE__ */ c.jsx(YB, {}),
|
||
onClick: o,
|
||
isDisabled: !t
|
||
}
|
||
);
|
||
}
|
||
const ZW = ct(
|
||
[cn, Sr, Xn],
|
||
(e, t, n) => {
|
||
const { pastLayerStates: i } = e;
|
||
return {
|
||
canUndo: i.length > 0 && !n.isProcessing,
|
||
activeTabName: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function $D() {
|
||
const e = je(), { t } = Pe(), { canUndo: n, activeTabName: i } = Z(ZW), o = () => {
|
||
e(_k());
|
||
};
|
||
return Ze(
|
||
["meta+z", "ctrl+z"],
|
||
() => {
|
||
o();
|
||
},
|
||
{
|
||
enabled: () => n,
|
||
preventDefault: !0
|
||
},
|
||
[i, n]
|
||
), /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.undo")} (Ctrl+Z)`,
|
||
tooltip: `${t("unifiedCanvas.undo")} (Ctrl+Z)`,
|
||
icon: /* @__PURE__ */ c.jsx(JB, {}),
|
||
onClick: o,
|
||
isDisabled: !n
|
||
}
|
||
);
|
||
}
|
||
const JW = (e, t, n) => {
|
||
const i = document.createElement("img");
|
||
i.addEventListener("load", () => {
|
||
const o = document.createElement("canvas");
|
||
o.width = t, o.height = n;
|
||
const l = o.getContext("2d");
|
||
l && (l.drawImage(i, 0, 0), o.toBlob((f) => {
|
||
f && navigator.clipboard.write([
|
||
new ClipboardItem({
|
||
[f.type]: f
|
||
})
|
||
]);
|
||
}), o.remove(), i.remove());
|
||
}), i.src = e;
|
||
}, $W = (e) => {
|
||
const t = document.createElement("a");
|
||
t.href = e, t.download = "", document.body.appendChild(t), t.click(), document.body.removeChild(t), t.remove();
|
||
}, eG = (e, t, n, i) => {
|
||
const o = e.scale(), l = e.getClientRect({
|
||
relativeTo: e.getParent()
|
||
});
|
||
e.scale({
|
||
x: 1 / t,
|
||
y: 1 / t
|
||
});
|
||
const { x: f, y: h, width: y, height: m } = e.getClientRect(), x = i ? {
|
||
x: i.x + n.x,
|
||
y: i.y + n.y,
|
||
width: i.width,
|
||
height: i.height
|
||
} : {
|
||
x: f,
|
||
y: h,
|
||
width: y,
|
||
height: m
|
||
}, b = e.toDataURL(x);
|
||
return e.scale(o), {
|
||
dataURL: b,
|
||
boundingBox: {
|
||
x: l.x,
|
||
y: l.y,
|
||
width: y,
|
||
height: m
|
||
}
|
||
};
|
||
}, tG = {
|
||
cropVisible: !1,
|
||
cropToBoundingBox: !1,
|
||
shouldSaveToGallery: !1,
|
||
shouldDownload: !1,
|
||
shouldCopy: !1,
|
||
shouldSetAsInitialImage: !0
|
||
}, Ul = (e = tG) => async (t, n) => {
|
||
const {
|
||
cropVisible: i,
|
||
cropToBoundingBox: o,
|
||
shouldSaveToGallery: l,
|
||
shouldDownload: f,
|
||
shouldCopy: h,
|
||
shouldSetAsInitialImage: y
|
||
} = e;
|
||
t(Uk("Exporting Image")), t(tg(!1));
|
||
const m = n(), {
|
||
stageScale: x,
|
||
boundingBoxCoordinates: b,
|
||
boundingBoxDimensions: E,
|
||
stageCoordinates: j
|
||
} = m.canvas, M = ns();
|
||
if (!M) {
|
||
t(f2(!1)), t(tg(!0));
|
||
return;
|
||
}
|
||
const { dataURL: R, boundingBox: k } = eG(
|
||
M,
|
||
x,
|
||
j,
|
||
o ? { ...b, ...E } : void 0
|
||
);
|
||
if (!R) {
|
||
t(f2(!1)), t(tg(!0));
|
||
return;
|
||
}
|
||
const A = new FormData();
|
||
A.append(
|
||
"data",
|
||
JSON.stringify({
|
||
dataURL: R,
|
||
filename: "merged_canvas.png",
|
||
kind: l ? "result" : "temp",
|
||
cropVisible: i
|
||
})
|
||
);
|
||
const z = await (await fetch(`${window.location.origin}/upload`, {
|
||
method: "POST",
|
||
body: A
|
||
})).json(), { url: I, width: _, height: U } = z, B = {
|
||
uuid: K5(),
|
||
category: l ? "result" : "user",
|
||
...z
|
||
};
|
||
f && ($W(I), t(
|
||
ng({
|
||
title: go.t("toast.downloadImageStarted"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})
|
||
)), h && (JW(I, _, U), t(
|
||
ng({
|
||
title: go.t("toast.imageCopied"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})
|
||
)), l && (t(Z5({ image: B, category: "result" })), t(
|
||
ng({
|
||
title: go.t("toast.imageSavedToGallery"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})
|
||
)), y && (t(
|
||
Hk({
|
||
kind: "image",
|
||
layer: "base",
|
||
...k,
|
||
image: B
|
||
})
|
||
), t(
|
||
ng({
|
||
title: go.t("toast.canvasMerged"),
|
||
status: "success",
|
||
duration: 2500,
|
||
isClosable: !0
|
||
})
|
||
)), t(f2(!1)), t(Vk(go.t("common.statusConnected"))), t(tg(!0));
|
||
};
|
||
function nG() {
|
||
const e = Z(ir), t = ns(), n = Z(
|
||
(h) => h.system.isProcessing
|
||
), i = Z(
|
||
(h) => h.canvas.shouldCropToBoundingBoxOnSave
|
||
), o = je(), { t: l } = Pe();
|
||
Ze(
|
||
["meta+c", "ctrl+c"],
|
||
() => {
|
||
f();
|
||
},
|
||
{
|
||
enabled: () => !e,
|
||
preventDefault: !0
|
||
},
|
||
[t, n]
|
||
);
|
||
const f = () => {
|
||
o(
|
||
Ul({
|
||
cropVisible: !i,
|
||
cropToBoundingBox: i,
|
||
shouldCopy: !0
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,
|
||
tooltip: `${l("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,
|
||
icon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
onClick: f,
|
||
isDisabled: e
|
||
}
|
||
);
|
||
}
|
||
function rG() {
|
||
const e = je(), { t } = Pe(), n = ns(), i = Z(ir), o = Z(
|
||
(h) => h.system.isProcessing
|
||
), l = Z(
|
||
(h) => h.canvas.shouldCropToBoundingBoxOnSave
|
||
);
|
||
Ze(
|
||
["shift+d"],
|
||
() => {
|
||
f();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[n, o]
|
||
);
|
||
const f = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !l,
|
||
cropToBoundingBox: l,
|
||
shouldDownload: !0
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,
|
||
tooltip: `${t("unifiedCanvas.downloadAsImage")} (Shift+D)`,
|
||
icon: /* @__PURE__ */ c.jsx(db, {}),
|
||
onClick: f,
|
||
isDisabled: i
|
||
}
|
||
);
|
||
}
|
||
function aG() {
|
||
const e = Z(ir), { openUploader: t } = ib(), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": n("common.upload"),
|
||
tooltip: n("common.upload"),
|
||
icon: /* @__PURE__ */ c.jsx(x0, {}),
|
||
onClick: t,
|
||
isDisabled: e
|
||
}
|
||
);
|
||
}
|
||
const iG = ct(
|
||
[cn, ir],
|
||
(e, t) => {
|
||
const { layer: n, isMaskEnabled: i } = e;
|
||
return { layer: n, isMaskEnabled: i, isStaging: t };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function oG() {
|
||
const e = je(), { t } = Pe(), { layer: n, isMaskEnabled: i, isStaging: o } = Z(iG), l = () => {
|
||
e(zg(n === "mask" ? "base" : "mask"));
|
||
};
|
||
Ze(
|
||
["q"],
|
||
() => {
|
||
l();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
);
|
||
const f = (h) => {
|
||
const y = h.target.value;
|
||
e(zg(y)), y === "mask" && !i && e(Ah(!0));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
tooltip: `${t("unifiedCanvas.layer")} (Q)`,
|
||
"aria-label": `${t("unifiedCanvas.layer")} (Q)`,
|
||
tooltipProps: { hasArrow: !0, placement: "top" },
|
||
value: n,
|
||
validValues: b6,
|
||
onChange: f,
|
||
isDisabled: o
|
||
}
|
||
);
|
||
}
|
||
function sG() {
|
||
const e = je(), { t } = Pe(), n = ns(), i = Z(ir), o = Z(
|
||
(f) => f.system.isProcessing
|
||
);
|
||
Ze(
|
||
["shift+m"],
|
||
() => {
|
||
l();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[n, o]
|
||
);
|
||
const l = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !1,
|
||
shouldSetAsInitialImage: !0
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.mergeVisible")} (Shift+M)`,
|
||
tooltip: `${t("unifiedCanvas.mergeVisible")} (Shift+M)`,
|
||
icon: /* @__PURE__ */ c.jsx(oD, {}),
|
||
onClick: l,
|
||
isDisabled: i
|
||
}
|
||
);
|
||
}
|
||
function lG() {
|
||
const e = Z((l) => l.canvas.tool), t = Z(ir), n = je(), { t: i } = Pe();
|
||
Ze(
|
||
["v"],
|
||
() => {
|
||
o();
|
||
},
|
||
{
|
||
enabled: () => !t,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
);
|
||
const o = () => n(es("move"));
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${i("unifiedCanvas.move")} (V)`,
|
||
tooltip: `${i("unifiedCanvas.move")} (V)`,
|
||
icon: /* @__PURE__ */ c.jsx(eD, {}),
|
||
isChecked: e === "move" || t,
|
||
onClick: o
|
||
}
|
||
);
|
||
}
|
||
function uG() {
|
||
const e = Z(
|
||
(o) => o.ui.shouldPinParametersPanel
|
||
), t = je(), { t: n } = Pe(), i = () => {
|
||
t(Zu(!0)), e && setTimeout(() => t(ca(!0)), 400);
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: `${n("parameters.showOptionsPanel")} (O)`,
|
||
tooltipProps: { placement: "top" },
|
||
"aria-label": n("parameters.showOptionsPanel"),
|
||
onClick: i,
|
||
children: /* @__PURE__ */ c.jsx(pb, {})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(ce, { children: /* @__PURE__ */ c.jsx(jb, { iconButton: !0 }) }),
|
||
/* @__PURE__ */ c.jsx(ce, { children: /* @__PURE__ */ c.jsx(wb, { width: "100%", height: "40px", btnGroupWidth: "100%" }) })
|
||
] });
|
||
}
|
||
function cG() {
|
||
const e = je(), { t } = Pe(), n = Z(ir), i = () => {
|
||
e(iS()), e(n0());
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("unifiedCanvas.clearCanvas"),
|
||
tooltip: t("unifiedCanvas.clearCanvas"),
|
||
icon: /* @__PURE__ */ c.jsx(mc, {}),
|
||
onClick: i,
|
||
isDisabled: n,
|
||
colorScheme: "error"
|
||
}
|
||
);
|
||
}
|
||
function eM(e, t, n = 250) {
|
||
const [i, o] = qe(0);
|
||
return rt(() => {
|
||
const l = setTimeout(() => {
|
||
i === 1 && e(), o(0);
|
||
}, n);
|
||
return i === 2 && t(), () => clearTimeout(l);
|
||
}, [i, e, t, n]), () => o((l) => l + 1);
|
||
}
|
||
function dG() {
|
||
const e = ns(), t = je(), { t: n } = Pe();
|
||
Ze(
|
||
["r"],
|
||
() => {
|
||
o();
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
},
|
||
[e]
|
||
);
|
||
const i = eM(
|
||
() => o(!1),
|
||
() => o(!0)
|
||
), o = (l = !1) => {
|
||
const f = ns();
|
||
if (!f)
|
||
return;
|
||
const h = f.getClientRect({
|
||
skipTransform: !0
|
||
});
|
||
t(
|
||
C6({
|
||
contentRect: h,
|
||
shouldScaleTo1: l
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${n("unifiedCanvas.resetView")} (R)`,
|
||
tooltip: `${n("unifiedCanvas.resetView")} (R)`,
|
||
icon: /* @__PURE__ */ c.jsx(nD, {}),
|
||
onClick: i
|
||
}
|
||
);
|
||
}
|
||
function fG() {
|
||
const e = Z(ir), t = ns(), n = Z(
|
||
(h) => h.system.isProcessing
|
||
), i = Z(
|
||
(h) => h.canvas.shouldCropToBoundingBoxOnSave
|
||
), o = je(), { t: l } = Pe();
|
||
Ze(
|
||
["shift+s"],
|
||
() => {
|
||
f();
|
||
},
|
||
{
|
||
enabled: () => !e,
|
||
preventDefault: !0
|
||
},
|
||
[t, n]
|
||
);
|
||
const f = () => {
|
||
o(
|
||
Ul({
|
||
cropVisible: !i,
|
||
cropToBoundingBox: i,
|
||
shouldSaveToGallery: !0
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.saveToGallery")} (Shift+S)`,
|
||
tooltip: `${l("unifiedCanvas.saveToGallery")} (Shift+S)`,
|
||
icon: /* @__PURE__ */ c.jsx(fb, {}),
|
||
onClick: f,
|
||
isDisabled: e
|
||
}
|
||
);
|
||
}
|
||
const pG = ct(
|
||
[cn, ir, Xn],
|
||
(e, t, n) => {
|
||
const { isProcessing: i } = n, { tool: o } = e;
|
||
return {
|
||
tool: o,
|
||
isStaging: t,
|
||
isProcessing: i
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), hG = () => {
|
||
const e = je(), { t } = Pe(), { tool: n, isStaging: i } = Z(pG);
|
||
Ze(
|
||
["b"],
|
||
() => {
|
||
o();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
), Ze(
|
||
["e"],
|
||
() => {
|
||
l();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
), Ze(
|
||
["c"],
|
||
() => {
|
||
f();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
), Ze(
|
||
["shift+f"],
|
||
() => {
|
||
h();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
["delete", "backspace"],
|
||
() => {
|
||
y();
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
}
|
||
);
|
||
const o = () => e(es("brush")), l = () => e(es("eraser")), f = () => e(es("colorPicker")), h = () => e(w6()), y = () => e(E6());
|
||
return /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsxs(Jr, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.brush")} (B)`,
|
||
tooltip: `${t("unifiedCanvas.brush")} (B)`,
|
||
icon: /* @__PURE__ */ c.jsx(sD, {}),
|
||
isChecked: n === "brush" && !i,
|
||
onClick: o,
|
||
isDisabled: i
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.eraser")} (E)`,
|
||
tooltip: `${t("unifiedCanvas.eraser")} (B)`,
|
||
icon: /* @__PURE__ */ c.jsx(rD, {}),
|
||
isChecked: n === "eraser" && !i,
|
||
isDisabled: i,
|
||
onClick: l
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,
|
||
tooltip: `${t("unifiedCanvas.fillBoundingBox")} (Shift+F)`,
|
||
icon: /* @__PURE__ */ c.jsx(iD, {}),
|
||
isDisabled: i,
|
||
onClick: h
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,
|
||
tooltip: `${t("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,
|
||
icon: /* @__PURE__ */ c.jsx(Gh, { style: { transform: "rotate(45deg)" } }),
|
||
isDisabled: i,
|
||
onClick: y
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${t("unifiedCanvas.colorPicker")} (C)`,
|
||
tooltip: `${t("unifiedCanvas.colorPicker")} (C)`,
|
||
icon: /* @__PURE__ */ c.jsx(aD, {}),
|
||
isChecked: n === "colorPicker" && !i,
|
||
isDisabled: i,
|
||
onClick: f,
|
||
width: "max-content"
|
||
}
|
||
)
|
||
] });
|
||
}, j0 = $e((e, t) => {
|
||
const {
|
||
acceptButtonText: n = "Accept",
|
||
acceptCallback: i,
|
||
cancelButtonText: o = "Cancel",
|
||
cancelCallback: l,
|
||
children: f,
|
||
title: h,
|
||
triggerComponent: y
|
||
} = e, { isOpen: m, onOpen: x, onClose: b } = Gl(), E = He(null), j = () => {
|
||
i(), b();
|
||
}, M = () => {
|
||
l && l(), b();
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
Ci(y, {
|
||
onClick: x,
|
||
ref: t
|
||
}),
|
||
/* @__PURE__ */ c.jsx(
|
||
ST,
|
||
{
|
||
isOpen: m,
|
||
leastDestructiveRef: E,
|
||
onClose: b,
|
||
children: /* @__PURE__ */ c.jsx(Bs, { children: /* @__PURE__ */ c.jsxs(bT, { children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { fontSize: "lg", fontWeight: "bold", children: h }),
|
||
/* @__PURE__ */ c.jsx(_s, { children: f }),
|
||
/* @__PURE__ */ c.jsxs(Ls, { children: [
|
||
/* @__PURE__ */ c.jsx(un, { ref: E, onClick: M, children: o }),
|
||
/* @__PURE__ */ c.jsx(un, { colorScheme: "error", onClick: j, ml: 3, children: n })
|
||
] })
|
||
] }) })
|
||
}
|
||
)
|
||
] });
|
||
}), tM = () => {
|
||
const e = Z(ir), t = je(), { t: n } = Pe(), i = () => {
|
||
t(Wk()), t(iS()), t(j6());
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
j0,
|
||
{
|
||
title: n("unifiedCanvas.emptyTempImageFolder"),
|
||
acceptCallback: i,
|
||
acceptButtonText: n("unifiedCanvas.emptyFolder"),
|
||
triggerComponent: /* @__PURE__ */ c.jsx(un, { leftIcon: /* @__PURE__ */ c.jsx(mc, {}), size: "sm", isDisabled: e, children: n("unifiedCanvas.emptyTempImageFolder") }),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("p", { children: n("unifiedCanvas.emptyTempImagesFolderMessage") }),
|
||
/* @__PURE__ */ c.jsx("br", {}),
|
||
/* @__PURE__ */ c.jsx("p", { children: n("unifiedCanvas.emptyTempImagesFolderConfirm") })
|
||
]
|
||
}
|
||
);
|
||
}, nM = () => {
|
||
const e = Z(ir), t = je(), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(
|
||
j0,
|
||
{
|
||
title: n("unifiedCanvas.clearCanvasHistory"),
|
||
acceptCallback: () => t(j6()),
|
||
acceptButtonText: n("unifiedCanvas.clearHistory"),
|
||
triggerComponent: /* @__PURE__ */ c.jsx(un, { size: "sm", leftIcon: /* @__PURE__ */ c.jsx(mc, {}), isDisabled: e, children: n("unifiedCanvas.clearCanvasHistory") }),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("p", { children: n("unifiedCanvas.clearCanvasHistoryMessage") }),
|
||
/* @__PURE__ */ c.jsx("br", {}),
|
||
/* @__PURE__ */ c.jsx("p", { children: n("unifiedCanvas.clearCanvasHistoryConfirm") })
|
||
]
|
||
}
|
||
);
|
||
}, vG = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
shouldAutoSave: t,
|
||
shouldCropToBoundingBoxOnSave: n,
|
||
shouldShowCanvasDebugInfo: i,
|
||
shouldShowIntermediates: o
|
||
} = e;
|
||
return {
|
||
shouldAutoSave: t,
|
||
shouldCropToBoundingBoxOnSave: n,
|
||
shouldShowCanvasDebugInfo: i,
|
||
shouldShowIntermediates: o
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), mG = () => {
|
||
const e = je(), { t } = Pe(), {
|
||
shouldAutoSave: n,
|
||
shouldCropToBoundingBoxOnSave: i,
|
||
shouldShowCanvasDebugInfo: o,
|
||
shouldShowIntermediates: l
|
||
} = Z(vG);
|
||
return /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: t("unifiedCanvas.canvasSettings"),
|
||
tooltipProps: {
|
||
placement: "bottom"
|
||
},
|
||
"aria-label": t("unifiedCanvas.canvasSettings"),
|
||
icon: /* @__PURE__ */ c.jsx(hb, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { direction: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.showIntermediates"),
|
||
isChecked: l,
|
||
onChange: (f) => e(T6(f.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.autoSaveToGallery"),
|
||
isChecked: n,
|
||
onChange: (f) => e(D6(f.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.saveBoxRegionOnly"),
|
||
isChecked: i,
|
||
onChange: (f) => e(M6(f.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.showCanvasDebugInfo"),
|
||
isChecked: o,
|
||
onChange: (f) => e(R6(f.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(nM, {}),
|
||
/* @__PURE__ */ c.jsx(tM, {})
|
||
] })
|
||
}
|
||
);
|
||
}, gG = () => {
|
||
const e = Z(
|
||
(t) => t.ui.shouldShowParametersPanel
|
||
);
|
||
return /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(oG, {}),
|
||
/* @__PURE__ */ c.jsx(hG, {}),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(lG, {}),
|
||
/* @__PURE__ */ c.jsx(dG, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(sG, {}),
|
||
/* @__PURE__ */ c.jsx(fG, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(nG, {}),
|
||
/* @__PURE__ */ c.jsx(rG, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx($D, {}),
|
||
/* @__PURE__ */ c.jsx(JD, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(aG, {}),
|
||
/* @__PURE__ */ c.jsx(cG, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(mG, {}),
|
||
!e && /* @__PURE__ */ c.jsx(uG, {})
|
||
] });
|
||
};
|
||
function yG() {
|
||
const e = je(), t = Z(
|
||
(o) => o.canvas.brushSize
|
||
), { t: n } = Pe(), i = Z(ir);
|
||
return Ze(
|
||
["BracketLeft"],
|
||
() => {
|
||
e(rf(Math.max(t - 5, 5)));
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), Ze(
|
||
["BracketRight"],
|
||
() => {
|
||
e(rf(Math.min(t + 5, 500)));
|
||
},
|
||
{
|
||
enabled: () => !i,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("unifiedCanvas.brushSize"),
|
||
value: t,
|
||
withInput: !0,
|
||
onChange: (o) => e(rf(o)),
|
||
sliderNumberInputProps: { max: 500 },
|
||
inputReadOnly: !1,
|
||
isCompact: !0
|
||
}
|
||
);
|
||
}
|
||
function T0() {
|
||
return (T0 = Object.assign || function(e) {
|
||
for (var t = 1; t < arguments.length; t++) {
|
||
var n = arguments[t];
|
||
for (var i in n)
|
||
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
||
}
|
||
return e;
|
||
}).apply(this, arguments);
|
||
}
|
||
function rM(e, t) {
|
||
if (e == null)
|
||
return {};
|
||
var n, i, o = {}, l = Object.keys(e);
|
||
for (i = 0; i < l.length; i++)
|
||
t.indexOf(n = l[i]) >= 0 || (o[n] = e[n]);
|
||
return o;
|
||
}
|
||
function Hx(e) {
|
||
var t = He(e), n = He(function(i) {
|
||
t.current && t.current(i);
|
||
});
|
||
return t.current = e, n.current;
|
||
}
|
||
var gf = function(e, t, n) {
|
||
return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e < t ? t : e;
|
||
}, vh = function(e) {
|
||
return "touches" in e;
|
||
}, Vx = function(e) {
|
||
return e && e.ownerDocument.defaultView || self;
|
||
}, ZE = function(e, t, n) {
|
||
var i = e.getBoundingClientRect(), o = vh(t) ? function(l, f) {
|
||
for (var h = 0; h < l.length; h++)
|
||
if (l[h].identifier === f)
|
||
return l[h];
|
||
return l[0];
|
||
}(t.touches, n) : t;
|
||
return { left: gf((o.pageX - (i.left + Vx(e).pageXOffset)) / i.width), top: gf((o.pageY - (i.top + Vx(e).pageYOffset)) / i.height) };
|
||
}, JE = function(e) {
|
||
!vh(e) && e.preventDefault();
|
||
}, Hb = pt.memo(function(e) {
|
||
var t = e.onMove, n = e.onKey, i = rM(e, ["onMove", "onKey"]), o = He(null), l = Hx(t), f = Hx(n), h = He(null), y = He(!1), m = an(function() {
|
||
var j = function(k) {
|
||
JE(k), (vh(k) ? k.touches.length > 0 : k.buttons > 0) && o.current ? l(ZE(o.current, k, h.current)) : R(!1);
|
||
}, M = function() {
|
||
return R(!1);
|
||
};
|
||
function R(k) {
|
||
var A = y.current, L = Vx(o.current), z = k ? L.addEventListener : L.removeEventListener;
|
||
z(A ? "touchmove" : "mousemove", j), z(A ? "touchend" : "mouseup", M);
|
||
}
|
||
return [function(k) {
|
||
var A = k.nativeEvent, L = o.current;
|
||
if (L && (JE(A), !function(I, _) {
|
||
return _ && !vh(I);
|
||
}(A, y.current) && L)) {
|
||
if (vh(A)) {
|
||
y.current = !0;
|
||
var z = A.changedTouches || [];
|
||
z.length && (h.current = z[0].identifier);
|
||
}
|
||
L.focus(), l(ZE(L, A, h.current)), R(!0);
|
||
}
|
||
}, function(k) {
|
||
var A = k.which || k.keyCode;
|
||
A < 37 || A > 40 || (k.preventDefault(), f({ left: A === 39 ? 0.05 : A === 37 ? -0.05 : 0, top: A === 40 ? 0.05 : A === 38 ? -0.05 : 0 }));
|
||
}, R];
|
||
}, [f, l]), x = m[0], b = m[1], E = m[2];
|
||
return rt(function() {
|
||
return E;
|
||
}, [E]), pt.createElement("div", T0({}, i, { onTouchStart: x, onMouseDown: x, className: "react-colorful__interactive", ref: o, onKeyDown: b, tabIndex: 0, role: "slider" }));
|
||
}), D0 = function(e) {
|
||
return e.filter(Boolean).join(" ");
|
||
}, Vb = function(e) {
|
||
var t = e.color, n = e.left, i = e.top, o = i === void 0 ? 0.5 : i, l = D0(["react-colorful__pointer", e.className]);
|
||
return pt.createElement("div", { className: l, style: { top: 100 * o + "%", left: 100 * n + "%" } }, pt.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t } }));
|
||
}, Ha = function(e, t, n) {
|
||
return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n;
|
||
}, aM = function(e) {
|
||
var t = e.s, n = e.v, i = e.a, o = (200 - t) * n / 100;
|
||
return { h: Ha(e.h), s: Ha(o > 0 && o < 200 ? t * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: Ha(o / 2), a: Ha(i, 2) };
|
||
}, Wx = function(e) {
|
||
var t = aM(e);
|
||
return "hsl(" + t.h + ", " + t.s + "%, " + t.l + "%)";
|
||
}, q2 = function(e) {
|
||
var t = aM(e);
|
||
return "hsla(" + t.h + ", " + t.s + "%, " + t.l + "%, " + t.a + ")";
|
||
}, xG = function(e) {
|
||
var t = e.h, n = e.s, i = e.v, o = e.a;
|
||
t = t / 360 * 6, n /= 100, i /= 100;
|
||
var l = Math.floor(t), f = i * (1 - n), h = i * (1 - (t - l) * n), y = i * (1 - (1 - t + l) * n), m = l % 6;
|
||
return { r: Ha(255 * [i, h, f, f, y, i][m]), g: Ha(255 * [y, i, i, h, f, f][m]), b: Ha(255 * [f, f, y, i, i, h][m]), a: Ha(o, 2) };
|
||
}, SG = function(e) {
|
||
var t = e.r, n = e.g, i = e.b, o = e.a, l = Math.max(t, n, i), f = l - Math.min(t, n, i), h = f ? l === t ? (n - i) / f : l === n ? 2 + (i - t) / f : 4 + (t - n) / f : 0;
|
||
return { h: Ha(60 * (h < 0 ? h + 6 : h)), s: Ha(l ? f / l * 100 : 0), v: Ha(l / 255 * 100), a: o };
|
||
}, bG = pt.memo(function(e) {
|
||
var t = e.hue, n = e.onChange, i = D0(["react-colorful__hue", e.className]);
|
||
return pt.createElement("div", { className: i }, pt.createElement(Hb, { onMove: function(o) {
|
||
n({ h: 360 * o.left });
|
||
}, onKey: function(o) {
|
||
n({ h: gf(t + 360 * o.left, 0, 360) });
|
||
}, "aria-label": "Hue", "aria-valuenow": Ha(t), "aria-valuemax": "360", "aria-valuemin": "0" }, pt.createElement(Vb, { className: "react-colorful__hue-pointer", left: t / 360, color: Wx({ h: t, s: 100, v: 100, a: 1 }) })));
|
||
}), CG = pt.memo(function(e) {
|
||
var t = e.hsva, n = e.onChange, i = { backgroundColor: Wx({ h: t.h, s: 100, v: 100, a: 1 }) };
|
||
return pt.createElement("div", { className: "react-colorful__saturation", style: i }, pt.createElement(Hb, { onMove: function(o) {
|
||
n({ s: 100 * o.left, v: 100 - 100 * o.top });
|
||
}, onKey: function(o) {
|
||
n({ s: gf(t.s + 100 * o.left, 0, 100), v: gf(t.v - 100 * o.top, 0, 100) });
|
||
}, "aria-label": "Color", "aria-valuetext": "Saturation " + Ha(t.s) + "%, Brightness " + Ha(t.v) + "%" }, pt.createElement(Vb, { className: "react-colorful__saturation-pointer", top: 1 - t.v / 100, left: t.s / 100, color: Wx(t) })));
|
||
}), iM = function(e, t) {
|
||
if (e === t)
|
||
return !0;
|
||
for (var n in e)
|
||
if (e[n] !== t[n])
|
||
return !1;
|
||
return !0;
|
||
};
|
||
function wG(e, t, n) {
|
||
var i = Hx(n), o = qe(function() {
|
||
return e.toHsva(t);
|
||
}), l = o[0], f = o[1], h = He({ color: t, hsva: l });
|
||
rt(function() {
|
||
if (!e.equal(t, h.current.color)) {
|
||
var m = e.toHsva(t);
|
||
h.current = { hsva: m, color: t }, f(m);
|
||
}
|
||
}, [t, e]), rt(function() {
|
||
var m;
|
||
iM(l, h.current.hsva) || e.equal(m = e.fromHsva(l), h.current.color) || (h.current = { hsva: l, color: m }, i(m));
|
||
}, [l, e, i]);
|
||
var y = Q(function(m) {
|
||
f(function(x) {
|
||
return Object.assign({}, x, m);
|
||
});
|
||
}, []);
|
||
return [l, y];
|
||
}
|
||
var EG = typeof window < "u" ? bo : rt, jG = function() {
|
||
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
|
||
}, $E = /* @__PURE__ */ new Map(), TG = function(e) {
|
||
EG(function() {
|
||
var t = e.current ? e.current.ownerDocument : document;
|
||
if (t !== void 0 && !$E.has(t)) {
|
||
var n = t.createElement("style");
|
||
n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, $E.set(t, n);
|
||
var i = jG();
|
||
i && n.setAttribute("nonce", i), t.head.appendChild(n);
|
||
}
|
||
}, []);
|
||
}, DG = function(e) {
|
||
var t = e.className, n = e.hsva, i = e.onChange, o = { backgroundImage: "linear-gradient(90deg, " + q2(Object.assign({}, n, { a: 0 })) + ", " + q2(Object.assign({}, n, { a: 1 })) + ")" }, l = D0(["react-colorful__alpha", t]), f = Ha(100 * n.a);
|
||
return pt.createElement("div", { className: l }, pt.createElement("div", { className: "react-colorful__alpha-gradient", style: o }), pt.createElement(Hb, { onMove: function(h) {
|
||
i({ a: h.left });
|
||
}, onKey: function(h) {
|
||
i({ a: gf(n.a + h.left) });
|
||
}, "aria-label": "Alpha", "aria-valuetext": f + "%", "aria-valuenow": f, "aria-valuemin": "0", "aria-valuemax": "100" }, pt.createElement(Vb, { className: "react-colorful__alpha-pointer", left: n.a, color: q2(n) })));
|
||
}, MG = function(e) {
|
||
var t = e.className, n = e.colorModel, i = e.color, o = i === void 0 ? n.defaultColor : i, l = e.onChange, f = rM(e, ["className", "colorModel", "color", "onChange"]), h = He(null);
|
||
TG(h);
|
||
var y = wG(n, o, l), m = y[0], x = y[1], b = D0(["react-colorful", t]);
|
||
return pt.createElement("div", T0({}, f, { ref: h, className: b }), pt.createElement(CG, { hsva: m, onChange: x }), pt.createElement(bG, { hue: m.h, onChange: x }), pt.createElement(DG, { hsva: m, onChange: x, className: "react-colorful__last-control" }));
|
||
}, RG = { defaultColor: { r: 0, g: 0, b: 0, a: 1 }, toHsva: SG, fromHsva: xG, equal: iM }, kG = function(e) {
|
||
return pt.createElement(MG, T0({}, e, { colorModel: RG }));
|
||
};
|
||
const PG = Be(kG, {
|
||
baseStyle: { paddingInline: 4 },
|
||
shouldForwardProp: (e) => !["pickerColor"].includes(e)
|
||
}), Y2 = {
|
||
width: 6,
|
||
height: 6,
|
||
borderColor: "base.100"
|
||
}, Xg = (e) => {
|
||
const { styleClass: t = "", ...n } = e;
|
||
return /* @__PURE__ */ c.jsx(
|
||
PG,
|
||
{
|
||
sx: {
|
||
".react-colorful__hue-pointer": Y2,
|
||
".react-colorful__saturation-pointer": Y2,
|
||
".react-colorful__alpha-pointer": Y2
|
||
},
|
||
className: t,
|
||
...n
|
||
}
|
||
);
|
||
}, OG = ct(
|
||
[cn, ir],
|
||
(e, t) => {
|
||
const { brushColor: n, maskColor: i, layer: o } = e;
|
||
return {
|
||
brushColor: n,
|
||
maskColor: i,
|
||
layer: o,
|
||
isStaging: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function AG() {
|
||
const e = je(), { brushColor: t, maskColor: n, layer: i, isStaging: o } = Z(OG), l = () => {
|
||
if (i === "base")
|
||
return `rgba(${t.r},${t.g},${t.b},${t.a})`;
|
||
if (i === "mask")
|
||
return `rgba(${n.r},${n.g},${n.b},${n.a})`;
|
||
};
|
||
return Ze(
|
||
["shift+BracketLeft"],
|
||
() => {
|
||
e(
|
||
af({
|
||
...t,
|
||
a: Ie.clamp(t.a - 0.05, 0.05, 1)
|
||
})
|
||
);
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), Ze(
|
||
["shift+BracketRight"],
|
||
() => {
|
||
e(
|
||
af({
|
||
...t,
|
||
a: Ie.clamp(t.a + 0.05, 0.05, 1)
|
||
})
|
||
);
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
width: 7,
|
||
height: 7,
|
||
minWidth: 7,
|
||
minHeight: 7,
|
||
borderRadius: "full",
|
||
bg: l(),
|
||
cursor: "pointer"
|
||
}
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { minWidth: 60, direction: "column", gap: 4, width: "100%", children: [
|
||
i === "base" && /* @__PURE__ */ c.jsx(
|
||
Xg,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
paddingTop: 2,
|
||
paddingBottom: 2
|
||
},
|
||
pickerColor: t,
|
||
onChange: (f) => e(af(f))
|
||
}
|
||
),
|
||
i === "mask" && /* @__PURE__ */ c.jsx(
|
||
Xg,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
paddingTop: 2,
|
||
paddingBottom: 2
|
||
},
|
||
pickerColor: n,
|
||
onChange: (f) => e(k6(f))
|
||
}
|
||
)
|
||
] })
|
||
}
|
||
);
|
||
}
|
||
function oM() {
|
||
return /* @__PURE__ */ c.jsxs(ce, { columnGap: 4, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsx(yG, {}),
|
||
/* @__PURE__ */ c.jsx(AG, {})
|
||
] });
|
||
}
|
||
function NG() {
|
||
const e = je(), t = Z(
|
||
(i) => i.canvas.shouldRestrictStrokesToBox
|
||
), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("unifiedCanvas.betaLimitToBox"),
|
||
isChecked: t,
|
||
onChange: (i) => e(P6(i.target.checked))
|
||
}
|
||
);
|
||
}
|
||
function zG() {
|
||
return /* @__PURE__ */ c.jsxs(ce, { gap: 4, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsx(oM, {}),
|
||
/* @__PURE__ */ c.jsx(NG, {})
|
||
] });
|
||
}
|
||
function IG() {
|
||
const e = je(), { t } = Pe(), n = () => e(aS());
|
||
return /* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
leftIcon: /* @__PURE__ */ c.jsx(mc, {}),
|
||
onClick: n,
|
||
tooltip: `${t("unifiedCanvas.clearMask")} (Shift+C)`,
|
||
children: t("unifiedCanvas.betaClear")
|
||
}
|
||
);
|
||
}
|
||
function LG() {
|
||
const e = Z(
|
||
(o) => o.canvas.isMaskEnabled
|
||
), t = je(), { t: n } = Pe(), i = () => t(Ah(!e));
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: `${n("unifiedCanvas.enableMask")} (H)`,
|
||
isChecked: e,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
function FG() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(i) => i.canvas.shouldPreserveMaskedArea
|
||
);
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.betaPreserveMasked"),
|
||
isChecked: n,
|
||
onChange: (i) => e(O6(i.target.checked))
|
||
}
|
||
);
|
||
}
|
||
function BG() {
|
||
return /* @__PURE__ */ c.jsxs(ce, { gap: 4, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsx(oM, {}),
|
||
/* @__PURE__ */ c.jsx(LG, {}),
|
||
/* @__PURE__ */ c.jsx(FG, {}),
|
||
/* @__PURE__ */ c.jsx(IG, {})
|
||
] });
|
||
}
|
||
function _G() {
|
||
const e = Z(
|
||
(i) => i.canvas.shouldDarkenOutsideBoundingBox
|
||
), t = je(), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("unifiedCanvas.betaDarkenOutside"),
|
||
isChecked: e,
|
||
onChange: (i) => t(A6(i.target.checked))
|
||
}
|
||
);
|
||
}
|
||
function UG() {
|
||
const e = Z(
|
||
(i) => i.canvas.shouldShowGrid
|
||
), t = je(), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: n("unifiedCanvas.showGrid"),
|
||
isChecked: e,
|
||
onChange: (i) => t(N6(i.target.checked))
|
||
}
|
||
);
|
||
}
|
||
function HG() {
|
||
const e = Z(
|
||
(o) => o.canvas.shouldSnapToGrid
|
||
), t = je(), { t: n } = Pe(), i = (o) => t(Ng(o.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: `${n("unifiedCanvas.snapToGrid")} (N)`,
|
||
isChecked: e,
|
||
onChange: i
|
||
}
|
||
);
|
||
}
|
||
function VG() {
|
||
return /* @__PURE__ */ c.jsxs(ce, { alignItems: "center", gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(UG, {}),
|
||
/* @__PURE__ */ c.jsx(HG, {}),
|
||
/* @__PURE__ */ c.jsx(_G, {})
|
||
] });
|
||
}
|
||
const WG = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { tool: t, layer: n } = e;
|
||
return {
|
||
tool: t,
|
||
layer: n
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function GG() {
|
||
const { tool: e, layer: t } = Z(WG);
|
||
return /* @__PURE__ */ c.jsxs(ce, { height: 8, minHeight: 8, maxHeight: 8, alignItems: "center", children: [
|
||
t == "base" && ["brush", "eraser", "colorPicker"].includes(e) && /* @__PURE__ */ c.jsx(zG, {}),
|
||
t == "mask" && ["brush", "eraser", "colorPicker"].includes(e) && /* @__PURE__ */ c.jsx(BG, {}),
|
||
e == "move" && /* @__PURE__ */ c.jsx(VG, {})
|
||
] });
|
||
}
|
||
const qG = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { doesCanvasNeedScaling: t } = e;
|
||
return {
|
||
doesCanvasNeedScaling: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), YG = () => {
|
||
const e = je(), { doesCanvasNeedScaling: t } = Z(qG);
|
||
return bo(() => {
|
||
e(ca(!0));
|
||
const n = Ie.debounce(() => {
|
||
e(ca(!0));
|
||
}, 250);
|
||
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
||
}, [e]), /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
borderRadius: "base",
|
||
bg: "base.850"
|
||
},
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
flexDirection: "row",
|
||
width: "100%",
|
||
height: "100%",
|
||
columnGap: 4,
|
||
padding: 4,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(gG, {}),
|
||
/* @__PURE__ */ c.jsxs(ce, { width: "100%", height: "100%", flexDirection: "column", rowGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(GG, {}),
|
||
t ? /* @__PURE__ */ c.jsx(ZD, {}) : /* @__PURE__ */ c.jsx(KD, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, QG = ct(
|
||
[cn, ir],
|
||
(e, t) => {
|
||
const { maskColor: n, layer: i, isMaskEnabled: o, shouldPreserveMaskedArea: l } = e;
|
||
return {
|
||
layer: i,
|
||
maskColor: n,
|
||
maskColorString: ac(n),
|
||
isMaskEnabled: o,
|
||
shouldPreserveMaskedArea: l,
|
||
isStaging: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), XG = () => {
|
||
const e = je(), { t } = Pe(), {
|
||
layer: n,
|
||
maskColor: i,
|
||
isMaskEnabled: o,
|
||
shouldPreserveMaskedArea: l,
|
||
isStaging: f
|
||
} = Z(QG);
|
||
Ze(
|
||
["q"],
|
||
() => {
|
||
h();
|
||
},
|
||
{
|
||
enabled: () => !f,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
), Ze(
|
||
["shift+c"],
|
||
() => {
|
||
y();
|
||
},
|
||
{
|
||
enabled: () => !f,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
), Ze(
|
||
["h"],
|
||
() => {
|
||
m();
|
||
},
|
||
{
|
||
enabled: () => !f,
|
||
preventDefault: !0
|
||
},
|
||
[o]
|
||
);
|
||
const h = () => {
|
||
e(zg(n === "mask" ? "base" : "mask"));
|
||
}, y = () => e(aS()), m = () => e(Ah(!o));
|
||
return /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(Jr, { children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("unifiedCanvas.maskingOptions"),
|
||
tooltip: t("unifiedCanvas.maskingOptions"),
|
||
icon: /* @__PURE__ */ c.jsx(UB, {}),
|
||
isChecked: n === "mask",
|
||
isDisabled: f
|
||
}
|
||
) }),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { direction: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: `${t("unifiedCanvas.enableMask")} (H)`,
|
||
isChecked: o,
|
||
onChange: m
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.preserveMaskedArea"),
|
||
isChecked: l,
|
||
onChange: (x) => e(O6(x.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Xg,
|
||
{
|
||
sx: { paddingTop: 2, paddingBottom: 2 },
|
||
pickerColor: i,
|
||
onChange: (x) => e(k6(x))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(un, { size: "sm", leftIcon: /* @__PURE__ */ c.jsx(mc, {}), onClick: y, children: [
|
||
t("unifiedCanvas.clearMask"),
|
||
" (Shift+C)"
|
||
] })
|
||
] })
|
||
}
|
||
);
|
||
}, KG = ct(
|
||
[cn],
|
||
(e) => {
|
||
const {
|
||
shouldAutoSave: t,
|
||
shouldCropToBoundingBoxOnSave: n,
|
||
shouldDarkenOutsideBoundingBox: i,
|
||
shouldShowCanvasDebugInfo: o,
|
||
shouldShowGrid: l,
|
||
shouldShowIntermediates: f,
|
||
shouldSnapToGrid: h,
|
||
shouldRestrictStrokesToBox: y
|
||
} = e;
|
||
return {
|
||
shouldAutoSave: t,
|
||
shouldCropToBoundingBoxOnSave: n,
|
||
shouldDarkenOutsideBoundingBox: i,
|
||
shouldShowCanvasDebugInfo: o,
|
||
shouldShowGrid: l,
|
||
shouldShowIntermediates: f,
|
||
shouldSnapToGrid: h,
|
||
shouldRestrictStrokesToBox: y
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), ZG = () => {
|
||
const e = je(), { t } = Pe(), {
|
||
shouldAutoSave: n,
|
||
shouldCropToBoundingBoxOnSave: i,
|
||
shouldDarkenOutsideBoundingBox: o,
|
||
shouldShowCanvasDebugInfo: l,
|
||
shouldShowGrid: f,
|
||
shouldShowIntermediates: h,
|
||
shouldSnapToGrid: y,
|
||
shouldRestrictStrokesToBox: m
|
||
} = Z(KG);
|
||
Ze(
|
||
["n"],
|
||
() => {
|
||
e(Ng(!y));
|
||
},
|
||
{
|
||
enabled: !0,
|
||
preventDefault: !0
|
||
},
|
||
[y]
|
||
);
|
||
const x = (b) => e(Ng(b.target.checked));
|
||
return /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: t("unifiedCanvas.canvasSettings"),
|
||
"aria-label": t("unifiedCanvas.canvasSettings"),
|
||
icon: /* @__PURE__ */ c.jsx(hb, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { direction: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.showIntermediates"),
|
||
isChecked: h,
|
||
onChange: (b) => e(T6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.showGrid"),
|
||
isChecked: f,
|
||
onChange: (b) => e(N6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.snapToGrid"),
|
||
isChecked: y,
|
||
onChange: x
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.darkenOutsideSelection"),
|
||
isChecked: o,
|
||
onChange: (b) => e(A6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.autoSaveToGallery"),
|
||
isChecked: n,
|
||
onChange: (b) => e(D6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.saveBoxRegionOnly"),
|
||
isChecked: i,
|
||
onChange: (b) => e(M6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.limitStrokesToBox"),
|
||
isChecked: m,
|
||
onChange: (b) => e(P6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("unifiedCanvas.showCanvasDebugInfo"),
|
||
isChecked: l,
|
||
onChange: (b) => e(R6(b.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(nM, {}),
|
||
/* @__PURE__ */ c.jsx(tM, {})
|
||
] })
|
||
}
|
||
);
|
||
}, JG = ct(
|
||
[cn, ir, Xn],
|
||
(e, t, n) => {
|
||
const { isProcessing: i } = n, { tool: o, brushColor: l, brushSize: f } = e;
|
||
return {
|
||
tool: o,
|
||
isStaging: t,
|
||
isProcessing: i,
|
||
brushColor: l,
|
||
brushSize: f
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), $G = () => {
|
||
const e = je(), { tool: t, brushColor: n, brushSize: i, isStaging: o } = Z(JG), { t: l } = Pe();
|
||
Ze(
|
||
["b"],
|
||
() => {
|
||
f();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
), Ze(
|
||
["e"],
|
||
() => {
|
||
h();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), Ze(
|
||
["c"],
|
||
() => {
|
||
y();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[t]
|
||
), Ze(
|
||
["shift+f"],
|
||
() => {
|
||
m();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
["delete", "backspace"],
|
||
() => {
|
||
x();
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
}
|
||
), Ze(
|
||
["BracketLeft"],
|
||
() => {
|
||
e(rf(Math.max(i - 5, 5)));
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[i]
|
||
), Ze(
|
||
["BracketRight"],
|
||
() => {
|
||
e(rf(Math.min(i + 5, 500)));
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[i]
|
||
), Ze(
|
||
["shift+BracketLeft"],
|
||
() => {
|
||
e(
|
||
af({
|
||
...n,
|
||
a: Ie.clamp(n.a - 0.05, 0.05, 1)
|
||
})
|
||
);
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
), Ze(
|
||
["shift+BracketRight"],
|
||
() => {
|
||
e(
|
||
af({
|
||
...n,
|
||
a: Ie.clamp(n.a + 0.05, 0.05, 1)
|
||
})
|
||
);
|
||
},
|
||
{
|
||
enabled: () => !o,
|
||
preventDefault: !0
|
||
},
|
||
[n]
|
||
);
|
||
const f = () => e(es("brush")), h = () => e(es("eraser")), y = () => e(es("colorPicker")), m = () => e(w6()), x = () => e(E6());
|
||
return /* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.brush")} (B)`,
|
||
tooltip: `${l("unifiedCanvas.brush")} (B)`,
|
||
icon: /* @__PURE__ */ c.jsx(sD, {}),
|
||
isChecked: t === "brush" && !o,
|
||
onClick: f,
|
||
isDisabled: o
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.eraser")} (E)`,
|
||
tooltip: `${l("unifiedCanvas.eraser")} (E)`,
|
||
icon: /* @__PURE__ */ c.jsx(rD, {}),
|
||
isChecked: t === "eraser" && !o,
|
||
isDisabled: o,
|
||
onClick: h
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.fillBoundingBox")} (Shift+F)`,
|
||
tooltip: `${l("unifiedCanvas.fillBoundingBox")} (Shift+F)`,
|
||
icon: /* @__PURE__ */ c.jsx(iD, {}),
|
||
isDisabled: o,
|
||
onClick: m
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,
|
||
tooltip: `${l("unifiedCanvas.eraseBoundingBox")} (Del/Backspace)`,
|
||
icon: /* @__PURE__ */ c.jsx(Gh, { style: { transform: "rotate(45deg)" } }),
|
||
isDisabled: o,
|
||
onClick: x
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${l("unifiedCanvas.colorPicker")} (C)`,
|
||
tooltip: `${l("unifiedCanvas.colorPicker")} (C)`,
|
||
icon: /* @__PURE__ */ c.jsx(aD, {}),
|
||
isChecked: t === "colorPicker" && !o,
|
||
isDisabled: o,
|
||
onClick: y
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": l("unifiedCanvas.brushOptions"),
|
||
tooltip: l("unifiedCanvas.brushOptions"),
|
||
icon: /* @__PURE__ */ c.jsx(pb, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { minWidth: 60, direction: "column", gap: 4, width: "100%", children: [
|
||
/* @__PURE__ */ c.jsx(ce, { gap: 4, justifyContent: "space-between", children: /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: l("unifiedCanvas.brushSize"),
|
||
value: i,
|
||
withInput: !0,
|
||
onChange: (b) => e(rf(b)),
|
||
sliderNumberInputProps: { max: 500 },
|
||
inputReadOnly: !1
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Xg,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
paddingTop: 2,
|
||
paddingBottom: 2
|
||
},
|
||
pickerColor: n,
|
||
onChange: (b) => e(af(b))
|
||
}
|
||
)
|
||
] })
|
||
}
|
||
)
|
||
] });
|
||
}, eq = ct(
|
||
[Xn, cn, ir],
|
||
(e, t, n) => {
|
||
const { isProcessing: i } = e, { tool: o, shouldCropToBoundingBoxOnSave: l, layer: f, isMaskEnabled: h } = t;
|
||
return {
|
||
isProcessing: i,
|
||
isStaging: n,
|
||
isMaskEnabled: h,
|
||
tool: o,
|
||
layer: f,
|
||
shouldCropToBoundingBoxOnSave: l
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), tq = () => {
|
||
const e = je(), {
|
||
isProcessing: t,
|
||
isStaging: n,
|
||
isMaskEnabled: i,
|
||
layer: o,
|
||
tool: l,
|
||
shouldCropToBoundingBoxOnSave: f
|
||
} = Z(eq), h = ns(), { t: y } = Pe(), { openUploader: m } = ib();
|
||
Ze(
|
||
["v"],
|
||
() => {
|
||
x();
|
||
},
|
||
{
|
||
enabled: () => !n,
|
||
preventDefault: !0
|
||
},
|
||
[]
|
||
), Ze(
|
||
["r"],
|
||
() => {
|
||
E();
|
||
},
|
||
{
|
||
enabled: () => !0,
|
||
preventDefault: !0
|
||
},
|
||
[h]
|
||
), Ze(
|
||
["shift+m"],
|
||
() => {
|
||
M();
|
||
},
|
||
{
|
||
enabled: () => !n,
|
||
preventDefault: !0
|
||
},
|
||
[h, t]
|
||
), Ze(
|
||
["shift+s"],
|
||
() => {
|
||
R();
|
||
},
|
||
{
|
||
enabled: () => !n,
|
||
preventDefault: !0
|
||
},
|
||
[h, t]
|
||
), Ze(
|
||
["meta+c", "ctrl+c"],
|
||
() => {
|
||
k();
|
||
},
|
||
{
|
||
enabled: () => !n,
|
||
preventDefault: !0
|
||
},
|
||
[h, t]
|
||
), Ze(
|
||
["shift+d"],
|
||
() => {
|
||
A();
|
||
},
|
||
{
|
||
enabled: () => !n,
|
||
preventDefault: !0
|
||
},
|
||
[h, t]
|
||
);
|
||
const x = () => e(es("move")), b = eM(
|
||
() => E(!1),
|
||
() => E(!0)
|
||
), E = (z = !1) => {
|
||
const I = ns();
|
||
if (!I)
|
||
return;
|
||
const _ = I.getClientRect({
|
||
skipTransform: !0
|
||
});
|
||
e(
|
||
C6({
|
||
contentRect: _,
|
||
shouldScaleTo1: z
|
||
})
|
||
);
|
||
}, j = () => {
|
||
e(iS()), e(n0());
|
||
}, M = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !1,
|
||
shouldSetAsInitialImage: !0
|
||
})
|
||
);
|
||
}, R = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !f,
|
||
cropToBoundingBox: f,
|
||
shouldSaveToGallery: !0
|
||
})
|
||
);
|
||
}, k = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !f,
|
||
cropToBoundingBox: f,
|
||
shouldCopy: !0
|
||
})
|
||
);
|
||
}, A = () => {
|
||
e(
|
||
Ul({
|
||
cropVisible: !f,
|
||
cropToBoundingBox: f,
|
||
shouldDownload: !0
|
||
})
|
||
);
|
||
}, L = (z) => {
|
||
const I = z.target.value;
|
||
e(zg(I)), I === "mask" && !i && e(Ah(!0));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
alignItems: "center",
|
||
gap: 2
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
tooltip: `${y("unifiedCanvas.layer")} (Q)`,
|
||
tooltipProps: { hasArrow: !0, placement: "top" },
|
||
value: o,
|
||
validValues: b6,
|
||
onChange: L,
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(XG, {}),
|
||
/* @__PURE__ */ c.jsx($G, {}),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.move")} (V)`,
|
||
tooltip: `${y("unifiedCanvas.move")} (V)`,
|
||
icon: /* @__PURE__ */ c.jsx(eD, {}),
|
||
isChecked: l === "move" || n,
|
||
onClick: x
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.resetView")} (R)`,
|
||
tooltip: `${y("unifiedCanvas.resetView")} (R)`,
|
||
icon: /* @__PURE__ */ c.jsx(nD, {}),
|
||
onClick: b
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.mergeVisible")} (Shift+M)`,
|
||
tooltip: `${y("unifiedCanvas.mergeVisible")} (Shift+M)`,
|
||
icon: /* @__PURE__ */ c.jsx(oD, {}),
|
||
onClick: M,
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.saveToGallery")} (Shift+S)`,
|
||
tooltip: `${y("unifiedCanvas.saveToGallery")} (Shift+S)`,
|
||
icon: /* @__PURE__ */ c.jsx(fb, {}),
|
||
onClick: R,
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,
|
||
tooltip: `${y("unifiedCanvas.copyToClipboard")} (Cmd/Ctrl+C)`,
|
||
icon: /* @__PURE__ */ c.jsx(vf, {}),
|
||
onClick: k,
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.downloadAsImage")} (Shift+D)`,
|
||
tooltip: `${y("unifiedCanvas.downloadAsImage")} (Shift+D)`,
|
||
icon: /* @__PURE__ */ c.jsx(db, {}),
|
||
onClick: A,
|
||
isDisabled: n
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx($D, {}),
|
||
/* @__PURE__ */ c.jsx(JD, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jr, { isAttached: !0, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("common.upload")}`,
|
||
tooltip: `${y("common.upload")}`,
|
||
icon: /* @__PURE__ */ c.jsx(x0, {}),
|
||
onClick: m,
|
||
isDisabled: n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": `${y("unifiedCanvas.clearCanvas")}`,
|
||
tooltip: `${y("unifiedCanvas.clearCanvas")}`,
|
||
icon: /* @__PURE__ */ c.jsx(mc, {}),
|
||
onClick: j,
|
||
colorScheme: "error",
|
||
isDisabled: n
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(Jr, { isAttached: !0, children: /* @__PURE__ */ c.jsx(ZG, {}) })
|
||
]
|
||
}
|
||
);
|
||
}, nq = ct(
|
||
[cn],
|
||
(e) => {
|
||
const { doesCanvasNeedScaling: t } = e;
|
||
return {
|
||
doesCanvasNeedScaling: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), rq = () => {
|
||
const e = je(), { doesCanvasNeedScaling: t } = Z(nq);
|
||
return bo(() => {
|
||
e(ca(!0));
|
||
const n = Ie.debounce(() => {
|
||
e(ca(!0));
|
||
}, 250);
|
||
return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
||
}, [e]), /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
height: "100%",
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
bg: "base.850"
|
||
},
|
||
children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
gap: 4,
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(tq, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
gap: 4,
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
children: t ? /* @__PURE__ */ c.jsx(ZD, {}) : /* @__PURE__ */ c.jsx(KD, {})
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, aq = ct(
|
||
cn,
|
||
(e) => {
|
||
const { boundingBoxDimensions: t, boundingBoxScaleMethod: n } = e;
|
||
return {
|
||
boundingBoxDimensions: t,
|
||
boundingBoxScale: n
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), iq = () => {
|
||
const e = je(), { boundingBoxDimensions: t } = Z(aq), { t: n } = Pe(), i = (h) => {
|
||
e(
|
||
lh({
|
||
...t,
|
||
width: Math.floor(h)
|
||
})
|
||
);
|
||
}, o = (h) => {
|
||
e(
|
||
lh({
|
||
...t,
|
||
height: Math.floor(h)
|
||
})
|
||
);
|
||
}, l = () => {
|
||
e(
|
||
lh({
|
||
...t,
|
||
width: Math.floor(512)
|
||
})
|
||
);
|
||
}, f = () => {
|
||
e(
|
||
lh({
|
||
...t,
|
||
height: Math.floor(512)
|
||
})
|
||
);
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.width"),
|
||
min: 64,
|
||
max: 1024,
|
||
step: 64,
|
||
value: t.width,
|
||
onChange: i,
|
||
sliderNumberInputProps: { max: 4096 },
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
inputReadOnly: !0,
|
||
withReset: !0,
|
||
handleReset: l
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.height"),
|
||
min: 64,
|
||
max: 1024,
|
||
step: 64,
|
||
value: t.height,
|
||
onChange: o,
|
||
sliderNumberInputProps: { max: 4096 },
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
inputReadOnly: !0,
|
||
withReset: !0,
|
||
handleReset: f
|
||
}
|
||
)
|
||
] });
|
||
}, oq = ct(
|
||
[Eb, Xn, cn],
|
||
(e, t, n) => {
|
||
const { tileSize: i, infillMethod: o } = e, { infill_methods: l } = t, {
|
||
boundingBoxScaleMethod: f,
|
||
scaledBoundingBoxDimensions: h
|
||
} = n;
|
||
return {
|
||
boundingBoxScale: f,
|
||
scaledBoundingBoxDimensions: h,
|
||
tileSize: i,
|
||
infillMethod: o,
|
||
availableInfillMethods: l,
|
||
isManual: f === "manual"
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), sq = () => {
|
||
const e = je(), {
|
||
tileSize: t,
|
||
infillMethod: n,
|
||
availableInfillMethods: i,
|
||
boundingBoxScale: o,
|
||
isManual: l,
|
||
scaledBoundingBoxDimensions: f
|
||
} = Z(oq), { t: h } = Pe(), y = (j) => {
|
||
e(
|
||
rg({
|
||
...f,
|
||
width: Math.floor(j)
|
||
})
|
||
);
|
||
}, m = (j) => {
|
||
e(
|
||
rg({
|
||
...f,
|
||
height: Math.floor(j)
|
||
})
|
||
);
|
||
}, x = () => {
|
||
e(
|
||
rg({
|
||
...f,
|
||
width: Math.floor(512)
|
||
})
|
||
);
|
||
}, b = () => {
|
||
e(
|
||
rg({
|
||
...f,
|
||
height: Math.floor(512)
|
||
})
|
||
);
|
||
}, E = (j) => {
|
||
e(Yk(j.target.value));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: h("parameters.scaleBeforeProcessing"),
|
||
validValues: Gk,
|
||
value: o,
|
||
onChange: E
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isInputDisabled: !l,
|
||
isResetDisabled: !l,
|
||
isSliderDisabled: !l,
|
||
label: h("parameters.scaledWidth"),
|
||
min: 64,
|
||
max: 1024,
|
||
step: 64,
|
||
value: f.width,
|
||
onChange: y,
|
||
sliderNumberInputProps: { max: 4096 },
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
inputReadOnly: !0,
|
||
withReset: !0,
|
||
handleReset: x
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isInputDisabled: !l,
|
||
isResetDisabled: !l,
|
||
isSliderDisabled: !l,
|
||
label: h("parameters.scaledHeight"),
|
||
min: 64,
|
||
max: 1024,
|
||
step: 64,
|
||
value: f.height,
|
||
onChange: m,
|
||
sliderNumberInputProps: { max: 4096 },
|
||
withSliderMarks: !0,
|
||
withInput: !0,
|
||
inputReadOnly: !0,
|
||
withReset: !0,
|
||
handleReset: b
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: h("parameters.infillMethod"),
|
||
value: n,
|
||
validValues: i,
|
||
onChange: (j) => e(qk(j.target.value))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
isInputDisabled: n !== "tile",
|
||
isResetDisabled: n !== "tile",
|
||
isSliderDisabled: n !== "tile",
|
||
label: h("parameters.tileSize"),
|
||
min: 16,
|
||
max: 64,
|
||
sliderNumberInputProps: { max: 256 },
|
||
value: t,
|
||
onChange: (j) => {
|
||
e($3(j));
|
||
},
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => {
|
||
e($3(32));
|
||
}
|
||
}
|
||
)
|
||
] });
|
||
};
|
||
function lq() {
|
||
const e = je(), t = Z(
|
||
(i) => i.generation.seamBlur
|
||
), { t: n } = Pe();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: n("parameters.seamBlur"),
|
||
min: 0,
|
||
max: 64,
|
||
sliderNumberInputProps: { max: 512 },
|
||
value: t,
|
||
onChange: (i) => {
|
||
e(ew(i));
|
||
},
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => {
|
||
e(ew(16));
|
||
}
|
||
}
|
||
);
|
||
}
|
||
function uq() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(i) => i.generation.seamSize
|
||
);
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: t("parameters.seamSize"),
|
||
min: 1,
|
||
max: 256,
|
||
sliderNumberInputProps: { max: 512 },
|
||
value: n,
|
||
onChange: (i) => {
|
||
e(tw(i));
|
||
},
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => e(tw(96))
|
||
}
|
||
);
|
||
}
|
||
function cq() {
|
||
const { t: e } = Pe(), t = Z(
|
||
(i) => i.generation.seamSteps
|
||
), n = je();
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: e("parameters.seamSteps"),
|
||
min: 1,
|
||
max: 100,
|
||
sliderNumberInputProps: { max: 999 },
|
||
value: t,
|
||
onChange: (i) => {
|
||
n(nw(i));
|
||
},
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => {
|
||
n(nw(30));
|
||
}
|
||
}
|
||
);
|
||
}
|
||
function dq() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(i) => i.generation.seamStrength
|
||
);
|
||
return /* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: t("parameters.seamStrength"),
|
||
min: 0.01,
|
||
max: 0.99,
|
||
step: 0.01,
|
||
value: n,
|
||
onChange: (i) => {
|
||
e(rw(i));
|
||
},
|
||
withInput: !0,
|
||
withSliderMarks: !0,
|
||
withReset: !0,
|
||
handleReset: () => {
|
||
e(rw(0.7));
|
||
}
|
||
}
|
||
);
|
||
}
|
||
const fq = () => /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "stretch", children: [
|
||
/* @__PURE__ */ c.jsx(uq, {}),
|
||
/* @__PURE__ */ c.jsx(lq, {}),
|
||
/* @__PURE__ */ c.jsx(dq, {}),
|
||
/* @__PURE__ */ c.jsx(cq, {})
|
||
] });
|
||
function pq() {
|
||
const { t: e } = Pe(), t = {
|
||
general: {
|
||
header: `${e("parameters.general")}`,
|
||
feature: void 0,
|
||
content: /* @__PURE__ */ c.jsx(Ab, {})
|
||
},
|
||
unifiedCanvasImg2Img: {
|
||
header: `${e("parameters.imageToImage")}`,
|
||
feature: void 0,
|
||
content: /* @__PURE__ */ c.jsx(UD, { label: e("parameters.img2imgStrength") })
|
||
},
|
||
seed: {
|
||
header: `${e("parameters.seed")}`,
|
||
feature: Ta.SEED,
|
||
content: /* @__PURE__ */ c.jsx(kb, {})
|
||
},
|
||
boundingBox: {
|
||
header: `${e("parameters.boundingBoxHeader")}`,
|
||
feature: Ta.BOUNDING_BOX,
|
||
content: /* @__PURE__ */ c.jsx(iq, {})
|
||
},
|
||
seamCorrection: {
|
||
header: `${e("parameters.seamCorrectionHeader")}`,
|
||
feature: Ta.SEAM_CORRECTION,
|
||
content: /* @__PURE__ */ c.jsx(fq, {})
|
||
},
|
||
infillAndScaling: {
|
||
header: `${e("parameters.infillScalingHeader")}`,
|
||
feature: Ta.INFILL_AND_SCALING,
|
||
content: /* @__PURE__ */ c.jsx(sq, {})
|
||
},
|
||
variations: {
|
||
header: `${e("parameters.variations")}`,
|
||
feature: Ta.VARIATIONS,
|
||
content: /* @__PURE__ */ c.jsx(Ob, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Pb, {})
|
||
},
|
||
symmetry: {
|
||
header: `${e("parameters.symmetry")}`,
|
||
content: /* @__PURE__ */ c.jsx(Mb, {}),
|
||
additionalHeaderComponents: /* @__PURE__ */ c.jsx(Rb, {})
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(Fb, { children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { flexDir: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(Lb, {}),
|
||
/* @__PURE__ */ c.jsx(Ib, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(zb, {}),
|
||
/* @__PURE__ */ c.jsx(Nb, { accordionInfo: t })
|
||
] });
|
||
}
|
||
function hq() {
|
||
const e = Z(
|
||
(t) => t.ui.shouldUseCanvasBetaLayout
|
||
);
|
||
return /* @__PURE__ */ c.jsx(Db, { optionsPanel: /* @__PURE__ */ c.jsx(pq, {}), children: e ? /* @__PURE__ */ c.jsx(YG, {}) : /* @__PURE__ */ c.jsx(rq, {}) });
|
||
}
|
||
const xi = {
|
||
txt2img: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: v_, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(KH, {}),
|
||
tooltip: "Text To Image"
|
||
},
|
||
img2img: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: mb, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(VH, {}),
|
||
tooltip: "Image To Image"
|
||
},
|
||
unifiedCanvas: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: y_, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(hq, {}),
|
||
tooltip: "Unified Canvas"
|
||
},
|
||
nodes: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: m_, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(WF, {}),
|
||
tooltip: "Nodes"
|
||
},
|
||
postprocess: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: x_, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(GF, {}),
|
||
tooltip: "Post Processing"
|
||
},
|
||
training: {
|
||
title: /* @__PURE__ */ c.jsx(Zr, { as: g_, boxSize: 6 }),
|
||
workarea: /* @__PURE__ */ c.jsx(qF, {}),
|
||
tooltip: "Training"
|
||
}
|
||
};
|
||
function vq() {
|
||
xi.txt2img.tooltip = go.t("common.text2img"), xi.img2img.tooltip = go.t("common.img2img"), xi.unifiedCanvas.tooltip = go.t("common.unifiedCanvas"), xi.nodes.tooltip = go.t("common.nodes"), xi.postprocess.tooltip = go.t("common.postProcessing"), xi.training.tooltip = go.t("common.training");
|
||
}
|
||
function mq() {
|
||
const e = Z(VF), t = Z(
|
||
(m) => m.lightbox.isLightboxOpen
|
||
), {
|
||
shouldShowGallery: n,
|
||
shouldShowParametersPanel: i,
|
||
shouldPinGallery: o,
|
||
shouldPinParametersPanel: l
|
||
} = Z(Tb);
|
||
YF(vq);
|
||
const f = je();
|
||
Ze("1", () => {
|
||
f(ei(0));
|
||
}), Ze("2", () => {
|
||
f(ei(1));
|
||
}), Ze("3", () => {
|
||
f(ei(2));
|
||
}), Ze("4", () => {
|
||
f(ei(3));
|
||
}), Ze("5", () => {
|
||
f(ei(4));
|
||
}), Ze("6", () => {
|
||
f(ei(5));
|
||
}), Ze(
|
||
"z",
|
||
() => {
|
||
f(Ku(!t));
|
||
},
|
||
[t]
|
||
), Ze(
|
||
"f",
|
||
() => {
|
||
n || i ? (f(Zu(!1)), f(Qu(!1))) : (f(Zu(!0)), f(Qu(!0))), (o || l) && setTimeout(() => f(ca(!0)), 400);
|
||
},
|
||
[n, i]
|
||
);
|
||
const h = () => {
|
||
const m = [];
|
||
return Object.keys(xi).forEach((x) => {
|
||
m.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
hasArrow: !0,
|
||
label: xi[x].tooltip,
|
||
placement: "end",
|
||
children: /* @__PURE__ */ c.jsxs(WT, { children: [
|
||
/* @__PURE__ */ c.jsx(K6, { children: xi[x].tooltip }),
|
||
xi[x].title
|
||
] })
|
||
},
|
||
x
|
||
)
|
||
);
|
||
}), m;
|
||
}, y = () => {
|
||
const m = [];
|
||
return Object.keys(xi).forEach((x) => {
|
||
m.push(
|
||
/* @__PURE__ */ c.jsx(HT, { children: xi[x].workarea }, x)
|
||
);
|
||
}), m;
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
_T,
|
||
{
|
||
isLazy: !0,
|
||
defaultIndex: e,
|
||
index: e,
|
||
onChange: (m) => {
|
||
f(ei(m));
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(UT, { children: h() }),
|
||
/* @__PURE__ */ c.jsx(VT, { children: t ? /* @__PURE__ */ c.jsx(sH, {}) : y() })
|
||
]
|
||
}
|
||
);
|
||
}
|
||
var gq = /* @__PURE__ */ new Map([
|
||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
||
["aac", "audio/aac"],
|
||
["abw", "application/x-abiword"],
|
||
["arc", "application/x-freearc"],
|
||
["avif", "image/avif"],
|
||
["avi", "video/x-msvideo"],
|
||
["azw", "application/vnd.amazon.ebook"],
|
||
["bin", "application/octet-stream"],
|
||
["bmp", "image/bmp"],
|
||
["bz", "application/x-bzip"],
|
||
["bz2", "application/x-bzip2"],
|
||
["cda", "application/x-cdf"],
|
||
["csh", "application/x-csh"],
|
||
["css", "text/css"],
|
||
["csv", "text/csv"],
|
||
["doc", "application/msword"],
|
||
["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
||
["eot", "application/vnd.ms-fontobject"],
|
||
["epub", "application/epub+zip"],
|
||
["gz", "application/gzip"],
|
||
["gif", "image/gif"],
|
||
["heic", "image/heic"],
|
||
["heif", "image/heif"],
|
||
["htm", "text/html"],
|
||
["html", "text/html"],
|
||
["ico", "image/vnd.microsoft.icon"],
|
||
["ics", "text/calendar"],
|
||
["jar", "application/java-archive"],
|
||
["jpeg", "image/jpeg"],
|
||
["jpg", "image/jpeg"],
|
||
["js", "text/javascript"],
|
||
["json", "application/json"],
|
||
["jsonld", "application/ld+json"],
|
||
["mid", "audio/midi"],
|
||
["midi", "audio/midi"],
|
||
["mjs", "text/javascript"],
|
||
["mp3", "audio/mpeg"],
|
||
["mp4", "video/mp4"],
|
||
["mpeg", "video/mpeg"],
|
||
["mpkg", "application/vnd.apple.installer+xml"],
|
||
["odp", "application/vnd.oasis.opendocument.presentation"],
|
||
["ods", "application/vnd.oasis.opendocument.spreadsheet"],
|
||
["odt", "application/vnd.oasis.opendocument.text"],
|
||
["oga", "audio/ogg"],
|
||
["ogv", "video/ogg"],
|
||
["ogx", "application/ogg"],
|
||
["opus", "audio/opus"],
|
||
["otf", "font/otf"],
|
||
["png", "image/png"],
|
||
["pdf", "application/pdf"],
|
||
["php", "application/x-httpd-php"],
|
||
["ppt", "application/vnd.ms-powerpoint"],
|
||
["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
||
["rar", "application/vnd.rar"],
|
||
["rtf", "application/rtf"],
|
||
["sh", "application/x-sh"],
|
||
["svg", "image/svg+xml"],
|
||
["swf", "application/x-shockwave-flash"],
|
||
["tar", "application/x-tar"],
|
||
["tif", "image/tiff"],
|
||
["tiff", "image/tiff"],
|
||
["ts", "video/mp2t"],
|
||
["ttf", "font/ttf"],
|
||
["txt", "text/plain"],
|
||
["vsd", "application/vnd.visio"],
|
||
["wav", "audio/wav"],
|
||
["weba", "audio/webm"],
|
||
["webm", "video/webm"],
|
||
["webp", "image/webp"],
|
||
["woff", "font/woff"],
|
||
["woff2", "font/woff2"],
|
||
["xhtml", "application/xhtml+xml"],
|
||
["xls", "application/vnd.ms-excel"],
|
||
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
||
["xml", "application/xml"],
|
||
["xul", "application/vnd.mozilla.xul+xml"],
|
||
["zip", "application/zip"],
|
||
["7z", "application/x-7z-compressed"],
|
||
// Others
|
||
["mkv", "video/x-matroska"],
|
||
["mov", "video/quicktime"],
|
||
["msg", "application/vnd.ms-outlook"]
|
||
]);
|
||
function Yh(e, t) {
|
||
var n = yq(e);
|
||
if (typeof n.path != "string") {
|
||
var i = e.webkitRelativePath;
|
||
Object.defineProperty(n, "path", {
|
||
value: typeof t == "string" ? t : typeof i == "string" && i.length > 0 ? i : e.name,
|
||
writable: !1,
|
||
configurable: !1,
|
||
enumerable: !0
|
||
});
|
||
}
|
||
return n;
|
||
}
|
||
function yq(e) {
|
||
var t = e.name, n = t && t.lastIndexOf(".") !== -1;
|
||
if (n && !e.type) {
|
||
var i = t.split(".").pop().toLowerCase(), o = gq.get(i);
|
||
o && Object.defineProperty(e, "type", {
|
||
value: o,
|
||
writable: !1,
|
||
configurable: !1,
|
||
enumerable: !0
|
||
});
|
||
}
|
||
return e;
|
||
}
|
||
var xq = [
|
||
// Thumbnail cache files for macOS and Windows
|
||
".DS_Store",
|
||
"Thumbs.db"
|
||
// Windows
|
||
];
|
||
function Sq(e) {
|
||
return bf(this, void 0, void 0, function() {
|
||
return Cf(this, function(t) {
|
||
return Kg(e) && bq(e.dataTransfer) ? [2, jq(e.dataTransfer, e.type)] : Cq(e) ? [2, wq(e)] : Array.isArray(e) && e.every(function(n) {
|
||
return "getFile" in n && typeof n.getFile == "function";
|
||
}) ? [2, Eq(e)] : [2, []];
|
||
});
|
||
});
|
||
}
|
||
function bq(e) {
|
||
return Kg(e);
|
||
}
|
||
function Cq(e) {
|
||
return Kg(e) && Kg(e.target);
|
||
}
|
||
function Kg(e) {
|
||
return typeof e == "object" && e !== null;
|
||
}
|
||
function wq(e) {
|
||
return Gx(e.target.files).map(function(t) {
|
||
return Yh(t);
|
||
});
|
||
}
|
||
function Eq(e) {
|
||
return bf(this, void 0, void 0, function() {
|
||
var t;
|
||
return Cf(this, function(n) {
|
||
switch (n.label) {
|
||
case 0:
|
||
return [4, Promise.all(e.map(function(i) {
|
||
return i.getFile();
|
||
}))];
|
||
case 1:
|
||
return t = n.sent(), [2, t.map(function(i) {
|
||
return Yh(i);
|
||
})];
|
||
}
|
||
});
|
||
});
|
||
}
|
||
function jq(e, t) {
|
||
return bf(this, void 0, void 0, function() {
|
||
var n, i;
|
||
return Cf(this, function(o) {
|
||
switch (o.label) {
|
||
case 0:
|
||
return e.items ? (n = Gx(e.items).filter(function(l) {
|
||
return l.kind === "file";
|
||
}), t !== "drop" ? [2, n] : [4, Promise.all(n.map(Tq))]) : [3, 2];
|
||
case 1:
|
||
return i = o.sent(), [2, e5(sM(i))];
|
||
case 2:
|
||
return [2, e5(Gx(e.files).map(function(l) {
|
||
return Yh(l);
|
||
}))];
|
||
}
|
||
});
|
||
});
|
||
}
|
||
function e5(e) {
|
||
return e.filter(function(t) {
|
||
return xq.indexOf(t.name) === -1;
|
||
});
|
||
}
|
||
function Gx(e) {
|
||
if (e === null)
|
||
return [];
|
||
for (var t = [], n = 0; n < e.length; n++) {
|
||
var i = e[n];
|
||
t.push(i);
|
||
}
|
||
return t;
|
||
}
|
||
function Tq(e) {
|
||
if (typeof e.webkitGetAsEntry != "function")
|
||
return t5(e);
|
||
var t = e.webkitGetAsEntry();
|
||
return t && t.isDirectory ? lM(t) : t5(e);
|
||
}
|
||
function sM(e) {
|
||
return e.reduce(function(t, n) {
|
||
return wx(wx([], jw(t), !1), jw(Array.isArray(n) ? sM(n) : [n]), !1);
|
||
}, []);
|
||
}
|
||
function t5(e) {
|
||
var t = e.getAsFile();
|
||
if (!t)
|
||
return Promise.reject("".concat(e, " is not a File"));
|
||
var n = Yh(t);
|
||
return Promise.resolve(n);
|
||
}
|
||
function Dq(e) {
|
||
return bf(this, void 0, void 0, function() {
|
||
return Cf(this, function(t) {
|
||
return [2, e.isDirectory ? lM(e) : Mq(e)];
|
||
});
|
||
});
|
||
}
|
||
function lM(e) {
|
||
var t = e.createReader();
|
||
return new Promise(function(n, i) {
|
||
var o = [];
|
||
function l() {
|
||
var f = this;
|
||
t.readEntries(function(h) {
|
||
return bf(f, void 0, void 0, function() {
|
||
var y, m, x;
|
||
return Cf(this, function(b) {
|
||
switch (b.label) {
|
||
case 0:
|
||
if (h.length)
|
||
return [3, 5];
|
||
b.label = 1;
|
||
case 1:
|
||
return b.trys.push([1, 3, , 4]), [4, Promise.all(o)];
|
||
case 2:
|
||
return y = b.sent(), n(y), [3, 4];
|
||
case 3:
|
||
return m = b.sent(), i(m), [3, 4];
|
||
case 4:
|
||
return [3, 6];
|
||
case 5:
|
||
x = Promise.all(h.map(Dq)), o.push(x), l(), b.label = 6;
|
||
case 6:
|
||
return [
|
||
2
|
||
/*return*/
|
||
];
|
||
}
|
||
});
|
||
});
|
||
}, function(h) {
|
||
i(h);
|
||
});
|
||
}
|
||
l();
|
||
});
|
||
}
|
||
function Mq(e) {
|
||
return bf(this, void 0, void 0, function() {
|
||
return Cf(this, function(t) {
|
||
return [2, new Promise(function(n, i) {
|
||
e.file(function(o) {
|
||
var l = Yh(o, e.fullPath);
|
||
n(l);
|
||
}, function(o) {
|
||
i(o);
|
||
});
|
||
})];
|
||
});
|
||
});
|
||
}
|
||
var Rq = function(e, t) {
|
||
if (e && t) {
|
||
var n = Array.isArray(t) ? t : t.split(","), i = e.name || "", o = (e.type || "").toLowerCase(), l = o.replace(/\/.*$/, "");
|
||
return n.some(function(f) {
|
||
var h = f.trim().toLowerCase();
|
||
return h.charAt(0) === "." ? i.toLowerCase().endsWith(h) : h.endsWith("/*") ? l === h.replace(/\/.*$/, "") : o === h;
|
||
});
|
||
}
|
||
return !0;
|
||
};
|
||
function n5(e) {
|
||
return Oq(e) || Pq(e) || cM(e) || kq();
|
||
}
|
||
function kq() {
|
||
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 Pq(e) {
|
||
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
||
return Array.from(e);
|
||
}
|
||
function Oq(e) {
|
||
if (Array.isArray(e))
|
||
return qx(e);
|
||
}
|
||
function r5(e, t) {
|
||
var n = Object.keys(e);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var i = Object.getOwnPropertySymbols(e);
|
||
t && (i = i.filter(function(o) {
|
||
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
||
})), n.push.apply(n, i);
|
||
}
|
||
return n;
|
||
}
|
||
function a5(e) {
|
||
for (var t = 1; t < arguments.length; t++) {
|
||
var n = arguments[t] != null ? arguments[t] : {};
|
||
t % 2 ? r5(Object(n), !0).forEach(function(i) {
|
||
uM(e, i, n[i]);
|
||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r5(Object(n)).forEach(function(i) {
|
||
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
|
||
});
|
||
}
|
||
return e;
|
||
}
|
||
function uM(e, t, n) {
|
||
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
||
}
|
||
function Th(e, t) {
|
||
return zq(e) || Nq(e, t) || cM(e, t) || Aq();
|
||
}
|
||
function Aq() {
|
||
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 cM(e, t) {
|
||
if (e) {
|
||
if (typeof e == "string")
|
||
return qx(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 qx(e, t);
|
||
}
|
||
}
|
||
function qx(e, t) {
|
||
(t == null || t > e.length) && (t = e.length);
|
||
for (var n = 0, i = new Array(t); n < t; n++)
|
||
i[n] = e[n];
|
||
return i;
|
||
}
|
||
function Nq(e, t) {
|
||
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
||
if (n != null) {
|
||
var i = [], o = !0, l = !1, f, h;
|
||
try {
|
||
for (n = n.call(e); !(o = (f = n.next()).done) && (i.push(f.value), !(t && i.length === t)); o = !0)
|
||
;
|
||
} catch (y) {
|
||
l = !0, h = y;
|
||
} finally {
|
||
try {
|
||
!o && n.return != null && n.return();
|
||
} finally {
|
||
if (l)
|
||
throw h;
|
||
}
|
||
}
|
||
return i;
|
||
}
|
||
}
|
||
function zq(e) {
|
||
if (Array.isArray(e))
|
||
return e;
|
||
}
|
||
var Iq = "file-invalid-type", Lq = "file-too-large", Fq = "file-too-small", Bq = "too-many-files", _q = function(t) {
|
||
t = Array.isArray(t) && t.length === 1 ? t[0] : t;
|
||
var n = Array.isArray(t) ? "one of ".concat(t.join(", ")) : t;
|
||
return {
|
||
code: Iq,
|
||
message: "File type must be ".concat(n)
|
||
};
|
||
}, i5 = function(t) {
|
||
return {
|
||
code: Lq,
|
||
message: "File is larger than ".concat(t, " ").concat(t === 1 ? "byte" : "bytes")
|
||
};
|
||
}, o5 = function(t) {
|
||
return {
|
||
code: Fq,
|
||
message: "File is smaller than ".concat(t, " ").concat(t === 1 ? "byte" : "bytes")
|
||
};
|
||
}, Uq = {
|
||
code: Bq,
|
||
message: "Too many files"
|
||
};
|
||
function dM(e, t) {
|
||
var n = e.type === "application/x-moz-file" || Rq(e, t);
|
||
return [n, n ? null : _q(t)];
|
||
}
|
||
function fM(e, t, n) {
|
||
if (Yu(e.size))
|
||
if (Yu(t) && Yu(n)) {
|
||
if (e.size > n)
|
||
return [!1, i5(n)];
|
||
if (e.size < t)
|
||
return [!1, o5(t)];
|
||
} else {
|
||
if (Yu(t) && e.size < t)
|
||
return [!1, o5(t)];
|
||
if (Yu(n) && e.size > n)
|
||
return [!1, i5(n)];
|
||
}
|
||
return [!0, null];
|
||
}
|
||
function Yu(e) {
|
||
return e != null;
|
||
}
|
||
function Hq(e) {
|
||
var t = e.files, n = e.accept, i = e.minSize, o = e.maxSize, l = e.multiple, f = e.maxFiles, h = e.validator;
|
||
return !l && t.length > 1 || l && f >= 1 && t.length > f ? !1 : t.every(function(y) {
|
||
var m = dM(y, n), x = Th(m, 1), b = x[0], E = fM(y, i, o), j = Th(E, 1), M = j[0], R = h ? h(y) : null;
|
||
return b && M && !R;
|
||
});
|
||
}
|
||
function Zg(e) {
|
||
return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
|
||
}
|
||
function xg(e) {
|
||
return e.dataTransfer ? Array.prototype.some.call(e.dataTransfer.types, function(t) {
|
||
return t === "Files" || t === "application/x-moz-file";
|
||
}) : !!e.target && !!e.target.files;
|
||
}
|
||
function s5(e) {
|
||
e.preventDefault();
|
||
}
|
||
function Vq(e) {
|
||
return e.indexOf("MSIE") !== -1 || e.indexOf("Trident/") !== -1;
|
||
}
|
||
function Wq(e) {
|
||
return e.indexOf("Edge/") !== -1;
|
||
}
|
||
function Gq() {
|
||
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
||
return Vq(e) || Wq(e);
|
||
}
|
||
function Xo() {
|
||
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
||
t[n] = arguments[n];
|
||
return function(i) {
|
||
for (var o = arguments.length, l = new Array(o > 1 ? o - 1 : 0), f = 1; f < o; f++)
|
||
l[f - 1] = arguments[f];
|
||
return t.some(function(h) {
|
||
return !Zg(i) && h && h.apply(void 0, [i].concat(l)), Zg(i);
|
||
});
|
||
};
|
||
}
|
||
function qq() {
|
||
return "showOpenFilePicker" in window;
|
||
}
|
||
function Yq(e) {
|
||
if (Yu(e)) {
|
||
var t = Object.entries(e).filter(function(n) {
|
||
var i = Th(n, 2), o = i[0], l = i[1], f = !0;
|
||
return pM(o) || (console.warn('Skipped "'.concat(o, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), f = !1), (!Array.isArray(l) || !l.every(hM)) && (console.warn('Skipped "'.concat(o, '" because an invalid file extension was provided.')), f = !1), f;
|
||
}).reduce(function(n, i) {
|
||
var o = Th(i, 2), l = o[0], f = o[1];
|
||
return a5(a5({}, n), {}, uM({}, l, f));
|
||
}, {});
|
||
return [{
|
||
// description is required due to https://crbug.com/1264708
|
||
description: "Files",
|
||
accept: t
|
||
}];
|
||
}
|
||
return e;
|
||
}
|
||
function Qq(e) {
|
||
if (Yu(e))
|
||
return Object.entries(e).reduce(function(t, n) {
|
||
var i = Th(n, 2), o = i[0], l = i[1];
|
||
return [].concat(n5(t), [o], n5(l));
|
||
}, []).filter(function(t) {
|
||
return pM(t) || hM(t);
|
||
}).join(",");
|
||
}
|
||
function Xq(e) {
|
||
return e instanceof DOMException && (e.name === "AbortError" || e.code === e.ABORT_ERR);
|
||
}
|
||
function Kq(e) {
|
||
return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
|
||
}
|
||
function pM(e) {
|
||
return e === "audio/*" || e === "video/*" || e === "image/*" || e === "text/*" || /\w+\/[-+.\w]+/g.test(e);
|
||
}
|
||
function hM(e) {
|
||
return /^.*\.[\w]+$/.test(e);
|
||
}
|
||
var Zq = ["children"], Jq = ["open"], $q = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], eY = ["refKey", "onChange", "onClick"];
|
||
function tY(e) {
|
||
return aY(e) || rY(e) || vM(e) || nY();
|
||
}
|
||
function nY() {
|
||
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 rY(e) {
|
||
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
||
return Array.from(e);
|
||
}
|
||
function aY(e) {
|
||
if (Array.isArray(e))
|
||
return Yx(e);
|
||
}
|
||
function Q2(e, t) {
|
||
return sY(e) || oY(e, t) || vM(e, t) || iY();
|
||
}
|
||
function iY() {
|
||
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 vM(e, t) {
|
||
if (e) {
|
||
if (typeof e == "string")
|
||
return Yx(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 Yx(e, t);
|
||
}
|
||
}
|
||
function Yx(e, t) {
|
||
(t == null || t > e.length) && (t = e.length);
|
||
for (var n = 0, i = new Array(t); n < t; n++)
|
||
i[n] = e[n];
|
||
return i;
|
||
}
|
||
function oY(e, t) {
|
||
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
||
if (n != null) {
|
||
var i = [], o = !0, l = !1, f, h;
|
||
try {
|
||
for (n = n.call(e); !(o = (f = n.next()).done) && (i.push(f.value), !(t && i.length === t)); o = !0)
|
||
;
|
||
} catch (y) {
|
||
l = !0, h = y;
|
||
} finally {
|
||
try {
|
||
!o && n.return != null && n.return();
|
||
} finally {
|
||
if (l)
|
||
throw h;
|
||
}
|
||
}
|
||
return i;
|
||
}
|
||
}
|
||
function sY(e) {
|
||
if (Array.isArray(e))
|
||
return e;
|
||
}
|
||
function l5(e, t) {
|
||
var n = Object.keys(e);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var i = Object.getOwnPropertySymbols(e);
|
||
t && (i = i.filter(function(o) {
|
||
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
||
})), n.push.apply(n, i);
|
||
}
|
||
return n;
|
||
}
|
||
function rr(e) {
|
||
for (var t = 1; t < arguments.length; t++) {
|
||
var n = arguments[t] != null ? arguments[t] : {};
|
||
t % 2 ? l5(Object(n), !0).forEach(function(i) {
|
||
Qx(e, i, n[i]);
|
||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : l5(Object(n)).forEach(function(i) {
|
||
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(n, i));
|
||
});
|
||
}
|
||
return e;
|
||
}
|
||
function Qx(e, t, n) {
|
||
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
||
}
|
||
function Jg(e, t) {
|
||
if (e == null)
|
||
return {};
|
||
var n = lY(e, t), i, o;
|
||
if (Object.getOwnPropertySymbols) {
|
||
var l = Object.getOwnPropertySymbols(e);
|
||
for (o = 0; o < l.length; o++)
|
||
i = l[o], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (n[i] = e[i]);
|
||
}
|
||
return n;
|
||
}
|
||
function lY(e, t) {
|
||
if (e == null)
|
||
return {};
|
||
var n = {}, i = Object.keys(e), o, l;
|
||
for (l = 0; l < i.length; l++)
|
||
o = i[l], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
||
return n;
|
||
}
|
||
var Wb = /* @__PURE__ */ dc(function(e, t) {
|
||
var n = e.children, i = Jg(e, Zq), o = gM(i), l = o.open, f = Jg(o, Jq);
|
||
return oS(t, function() {
|
||
return {
|
||
open: l
|
||
};
|
||
}, [l]), /* @__PURE__ */ pt.createElement(L6, null, n(rr(rr({}, f), {}, {
|
||
open: l
|
||
})));
|
||
});
|
||
Wb.displayName = "Dropzone";
|
||
var mM = {
|
||
disabled: !1,
|
||
getFilesFromEvent: Sq,
|
||
maxSize: 1 / 0,
|
||
minSize: 0,
|
||
multiple: !0,
|
||
maxFiles: 0,
|
||
preventDropOnDocument: !0,
|
||
noClick: !1,
|
||
noKeyboard: !1,
|
||
noDrag: !1,
|
||
noDragEventsBubbling: !1,
|
||
validator: null,
|
||
useFsAccessApi: !0,
|
||
autoFocus: !1
|
||
};
|
||
Wb.defaultProps = mM;
|
||
Wb.propTypes = {
|
||
/**
|
||
* Render function that exposes the dropzone state and prop getter fns
|
||
*
|
||
* @param {object} params
|
||
* @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
|
||
* @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
|
||
* @param {Function} params.open Open the native file selection dialog
|
||
* @param {boolean} params.isFocused Dropzone area is in focus
|
||
* @param {boolean} params.isFileDialogActive File dialog is opened
|
||
* @param {boolean} params.isDragActive Active drag is in progress
|
||
* @param {boolean} params.isDragAccept Dragged files are accepted
|
||
* @param {boolean} params.isDragReject Some dragged files are rejected
|
||
* @param {File[]} params.acceptedFiles Accepted files
|
||
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
||
*/
|
||
children: Oe.func,
|
||
/**
|
||
* Set accepted file types.
|
||
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
||
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
||
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
||
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
||
*/
|
||
accept: Oe.objectOf(Oe.arrayOf(Oe.string)),
|
||
/**
|
||
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
||
*/
|
||
multiple: Oe.bool,
|
||
/**
|
||
* If false, allow dropped items to take over the current browser window
|
||
*/
|
||
preventDropOnDocument: Oe.bool,
|
||
/**
|
||
* If true, disables click to open the native file selection dialog
|
||
*/
|
||
noClick: Oe.bool,
|
||
/**
|
||
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
||
* Note that it also stops tracking the focus state.
|
||
*/
|
||
noKeyboard: Oe.bool,
|
||
/**
|
||
* If true, disables drag 'n' drop
|
||
*/
|
||
noDrag: Oe.bool,
|
||
/**
|
||
* If true, stops drag event propagation to parents
|
||
*/
|
||
noDragEventsBubbling: Oe.bool,
|
||
/**
|
||
* Minimum file size (in bytes)
|
||
*/
|
||
minSize: Oe.number,
|
||
/**
|
||
* Maximum file size (in bytes)
|
||
*/
|
||
maxSize: Oe.number,
|
||
/**
|
||
* Maximum accepted number of files
|
||
* The default value is 0 which means there is no limitation to how many files are accepted.
|
||
*/
|
||
maxFiles: Oe.number,
|
||
/**
|
||
* Enable/disable the dropzone
|
||
*/
|
||
disabled: Oe.bool,
|
||
/**
|
||
* Use this to provide a custom file aggregator
|
||
*
|
||
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
||
*/
|
||
getFilesFromEvent: Oe.func,
|
||
/**
|
||
* Cb for when closing the file dialog with no selection
|
||
*/
|
||
onFileDialogCancel: Oe.func,
|
||
/**
|
||
* Cb for when opening the file dialog
|
||
*/
|
||
onFileDialogOpen: Oe.func,
|
||
/**
|
||
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
||
* to open the file picker instead of using an `<input type="file">` click event.
|
||
*/
|
||
useFsAccessApi: Oe.bool,
|
||
/**
|
||
* Set to true to focus the root element on render
|
||
*/
|
||
autoFocus: Oe.bool,
|
||
/**
|
||
* Cb for when the `dragenter` event occurs.
|
||
*
|
||
* @param {DragEvent} event
|
||
*/
|
||
onDragEnter: Oe.func,
|
||
/**
|
||
* Cb for when the `dragleave` event occurs
|
||
*
|
||
* @param {DragEvent} event
|
||
*/
|
||
onDragLeave: Oe.func,
|
||
/**
|
||
* Cb for when the `dragover` event occurs
|
||
*
|
||
* @param {DragEvent} event
|
||
*/
|
||
onDragOver: Oe.func,
|
||
/**
|
||
* Cb for when the `drop` event occurs.
|
||
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
||
*
|
||
* Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
|
||
* `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
|
||
* If `multiple` is set to false and additional files are dropped,
|
||
* all files besides the first will be rejected.
|
||
* Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
|
||
*
|
||
* Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
|
||
* If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
|
||
*
|
||
* `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
|
||
* For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
|
||
*
|
||
* ```js
|
||
* function onDrop(acceptedFiles) {
|
||
* const req = request.post('/upload')
|
||
* acceptedFiles.forEach(file => {
|
||
* req.attach(file.name, file)
|
||
* })
|
||
* req.end(callback)
|
||
* }
|
||
* ```
|
||
*
|
||
* @param {File[]} acceptedFiles
|
||
* @param {FileRejection[]} fileRejections
|
||
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
||
*/
|
||
onDrop: Oe.func,
|
||
/**
|
||
* Cb for when the `drop` event occurs.
|
||
* Note that if no files are accepted, this callback is not invoked.
|
||
*
|
||
* @param {File[]} files
|
||
* @param {(DragEvent|Event)} event
|
||
*/
|
||
onDropAccepted: Oe.func,
|
||
/**
|
||
* Cb for when the `drop` event occurs.
|
||
* Note that if no files are rejected, this callback is not invoked.
|
||
*
|
||
* @param {FileRejection[]} fileRejections
|
||
* @param {(DragEvent|Event)} event
|
||
*/
|
||
onDropRejected: Oe.func,
|
||
/**
|
||
* Cb for when there's some error from any of the promises.
|
||
*
|
||
* @param {Error} error
|
||
*/
|
||
onError: Oe.func,
|
||
/**
|
||
* Custom validation function. It must return null if there's no errors.
|
||
* @param {File} file
|
||
* @returns {FileError|FileError[]|null}
|
||
*/
|
||
validator: Oe.func
|
||
};
|
||
var Xx = {
|
||
isFocused: !1,
|
||
isFileDialogActive: !1,
|
||
isDragActive: !1,
|
||
isDragAccept: !1,
|
||
isDragReject: !1,
|
||
acceptedFiles: [],
|
||
fileRejections: []
|
||
};
|
||
function gM() {
|
||
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = rr(rr({}, mM), e), n = t.accept, i = t.disabled, o = t.getFilesFromEvent, l = t.maxSize, f = t.minSize, h = t.multiple, y = t.maxFiles, m = t.onDragEnter, x = t.onDragLeave, b = t.onDragOver, E = t.onDrop, j = t.onDropAccepted, M = t.onDropRejected, R = t.onFileDialogCancel, k = t.onFileDialogOpen, A = t.useFsAccessApi, L = t.autoFocus, z = t.preventDropOnDocument, I = t.noClick, _ = t.noKeyboard, U = t.noDrag, B = t.noDragEventsBubbling, q = t.onError, J = t.validator, G = an(function() {
|
||
return Qq(n);
|
||
}, [n]), H = an(function() {
|
||
return Yq(n);
|
||
}, [n]), le = an(function() {
|
||
return typeof k == "function" ? k : u5;
|
||
}, [k]), ae = an(function() {
|
||
return typeof R == "function" ? R : u5;
|
||
}, [R]), he = He(null), Te = He(null), xe = B6(uY, Xx), $ = Q2(xe, 2), Y = $[0], te = $[1], V = Y.isFocused, ne = Y.isFileDialogActive, we = He(typeof window < "u" && window.isSecureContext && A && qq()), Ee = function() {
|
||
!we.current && ne && setTimeout(function() {
|
||
if (Te.current) {
|
||
var Le = Te.current.files;
|
||
Le.length || (te({
|
||
type: "closeDialog"
|
||
}), ae());
|
||
}
|
||
}, 300);
|
||
};
|
||
rt(function() {
|
||
return window.addEventListener("focus", Ee, !1), function() {
|
||
window.removeEventListener("focus", Ee, !1);
|
||
};
|
||
}, [Te, ne, ae, we]);
|
||
var se = He([]), ve = function(Le) {
|
||
he.current && he.current.contains(Le.target) || (Le.preventDefault(), se.current = []);
|
||
};
|
||
rt(function() {
|
||
return z && (document.addEventListener("dragover", s5, !1), document.addEventListener("drop", ve, !1)), function() {
|
||
z && (document.removeEventListener("dragover", s5), document.removeEventListener("drop", ve));
|
||
};
|
||
}, [he, z]), rt(function() {
|
||
return !i && L && he.current && he.current.focus(), function() {
|
||
};
|
||
}, [he, L, i]);
|
||
var Ce = Q(function(me) {
|
||
q ? q(me) : console.error(me);
|
||
}, [q]), Ae = Q(function(me) {
|
||
me.preventDefault(), me.persist(), ee(me), se.current = [].concat(tY(se.current), [me.target]), xg(me) && Promise.resolve(o(me)).then(function(Le) {
|
||
if (!(Zg(me) && !B)) {
|
||
var Dt = Le.length, Vt = Dt > 0 && Hq({
|
||
files: Le,
|
||
accept: G,
|
||
minSize: f,
|
||
maxSize: l,
|
||
multiple: h,
|
||
maxFiles: y,
|
||
validator: J
|
||
}), ke = Dt > 0 && !Vt;
|
||
te({
|
||
isDragAccept: Vt,
|
||
isDragReject: ke,
|
||
isDragActive: !0,
|
||
type: "setDraggedFiles"
|
||
}), m && m(me);
|
||
}
|
||
}).catch(function(Le) {
|
||
return Ce(Le);
|
||
});
|
||
}, [o, m, Ce, B, G, f, l, h, y, J]), Ve = Q(function(me) {
|
||
me.preventDefault(), me.persist(), ee(me);
|
||
var Le = xg(me);
|
||
if (Le && me.dataTransfer)
|
||
try {
|
||
me.dataTransfer.dropEffect = "copy";
|
||
} catch {
|
||
}
|
||
return Le && b && b(me), !1;
|
||
}, [b, B]), tt = Q(function(me) {
|
||
me.preventDefault(), me.persist(), ee(me);
|
||
var Le = se.current.filter(function(Vt) {
|
||
return he.current && he.current.contains(Vt);
|
||
}), Dt = Le.indexOf(me.target);
|
||
Dt !== -1 && Le.splice(Dt, 1), se.current = Le, !(Le.length > 0) && (te({
|
||
type: "setDraggedFiles",
|
||
isDragActive: !1,
|
||
isDragAccept: !1,
|
||
isDragReject: !1
|
||
}), xg(me) && x && x(me));
|
||
}, [he, x, B]), at = Q(function(me, Le) {
|
||
var Dt = [], Vt = [];
|
||
me.forEach(function(ke) {
|
||
var Nt = dM(ke, G), tn = Q2(Nt, 2), Ne = tn[0], ge = tn[1], _e = fM(ke, f, l), yt = Q2(_e, 2), Qt = yt[0], yn = yt[1], vt = J ? J(ke) : null;
|
||
if (Ne && Qt && !vt)
|
||
Dt.push(ke);
|
||
else {
|
||
var dt = [ge, yn];
|
||
vt && (dt = dt.concat(vt)), Vt.push({
|
||
file: ke,
|
||
errors: dt.filter(function(Nn) {
|
||
return Nn;
|
||
})
|
||
});
|
||
}
|
||
}), (!h && Dt.length > 1 || h && y >= 1 && Dt.length > y) && (Dt.forEach(function(ke) {
|
||
Vt.push({
|
||
file: ke,
|
||
errors: [Uq]
|
||
});
|
||
}), Dt.splice(0)), te({
|
||
acceptedFiles: Dt,
|
||
fileRejections: Vt,
|
||
type: "setFiles"
|
||
}), E && E(Dt, Vt, Le), Vt.length > 0 && M && M(Vt, Le), Dt.length > 0 && j && j(Dt, Le);
|
||
}, [te, h, G, f, l, y, E, j, M, J]), ze = Q(function(me) {
|
||
me.preventDefault(), me.persist(), ee(me), se.current = [], xg(me) && Promise.resolve(o(me)).then(function(Le) {
|
||
Zg(me) && !B || at(Le, me);
|
||
}).catch(function(Le) {
|
||
return Ce(Le);
|
||
}), te({
|
||
type: "reset"
|
||
});
|
||
}, [o, at, Ce, B]), Qe = Q(function() {
|
||
if (we.current) {
|
||
te({
|
||
type: "openDialog"
|
||
}), le();
|
||
var me = {
|
||
multiple: h,
|
||
types: H
|
||
};
|
||
window.showOpenFilePicker(me).then(function(Le) {
|
||
return o(Le);
|
||
}).then(function(Le) {
|
||
at(Le, null), te({
|
||
type: "closeDialog"
|
||
});
|
||
}).catch(function(Le) {
|
||
Xq(Le) ? (ae(Le), te({
|
||
type: "closeDialog"
|
||
})) : Kq(Le) ? (we.current = !1, Te.current ? (Te.current.value = null, Te.current.click()) : Ce(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : Ce(Le);
|
||
});
|
||
return;
|
||
}
|
||
Te.current && (te({
|
||
type: "openDialog"
|
||
}), le(), Te.current.value = null, Te.current.click());
|
||
}, [te, le, ae, A, at, Ce, H, h]), Et = Q(function(me) {
|
||
!he.current || !he.current.isEqualNode(me.target) || (me.key === " " || me.key === "Enter" || me.keyCode === 32 || me.keyCode === 13) && (me.preventDefault(), Qe());
|
||
}, [he, Qe]), Xe = Q(function() {
|
||
te({
|
||
type: "focus"
|
||
});
|
||
}, []), ht = Q(function() {
|
||
te({
|
||
type: "blur"
|
||
});
|
||
}, []), Ht = Q(function() {
|
||
I || (Gq() ? setTimeout(Qe, 0) : Qe());
|
||
}, [I, Qe]), Ot = function(Le) {
|
||
return i ? null : Le;
|
||
}, on = function(Le) {
|
||
return _ ? null : Ot(Le);
|
||
}, En = function(Le) {
|
||
return U ? null : Ot(Le);
|
||
}, ee = function(Le) {
|
||
B && Le.stopPropagation();
|
||
}, We = an(function() {
|
||
return function() {
|
||
var me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Le = me.refKey, Dt = Le === void 0 ? "ref" : Le, Vt = me.role, ke = me.onKeyDown, Nt = me.onFocus, tn = me.onBlur, Ne = me.onClick, ge = me.onDragEnter, _e = me.onDragOver, yt = me.onDragLeave, Qt = me.onDrop, yn = Jg(me, $q);
|
||
return rr(rr(Qx({
|
||
onKeyDown: on(Xo(ke, Et)),
|
||
onFocus: on(Xo(Nt, Xe)),
|
||
onBlur: on(Xo(tn, ht)),
|
||
onClick: Ot(Xo(Ne, Ht)),
|
||
onDragEnter: En(Xo(ge, Ae)),
|
||
onDragOver: En(Xo(_e, Ve)),
|
||
onDragLeave: En(Xo(yt, tt)),
|
||
onDrop: En(Xo(Qt, ze)),
|
||
role: typeof Vt == "string" && Vt !== "" ? Vt : "presentation"
|
||
}, Dt, he), !i && !_ ? {
|
||
tabIndex: 0
|
||
} : {}), yn);
|
||
};
|
||
}, [he, Et, Xe, ht, Ht, Ae, Ve, tt, ze, _, U, i]), Fe = Q(function(me) {
|
||
me.stopPropagation();
|
||
}, []), ot = an(function() {
|
||
return function() {
|
||
var me = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Le = me.refKey, Dt = Le === void 0 ? "ref" : Le, Vt = me.onChange, ke = me.onClick, Nt = Jg(me, eY), tn = Qx({
|
||
accept: G,
|
||
multiple: h,
|
||
type: "file",
|
||
style: {
|
||
display: "none"
|
||
},
|
||
onChange: Ot(Xo(Vt, ze)),
|
||
onClick: Ot(Xo(ke, Fe)),
|
||
tabIndex: -1
|
||
}, Dt, Te);
|
||
return rr(rr({}, tn), Nt);
|
||
};
|
||
}, [Te, n, h, ze, i]);
|
||
return rr(rr({}, Y), {}, {
|
||
isFocused: V && !i,
|
||
getRootProps: We,
|
||
getInputProps: ot,
|
||
rootRef: he,
|
||
inputRef: Te,
|
||
open: Ot(Qe)
|
||
});
|
||
}
|
||
function uY(e, t) {
|
||
switch (t.type) {
|
||
case "focus":
|
||
return rr(rr({}, e), {}, {
|
||
isFocused: !0
|
||
});
|
||
case "blur":
|
||
return rr(rr({}, e), {}, {
|
||
isFocused: !1
|
||
});
|
||
case "openDialog":
|
||
return rr(rr({}, Xx), {}, {
|
||
isFileDialogActive: !0
|
||
});
|
||
case "closeDialog":
|
||
return rr(rr({}, e), {}, {
|
||
isFileDialogActive: !1
|
||
});
|
||
case "setDraggedFiles":
|
||
return rr(rr({}, e), {}, {
|
||
isDragActive: t.isDragActive,
|
||
isDragAccept: t.isDragAccept,
|
||
isDragReject: t.isDragReject
|
||
});
|
||
case "setFiles":
|
||
return rr(rr({}, e), {}, {
|
||
acceptedFiles: t.acceptedFiles,
|
||
fileRejections: t.fileRejections
|
||
});
|
||
case "reset":
|
||
return rr({}, Xx);
|
||
default:
|
||
return e;
|
||
}
|
||
}
|
||
function u5() {
|
||
}
|
||
const cY = (e) => {
|
||
const {
|
||
isDragAccept: t,
|
||
isDragReject: n,
|
||
overlaySecondaryText: i,
|
||
setIsHandlingUpload: o
|
||
} = e;
|
||
return Ze("esc", () => {
|
||
o(!1);
|
||
}), /* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
position: "absolute",
|
||
top: 0,
|
||
insetInlineStart: 0,
|
||
width: "100vw",
|
||
height: "100vh",
|
||
zIndex: 999,
|
||
backdropFilter: "blur(20px)"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
opacity: 0.4,
|
||
width: "100%",
|
||
height: "100%",
|
||
flexDirection: "column",
|
||
rowGap: 4,
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
bg: "base.900",
|
||
boxShadow: `inset 0 0 20rem 1rem var(--invokeai-colors-${t ? "accent" : "error"}-500)`
|
||
},
|
||
children: t ? /* @__PURE__ */ c.jsxs(Bi, { size: "lg", children: [
|
||
"Upload Image",
|
||
i
|
||
] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "lg", children: "Invalid Upload" }),
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "md", children: "Must be single JPEG or PNG image" })
|
||
] })
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, dY = (e) => {
|
||
const { children: t } = e, n = je(), i = Z(Sr), o = Lh({}), { t: l } = Pe(), [f, h] = qe(!1), { setOpenUploader: y } = ib(), m = Q(
|
||
(z) => {
|
||
h(!0);
|
||
const I = z.errors.reduce(
|
||
(_, U) => `${_}
|
||
${U.message}`,
|
||
""
|
||
);
|
||
o({
|
||
title: l("toast.uploadFailed"),
|
||
description: I,
|
||
status: "error",
|
||
isClosable: !0
|
||
});
|
||
},
|
||
[l, o]
|
||
), x = Q(
|
||
async (z) => {
|
||
n(iE({ imageFile: z }));
|
||
},
|
||
[n]
|
||
), b = Q(
|
||
(z, I) => {
|
||
I.forEach((_) => {
|
||
m(_);
|
||
}), z.forEach((_) => {
|
||
x(_);
|
||
});
|
||
},
|
||
[x, m]
|
||
), {
|
||
getRootProps: E,
|
||
getInputProps: j,
|
||
isDragAccept: M,
|
||
isDragReject: R,
|
||
isDragActive: k,
|
||
open: A
|
||
} = gM({
|
||
accept: { "image/png": [".png"], "image/jpeg": [".jpg", ".jpeg", ".png"] },
|
||
noClick: !0,
|
||
onDrop: b,
|
||
onDragOver: () => h(!0),
|
||
maxFiles: 1
|
||
});
|
||
y(A), rt(() => {
|
||
const z = (I) => {
|
||
var q;
|
||
const _ = (q = I.clipboardData) == null ? void 0 : q.items;
|
||
if (!_)
|
||
return;
|
||
const U = [];
|
||
for (const J of _)
|
||
J.kind === "file" && ["image/png", "image/jpg"].includes(J.type) && U.push(J);
|
||
if (!U.length)
|
||
return;
|
||
if (I.stopImmediatePropagation(), U.length > 1) {
|
||
o({
|
||
description: l("toast.uploadFailedMultipleImagesDesc"),
|
||
status: "error",
|
||
isClosable: !0
|
||
});
|
||
return;
|
||
}
|
||
const B = U[0].getAsFile();
|
||
if (!B) {
|
||
o({
|
||
description: l("toast.uploadFailedUnableToLoadDesc"),
|
||
status: "error",
|
||
isClosable: !0
|
||
});
|
||
return;
|
||
}
|
||
n(iE({ imageFile: B }));
|
||
};
|
||
return document.addEventListener("paste", z), () => {
|
||
document.removeEventListener("paste", z);
|
||
};
|
||
}, [l, n, o, i]);
|
||
const L = ["img2img", "unifiedCanvas"].includes(
|
||
i
|
||
) ? ` to ${xi[i].tooltip}` : "";
|
||
return /* @__PURE__ */ c.jsx(ab.Provider, { value: A, children: /* @__PURE__ */ c.jsxs(
|
||
Ut,
|
||
{
|
||
...E({ style: {} }),
|
||
onKeyDown: (z) => {
|
||
z.key;
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("input", { ...j() }),
|
||
t,
|
||
k && f && /* @__PURE__ */ c.jsx(
|
||
cY,
|
||
{
|
||
isDragAccept: M,
|
||
isDragReject: R,
|
||
overlaySecondaryText: L,
|
||
setIsHandlingUpload: h
|
||
}
|
||
)
|
||
]
|
||
}
|
||
) });
|
||
}, fY = ct(
|
||
Xn,
|
||
(e) => e.log,
|
||
{
|
||
memoizeOptions: {
|
||
// We don't need a deep equality check for this selector.
|
||
resultEqualityCheck: (e, t) => e.length === t.length
|
||
}
|
||
}
|
||
), pY = ct(
|
||
Xn,
|
||
(e) => ({
|
||
shouldShowLogViewer: e.shouldShowLogViewer,
|
||
hasError: e.hasError,
|
||
wasErrorSeen: e.wasErrorSeen
|
||
}),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), hY = () => {
|
||
const e = je(), t = Z(fY), { shouldShowLogViewer: n, hasError: i, wasErrorSeen: o } = Z(pY), [l, f] = qe(!0), h = He(null);
|
||
bo(() => {
|
||
h.current !== null && l && (h.current.scrollTop = h.current.scrollHeight);
|
||
}, [l, t, n]);
|
||
const y = () => {
|
||
e(z6()), e(p2(!n));
|
||
};
|
||
Ze(
|
||
"`",
|
||
() => {
|
||
e(p2(!n));
|
||
},
|
||
[n]
|
||
), Ze("esc", () => {
|
||
e(p2(!1));
|
||
});
|
||
const m = () => {
|
||
h.current && l && h.current.scrollTop < h.current.scrollHeight - h.current.clientHeight && f(!1);
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
n && /* @__PURE__ */ c.jsx(
|
||
cD,
|
||
{
|
||
defaultSize: {
|
||
width: "100%",
|
||
height: 200
|
||
},
|
||
style: {
|
||
display: "flex",
|
||
position: "fixed",
|
||
insetInlineStart: 0,
|
||
bottom: 0,
|
||
zIndex: 9999
|
||
},
|
||
maxHeight: "90vh",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
width: "100vw",
|
||
overflow: "auto",
|
||
direction: "column",
|
||
fontFamily: "monospace",
|
||
pt: 0,
|
||
pr: 4,
|
||
pb: 4,
|
||
pl: 12,
|
||
borderTopWidth: 5,
|
||
bg: "base.850",
|
||
borderColor: "base.700"
|
||
},
|
||
ref: h,
|
||
onScroll: m,
|
||
children: t.map((x, b) => {
|
||
const { timestamp: E, message: j, level: M } = x, R = M === "info" ? "base" : M;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
gap: 2,
|
||
color: `${R}.300`
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(mt, { fontWeight: "600", children: [
|
||
E,
|
||
":"
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(mt, { wordBreak: "break-all", children: j })
|
||
]
|
||
},
|
||
b
|
||
);
|
||
})
|
||
}
|
||
)
|
||
}
|
||
),
|
||
n && /* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
hasArrow: !0,
|
||
label: l ? "Autoscroll On" : "Autoscroll Off",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
size: "sm",
|
||
"aria-label": "Toggle autoscroll",
|
||
icon: /* @__PURE__ */ c.jsx(jB, {}),
|
||
onClick: () => f(!l),
|
||
isChecked: l,
|
||
sx: {
|
||
position: "fixed",
|
||
insetInlineStart: 2,
|
||
bottom: 12,
|
||
zIndex: "10000"
|
||
}
|
||
}
|
||
)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
hasArrow: !0,
|
||
label: n ? "Hide Console" : "Show Console",
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
size: "sm",
|
||
"aria-label": "Toggle Log Viewer",
|
||
icon: n ? /* @__PURE__ */ c.jsx(HB, {}) : /* @__PURE__ */ c.jsx(tD, {}),
|
||
onClick: y,
|
||
sx: {
|
||
position: "fixed",
|
||
insetInlineStart: 2,
|
||
bottom: 2,
|
||
zIndex: "10000"
|
||
},
|
||
colorScheme: i || !o ? "error" : "base"
|
||
}
|
||
)
|
||
}
|
||
)
|
||
] });
|
||
}, vY = ct(
|
||
Xn,
|
||
(e) => ({
|
||
isProcessing: e.isProcessing,
|
||
currentStep: e.currentStep,
|
||
totalSteps: e.totalSteps,
|
||
currentStatusHasSteps: e.currentStatusHasSteps
|
||
}),
|
||
{
|
||
memoizeOptions: { resultEqualityCheck: Ie.isEqual }
|
||
}
|
||
), mY = () => {
|
||
const { t: e } = Pe(), { isProcessing: t, currentStep: n, totalSteps: i, currentStatusHasSteps: o } = Z(vY), l = n ? Math.round(n * 100 / i) : 0;
|
||
return /* @__PURE__ */ c.jsx(
|
||
jT,
|
||
{
|
||
value: l,
|
||
"aria-label": e("accessibility.invokeProgressBar"),
|
||
isIndeterminate: t && !o,
|
||
height: xb,
|
||
zIndex: 99
|
||
}
|
||
);
|
||
};
|
||
function gY(e) {
|
||
const { title: t, hotkey: n, description: i } = e;
|
||
return /* @__PURE__ */ c.jsxs(
|
||
_i,
|
||
{
|
||
sx: {
|
||
gridTemplateColumns: "auto max-content",
|
||
justifyContent: "space-between",
|
||
alignItems: "center"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(_i, { children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: 600, children: t }),
|
||
i && /* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontSize: "sm"
|
||
},
|
||
variant: "subtext",
|
||
children: i
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ut,
|
||
{
|
||
sx: {
|
||
fontSize: "sm",
|
||
fontWeight: 600,
|
||
px: 2,
|
||
py: 1
|
||
},
|
||
children: n
|
||
}
|
||
)
|
||
]
|
||
}
|
||
);
|
||
}
|
||
function yY({ children: e }) {
|
||
const {
|
||
isOpen: t,
|
||
onOpen: n,
|
||
onClose: i
|
||
} = Gl(), { t: o } = Pe(), l = [
|
||
{
|
||
title: o("hotkeys.invoke.title"),
|
||
desc: o("hotkeys.invoke.desc"),
|
||
hotkey: "Ctrl+Enter"
|
||
},
|
||
{
|
||
title: o("hotkeys.cancel.title"),
|
||
desc: o("hotkeys.cancel.desc"),
|
||
hotkey: "Shift+X"
|
||
},
|
||
{
|
||
title: o("hotkeys.focusPrompt.title"),
|
||
desc: o("hotkeys.focusPrompt.desc"),
|
||
hotkey: "Alt+A"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleOptions.title"),
|
||
desc: o("hotkeys.toggleOptions.desc"),
|
||
hotkey: "O"
|
||
},
|
||
{
|
||
title: o("hotkeys.pinOptions.title"),
|
||
desc: o("hotkeys.pinOptions.desc"),
|
||
hotkey: "Shift+O"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleViewer.title"),
|
||
desc: o("hotkeys.toggleViewer.desc"),
|
||
hotkey: "Z"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleGallery.title"),
|
||
desc: o("hotkeys.toggleGallery.desc"),
|
||
hotkey: "G"
|
||
},
|
||
{
|
||
title: o("hotkeys.maximizeWorkSpace.title"),
|
||
desc: o("hotkeys.maximizeWorkSpace.desc"),
|
||
hotkey: "F"
|
||
},
|
||
{
|
||
title: o("hotkeys.changeTabs.title"),
|
||
desc: o("hotkeys.changeTabs.desc"),
|
||
hotkey: "1-5"
|
||
},
|
||
{
|
||
title: o("hotkeys.consoleToggle.title"),
|
||
desc: o("hotkeys.consoleToggle.desc"),
|
||
hotkey: "`"
|
||
}
|
||
], f = [
|
||
{
|
||
title: o("hotkeys.setPrompt.title"),
|
||
desc: o("hotkeys.setPrompt.desc"),
|
||
hotkey: "P"
|
||
},
|
||
{
|
||
title: o("hotkeys.setSeed.title"),
|
||
desc: o("hotkeys.setSeed.desc"),
|
||
hotkey: "S"
|
||
},
|
||
{
|
||
title: o("hotkeys.setParameters.title"),
|
||
desc: o("hotkeys.setParameters.desc"),
|
||
hotkey: "A"
|
||
},
|
||
{
|
||
title: o("hotkeys.restoreFaces.title"),
|
||
desc: o("hotkeys.restoreFaces.desc"),
|
||
hotkey: "Shift+R"
|
||
},
|
||
{
|
||
title: o("hotkeys.upscale.title"),
|
||
desc: o("hotkeys.upscale.desc"),
|
||
hotkey: "Shift+U"
|
||
},
|
||
{
|
||
title: o("hotkeys.showInfo.title"),
|
||
desc: o("hotkeys.showInfo.desc"),
|
||
hotkey: "I"
|
||
},
|
||
{
|
||
title: o("hotkeys.sendToImageToImage.title"),
|
||
desc: o("hotkeys.sendToImageToImage.desc"),
|
||
hotkey: "Shift+I"
|
||
},
|
||
{
|
||
title: o("hotkeys.deleteImage.title"),
|
||
desc: o("hotkeys.deleteImage.desc"),
|
||
hotkey: "Del"
|
||
},
|
||
{
|
||
title: o("hotkeys.closePanels.title"),
|
||
desc: o("hotkeys.closePanels.desc"),
|
||
hotkey: "Esc"
|
||
}
|
||
], h = [
|
||
{
|
||
title: o("hotkeys.previousImage.title"),
|
||
desc: o("hotkeys.previousImage.desc"),
|
||
hotkey: "Arrow Left"
|
||
},
|
||
{
|
||
title: o("hotkeys.nextImage.title"),
|
||
desc: o("hotkeys.nextImage.desc"),
|
||
hotkey: "Arrow Right"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleGalleryPin.title"),
|
||
desc: o("hotkeys.toggleGalleryPin.desc"),
|
||
hotkey: "Shift+G"
|
||
},
|
||
{
|
||
title: o("hotkeys.increaseGalleryThumbSize.title"),
|
||
desc: o("hotkeys.increaseGalleryThumbSize.desc"),
|
||
hotkey: "Shift+Up"
|
||
},
|
||
{
|
||
title: o("hotkeys.decreaseGalleryThumbSize.title"),
|
||
desc: o("hotkeys.decreaseGalleryThumbSize.desc"),
|
||
hotkey: "Shift+Down"
|
||
}
|
||
], y = [
|
||
{
|
||
title: o("hotkeys.selectBrush.title"),
|
||
desc: o("hotkeys.selectBrush.desc"),
|
||
hotkey: "B"
|
||
},
|
||
{
|
||
title: o("hotkeys.selectEraser.title"),
|
||
desc: o("hotkeys.selectEraser.desc"),
|
||
hotkey: "E"
|
||
},
|
||
{
|
||
title: o("hotkeys.decreaseBrushSize.title"),
|
||
desc: o("hotkeys.decreaseBrushSize.desc"),
|
||
hotkey: "["
|
||
},
|
||
{
|
||
title: o("hotkeys.increaseBrushSize.title"),
|
||
desc: o("hotkeys.increaseBrushSize.desc"),
|
||
hotkey: "]"
|
||
},
|
||
{
|
||
title: o("hotkeys.decreaseBrushOpacity.title"),
|
||
desc: o("hotkeys.decreaseBrushOpacity.desc"),
|
||
hotkey: "Shift + ["
|
||
},
|
||
{
|
||
title: o("hotkeys.increaseBrushOpacity.title"),
|
||
desc: o("hotkeys.increaseBrushOpacity.desc"),
|
||
hotkey: "Shift + ]"
|
||
},
|
||
{
|
||
title: o("hotkeys.moveTool.title"),
|
||
desc: o("hotkeys.moveTool.desc"),
|
||
hotkey: "V"
|
||
},
|
||
{
|
||
title: o("hotkeys.fillBoundingBox.title"),
|
||
desc: o("hotkeys.fillBoundingBox.desc"),
|
||
hotkey: "Shift + F"
|
||
},
|
||
{
|
||
title: o("hotkeys.eraseBoundingBox.title"),
|
||
desc: o("hotkeys.eraseBoundingBox.desc"),
|
||
hotkey: "Delete / Backspace"
|
||
},
|
||
{
|
||
title: o("hotkeys.colorPicker.title"),
|
||
desc: o("hotkeys.colorPicker.desc"),
|
||
hotkey: "C"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleSnap.title"),
|
||
desc: o("hotkeys.toggleSnap.desc"),
|
||
hotkey: "N"
|
||
},
|
||
{
|
||
title: o("hotkeys.quickToggleMove.title"),
|
||
desc: o("hotkeys.quickToggleMove.desc"),
|
||
hotkey: "Hold Space"
|
||
},
|
||
{
|
||
title: o("hotkeys.toggleLayer.title"),
|
||
desc: o("hotkeys.toggleLayer.desc"),
|
||
hotkey: "Q"
|
||
},
|
||
{
|
||
title: o("hotkeys.clearMask.title"),
|
||
desc: o("hotkeys.clearMask.desc"),
|
||
hotkey: "Shift+C"
|
||
},
|
||
{
|
||
title: o("hotkeys.hideMask.title"),
|
||
desc: o("hotkeys.hideMask.desc"),
|
||
hotkey: "H"
|
||
},
|
||
{
|
||
title: o("hotkeys.showHideBoundingBox.title"),
|
||
desc: o("hotkeys.showHideBoundingBox.desc"),
|
||
hotkey: "Shift+H"
|
||
},
|
||
{
|
||
title: o("hotkeys.mergeVisible.title"),
|
||
desc: o("hotkeys.mergeVisible.desc"),
|
||
hotkey: "Shift+M"
|
||
},
|
||
{
|
||
title: o("hotkeys.saveToGallery.title"),
|
||
desc: o("hotkeys.saveToGallery.desc"),
|
||
hotkey: "Shift+S"
|
||
},
|
||
{
|
||
title: o("hotkeys.copyToClipboard.title"),
|
||
desc: o("hotkeys.copyToClipboard.desc"),
|
||
hotkey: "Ctrl+C"
|
||
},
|
||
{
|
||
title: o("hotkeys.downloadImage.title"),
|
||
desc: o("hotkeys.downloadImage.desc"),
|
||
hotkey: "Shift+D"
|
||
},
|
||
{
|
||
title: o("hotkeys.undoStroke.title"),
|
||
desc: o("hotkeys.undoStroke.desc"),
|
||
hotkey: "Ctrl+Z"
|
||
},
|
||
{
|
||
title: o("hotkeys.redoStroke.title"),
|
||
desc: o("hotkeys.redoStroke.desc"),
|
||
hotkey: "Ctrl+Shift+Z, Ctrl+Y"
|
||
},
|
||
{
|
||
title: o("hotkeys.resetView.title"),
|
||
desc: o("hotkeys.resetView.desc"),
|
||
hotkey: "R"
|
||
},
|
||
{
|
||
title: o("hotkeys.previousStagingImage.title"),
|
||
desc: o("hotkeys.previousStagingImage.desc"),
|
||
hotkey: "Arrow Left"
|
||
},
|
||
{
|
||
title: o("hotkeys.nextStagingImage.title"),
|
||
desc: o("hotkeys.nextStagingImage.desc"),
|
||
hotkey: "Arrow Right"
|
||
},
|
||
{
|
||
title: o("hotkeys.acceptStagingImage.title"),
|
||
desc: o("hotkeys.acceptStagingImage.desc"),
|
||
hotkey: "Enter"
|
||
}
|
||
], m = (x) => /* @__PURE__ */ c.jsx(ce, { flexDir: "column", gap: 4, children: x.map((b, E) => /* @__PURE__ */ c.jsxs(ce, { flexDir: "column", px: 2, gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
gY,
|
||
{
|
||
title: b.title,
|
||
description: b.desc,
|
||
hotkey: b.hotkey
|
||
}
|
||
),
|
||
E < x.length - 1 && /* @__PURE__ */ c.jsx(Qj, {})
|
||
] }, E)) });
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
Ci(e, {
|
||
onClick: n
|
||
}),
|
||
/* @__PURE__ */ c.jsxs(ql, { isOpen: t, onClose: i, children: [
|
||
/* @__PURE__ */ c.jsx(Bs, {}),
|
||
/* @__PURE__ */ c.jsxs(Yl, { children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { children: o("hotkeys.keyboardShortcuts") }),
|
||
/* @__PURE__ */ c.jsx(jf, {}),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsxs(hS, { allowMultiple: !0, children: [
|
||
/* @__PURE__ */ c.jsxs(Jd, { children: [
|
||
/* @__PURE__ */ c.jsx(Kd, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
width: "100%",
|
||
justifyContent: "space-between",
|
||
alignItems: "center",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("h2", { children: o("hotkeys.appHotkeys") }),
|
||
/* @__PURE__ */ c.jsx(Zd, {})
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(ef, { children: m(l) })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jd, { children: [
|
||
/* @__PURE__ */ c.jsx(Kd, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
width: "100%",
|
||
justifyContent: "space-between",
|
||
alignItems: "center",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("h2", { children: o("hotkeys.generalHotkeys") }),
|
||
/* @__PURE__ */ c.jsx(Zd, {})
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(ef, { children: m(f) })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jd, { children: [
|
||
/* @__PURE__ */ c.jsx(Kd, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
width: "100%",
|
||
justifyContent: "space-between",
|
||
alignItems: "center",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("h2", { children: o("hotkeys.galleryHotkeys") }),
|
||
/* @__PURE__ */ c.jsx(Zd, {})
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(ef, { children: m(h) })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Jd, { children: [
|
||
/* @__PURE__ */ c.jsx(Kd, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
width: "100%",
|
||
justifyContent: "space-between",
|
||
alignItems: "center",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx("h2", { children: o("hotkeys.unifiedCanvasHotkeys") }),
|
||
/* @__PURE__ */ c.jsx(Zd, {})
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(ef, { children: m(y) })
|
||
] })
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsx(Ls, {})
|
||
] })
|
||
] })
|
||
] });
|
||
}
|
||
var c5 = Array.isArray, d5 = Object.keys, xY = Object.prototype.hasOwnProperty, SY = typeof Element < "u";
|
||
function Kx(e, t) {
|
||
if (e === t)
|
||
return !0;
|
||
if (e && t && typeof e == "object" && typeof t == "object") {
|
||
var n = c5(e), i = c5(t), o, l, f;
|
||
if (n && i) {
|
||
if (l = e.length, l != t.length)
|
||
return !1;
|
||
for (o = l; o-- !== 0; )
|
||
if (!Kx(e[o], t[o]))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
if (n != i)
|
||
return !1;
|
||
var h = e instanceof Date, y = t instanceof Date;
|
||
if (h != y)
|
||
return !1;
|
||
if (h && y)
|
||
return e.getTime() == t.getTime();
|
||
var m = e instanceof RegExp, x = t instanceof RegExp;
|
||
if (m != x)
|
||
return !1;
|
||
if (m && x)
|
||
return e.toString() == t.toString();
|
||
var b = d5(e);
|
||
if (l = b.length, l !== d5(t).length)
|
||
return !1;
|
||
for (o = l; o-- !== 0; )
|
||
if (!xY.call(t, b[o]))
|
||
return !1;
|
||
if (SY && e instanceof Element && t instanceof Element)
|
||
return e === t;
|
||
for (o = l; o-- !== 0; )
|
||
if (f = b[o], !(f === "_owner" && e.$$typeof) && !Kx(e[f], t[f]))
|
||
return !1;
|
||
return !0;
|
||
}
|
||
return e !== e && t !== t;
|
||
}
|
||
var Fl = function(t, n) {
|
||
try {
|
||
return Kx(t, n);
|
||
} catch (i) {
|
||
if (i.message && i.message.match(/stack|recursion/i) || i.number === -2146828260)
|
||
return console.warn("Warning: react-fast-compare does not handle circular references.", i.name, i.message), !1;
|
||
throw i;
|
||
}
|
||
}, bY = function(t) {
|
||
return CY(t) && !wY(t);
|
||
};
|
||
function CY(e) {
|
||
return !!e && typeof e == "object";
|
||
}
|
||
function wY(e) {
|
||
var t = Object.prototype.toString.call(e);
|
||
return t === "[object RegExp]" || t === "[object Date]" || TY(e);
|
||
}
|
||
var EY = typeof Symbol == "function" && Symbol.for, jY = EY ? Symbol.for("react.element") : 60103;
|
||
function TY(e) {
|
||
return e.$$typeof === jY;
|
||
}
|
||
function DY(e) {
|
||
return Array.isArray(e) ? [] : {};
|
||
}
|
||
function $g(e, t) {
|
||
return t.clone !== !1 && t.isMergeableObject(e) ? Dh(DY(e), e, t) : e;
|
||
}
|
||
function MY(e, t, n) {
|
||
return e.concat(t).map(function(i) {
|
||
return $g(i, n);
|
||
});
|
||
}
|
||
function RY(e, t, n) {
|
||
var i = {};
|
||
return n.isMergeableObject(e) && Object.keys(e).forEach(function(o) {
|
||
i[o] = $g(e[o], n);
|
||
}), Object.keys(t).forEach(function(o) {
|
||
!n.isMergeableObject(t[o]) || !e[o] ? i[o] = $g(t[o], n) : i[o] = Dh(e[o], t[o], n);
|
||
}), i;
|
||
}
|
||
function Dh(e, t, n) {
|
||
n = n || {}, n.arrayMerge = n.arrayMerge || MY, n.isMergeableObject = n.isMergeableObject || bY;
|
||
var i = Array.isArray(t), o = Array.isArray(e), l = i === o;
|
||
return l ? i ? n.arrayMerge(e, t, n) : RY(e, t, n) : $g(t, n);
|
||
}
|
||
Dh.all = function(t, n) {
|
||
if (!Array.isArray(t))
|
||
throw new Error("first argument should be an array");
|
||
return t.reduce(function(i, o) {
|
||
return Dh(i, o, n);
|
||
}, {});
|
||
};
|
||
var Zx = Dh, kY = typeof global == "object" && global && global.Object === Object && global;
|
||
const yM = kY;
|
||
var PY = typeof self == "object" && self && self.Object === Object && self, OY = yM || PY || Function("return this")();
|
||
const is = OY;
|
||
var AY = is.Symbol;
|
||
const Ql = AY;
|
||
var xM = Object.prototype, NY = xM.hasOwnProperty, zY = xM.toString, sh = Ql ? Ql.toStringTag : void 0;
|
||
function IY(e) {
|
||
var t = NY.call(e, sh), n = e[sh];
|
||
try {
|
||
e[sh] = void 0;
|
||
var i = !0;
|
||
} catch {
|
||
}
|
||
var o = zY.call(e);
|
||
return i && (t ? e[sh] = n : delete e[sh]), o;
|
||
}
|
||
var LY = Object.prototype, FY = LY.toString;
|
||
function BY(e) {
|
||
return FY.call(e);
|
||
}
|
||
var _Y = "[object Null]", UY = "[object Undefined]", f5 = Ql ? Ql.toStringTag : void 0;
|
||
function gc(e) {
|
||
return e == null ? e === void 0 ? UY : _Y : f5 && f5 in Object(e) ? IY(e) : BY(e);
|
||
}
|
||
function SM(e, t) {
|
||
return function(n) {
|
||
return e(t(n));
|
||
};
|
||
}
|
||
var HY = SM(Object.getPrototypeOf, Object);
|
||
const Gb = HY;
|
||
function yc(e) {
|
||
return e != null && typeof e == "object";
|
||
}
|
||
var VY = "[object Object]", WY = Function.prototype, GY = Object.prototype, bM = WY.toString, qY = GY.hasOwnProperty, YY = bM.call(Object);
|
||
function p5(e) {
|
||
if (!yc(e) || gc(e) != VY)
|
||
return !1;
|
||
var t = Gb(e);
|
||
if (t === null)
|
||
return !0;
|
||
var n = qY.call(t, "constructor") && t.constructor;
|
||
return typeof n == "function" && n instanceof n && bM.call(n) == YY;
|
||
}
|
||
function QY() {
|
||
this.__data__ = [], this.size = 0;
|
||
}
|
||
function CM(e, t) {
|
||
return e === t || e !== e && t !== t;
|
||
}
|
||
function M0(e, t) {
|
||
for (var n = e.length; n--; )
|
||
if (CM(e[n][0], t))
|
||
return n;
|
||
return -1;
|
||
}
|
||
var XY = Array.prototype, KY = XY.splice;
|
||
function ZY(e) {
|
||
var t = this.__data__, n = M0(t, e);
|
||
if (n < 0)
|
||
return !1;
|
||
var i = t.length - 1;
|
||
return n == i ? t.pop() : KY.call(t, n, 1), --this.size, !0;
|
||
}
|
||
function JY(e) {
|
||
var t = this.__data__, n = M0(t, e);
|
||
return n < 0 ? void 0 : t[n][1];
|
||
}
|
||
function $Y(e) {
|
||
return M0(this.__data__, e) > -1;
|
||
}
|
||
function eQ(e, t) {
|
||
var n = this.__data__, i = M0(n, e);
|
||
return i < 0 ? (++this.size, n.push([e, t])) : n[i][1] = t, this;
|
||
}
|
||
function Ys(e) {
|
||
var t = -1, n = e == null ? 0 : e.length;
|
||
for (this.clear(); ++t < n; ) {
|
||
var i = e[t];
|
||
this.set(i[0], i[1]);
|
||
}
|
||
}
|
||
Ys.prototype.clear = QY;
|
||
Ys.prototype.delete = ZY;
|
||
Ys.prototype.get = JY;
|
||
Ys.prototype.has = $Y;
|
||
Ys.prototype.set = eQ;
|
||
function tQ() {
|
||
this.__data__ = new Ys(), this.size = 0;
|
||
}
|
||
function nQ(e) {
|
||
var t = this.__data__, n = t.delete(e);
|
||
return this.size = t.size, n;
|
||
}
|
||
function rQ(e) {
|
||
return this.__data__.get(e);
|
||
}
|
||
function aQ(e) {
|
||
return this.__data__.has(e);
|
||
}
|
||
function Qh(e) {
|
||
var t = typeof e;
|
||
return e != null && (t == "object" || t == "function");
|
||
}
|
||
var iQ = "[object AsyncFunction]", oQ = "[object Function]", sQ = "[object GeneratorFunction]", lQ = "[object Proxy]";
|
||
function wM(e) {
|
||
if (!Qh(e))
|
||
return !1;
|
||
var t = gc(e);
|
||
return t == oQ || t == sQ || t == iQ || t == lQ;
|
||
}
|
||
var uQ = is["__core-js_shared__"];
|
||
const X2 = uQ;
|
||
var h5 = function() {
|
||
var e = /[^.]+$/.exec(X2 && X2.keys && X2.keys.IE_PROTO || "");
|
||
return e ? "Symbol(src)_1." + e : "";
|
||
}();
|
||
function cQ(e) {
|
||
return !!h5 && h5 in e;
|
||
}
|
||
var dQ = Function.prototype, fQ = dQ.toString;
|
||
function xc(e) {
|
||
if (e != null) {
|
||
try {
|
||
return fQ.call(e);
|
||
} catch {
|
||
}
|
||
try {
|
||
return e + "";
|
||
} catch {
|
||
}
|
||
}
|
||
return "";
|
||
}
|
||
var pQ = /[\\^$.*+?()[\]{}|]/g, hQ = /^\[object .+?Constructor\]$/, vQ = Function.prototype, mQ = Object.prototype, gQ = vQ.toString, yQ = mQ.hasOwnProperty, xQ = RegExp(
|
||
"^" + gQ.call(yQ).replace(pQ, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
||
);
|
||
function SQ(e) {
|
||
if (!Qh(e) || cQ(e))
|
||
return !1;
|
||
var t = wM(e) ? xQ : hQ;
|
||
return t.test(xc(e));
|
||
}
|
||
function bQ(e, t) {
|
||
return e == null ? void 0 : e[t];
|
||
}
|
||
function Sc(e, t) {
|
||
var n = bQ(e, t);
|
||
return SQ(n) ? n : void 0;
|
||
}
|
||
var CQ = Sc(is, "Map");
|
||
const Mh = CQ;
|
||
var wQ = Sc(Object, "create");
|
||
const Rh = wQ;
|
||
function EQ() {
|
||
this.__data__ = Rh ? Rh(null) : {}, this.size = 0;
|
||
}
|
||
function jQ(e) {
|
||
var t = this.has(e) && delete this.__data__[e];
|
||
return this.size -= t ? 1 : 0, t;
|
||
}
|
||
var TQ = "__lodash_hash_undefined__", DQ = Object.prototype, MQ = DQ.hasOwnProperty;
|
||
function RQ(e) {
|
||
var t = this.__data__;
|
||
if (Rh) {
|
||
var n = t[e];
|
||
return n === TQ ? void 0 : n;
|
||
}
|
||
return MQ.call(t, e) ? t[e] : void 0;
|
||
}
|
||
var kQ = Object.prototype, PQ = kQ.hasOwnProperty;
|
||
function OQ(e) {
|
||
var t = this.__data__;
|
||
return Rh ? t[e] !== void 0 : PQ.call(t, e);
|
||
}
|
||
var AQ = "__lodash_hash_undefined__";
|
||
function NQ(e, t) {
|
||
var n = this.__data__;
|
||
return this.size += this.has(e) ? 0 : 1, n[e] = Rh && t === void 0 ? AQ : t, this;
|
||
}
|
||
function lc(e) {
|
||
var t = -1, n = e == null ? 0 : e.length;
|
||
for (this.clear(); ++t < n; ) {
|
||
var i = e[t];
|
||
this.set(i[0], i[1]);
|
||
}
|
||
}
|
||
lc.prototype.clear = EQ;
|
||
lc.prototype.delete = jQ;
|
||
lc.prototype.get = RQ;
|
||
lc.prototype.has = OQ;
|
||
lc.prototype.set = NQ;
|
||
function zQ() {
|
||
this.size = 0, this.__data__ = {
|
||
hash: new lc(),
|
||
map: new (Mh || Ys)(),
|
||
string: new lc()
|
||
};
|
||
}
|
||
function IQ(e) {
|
||
var t = typeof e;
|
||
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
||
}
|
||
function R0(e, t) {
|
||
var n = e.__data__;
|
||
return IQ(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
||
}
|
||
function LQ(e) {
|
||
var t = R0(this, e).delete(e);
|
||
return this.size -= t ? 1 : 0, t;
|
||
}
|
||
function FQ(e) {
|
||
return R0(this, e).get(e);
|
||
}
|
||
function BQ(e) {
|
||
return R0(this, e).has(e);
|
||
}
|
||
function _Q(e, t) {
|
||
var n = R0(this, e), i = n.size;
|
||
return n.set(e, t), this.size += n.size == i ? 0 : 1, this;
|
||
}
|
||
function tu(e) {
|
||
var t = -1, n = e == null ? 0 : e.length;
|
||
for (this.clear(); ++t < n; ) {
|
||
var i = e[t];
|
||
this.set(i[0], i[1]);
|
||
}
|
||
}
|
||
tu.prototype.clear = zQ;
|
||
tu.prototype.delete = LQ;
|
||
tu.prototype.get = FQ;
|
||
tu.prototype.has = BQ;
|
||
tu.prototype.set = _Q;
|
||
var UQ = 200;
|
||
function HQ(e, t) {
|
||
var n = this.__data__;
|
||
if (n instanceof Ys) {
|
||
var i = n.__data__;
|
||
if (!Mh || i.length < UQ - 1)
|
||
return i.push([e, t]), this.size = ++n.size, this;
|
||
n = this.__data__ = new tu(i);
|
||
}
|
||
return n.set(e, t), this.size = n.size, this;
|
||
}
|
||
function Tf(e) {
|
||
var t = this.__data__ = new Ys(e);
|
||
this.size = t.size;
|
||
}
|
||
Tf.prototype.clear = tQ;
|
||
Tf.prototype.delete = nQ;
|
||
Tf.prototype.get = rQ;
|
||
Tf.prototype.has = aQ;
|
||
Tf.prototype.set = HQ;
|
||
function VQ(e, t) {
|
||
for (var n = -1, i = e == null ? 0 : e.length; ++n < i && t(e[n], n, e) !== !1; )
|
||
;
|
||
return e;
|
||
}
|
||
var WQ = function() {
|
||
try {
|
||
var e = Sc(Object, "defineProperty");
|
||
return e({}, "", {}), e;
|
||
} catch {
|
||
}
|
||
}();
|
||
const v5 = WQ;
|
||
function EM(e, t, n) {
|
||
t == "__proto__" && v5 ? v5(e, t, {
|
||
configurable: !0,
|
||
enumerable: !0,
|
||
value: n,
|
||
writable: !0
|
||
}) : e[t] = n;
|
||
}
|
||
var GQ = Object.prototype, qQ = GQ.hasOwnProperty;
|
||
function jM(e, t, n) {
|
||
var i = e[t];
|
||
(!(qQ.call(e, t) && CM(i, n)) || n === void 0 && !(t in e)) && EM(e, t, n);
|
||
}
|
||
function k0(e, t, n, i) {
|
||
var o = !n;
|
||
n || (n = {});
|
||
for (var l = -1, f = t.length; ++l < f; ) {
|
||
var h = t[l], y = i ? i(n[h], e[h], h, n, e) : void 0;
|
||
y === void 0 && (y = e[h]), o ? EM(n, h, y) : jM(n, h, y);
|
||
}
|
||
return n;
|
||
}
|
||
function YQ(e, t) {
|
||
for (var n = -1, i = Array(e); ++n < e; )
|
||
i[n] = t(n);
|
||
return i;
|
||
}
|
||
var QQ = "[object Arguments]";
|
||
function m5(e) {
|
||
return yc(e) && gc(e) == QQ;
|
||
}
|
||
var TM = Object.prototype, XQ = TM.hasOwnProperty, KQ = TM.propertyIsEnumerable, ZQ = m5(function() {
|
||
return arguments;
|
||
}()) ? m5 : function(e) {
|
||
return yc(e) && XQ.call(e, "callee") && !KQ.call(e, "callee");
|
||
};
|
||
const JQ = ZQ;
|
||
var $Q = Array.isArray;
|
||
const Xh = $Q;
|
||
function eX() {
|
||
return !1;
|
||
}
|
||
var DM = typeof exports == "object" && exports && !exports.nodeType && exports, g5 = DM && typeof module == "object" && module && !module.nodeType && module, tX = g5 && g5.exports === DM, y5 = tX ? is.Buffer : void 0, nX = y5 ? y5.isBuffer : void 0, rX = nX || eX;
|
||
const MM = rX;
|
||
var aX = 9007199254740991, iX = /^(?:0|[1-9]\d*)$/;
|
||
function oX(e, t) {
|
||
var n = typeof e;
|
||
return t = t ?? aX, !!t && (n == "number" || n != "symbol" && iX.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
||
}
|
||
var sX = 9007199254740991;
|
||
function RM(e) {
|
||
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= sX;
|
||
}
|
||
var lX = "[object Arguments]", uX = "[object Array]", cX = "[object Boolean]", dX = "[object Date]", fX = "[object Error]", pX = "[object Function]", hX = "[object Map]", vX = "[object Number]", mX = "[object Object]", gX = "[object RegExp]", yX = "[object Set]", xX = "[object String]", SX = "[object WeakMap]", bX = "[object ArrayBuffer]", CX = "[object DataView]", wX = "[object Float32Array]", EX = "[object Float64Array]", jX = "[object Int8Array]", TX = "[object Int16Array]", DX = "[object Int32Array]", MX = "[object Uint8Array]", RX = "[object Uint8ClampedArray]", kX = "[object Uint16Array]", PX = "[object Uint32Array]", Wn = {};
|
||
Wn[wX] = Wn[EX] = Wn[jX] = Wn[TX] = Wn[DX] = Wn[MX] = Wn[RX] = Wn[kX] = Wn[PX] = !0;
|
||
Wn[lX] = Wn[uX] = Wn[bX] = Wn[cX] = Wn[CX] = Wn[dX] = Wn[fX] = Wn[pX] = Wn[hX] = Wn[vX] = Wn[mX] = Wn[gX] = Wn[yX] = Wn[xX] = Wn[SX] = !1;
|
||
function OX(e) {
|
||
return yc(e) && RM(e.length) && !!Wn[gc(e)];
|
||
}
|
||
function qb(e) {
|
||
return function(t) {
|
||
return e(t);
|
||
};
|
||
}
|
||
var kM = typeof exports == "object" && exports && !exports.nodeType && exports, mh = kM && typeof module == "object" && module && !module.nodeType && module, AX = mh && mh.exports === kM, K2 = AX && yM.process, NX = function() {
|
||
try {
|
||
var e = mh && mh.require && mh.require("util").types;
|
||
return e || K2 && K2.binding && K2.binding("util");
|
||
} catch {
|
||
}
|
||
}();
|
||
const yf = NX;
|
||
var x5 = yf && yf.isTypedArray, zX = x5 ? qb(x5) : OX;
|
||
const IX = zX;
|
||
var LX = Object.prototype, FX = LX.hasOwnProperty;
|
||
function PM(e, t) {
|
||
var n = Xh(e), i = !n && JQ(e), o = !n && !i && MM(e), l = !n && !i && !o && IX(e), f = n || i || o || l, h = f ? YQ(e.length, String) : [], y = h.length;
|
||
for (var m in e)
|
||
(t || FX.call(e, m)) && !(f && // Safari 9 has enumerable `arguments.length` in strict mode.
|
||
(m == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
||
o && (m == "offset" || m == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
||
l && (m == "buffer" || m == "byteLength" || m == "byteOffset") || // Skip index properties.
|
||
oX(m, y))) && h.push(m);
|
||
return h;
|
||
}
|
||
var BX = Object.prototype;
|
||
function Yb(e) {
|
||
var t = e && e.constructor, n = typeof t == "function" && t.prototype || BX;
|
||
return e === n;
|
||
}
|
||
var _X = SM(Object.keys, Object);
|
||
const UX = _X;
|
||
var HX = Object.prototype, VX = HX.hasOwnProperty;
|
||
function WX(e) {
|
||
if (!Yb(e))
|
||
return UX(e);
|
||
var t = [];
|
||
for (var n in Object(e))
|
||
VX.call(e, n) && n != "constructor" && t.push(n);
|
||
return t;
|
||
}
|
||
function OM(e) {
|
||
return e != null && RM(e.length) && !wM(e);
|
||
}
|
||
function Qb(e) {
|
||
return OM(e) ? PM(e) : WX(e);
|
||
}
|
||
function GX(e, t) {
|
||
return e && k0(t, Qb(t), e);
|
||
}
|
||
function qX(e) {
|
||
var t = [];
|
||
if (e != null)
|
||
for (var n in Object(e))
|
||
t.push(n);
|
||
return t;
|
||
}
|
||
var YX = Object.prototype, QX = YX.hasOwnProperty;
|
||
function XX(e) {
|
||
if (!Qh(e))
|
||
return qX(e);
|
||
var t = Yb(e), n = [];
|
||
for (var i in e)
|
||
i == "constructor" && (t || !QX.call(e, i)) || n.push(i);
|
||
return n;
|
||
}
|
||
function Xb(e) {
|
||
return OM(e) ? PM(e, !0) : XX(e);
|
||
}
|
||
function KX(e, t) {
|
||
return e && k0(t, Xb(t), e);
|
||
}
|
||
var AM = typeof exports == "object" && exports && !exports.nodeType && exports, S5 = AM && typeof module == "object" && module && !module.nodeType && module, ZX = S5 && S5.exports === AM, b5 = ZX ? is.Buffer : void 0, C5 = b5 ? b5.allocUnsafe : void 0;
|
||
function JX(e, t) {
|
||
if (t)
|
||
return e.slice();
|
||
var n = e.length, i = C5 ? C5(n) : new e.constructor(n);
|
||
return e.copy(i), i;
|
||
}
|
||
function NM(e, t) {
|
||
var n = -1, i = e.length;
|
||
for (t || (t = Array(i)); ++n < i; )
|
||
t[n] = e[n];
|
||
return t;
|
||
}
|
||
function $X(e, t) {
|
||
for (var n = -1, i = e == null ? 0 : e.length, o = 0, l = []; ++n < i; ) {
|
||
var f = e[n];
|
||
t(f, n, e) && (l[o++] = f);
|
||
}
|
||
return l;
|
||
}
|
||
function zM() {
|
||
return [];
|
||
}
|
||
var eK = Object.prototype, tK = eK.propertyIsEnumerable, w5 = Object.getOwnPropertySymbols, nK = w5 ? function(e) {
|
||
return e == null ? [] : (e = Object(e), $X(w5(e), function(t) {
|
||
return tK.call(e, t);
|
||
}));
|
||
} : zM;
|
||
const Kb = nK;
|
||
function rK(e, t) {
|
||
return k0(e, Kb(e), t);
|
||
}
|
||
function IM(e, t) {
|
||
for (var n = -1, i = t.length, o = e.length; ++n < i; )
|
||
e[o + n] = t[n];
|
||
return e;
|
||
}
|
||
var aK = Object.getOwnPropertySymbols, iK = aK ? function(e) {
|
||
for (var t = []; e; )
|
||
IM(t, Kb(e)), e = Gb(e);
|
||
return t;
|
||
} : zM;
|
||
const LM = iK;
|
||
function oK(e, t) {
|
||
return k0(e, LM(e), t);
|
||
}
|
||
function FM(e, t, n) {
|
||
var i = t(e);
|
||
return Xh(e) ? i : IM(i, n(e));
|
||
}
|
||
function sK(e) {
|
||
return FM(e, Qb, Kb);
|
||
}
|
||
function lK(e) {
|
||
return FM(e, Xb, LM);
|
||
}
|
||
var uK = Sc(is, "DataView");
|
||
const Jx = uK;
|
||
var cK = Sc(is, "Promise");
|
||
const $x = cK;
|
||
var dK = Sc(is, "Set");
|
||
const eS = dK;
|
||
var fK = Sc(is, "WeakMap");
|
||
const tS = fK;
|
||
var E5 = "[object Map]", pK = "[object Object]", j5 = "[object Promise]", T5 = "[object Set]", D5 = "[object WeakMap]", M5 = "[object DataView]", hK = xc(Jx), vK = xc(Mh), mK = xc($x), gK = xc(eS), yK = xc(tS), qu = gc;
|
||
(Jx && qu(new Jx(new ArrayBuffer(1))) != M5 || Mh && qu(new Mh()) != E5 || $x && qu($x.resolve()) != j5 || eS && qu(new eS()) != T5 || tS && qu(new tS()) != D5) && (qu = function(e) {
|
||
var t = gc(e), n = t == pK ? e.constructor : void 0, i = n ? xc(n) : "";
|
||
if (i)
|
||
switch (i) {
|
||
case hK:
|
||
return M5;
|
||
case vK:
|
||
return E5;
|
||
case mK:
|
||
return j5;
|
||
case gK:
|
||
return T5;
|
||
case yK:
|
||
return D5;
|
||
}
|
||
return t;
|
||
});
|
||
const Zb = qu;
|
||
var xK = Object.prototype, SK = xK.hasOwnProperty;
|
||
function bK(e) {
|
||
var t = e.length, n = new e.constructor(t);
|
||
return t && typeof e[0] == "string" && SK.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
||
}
|
||
var CK = is.Uint8Array;
|
||
const R5 = CK;
|
||
function Jb(e) {
|
||
var t = new e.constructor(e.byteLength);
|
||
return new R5(t).set(new R5(e)), t;
|
||
}
|
||
function wK(e, t) {
|
||
var n = t ? Jb(e.buffer) : e.buffer;
|
||
return new e.constructor(n, e.byteOffset, e.byteLength);
|
||
}
|
||
var EK = /\w*$/;
|
||
function jK(e) {
|
||
var t = new e.constructor(e.source, EK.exec(e));
|
||
return t.lastIndex = e.lastIndex, t;
|
||
}
|
||
var k5 = Ql ? Ql.prototype : void 0, P5 = k5 ? k5.valueOf : void 0;
|
||
function TK(e) {
|
||
return P5 ? Object(P5.call(e)) : {};
|
||
}
|
||
function DK(e, t) {
|
||
var n = t ? Jb(e.buffer) : e.buffer;
|
||
return new e.constructor(n, e.byteOffset, e.length);
|
||
}
|
||
var MK = "[object Boolean]", RK = "[object Date]", kK = "[object Map]", PK = "[object Number]", OK = "[object RegExp]", AK = "[object Set]", NK = "[object String]", zK = "[object Symbol]", IK = "[object ArrayBuffer]", LK = "[object DataView]", FK = "[object Float32Array]", BK = "[object Float64Array]", _K = "[object Int8Array]", UK = "[object Int16Array]", HK = "[object Int32Array]", VK = "[object Uint8Array]", WK = "[object Uint8ClampedArray]", GK = "[object Uint16Array]", qK = "[object Uint32Array]";
|
||
function YK(e, t, n) {
|
||
var i = e.constructor;
|
||
switch (t) {
|
||
case IK:
|
||
return Jb(e);
|
||
case MK:
|
||
case RK:
|
||
return new i(+e);
|
||
case LK:
|
||
return wK(e, n);
|
||
case FK:
|
||
case BK:
|
||
case _K:
|
||
case UK:
|
||
case HK:
|
||
case VK:
|
||
case WK:
|
||
case GK:
|
||
case qK:
|
||
return DK(e, n);
|
||
case kK:
|
||
return new i();
|
||
case PK:
|
||
case NK:
|
||
return new i(e);
|
||
case OK:
|
||
return jK(e);
|
||
case AK:
|
||
return new i();
|
||
case zK:
|
||
return TK(e);
|
||
}
|
||
}
|
||
var O5 = Object.create, QK = function() {
|
||
function e() {
|
||
}
|
||
return function(t) {
|
||
if (!Qh(t))
|
||
return {};
|
||
if (O5)
|
||
return O5(t);
|
||
e.prototype = t;
|
||
var n = new e();
|
||
return e.prototype = void 0, n;
|
||
};
|
||
}();
|
||
const XK = QK;
|
||
function KK(e) {
|
||
return typeof e.constructor == "function" && !Yb(e) ? XK(Gb(e)) : {};
|
||
}
|
||
var ZK = "[object Map]";
|
||
function JK(e) {
|
||
return yc(e) && Zb(e) == ZK;
|
||
}
|
||
var A5 = yf && yf.isMap, $K = A5 ? qb(A5) : JK;
|
||
const eZ = $K;
|
||
var tZ = "[object Set]";
|
||
function nZ(e) {
|
||
return yc(e) && Zb(e) == tZ;
|
||
}
|
||
var N5 = yf && yf.isSet, rZ = N5 ? qb(N5) : nZ;
|
||
const aZ = rZ;
|
||
var iZ = 1, oZ = 2, sZ = 4, BM = "[object Arguments]", lZ = "[object Array]", uZ = "[object Boolean]", cZ = "[object Date]", dZ = "[object Error]", _M = "[object Function]", fZ = "[object GeneratorFunction]", pZ = "[object Map]", hZ = "[object Number]", UM = "[object Object]", vZ = "[object RegExp]", mZ = "[object Set]", gZ = "[object String]", yZ = "[object Symbol]", xZ = "[object WeakMap]", SZ = "[object ArrayBuffer]", bZ = "[object DataView]", CZ = "[object Float32Array]", wZ = "[object Float64Array]", EZ = "[object Int8Array]", jZ = "[object Int16Array]", TZ = "[object Int32Array]", DZ = "[object Uint8Array]", MZ = "[object Uint8ClampedArray]", RZ = "[object Uint16Array]", kZ = "[object Uint32Array]", Vn = {};
|
||
Vn[BM] = Vn[lZ] = Vn[SZ] = Vn[bZ] = Vn[uZ] = Vn[cZ] = Vn[CZ] = Vn[wZ] = Vn[EZ] = Vn[jZ] = Vn[TZ] = Vn[pZ] = Vn[hZ] = Vn[UM] = Vn[vZ] = Vn[mZ] = Vn[gZ] = Vn[yZ] = Vn[DZ] = Vn[MZ] = Vn[RZ] = Vn[kZ] = !0;
|
||
Vn[dZ] = Vn[_M] = Vn[xZ] = !1;
|
||
function gh(e, t, n, i, o, l) {
|
||
var f, h = t & iZ, y = t & oZ, m = t & sZ;
|
||
if (n && (f = o ? n(e, i, o, l) : n(e)), f !== void 0)
|
||
return f;
|
||
if (!Qh(e))
|
||
return e;
|
||
var x = Xh(e);
|
||
if (x) {
|
||
if (f = bK(e), !h)
|
||
return NM(e, f);
|
||
} else {
|
||
var b = Zb(e), E = b == _M || b == fZ;
|
||
if (MM(e))
|
||
return JX(e, h);
|
||
if (b == UM || b == BM || E && !o) {
|
||
if (f = y || E ? {} : KK(e), !h)
|
||
return y ? oK(e, KX(f, e)) : rK(e, GX(f, e));
|
||
} else {
|
||
if (!Vn[b])
|
||
return o ? e : {};
|
||
f = YK(e, b, h);
|
||
}
|
||
}
|
||
l || (l = new Tf());
|
||
var j = l.get(e);
|
||
if (j)
|
||
return j;
|
||
l.set(e, f), aZ(e) ? e.forEach(function(k) {
|
||
f.add(gh(k, t, n, k, e, l));
|
||
}) : eZ(e) && e.forEach(function(k, A) {
|
||
f.set(A, gh(k, t, n, A, e, l));
|
||
});
|
||
var M = m ? y ? lK : sK : y ? Xb : Qb, R = x ? void 0 : M(e);
|
||
return VQ(R || e, function(k, A) {
|
||
R && (A = k, k = e[A]), jM(f, A, gh(k, t, n, A, e, l));
|
||
}), f;
|
||
}
|
||
var PZ = 4;
|
||
function z5(e) {
|
||
return gh(e, PZ);
|
||
}
|
||
function HM(e, t) {
|
||
for (var n = -1, i = e == null ? 0 : e.length, o = Array(i); ++n < i; )
|
||
o[n] = t(e[n], n, e);
|
||
return o;
|
||
}
|
||
var OZ = "[object Symbol]";
|
||
function $b(e) {
|
||
return typeof e == "symbol" || yc(e) && gc(e) == OZ;
|
||
}
|
||
var AZ = "Expected a function";
|
||
function eC(e, t) {
|
||
if (typeof e != "function" || t != null && typeof t != "function")
|
||
throw new TypeError(AZ);
|
||
var n = function() {
|
||
var i = arguments, o = t ? t.apply(this, i) : i[0], l = n.cache;
|
||
if (l.has(o))
|
||
return l.get(o);
|
||
var f = e.apply(this, i);
|
||
return n.cache = l.set(o, f) || l, f;
|
||
};
|
||
return n.cache = new (eC.Cache || tu)(), n;
|
||
}
|
||
eC.Cache = tu;
|
||
var NZ = 500;
|
||
function zZ(e) {
|
||
var t = eC(e, function(i) {
|
||
return n.size === NZ && n.clear(), i;
|
||
}), n = t.cache;
|
||
return t;
|
||
}
|
||
var IZ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, LZ = /\\(\\)?/g, FZ = zZ(function(e) {
|
||
var t = [];
|
||
return e.charCodeAt(0) === 46 && t.push(""), e.replace(IZ, function(n, i, o, l) {
|
||
t.push(o ? l.replace(LZ, "$1") : i || n);
|
||
}), t;
|
||
});
|
||
const BZ = FZ;
|
||
var _Z = 1 / 0;
|
||
function UZ(e) {
|
||
if (typeof e == "string" || $b(e))
|
||
return e;
|
||
var t = e + "";
|
||
return t == "0" && 1 / e == -_Z ? "-0" : t;
|
||
}
|
||
var HZ = 1 / 0, I5 = Ql ? Ql.prototype : void 0, L5 = I5 ? I5.toString : void 0;
|
||
function VM(e) {
|
||
if (typeof e == "string")
|
||
return e;
|
||
if (Xh(e))
|
||
return HM(e, VM) + "";
|
||
if ($b(e))
|
||
return L5 ? L5.call(e) : "";
|
||
var t = e + "";
|
||
return t == "0" && 1 / e == -HZ ? "-0" : t;
|
||
}
|
||
function VZ(e) {
|
||
return e == null ? "" : VM(e);
|
||
}
|
||
function WM(e) {
|
||
return Xh(e) ? HM(e, UZ) : $b(e) ? [e] : NM(BZ(VZ(e)));
|
||
}
|
||
var WZ = process.env.NODE_ENV === "production";
|
||
function ja(e, t) {
|
||
if (!WZ) {
|
||
if (e)
|
||
return;
|
||
var n = "Warning: " + t;
|
||
typeof console < "u" && console.warn(n);
|
||
try {
|
||
throw Error(n);
|
||
} catch {
|
||
}
|
||
}
|
||
}
|
||
var GZ = 1, qZ = 4;
|
||
function YZ(e) {
|
||
return gh(e, GZ | qZ);
|
||
}
|
||
function Fn() {
|
||
return Fn = Object.assign || function(e) {
|
||
for (var t = 1; t < arguments.length; t++) {
|
||
var n = arguments[t];
|
||
for (var i in n)
|
||
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
||
}
|
||
return e;
|
||
}, Fn.apply(this, arguments);
|
||
}
|
||
function QZ(e, t) {
|
||
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
||
}
|
||
function Xu(e, t) {
|
||
if (e == null)
|
||
return {};
|
||
var n = {}, i = Object.keys(e), o, l;
|
||
for (l = 0; l < i.length; l++)
|
||
o = i[l], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
|
||
return n;
|
||
}
|
||
function F5(e) {
|
||
if (e === void 0)
|
||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||
return e;
|
||
}
|
||
var B5 = function(t) {
|
||
return Array.isArray(t) && t.length === 0;
|
||
}, Ea = function(t) {
|
||
return typeof t == "function";
|
||
}, P0 = function(t) {
|
||
return t !== null && typeof t == "object";
|
||
}, XZ = function(t) {
|
||
return String(Math.floor(Number(t))) === t;
|
||
}, Z2 = function(t) {
|
||
return Object.prototype.toString.call(t) === "[object String]";
|
||
}, tC = function(t) {
|
||
return Kl.count(t) === 0;
|
||
}, J2 = function(t) {
|
||
return P0(t) && Ea(t.then);
|
||
};
|
||
function KZ(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 ua(e, t, n, i) {
|
||
i === void 0 && (i = 0);
|
||
for (var o = WM(t); e && i < o.length; )
|
||
e = e[o[i++]];
|
||
return e === void 0 ? n : e;
|
||
}
|
||
function ts(e, t, n) {
|
||
for (var i = z5(e), o = i, l = 0, f = WM(t); l < f.length - 1; l++) {
|
||
var h = f[l], y = ua(e, f.slice(0, l + 1));
|
||
if (y && (P0(y) || Array.isArray(y)))
|
||
o = o[h] = z5(y);
|
||
else {
|
||
var m = f[l + 1];
|
||
o = o[h] = XZ(m) && Number(m) >= 0 ? [] : {};
|
||
}
|
||
}
|
||
return (l === 0 ? e : o)[f[l]] === n ? e : (n === void 0 ? delete o[f[l]] : o[f[l]] = n, l === 0 && n === void 0 && delete i[f[l]], i);
|
||
}
|
||
function GM(e, t, n, i) {
|
||
n === void 0 && (n = /* @__PURE__ */ new WeakMap()), i === void 0 && (i = {});
|
||
for (var o = 0, l = Object.keys(e); o < l.length; o++) {
|
||
var f = l[o], h = e[f];
|
||
P0(h) ? n.get(h) || (n.set(h, !0), i[f] = Array.isArray(h) ? [] : {}, GM(h, t, n, i[f])) : i[f] = t;
|
||
}
|
||
return i;
|
||
}
|
||
var O0 = /* @__PURE__ */ r0(void 0);
|
||
O0.displayName = "FormikContext";
|
||
var ZZ = O0.Provider;
|
||
O0.Consumer;
|
||
function qM() {
|
||
var e = Zl(O0);
|
||
return e || (process.env.NODE_ENV !== "production" ? ja(!1, "Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component.") : ja(!1)), e;
|
||
}
|
||
function JZ(e, t) {
|
||
switch (t.type) {
|
||
case "SET_VALUES":
|
||
return Fn({}, e, {
|
||
values: t.payload
|
||
});
|
||
case "SET_TOUCHED":
|
||
return Fn({}, e, {
|
||
touched: t.payload
|
||
});
|
||
case "SET_ERRORS":
|
||
return Fl(e.errors, t.payload) ? e : Fn({}, e, {
|
||
errors: t.payload
|
||
});
|
||
case "SET_STATUS":
|
||
return Fn({}, e, {
|
||
status: t.payload
|
||
});
|
||
case "SET_ISSUBMITTING":
|
||
return Fn({}, e, {
|
||
isSubmitting: t.payload
|
||
});
|
||
case "SET_ISVALIDATING":
|
||
return Fn({}, e, {
|
||
isValidating: t.payload
|
||
});
|
||
case "SET_FIELD_VALUE":
|
||
return Fn({}, e, {
|
||
values: ts(e.values, t.payload.field, t.payload.value)
|
||
});
|
||
case "SET_FIELD_TOUCHED":
|
||
return Fn({}, e, {
|
||
touched: ts(e.touched, t.payload.field, t.payload.value)
|
||
});
|
||
case "SET_FIELD_ERROR":
|
||
return Fn({}, e, {
|
||
errors: ts(e.errors, t.payload.field, t.payload.value)
|
||
});
|
||
case "RESET_FORM":
|
||
return Fn({}, e, t.payload);
|
||
case "SET_FORMIK_STATE":
|
||
return t.payload(e);
|
||
case "SUBMIT_ATTEMPT":
|
||
return Fn({}, e, {
|
||
touched: GM(e.values, !0),
|
||
isSubmitting: !0,
|
||
submitCount: e.submitCount + 1
|
||
});
|
||
case "SUBMIT_FAILURE":
|
||
return Fn({}, e, {
|
||
isSubmitting: !1
|
||
});
|
||
case "SUBMIT_SUCCESS":
|
||
return Fn({}, e, {
|
||
isSubmitting: !1
|
||
});
|
||
default:
|
||
return e;
|
||
}
|
||
}
|
||
var Vu = {}, Sg = {};
|
||
function $Z(e) {
|
||
var t = e.validateOnChange, n = t === void 0 ? !0 : t, i = e.validateOnBlur, o = i === void 0 ? !0 : i, l = e.validateOnMount, f = l === void 0 ? !1 : l, h = e.isInitialValid, y = e.enableReinitialize, m = y === void 0 ? !1 : y, x = e.onSubmit, b = Xu(e, ["validateOnChange", "validateOnBlur", "validateOnMount", "isInitialValid", "enableReinitialize", "onSubmit"]), E = Fn({
|
||
validateOnChange: n,
|
||
validateOnBlur: o,
|
||
validateOnMount: f,
|
||
onSubmit: x
|
||
}, b), j = He(E.initialValues), M = He(E.initialErrors || Vu), R = He(E.initialTouched || Sg), k = He(E.initialStatus), A = He(!1), L = He({});
|
||
process.env.NODE_ENV !== "production" && rt(function() {
|
||
typeof h > "u" || (process.env.NODE_ENV !== "production" ? ja(!1, "isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.") : ja(!1));
|
||
}, []), rt(function() {
|
||
return A.current = !0, function() {
|
||
A.current = !1;
|
||
};
|
||
}, []);
|
||
var z = B6(JZ, {
|
||
values: E.initialValues,
|
||
errors: E.initialErrors || Vu,
|
||
touched: E.initialTouched || Sg,
|
||
status: E.initialStatus,
|
||
isSubmitting: !1,
|
||
isValidating: !1,
|
||
submitCount: 0
|
||
}), I = z[0], _ = z[1], U = Q(function(ee, We) {
|
||
return new Promise(function(Fe, ot) {
|
||
var me = E.validate(ee, We);
|
||
me == null ? Fe(Vu) : J2(me) ? me.then(function(Le) {
|
||
Fe(Le || Vu);
|
||
}, function(Le) {
|
||
process.env.NODE_ENV !== "production" && console.warn("Warning: An unhandled error was caught during validation in <Formik validate />", Le), ot(Le);
|
||
}) : Fe(me);
|
||
});
|
||
}, [E.validate]), B = Q(function(ee, We) {
|
||
var Fe = E.validationSchema, ot = Ea(Fe) ? Fe(We) : Fe, me = We && ot.validateAt ? ot.validateAt(We, ee) : tJ(ee, ot);
|
||
return new Promise(function(Le, Dt) {
|
||
me.then(function() {
|
||
Le(Vu);
|
||
}, function(Vt) {
|
||
Vt.name === "ValidationError" ? Le(eJ(Vt)) : (process.env.NODE_ENV !== "production" && console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />", Vt), Dt(Vt));
|
||
});
|
||
});
|
||
}, [E.validationSchema]), q = Q(function(ee, We) {
|
||
return new Promise(function(Fe) {
|
||
return Fe(L.current[ee].validate(We));
|
||
});
|
||
}, []), J = Q(function(ee) {
|
||
var We = Object.keys(L.current).filter(function(ot) {
|
||
return Ea(L.current[ot].validate);
|
||
}), Fe = We.length > 0 ? We.map(function(ot) {
|
||
return q(ot, ua(ee, ot));
|
||
}) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
|
||
return Promise.all(Fe).then(function(ot) {
|
||
return ot.reduce(function(me, Le, Dt) {
|
||
return Le === "DO_NOT_DELETE_YOU_WILL_BE_FIRED" || Le && (me = ts(me, We[Dt], Le)), me;
|
||
}, {});
|
||
});
|
||
}, [q]), G = Q(function(ee) {
|
||
return Promise.all([J(ee), E.validationSchema ? B(ee) : {}, E.validate ? U(ee) : {}]).then(function(We) {
|
||
var Fe = We[0], ot = We[1], me = We[2], Le = Zx.all([Fe, ot, me], {
|
||
arrayMerge: nJ
|
||
});
|
||
return Le;
|
||
});
|
||
}, [E.validate, E.validationSchema, J, U, B]), H = Li(function(ee) {
|
||
return ee === void 0 && (ee = I.values), _({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !0
|
||
}), G(ee).then(function(We) {
|
||
return A.current && (_({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !1
|
||
}), _({
|
||
type: "SET_ERRORS",
|
||
payload: We
|
||
})), We;
|
||
});
|
||
});
|
||
rt(function() {
|
||
f && A.current === !0 && Fl(j.current, E.initialValues) && H(j.current);
|
||
}, [f, H]);
|
||
var le = Q(function(ee) {
|
||
var We = ee && ee.values ? ee.values : j.current, Fe = ee && ee.errors ? ee.errors : M.current ? M.current : E.initialErrors || {}, ot = ee && ee.touched ? ee.touched : R.current ? R.current : E.initialTouched || {}, me = ee && ee.status ? ee.status : k.current ? k.current : E.initialStatus;
|
||
j.current = We, M.current = Fe, R.current = ot, k.current = me;
|
||
var Le = function() {
|
||
_({
|
||
type: "RESET_FORM",
|
||
payload: {
|
||
isSubmitting: !!ee && !!ee.isSubmitting,
|
||
errors: Fe,
|
||
touched: ot,
|
||
status: me,
|
||
values: We,
|
||
isValidating: !!ee && !!ee.isValidating,
|
||
submitCount: ee && ee.submitCount && typeof ee.submitCount == "number" ? ee.submitCount : 0
|
||
}
|
||
});
|
||
};
|
||
if (E.onReset) {
|
||
var Dt = E.onReset(I.values, ze);
|
||
J2(Dt) ? Dt.then(Le) : Le();
|
||
} else
|
||
Le();
|
||
}, [E.initialErrors, E.initialStatus, E.initialTouched]);
|
||
rt(function() {
|
||
A.current === !0 && !Fl(j.current, E.initialValues) && (m && (j.current = E.initialValues, le()), f && H(j.current));
|
||
}, [m, E.initialValues, le, f, H]), rt(function() {
|
||
m && A.current === !0 && !Fl(M.current, E.initialErrors) && (M.current = E.initialErrors || Vu, _({
|
||
type: "SET_ERRORS",
|
||
payload: E.initialErrors || Vu
|
||
}));
|
||
}, [m, E.initialErrors]), rt(function() {
|
||
m && A.current === !0 && !Fl(R.current, E.initialTouched) && (R.current = E.initialTouched || Sg, _({
|
||
type: "SET_TOUCHED",
|
||
payload: E.initialTouched || Sg
|
||
}));
|
||
}, [m, E.initialTouched]), rt(function() {
|
||
m && A.current === !0 && !Fl(k.current, E.initialStatus) && (k.current = E.initialStatus, _({
|
||
type: "SET_STATUS",
|
||
payload: E.initialStatus
|
||
}));
|
||
}, [m, E.initialStatus, E.initialTouched]);
|
||
var ae = Li(function(ee) {
|
||
if (L.current[ee] && Ea(L.current[ee].validate)) {
|
||
var We = ua(I.values, ee), Fe = L.current[ee].validate(We);
|
||
return J2(Fe) ? (_({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !0
|
||
}), Fe.then(function(ot) {
|
||
return ot;
|
||
}).then(function(ot) {
|
||
_({
|
||
type: "SET_FIELD_ERROR",
|
||
payload: {
|
||
field: ee,
|
||
value: ot
|
||
}
|
||
}), _({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !1
|
||
});
|
||
})) : (_({
|
||
type: "SET_FIELD_ERROR",
|
||
payload: {
|
||
field: ee,
|
||
value: Fe
|
||
}
|
||
}), Promise.resolve(Fe));
|
||
} else if (E.validationSchema)
|
||
return _({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !0
|
||
}), B(I.values, ee).then(function(ot) {
|
||
return ot;
|
||
}).then(function(ot) {
|
||
_({
|
||
type: "SET_FIELD_ERROR",
|
||
payload: {
|
||
field: ee,
|
||
value: ot[ee]
|
||
}
|
||
}), _({
|
||
type: "SET_ISVALIDATING",
|
||
payload: !1
|
||
});
|
||
});
|
||
return Promise.resolve();
|
||
}), he = Q(function(ee, We) {
|
||
var Fe = We.validate;
|
||
L.current[ee] = {
|
||
validate: Fe
|
||
};
|
||
}, []), Te = Q(function(ee) {
|
||
delete L.current[ee];
|
||
}, []), xe = Li(function(ee, We) {
|
||
_({
|
||
type: "SET_TOUCHED",
|
||
payload: ee
|
||
});
|
||
var Fe = We === void 0 ? o : We;
|
||
return Fe ? H(I.values) : Promise.resolve();
|
||
}), $ = Q(function(ee) {
|
||
_({
|
||
type: "SET_ERRORS",
|
||
payload: ee
|
||
});
|
||
}, []), Y = Li(function(ee, We) {
|
||
var Fe = Ea(ee) ? ee(I.values) : ee;
|
||
_({
|
||
type: "SET_VALUES",
|
||
payload: Fe
|
||
});
|
||
var ot = We === void 0 ? n : We;
|
||
return ot ? H(Fe) : Promise.resolve();
|
||
}), te = Q(function(ee, We) {
|
||
_({
|
||
type: "SET_FIELD_ERROR",
|
||
payload: {
|
||
field: ee,
|
||
value: We
|
||
}
|
||
});
|
||
}, []), V = Li(function(ee, We, Fe) {
|
||
_({
|
||
type: "SET_FIELD_VALUE",
|
||
payload: {
|
||
field: ee,
|
||
value: We
|
||
}
|
||
});
|
||
var ot = Fe === void 0 ? n : Fe;
|
||
return ot ? H(ts(I.values, ee, We)) : Promise.resolve();
|
||
}), ne = Q(function(ee, We) {
|
||
var Fe = We, ot = ee, me;
|
||
if (!Z2(ee)) {
|
||
ee.persist && ee.persist();
|
||
var Le = ee.target ? ee.target : ee.currentTarget, Dt = Le.type, Vt = Le.name, ke = Le.id, Nt = Le.value, tn = Le.checked, Ne = Le.outerHTML, ge = Le.options, _e = Le.multiple;
|
||
Fe = We || Vt || ke, !Fe && process.env.NODE_ENV !== "production" && _5({
|
||
htmlContent: Ne,
|
||
documentationAnchorLink: "handlechange-e-reactchangeeventany--void",
|
||
handlerName: "handleChange"
|
||
}), ot = /number|range/.test(Dt) ? (me = parseFloat(Nt), isNaN(me) ? "" : me) : /checkbox/.test(Dt) ? aJ(ua(I.values, Fe), tn, Nt) : ge && _e ? rJ(ge) : Nt;
|
||
}
|
||
Fe && V(Fe, ot);
|
||
}, [V, I.values]), we = Li(function(ee) {
|
||
if (Z2(ee))
|
||
return function(We) {
|
||
return ne(We, ee);
|
||
};
|
||
ne(ee);
|
||
}), Ee = Li(function(ee, We, Fe) {
|
||
We === void 0 && (We = !0), _({
|
||
type: "SET_FIELD_TOUCHED",
|
||
payload: {
|
||
field: ee,
|
||
value: We
|
||
}
|
||
});
|
||
var ot = Fe === void 0 ? o : Fe;
|
||
return ot ? H(I.values) : Promise.resolve();
|
||
}), se = Q(function(ee, We) {
|
||
ee.persist && ee.persist();
|
||
var Fe = ee.target, ot = Fe.name, me = Fe.id, Le = Fe.outerHTML, Dt = We || ot || me;
|
||
!Dt && process.env.NODE_ENV !== "production" && _5({
|
||
htmlContent: Le,
|
||
documentationAnchorLink: "handleblur-e-any--void",
|
||
handlerName: "handleBlur"
|
||
}), Ee(Dt, !0);
|
||
}, [Ee]), ve = Li(function(ee) {
|
||
if (Z2(ee))
|
||
return function(We) {
|
||
return se(We, ee);
|
||
};
|
||
se(ee);
|
||
}), Ce = Q(function(ee) {
|
||
Ea(ee) ? _({
|
||
type: "SET_FORMIK_STATE",
|
||
payload: ee
|
||
}) : _({
|
||
type: "SET_FORMIK_STATE",
|
||
payload: function() {
|
||
return ee;
|
||
}
|
||
});
|
||
}, []), Ae = Q(function(ee) {
|
||
_({
|
||
type: "SET_STATUS",
|
||
payload: ee
|
||
});
|
||
}, []), Ve = Q(function(ee) {
|
||
_({
|
||
type: "SET_ISSUBMITTING",
|
||
payload: ee
|
||
});
|
||
}, []), tt = Li(function() {
|
||
return _({
|
||
type: "SUBMIT_ATTEMPT"
|
||
}), H().then(function(ee) {
|
||
var We = ee instanceof Error, Fe = !We && Object.keys(ee).length === 0;
|
||
if (Fe) {
|
||
var ot;
|
||
try {
|
||
if (ot = Qe(), ot === void 0)
|
||
return;
|
||
} catch (me) {
|
||
throw me;
|
||
}
|
||
return Promise.resolve(ot).then(function(me) {
|
||
return A.current && _({
|
||
type: "SUBMIT_SUCCESS"
|
||
}), me;
|
||
}).catch(function(me) {
|
||
if (A.current)
|
||
throw _({
|
||
type: "SUBMIT_FAILURE"
|
||
}), me;
|
||
});
|
||
} else if (A.current && (_({
|
||
type: "SUBMIT_FAILURE"
|
||
}), We))
|
||
throw ee;
|
||
});
|
||
}), at = Li(function(ee) {
|
||
if (ee && ee.preventDefault && Ea(ee.preventDefault) && ee.preventDefault(), ee && ee.stopPropagation && Ea(ee.stopPropagation) && ee.stopPropagation(), process.env.NODE_ENV !== "production" && typeof document < "u") {
|
||
var We = KZ();
|
||
We !== null && We instanceof HTMLButtonElement && (We.attributes && We.attributes.getNamedItem("type") || (process.env.NODE_ENV !== "production" ? ja(!1, 'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.') : ja(!1)));
|
||
}
|
||
tt().catch(function(Fe) {
|
||
console.warn("Warning: An unhandled error was caught from submitForm()", Fe);
|
||
});
|
||
}), ze = {
|
||
resetForm: le,
|
||
validateForm: H,
|
||
validateField: ae,
|
||
setErrors: $,
|
||
setFieldError: te,
|
||
setFieldTouched: Ee,
|
||
setFieldValue: V,
|
||
setStatus: Ae,
|
||
setSubmitting: Ve,
|
||
setTouched: xe,
|
||
setValues: Y,
|
||
setFormikState: Ce,
|
||
submitForm: tt
|
||
}, Qe = Li(function() {
|
||
return x(I.values, ze);
|
||
}), Et = Li(function(ee) {
|
||
ee && ee.preventDefault && Ea(ee.preventDefault) && ee.preventDefault(), ee && ee.stopPropagation && Ea(ee.stopPropagation) && ee.stopPropagation(), le();
|
||
}), Xe = Q(function(ee) {
|
||
return {
|
||
value: ua(I.values, ee),
|
||
error: ua(I.errors, ee),
|
||
touched: !!ua(I.touched, ee),
|
||
initialValue: ua(j.current, ee),
|
||
initialTouched: !!ua(R.current, ee),
|
||
initialError: ua(M.current, ee)
|
||
};
|
||
}, [I.errors, I.touched, I.values]), ht = Q(function(ee) {
|
||
return {
|
||
setValue: function(Fe, ot) {
|
||
return V(ee, Fe, ot);
|
||
},
|
||
setTouched: function(Fe, ot) {
|
||
return Ee(ee, Fe, ot);
|
||
},
|
||
setError: function(Fe) {
|
||
return te(ee, Fe);
|
||
}
|
||
};
|
||
}, [V, Ee, te]), Ht = Q(function(ee) {
|
||
var We = P0(ee), Fe = We ? ee.name : ee, ot = ua(I.values, Fe), me = {
|
||
name: Fe,
|
||
value: ot,
|
||
onChange: we,
|
||
onBlur: ve
|
||
};
|
||
if (We) {
|
||
var Le = ee.type, Dt = ee.value, Vt = ee.as, ke = ee.multiple;
|
||
Le === "checkbox" ? Dt === void 0 ? me.checked = !!ot : (me.checked = !!(Array.isArray(ot) && ~ot.indexOf(Dt)), me.value = Dt) : Le === "radio" ? (me.checked = ot === Dt, me.value = Dt) : Vt === "select" && ke && (me.value = me.value || [], me.multiple = !0);
|
||
}
|
||
return me;
|
||
}, [ve, we, I.values]), Ot = an(function() {
|
||
return !Fl(j.current, I.values);
|
||
}, [j.current, I.values]), on = an(function() {
|
||
return typeof h < "u" ? Ot ? I.errors && Object.keys(I.errors).length === 0 : h !== !1 && Ea(h) ? h(E) : h : I.errors && Object.keys(I.errors).length === 0;
|
||
}, [h, Ot, I.errors, E]), En = Fn({}, I, {
|
||
initialValues: j.current,
|
||
initialErrors: M.current,
|
||
initialTouched: R.current,
|
||
initialStatus: k.current,
|
||
handleBlur: ve,
|
||
handleChange: we,
|
||
handleReset: Et,
|
||
handleSubmit: at,
|
||
resetForm: le,
|
||
setErrors: $,
|
||
setFormikState: Ce,
|
||
setFieldTouched: Ee,
|
||
setFieldValue: V,
|
||
setFieldError: te,
|
||
setStatus: Ae,
|
||
setSubmitting: Ve,
|
||
setTouched: xe,
|
||
setValues: Y,
|
||
submitForm: tt,
|
||
validateForm: H,
|
||
validateField: ae,
|
||
isValid: on,
|
||
dirty: Ot,
|
||
unregisterField: Te,
|
||
registerField: he,
|
||
getFieldProps: Ht,
|
||
getFieldMeta: Xe,
|
||
getFieldHelpers: ht,
|
||
validateOnBlur: o,
|
||
validateOnChange: n,
|
||
validateOnMount: f
|
||
});
|
||
return En;
|
||
}
|
||
function Kh(e) {
|
||
var t = $Z(e), n = e.component, i = e.children, o = e.render, l = e.innerRef;
|
||
return oS(l, function() {
|
||
return t;
|
||
}), process.env.NODE_ENV !== "production" && rt(function() {
|
||
e.render && (process.env.NODE_ENV !== "production" ? ja(!1, "<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>") : ja(!1));
|
||
}, []), Ns(ZZ, {
|
||
value: t
|
||
}, n ? Ns(n, t) : o ? o(t) : i ? Ea(i) ? i(t) : tC(i) ? null : Kl.only(i) : null);
|
||
}
|
||
function _5(e) {
|
||
var t = e.htmlContent, n = e.documentationAnchorLink, i = e.handlerName;
|
||
console.warn("Warning: Formik called `" + i + "`, but you forgot to pass an `id` or `name` attribute to your input:\n " + t + `
|
||
Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#` + n + `
|
||
`);
|
||
}
|
||
function eJ(e) {
|
||
var t = {};
|
||
if (e.inner) {
|
||
if (e.inner.length === 0)
|
||
return ts(t, e.path, e.message);
|
||
for (var o = e.inner, n = Array.isArray(o), i = 0, o = n ? o : o[Symbol.iterator](); ; ) {
|
||
var l;
|
||
if (n) {
|
||
if (i >= o.length)
|
||
break;
|
||
l = o[i++];
|
||
} else {
|
||
if (i = o.next(), i.done)
|
||
break;
|
||
l = i.value;
|
||
}
|
||
var f = l;
|
||
ua(t, f.path) || (t = ts(t, f.path, f.message));
|
||
}
|
||
}
|
||
return t;
|
||
}
|
||
function tJ(e, t, n, i) {
|
||
n === void 0 && (n = !1), i === void 0 && (i = {});
|
||
var o = nS(e);
|
||
return t[n ? "validateSync" : "validate"](o, {
|
||
abortEarly: !1,
|
||
context: i
|
||
});
|
||
}
|
||
function nS(e) {
|
||
var t = Array.isArray(e) ? [] : {};
|
||
for (var n in e)
|
||
if (Object.prototype.hasOwnProperty.call(e, n)) {
|
||
var i = String(n);
|
||
Array.isArray(e[i]) === !0 ? t[i] = e[i].map(function(o) {
|
||
return Array.isArray(o) === !0 || p5(o) ? nS(o) : o !== "" ? o : void 0;
|
||
}) : p5(e[i]) ? t[i] = nS(e[i]) : t[i] = e[i] !== "" ? e[i] : void 0;
|
||
}
|
||
return t;
|
||
}
|
||
function nJ(e, t, n) {
|
||
var i = e.slice();
|
||
return t.forEach(function(l, f) {
|
||
if (typeof i[f] > "u") {
|
||
var h = n.clone !== !1, y = h && n.isMergeableObject(l);
|
||
i[f] = y ? Zx(Array.isArray(l) ? [] : {}, l, n) : l;
|
||
} else
|
||
n.isMergeableObject(l) ? i[f] = Zx(e[f], l, n) : e.indexOf(l) === -1 && i.push(l);
|
||
}), i;
|
||
}
|
||
function rJ(e) {
|
||
return Array.from(e).filter(function(t) {
|
||
return t.selected;
|
||
}).map(function(t) {
|
||
return t.value;
|
||
});
|
||
}
|
||
function aJ(e, t, n) {
|
||
if (typeof e == "boolean")
|
||
return Boolean(t);
|
||
var i = [], o = !1, l = -1;
|
||
if (Array.isArray(e))
|
||
i = e, l = e.indexOf(n), o = l >= 0;
|
||
else if (!n || n == "true" || n == "false")
|
||
return Boolean(t);
|
||
return t && n && !o ? i.concat(n) : o ? i.slice(0, l).concat(i.slice(l + 1)) : i;
|
||
}
|
||
var iJ = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u" ? bo : rt;
|
||
function Li(e) {
|
||
var t = He(e);
|
||
return iJ(function() {
|
||
t.current = e;
|
||
}), Q(function() {
|
||
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++)
|
||
i[o] = arguments[o];
|
||
return t.current.apply(void 0, i);
|
||
}, []);
|
||
}
|
||
function Yn(e) {
|
||
var t = e.validate, n = e.name, i = e.render, o = e.children, l = e.as, f = e.component, h = Xu(e, ["validate", "name", "render", "children", "as", "component"]), y = qM(), m = Xu(y, ["validate", "validationSchema"]);
|
||
process.env.NODE_ENV !== "production" && rt(function() {
|
||
i && (process.env.NODE_ENV !== "production" ? ja(!1, '<Field render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Field name="' + n + '" render={({field, form}) => ...} /> with <Field name="' + n + '">{({field, form, meta}) => ...}</Field>') : ja(!1)), l && o && Ea(o) && (process.env.NODE_ENV !== "production" ? ja(!1, "You should not use <Field as> and <Field children> as a function in the same <Field> component; <Field as> will be ignored.") : ja(!1)), f && o && Ea(o) && (process.env.NODE_ENV !== "production" ? ja(!1, "You should not use <Field component> and <Field children> as a function in the same <Field> component; <Field component> will be ignored.") : ja(!1)), i && o && !tC(o) && (process.env.NODE_ENV !== "production" ? ja(!1, "You should not use <Field render> and <Field children> in the same <Field> component; <Field children> will be ignored") : ja(!1));
|
||
}, []);
|
||
var x = m.registerField, b = m.unregisterField;
|
||
rt(function() {
|
||
return x(n, {
|
||
validate: t
|
||
}), function() {
|
||
b(n);
|
||
};
|
||
}, [x, b, n, t]);
|
||
var E = m.getFieldProps(Fn({
|
||
name: n
|
||
}, h)), j = m.getFieldMeta(n), M = {
|
||
field: E,
|
||
form: m
|
||
};
|
||
if (i)
|
||
return i(Fn({}, M, {
|
||
meta: j
|
||
}));
|
||
if (Ea(o))
|
||
return o(Fn({}, M, {
|
||
meta: j
|
||
}));
|
||
if (f) {
|
||
if (typeof f == "string") {
|
||
var R = h.innerRef, k = Xu(h, ["innerRef"]);
|
||
return Ns(f, Fn({
|
||
ref: R
|
||
}, E, k), o);
|
||
}
|
||
return Ns(f, Fn({
|
||
field: E,
|
||
form: m
|
||
}, h), o);
|
||
}
|
||
var A = l || "input";
|
||
if (typeof A == "string") {
|
||
var L = h.innerRef, z = Xu(h, ["innerRef"]);
|
||
return Ns(A, Fn({
|
||
ref: L
|
||
}, E, z), o);
|
||
}
|
||
return Ns(A, Fn({}, E, h), o);
|
||
}
|
||
var oJ = /* @__PURE__ */ dc(function(e, t) {
|
||
var n = e.action, i = Xu(e, ["action"]), o = n ?? "#", l = qM(), f = l.handleReset, h = l.handleSubmit;
|
||
return Ns("form", Object.assign({
|
||
onSubmit: h,
|
||
ref: t,
|
||
onReset: f,
|
||
action: o
|
||
}, i));
|
||
});
|
||
oJ.displayName = "Form";
|
||
var sJ = function(t, n, i) {
|
||
var o = xf(t), l = o[n];
|
||
return o.splice(n, 1), o.splice(i, 0, l), o;
|
||
}, lJ = function(t, n, i) {
|
||
var o = xf(t), l = o[n];
|
||
return o[n] = o[i], o[i] = l, o;
|
||
}, $2 = function(t, n, i) {
|
||
var o = xf(t);
|
||
return o.splice(n, 0, i), o;
|
||
}, uJ = function(t, n, i) {
|
||
var o = xf(t);
|
||
return o[n] = i, o;
|
||
}, xf = function(t) {
|
||
if (t) {
|
||
if (Array.isArray(t))
|
||
return [].concat(t);
|
||
var n = Object.keys(t).map(function(i) {
|
||
return parseInt(i);
|
||
}).reduce(function(i, o) {
|
||
return o > i ? o : i;
|
||
}, 0);
|
||
return Array.from(Fn({}, t, {
|
||
length: n + 1
|
||
}));
|
||
} else
|
||
return [];
|
||
}, cJ = /* @__PURE__ */ function(e) {
|
||
QZ(t, e);
|
||
function t(i) {
|
||
var o;
|
||
return o = e.call(this, i) || this, o.updateArrayField = function(l, f, h) {
|
||
var y = o.props, m = y.name, x = y.formik.setFormikState;
|
||
x(function(b) {
|
||
var E = typeof h == "function" ? h : l, j = typeof f == "function" ? f : l, M = ts(b.values, m, l(ua(b.values, m))), R = h ? E(ua(b.errors, m)) : void 0, k = f ? j(ua(b.touched, m)) : void 0;
|
||
return B5(R) && (R = void 0), B5(k) && (k = void 0), Fn({}, b, {
|
||
values: M,
|
||
errors: h ? ts(b.errors, m, R) : b.errors,
|
||
touched: f ? ts(b.touched, m, k) : b.touched
|
||
});
|
||
});
|
||
}, o.push = function(l) {
|
||
return o.updateArrayField(function(f) {
|
||
return [].concat(xf(f), [YZ(l)]);
|
||
}, !1, !1);
|
||
}, o.handlePush = function(l) {
|
||
return function() {
|
||
return o.push(l);
|
||
};
|
||
}, o.swap = function(l, f) {
|
||
return o.updateArrayField(function(h) {
|
||
return lJ(h, l, f);
|
||
}, !0, !0);
|
||
}, o.handleSwap = function(l, f) {
|
||
return function() {
|
||
return o.swap(l, f);
|
||
};
|
||
}, o.move = function(l, f) {
|
||
return o.updateArrayField(function(h) {
|
||
return sJ(h, l, f);
|
||
}, !0, !0);
|
||
}, o.handleMove = function(l, f) {
|
||
return function() {
|
||
return o.move(l, f);
|
||
};
|
||
}, o.insert = function(l, f) {
|
||
return o.updateArrayField(function(h) {
|
||
return $2(h, l, f);
|
||
}, function(h) {
|
||
return $2(h, l, null);
|
||
}, function(h) {
|
||
return $2(h, l, null);
|
||
});
|
||
}, o.handleInsert = function(l, f) {
|
||
return function() {
|
||
return o.insert(l, f);
|
||
};
|
||
}, o.replace = function(l, f) {
|
||
return o.updateArrayField(function(h) {
|
||
return uJ(h, l, f);
|
||
}, !1, !1);
|
||
}, o.handleReplace = function(l, f) {
|
||
return function() {
|
||
return o.replace(l, f);
|
||
};
|
||
}, o.unshift = function(l) {
|
||
var f = -1;
|
||
return o.updateArrayField(function(h) {
|
||
var y = h ? [l].concat(h) : [l];
|
||
return f < 0 && (f = y.length), y;
|
||
}, function(h) {
|
||
var y = h ? [null].concat(h) : [null];
|
||
return f < 0 && (f = y.length), y;
|
||
}, function(h) {
|
||
var y = h ? [null].concat(h) : [null];
|
||
return f < 0 && (f = y.length), y;
|
||
}), f;
|
||
}, o.handleUnshift = function(l) {
|
||
return function() {
|
||
return o.unshift(l);
|
||
};
|
||
}, o.handleRemove = function(l) {
|
||
return function() {
|
||
return o.remove(l);
|
||
};
|
||
}, o.handlePop = function() {
|
||
return function() {
|
||
return o.pop();
|
||
};
|
||
}, o.remove = o.remove.bind(F5(o)), o.pop = o.pop.bind(F5(o)), o;
|
||
}
|
||
var n = t.prototype;
|
||
return n.componentDidUpdate = function(o) {
|
||
this.props.validateOnChange && this.props.formik.validateOnChange && !Fl(ua(o.formik.values, o.name), ua(this.props.formik.values, this.props.name)) && this.props.formik.validateForm(this.props.formik.values);
|
||
}, n.remove = function(o) {
|
||
var l;
|
||
return this.updateArrayField(
|
||
// so this gets call 3 times
|
||
function(f) {
|
||
var h = f ? xf(f) : [];
|
||
return l || (l = h[o]), Ea(h.splice) && h.splice(o, 1), h;
|
||
},
|
||
!0,
|
||
!0
|
||
), l;
|
||
}, n.pop = function() {
|
||
var o;
|
||
return this.updateArrayField(
|
||
// so this gets call 3 times
|
||
function(l) {
|
||
var f = l;
|
||
return o || (o = f && f.pop && f.pop()), f;
|
||
},
|
||
!0,
|
||
!0
|
||
), o;
|
||
}, n.render = function() {
|
||
var o = {
|
||
push: this.push,
|
||
pop: this.pop,
|
||
swap: this.swap,
|
||
move: this.move,
|
||
insert: this.insert,
|
||
replace: this.replace,
|
||
unshift: this.unshift,
|
||
remove: this.remove,
|
||
handlePush: this.handlePush,
|
||
handlePop: this.handlePop,
|
||
handleSwap: this.handleSwap,
|
||
handleMove: this.handleMove,
|
||
handleInsert: this.handleInsert,
|
||
handleReplace: this.handleReplace,
|
||
handleUnshift: this.handleUnshift,
|
||
handleRemove: this.handleRemove
|
||
}, l = this.props, f = l.component, h = l.render, y = l.children, m = l.name, x = l.formik, b = Xu(x, ["validate", "validationSchema"]), E = Fn({}, o, {
|
||
form: b,
|
||
name: m
|
||
});
|
||
return f ? Ns(f, E) : h ? h(E) : y ? typeof y == "function" ? y(E) : tC(y) ? null : Kl.only(y) : null;
|
||
}, t;
|
||
}(dP);
|
||
cJ.defaultProps = {
|
||
validateOnChange: !0
|
||
};
|
||
function dJ(e) {
|
||
const { model: t } = e, i = Z(
|
||
(M) => M.system.model_list
|
||
)[t], o = je(), { t: l } = Pe(), f = Z(
|
||
(M) => M.system.isProcessing
|
||
), h = Z(
|
||
(M) => M.system.isConnected
|
||
), [y, m] = qe("same"), [x, b] = qe("");
|
||
rt(() => {
|
||
m("same");
|
||
}, [t]);
|
||
const E = () => {
|
||
m("same");
|
||
}, j = () => {
|
||
o(Qk({
|
||
model_name: t,
|
||
save_location: y,
|
||
custom_location: y === "custom" && x !== "" ? x : null
|
||
}));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
j0,
|
||
{
|
||
title: `${l("modelManager.convert")} ${t}`,
|
||
acceptCallback: j,
|
||
cancelCallback: E,
|
||
acceptButtonText: `${l("modelManager.convert")}`,
|
||
triggerComponent: /* @__PURE__ */ c.jsxs(
|
||
un,
|
||
{
|
||
size: "sm",
|
||
"aria-label": l("modelManager.convertToDiffusers"),
|
||
isDisabled: i.status === "active" || f || !h,
|
||
className: " modal-close-btn",
|
||
marginInlineEnd: 8,
|
||
children: [
|
||
"🧨 ",
|
||
l("modelManager.convertToDiffusers")
|
||
]
|
||
}
|
||
),
|
||
motionPreset: "slideInBottom",
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { children: l("modelManager.convertToDiffusersHelpText1") }),
|
||
/* @__PURE__ */ c.jsxs(Hj, { children: [
|
||
/* @__PURE__ */ c.jsx(uh, { children: l("modelManager.convertToDiffusersHelpText2") }),
|
||
/* @__PURE__ */ c.jsx(uh, { children: l("modelManager.convertToDiffusersHelpText3") }),
|
||
/* @__PURE__ */ c.jsx(uh, { children: l("modelManager.convertToDiffusersHelpText4") }),
|
||
/* @__PURE__ */ c.jsx(uh, { children: l("modelManager.convertToDiffusersHelpText5") })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: l("modelManager.convertToDiffusersHelpText6") })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { flexDir: "column", gap: 4, children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { marginTop: 4, flexDir: "column", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "600", children: l("modelManager.convertToDiffusersSaveLocation") }),
|
||
/* @__PURE__ */ c.jsx(jh, { value: y, onChange: (M) => m(M), children: /* @__PURE__ */ c.jsxs(ce, { gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "same", children: /* @__PURE__ */ c.jsx(Wr, { label: "Save converted model in the same folder", children: l("modelManager.sameFolder") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "root", children: /* @__PURE__ */ c.jsx(Wr, { label: "Save converted model in the InvokeAI root folder", children: l("modelManager.invokeRoot") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "custom", children: /* @__PURE__ */ c.jsx(Wr, { label: "Save converted model in a custom folder", children: l("modelManager.custom") }) })
|
||
] }) })
|
||
] }),
|
||
y === "custom" && /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "500", fontSize: "sm", variant: "subtext", children: l("modelManager.customSaveLocation") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
value: x,
|
||
onChange: (M) => {
|
||
M.target.value !== "" && b(M.target.value);
|
||
},
|
||
width: "full"
|
||
}
|
||
)
|
||
] })
|
||
] })
|
||
]
|
||
}
|
||
);
|
||
}
|
||
const fJ = ct(
|
||
[Xn],
|
||
(e) => {
|
||
const { openModel: t, model_list: n } = e;
|
||
return {
|
||
model_list: n,
|
||
openModel: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), U5 = 64, H5 = 2048;
|
||
function pJ() {
|
||
const { openModel: e, model_list: t } = Z(fJ), n = Z(
|
||
(y) => y.system.isProcessing
|
||
), i = je(), { t: o } = Pe(), [l, f] = qe({
|
||
name: "",
|
||
description: "",
|
||
config: "configs/stable-diffusion/v1-inference.yaml",
|
||
weights: "",
|
||
vae: "",
|
||
width: 512,
|
||
height: 512,
|
||
default: !1,
|
||
format: "ckpt"
|
||
});
|
||
rt(() => {
|
||
var y, m, x, b, E, j, M;
|
||
if (e) {
|
||
const R = Ie.pickBy(t, (k, A) => Ie.isEqual(A, e));
|
||
f({
|
||
name: e,
|
||
description: (y = R[e]) == null ? void 0 : y.description,
|
||
config: (m = R[e]) == null ? void 0 : m.config,
|
||
weights: (x = R[e]) == null ? void 0 : x.weights,
|
||
vae: (b = R[e]) == null ? void 0 : b.vae,
|
||
width: (E = R[e]) == null ? void 0 : E.width,
|
||
height: (j = R[e]) == null ? void 0 : j.height,
|
||
default: (M = R[e]) == null ? void 0 : M.default,
|
||
format: "ckpt"
|
||
});
|
||
}
|
||
}, [t, e]);
|
||
const h = (y) => {
|
||
i(
|
||
Nh({
|
||
...y,
|
||
width: Number(y.width),
|
||
height: Number(y.height)
|
||
})
|
||
);
|
||
};
|
||
return e ? /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, width: "100%", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { alignItems: "center", gap: 4, justifyContent: "space-between", children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontSize: "lg", fontWeight: "bold", children: e }),
|
||
/* @__PURE__ */ c.jsx(dJ, { model: e })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
flexDirection: "column",
|
||
maxHeight: window.innerHeight - 270,
|
||
overflowY: "scroll",
|
||
paddingInlineEnd: 8,
|
||
children: /* @__PURE__ */ c.jsx(
|
||
Kh,
|
||
{
|
||
enableReinitialize: !0,
|
||
initialValues: l,
|
||
onSubmit: h,
|
||
children: ({ handleSubmit: y, errors: m, touched: x }) => /* @__PURE__ */ c.jsx("form", { onSubmit: y, children: /* @__PURE__ */ c.jsxs(Bt, { rowGap: 2, alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!m.description && x.description,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "description", fontSize: "sm", children: o("modelManager.description") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "description",
|
||
name: "description",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.description && x.description ? /* @__PURE__ */ c.jsx(qn, { children: m.description }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.descriptionValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!m.config && x.config,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "config", fontSize: "sm", children: o("modelManager.config") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "config",
|
||
name: "config",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.config && x.config ? /* @__PURE__ */ c.jsx(qn, { children: m.config }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.configValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!m.weights && x.weights,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "config", fontSize: "sm", children: o("modelManager.modelLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "weights",
|
||
name: "weights",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.weights && x.weights ? /* @__PURE__ */ c.jsx(qn, { children: m.weights }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.modelLocationValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!m.vae && x.vae, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae", fontSize: "sm", children: o("modelManager.vaeLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae",
|
||
name: "vae",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.vae && x.vae ? /* @__PURE__ */ c.jsx(qn, { children: m.vae }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.vaeLocationValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(wf, { width: "100%", children: [
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!m.width && x.width, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "width", fontSize: "sm", children: o("modelManager.width") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(Yn, { id: "width", name: "width", children: ({
|
||
field: b,
|
||
form: E
|
||
}) => /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
id: "width",
|
||
name: "width",
|
||
min: U5,
|
||
max: H5,
|
||
step: 64,
|
||
value: E.values.width,
|
||
onChange: (j) => E.setFieldValue(b.name, Number(j))
|
||
}
|
||
) }),
|
||
m.width && x.width ? /* @__PURE__ */ c.jsx(qn, { children: m.width }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.widthValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!m.height && x.height, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "height", fontSize: "sm", children: o("modelManager.height") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(Yn, { id: "height", name: "height", children: ({
|
||
field: b,
|
||
form: E
|
||
}) => /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
id: "height",
|
||
name: "height",
|
||
min: U5,
|
||
max: H5,
|
||
step: 64,
|
||
value: E.values.height,
|
||
onChange: (j) => E.setFieldValue(b.name, Number(j))
|
||
}
|
||
) }),
|
||
m.height && x.height ? /* @__PURE__ */ c.jsx(qn, { children: m.height }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.heightValidationMsg") })
|
||
] })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
type: "submit",
|
||
className: "modal-close-btn",
|
||
isLoading: n,
|
||
children: o("modelManager.updateModel")
|
||
}
|
||
)
|
||
] }) })
|
||
}
|
||
)
|
||
}
|
||
)
|
||
] }) : /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
borderRadius: "base",
|
||
bg: "base.900"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(mt, { fontWeight: 500, children: "Pick A Model To Edit" })
|
||
}
|
||
);
|
||
}
|
||
const hJ = ct(
|
||
[Xn],
|
||
(e) => {
|
||
const { openModel: t, model_list: n } = e;
|
||
return {
|
||
model_list: n,
|
||
openModel: t
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function vJ() {
|
||
const { openModel: e, model_list: t } = Z(hJ), n = Z(
|
||
(y) => y.system.isProcessing
|
||
), i = je(), { t: o } = Pe(), [l, f] = qe({
|
||
name: "",
|
||
description: "",
|
||
repo_id: "",
|
||
path: "",
|
||
vae: { repo_id: "", path: "" },
|
||
default: !1,
|
||
format: "diffusers"
|
||
});
|
||
rt(() => {
|
||
var y, m, x, b, E, j, M, R, k, A, L, z, I, _, U, B;
|
||
if (e) {
|
||
const q = Ie.pickBy(t, (J, G) => Ie.isEqual(G, e));
|
||
f({
|
||
name: e,
|
||
description: (y = q[e]) == null ? void 0 : y.description,
|
||
path: (m = q[e]) != null && m.path && ((x = q[e]) == null ? void 0 : x.path) !== "None" ? (b = q[e]) == null ? void 0 : b.path : "",
|
||
repo_id: (E = q[e]) != null && E.repo_id && ((j = q[e]) == null ? void 0 : j.repo_id) !== "None" ? (M = q[e]) == null ? void 0 : M.repo_id : "",
|
||
vae: {
|
||
repo_id: (k = (R = q[e]) == null ? void 0 : R.vae) != null && k.repo_id ? (L = (A = q[e]) == null ? void 0 : A.vae) == null ? void 0 : L.repo_id : "",
|
||
path: (I = (z = q[e]) == null ? void 0 : z.vae) != null && I.path ? (U = (_ = q[e]) == null ? void 0 : _.vae) == null ? void 0 : U.path : ""
|
||
},
|
||
default: (B = q[e]) == null ? void 0 : B.default,
|
||
format: "diffusers"
|
||
});
|
||
}
|
||
}, [t, e]);
|
||
const h = (y) => {
|
||
const m = y;
|
||
y.path === "" && delete m.path, y.repo_id === "" && delete m.repo_id, y.vae.path === "" && delete m.vae.path, y.vae.repo_id === "" && delete m.vae.repo_id, i(Nh(y));
|
||
};
|
||
return e ? /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, width: "100%", children: [
|
||
/* @__PURE__ */ c.jsx(ce, { alignItems: "center", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "lg", fontWeight: "bold", children: e }) }),
|
||
/* @__PURE__ */ c.jsx(ce, { flexDirection: "column", overflowY: "scroll", paddingInlineEnd: 8, children: /* @__PURE__ */ c.jsx(
|
||
Kh,
|
||
{
|
||
enableReinitialize: !0,
|
||
initialValues: l,
|
||
onSubmit: h,
|
||
children: ({ handleSubmit: y, errors: m, touched: x }) => {
|
||
var b, E, j, M, R, k, A, L, z, I;
|
||
return /* @__PURE__ */ c.jsx("form", { onSubmit: y, children: /* @__PURE__ */ c.jsxs(Bt, { rowGap: 2, alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!m.description && x.description,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "description", fontSize: "sm", children: o("modelManager.description") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "description",
|
||
name: "description",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.description && x.description ? /* @__PURE__ */ c.jsx(qn, { children: m.description }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.descriptionValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!m.path && x.path,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "path", fontSize: "sm", children: o("modelManager.modelLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "path",
|
||
name: "path",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.path && x.path ? /* @__PURE__ */ c.jsx(qn, { children: m.path }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.modelLocationValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!m.repo_id && x.repo_id, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "repo_id", fontSize: "sm", children: o("modelManager.repo_id") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "repo_id",
|
||
name: "repo_id",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
m.repo_id && x.repo_id ? /* @__PURE__ */ c.jsx(qn, { children: m.repo_id }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.repoIDValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!((b = m.vae) != null && b.path) && ((E = x.vae) == null ? void 0 : E.path),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae.path", fontSize: "sm", children: o("modelManager.vaeLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae.path",
|
||
name: "vae.path",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
(j = m.vae) != null && j.path && ((M = x.vae) != null && M.path) ? /* @__PURE__ */ c.jsx(qn, { children: (R = m.vae) == null ? void 0 : R.path }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.vaeLocationValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!((k = m.vae) != null && k.repo_id) && ((A = x.vae) == null ? void 0 : A.repo_id),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae.repo_id", fontSize: "sm", children: o("modelManager.vaeRepoID") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae.repo_id",
|
||
name: "vae.repo_id",
|
||
type: "text",
|
||
width: "full"
|
||
}
|
||
),
|
||
(L = m.vae) != null && L.repo_id && ((z = x.vae) != null && z.repo_id) ? /* @__PURE__ */ c.jsx(qn, { children: (I = m.vae) == null ? void 0 : I.repo_id }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: o("modelManager.vaeRepoIDValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
type: "submit",
|
||
className: "modal-close-btn",
|
||
isLoading: n,
|
||
children: o("modelManager.updateModel")
|
||
}
|
||
)
|
||
] }) });
|
||
}
|
||
}
|
||
) })
|
||
] }) : /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
width: "100%",
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
borderRadius: "base",
|
||
bg: "base.900"
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(mt, { fontWeight: "500", children: "Pick A Model To Edit" })
|
||
}
|
||
);
|
||
}
|
||
const YM = ct([Xn], (e) => {
|
||
const { model_list: t } = e, n = [];
|
||
return Ie.forEach(t, (i) => {
|
||
n.push(i.weights);
|
||
}), n;
|
||
});
|
||
function V5({
|
||
model: e,
|
||
modelsToAdd: t,
|
||
setModelsToAdd: n
|
||
}) {
|
||
const { t: i } = Pe(), o = Z(YM), l = (f) => {
|
||
t.includes(f.target.value) ? n(Ie.remove(t, (h) => h !== f.target.value)) : n([...t, f.target.value]);
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Bt, { children: /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
flexDirection: "column",
|
||
gap: 2,
|
||
backgroundColor: t.includes(e.name) ? "accent.650" : "base.800",
|
||
paddingX: 4,
|
||
paddingY: 2,
|
||
borderRadius: 4,
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
value: e.name,
|
||
label: /* @__PURE__ */ c.jsx(mt, { fontWeight: 500, children: e.name }),
|
||
isChecked: t.includes(e.name),
|
||
isDisabled: o.includes(e.location),
|
||
onChange: l
|
||
}
|
||
),
|
||
o.includes(e.location) && /* @__PURE__ */ c.jsx(qj, { colorScheme: "accent", children: i("modelManager.modelExists") })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(mt, { fontStyle: "italic", variant: "subtext", children: e.location })
|
||
]
|
||
}
|
||
) });
|
||
}
|
||
function mJ() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(z) => z.system.searchFolder
|
||
), i = Z(
|
||
(z) => z.system.foundModels
|
||
), o = Z(YM), l = Z(
|
||
(z) => z.ui.shouldShowExistingModelsInSearch
|
||
), f = Z(
|
||
(z) => z.system.isProcessing
|
||
), [h, y] = pt.useState([]), [m, x] = pt.useState("v1"), [b, E] = pt.useState(""), j = () => {
|
||
e(Kk(null)), e(Zk(null)), y([]);
|
||
}, M = (z) => {
|
||
e(aw(z.checkpointFolder));
|
||
}, R = () => {
|
||
y([]), i && i.forEach((z) => {
|
||
o.includes(z.location) || y((I) => [...I, z.name]);
|
||
});
|
||
}, k = () => {
|
||
y([]);
|
||
}, A = () => {
|
||
const z = i == null ? void 0 : i.filter(
|
||
(_) => h.includes(_.name)
|
||
), I = {
|
||
v1: "configs/stable-diffusion/v1-inference.yaml",
|
||
v2_base: "configs/stable-diffusion/v2-inference-v.yaml",
|
||
v2_768: "configs/stable-diffusion/v2-inference-v.yaml",
|
||
inpainting: "configs/stable-diffusion/v1-inpainting-inference.yaml",
|
||
custom: b
|
||
};
|
||
z == null || z.forEach((_) => {
|
||
const U = {
|
||
name: _.name,
|
||
description: "",
|
||
config: I[m],
|
||
weights: _.location,
|
||
vae: "",
|
||
width: 512,
|
||
height: 512,
|
||
default: !1,
|
||
format: "ckpt"
|
||
};
|
||
e(Nh(U));
|
||
}), y([]);
|
||
}, L = () => {
|
||
const z = [], I = [];
|
||
return i && i.forEach((_, U) => {
|
||
o.includes(_.location) ? I.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
V5,
|
||
{
|
||
model: _,
|
||
modelsToAdd: h,
|
||
setModelsToAdd: y
|
||
},
|
||
U
|
||
)
|
||
) : z.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
V5,
|
||
{
|
||
model: _,
|
||
modelsToAdd: h,
|
||
setModelsToAdd: y
|
||
},
|
||
U
|
||
)
|
||
);
|
||
}), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
z,
|
||
l && I
|
||
] });
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
n ? /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
padding: 4,
|
||
gap: 2,
|
||
position: "relative",
|
||
borderRadius: "base",
|
||
alignItems: "center",
|
||
w: "full",
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDir: "column",
|
||
gap: 2
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontWeight: 500,
|
||
fontSize: "sm"
|
||
},
|
||
variant: "subtext",
|
||
children: t("modelManager.checkpointFolder")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(mt, { sx: { fontWeight: 500, fontSize: "sm" }, children: n })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(s0, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("modelManager.scanAgain"),
|
||
tooltip: t("modelManager.scanAgain"),
|
||
icon: /* @__PURE__ */ c.jsx(sb, {}),
|
||
fontSize: 18,
|
||
disabled: f,
|
||
onClick: () => e(aw(n))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("modelManager.clearCheckpointFolder"),
|
||
icon: /* @__PURE__ */ c.jsx(Gh, { style: { transform: "rotate(45deg)" } }),
|
||
onClick: j
|
||
}
|
||
)
|
||
]
|
||
}
|
||
) : /* @__PURE__ */ c.jsx(
|
||
Kh,
|
||
{
|
||
initialValues: { checkpointFolder: "" },
|
||
onSubmit: (z) => {
|
||
M(z);
|
||
},
|
||
children: ({ handleSubmit: z }) => /* @__PURE__ */ c.jsx("form", { onSubmit: z, children: /* @__PURE__ */ c.jsxs(wf, { columnGap: 2, alignItems: "flex-end", width: "100%", children: [
|
||
/* @__PURE__ */ c.jsx(vn, { isRequired: !0, width: "lg", children: /* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "checkpointFolder",
|
||
name: "checkpointFolder",
|
||
type: "text",
|
||
size: "md",
|
||
label: t("modelManager.checkpointFolder")
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
leftIcon: /* @__PURE__ */ c.jsx(QB, {}),
|
||
"aria-label": t("modelManager.findModels"),
|
||
tooltip: t("modelManager.findModels"),
|
||
type: "submit",
|
||
disabled: f,
|
||
paddingX: 10,
|
||
children: t("modelManager.findModels")
|
||
}
|
||
)
|
||
] }) })
|
||
}
|
||
),
|
||
i && /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, width: "full", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { justifyContent: "space-between", alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsxs("p", { children: [
|
||
t("modelManager.modelsFound"),
|
||
": ",
|
||
i.length
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs("p", { children: [
|
||
t("modelManager.selected"),
|
||
": ",
|
||
h.length
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 2, justifyContent: "space-between", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isDisabled: h.length === i.length,
|
||
onClick: R,
|
||
children: t("modelManager.selectAll")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isDisabled: h.length === 0,
|
||
onClick: k,
|
||
children: t("modelManager.deselectAll")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("modelManager.showExisting"),
|
||
isChecked: l,
|
||
onChange: () => e(
|
||
Xk(
|
||
!l
|
||
)
|
||
)
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isDisabled: h.length === 0,
|
||
onClick: A,
|
||
colorScheme: "accent",
|
||
children: t("modelManager.addSelected")
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
padding: 4,
|
||
rowGap: 4,
|
||
borderRadius: "base",
|
||
width: "full",
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: 500, variant: "subtext", children: t("modelManager.pickModelType") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
jh,
|
||
{
|
||
value: m,
|
||
onChange: (z) => x(z),
|
||
defaultValue: "v1",
|
||
name: "model_type",
|
||
children: /* @__PURE__ */ c.jsxs(ce, { gap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "v1", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: t("modelManager.v1") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "v2_base", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: t("modelManager.v2_base") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "v2_768", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: t("modelManager.v2_768") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "inpainting", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: t("modelManager.inpainting") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "custom", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: t("modelManager.customConfig") }) })
|
||
] })
|
||
}
|
||
)
|
||
] }),
|
||
m === "custom" && /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "500", fontSize: "sm", variant: "subtext", children: t("modelManager.pathToCustomConfig") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
value: b,
|
||
onChange: (z) => {
|
||
z.target.value !== "" && E(z.target.value);
|
||
},
|
||
width: "full"
|
||
}
|
||
)
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
flexDirection: "column",
|
||
maxHeight: 72,
|
||
overflowY: "scroll",
|
||
borderRadius: "sm",
|
||
paddingInlineEnd: 4,
|
||
gap: 2,
|
||
children: i.length > 0 ? L() : /* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
fontWeight: "500",
|
||
padding: 2,
|
||
borderRadius: "sm",
|
||
textAlign: "center",
|
||
variant: "subtext",
|
||
children: t("modelManager.noModelsFound")
|
||
}
|
||
)
|
||
}
|
||
)
|
||
] })
|
||
] });
|
||
}
|
||
const W5 = 64, G5 = 2048;
|
||
function gJ() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(m) => m.system.isProcessing
|
||
);
|
||
function i(m) {
|
||
return /\s/.test(m);
|
||
}
|
||
function o(m) {
|
||
let x;
|
||
return i(m) && (x = t("modelManager.cannotUseSpaces")), x;
|
||
}
|
||
const l = {
|
||
name: "",
|
||
description: "",
|
||
config: "configs/stable-diffusion/v1-inference.yaml",
|
||
weights: "",
|
||
vae: "",
|
||
width: 512,
|
||
height: 512,
|
||
format: "ckpt",
|
||
default: !1
|
||
}, f = (m) => {
|
||
e(Nh(m)), e(Ju(null));
|
||
}, [h, y] = pt.useState(!1);
|
||
return /* @__PURE__ */ c.jsxs(Bt, { gap: 2, alignItems: "flex-start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("common.back"),
|
||
tooltip: t("common.back"),
|
||
onClick: () => e(Ju(null)),
|
||
width: "max-content",
|
||
position: "absolute",
|
||
zIndex: 1,
|
||
size: "sm",
|
||
insetInlineEnd: 12,
|
||
top: 3,
|
||
icon: /* @__PURE__ */ c.jsx(YT, {})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(mJ, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: t("modelManager.addManually"),
|
||
isChecked: h,
|
||
onChange: () => y(!h)
|
||
}
|
||
),
|
||
h && /* @__PURE__ */ c.jsx(
|
||
Kh,
|
||
{
|
||
initialValues: l,
|
||
onSubmit: f,
|
||
children: ({ handleSubmit: m, errors: x, touched: b }) => /* @__PURE__ */ c.jsx("form", { onSubmit: m, children: /* @__PURE__ */ c.jsxs(Bt, { rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontSize: 20, fontWeight: "bold", alignSelf: "start", children: t("modelManager.manual") }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!x.name && b.name,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "name", fontSize: "sm", children: t("modelManager.name") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "name",
|
||
name: "name",
|
||
type: "text",
|
||
validate: o,
|
||
width: "2xl"
|
||
}
|
||
),
|
||
x.name && b.name ? /* @__PURE__ */ c.jsx(qn, { children: x.name }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.nameValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!x.description && b.description,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "description", fontSize: "sm", children: t("modelManager.description") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "description",
|
||
name: "description",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
x.description && b.description ? /* @__PURE__ */ c.jsx(qn, { children: x.description }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.descriptionValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!x.config && b.config,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "config", fontSize: "sm", children: t("modelManager.config") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "config",
|
||
name: "config",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
x.config && b.config ? /* @__PURE__ */ c.jsx(qn, { children: x.config }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.configValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!x.weights && b.weights,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "config", fontSize: "sm", children: t("modelManager.modelLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "weights",
|
||
name: "weights",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
x.weights && b.weights ? /* @__PURE__ */ c.jsx(qn, { children: x.weights }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.modelLocationValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!x.vae && b.vae, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae", fontSize: "sm", children: t("modelManager.vaeLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae",
|
||
name: "vae",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
x.vae && b.vae ? /* @__PURE__ */ c.jsx(qn, { children: x.vae }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.vaeLocationValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(wf, { width: "100%", children: [
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!x.width && b.width, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "width", fontSize: "sm", children: t("modelManager.width") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(Yn, { id: "width", name: "width", children: ({
|
||
field: E,
|
||
form: j
|
||
}) => /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
id: "width",
|
||
name: "width",
|
||
min: W5,
|
||
max: G5,
|
||
step: 64,
|
||
width: "90%",
|
||
value: j.values.width,
|
||
onChange: (M) => j.setFieldValue(E.name, Number(M))
|
||
}
|
||
) }),
|
||
x.width && b.width ? /* @__PURE__ */ c.jsx(qn, { children: x.width }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.widthValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!x.height && b.height, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "height", fontSize: "sm", children: t("modelManager.height") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(Yn, { id: "height", name: "height", children: ({
|
||
field: E,
|
||
form: j
|
||
}) => /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
id: "height",
|
||
name: "height",
|
||
min: W5,
|
||
max: G5,
|
||
width: "90%",
|
||
step: 64,
|
||
value: j.values.height,
|
||
onChange: (M) => j.setFieldValue(E.name, Number(M))
|
||
}
|
||
) }),
|
||
x.height && b.height ? /* @__PURE__ */ c.jsx(qn, { children: x.height }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.heightValidationMsg") })
|
||
] })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
type: "submit",
|
||
className: "modal-close-btn",
|
||
isLoading: n,
|
||
children: t("modelManager.addModel")
|
||
}
|
||
)
|
||
] }) })
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
function bg({
|
||
children: e
|
||
}) {
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
padding: 4,
|
||
rowGap: 4,
|
||
borderRadius: "base",
|
||
width: "full",
|
||
bg: "base.900"
|
||
},
|
||
children: e
|
||
}
|
||
);
|
||
}
|
||
function yJ() {
|
||
const e = je(), { t } = Pe(), n = Z(
|
||
(h) => h.system.isProcessing
|
||
);
|
||
function i(h) {
|
||
return /\s/.test(h);
|
||
}
|
||
function o(h) {
|
||
let y;
|
||
return i(h) && (y = t("modelManager.cannotUseSpaces")), y;
|
||
}
|
||
const l = {
|
||
name: "",
|
||
description: "",
|
||
repo_id: "",
|
||
path: "",
|
||
format: "diffusers",
|
||
default: !1,
|
||
vae: {
|
||
repo_id: "",
|
||
path: ""
|
||
}
|
||
}, f = (h) => {
|
||
const y = h;
|
||
h.path === "" && delete y.path, h.repo_id === "" && delete y.repo_id, h.vae.path === "" && delete y.vae.path, h.vae.repo_id === "" && delete y.vae.repo_id, e(Nh(y)), e(Ju(null));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(ce, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": t("common.back"),
|
||
tooltip: t("common.back"),
|
||
onClick: () => e(Ju(null)),
|
||
width: "max-content",
|
||
position: "absolute",
|
||
zIndex: 1,
|
||
size: "sm",
|
||
insetInlineEnd: 12,
|
||
top: 3,
|
||
icon: /* @__PURE__ */ c.jsx(YT, {})
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Kh,
|
||
{
|
||
initialValues: l,
|
||
onSubmit: f,
|
||
children: ({ handleSubmit: h, errors: y, touched: m }) => {
|
||
var x, b, E, j, M, R, k, A, L, z;
|
||
return /* @__PURE__ */ c.jsx("form", { onSubmit: h, children: /* @__PURE__ */ c.jsxs(Bt, { rowGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(bg, { children: /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!y.name && m.name,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "name", fontSize: "sm", children: t("modelManager.name") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "name",
|
||
name: "name",
|
||
type: "text",
|
||
validate: o,
|
||
width: "2xl",
|
||
isRequired: !0
|
||
}
|
||
),
|
||
y.name && m.name ? /* @__PURE__ */ c.jsx(qn, { children: y.name }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.nameValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(bg, { children: /* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!y.description && m.description,
|
||
isRequired: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "description", fontSize: "sm", children: t("modelManager.description") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "description",
|
||
name: "description",
|
||
type: "text",
|
||
width: "2xl",
|
||
isRequired: !0
|
||
}
|
||
),
|
||
y.description && m.description ? /* @__PURE__ */ c.jsx(qn, { children: y.description }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.descriptionValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsxs(bg, { children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "bold", fontSize: "sm", children: t("modelManager.formMessageDiffusersModelLocation") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontSize: "sm",
|
||
fontStyle: "italic"
|
||
},
|
||
variant: "subtext",
|
||
children: t("modelManager.formMessageDiffusersModelLocationDesc")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!y.path && m.path, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "path", fontSize: "sm", children: t("modelManager.modelLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "path",
|
||
name: "path",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
y.path && m.path ? /* @__PURE__ */ c.jsx(qn, { children: y.path }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.modelLocationValidationMsg") })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(vn, { isInvalid: !!y.repo_id && m.repo_id, children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "repo_id", fontSize: "sm", children: t("modelManager.repo_id") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "repo_id",
|
||
name: "repo_id",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
y.repo_id && m.repo_id ? /* @__PURE__ */ c.jsx(qn, { children: y.repo_id }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.repoIDValidationMsg") })
|
||
] })
|
||
] })
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(bg, { children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "bold", children: t("modelManager.formMessageDiffusersVAELocation") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontSize: "sm",
|
||
fontStyle: "italic"
|
||
},
|
||
variant: "subtext",
|
||
children: t("modelManager.formMessageDiffusersVAELocationDesc")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!((x = y.vae) != null && x.path) && ((b = m.vae) == null ? void 0 : b.path),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae.path", fontSize: "sm", children: t("modelManager.vaeLocation") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae.path",
|
||
name: "vae.path",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
(E = y.vae) != null && E.path && ((j = m.vae) != null && j.path) ? /* @__PURE__ */ c.jsx(qn, { children: (M = y.vae) == null ? void 0 : M.path }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.vaeLocationValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
vn,
|
||
{
|
||
isInvalid: !!((R = y.vae) != null && R.repo_id) && ((k = m.vae) == null ? void 0 : k.repo_id),
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(wn, { htmlFor: "vae.repo_id", fontSize: "sm", children: t("modelManager.vaeRepoID") }),
|
||
/* @__PURE__ */ c.jsxs(Bt, { alignItems: "start", children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
Yn,
|
||
{
|
||
as: _n,
|
||
id: "vae.repo_id",
|
||
name: "vae.repo_id",
|
||
type: "text",
|
||
width: "2xl"
|
||
}
|
||
),
|
||
(A = y.vae) != null && A.repo_id && ((L = m.vae) != null && L.repo_id) ? /* @__PURE__ */ c.jsx(qn, { children: (z = y.vae) == null ? void 0 : z.repo_id }) : /* @__PURE__ */ c.jsx(Gn, { margin: 0, children: t("modelManager.vaeRepoIDValidationMsg") })
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(un, { type: "submit", isLoading: n, children: t("modelManager.addModel") })
|
||
] }) });
|
||
}
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
function q5({
|
||
text: e,
|
||
onClick: t
|
||
}) {
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
position: "relative",
|
||
width: "50%",
|
||
height: 40,
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
onClick: t,
|
||
as: pc,
|
||
children: /* @__PURE__ */ c.jsx(mt, { fontWeight: "bold", children: e })
|
||
}
|
||
);
|
||
}
|
||
function xJ() {
|
||
const { isOpen: e, onOpen: t, onClose: n } = Gl(), i = Z(
|
||
(h) => h.ui.addNewModelUIOption
|
||
), o = je(), { t: l } = Pe(), f = () => {
|
||
n(), o(Ju(null));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
"aria-label": l("modelManager.addNewModel"),
|
||
tooltip: l("modelManager.addNewModel"),
|
||
onClick: t,
|
||
size: "sm",
|
||
children: /* @__PURE__ */ c.jsxs(ce, { columnGap: 2, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsx(Gh, {}),
|
||
l("modelManager.addNew")
|
||
] })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ql,
|
||
{
|
||
isOpen: e,
|
||
onClose: f,
|
||
size: "3xl",
|
||
closeOnOverlayClick: !1,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bs, {}),
|
||
/* @__PURE__ */ c.jsxs(Yl, { margin: "auto", paddingInlineEnd: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { children: l("modelManager.addNewModel") }),
|
||
/* @__PURE__ */ c.jsx(jf, {}),
|
||
/* @__PURE__ */ c.jsxs(_s, { children: [
|
||
i == null && /* @__PURE__ */ c.jsxs(ce, { columnGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
q5,
|
||
{
|
||
text: l("modelManager.addCheckpointModel"),
|
||
onClick: () => o(Ju("ckpt"))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
q5,
|
||
{
|
||
text: l("modelManager.addDiffuserModel"),
|
||
onClick: () => o(Ju("diffusers"))
|
||
}
|
||
)
|
||
] }),
|
||
i == "ckpt" && /* @__PURE__ */ c.jsx(gJ, {}),
|
||
i == "diffusers" && /* @__PURE__ */ c.jsx(yJ, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(Ls, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
function Cg(e) {
|
||
const { isProcessing: t, isConnected: n } = Z(
|
||
(j) => j.system
|
||
), i = Z(
|
||
(j) => j.system.openModel
|
||
), { t: o } = Pe(), l = je(), { name: f, status: h, description: y } = e, m = () => {
|
||
l(I6(f));
|
||
}, x = () => {
|
||
l(iw(f));
|
||
}, b = () => {
|
||
l(Jk(f)), l(iw(null));
|
||
}, E = () => {
|
||
switch (h) {
|
||
case "active":
|
||
return "ok.500";
|
||
case "cached":
|
||
return "warning.500";
|
||
case "not loaded":
|
||
return "inherit";
|
||
}
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
alignItems: "center",
|
||
p: 2,
|
||
borderRadius: "base",
|
||
sx: f === i ? {
|
||
bg: "accent.750",
|
||
_hover: {
|
||
bg: "accent.750"
|
||
}
|
||
} : {
|
||
_hover: {
|
||
bg: "base.750"
|
||
}
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Ut, { onClick: x, cursor: "pointer", children: /* @__PURE__ */ c.jsx(Wr, { label: y, hasArrow: !0, placement: "bottom", children: /* @__PURE__ */ c.jsx(mt, { fontWeight: "600", children: f }) }) }),
|
||
/* @__PURE__ */ c.jsx(s0, { onClick: x, cursor: "pointer" }),
|
||
/* @__PURE__ */ c.jsxs(ce, { gap: 2, alignItems: "center", children: [
|
||
/* @__PURE__ */ c.jsx(mt, { color: E(), children: h }),
|
||
/* @__PURE__ */ c.jsx(
|
||
pc,
|
||
{
|
||
size: "sm",
|
||
onClick: m,
|
||
isDisabled: h === "active" || t || !n,
|
||
children: o("modelManager.load")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(__, {}),
|
||
size: "sm",
|
||
onClick: x,
|
||
"aria-label": "Modify Config",
|
||
isDisabled: h === "active" || t || !n
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
j0,
|
||
{
|
||
title: o("modelManager.deleteModel"),
|
||
acceptCallback: b,
|
||
acceptButtonText: o("modelManager.delete"),
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
icon: /* @__PURE__ */ c.jsx(U_, {}),
|
||
size: "sm",
|
||
"aria-label": o("modelManager.deleteConfig"),
|
||
isDisabled: h === "active" || t || !n,
|
||
colorScheme: "error"
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { rowGap: 4, flexDirection: "column", children: [
|
||
/* @__PURE__ */ c.jsx("p", { style: { fontWeight: "bold" }, children: o("modelManager.deleteMsg1") }),
|
||
/* @__PURE__ */ c.jsx("p", { children: o("modelManager.deleteMsg2") })
|
||
] })
|
||
}
|
||
)
|
||
] })
|
||
]
|
||
}
|
||
);
|
||
}
|
||
function SJ() {
|
||
const e = je(), { isOpen: t, onOpen: n, onClose: i } = Gl(), o = Z(lB), { t: l } = Pe(), [f, h] = qe(
|
||
Object.keys(o)[0]
|
||
), [y, m] = qe(
|
||
Object.keys(o)[1]
|
||
), [x, b] = qe("none"), [E, j] = qe(""), [M, R] = qe(0.5), [k, A] = qe("weighted_sum"), [L, z] = qe("root"), [I, _] = qe(""), [U, B] = qe(!1), q = Object.keys(o).filter(
|
||
(ae) => ae !== y && ae !== x
|
||
), J = Object.keys(o).filter(
|
||
(ae) => ae !== f && ae !== x
|
||
), G = [
|
||
{ key: l("modelManager.none"), value: "none" },
|
||
...Object.keys(o).filter((ae) => ae !== f && ae !== y).map((ae) => ({ key: ae, value: ae }))
|
||
], H = Z(
|
||
(ae) => ae.system.isProcessing
|
||
), le = () => {
|
||
let ae = [f, y, x];
|
||
ae = ae.filter((Te) => Te !== "none");
|
||
const he = {
|
||
models_to_merge: ae,
|
||
merged_model_name: E !== "" ? E : ae.join("-"),
|
||
alpha: M,
|
||
interp: k,
|
||
model_merge_save_path: L === "root" ? null : I,
|
||
force: U
|
||
};
|
||
e($k(he));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(un, { onClick: n, size: "sm", children: /* @__PURE__ */ c.jsx(ce, { columnGap: 2, alignItems: "center", children: l("modelManager.mergeModels") }) }),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ql,
|
||
{
|
||
isOpen: t,
|
||
onClose: i,
|
||
size: "4xl",
|
||
closeOnOverlayClick: !1,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bs, {}),
|
||
/* @__PURE__ */ c.jsxs(Yl, { fontFamily: "Inter", margin: "auto", paddingInlineEnd: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { children: l("modelManager.mergeModels") }),
|
||
/* @__PURE__ */ c.jsx(jf, {}),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, children: [
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
marginBottom: 4,
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
rowGap: 1,
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(mt, { children: l("modelManager.modelMergeHeaderHelp1") }),
|
||
/* @__PURE__ */ c.jsx(mt, { fontSize: "sm", variant: "subtext", children: l("modelManager.modelMergeHeaderHelp2") })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: l("modelManager.modelOne"),
|
||
validValues: q,
|
||
onChange: (ae) => h(ae.target.value)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: l("modelManager.modelTwo"),
|
||
validValues: J,
|
||
onChange: (ae) => m(ae.target.value)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: l("modelManager.modelThree"),
|
||
validValues: G,
|
||
onChange: (ae) => {
|
||
ae.target.value !== "none" ? (b(ae.target.value), A("add_difference")) : (b("none"), A("weighted_sum"));
|
||
}
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
label: l("modelManager.mergedModelName"),
|
||
value: E,
|
||
onChange: (ae) => j(ae.target.value)
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
gap: 4,
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
kn,
|
||
{
|
||
label: l("modelManager.alpha"),
|
||
min: 0.01,
|
||
max: 0.99,
|
||
step: 0.01,
|
||
value: M,
|
||
onChange: (ae) => R(ae),
|
||
withInput: !0,
|
||
withReset: !0,
|
||
handleReset: () => R(0.5),
|
||
withSliderMarks: !0
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(mt, { variant: "subtext", fontSize: "sm", children: l("modelManager.modelMergeAlphaHelp") })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
gap: 4,
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: 500, fontSize: "sm", variant: "subtext", children: l("modelManager.interpolationType") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
jh,
|
||
{
|
||
value: k,
|
||
onChange: (ae) => A(ae),
|
||
children: /* @__PURE__ */ c.jsx(ce, { columnGap: 4, children: x === "none" ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "weighted_sum", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.weightedSum") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "sigmoid", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.sigmoid") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "inv_sigmoid", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.inverseSigmoid") }) })
|
||
] }) : /* @__PURE__ */ c.jsx(Ua, { value: "add_difference", children: /* @__PURE__ */ c.jsx(
|
||
Wr,
|
||
{
|
||
label: l(
|
||
"modelManager.modelMergeInterpAddDifferenceHelp"
|
||
),
|
||
children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.addDifference") })
|
||
}
|
||
) }) })
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
sx: {
|
||
flexDirection: "column",
|
||
padding: 4,
|
||
borderRadius: "base",
|
||
gap: 4,
|
||
bg: "base.900"
|
||
},
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(mt, { fontWeight: "500", fontSize: "sm", variant: "subtext", children: l("modelManager.mergedModelSaveLocation") }),
|
||
/* @__PURE__ */ c.jsx(
|
||
jh,
|
||
{
|
||
value: L,
|
||
onChange: (ae) => z(ae),
|
||
children: /* @__PURE__ */ c.jsxs(ce, { columnGap: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "root", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.invokeAIFolder") }) }),
|
||
/* @__PURE__ */ c.jsx(Ua, { value: "custom", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "sm", children: l("modelManager.custom") }) })
|
||
] })
|
||
}
|
||
)
|
||
] }),
|
||
L === "custom" && /* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
label: l("modelManager.mergedModelCustomSaveLocation"),
|
||
value: I,
|
||
onChange: (ae) => _(ae.target.value)
|
||
}
|
||
)
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Bn,
|
||
{
|
||
label: l("modelManager.ignoreMismatch"),
|
||
isChecked: U,
|
||
onChange: (ae) => B(ae.target.checked),
|
||
fontWeight: "500"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
onClick: le,
|
||
isLoading: H,
|
||
isDisabled: L === "custom" && I === "",
|
||
children: l("modelManager.merge")
|
||
}
|
||
)
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsx(Ls, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
const bJ = ct(
|
||
Xn,
|
||
(e) => Ie.map(e.model_list, (n, i) => ({ name: i, ...n })),
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
);
|
||
function ex({
|
||
label: e,
|
||
isActive: t,
|
||
onClick: n
|
||
}) {
|
||
return /* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
onClick: n,
|
||
isActive: t,
|
||
sx: {
|
||
_active: {
|
||
bg: "accent.750"
|
||
}
|
||
},
|
||
size: "sm",
|
||
children: e
|
||
}
|
||
);
|
||
}
|
||
const CJ = () => {
|
||
const e = Z(bJ), [t, n] = pt.useState(!1);
|
||
pt.useEffect(() => {
|
||
const E = setTimeout(() => {
|
||
n(!0);
|
||
}, 200);
|
||
return () => clearTimeout(E);
|
||
}, []);
|
||
const [i, o] = qe(""), [l, f] = qe("all"), [h, y] = fP(), { t: m } = Pe(), x = (E) => {
|
||
y(() => {
|
||
o(E.target.value);
|
||
});
|
||
}, b = an(() => {
|
||
const E = [], j = [], M = [], R = [];
|
||
return e.forEach((k, A) => {
|
||
k.name.toLowerCase().includes(i.toLowerCase()) && (M.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Cg,
|
||
{
|
||
name: k.name,
|
||
status: k.status,
|
||
description: k.description
|
||
},
|
||
A
|
||
)
|
||
), k.format === l && R.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Cg,
|
||
{
|
||
name: k.name,
|
||
status: k.status,
|
||
description: k.description
|
||
},
|
||
A
|
||
)
|
||
)), k.format !== "diffusers" ? E.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Cg,
|
||
{
|
||
name: k.name,
|
||
status: k.status,
|
||
description: k.description
|
||
},
|
||
A
|
||
)
|
||
) : j.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
Cg,
|
||
{
|
||
name: k.name,
|
||
status: k.status,
|
||
description: k.description
|
||
},
|
||
A
|
||
)
|
||
);
|
||
}), i !== "" ? l === "all" ? /* @__PURE__ */ c.jsx(Ut, { marginTop: 4, children: M }) : /* @__PURE__ */ c.jsx(Ut, { marginTop: 4, children: R }) : /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 6, children: [
|
||
l === "all" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
/* @__PURE__ */ c.jsxs(Ut, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontWeight: "500",
|
||
py: 2,
|
||
px: 4,
|
||
my: 4,
|
||
mx: 0,
|
||
borderRadius: "base",
|
||
width: "max-content",
|
||
fontSize: "sm",
|
||
bg: "base.750"
|
||
},
|
||
children: m("modelManager.checkpointModels")
|
||
}
|
||
),
|
||
E
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(Ut, { children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
sx: {
|
||
fontWeight: "500",
|
||
py: 2,
|
||
px: 4,
|
||
mb: 4,
|
||
borderRadius: "base",
|
||
width: "max-content",
|
||
fontSize: "sm",
|
||
bg: "base.750"
|
||
},
|
||
children: m("modelManager.diffusersModels")
|
||
}
|
||
),
|
||
j
|
||
] })
|
||
] }),
|
||
l === "ckpt" && /* @__PURE__ */ c.jsx(ce, { flexDirection: "column", marginTop: 4, children: E }),
|
||
l === "diffusers" && /* @__PURE__ */ c.jsx(ce, { flexDirection: "column", marginTop: 4, children: j })
|
||
] });
|
||
}, [e, i, m, l]);
|
||
return /* @__PURE__ */ c.jsxs(ce, { flexDirection: "column", rowGap: 4, width: "50%", minWidth: "50%", children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { justifyContent: "space-between", alignItems: "center", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "md", children: m("modelManager.availableModels") }),
|
||
/* @__PURE__ */ c.jsx(s0, {}),
|
||
/* @__PURE__ */ c.jsx(xJ, {}),
|
||
/* @__PURE__ */ c.jsx(SJ, {})
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(
|
||
_n,
|
||
{
|
||
onChange: x,
|
||
label: m("modelManager.search")
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ce,
|
||
{
|
||
flexDirection: "column",
|
||
gap: 1,
|
||
maxHeight: window.innerHeight - 240,
|
||
overflow: "scroll",
|
||
paddingInlineEnd: 4,
|
||
children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { columnGap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ex,
|
||
{
|
||
label: m("modelManager.allModels"),
|
||
onClick: () => f("all"),
|
||
isActive: l === "all"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ex,
|
||
{
|
||
label: m("modelManager.checkpointModels"),
|
||
onClick: () => f("ckpt"),
|
||
isActive: l === "ckpt"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ex,
|
||
{
|
||
label: m("modelManager.diffusersModels"),
|
||
onClick: () => f("diffusers"),
|
||
isActive: l === "diffusers"
|
||
}
|
||
)
|
||
] }),
|
||
t ? b : /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
width: "100%",
|
||
minHeight: 96,
|
||
justifyContent: "center",
|
||
alignItems: "center",
|
||
children: /* @__PURE__ */ c.jsx(rS, {})
|
||
}
|
||
)
|
||
]
|
||
}
|
||
)
|
||
] });
|
||
};
|
||
function wJ({
|
||
children: e
|
||
}) {
|
||
const {
|
||
isOpen: t,
|
||
onOpen: n,
|
||
onClose: i
|
||
} = Gl(), o = Z(
|
||
(h) => h.system.model_list
|
||
), l = Z(
|
||
(h) => h.system.openModel
|
||
), { t: f } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
Ci(e, {
|
||
onClick: n
|
||
}),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ql,
|
||
{
|
||
isOpen: t,
|
||
onClose: i,
|
||
size: "full",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bs, {}),
|
||
/* @__PURE__ */ c.jsxs(Yl, { children: [
|
||
/* @__PURE__ */ c.jsx(jf, {}),
|
||
/* @__PURE__ */ c.jsx(Fs, { children: f("modelManager.modelManager") }),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsxs(ce, { width: "100%", columnGap: 8, children: [
|
||
/* @__PURE__ */ c.jsx(CJ, {}),
|
||
l && o[l].format === "diffusers" ? /* @__PURE__ */ c.jsx(vJ, {}) : /* @__PURE__ */ c.jsx(pJ, {})
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsx(Ls, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
] });
|
||
}
|
||
const EJ = ct(
|
||
[Xn],
|
||
(e) => {
|
||
const { isProcessing: t, model_list: n } = e;
|
||
return { models: Ie.map(n, (o, l) => l), isProcessing: t };
|
||
},
|
||
{
|
||
memoizeOptions: {
|
||
resultEqualityCheck: Ie.isEqual
|
||
}
|
||
}
|
||
), jJ = () => {
|
||
const e = je(), { t } = Pe(), { models: n, isProcessing: i } = Z(EJ), o = Z(QT), l = (f) => {
|
||
e(I6(f.target.value));
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
ce,
|
||
{
|
||
style: {
|
||
paddingInlineStart: 1.5
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
style: { fontSize: "sm" },
|
||
"aria-label": t("accessibility.modelSelect"),
|
||
tooltip: o.description,
|
||
isDisabled: i,
|
||
value: o.name,
|
||
validValues: n,
|
||
onChange: l
|
||
}
|
||
)
|
||
}
|
||
);
|
||
}, TJ = ct(
|
||
[Xn, vc],
|
||
(e, t) => {
|
||
const {
|
||
shouldDisplayInProgressType: n,
|
||
shouldConfirmOnDelete: i,
|
||
shouldDisplayGuides: o,
|
||
model_list: l,
|
||
saveIntermediatesInterval: f,
|
||
enableImageDebugging: h
|
||
} = e, { shouldUseCanvasBetaLayout: y, shouldUseSliders: m } = t;
|
||
return {
|
||
shouldDisplayInProgressType: n,
|
||
shouldConfirmOnDelete: i,
|
||
shouldDisplayGuides: o,
|
||
models: Ie.map(l, (x, b) => b),
|
||
saveIntermediatesInterval: f,
|
||
enableImageDebugging: h,
|
||
shouldUseCanvasBetaLayout: y,
|
||
shouldUseSliders: m
|
||
};
|
||
},
|
||
{
|
||
memoizeOptions: { resultEqualityCheck: Ie.isEqual }
|
||
}
|
||
), tx = {
|
||
flexDirection: "column",
|
||
gap: 2,
|
||
p: 4,
|
||
bg: "base.900"
|
||
}, DJ = ({ children: e }) => {
|
||
const t = je(), { t: n } = Pe(), i = Z((z) => z.generation.steps), {
|
||
isOpen: o,
|
||
onOpen: l,
|
||
onClose: f
|
||
} = Gl(), {
|
||
isOpen: h,
|
||
onOpen: y,
|
||
onClose: m
|
||
} = Gl(), {
|
||
shouldDisplayInProgressType: x,
|
||
shouldConfirmOnDelete: b,
|
||
shouldDisplayGuides: E,
|
||
saveIntermediatesInterval: j,
|
||
enableImageDebugging: M,
|
||
shouldUseCanvasBetaLayout: R,
|
||
shouldUseSliders: k
|
||
} = Z(TJ), A = () => {
|
||
oP.purge().then(() => {
|
||
f(), y();
|
||
});
|
||
}, L = (z) => {
|
||
z > i && (z = i), z < 1 && (z = 1), t(sP(z));
|
||
};
|
||
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
||
Ci(e, {
|
||
onClick: l
|
||
}),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ql,
|
||
{
|
||
isOpen: o,
|
||
onClose: f,
|
||
size: "xl",
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bs, {}),
|
||
/* @__PURE__ */ c.jsxs(Yl, { paddingInlineEnd: 4, children: [
|
||
/* @__PURE__ */ c.jsx(Fs, { children: n("common.settingsLabel") }),
|
||
/* @__PURE__ */ c.jsx(jf, {}),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsxs(_i, { gap: 4, children: [
|
||
/* @__PURE__ */ c.jsxs(ce, { sx: tx, children: [
|
||
/* @__PURE__ */ c.jsx(
|
||
ai,
|
||
{
|
||
label: n("settings.displayInProgress"),
|
||
validValues: eP,
|
||
value: x,
|
||
onChange: (z) => t(
|
||
tP(
|
||
z.target.value
|
||
)
|
||
)
|
||
}
|
||
),
|
||
x === "full-res" && /* @__PURE__ */ c.jsx(
|
||
Us,
|
||
{
|
||
label: n("settings.saveSteps"),
|
||
min: 1,
|
||
max: i,
|
||
step: 1,
|
||
onChange: L,
|
||
value: j,
|
||
width: "auto",
|
||
textAlign: "center"
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("settings.confirmOnDelete"),
|
||
isChecked: b,
|
||
onChange: (z) => t(e6(z.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("settings.displayHelpIcons"),
|
||
isChecked: E,
|
||
onChange: (z) => t(nP(z.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("settings.useCanvasBeta"),
|
||
isChecked: R,
|
||
onChange: (z) => t(rP(z.target.checked))
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("settings.useSlidersForAll"),
|
||
isChecked: k,
|
||
onChange: (z) => t(aP(z.target.checked))
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { sx: tx, children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "sm", style: { fontWeight: "bold" }, children: "Developer" }),
|
||
/* @__PURE__ */ c.jsx(
|
||
ti,
|
||
{
|
||
label: n("settings.enableImageDebugging"),
|
||
isChecked: M,
|
||
onChange: (z) => t(iP(z.target.checked))
|
||
}
|
||
)
|
||
] }),
|
||
/* @__PURE__ */ c.jsxs(ce, { sx: tx, children: [
|
||
/* @__PURE__ */ c.jsx(Bi, { size: "sm", children: n("settings.resetWebUI") }),
|
||
/* @__PURE__ */ c.jsx(un, { colorScheme: "error", onClick: A, children: n("settings.resetWebUI") }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: n("settings.resetWebUIDesc1") }),
|
||
/* @__PURE__ */ c.jsx(mt, { children: n("settings.resetWebUIDesc2") })
|
||
] })
|
||
] }) }),
|
||
/* @__PURE__ */ c.jsx(Ls, { children: /* @__PURE__ */ c.jsx(un, { onClick: f, children: n("common.close") }) })
|
||
] })
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsxs(
|
||
ql,
|
||
{
|
||
closeOnOverlayClick: !1,
|
||
isOpen: h,
|
||
onClose: m,
|
||
isCentered: !0,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(Bs, { backdropFilter: "blur(40px)" }),
|
||
/* @__PURE__ */ c.jsxs(Yl, { children: [
|
||
/* @__PURE__ */ c.jsx(Fs, {}),
|
||
/* @__PURE__ */ c.jsx(_s, { children: /* @__PURE__ */ c.jsx(ce, { justifyContent: "center", children: /* @__PURE__ */ c.jsx(mt, { fontSize: "lg", children: /* @__PURE__ */ c.jsx(mt, { children: n("settings.resetComplete") }) }) }) }),
|
||
/* @__PURE__ */ c.jsx(Ls, {})
|
||
] })
|
||
]
|
||
}
|
||
)
|
||
] });
|
||
}, MJ = ct(
|
||
Xn,
|
||
(e) => ({
|
||
isConnected: e.isConnected,
|
||
isProcessing: e.isProcessing,
|
||
currentIteration: e.currentIteration,
|
||
totalIterations: e.totalIterations,
|
||
currentStatus: e.currentStatus,
|
||
hasError: e.hasError,
|
||
wasErrorSeen: e.wasErrorSeen
|
||
}),
|
||
{
|
||
memoizeOptions: { resultEqualityCheck: Ie.isEqual }
|
||
}
|
||
), RJ = () => {
|
||
const {
|
||
isConnected: e,
|
||
isProcessing: t,
|
||
currentIteration: n,
|
||
totalIterations: i,
|
||
currentStatus: o,
|
||
hasError: l,
|
||
wasErrorSeen: f
|
||
} = Z(MJ), h = je(), { t: y } = Pe();
|
||
let m;
|
||
e && !l ? m = "ok" : m = "error";
|
||
let x = o;
|
||
t && (m = "working"), x && t && i > 1 && (x = `${y(
|
||
x
|
||
)} (${n}/${i})`);
|
||
const b = l && !f ? "Click to clear, check logs for details" : void 0, E = l && !f ? "pointer" : "initial", j = () => {
|
||
(l || !f) && h(z6());
|
||
};
|
||
return /* @__PURE__ */ c.jsx(Wr, { label: b, children: /* @__PURE__ */ c.jsx(
|
||
mt,
|
||
{
|
||
cursor: E,
|
||
onClick: j,
|
||
sx: {
|
||
fontSize: "xs",
|
||
fontWeight: "600",
|
||
color: `${m}.400`
|
||
},
|
||
children: y(x)
|
||
}
|
||
) });
|
||
};
|
||
function kJ() {
|
||
const { t: e } = Pe(), t = je(), n = Z(
|
||
(f) => f.ui.currentTheme
|
||
), i = {
|
||
dark: e("common.darkTheme"),
|
||
light: e("common.lightTheme"),
|
||
green: e("common.greenTheme"),
|
||
ocean: e("common.oceanTheme")
|
||
}, o = (f) => {
|
||
t(lP(f));
|
||
}, l = () => {
|
||
const f = [];
|
||
return Object.keys(i).forEach((h) => {
|
||
f.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
sx: {
|
||
width: 24
|
||
},
|
||
isChecked: n === h,
|
||
leftIcon: n === h ? /* @__PURE__ */ c.jsx(y0, {}) : void 0,
|
||
size: "sm",
|
||
onClick: () => o(h),
|
||
children: i[h]
|
||
},
|
||
h
|
||
)
|
||
);
|
||
}), f;
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.themeLabel"),
|
||
size: "sm",
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
icon: /* @__PURE__ */ c.jsx(VB, {})
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsx(Bt, { align: "stretch", children: l() })
|
||
}
|
||
);
|
||
}
|
||
function PJ() {
|
||
const { t: e, i18n: t } = Pe(), n = {
|
||
ar: e("common.langArabic", { lng: "ar" }),
|
||
nl: e("common.langDutch", { lng: "nl" }),
|
||
en: e("common.langEnglish", { lng: "en" }),
|
||
fr: e("common.langFrench", { lng: "fr" }),
|
||
de: e("common.langGerman", { lng: "de" }),
|
||
he: e("common.langHebrew", { lng: "he" }),
|
||
it: e("common.langItalian", { lng: "it" }),
|
||
ja: e("common.langJapanese", { lng: "ja" }),
|
||
ko: e("common.langKorean", { lng: "ko" }),
|
||
pl: e("common.langPolish", { lng: "pl" }),
|
||
pt_BR: e("common.langBrPortuguese", { lng: "pt_BR" }),
|
||
pt: e("common.langPortuguese", { lng: "pt" }),
|
||
ru: e("common.langRussian", { lng: "ru" }),
|
||
zh_CN: e("common.langSimplifiedChinese", { lng: "zh_CN" }),
|
||
es: e("common.langSpanish", { lng: "es" }),
|
||
uk: e("common.langUkranian", { lng: "ua" })
|
||
}, i = () => {
|
||
const o = [];
|
||
return Object.keys(n).forEach((l) => {
|
||
o.push(
|
||
/* @__PURE__ */ c.jsx(
|
||
un,
|
||
{
|
||
isChecked: localStorage.getItem("i18nextLng") === l,
|
||
leftIcon: localStorage.getItem("i18nextLng") === l ? /* @__PURE__ */ c.jsx(y0, {}) : void 0,
|
||
onClick: () => t.changeLanguage(l),
|
||
"aria-label": n[l],
|
||
size: "sm",
|
||
minWidth: "200px",
|
||
children: n[l]
|
||
},
|
||
l
|
||
)
|
||
);
|
||
}), o;
|
||
};
|
||
return /* @__PURE__ */ c.jsx(
|
||
xo,
|
||
{
|
||
trigger: "hover",
|
||
triggerComponent: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.languagePickerLabel"),
|
||
tooltip: e("common.languagePickerLabel"),
|
||
icon: /* @__PURE__ */ c.jsx(_B, {}),
|
||
size: "sm",
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 26
|
||
}
|
||
),
|
||
children: /* @__PURE__ */ c.jsx(Bt, { children: i() })
|
||
}
|
||
);
|
||
}
|
||
const OJ = () => {
|
||
const { t: e } = Pe();
|
||
return /* @__PURE__ */ c.jsxs(_i, { gridTemplateColumns: "auto max-content", children: [
|
||
/* @__PURE__ */ c.jsx(_D, {}),
|
||
/* @__PURE__ */ c.jsxs(ce, { alignItems: "center", gap: 2, children: [
|
||
/* @__PURE__ */ c.jsx(RJ, {}),
|
||
/* @__PURE__ */ c.jsx(jJ, {}),
|
||
/* @__PURE__ */ c.jsx(wJ, { children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("modelManager.modelManager"),
|
||
tooltip: e("modelManager.modelManager"),
|
||
size: "sm",
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
icon: /* @__PURE__ */ c.jsx(OB, {})
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(yY, { children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.hotkeysLabel"),
|
||
tooltip: e("common.hotkeysLabel"),
|
||
size: "sm",
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
icon: /* @__PURE__ */ c.jsx(BB, {})
|
||
}
|
||
) }),
|
||
/* @__PURE__ */ c.jsx(kJ, {}),
|
||
/* @__PURE__ */ c.jsx(PJ, {}),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.reportBugLabel"),
|
||
tooltip: e("common.reportBugLabel"),
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
size: "sm",
|
||
icon: /* @__PURE__ */ c.jsx(tc, { isExternal: !0, href: "http://github.com/invoke-ai/InvokeAI/issues", children: /* @__PURE__ */ c.jsx(PB, {}) })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.githubLabel"),
|
||
tooltip: e("common.githubLabel"),
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
size: "sm",
|
||
icon: /* @__PURE__ */ c.jsx(tc, { isExternal: !0, href: "http://github.com/invoke-ai/InvokeAI", children: /* @__PURE__ */ c.jsx(EB, {}) })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.discordLabel"),
|
||
tooltip: e("common.discordLabel"),
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 20,
|
||
size: "sm",
|
||
icon: /* @__PURE__ */ c.jsx(tc, { isExternal: !0, href: "https://discord.gg/ZmtBAhwWhy", children: /* @__PURE__ */ c.jsx(wB, {}) })
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(DJ, { children: /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
"aria-label": e("common.settingsLabel"),
|
||
tooltip: e("common.settingsLabel"),
|
||
variant: "link",
|
||
"data-variant": "link",
|
||
fontSize: 22,
|
||
size: "sm",
|
||
icon: /* @__PURE__ */ c.jsx(h_, {})
|
||
}
|
||
) })
|
||
] })
|
||
] });
|
||
};
|
||
function AJ() {
|
||
async function e(n = "") {
|
||
return await fetch(n, {
|
||
method: "GET",
|
||
cache: "no-cache"
|
||
});
|
||
}
|
||
const t = () => {
|
||
const n = document.location;
|
||
e(n + "/flaskwebgui-keep-server-alive").then((o) => o);
|
||
};
|
||
(!{}.NODE_ENV || {}.NODE_ENV === "production") && document.addEventListener("DOMContentLoaded", () => {
|
||
t(), setInterval(t, 3e3);
|
||
});
|
||
}
|
||
const NJ = () => {
|
||
const e = je(), t = Z(sB), n = Lh();
|
||
rt(() => {
|
||
t.forEach((i) => {
|
||
n(i);
|
||
}), t.length > 0 && e(uP());
|
||
}, [e, n, t]);
|
||
}, zJ = () => {
|
||
const e = je(), { shouldShowGalleryButton: t, shouldPinGallery: n } = Z(Tb), i = () => {
|
||
e(Qu(!0)), n && e(ca(!0));
|
||
};
|
||
return t ? /* @__PURE__ */ c.jsx(
|
||
Ye,
|
||
{
|
||
tooltip: "Show Gallery (G)",
|
||
tooltipProps: { placement: "top" },
|
||
"aria-label": "Show Gallery",
|
||
onClick: i,
|
||
sx: {
|
||
pos: "absolute",
|
||
top: "50%",
|
||
transform: "translate(0, -50%)",
|
||
zIndex: 31,
|
||
p: 0,
|
||
insetInlineEnd: 0,
|
||
px: 3,
|
||
h: 48,
|
||
w: 8,
|
||
borderStartEndRadius: 0,
|
||
borderEndEndRadius: 0
|
||
},
|
||
children: /* @__PURE__ */ c.jsx(mb, {})
|
||
}
|
||
) : null;
|
||
};
|
||
AJ();
|
||
const WJ = () => (NJ(), /* @__PURE__ */ c.jsxs(_i, { w: "100vw", h: "100vh", children: [
|
||
/* @__PURE__ */ c.jsxs(dY, { children: [
|
||
/* @__PURE__ */ c.jsx(mY, {}),
|
||
/* @__PURE__ */ c.jsxs(
|
||
_i,
|
||
{
|
||
gap: 4,
|
||
p: A_,
|
||
gridAutoRows: "min-content auto",
|
||
w: N_,
|
||
h: z_,
|
||
children: [
|
||
/* @__PURE__ */ c.jsx(OJ, {}),
|
||
/* @__PURE__ */ c.jsx(mq, {})
|
||
]
|
||
}
|
||
),
|
||
/* @__PURE__ */ c.jsx(Ut, { children: /* @__PURE__ */ c.jsx(hY, {}) })
|
||
] }),
|
||
/* @__PURE__ */ c.jsx(cH, {}),
|
||
/* @__PURE__ */ c.jsx(zJ, {})
|
||
] }));
|
||
export {
|
||
WJ as default
|
||
};
|