const ov = globalThis; function Ao(e) { return Ca(function(t, ...n) { return t == null || // let these methods crash like their originals e in t && typeof t[e] == "function" ? t[e](...n) : Object.prototype[e].apply(t, n); }, "Object_" + e); } const lu = /* @__PURE__ */ Ao( "hasOwnProperty" ), cu = /* @__PURE__ */ Ao( "isPrototypeOf" ), rv = /* @__PURE__ */ Ao( "propertyIsEnumerable" ), du = /* @__PURE__ */ Ao( "toString" ); function av(e) { return e == null || // let this method crash like its original "toLocaleString" in e && typeof e.toLocaleString == "function" ? e.toLocaleString() : du(e); } const iv = /* @__PURE__ */ Ao( "valueOf" ); function sv(e, ...t) { for (let n = 0, o = t.length; n < o; n++) { let r = t[n]; if (r != null) if (typeof r == "object") { const a = Object.getOwnPropertyDescriptors(r); for (const i of Reflect.ownKeys(a)) { const s = a[i]; s.enumerable && Object.defineProperty(e, i, s); } } else it("InvalidArgument: argument #" + (n + 1) + " is not an object"); } return e; } function it(e) { let t = /^([$a-zA-Z][$a-zA-Z0-9]*):\s*(\S.+)\s*$/.exec(e); if (t == null) throw new Error(e); { let n = new Error(t[2]); throw n.name = t[1], n; } } function Yt(e) { it(`MissingArgument: no ${tt(e)} given`); } function lv(e) { return e != null; } function cv(e) { return e == null; } function Jt(e) { return typeof e == "boolean" || e instanceof Boolean; } function dt(e) { return typeof e == "number" || e instanceof Number; } function an(e) { return dt(e) && isFinite(e.valueOf()); } function Us(e) { return dt(e) && isNaN(e.valueOf()); } function To(e, t, n, o = !0, r = !0) { if (!dt(e)) return !1; const a = e.valueOf(); return isNaN(a) ? !1 : !// "ValueIsFiniteNumber" is more robust than "isFinite" (an(t) && (a < t || !o && a === t) || an(n) && (a > n || !r && a === n)); } function Pn(e) { if (!dt(e)) return !1; const t = e.valueOf(); return isFinite(t) && Math.round(t) === t; } function Sr(e, t, n) { if (!Pn(e)) return !1; const o = e.valueOf(); return !// "ValueIsFiniteNumber" is more robust than "isFinite" (an(t) && o < t || an(n) && o > n); } function hn(e) { return Pn(e) && e.valueOf() >= 0; } function ya(e) { return Pn(e) && e.valueOf() >= 1; } function Pe(e) { return typeof e == "string" || e instanceof String; } const Ks = /^\s*$/; function dv(e) { return st(e, Ks); } function qs(e) { return Pe(e) && !Ks.test(e.valueOf()); } function st(e, t) { return (typeof e == "string" || e instanceof String) && t.test(e.valueOf()); } const uu = /^[^\x00-\x09\x0B\x0C\x0E-\x1F\x7F-\x9F\u2028\u2029\uFFF9-\uFFFB]*$/; function mn(e) { return st(e, uu); } const pu = /^[^\x00-\x1F\x7F-\x9F\u2028\u2029\uFFF9-\uFFFB]*$/; function Ee(e) { return st(e, pu); } function Vt(e) { return typeof e == "function"; } function xa(e) { return typeof e == "function" && (e.name ?? "") === ""; } function Xs(e) { return typeof e == "function" && !xa(e); } const fu = /^function\s*[^(]*\(\)\s*\{\s*\[native code\]\s*\}\s*$/; function va(e) { return typeof e == "function" && fu.test(e.toString()) && !e.name.startsWith("bound "); } function Ys(e) { return typeof e == "function" && !va(e); } function wa(e) { return e != null && typeof e == "object"; } function Ro(e) { return e != null && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype; } function Js(e) { return e != null && typeof e == "object" && !(e instanceof Object); } const _r = Array.isArray; function Zs(e, t, n) { return Ie( e, (o) => o !== void 0, t, n ); } function Ie(e, t, n, o) { if (!_r(e)) return !1; try { for (let r = 0, a = e.length; r < a; r++) if (!t(e[r])) return !1; return !(n != null && e.length < n || o != null && e.length > o); } catch { return !1; } } function hu(e, t) { return Ie(e, (n) => ge(n, t)); } function uv(e, t) { return e instanceof t; } function pv(e, t) { return cu(t, e); } function Qs(e) { return e instanceof Date; } function Ps(e) { return e instanceof Error; } function el(e) { return e instanceof RegExp; } function ge(e, t) { return t.indexOf(e) >= 0; } function An(e) { if (!Pe(e)) return !1; let t = e.valueOf().toLowerCase(); return $o.hasOwnProperty(t) || La.test(t) || Ma.test(t) || Aa.test(t) || Ta.test(t); } const gu = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i; function Tn(e) { return st(e, gu); } const mu = ( // URL characters after RFC 3986 /^[A-Za-z0-9\-._~:\/?#\[\]@!$&'()*+,;=%]+$/ ), bu = /%(?![0-9A-Fa-f]{2})/; function at(e) { if (!Pe(e)) return !1; const t = e.valueOf(); if (!mu.test(t) || // also rejects '' + whitespace bu.test(t)) return !1; try { return new URL(t, "file://"), !0; } catch { return !1; } } function yu(e) { return e.toLowerCase().replace(/:?$/, ":"); } function xu(e, t) { if (!at(e)) return !1; let n; try { n = new URL(e.valueOf()); } catch { return !1; } return t == null ? !0 : t.some( // "parsedURL.protocol" already (o) => yu(o) === n.protocol ); } const vu = /^\+[1-9][0-9]{6,14}$/; function tl(e) { return st(e, vu); } function nl(e) { return typeof e == "bigint"; } function ol(e) { return typeof e == "symbol"; } function rl(e) { return e instanceof Map; } function al(e) { return e instanceof Set; } function il(e) { return ArrayBuffer.isView(e) && !(e instanceof DataView); } function sl(e) { return e instanceof ArrayBuffer; } const wu = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; function ll(e) { return st(e, wu); } const ku = /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/; function cl(e) { if (!Pe(e)) return !1; const t = ku.exec(e.valueOf()); if (t == null) return !1; const [n, o, r] = [t[1], t[2], t[3]].map(Number), a = new Date(Date.UTC(n, o - 1, r)); return ( // detects overflows like 02-31 a.getUTCFullYear() === n && a.getUTCMonth() === o - 1 && a.getUTCDate() === r ); } const Cu = new RegExp( "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(:[0-9]{2}([.][0-9]+)?)?(Z|[+-][0-9]{2}:[0-9]{2})?$" ); function dl(e) { return st(e, Cu) && !isNaN(Date.parse(e.valueOf())); } const $u = new RegExp( "^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])[.]){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$" ); function ul(e) { return st(e, $u); } const ju = /^[0-9a-fA-F:.]+$/; function pl(e) { if (!Pe(e) || !ju.test(e.valueOf())) return !1; try { return new URL("http://[" + e.valueOf() + "]/"), !0; } catch { return !1; } } const Iu = new RegExp( "^(?=.{1,253}$)[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$", "i" ); function fl(e) { return st(e, Iu); } function hl(e) { return Sr(e, 1, 65535); } function Co(e, t = /* @__PURE__ */ new WeakSet()) { switch (!0) { case e == null: // deliberately also allows undefined case Jt(e): case an(e): // NaN/Infinity are not serializable case Pe(e): return !0; case Zs(e): if (t.has(e)) return !1; t.add(e); try { return Ie( e, (n) => n === void 0 ? !1 : Co(n, t) ); } finally { t.delete(e); } case Ro(e): if (t.has(e)) return !1; t.add(e); try { for (let n in e) if (e.hasOwnProperty(n) && !Co(e[n], t)) return !1; return !0; } finally { t.delete(e); } } return !1; } function gl(e) { return Ro(e) && Co(e); } function ml(e) { if (!Pe(e)) return !1; try { return JSON.parse(e.valueOf()), !0; } catch { return !1; } } const Su = new RegExp( "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" ); function bl(e) { return st(e, Su); } const _u = /^[0-9a-fA-F]+$/; function yl(e) { return st(e, _u); } const Se = !1, _e = !0; function ka(e) { return ( // "valueOf" may return other values for e instanceof Boolean || // other objects (e.g. Dates) e instanceof Number || e instanceof String ? e.valueOf() : e ); } function Du(e, t, n, o, r) { if (t == null) { if (o) return t; Yt(e); } if (n(t)) return ka(t); it( `InvalidArgument: the given ${tt(e)} is no valid ${tt(r)}` ); } function te(e, t, n) { let o = function(a, i) { return Du( a, i, e, t, n ); }, r = e.name; if (r != null && /^ValueIs/.test(r)) { let a = r.replace( // derive name from validator /^ValueIs/, t ? "allow" : "expect" ); return Ca(o, a); } else return o; } function Ca(e, t) { return e == null && it("MissingArgument: no function given"), typeof e != "function" && it("InvalidArgument: the given 1st Argument is not a JavaScript function"), t == null && it("MissingArgument: no desired name given"), typeof t != "string" && !(t instanceof String) && it("InvalidArgument: the given desired name is not a string"), e.name === t || Object.defineProperty(e, "name", { value: t.valueOf() }), e; } function Et(e, t) { return Ca( (n, o, ...r) => o == null ? o : e(n, o, ...r), t ); } function Lu(e, t, n) { return t == null ? void 0 : Au(e, t, n); } const fv = Lu; function Mu(e, t, n) { t == null && Yt(e); const o = ka(t); if (n == null || n(o) === !0) return o; it(`InvalidArgument: the given ${tt(e)} is invalid`); } const Au = Mu, on = /* @__PURE__ */ te( Jt, _e, "boolean value" ), hv = on, $a = /* @__PURE__ */ te( Jt, Se, "boolean value" ), gv = $a, Tu = /* @__PURE__ */ te( dt, _e, "numeric value" ), mv = Tu, xl = /* @__PURE__ */ te( dt, Se, "numeric value" ), bv = xl, Ru = /* @__PURE__ */ te( an, _e, "finite numeric value" ), yv = Ru, Fu = /* @__PURE__ */ te( an, Se, "finite numeric value" ), xv = Fu, Ou = /* @__PURE__ */ te( Us, _e, "NaN value" ), vv = Ou, zu = /* @__PURE__ */ te( Us, Se, "NaN value" ), wv = zu, Vu = /* @__PURE__ */ Et( vl, "allowNumberInRange" ), kv = Vu; function vl(e, t, n, o, r, a) { xl(e, t), isNaN(t) && it( `InvalidArgument: the given ${tt(e)} is not-a-number` ), r ?? (r = !0), a ?? (a = !0); const i = n != null && isFinite(n), s = o != null && isFinite(o), c = i && (t < n || !r && t === n), d = s && (t > o || !a && t === o); switch (!0) { case (c && s || d && i): throw new RangeError( `the given ${tt(e)} (${t}) is outside the allowed range (${n}...${o})` ); case c: throw new RangeError( `the given ${tt(e)} is below the allowed minimum (${t} ${r ? "<" : "<="} ${n})` ); case d: throw new RangeError( `the given ${tt(e)} exceeds the allowed maximum (${t} ${a ? ">" : ">="} ${o})` ); } return t.valueOf(); } const Cv = vl, Nu = /* @__PURE__ */ te( Pn, _e, "integral numeric value" ), $v = Nu, wl = /* @__PURE__ */ te( Pn, Se, "integral numeric value" ), jv = wl, Eu = /* @__PURE__ */ Et( ja, "allowIntegerInRange" ), Iv = Eu; function ja(e, t, n, o) { wl(e, t); const r = n != null && isFinite(n), a = o != null && isFinite(o), i = r && t < n, s = a && t > o; switch (!0) { case (i && a || s && r): throw new RangeError( `the given ${tt(e)} (${t}) is outside the allowed range (${n}...${o})` ); case i: throw new RangeError( `the given ${tt(e)} is below the allowed minimum (${t} < ${n})` ); case s: throw new RangeError( `the given ${tt(e)} exceeds the allowed maximum (${t} > ${o})` ); } return t.valueOf(); } const Sv = ja, kl = /* @__PURE__ */ te( hn, _e, "ordinal number" ), _v = kl, qn = /* @__PURE__ */ te( hn, Se, "ordinal number" ), Dv = qn, Dr = /* @__PURE__ */ te( ya, _e, "cardinal number" ), Qi = Dr, Cl = /* @__PURE__ */ te( ya, Se, "cardinal number" ), Lv = Cl, Lr = /* @__PURE__ */ te( Pe, _e, "literal string" ), Mv = Lr, Ia = /* @__PURE__ */ te( Pe, Se, "literal string" ), Av = Ia, Bu = /* @__PURE__ */ te( qs, _e, "non-empty literal string" ), Tv = Bu, Wu = /* @__PURE__ */ te( qs, Se, "non-empty literal string" ), Rv = Wu, Hu = /* @__PURE__ */ Et( Sa, "allowStringMatching" ), Fv = Hu; function Sa(e, t, n) { if (Ia(e, t), n.test(t)) return t.valueOf(); it( `InvalidArgument: the given ${tt(e)} does not match the specified pattern` ); } const Ov = Sa, Gu = /* @__PURE__ */ te( mn, _e, "literal text" ), zv = Gu, ot = /* @__PURE__ */ te( mn, Se, "literal text" ), Vv = ot, fn = /* @__PURE__ */ te( Ee, _e, "single line of text" ), Nv = fn, ln = /* @__PURE__ */ te( Ee, Se, "single line of text" ), Ev = ln, Oe = /* @__PURE__ */ te( Vt, _e, "JavaScript function" ), Bv = Oe, Zt = /* @__PURE__ */ te( Vt, Se, "JavaScript function" ), Wv = Zt, Uu = /* @__PURE__ */ te( xa, _e, "anonymous JavaScript function" ), Hv = Uu, Ku = /* @__PURE__ */ te( xa, Se, "anonymous JavaScript function" ), Gv = Ku, qu = /* @__PURE__ */ te( Xs, _e, "named JavaScript function" ), Uv = qu, Xu = /* @__PURE__ */ te( Xs, Se, "named JavaScript function" ), Kv = Xu, Yu = /* @__PURE__ */ te( va, _e, "native JavaScript function" ), qv = Yu, Ju = /* @__PURE__ */ te( va, Se, "native JavaScript function" ), Xv = Ju, Zu = /* @__PURE__ */ te( Ys, _e, "scripted JavaScript function" ), Yv = Zu, Qu = /* @__PURE__ */ te( Ys, Se, "scripted JavaScript function" ), Jv = Qu, Pu = /* @__PURE__ */ te( wa, _e, "JavaScript object" ), Zv = Pu, $l = /* @__PURE__ */ te( wa, Se, "JavaScript object" ), Qv = $l, _a = /* @__PURE__ */ te( Ro, _e, '"plain" JavaScript object' ), Pv = _a, It = /* @__PURE__ */ te( Ro, Se, '"plain" JavaScript object' ), ew = It, ep = /* @__PURE__ */ te( Js, _e, '"vanilla" JavaScript object' ), tw = ep, tp = /* @__PURE__ */ te( Js, Se, '"vanilla" JavaScript object' ), nw = tp, np = /* @__PURE__ */ Et( jl, "allowArray" ), ow = np; function jl(e, t) { if (t == null && Yt(e), _r(t)) return t; it( `InvalidArgument: the given ${tt(e)} is no JavaScript array` ); } const rw = jl, op = /* @__PURE__ */ Et( Il, "allowList" ), aw = op; function Il(e, t, n, o, r) { if (t == null && Yt(e), Zs(t, o, r)) return t; it( `InvalidArgument: the given ${tt(e)} is ` + (n == null ? "either not a list or contains an invalid number of elements" : "no " + tt(n)) ); } const iw = Il, Ht = /* @__PURE__ */ Et( Sl, "allowListSatisfying" ), sw = Ht; function Sl(e, t, n, o, r, a) { if (t == null && Yt(e), Ie(t, n, r, a)) return t; it( `InvalidArgument: the given ${tt(e)} is ` + (o == null ? "either not a list or contains invalid elements" : "no " + tt(o)) ); } const lw = Sl, rp = /* @__PURE__ */ Et( _l, "allowListOf" ), cw = rp; function _l(e, t, n) { if (t == null && Yt(e), hu(t, n)) return t; it(`InvalidArgument: the given value is no ${tt(e)}`); } const dw = _l, ap = /* @__PURE__ */ Et( eo, "allowInstanceOf" ), uw = ap; function eo(e, t, n, o) { if (t == null && Yt(e), t instanceof n) return t; it( `InvalidArgument: the given ${tt(e)} is no ${tt(o)}` ); } const pw = eo, ip = /* @__PURE__ */ Et( Dl, "allowValueInheritingFrom" ), fw = ip; function Dl(e, t, n, o) { if (t == null && Yt(e), n.isPrototypeOf(t)) return t; it( `InvalidArgument: the given ${tt(e)} is no ${tt(o)}` ); } const hw = Dl, sp = /* @__PURE__ */ te( Qs, _e, "JavaScript Date object" ), gw = sp, lp = /* @__PURE__ */ te( Qs, Se, "JavaScript Date object" ), mw = lp, cp = /* @__PURE__ */ te( Ps, _e, "JavaScript Error object" ), bw = cp, dp = /* @__PURE__ */ te( Ps, Se, "JavaScript Error object" ), yw = dp, up = /* @__PURE__ */ te( el, _e, "JavaScript RegExp object" ), xw = up, pp = /* @__PURE__ */ te( el, Se, "JavaScript RegExp object" ), vw = pp, Ft = /* @__PURE__ */ Et( _n, "allowOneOf" ), ww = Ft; function _n(e, t, n) { if (t == null && Yt(e), ge(t, n)) return ka(t); it( `InvalidArgument: the given ${tt(e)} is not among the supported values` ); } const kw = _n, fp = /* @__PURE__ */ te( An, _e, "CSS color specification" ), Cw = fp, hp = /* @__PURE__ */ te( An, Se, "CSS color specification" ), $w = hp, gp = /* @__PURE__ */ te( Tn, _e, "EMail address" ), jw = gp, mp = /* @__PURE__ */ te( Tn, Se, "EMail address" ), Iw = mp, Hn = /* @__PURE__ */ te( at, _e, "URL" ), Sw = Hn, Da = /* @__PURE__ */ te( at, Se, "URL" ), _w = Da, bp = /* @__PURE__ */ Et( Ll, "allowAbsoluteURL" ), Dw = bp; function Ll(e, t, n) { if (t == null && Yt(e), xu(t, n)) return t.valueOf(); it( `InvalidArgument: the given ${tt(e)} is no valid absolute URL` ); } const Lw = Ll, yp = /* @__PURE__ */ te( tl, _e, "phone number in E.164 format" ), Mw = yp, xp = /* @__PURE__ */ te( tl, Se, "phone number in E.164 format" ), Aw = xp, vp = /* @__PURE__ */ te( nl, _e, "BigInt value" ), Tw = vp, wp = /* @__PURE__ */ te( nl, Se, "BigInt value" ), Rw = wp, kp = /* @__PURE__ */ te( ol, _e, "symbol" ), Fw = kp, Cp = /* @__PURE__ */ te( ol, Se, "symbol" ), Ow = Cp, $p = /* @__PURE__ */ te( rl, _e, "JavaScript Map" ), zw = $p, jp = /* @__PURE__ */ te( rl, Se, "JavaScript Map" ), Vw = jp, Ip = /* @__PURE__ */ te( al, _e, "JavaScript Set" ), Nw = Ip, Sp = /* @__PURE__ */ te( al, Se, "JavaScript Set" ), Ew = Sp, _p = /* @__PURE__ */ te( il, _e, "typed array" ), Bw = _p, Dp = /* @__PURE__ */ te( il, Se, "typed array" ), Ww = Dp, Lp = /* @__PURE__ */ te( sl, _e, "ArrayBuffer" ), Hw = Lp, Mp = /* @__PURE__ */ te( sl, Se, "ArrayBuffer" ), Gw = Mp, Ap = /* @__PURE__ */ te( ll, _e, "UUID" ), Uw = Ap, Tp = /* @__PURE__ */ te( ll, Se, "UUID" ), Kw = Tp, Rp = /* @__PURE__ */ te( cl, _e, "ISO 8601 date" ), qw = Rp, Fp = /* @__PURE__ */ te( cl, Se, "ISO 8601 date" ), Xw = Fp, Op = /* @__PURE__ */ te( dl, _e, "ISO 8601 timestamp" ), Yw = Op, zp = /* @__PURE__ */ te( dl, Se, "ISO 8601 timestamp" ), Jw = zp, Vp = /* @__PURE__ */ te( ul, _e, "IPv4 address" ), Zw = Vp, Np = /* @__PURE__ */ te( ul, Se, "IPv4 address" ), Qw = Np, Ep = /* @__PURE__ */ te( pl, _e, "IPv6 address" ), Pw = Ep, Bp = /* @__PURE__ */ te( pl, Se, "IPv6 address" ), ek = Bp, Wp = /* @__PURE__ */ te( fl, _e, "host name" ), tk = Wp, Hp = /* @__PURE__ */ te( fl, Se, "host name" ), nk = Hp, Gp = /* @__PURE__ */ te( hl, _e, "port number" ), ok = Gp, Up = /* @__PURE__ */ te( hl, Se, "port number" ), rk = Up, Kp = /* @__PURE__ */ te( Co, _e, "serializable value" ), ak = Kp, qp = /* @__PURE__ */ te( Co, Se, "serializable value" ), ik = qp, Xp = /* @__PURE__ */ te( gl, _e, "serializable object" ), sk = Xp, Yp = /* @__PURE__ */ te( gl, Se, "serializable object" ), lk = Yp, Jp = /* @__PURE__ */ te( ml, _e, "JSON string" ), ck = Jp, Zp = /* @__PURE__ */ te( ml, Se, "JSON string" ), dk = Zp, Qp = /* @__PURE__ */ te( bl, _e, "Base64-encoded string" ), uk = Qp, Pp = /* @__PURE__ */ te( bl, Se, "Base64-encoded string" ), pk = Pp, ef = /* @__PURE__ */ te( yl, _e, "hexadecimal string" ), fk = ef, tf = /* @__PURE__ */ te( yl, Se, "hexadecimal string" ), hk = tf, Fo = ( // core of several escaping patterns below String.raw`\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|` + String.raw`\\u\{[0-9a-fA-F]+\}|\\[0bfnrtv'"\\\/]` ), nf = new RegExp(Fo + "?", "g"), Ml = /[\x00-\x1f\x7f-\x9f]/g, of = { "\0": "\\0", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v" }; function Al(e) { return of[e] ?? "\\x" + e.charCodeAt(0).toString(16).padStart(2, "0"); } function tt(e) { return e.replace(nf, (t) => t === "\\" ? "\\\\" : t).replace(Ml, Al); } const rf = new RegExp(Fo, "g"), af = { "\\0": "\0", "\\b": "\b", "\\f": "\f", "\\n": ` `, "\\r": "\r", "\\t": " ", "\\v": "\v", "\\'": "'", '\\"': '"', "\\\\": "\\" }; function sf(e) { const t = e.charAt(2) === "{" ? parseInt(e.slice(3, -1), 16) : parseInt(e.slice(2), 16); return t <= 1114111 ? String.fromCodePoint(t) : e; } function gk(e) { return e.replace(rf, (t) => af[t] ?? sf(t)); } const lf = new RegExp(Fo + "?|'", "g"), cf = new RegExp(Fo + '?|"', "g"), df = new RegExp(Fo + "?|`|\\$\\{", "g"), uf = { "'": "\\'", '"': '\\"', "`": "\\`", "${": "\\${", "\\": "\\\\" }; function pf(e, t = '"') { const n = t === "'" ? lf : t === "`" ? df : cf; return e.replace(n, (o) => uf[o] ?? o).replace(Ml, Al); } function Lt(e, t = '"') { return t + pf(e, t) + t; } const ff = /[&<>"'\x00-\x1F\x7F-\x9F\\]/g; function hf(e, t) { return t = (t || "").trim() || "
", e.replace(ff, (n) => { switch (n) { case "&": return "&"; case "<": return "<"; case ">": return ">"; case '"': return """; case "'": return "'"; case "\b": return "\b"; case "\f": return "\f"; case ` `: return t; case "\r": return "\r"; case " ": return "\t"; case "\v": return "\v"; case "\\": return "\"; default: return "&#x" + n.charCodeAt(0).toString(16).padStart(4, "0") + ";"; } }); } const gf = /[:`*_\[\]#|~]/g; function mk(e, t) { return hf(e, t).replace( gf, (n) => "&#" + n.charCodeAt(0) + ";" ); } function lr(e, t, n, o) { if (e === t) return !1; let r, a; typeof n == "string" ? r = n : n != null && (r = n.Mode, a = n.Tolerance); let i = typeof e; if (i !== typeof t) return !0; function s(l, f, h, g) { if (!Array.isArray(f) || l.length !== f.length) return !0; for (let b = 0, m = l.length; b < m; b++) if (lr(l[b], f[b], h, g)) return !0; return !1; } function c(l, f, h, g) { if (!(f instanceof Map) || l.size !== f.size) return !0; let b = !1; return l.forEach(function(m, v) { b || (b = !f.has(v) || lr(m, f.get(v), h, g)); }), b; } function d(l, f) { if (!(f instanceof Set) || l.size !== f.size) return !0; let h = !1; return l.forEach(function(g) { !h && !f.has(g) && (h = !0); }), h; } function u(l, f) { if (Object.getPrototypeOf(l) !== Object.getPrototypeOf(f) || l.byteLength !== f.byteLength) return !0; let h = new Uint8Array( l.buffer, l.byteOffset, l.byteLength ), g = new Uint8Array( f.buffer, f.byteOffset, f.byteLength ); for (let b = 0, m = h.length; b < m; b++) if (h[b] !== g[b]) return !0; return !1; } function p(l, f, h, g) { if (Object.getPrototypeOf(l) !== Object.getPrototypeOf(f)) return !0; for (let b in l) if (!(b in f)) return !0; for (let b in f) if (!(b in l) || lr(l[b], f[b], h, g)) return !0; return !1; } switch (i) { case "undefined": case "boolean": case "string": case "bigint": case "symbol": case "function": return !0; // most primitives are compared using "===" case "number": { if (isNaN(e) !== isNaN(t)) return !0; if (a != null) return Math.abs(e - t) > a; const f = Number.EPSILON * Math.max( // default is relative! 1, Math.abs(e), Math.abs(t) ); return Math.abs(e - t) > f; } case "object": if (e == null || t == null) return !0; if ( // boxed primitives are compared by their values e instanceof Boolean || e instanceof Number || e instanceof String ) return r === "by-reference" ? !0 : Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) || e.valueOf() !== t.valueOf(); if (e instanceof Date) { if (r === "by-reference" || !(t instanceof Date)) return !0; let f = e.getTime(), h = t.getTime(); return f !== h && !(isNaN(f) && isNaN(h)); } if (e instanceof RegExp) return r === "by-reference" ? !0 : !(t instanceof RegExp) || e.source !== t.source || e.flags !== t.flags; o == null && (o = /* @__PURE__ */ new WeakMap()); let l = o.get(e); return l == null && o.set(e, l = /* @__PURE__ */ new WeakSet()), l.has(t) ? !1 : (l.add(t), Array.isArray(e) ? s(e, t, n, o) : e instanceof Map ? r === "by-reference" ? !0 : c(e, t, n, o) : e instanceof Set ? r === "by-reference" ? !0 : d(e, t) : ArrayBuffer.isView(e) ? r === "by-reference" ? !0 : u(e, t) : r === "by-reference" ? !0 : p(e, t, n, o)); default: return !0; } } function bk(e, t, n) { return !lr(e, t, n); } function mf(e) { $l("candidate", e); for (let t in e) if (lu(e, t)) return !1; return !0; } function yk(e) { return !mf(e); } function bf(e) { return /^\s*$/.test(e); } function xk(e) { return !bf(e); } function vk(e, t = -1 / 0, n = 1 / 0) { return Math.max(t, Math.min(e, n)); } const $o = /* @__PURE__ */ Object.freeze({ transparent: "rgba(0,0,0,0.0)", aliceblue: "rgba(240,248,255,1.0)", lightpink: "rgba(255,182,193,1.0)", antiquewhite: "rgba(250,235,215,1.0)", lightsalmon: "rgba(255,160,122,1.0)", aqua: "rgba(0,255,255,1.0)", lightseagreen: "rgba(32,178,170,1.0)", aquamarine: "rgba(127,255,212,1.0)", lightskyblue: "rgba(135,206,250,1.0)", azure: "rgba(240,255,255,1.0)", lightslategray: "rgba(119,136,153,1.0)", beige: "rgba(245,245,220,1.0)", lightslategrey: "rgba(119,136,153,1.0)", bisque: "rgba(255,228,196,1.0)", lightsteelblue: "rgba(176,196,222,1.0)", black: "rgba(0,0,0,1.0)", lightyellow: "rgba(255,255,224,1.0)", blanchedalmond: "rgba(255,235,205,1.0)", lime: "rgba(0,255,0,1.0)", blue: "rgba(0,0,255,1.0)", limegreen: "rgba(50,205,50,1.0)", blueviolet: "rgba(138,43,226,1.0)", linen: "rgba(250,240,230,1.0)", brown: "rgba(165,42,42,1.0)", magenta: "rgba(255,0,255,1.0)", burlywood: "rgba(222,184,135,1.0)", maroon: "rgba(128,0,0,1.0)", cadetblue: "rgba(95,158,160,1.0)", mediumaquamarine: "rgba(102,205,170,1.0)", chartreuse: "rgba(127,255,0,1.0)", mediumblue: "rgba(0,0,205,1.0)", chocolate: "rgba(210,105,30,1.0)", mediumorchid: "rgba(186,85,211,1.0)", coral: "rgba(255,127,80,1.0)", mediumpurple: "rgba(147,112,219,1.0)", cornflowerblue: "rgba(100,149,237,1.0)", mediumseagreen: "rgba(60,179,113,1.0)", cornsilk: "rgba(255,248,220,1.0)", mediumslateblue: "rgba(123,104,238,1.0)", crimson: "rgba(220,20,60,1.0)", mediumspringgreen: "rgba(0,250,154,1.0)", cyan: "rgba(0,255,255,1.0)", mediumturquoise: "rgba(72,209,204,1.0)", darkblue: "rgba(0,0,139,1.0)", mediumvioletred: "rgba(199,21,133,1.0)", darkcyan: "rgba(0,139,139,1.0)", midnightblue: "rgba(25,25,112,1.0)", darkgoldenrod: "rgba(184,134,11,1.0)", mintcream: "rgba(245,255,250,1.0)", darkgray: "rgba(169,169,169,1.0)", mistyrose: "rgba(255,228,225,1.0)", darkgreen: "rgba(0,100,0,1.0)", moccasin: "rgba(255,228,181,1.0)", darkgrey: "rgba(169,169,169,1.0)", navajowhite: "rgba(255,222,173,1.0)", darkkhaki: "rgba(189,183,107,1.0)", navy: "rgba(0,0,128,1.0)", darkmagenta: "rgba(139,0,139,1.0)", oldlace: "rgba(253,245,230,1.0)", darkolivegreen: "rgba(85,107,47,1.0)", olive: "rgba(128,128,0,1.0)", darkorange: "rgba(255,140,0,1.0)", olivedrab: "rgba(107,142,35,1.0)", darkorchid: "rgba(153,50,204,1.0)", orange: "rgba(255,165,0,1.0)", darkred: "rgba(139,0,0,1.0)", orangered: "rgba(255,69,0,1.0)", darksalmon: "rgba(233,150,122,1.0)", orchid: "rgba(218,112,214,1.0)", darkseagreen: "rgba(143,188,143,1.0)", palegoldenrod: "rgba(238,232,170,1.0)", darkslateblue: "rgba(72,61,139,1.0)", palegreen: "rgba(152,251,152,1.0)", darkslategray: "rgba(47,79,79,1.0)", paleturquoise: "rgba(175,238,238,1.0)", darkslategrey: "rgba(47,79,79,1.0)", palevioletred: "rgba(219,112,147,1.0)", darkturquoise: "rgba(0,206,209,1.0)", papayawhip: "rgba(255,239,213,1.0)", darkviolet: "rgba(148,0,211,1.0)", peachpuff: "rgba(255,218,185,1.0)", deeppink: "rgba(255,20,147,1.0)", peru: "rgba(205,133,63,1.0)", deepskyblue: "rgba(0,191,255,1.0)", pink: "rgba(255,192,203,1.0)", dimgray: "rgba(105,105,105,1.0)", plum: "rgba(221,160,221,1.0)", dimgrey: "rgba(105,105,105,1.0)", powderblue: "rgba(176,224,230,1.0)", dodgerblue: "rgba(30,144,255,1.0)", purple: "rgba(128,0,128,1.0)", firebrick: "rgba(178,34,34,1.0)", red: "rgba(255,0,0,1.0)", floralwhite: "rgba(255,250,240,1.0)", rosybrown: "rgba(188,143,143,1.0)", forestgreen: "rgba(34,139,34,1.0)", royalblue: "rgba(65,105,225,1.0)", fuchsia: "rgba(255,0,255,1.0)", saddlebrown: "rgba(139,69,19,1.0)", gainsboro: "rgba(220,220,220,1.0)", salmon: "rgba(250,128,114,1.0)", ghostwhite: "rgba(248,248,255,1.0)", sandybrown: "rgba(244,164,96,1.0)", gold: "rgba(255,215,0,1.0)", seagreen: "rgba(46,139,87,1.0)", goldenrod: "rgba(218,165,32,1.0)", seashell: "rgba(255,245,238,1.0)", gray: "rgba(128,128,128,1.0)", sienna: "rgba(160,82,45,1.0)", green: "rgba(0,128,0,1.0)", silver: "rgba(192,192,192,1.0)", greenyellow: "rgba(173,255,47,1.0)", skyblue: "rgba(135,206,235,1.0)", grey: "rgba(128,128,128,1.0)", slateblue: "rgba(106,90,205,1.0)", honeydew: "rgba(240,255,240,1.0)", slategray: "rgba(112,128,144,1.0)", hotpink: "rgba(255,105,180,1.0)", slategrey: "rgba(112,128,144,1.0)", indianred: "rgba(205,92,92,1.0)", snow: "rgba(255,250,250,1.0)", indigo: "rgba(75,0,130,1.0)", springgreen: "rgba(0,255,127,1.0)", ivory: "rgba(255,255,240,1.0)", steelblue: "rgba(70,130,180,1.0)", khaki: "rgba(240,230,140,1.0)", tan: "rgba(210,180,140,1.0)", lavender: "rgba(230,230,250,1.0)", teal: "rgba(0,128,128,1.0)", lavenderblush: "rgba(255,240,245,1.0)", thistle: "rgba(216,191,216,1.0)", lawngreen: "rgba(124,252,0,1.0)", tomato: "rgba(255,99,71,1.0)", lemonchiffon: "rgba(255,250,205,1.0)", turquoise: "rgba(64,224,208,1.0)", lightblue: "rgba(173,216,230,1.0)", violet: "rgba(238,130,238,1.0)", lightcoral: "rgba(240,128,128,1.0)", wheat: "rgba(245,222,179,1.0)", lightcyan: "rgba(224,255,255,1.0)", white: "rgba(255,255,255,1.0)", lightgoldenrodyellow: "rgba(250,250,210,1.0)", whitesmoke: "rgba(245,245,245,1.0)", lightgray: "rgba(211,211,211,1.0)", yellow: "rgba(255,255,0,1.0)", lightgreen: "rgba(144,238,144,1.0)", yellowgreen: "rgba(154,205,50,1.0)", lightgrey: "rgba(211,211,211,1.0)" }), La = /^#[a-fA-F0-9]{6}$/, Ma = /^#[a-fA-F0-9]{8}$/, Aa = ( // not perfect /^rgb\(([0-9]+),\s*([0-9]+),\s*([0-9]+)\)$/i ), Ta = ( // not perfect /^rgba\(([0-9]+),\s*([0-9]+),\s*([0-9]+),\s*([01]?[.][0-9]+|[01])\)$/i ); function yf(e) { let t = e.toLowerCase(); if ($o.hasOwnProperty(t) && (e = $o[t]), La.test(e)) return e + "FF"; if (Ma.test(e)) return e; function n(r) { return r = Math.max(0, Math.min(255, Math.round(r))), r.toString(16).toUpperCase().padStart(2, "0"); } let o = Aa.exec(e); if (o != null) return "#" + n(parseInt(o[1], 10)) + n(parseInt(o[2], 10)) + n(parseInt(o[3], 10)) + "FF"; if (o = Ta.exec(e), o != null) return "#" + n(parseInt(o[1], 10)) + n(parseInt(o[2], 10)) + n(parseInt(o[3], 10)) + n(parseFloat(o[4]) * 255); it("InvalidArgument: the given Value is not a valid CSS Color specification"); } function wk(e) { let t = e.toLowerCase(); if ($o.hasOwnProperty(t)) return $o[t]; if (La.test(e)) return "rgba(" + parseInt(e.slice(1, 3), 16) + "," + parseInt(e.slice(3, 5), 16) + "," + parseInt(e.slice(5, 7), 16) + ",1)"; if (Ma.test(e)) return "rgba(" + parseInt(e.slice(1, 3), 16) + "," + parseInt(e.slice(3, 5), 16) + "," + parseInt(e.slice(5, 7), 16) + "," + parseInt(e.slice(7), 16) / 255 + ")"; if (Aa.test(e)) return e.slice(0, e.length - 1) + ",1)"; if (Ta.test(e)) return e; it("InvalidArgument: the given Value is not a valid CSS Color specification"); } function kk(e) { return yf(e).slice(0, 7); } var St = typeof window < "u" ? window : { screen: {}, navigator: {} }, Xn = (St.matchMedia || (function() { return { matches: !1 }; })).bind(St), Tl = !1, xf = { get passive() { return Tl = !0; } }, Rl = function() { }; St.addEventListener && St.addEventListener("p", Rl, xf); St.removeEventListener && St.removeEventListener("p", Rl, !1); var Ck = Tl, $k = "PointerEvent" in St, Ra = "ontouchstart" in St, vf = "TouchEvent" in St, wf = Ra || vf && Xn("(any-pointer: coarse)").matches, Pi = (St.navigator.maxTouchPoints || 0) > 0 || wf, Fl = St.navigator.userAgent || "", kf = Xn("(pointer: coarse)").matches && // both iPad and iPhone can "request desktop site", which sets the userAgent to Macintosh // so need to check both userAgents to determine if it is an iOS device // and screen size to separate iPad from iPhone /iPad|Macintosh/.test(Fl) && Math.min(St.screen.width || 0, St.screen.height || 0) >= 768, Ol = (Xn("(pointer: coarse)").matches || // if the pointer is not coarse and not fine then the browser doesn't support // interaction media queries (see https://caniuse.com/css-media-interaction) // so if it has onTouchStartInWindow assume it has a coarse primary pointer !Xn("(pointer: fine)").matches && Ra) && // bug in firefox (as of v81) on hybrid windows devices where the interaction media queries // always indicate a touch only device (only has a coarse pointer that can't hover) // so assume that the primary pointer is not coarse for firefox windows !/Windows.*Firefox/.test(Fl), Cf = Xn("(any-pointer: fine)").matches || Xn("(any-hover: hover)").matches || // iPads might have an input device that can hover, so assume it has anyHover kf || // if no onTouchStartInWindow then the browser is indicating that it is not a touch only device // see above note for supportsTouchEvents !Ra, es = Pi && (Cf || !Ol) ? "hybrid" : Pi ? "touchOnly" : "mouseOnly", jk = es === "mouseOnly" ? "mouse" : es === "touchOnly" || // if the device is a hybrid, then if the primary pointer is coarse // assume the primaryInput is touch, otherwise assume it's mouse Ol ? "touch" : "mouse", Oo, Le, zl, Fa, pn, ts, Vl, Nl, Hr, cr, vo, El, Oa, ea, ta, Bl, gr = {}, mr = [], $f = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, zo = Array.isArray; function Kt(e, t) { for (var n in t) e[n] = t[n]; return e; } function za(e) { e && e.parentNode && e.parentNode.removeChild(e); } function Yn(e, t, n) { var o, r, a, i = {}; for (a in t) a == "key" ? o = t[a] : a == "ref" ? r = t[a] : i[a] = t[a]; if (arguments.length > 2 && (i.children = arguments.length > 3 ? Oo.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) i[a] === void 0 && (i[a] = e.defaultProps[a]); return wo(e, i, o, r, null); } function wo(e, t, n, o, r) { var a = { type: e, props: t, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r ?? ++zl, __i: -1, __u: 0 }; return r == null && Le.vnode != null && Le.vnode(a), a; } function jf() { return { current: null }; } function Jn(e) { return e.children; } function qt(e, t) { this.props = e, this.context = t; } function Zn(e, t) { if (t == null) return e.__ ? Zn(e.__, e.__i + 1) : null; for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e; return typeof e.type == "function" ? Zn(e) : null; } function If(e) { if (e.__P && e.__d) { var t = e.__v, n = t.__e, o = [], r = [], a = Kt({}, t); a.__v = t.__v + 1, Le.vnode && Le.vnode(a), Va(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, o, n ?? Zn(t), !!(32 & t.__u), r), a.__v = t.__v, a.__.__k[a.__i] = a, Kl(o, a, r), t.__e = t.__ = null, a.__e != n && Wl(a); } } function Wl(e) { if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) { if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e; }), Wl(e); } function na(e) { (!e.__d && (e.__d = !0) && pn.push(e) && !br.__r++ || ts != Le.debounceRendering) && ((ts = Le.debounceRendering) || Vl)(br); } function br() { try { for (var e, t = 1; pn.length; ) pn.length > t && pn.sort(Nl), e = pn.shift(), t = pn.length, If(e); } finally { pn.length = br.__r = 0; } } function Hl(e, t, n, o, r, a, i, s, c, d, u) { var p, l, f, h, g, b, m, v = o && o.__k || mr, C = t.length; for (c = Sf(n, t, v, c, C), p = 0; p < C; p++) (f = n.__k[p]) != null && (l = f.__i != -1 && v[f.__i] || gr, f.__i = p, b = Va(e, f, l, r, a, i, s, c, d, u), h = f.__e, f.ref && l.ref != f.ref && (l.ref && Na(l.ref, null, f), u.push(f.ref, f.__c || h, f)), g == null && h != null && (g = h), (m = !!(4 & f.__u)) || l.__k === f.__k ? (c = Gl(f, c, e, m), m && l.__e && (l.__e = null)) : typeof f.type == "function" && b !== void 0 ? c = b : h && (c = h.nextSibling), f.__u &= -7); return n.__e = g, c; } function Sf(e, t, n, o, r) { var a, i, s, c, d, u = n.length, p = u, l = 0; for (e.__k = new Array(r), a = 0; a < r; a++) (i = t[a]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = e.__k[a] = wo(null, i, null, null, null) : zo(i) ? i = e.__k[a] = wo(Jn, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = e.__k[a] = wo(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : e.__k[a] = i, c = a + l, i.__ = e, i.__b = e.__b + 1, s = null, (d = i.__i = _f(i, n, c, p)) != -1 && (p--, (s = n[d]) && (s.__u |= 2)), s == null || s.__v == null ? (d == -1 && (r > u ? l-- : r < u && l++), typeof i.type != "function" && (i.__u |= 4)) : d != c && (d == c - 1 ? l-- : d == c + 1 ? l++ : (d > c ? l-- : l++, i.__u |= 4))) : e.__k[a] = null; if (p) for (a = 0; a < u; a++) (s = n[a]) != null && (2 & s.__u) == 0 && (s.__e == o && (o = Zn(s)), Xl(s, s)); return o; } function Gl(e, t, n, o) { var r, a; if (typeof e.type == "function") { for (r = e.__k, a = 0; r && a < r.length; a++) r[a] && (r[a].__ = e, t = Gl(r[a], t, n, o)); return t; } e.__e != t && (o && (t && e.type && !t.parentNode && (t = Zn(e)), n.insertBefore(e.__e, t || null)), t = e.__e); do t = t && t.nextSibling; while (t != null && t.nodeType == 8); return t; } function Mt(e, t) { return t = t || [], e == null || typeof e == "boolean" || (zo(e) ? e.some(function(n) { Mt(n, t); }) : t.push(e)), t; } function _f(e, t, n, o) { var r, a, i, s = e.key, c = e.type, d = t[n], u = d != null && (2 & d.__u) == 0; if (d === null && s == null || u && s == d.key && c == d.type) return n; if (o > (u ? 1 : 0)) { for (r = n - 1, a = n + 1; r >= 0 || a < t.length; ) if ((d = t[i = r >= 0 ? r-- : a++]) != null && (2 & d.__u) == 0 && s == d.key && c == d.type) return i; } return -1; } function ns(e, t, n) { t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || $f.test(t) ? n : n + "px"; } function tr(e, t, n, o, r) { var a, i; e: if (t == "style") if (typeof n == "string") e.style.cssText = n; else { if (typeof o == "string" && (e.style.cssText = o = ""), o) for (t in o) n && t in n || ns(e.style, t, ""); if (n) for (t in n) o && n[t] == o[t] || ns(e.style, t, n[t]); } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(El, "$1")), i = t.toLowerCase(), t = i in e || t == "onFocusOut" || t == "onFocusIn" ? i.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + a] = n, n ? o ? n[vo] = o[vo] : (n[vo] = Oa, e.addEventListener(t, a ? ta : ea, a)) : e.removeEventListener(t, a ? ta : ea, a); else { if (r == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try { e[t] = n ?? ""; break e; } catch { } typeof n == "function" || (n == null || n === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n)); } } function os(e) { return function(t) { if (this.l) { var n = this.l[t.type + e]; if (t[cr] == null) t[cr] = Oa++; else if (t[cr] < n[vo]) return; return n(Le.event ? Le.event(t) : t); } }; } function Va(e, t, n, o, r, a, i, s, c, d) { var u, p, l, f, h, g, b, m, v, C, S, j, x, w, T, L, $ = t.type; if (t.constructor !== void 0) return null; 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = Le.__b) && u(t); e: if (typeof $ == "function") { p = i.length; try { if (v = t.props, C = $.prototype && $.prototype.render, S = (u = $.contextType) && o[u.__c], j = u ? S ? S.props.value : u.__ : o, n.__c ? m = (l = t.__c = n.__c).__ = l.__E : (C ? t.__c = l = new $(v, j) : (t.__c = l = new qt(v, j), l.constructor = $, l.render = Lf), S && S.sub(l), l.state || (l.state = {}), l.__n = o, f = l.__d = !0, l.__h = [], l._sb = []), C && l.__s == null && (l.__s = l.state), C && $.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = Kt({}, l.__s)), Kt(l.__s, $.getDerivedStateFromProps(v, l.__s))), h = l.props, g = l.state, l.__v = t, f) C && $.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), C && l.componentDidMount != null && l.__h.push(l.componentDidMount); else { if (C && $.getDerivedStateFromProps == null && v !== h && l.componentWillReceiveProps != null && l.componentWillReceiveProps(v, j), t.__v == n.__v || !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(v, l.__s, j) === !1) { t.__v != n.__v && (l.props = v, l.state = l.__s, l.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(I) { I && (I.__ = t); }), mr.push.apply(l.__h, l._sb), l._sb = [], l.__h.length && i.push(l); break e; } l.componentWillUpdate != null && l.componentWillUpdate(v, l.__s, j), C && l.componentDidUpdate != null && l.__h.push(function() { l.componentDidUpdate(h, g, b); }); } if (l.context = j, l.props = v, l.__P = e, l.__e = !1, x = Le.__r, w = 0, C) l.state = l.__s, l.__d = !1, x && x(t), u = l.render(l.props, l.state, l.context), mr.push.apply(l.__h, l._sb), l._sb = []; else do l.__d = !1, x && x(t), u = l.render(l.props, l.state, l.context), l.state = l.__s; while (l.__d && ++w < 25); l.state = l.__s, l.getChildContext != null && (o = Kt(Kt({}, o), l.getChildContext())), C && !f && l.getSnapshotBeforeUpdate != null && (b = l.getSnapshotBeforeUpdate(h, g)), T = u != null && u.type === Jn && u.key == null ? ql(u.props.children) : u, s = Hl(e, zo(T) ? T : [T], t, n, o, r, a, i, s, c, d), l.base = t.__e, t.__u &= -161, l.__h.length && i.push(l), m && (l.__E = l.__ = null); } catch (I) { if (i.length = p, t.__v = null, c || a != null) { if (I.then) { for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling; ) s = s.nextSibling; a != null && (a[a.indexOf(s)] = null), t.__e = s; } else if (a != null) for (L = a.length; L--; ) za(a[L]); } else t.__e = n.__e; t.__k == null && (t.__k = n.__k || []), I.then || Ul(t), Le.__e(I, t, n); } } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = Df(n.__e, t, n, o, r, a, i, c, d); return (u = Le.diffed) && u(t), 128 & t.__u ? void 0 : s; } function Ul(e) { e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(Ul)); } function Kl(e, t, n) { for (var o = 0; o < n.length; o++) Na(n[o], n[++o], n[++o]); Le.__c && Le.__c(t, e), e.some(function(r) { try { e = r.__h, r.__h = [], e.some(function(a) { a.call(r); }); } catch (a) { Le.__e(a, r.__v); } }); } function ql(e) { return typeof e != "object" || e == null || e.__b > 0 ? e : zo(e) ? e.map(ql) : e.constructor !== void 0 ? null : Kt({}, e); } function Df(e, t, n, o, r, a, i, s, c) { var d, u, p, l, f, h, g, b = n.props || gr, m = t.props, v = t.type; if (v == "svg" ? r = "http://www.w3.org/2000/svg" : v == "math" ? r = "http://www.w3.org/1998/Math/MathML" : r || (r = "http://www.w3.org/1999/xhtml"), a != null) { for (d = 0; d < a.length; d++) if ((f = a[d]) && "setAttribute" in f == !!v && (v ? f.localName == v : f.nodeType == 3)) { e = f, a[d] = null; break; } } if (e == null) { if (v == null) return document.createTextNode(m); e = document.createElementNS(r, v, m.is && m), s && (Le.__m && Le.__m(t, a), s = !1), a = null; } if (v == null) b === m || s && e.data == m || (e.data = m); else { if (a = v == "textarea" && m.defaultValue != null ? null : a && Oo.call(e.childNodes), !s && a != null) for (b = {}, d = 0; d < e.attributes.length; d++) b[(f = e.attributes[d]).name] = f.value; for (d in b) f = b[d], d == "dangerouslySetInnerHTML" ? p = f : d == "children" || d in m || d == "value" && "defaultValue" in m || d == "checked" && "defaultChecked" in m || tr(e, d, null, f, r); for (d in m) f = m[d], d == "children" ? l = f : d == "dangerouslySetInnerHTML" ? u = f : d == "value" ? h = f : d == "checked" ? g = f : s && typeof f != "function" || b[d] === f || tr(e, d, f, b[d], r); if (u) s || p && (u.__html == p.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = []; else if (p && (e.innerHTML = ""), Hl(t.type == "template" ? e.content : e, zo(l) ? l : [l], t, n, o, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, a, i, a ? a[0] : n.__k && Zn(n, 0), s, c), a != null) for (d = a.length; d--; ) za(a[d]); s && v != "textarea" || (d = "value", v == "progress" && h == null ? e.removeAttribute("value") : h != null && (h !== e[d] || v == "progress" && !h || v == "option" && h != b[d]) && tr(e, d, h, b[d], r), d = "checked", g != null && g != e[d] && tr(e, d, g, b[d], r)); } return e; } function Na(e, t, n) { try { if (typeof e == "function") { var o = typeof e.__u == "function"; o && e.__u(), o && t == null || (e.__u = e(t)); } else e.current = t; } catch (r) { Le.__e(r, n); } } function Xl(e, t, n) { var o, r; if (Le.unmount && Le.unmount(e), (o = e.ref) && (o.current && o.current != e.__e || Na(o, null, t)), (o = e.__c) != null) { if (o.componentWillUnmount) try { o.componentWillUnmount(); } catch (a) { Le.__e(a, t); } o.base = o.__P = o.__n = null; } if (o = e.__k) for (r = 0; r < o.length; r++) o[r] && Xl(o[r], t, n || typeof e.type != "function"); n || za(e.__e), e.__c = e.__ = e.__e = void 0; } function Lf(e, t, n) { return this.constructor(e, n); } function jo(e, t, n) { var o, r, a, i; t == document && (t = document.documentElement), Le.__ && Le.__(e, t), r = (o = typeof n == "function") ? null : n && n.__k || t.__k, a = [], i = [], Va(t, e = (!o && n || t).__k = Yn(Jn, null, [e]), r || gr, gr, t.namespaceURI, !o && n ? [n] : r ? null : t.firstChild ? Oo.call(t.childNodes) : null, a, !o && n ? n : r ? r.__e : t.firstChild, o, i), Kl(a, e, i), e.props.children = null; } function Mf(e, t, n) { var o, r, a, i, s = Kt({}, e.props); for (a in e.type && e.type.defaultProps && (i = e.type.defaultProps), t) a == "key" ? o = t[a] : a == "ref" ? r = t[a] : s[a] = t[a] === void 0 && i != null ? i[a] : t[a]; return arguments.length > 2 && (s.children = arguments.length > 3 ? Oo.call(arguments, 2) : n), wo(e.type, s, o || e.key, r || e.ref, null); } function yn(e) { function t(n) { var o, r; return this.getChildContext || (o = /* @__PURE__ */ new Set(), (r = {})[t.__c] = this, this.getChildContext = function() { return r; }, this.componentWillUnmount = function() { o = null; }, this.shouldComponentUpdate = function(a) { this.props.value != a.value && o.forEach(function(i) { i.__e = !0, na(i); }); }, this.sub = function(a) { o.add(a); var i = a.componentWillUnmount; a.componentWillUnmount = function() { o && o.delete(a), i && i.call(a); }; }), n.children; } return t.__c = "__cC" + Bl++, t.__ = e, t.Provider = t.__l = (t.Consumer = function(n, o) { return n.children(o); }).contextType = t, t; } Oo = mr.slice, Le = { __e: function(e, t, n, o) { for (var r, a, i; t = t.__; ) if ((r = t.__c) && !r.__) try { if ((a = r.constructor) && a.getDerivedStateFromError != null && (r.setState(a.getDerivedStateFromError(e)), i = r.__d), r.componentDidCatch != null && (r.componentDidCatch(e, o || {}), i = r.__d), i) return r.__E = r; } catch (s) { e = s; } throw e; } }, zl = 0, Fa = function(e) { return e != null && e.constructor === void 0; }, qt.prototype.setState = function(e, t) { var n; n = this.__s != null && this.__s != this.state ? this.__s : this.__s = Kt({}, this.state), typeof e == "function" && (e = e(Kt({}, n), this.props)), e && Kt(n, e), e != null && this.__v && (t && this._sb.push(t), na(this)); }, qt.prototype.forceUpdate = function(e) { this.__v && (this.__e = !0, e && this.__h.push(e), na(this)); }, qt.prototype.render = Jn, pn = [], Vl = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Nl = function(e, t) { return e.__v.__b - t.__v.__b; }, br.__r = 0, Hr = Math.random().toString(8), cr = "__d" + Hr, vo = "__a" + Hr, El = /(PointerCapture)$|Capture$/i, Oa = 0, ea = os(!1), ta = os(!0), Bl = 0; var Yl = function(e, t, n, o) { var r; t[0] = 0; for (var a = 1; a < t.length; a++) { var i = t[a++], s = t[a] ? (t[0] |= i ? 1 : 2, n[t[a++]]) : t[++a]; i === 3 ? o[0] = s : i === 4 ? o[1] = Object.assign(o[1] || {}, s) : i === 5 ? (o[1] = o[1] || {})[t[++a]] = s : i === 6 ? o[1][t[++a]] += s + "" : i ? (r = e.apply(s, Yl(e, s, n, ["", null])), o.push(r), s[0] ? t[0] |= 2 : (t[a - 2] = 0, t[a] = r)) : o.push(s); } return o; }, rs = /* @__PURE__ */ new Map(); function Af(e) { var t = rs.get(this); return t || (t = /* @__PURE__ */ new Map(), rs.set(this, t)), (t = Yl(this, t.get(e) || (t.set(e, t = (function(n) { for (var o, r, a = 1, i = "", s = "", c = [0], d = function(l) { a === 1 && (l || (i = i.replace(/^\s*\n\s*|\s*\n\s*$/g, ""))) ? c.push(0, l, i) : a === 3 && (l || i) ? (c.push(3, l, i), a = 2) : a === 2 && i === "..." && l ? c.push(4, l, 0) : a === 2 && i && !l ? c.push(5, 0, !0, i) : a >= 5 && ((i || !l && a === 5) && (c.push(a, 0, i, r), a = 6), l && (c.push(a, l, 0, r), a = 6)), i = ""; }, u = 0; u < n.length; u++) { u && (a === 1 && d(), d(u)); for (var p = 0; p < n[u].length; p++) o = n[u][p], a === 1 ? o === "<" ? (d(), c = [c], a = 3) : i += o : a === 4 ? i === "--" && o === ">" ? (a = 1, i = "") : i = o + i[0] : s ? o === s ? s = "" : i += o : o === '"' || o === "'" ? s = o : o === ">" ? (d(), a = 1) : a && (o === "=" ? (a = 5, r = i, i = "") : o === "/" && (a < 5 || n[u][p + 1] === ">") ? (d(), a === 3 && (c = c[0]), a = c, (c = c[0]).push(2, 0, a), a = 0) : o === " " || o === " " || o === ` ` || o === "\r" ? (d(), a = 2) : i += o), a === 3 && i === "!--" && (a = 4, c = c[0]); } return d(), c; })(e)), t), arguments, [])).length > 1 ? t : t[0]; } var y = Af.bind(Yn), sn, Je, Gr, as, Io = 0, Jl = [], rt = Le, is = rt.__b, ss = rt.__r, ls = rt.diffed, cs = rt.__c, ds = rt.unmount, us = rt.__; function zn(e, t) { rt.__h && rt.__h(Je, e, Io || t), Io = 0; var n = Je.__H || (Je.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({}), n.__[e]; } function Ue(e) { return Io = 1, Tf(Zl, e); } function Tf(e, t, n) { var o = zn(sn++, 2); if (o.t = e, !o.__c && (o.__ = [n ? n(t) : Zl(void 0, t), function(s) { var c = o.__N ? o.__N[0] : o.__[0], d = o.t(c, s); c !== d && (o.__N = [d, o.__[1]], o.__c.setState({})); }], o.__c = Je, !Je.__f)) { var r = function(s, c, d) { if (!o.__c.__H) return !0; var u = !1, p = o.__c.props !== s; if (o.__c.__H.__.some(function(f) { if (f.__N) { u = !0; var h = f.__[0]; f.__ = f.__N, f.__N = void 0, h !== f.__[0] && (p = !0); } }), a) { var l = a.call(this, s, c, d); return u ? l || p : l; } return !u || p; }; Je.__f = !0; var a = Je.shouldComponentUpdate, i = Je.componentWillUpdate; Je.componentWillUpdate = function(s, c, d) { if (this.__e) { var u = a; a = void 0, r(s, c, d), a = u; } i && i.call(this, s, c, d); }, Je.shouldComponentUpdate = r; } return o.__N || o.__; } function je(e, t) { var n = zn(sn++, 3); !rt.__s && Wa(n.__H, t) && (n.__ = e, n.u = t, Je.__H.__h.push(n)); } function Ea(e, t) { var n = zn(sn++, 4); !rt.__s && Wa(n.__H, t) && (n.__ = e, n.u = t, Je.__h.push(n)); } function U(e) { return Io = 5, Qt(function() { return { current: e }; }, []); } function Qt(e, t) { var n = zn(sn++, 7); return Wa(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__; } function se(e, t) { return Io = 8, Qt(function() { return e; }, t); } function bt(e) { var t = Je.context[e.__c], n = zn(sn++, 9); return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Je)), t.props.value) : e.__; } function Ba(e) { var t = zn(sn++, 10), n = Ue(); return t.__ = e, Je.componentDidCatch || (Je.componentDidCatch = function(o, r) { t.__ && t.__(o, r), n[1](o); }), [n[0], function() { n[1](void 0); }]; } function Bt() { var e = zn(sn++, 11); if (!e.__) { for (var t = Je.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__; var n = t.__m || (t.__m = [0, 0]); e.__ = "P" + n[0] + "-" + n[1]++; } return e.__; } function Rf() { for (var e; e = Jl.shift(); ) { var t = e.__H; if (e.__P && t) try { t.__h.some(dr), t.__h.some(oa), t.__h = []; } catch (n) { t.__h = [], rt.__e(n, e.__v); } } } rt.__b = function(e) { Je = null, is && is(e); }, rt.__ = function(e, t) { e && t.__k && t.__k.__m && (e.__m = t.__k.__m), us && us(e, t); }, rt.__r = function(e) { ss && ss(e), sn = 0; var t = (Je = e.__c).__H; t && (Gr === Je ? (t.__h = [], Je.__h = [], t.__.some(function(n) { n.__N && (n.__ = n.__N), n.u = n.__N = void 0; })) : (t.__h.some(dr), t.__h.some(oa), t.__h = [], sn = 0)), Gr = Je; }, rt.diffed = function(e) { ls && ls(e); var t = e.__c; t && t.__H && (t.__H.__h.length && (Jl.push(t) !== 1 && as === rt.requestAnimationFrame || ((as = rt.requestAnimationFrame) || Ff)(Rf)), t.__H.__.some(function(n) { n.u && (n.__H = n.u, n.u = void 0); })), Gr = Je = null; }, rt.__c = function(e, t) { t.some(function(n) { try { n.__h.some(dr), n.__h = n.__h.filter(function(o) { return !o.__ || oa(o); }); } catch (o) { t.some(function(r) { r.__h && (r.__h = []); }), t = [], rt.__e(o, n.__v); } }), cs && cs(e, t); }, rt.unmount = function(e) { ds && ds(e); var t, n = e.__c; n && n.__H && (n.__H.__.some(function(o) { try { dr(o); } catch (r) { t = r; } }), n.__H = void 0, t && rt.__e(t, n.__v)); }; var ps = typeof requestAnimationFrame == "function"; function Ff(e) { var t, n = function() { clearTimeout(o), ps && cancelAnimationFrame(t), setTimeout(e); }, o = setTimeout(n, 35); ps && (t = requestAnimationFrame(n)); } function dr(e) { var t = Je, n = e.__c; typeof n == "function" && (e.__c = void 0, n()), Je = t; } function oa(e) { var t = Je; e.__c = e.__(), Je = t; } function Wa(e, t) { return !e || e.length !== t.length || t.some(function(n, o) { return n !== e[o]; }); } function Zl(e, t) { return typeof t == "function" ? t(e) : t; } function Of(e, t) { for (var n in t) e[n] = t[n]; return e; } function fs(e, t) { for (var n in e) if (n !== "__source" && !(n in t)) return !0; for (var o in t) if (o !== "__source" && e[o] !== t[o]) return !0; return !1; } function hs(e, t) { this.props = e, this.context = t; } (hs.prototype = new qt()).isPureReactComponent = !0, hs.prototype.shouldComponentUpdate = function(e, t) { return fs(this.props, e) || fs(this.state, t); }; var gs = Le.__b; Le.__b = function(e) { e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), gs && gs(e); }; var zf = Le.__e; Le.__e = function(e, t, n, o) { if (e.then) { for (var r, a = t; a = a.__; ) if ((r = a.__c) && r.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k || []), r.__c(e, t); } zf(e, t, n, o); }; var ms = Le.unmount; function Ql(e, t, n) { return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(o) { typeof o.__c == "function" && o.__c(); }), e.__c.__H = null), (e = Of({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c.__e = !0, e.__c = null), e.__k = e.__k && e.__k.map(function(o) { return Ql(o, t, n); })), e; } function Pl(e, t, n) { return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(o) { return Pl(o, t, n); }), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e; } function Ur() { this.__u = 0, this.o = null, this.__b = null; } function ec(e) { var t = e.__ && e.__.__c; return t && t.__a && t.__a(e); } function nr() { this.i = null, this.l = null; } Le.unmount = function(e) { var t = e.__c; t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), ms && ms(e); }, (Ur.prototype = new qt()).__c = function(e, t) { var n = t.__c, o = this; o.o == null && (o.o = []), o.o.push(n); var r = ec(o.__v), a = !1, i = function() { a || o.__z || (a = !0, n.__R = null, r ? r(c) : c()); }; n.__R = i; var s = n.__P; n.__P = null; var c = function() { if (!--o.__u) { if (o.state.__a) { var d = o.state.__a; o.__v.__k[0] = Pl(d, d.__c.__P, d.__c.__O); } var u; for (o.setState({ __a: o.__b = null }); u = o.o.pop(); ) u.__P = s, u.forceUpdate(); } }; o.__u++ || 32 & t.__u || o.setState({ __a: o.__b = o.__v.__k[0] }), e.then(i, i); }, Ur.prototype.componentWillUnmount = function() { this.o = []; }, Ur.prototype.render = function(e, t) { if (this.__b) { if (this.__v.__k) { var n = document.createElement("div"), o = this.__v.__k[0].__c; this.__v.__k[0] = Ql(this.__b, n, o.__O = o.__P); } this.__b = null; } var r = t.__a && Yn(Jn, null, e.fallback); return r && (r.__u &= -33), [Yn(Jn, null, t.__a ? null : e.children), r]; }; var bs = function(e, t, n) { if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) { for (; n.length > 3; ) n.pop()(); if (n[1] < n[0]) break; e.i = n = n[2]; } }; function Vf(e) { return this.getChildContext = function() { return e.context; }, e.children; } function Nf(e) { var t = this, n = e.h; if (t.componentWillUnmount = function() { jo(null, t.v), t.v = null, t.h = null; }, t.h && t.h !== n && t.componentWillUnmount(), !t.v) { for (var o = t.__v; o !== null && !o.__m && o.__ !== null; ) o = o.__; t.h = n, t.v = { nodeType: 1, parentNode: n, childNodes: [], __k: { __m: o.__m }, contains: function() { return !0; }, namespaceURI: n.namespaceURI, insertBefore: function(r, a) { this.childNodes.push(r), t.h.insertBefore(r, a); }, removeChild: function(r) { this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.h.removeChild(r); } }; } jo(Yn(Vf, { context: t.context }, e.__v), t.v); } function to(e, t) { var n = Yn(Nf, { __v: e, h: t }); return n.containerInfo = t, n; } (nr.prototype = new qt()).__a = function(e) { var t = this, n = ec(t.__v), o = t.l.get(e); return o[0]++, function(r) { var a = function() { t.props.revealOrder ? (o.push(r), bs(t, e, o)) : r(); }; n ? n(a) : a(); }; }, nr.prototype.render = function(e) { this.i = null, this.l = /* @__PURE__ */ new Map(); var t = Mt(e.children); e.revealOrder && e.revealOrder[0] === "b" && t.reverse(); for (var n = t.length; n--; ) this.l.set(t[n], this.i = [1, 0, this.i]); return e.children; }, nr.prototype.componentDidUpdate = nr.prototype.componentDidMount = function() { var e = this; this.l.forEach(function(t, n) { bs(e, n, t); }); }; var Ef = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Bf = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Wf = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Hf = /[A-Z0-9]/g, Gf = typeof document < "u", Uf = function(e) { return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e); }; qt.prototype.isReactComponent = !0, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) { Object.defineProperty(qt.prototype, e, { configurable: !0, get: function() { return this["UNSAFE_" + e]; }, set: function(t) { Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t }); } }); }); var ys = Le.event; Le.event = function(e) { return ys && (e = ys(e)), e.persist = function() { }, e.isPropagationStopped = function() { return this.cancelBubble; }, e.isDefaultPrevented = function() { return this.defaultPrevented; }, e.nativeEvent = e; }; var Kf = { configurable: !0, get: function() { return this.class; } }, xs = Le.vnode; Le.vnode = function(e) { typeof e.type == "string" && (function(t) { var n = t.props, o = t.type, r = {}, a = o.indexOf("-") == -1; for (var i in n) { var s = n[i]; if (!(i === "value" && "defaultValue" in n && s == null || Gf && i === "children" && o === "noscript" || i === "class" || i === "className")) { var c = i.toLowerCase(); i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : c === "translate" && s === "no" ? s = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? i = "ondblclick" : c !== "onchange" || o !== "input" && o !== "textarea" || Uf(n.type) ? c === "onfocus" ? i = "onfocusin" : c === "onblur" ? i = "onfocusout" : Wf.test(i) && (i = c) : c = i = "oninput" : a && Bf.test(i) ? i = i.replace(Hf, "-$&").toLowerCase() : s === null && (s = void 0), c === "oninput" && r[i = c] && (i = "oninputCapture"), r[i] = s; } } o == "select" && (r.multiple && Array.isArray(r.value) && (r.value = Mt(n.children).forEach(function(d) { d.props.selected = r.value.indexOf(d.props.value) != -1; })), r.defaultValue != null && (r.value = Mt(n.children).forEach(function(d) { d.props.selected = r.multiple ? r.defaultValue.indexOf(d.props.value) != -1 : r.defaultValue == d.props.value; }))), n.class && !n.className ? (r.class = n.class, Object.defineProperty(r, "className", Kf)) : n.className && (r.class = r.className = n.className), t.props = r; })(e), e.$$typeof = Ef, xs && xs(e); }; var vs = Le.__r; Le.__r = function(e) { vs && vs(e), e.__c; }; var ws = Le.diffed; Le.diffed = function(e) { ws && ws(e); var t = e.props, n = e.__e; n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value); }; function ko(e) { return wa(e); } function Me(e) { return Ro(e); } const qf = (async () => { }).constructor; function Xf() { typeof window < "u" && window.addEventListener("unhandledrejection", (e) => { console.error( "caught unhandled error in Promise:", e.reason?.stack ?? e.reason?.message, e ); }); } function de(e) { debugger; const t = /^([$a-zA-Z][$a-zA-Z0-9]*):\s*(\S.+)\s*$/.exec(e); if (t == null) throw new Error(e); { const n = new Error(t[2]); throw n.name = t[1], n; } } function Yf(e) { return de( "ReadOnlyProperty: property " + Lt(e) + " must not be set" ); } function ut(e, t) { const n = te(e, _e, t), o = te(e, Se, t); return [n, n, o, o]; } const Jf = /^[a-z$_][a-z$_0-9]*$/i; function Zf(e) { return st(e, Jf); } const [Ik, Sk, Qf, _k] = /* @__PURE__ */ ut(Zf, "JCL identifier"); function Ha(e) { return Pe(e) && /^[a-zA-Z][a-zA-Z0-9_-]*$/.test(e); } const [Pf, Dk, Ln, Lk] = /* @__PURE__ */ ut(Ha, "name"); function tc(e) { return Pe(e) && /^[a-zA-Z][a-zA-Z0-9_-]*(\.[a-zA-Z][a-zA-Z0-9_-]*)*$/.test(e); } const [Mk, Ak, nc, Tk] = /* @__PURE__ */ ut(tc, "path"); function Mr(e) { return Pe(e) && /^[+]?[\d\s()\-.]{7,}$/.test(e) && e.replace(/\D/g, "").length >= 3; } const [Rk, Fk, Ok, zk] = /* @__PURE__ */ ut(Mr, "phone number"); function Vk(e) { return Ee(e) && (e.indexOf(",") < 0 ? Tn(e) : Ie( e.replace(/\s*,\s*/g, ",").split(","), Tn )); } const eh = /* @__PURE__ */ new Set([ "aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu" ]); function th(e) { return Pe(e) && eh.has(e.toLowerCase()); } const [nh, Nk, Ek, Bk] = /* @__PURE__ */ ut(th, "ISO 639-1 Language Code"), oh = /^[a-z0-9]+([._+-][a-z0-9]+)*\/[a-z0-9]+([._+-][a-z0-9]+)*(\s*;\s*[a-z0-9-]+=[a-z0-9.+-]+)*$/i; function So(e) { return st(e, oh); } const [Wk, Hk, rh, Gk] = /* @__PURE__ */ ut(So, "MIME type"), ah = [ "application/javascript", "application/typescript", "application/json", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/html", "text/markdown", "text/plain" ]; function Uk(e) { return ge(e, ah); } const ih = [ "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/html", "text/markdown", "text/plain" ]; function Kk(e) { return ge(e, ih); } const sh = [ "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/markdown", "text/plain" ]; function qk(e) { return ge(e, sh); } const lh = [ "image/apng", "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp" ]; function Xk(e) { return ge(e, lh); } const ch = new RegExp( "^[^\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x9F\\u2028\\u2029\\uFFF9-\\uFFFB]*$" ); function Vo(e) { return Pe(e) && ch.test(e); } function oc(e) { return (ko(e) || Vt(e)) && Vt(e.then); } const [Yk, Jk, Zk, Qk] = /* @__PURE__ */ ut(oc, "JavaScript Promise or thenable"); function dh(e) { return typeof e == "object" && e != null && typeof e.aborted == "boolean" && typeof e.addEventListener == "function"; } const [uh, Pk, eC, tC] = /* @__PURE__ */ ut(dh, "JavaScript abort signal"); function ph() { return typeof window < "u" && "__TAURI_INTERNALS__" in window; } function nC() { return typeof window < "u" && !ph(); } async function fh(e = "https://cloudflare.com/cdn-cgi/trace", t = 5e3) { return typeof navigator < "u" && !navigator.onLine ? !1 : await rc(e, t); } async function rc(e, t = 5e3) { Da("server URL", e), Cl("timeout", t); const n = new URL(e).origin; if (n === window.location.origin) return !0; const o = new AbortController(), r = setTimeout( () => o.abort(), t ); try { const a = await fetch(n, { method: "HEAD", signal: o.signal, mode: "no-cors", cache: "no-cache" }); return clearTimeout(r), a.type === "basic" || a.type === "opaque"; } catch { return clearTimeout(r), !1; } } async function Nt(e, t = {}) { Da("resource URL", e), It("option set", t), t = { ...t }, typeof navigator < "u" && !navigator.onLine && de( "NotConnected: the browser is not connected" ); const n = Qi("request timeout", t.timeout) ?? 10 * 1e3, o = t.allowRetries === !0, r = Qi("maximum retries", t.maxRetries) ?? 3; delete t.timeout, delete t.allowRetries, delete t.maxRetries; const a = t.signal; function i(c, d) { const u = c.headers.get("Retry-After"); if (u != null) { const p = parseInt(u, 10); if (!isNaN(p)) return Math.max(0, p * 1e3); const l = Date.parse(u); if (!isNaN(l)) return Math.max(0, l - Date.now()); } return Math.min(30 * 1e3, 500 * 2 ** d); } let s = 0; for (; ; ) { const c = new AbortController(); t.signal = a != null ? AbortSignal.any([c.signal, a]) : c.signal; let d = !1; const u = setTimeout(() => { d = !0, c.abort(); }, n); let p; try { p = await fetch(e, t), clearTimeout(u); } catch (l) { clearTimeout(u); const f = l?.message ?? ""; // timeout by fetch or cancellation by internal timer (d || f.includes("timeout")) && de("ServerUnreachable: the server is unreachable"), // explicit cancellation (l?.name === "AbortError" || f.includes("The user aborted a request")) && de( "RequestAborted: request was aborted" ), (f.includes("Failed to fetch") || f.includes("CORS")) && de("CORSblocked: cross-origin request blocked"), l?.name === "TypeError" && typeof navigator < "u" && !navigator.onLine && de( "NotConnected: the browser is offline" ), de("ServerUnreachable: the server is unreachable"); } if (o && s < r && (p.status === 429 || p.status === 503)) { await new Promise( (l) => setTimeout(l, i(p, s)) ), s++; continue; } switch (!0) { case p.status === 401: de("AuthorizationFailure: authorization failed"); case p.status === 403: de("ForbiddenRequest: request is forbidden"); case p.status === 404: de("MissingResource: resource not found"); case p.status === 408: de("RequestTimeout: request timed out"); case p.status === 429: de("RateLimitExceeded: too many requests"); case p.status === 500: de("InternalServerError: internal server error"); case p.status === 502: de("BadGateway: bad gateway"); case p.status === 503: de("ServiceUnavailable: service is currently not available"); case p.status === 504: de("GatewayTimeout: gateway timed out"); case p.status >= 400: de( "HTTPError: request failed with status " + p.status ); } return p; } } async function hh(e, t = {}) { return await (await Nt(e, t)).text(); } async function gh(e, t = {}) { return await (await Nt(e, t)).json(); } async function mh(e, t = {}) { return await (await Nt(e, t)).arrayBuffer(); } async function bh(e, t = {}) { return await (await Nt(e, t)).blob(); } async function yh(e, t = {}) { const o = await (await Nt(e, t)).blob(); let r, a; const i = new Promise((c, d) => { r = c, a = d; }), s = new FileReader(); return s.onloadend = () => r(s.result), s.onerror = a, s.readAsDataURL(o), i; } async function xh(e, t = {}) { const n = await Nt(e, t), o = (n.headers.get("content-type") ?? "").split(";")[0].trim(); switch (!0) { case o.startsWith("text/html"): return await _i(await n.text()); case o === "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return await Ti(await n.arrayBuffer()); case o === "application/pdf": return await Oi(await n.arrayBuffer()); case o.startsWith("text/markdown"): return await Li(await n.text()); case o.startsWith("text/"): case o.includes("javascript"): case o.includes("typescript"): case o.includes("json"): case o.includes("css"): case o.includes("svg"): case o.includes("xml"): return await n.text(); default: de(`UnsupportedMIMEType: cannot convert content of type "${o}" into plain text`); } } async function vh(e, t = {}) { const n = await Nt(e, t), o = (n.headers.get("content-type") ?? "").split(";")[0].trim(); switch (!0) { case o.startsWith("text/html"): return await n.text(); case o === "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return await Ri(await n.arrayBuffer()); case o.startsWith("text/markdown"): return await Mi(await n.text()); default: de(`UnsupportedMIMEType: cannot convert content of type "${o}" into HTML`); } } async function wh(e, t = {}) { const n = await Nt(e, t), o = (n.headers.get("content-type") ?? "").split(";")[0].trim(); switch (!0) { case o.startsWith("text/html"): return await Di(await n.text()); case o === "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return await Fi(await n.arrayBuffer()); case o.startsWith("text/markdown"): return await n.text(); default: de(`UnsupportedMIMEType: cannot convert content of type "${o}" into Markdown`); } } function ac(e) { return ja("HTTP status code", e, 100, 599), ic[e] ?? ""; } const ic = { /**** 1xx Informational ****/ 100: "Continue", 101: "Switching Protocols", 102: "Processing", 103: "Early Hints", /**** 2xx Success ****/ 200: "OK", 201: "Created", 202: "Accepted", 203: "Non-Authoritative Information", 204: "No Content", 205: "Reset Content", 206: "Partial Content", 207: "Multi-Status", 208: "Already Reported", 226: "IM Used", /**** 3xx Redirection ****/ 300: "Multiple Choices", 301: "Moved Permanently", 302: "Found", 303: "See Other", 304: "Not Modified", 305: "Use Proxy", 307: "Temporary Redirect", 308: "Permanent Redirect", /**** 4xx Client Error ****/ 400: "Bad Request", 401: "Unauthorized", 402: "Payment Required", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 406: "Not Acceptable", 407: "Proxy Authentication Required", 408: "Request Timeout", 409: "Conflict", 410: "Gone", 411: "Length Required", 412: "Precondition Failed", 413: "Payload Too Large", 414: "URI Too Long", 415: "Unsupported Media Type", 416: "Range Not Satisfiable", 417: "Expectation Failed", 418: "I'm a Teapot", 421: "Misdirected Request", 422: "Unprocessable Entity", 423: "Locked", 424: "Failed Dependency", 425: "Too Early", 426: "Upgrade Required", 428: "Precondition Required", 429: "Too Many Requests", 431: "Request Header Fields Too Large", 451: "Unavailable For Legal Reasons", /**** 5xx Server Error ****/ 500: "Internal Server Error", 501: "Not Implemented", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout", 505: "HTTP Version Not Supported", 506: "Variant Also Negotiates", 507: "Insufficient Storage", 508: "Loop Detected", 510: "Not Extended", 511: "Network Authentication Required" }, ye = { /**** Configuration ****/ get Configuration() { return { ServerChoice: ye._ServerChoice, customServer: ye.customServer, ServerBlacklist: ye.ServerBlacklist, ServerWhitelist: ye.ServerWhitelist, ResultBlacklist: ye.ResultBlacklist, ResultWhitelist: ye.ResultWhitelist }; }, set Configuration(e) { It("SearXNG configuration", e); const { ServerChoice: t, customServer: n, ServerBlacklist: o, ServerWhitelist: r, ResultBlacklist: a, ResultWhitelist: i } = e; if (Ft("SearXNG server choice", t, ["custom", "public"]), _a("SearXNG custom Server", n), Ht('SearXNG configuration "ServerBlacklist"', o, at), Ht('SearXNG configuration "ServerWhitelist"', r, at), Ht('SearXNG configuration "ResultBlacklist"', a, at), Ht('SearXNG configuration "ResultWhitelist"', i, at), n != null) { const { ServerURL: s, Authentication: c, Credentials: d } = n; Hn("SearXNG custom server url", s), Ft("SearXNG custom server authentication", c, ["none", "basic", "bearer"]), fn("SearXNG custom server credentials", d); } ye.ServerChoice = t ?? "public", ye.customServer = n ?? { Authentication: "none" }, ye.ServerBlacklist = o ?? [], ye.ServerWhitelist = r ?? [], ye.ResultBlacklist = a ?? [], ye.ResultWhitelist = i ?? []; }, /**** preserveConfiguration ****/ preserveConfiguration: function() { localStorage["SearXNG-Configuration"] = JSON.stringify(ye.Configuration); }, /**** restoreConfiguration ****/ restoreConfiguration: function() { if (localStorage["SearXNG-Configuration"] != null) try { const e = JSON.parse(localStorage["SearXNG-Configuration"]); ye.Configuration = e; } catch (e) { console.warn('"SearXNG.restoreConfiguration" failed with ' + e); } }, /**** hasPreservedConfiguration ****/ get hasPreservedConfiguration() { return localStorage["SearXNG-Configuration"] != null; }, set hasPreservedConfiguration(e) { Yf("SearXNG.hasPreservedConfiguration"); }, /**** customServer[URL/Authentication/Credentials] ****/ _customServer: { ServerURL: void 0, Authentication: "none", Credentials: void 0 }, get customServer() { return { ...ye._customServer }; }, set customServer(e) { It("SearXNG custom server setting", e), Hn("SearXNG custom server url", e.ServerURL), Ft("SearXNG custom server authentication", e.Authentication, ["none", "basic", "bearer"]), fn("SearXNG custom server credentials", e.Credentials), ye._customServer = { ServerURL: e.ServerURL, Authentication: e.Authentication ?? "none", Credentials: e.Credentials }; }, get customServerURL() { return ye._customServer.ServerURL; }, set customServerURL(e) { Hn("SearXNG custom server url", e), ye._customServer.ServerURL = e; }, get customServerAuthentication() { return ye._customServer.Authentication; }, set customServerAuthentication(e) { Ft("SearXNG custom server authentication", e, ["none", "basic", "bearer"]), ye._customServer.Authentication = e; }, get customServerCredentials() { return ye._customServer.Credentials; }, set customServerCredentials(e) { fn("SearXNG custom server credentials", e), ye._customServer.Credentials = e; }, /**** publicServers - fetches the list of registered public SearXNG servers ****/ publicServers: async function(e = {}) { It("option set", e); const { ServiceURL: t, Signal: n, ...o } = e; Hn("SearXNG service URL", t), uh("fetch abort signal", n); let r; try { if (r = await Nt( t ?? "https://searx.space/data/instances.json", { ...o, ...n != null ? { signal: n } : {} } ), r.ok) { const i = await r.json(); return !Me(i) || !Me(i.instances) ? [] : Object.keys(i.instances).filter(ye.ServerIsAcceptable); } } catch (i) { i.name === "AbortError" ? de("Aborted: SearXNG server scan was aborted") : de("InternalError: SearXNG server scan failed with " + i); } const a = Sr(r.status, 100, 599) ? ac(r.status) : "(unknown)"; de( "InternalError: SearXNG server scan failed with HTTP status " + r.status + " " + a ); }, /**** ServerBlacklist (for SearXNG servers) ****/ _ServerBlacklist: {}, get ServerBlacklist() { return Object.keys(ye._ServerBlacklist); }, set ServerBlacklist(e) { Ht("SearXNG server blacklist", e, at), ye._ServerBlacklist = {}, (e ?? []).forEach( (t) => ye._ServerBlacklist[t] = !0 ); }, // note: caller should probably rescan the list of public SearXNG servers /**** ServerWhitelist (for SearXNG servers) ****/ _ServerWhitelist: { "http://127.0.0.1:8080": !0, "http://127.0.0.1:8888": !0, "http://localhost:8080": !0, "http://localhost:8888": !0, "http://[::1]:8080": !0, "http://[::1]:8888": !0 }, get ServerWhitelist() { return Array.from(Object.keys(ye._ServerWhitelist)); }, set ServerWhitelist(e) { Ht("SearXNG server whitelist", e, at), ye._ServerWhitelist = {}, (e ?? []).forEach( (t) => ye._ServerWhitelist[t] = !0 ); }, // note: caller should probably rescan the list of public SearXNG servers /**** ServerIsBlacklisted ****/ ServerIsBlacklisted: function(e) { return at(e) && e in ye._ServerBlacklist; }, /**** ServerIsWhitelisted ****/ ServerIsWhitelisted: function(e) { return at(e) && e in ye._ServerWhitelist; }, /**** ServerIsAcceptable ****/ ServerIsAcceptable: function(e) { return at(e) && (e.startsWith("https://") || e in ye._ServerWhitelist) && !(e in ye._ServerBlacklist); }, /**** ServerChoice ****/ _ServerChoice: "public", get ServerChoice() { return ye._ServerChoice; }, set ServerChoice(e) { _n("SearXNG server choice setting", e, ["public", "custom"]), ye._ServerChoice = e; }, /**** nextServer ****/ _publicServers: [], nextServer: async function() { if (ye._ServerChoice === "custom") return ye._customServer.ServerURL == null && de( "MissingCustomServer: custom SearXNG server is missing" ), ye.customServer; { let e = ye._publicServers; if (e.length === 0 && (e = ye._publicServers = await ye.publicServers()), e.length === 0) de( "MissingPublicServer: could not find any public SearXNG server" ); else { const t = Math.floor(Math.random() * e.length); return { ServerURL: e.splice(t, 1)[0], Authentication: "none", Credentials: void 0 }; } } }, /**** query - uses SearXNG to perform a given query ****/ query: async function(e, t = {}) { ln("search phrase", e), It("search options", t); const { ServerURL: n, ServerAuthentication: o, ServerCredentials: r, language: a, categories: i, num_results: s } = t; Hn("SearXNG server URL", n), Ft("SearXNG server authentication", o, ["none", "basic", "bearer"]), fn("SearXNG server credentials", r), nh("SearXNG query language", a), Ft("SearXNG query categories", i, ["general"]), Dr("SearXNG query result limit", s); const c = n == null ? await ye.nextServer() : { ServerURL: n, Authentication: o ?? "none", Credentials: r }; c.ServerURL == null && de( "MissingSearXNGServer: no SearXNG server given" ), c.Authentication !== "none" && c.Credentials == null && de( "MissingCredentials: no SearXNG server credentials given" ); const d = {}; if (c.Authentication !== "none") { const p = new Headers(); p.set("Authorization", `${nv(c.Authentication)} ${c.Credentials}`), d.headers = p; } e = e.trim(), e === "" && de( "EmptyArgument: the given search phrase is empty" ); const u = new URLSearchParams({ q: e, language: a ?? "en", format: "html", categories: i ?? "general", num_results: "" + (s ?? 20) }); try { const l = await (await Nt( `${c.ServerURL}/search?${u}`, d )).text(); return Array.from(l.matchAll(/

g[1]).filter((g) => g != null && g.trim() !== "").filter(ye.ResultIsAcceptable); } catch (p) { [ "ServerUnreachable", "AuthorizationFailure", "ForbiddenRequest", "InternalServerError" ].includes(p.name) ? (ye.ServerBlacklist = [...ye.ServerBlacklist, c.ServerURL], console.warn("SearXNG search failed with", p, ` >>>> server was blacklisted `)) : console.warn("SearXNG search failed with", p); } return []; }, /**** _withoutQueryString - strips any query string from a given URL ****/ _withoutQueryString: function(e) { return e.replace(/\?.*$/, ""); }, /**** ResultBlacklist (for query results) ****/ _ResultBlacklist: { "https://www.sjmed.com": !0 }, get ResultBlacklist() { return Object.keys(ye._ResultBlacklist); }, set ResultBlacklist(e) { Ht("SearXNG result blacklist", e, at), ye._ResultBlacklist = {}, (e ?? []).forEach( (t) => ye._ResultBlacklist[ye._withoutQueryString(t)] = !0 ); }, /**** ResultWhitelist (for query results) ****/ _ResultWhitelist: {}, get ResultWhitelist() { return Object.keys(ye._ResultWhitelist); }, set ResultWhitelist(e) { Ht("SearXNG result whitelist", e, at), ye._ResultWhitelist = {}, (e ?? []).forEach( (t) => ye._ResultWhitelist[ye._withoutQueryString(t)] = !0 ); }, /**** ResultIsBlacklisted ****/ ResultIsBlacklisted: function(e) { return at(e) && ye._withoutQueryString(e) in ye._ResultBlacklist; }, /**** ResultIsWhitelisted ****/ ResultIsWhitelisted: function(e) { return at(e) && ye._withoutQueryString(e) in ye._ResultWhitelist; }, /**** ResultIsAcceptable ****/ ResultIsAcceptable: function(e) { return !at(e) || ye.ResultIsBlacklisted(e) ? !1 : Object.keys(ye._ResultWhitelist).length === 0 || ye.ResultIsWhitelisted(e); } }, oC = { InternetIsAvailable: fh, ServerIsReachable: rc, fetched: Nt, fetchedText: hh, fetchedJSON: gh, fetchedBinary: mh, fetchedBlob: bh, fetchedDataURL: yh, fetchedAsText: xh, fetchedAsHTML: vh, fetchedAsMarkdown: wh, DescriptionOfHTTPStatus: ac, HTTPMessageForStatus: ic, SearXNG: ye }, Mn = /* @__PURE__ */ Symbol("normalizedName"), yr = /* @__PURE__ */ Symbol("L10nDictionary"), kh = "/", xr = kh + "icons/", vt = { Placeholder: "(empty)", disabled: !1 }, Ch = { Placeholder: "(no Selection)", disabled: !0 }, $h = { Placeholder: "(mixed Values)", disabled: !1 }; function Ze(e) { return e === vt || e === Ch || e === $h; } function lt(e, t, n) { return Ze(e) ? { actualValue: void 0, actualPlaceholder: e === vt ? n ?? e.Placeholder : e.Placeholder, actualDisabling: t || e.disabled } : { actualValue: e, actualPlaceholder: n, actualDisabling: t }; } const yt = "-webkit-mask-size:contain; mask-size:contain; -webkit-mask-position:center center; mask-position:center center; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;"; function no(e, t = 2) { const n = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='${t}' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='${e}'/%3E%3C/svg%3E")`; return `-webkit-mask-image:${n}; mask-image:${n};`; } const No = no("m6 9 6 6 6-6"), jh = no("m18 15-6-6-6 6"), Ga = no("m15 18-6-6 6-6"), Eo = no("m9 18 6-6-6-6"), Ih = no("M20 6 9 17l-5-5"), Sh = no("M18 6 6 18M6 6l12 12"); function _o(e) { return an(e); } const [vr, rC, aC, iC] = /* @__PURE__ */ ut(_o, "JCL coordinate"); function Do(e) { return an(e) && e >= 0; } const [Dt, sC, lC, cC] = /* @__PURE__ */ ut(Do, "JCL dimension"); function _h(e) { return Me(e) && _o(e.x) && _o(e.y); } const [dC, uC, pC, fC] = /* @__PURE__ */ ut(_h, "JCL position"); function Dh(e) { return Me(e) && Do(e.Width) && Do(e.Height); } const [hC, gC, mC, bC] = /* @__PURE__ */ ut(Dh, "JCL size"); function Lh(e) { return Me(e) && _o(e.x) && Do(e.Width) && _o(e.y) && Do(e.Height); } const [yC, xC, vC, wC] = /* @__PURE__ */ ut(Lh, "JCL geometry"), kC = Fa; function xn(e) { return Me(e) && "current" in e; } const [CC, $C, Ar, jC] = /* @__PURE__ */ ut(xn, "preact component reference"); function oo(e) { return new RegExp("^(?:" + e + ")$"); } function Mh(e) { return Ln("name", e), Xt(e); } function Xt(e) { return e.replaceAll(".", "-"); } function At(e) { let t = e.replace(/:.*$/, "").trim(), n = e.replace(/^[^:]*:/, "").trim(); const o = /^[-]+$/.test(n), r = n[0] === "-"; return t === e && (t = t.replace(/^-/, "")), r && (n = n.replace(/^-/, "")), { Value: t, Label: n, disabled: r, isRuler: o }; } function G(e) { It("PropSet", e); const t = {}; for (const o of Object.keys(e)) t[Kr(o)] = e[o]; t.children = Mt(e.children); const n = {}; for (const o of Object.keys(t)) o !== "children" && o !== "RestProps" && (n[o] = t[o]); return t.RestProps = n, new Proxy(t, { get(o, r) { if (typeof r == "symbol") return o[r]; switch (!0) { case r === "children": return [...o.children]; // was normalised into an array case r === "RestProps": return n; // as a reference (to be modified externally) default: { const a = Kr(r); return delete o.RestProps[a], o[a]; } } }, set() { de('TypeError: "PropSet" is read-only'); }, deleteProperty() { de('TypeError: "PropSet" is read-only'); }, defineProperty() { de('TypeError: "PropSet" is read-only'); }, has(o, r) { if (typeof r == "symbol") return r in o; switch (!0) { case r === "children": return "children" in o; case r === "RestProps": return "RestProps" in o; default: return Kr(r) in o; } }, ownKeys(o) { return Reflect.ownKeys(o); }, getOwnPropertyDescriptor(o, r) { const a = Object.getOwnPropertyDescriptor(o, r); return a != null && (a.writable = !1, a.configurable = !0), a; } }); } function Kr(e) { return e.replace(/[-_]/g, "").trim().toLowerCase(); } function z(e, t) { if (Zt("Validator", t), t(e) === !0) return e; } function Y(e) { switch (!0) { case Jt(e): return e; case e === "false": return !1; case e === "true": return !0; } } function Xe(e) { if (dt(e) || Pe(e) && (e = parseFloat(e), !isNaN(e))) return e; } function rn(e, t, n, o, r) { return Bo( e, (a) => To(a, t, n, o, r) ); } function IC(e) { return Bo(e, Pn); } function wr(e, t, n) { return Bo( e, (o) => Sr(o, t, n) ); } function $e(e) { return Bo(e, hn); } function bn(e) { return Bo(e, ya); } function Rn(e) { return z(e, Pe); } function SC(e, t) { return z(e, (n) => st(n, t)); } function ae(e) { return z(e, mn); } function D(e) { return z(e, Ee); } function R(e) { return z(e, Vt); } function _t(e) { return z(e, An); } function _C(e) { return z(e, Tn); } function DC(e) { return z(e, Mr); } function Vn(e) { return z(e, at); } function LC(e) { return z(e, Ha); } function MC(e) { return z(e, (t) => Ha(t) || hn(t)); } function AC(e) { return z(e, tc); } function Te(e) { Qf("Identifier", e), de("MissingArgument: no " + Lt(e) + " given"); } function Bo(e, t) { if (t(e) === !0 || Pe(e) && (e = parseFloat(e), t(e) === !0)) return e; } const sc = [ "--jcl-bg-color", "--jcl-fg-color", "--jcl-primary-bg-color", "--jcl-primary-fg-color", "--jcl-secondary-bg-color", "--jcl-secondary-fg-color", "--jcl-muted-bg-color", "--jcl-muted-fg-color", "--jcl-destructive-bg-color", "--jcl-destructive-fg-color", "--jcl-accent-bg-color", "--jcl-accent-fg-color", "--jcl-success-bg-color", "--jcl-success-fg-color", "--jcl-warning-bg-color", "--jcl-warning-fg-color", "--jcl-border-color", "--jcl-input-border-color", // border for outline-only controls (Check- // box, Radiobutton, Switch); falls back to // "--jcl-border-color" "--jcl-ring-color" ], lc = ["--jcl-border-radius"], cc = [ "--jcl-font", "--jcl-serif-font", "--jcl-sans-serif-font", "--jcl-monospace-font" ], TC = [ ...sc, ...lc, ...cc ]; function Ah(e) { return typeof e != "string" ? !1 : typeof CSS > "u" ? !0 : CSS.supports("color", e); } function Th(e) { return typeof e != "string" ? !1 : typeof CSS > "u" ? !0 : CSS.supports("border-radius", e); } function ra(e) { if (!Me(e)) return !1; const t = (n, o) => e[n] === void 0 || o(e[n]); return sc.every((n) => t(n, Ah)) && lc.every((n) => t(n, Th)) && cc.every((n) => t(n, Pe)); } const [RC, FC, OC, zC] = /* @__PURE__ */ ut(ra, "JCL swatch"); function Rh(e) { return Me(e) && ra(e.light) && ra(e.dark); } const [Fh, VC, Oh, NC] = /* @__PURE__ */ ut(Rh, "set of JCL swatches"); function Wo(e, t) { if (Ft("UI theme", e, [...fc]), Fh("set of UI swatches", t), e == null && (e = "light"), t == null) return ""; e === "auto" && (e = Ut("(prefers-color-scheme: dark)") ? "dark" : "light"); const n = t[e]; return n == null ? "" : Object.entries(n).filter(([r]) => /^--[-a-zA-Z0-9_]+$/.test(r)).map(([r, a]) => `${r}:${String(a).replace(/[;}]/g, "")}`).join(";") + ";"; } const zh = ["ltr", "rtl"]; function dc(e) { return Pe(e) && e.toLowerCase() in pc; } const [EC, BC, ro, WC] = /* @__PURE__ */ ut(dc, "supported locale"), Vh = /* @__PURE__ */ new Set([ "ar", // Arabic "he", // Hebrew "fa" // Persian / Farsi ]); function uc(e) { ro("Locale", e); const t = e.toLowerCase().replace(/-.*$/, ""); return Vh.has(t) ? "rtl" : "ltr"; } const Nh = { en: "gb", "en-us": "us", "en-ca": "ca", "en-au": "au", "en-gb": "gb", "en-nz": "nz", de: "de", "de-ch": "ch", "de-li": "li", fr: "fr", "fr-ch": "ch", it: "it", "it-ch": "ch", es: "es", nl: "nl", pt: "pt", el: "gr", fi: "fi", sk: "sk", si: "si", mt: "mt", sv: "se", no: "no", da: "dk", is: "is", ja: "jp", zh: "cn", "zh-tw": "tw", "zh-hk": "hk", ko: "kr", ru: "ru", pl: "pl", cs: "cz", hu: "hu", ro: "ro", bg: "bg", hr: "hr", tr: "tr", ar: "ae", he: "il", fa: "ir", hi: "in", th: "th", id: "id", ms: "my", uk: "ua", vi: "vn" }, Eh = /^[a-z]{2}$/i; function Bh(e) { return Sa("ISO Country Code", e, Eh), [...e.toUpperCase()].map( (t) => String.fromCodePoint(t.charCodeAt(0) + 127397) ).join(""); } function HC(e) { ro("Locale", e), e = e.toLowerCase(); const t = Ua(Nh, e); return t != null ? Bh(t) : "🏳"; } function Ua(e, t) { return e[t] ?? e[t.split("-")[0]]; } const pc = { en: "English", "en-us": "English (US)", "en-ca": "English (CA)", "en-au": "English (AU)", "en-gb": "English (UK)", "en-nz": "English (NZ)", de: "Deutsch", "de-ch": "Deutsch (CH)", "de-li": "Deutsch (LI)", fr: "Français", "fr-ch": "Français (CH)", it: "Italiano", "it-ch": "Italiano (CH)", es: "Español", nl: "Nederlands", pt: "Português", el: "Ελληνικά", fi: "Suomi", sk: "Slovenčina", si: "Slovenščina", mt: "Malti", sv: "Svenska", no: "Norsk", da: "Dansk", is: "Íslenska", ja: "日本語", zh: "中文", "zh-tw": "中文 (TW)", "zh-hk": "中文 (HK)", ko: "한국어", ru: "Русский", pl: "Polski", cs: "Čeština", hu: "Magyar", ro: "Română", bg: "Български", hr: "Hrvatski", tr: "Türkçe", ar: "العربية", he: "עברית", fa: "فارسی", hi: "हिन्दी", th: "ไทย", id: "Bahasa Indonesia", ms: "Bahasa Melayu", uk: "Українська", vi: "Tiếng Việt" }; function GC(e) { return ro("Locale", e), e = e.toLowerCase(), Ua(pc, e) ?? e; } const Wh = { "en-us": "USD", "en-ca": "CAD", "en-au": "AUD", "en-gb": "GBP", "en-nz": "NZD", de: "EUR", "de-ch": "CHF", "de-li": "CHF", fr: "EUR", "fr-ch": "CHF", it: "EUR", "it-ch": "CHF", es: "EUR", nl: "EUR", pt: "EUR", el: "EUR", fi: "EUR", sk: "EUR", si: "EUR", mt: "EUR", sv: "SEK", no: "NOK", da: "DKK", is: "ISK", ja: "JPY", zh: "CNY", "zh-tw": "TWD", "zh-hk": "HKD", ko: "KRW", ru: "RUB", pl: "PLN", cs: "CZK", hu: "HUF", ro: "RON", bg: "BGN", hr: "EUR", tr: "TRY", ar: "AED", he: "ILS", fa: "IRR", hi: "INR", th: "THB", id: "IDR", ms: "MYR", uk: "UAH", vi: "VND" }; function Hh(e) { return e = e.toLowerCase(), Ua(Wh, e) ?? "USD"; } function Tr(e) { const t = /* @__PURE__ */ new Map(); return (n, o) => { const r = n + "|" + JSON.stringify(o); let a = t.get(r); return a == null && t.set(r, a = new e(n, o)), a; }; } const Gh = Tr(Intl.PluralRules), ks = Tr(Intl.NumberFormat), Uh = Tr(Intl.DateTimeFormat), Kh = Tr(Intl.RelativeTimeFormat); function qh(e, t) { return e.replace( /\{\{(\w+)\}\}/g, (n, o) => t[o] != null ? String(t[o]) : n // keep {{Key}} if variable is missing ); } const Ka = {}, Xh = /^[^\x00-\x1F\x7F\x80-\x9F]+$/; function or(e) { return Pe(e) && Xh.test(e); } function Yh(e) { return Me(e) ? Object.entries(e).every(([t, n]) => or(t) && (or(n) || Me(n) && Object.entries(n).every(([o, r]) => or(o) && or(r)))) : !1; } const [UC, KC, Jh, qC] = /* @__PURE__ */ ut(Yh, "localization dictionary"); function Zh(e) { const t = Object.create(e); for (const n in t) t[n] = Object.create(t[n]); return t; } function kr(e, t, n = Ka) { ro("Locale", e), Jh("Dictionary", t), e = e.toLowerCase(), n[e] == null ? n[e] = { ...t } : Object.assign(n[e], t); } function aa(e, t, n = Ka) { ln("localization key", e), ro("locale", t), t = t.toLowerCase(); let o = n[t]?.[e]; if (o != null) return o; const r = t.split("-"); for (; r.length > 1; ) if (r.pop(), o = n[r.join("-")]?.[e], o != null) return o; if (t !== "en" && (o = n.en?.[e], o != null)) return o; } const fc = ["auto", "light", "dark"], Qh = ["coarse", "fine"], Ph = ["none", "hover"], eg = ["reduced"], tg = ["less", "more"]; function ng(e) { if (typeof e != "string") return "en"; let t = e.toLowerCase(); for (; ; ) { if (dc(t)) return t; const n = t.lastIndexOf("-"); if (n < 0) break; t = t.slice(0, n); } return "en"; } const og = { light: { "--jcl-bg-color": "oklch(1 0 0)", "--jcl-fg-color": "oklch(0.145 0 0)", "--jcl-primary-bg-color": "#0075FF", // Chrome's accent blue "--jcl-primary-fg-color": "oklch(1 0 0)", // white "--jcl-secondary-bg-color": "oklch(0.97 0 0)", "--jcl-secondary-fg-color": "oklch(0.205 0 0)", "--jcl-muted-bg-color": "oklch(0.97 0 0)", "--jcl-muted-fg-color": "oklch(0.556 0 0)", "--jcl-destructive-bg-color": "oklch(0.577 0.245 27.325)", "--jcl-destructive-fg-color": "oklch(0.985 0 0)", "--jcl-accent-bg-color": "oklch(0.97 0 0)", "--jcl-accent-fg-color": "oklch(0.205 0 0)", "--jcl-success-bg-color": "oklch(0.627 0.194 149.214)", // green-600 "--jcl-success-fg-color": "oklch(0.985 0 0)", "--jcl-warning-bg-color": "oklch(0.769 0.188 70.08)", // amber-500 "--jcl-warning-fg-color": "oklch(0.145 0 0)", "--jcl-border-color": "oklch(0.922 0 0)", "--jcl-ring-color": "#0075FF", // Chrome's accent blue "--jcl-border-radius": "8px", // shadcn "rounded-md" equivalent "--jcl-font": "ui-sans-serif, system-ui, sans-serif", "--jcl-serif-font": 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif', "--jcl-sans-serif-font": "ui-sans-serif, system-ui, sans-serif", "--jcl-monospace-font": "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace" }, dark: { "--jcl-bg-color": "oklch(0.145 0 0)", "--jcl-fg-color": "oklch(0.985 0 0)", "--jcl-primary-bg-color": "#4D9FFF", // lighter variant of #0075FF "--jcl-primary-fg-color": "oklch(1 0 0)", // white "--jcl-secondary-bg-color": "oklch(0.269 0 0)", "--jcl-secondary-fg-color": "oklch(0.985 0 0)", "--jcl-muted-bg-color": "oklch(0.269 0 0)", "--jcl-muted-fg-color": "oklch(0.708 0 0)", "--jcl-destructive-bg-color": "oklch(0.704 0.191 22.216)", "--jcl-destructive-fg-color": "oklch(0.985 0 0)", "--jcl-accent-bg-color": "oklch(0.269 0 0)", "--jcl-accent-fg-color": "oklch(0.985 0 0)", "--jcl-success-bg-color": "oklch(0.723 0.219 149.579)", // green-500 "--jcl-success-fg-color": "oklch(0.145 0 0)", "--jcl-warning-bg-color": "oklch(0.828 0.189 84.429)", // amber-400 "--jcl-warning-fg-color": "oklch(0.145 0 0)", "--jcl-border-color": "oklch(1 0 0 / 10%)", // "--jcl-border-color" alone is too faint for outline-only controls // (Checkbox, Radiobutton, Switch), whose border is their only visual // cue when unchecked - so those get a brighter, dedicated border: "--jcl-input-border-color": "oklch(1 0 0 / 20%)", "--jcl-ring-color": "#4D9FFF", // lighter variant of #0075FF "--jcl-border-radius": "8px", // shadcn "rounded-md" equivalent "--jcl-font": "ui-sans-serif, system-ui, sans-serif", "--jcl-serif-font": 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif', "--jcl-sans-serif-font": "ui-sans-serif, system-ui, sans-serif", "--jcl-monospace-font": "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace" } }; function rg() { const e = ng( typeof navigator < "u" ? navigator.language : "en" ); return { Theme: "auto", // which means: "use OS setting" SwatchSet: structuredClone(og), PointerAccuracy: Ut("(pointer: coarse)") ? "coarse" : "fine", HoverCapability: Ut("(hover: none)") ? "none" : "hover", preferredMotion: Ut("(prefers-reduced-motion: reduce)") ? "reduced" : void 0, preferredContrast: Ut("(prefers-contrast: more)") ? "more" : Ut("(prefers-contrast: less)") ? "less" : void 0, Locale: e, Direction: uc(e), TooltipDelay: 600, [yr]: Ka }; } const Rr = /* @__PURE__ */ rg(), $t = /* @__PURE__ */ yn(void 0); function Ho(e) { const [t, n] = Ue(e.Theme), [o, r] = Ue(e.SwatchSet), [a, i] = Ue(e.PointerAccuracy), [s, c] = Ue(e.HoverCapability), [d, u] = Ue(e.preferredMotion), [p, l] = Ue(e.preferredContrast), [f, h] = Ue(e.Locale), [g, b] = Ue(e.Direction), [m, v] = Ue(e.TooltipDelay), [C, S] = Ue( Zh(e[yr]) ); function j(V) { _n("UI theme", V, [...fc]), n(V); } function x(V) { Oh("UI swatch set", V), r(V); } function w(V) { _n("UI pointer accuracy", V, [...Qh]), i(V); } function T(V) { _n("UI hover capability", V, [...Ph]), c(V); } function L(V) { Ft("preferred UI motion", V, [...eg]), u(V); } function $(V) { Ft("preferred UI contrast", V, [...tg]), l(V); } function I(V) { ro("Locale", V), h(V); } function M(V) { _n("text direction", V, [...zh]), b(V); } function _(V) { qn("tooltip delay", V), v(V); } function F(V, X) { kr(V, X, C), S({ ...C }); } return Qt(() => ({ Theme: t, setTheme: j, SwatchSet: o, setSwatchSet: x, PointerAccuracy: a, setPointerAccuracy: w, HoverCapability: s, setHoverCapability: T, preferredMotion: d, setPreferredMotion: L, preferredContrast: p, setPreferredContrast: $, Locale: f, setLocale: I, Direction: g, setDirection: M, TooltipDelay: m, setTooltipDelay: _, [yr]: C, registerL10n: F }), [ t, o, a, s, d, p, f, g, m, C ]); } const ag = /* @__PURE__ */ Object.create(null); function mt(e) { return ln("module specifier", e), ag[e] ??= import(e); } function Go(e) { let t; return () => t ??= e(); } const Cs = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(); function ao(e) { Zt("library loader", e); const [t, n] = Ue(rr.get(e)); switch (je(() => { if (rr.get(e) === "loaded") return; let o = !1, r = Cs.get(e); return r == null && (r = e(), Cs.set(e, r)), r.then(() => { rr.set(e, "loaded"), o || n("loaded"); }, (a) => { rr.set(e, a), o || n(a); }), () => { o = !0; }; }, []), !0) { case t == null: return !1; case t === "loaded": return !0; default: de( "LibraryNotLoadable: a required library could not be loaded, reason: " + (t?.message ?? t) ); } } function ig() { const [e, t] = Ue( // SSR-ready () => typeof navigator < "u" ? navigator.onLine : !0 ); return je(() => { const n = new AbortController(), o = () => t(!0), r = () => t(!1); return window.addEventListener("online", o, { signal: n.signal }), window.addEventListener("offline", r, { signal: n.signal }), () => n.abort(); }, []), e; } function sg() { const [e, t] = Ue(() => ({ // SSR-ready Width: typeof window < "u" ? window.innerWidth : 0, Height: typeof window < "u" ? window.innerHeight : 0 })), n = U(0), o = se(() => { cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => { t({ Width: window.innerWidth, Height: window.innerHeight }); }); }, []); return je(() => (window.addEventListener("resize", o), () => { window.removeEventListener("resize", o), cancelAnimationFrame(n.current); }), [o]), e; } function pt() { const [e, t] = Ue({}); return se(() => t({}), []); } function Fr() { const e = bt($t); return e == null && de( 'InvalidContext: "useCustomization" must only be used inside a "JCL_Applet", "JCL_Overlay", "JCL_Dialog" or "JCL_Customizable"' ), e; } function lg() { return qa(Fr()); } function qa(e) { const { Locale: t, Direction: n, [yr]: o } = e, r = Hh(t); function a(u, p, l) { const f = aa(u, t, o); if (f == null) return u; let h; if (typeof f == "string") h = f; else { const g = Gh(t).select(l ?? 0); h = f[g] ?? f.other ?? u; } return p == null ? h : qh(h, p); } function i(u, p) { return ks(t, p).format(u); } function s(u, p) { return Uh(t, p).format(u); } function c(u, p, l) { return Kh(t, l).format(u, p); } function d(u, p) { return ks(t, { style: "currency", currency: r, ...p }).format(u); } return { Locale: t, Direction: n, Currency: r, localized: a, formattedNumber: i, formattedDate: s, formattedRelativeDate: c, formattedCurrency: d }; } function cg(e = {}) { !Vt(e) && !Me(e) && de( "InvalidArgument:the given initial configuration is neither a plain object nor a function" ); const t = U(void 0); t.current == null && (Vt(e) && (e = Ye( 'component callback "initialConfiguration"', e ), Me(e) || de( "InvalidArgument:the result of the initial configuration callback is not a plain object" )), t.current = { ...e }); const n = se((o) => { if (_a("configuration change set", o), o != null) for (const [r, a] of Object.entries(o)) a === void 0 ? delete t.current[r] : Me(a) ? Me(t.current[r]) ? Object.assign(t.current[r], a) : t.current[r] = { ...a } : de( "InvalidArgument: configuration[" + Lt(r) + "] is no plain JavaScript object" ); }, []); return [t.current, n]; } let Gn; function hc(e) { typeof document > "u" || (Gn == null && (Gn = document.createElement("style"), document.head.appendChild(Gn)), Gn.textContent = "* { cursor:" + e + " !important }"); } function dg(e) { if (typeof document > "u") return; Lo(); const t = getComputedStyle(e).cursor; t === "" || t === "auto" || hc(t); } function Lo() { Gn?.remove(), Gn = void 0; } function Xa(e) { e != null && !Ee(e) && !(e instanceof HTMLElement) && !Vt(e) && de( 'InvalidArgument: "Container" is neither a CSS selector nor an HTML element or a function' ); } function Qn(e, t) { t != null && !Ee(t) && !(t instanceof HTMLElement) && de( `InvalidArgument: "${e}" is neither a CSS selector nor an HTML element` ); } function Ya(e, t) { switch (!0) { case t == null: return e.parentElement ?? void 0; case t === "self": return e; case Ee(t): return e.parentElement?.closest(t); case Vt(t): { const n = t(); return n instanceof HTMLElement ? n : void 0; } default: return t; } } function Ja(e) { switch (e.pointerType) { case "mouse": return e.buttons === 1; case "touch": return e.isPrimary; case "pen": return e.buttons === 1; default: return !0; } } function Fn({ ViewRef: e, Container: t, onlyFrom: n, neverFrom: o, onDragStart: r, onDragContinuation: a, onDragFinish: i, onDragCancellation: s }) { Ar("ViewRef", e), Xa(t), Qn("onlyFrom", n), Qn("neverFrom", o), Oe('"onDragStart" callback', r), Oe('"onDragContinuation" callback', a), Oe('"onDragFinish" callback', i), Oe('"onDragCancellation" callback', s); const c = r != null && a != null && i != null && s != null, d = U(); d.current = { onDragStart: r, onDragContinuation: a, onDragFinish: i, onDragCancellation: s }; const u = U(!1); u.current = c; const p = U(), l = U(), f = U(!1); je(() => { e.current != null && (p.current = Ya(e.current, t)); }, [ e.current /* Container */ ]), je(() => () => { window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", b), window.removeEventListener("pointercancel", m), window.removeEventListener("blur", v), f.current && (f.current = !1, Lo()); }, []); const h = se((x) => { if (!(x.target instanceof HTMLElement) || !Ja(x) || !c || p.current == null || n != null && !j(x.target, n) || o != null && j(x.target, o)) return; window.addEventListener("pointermove", g), window.addEventListener("pointerup", b), window.addEventListener("pointercancel", m), window.addEventListener("blur", v), e.current.setPointerCapture?.(x.pointerId), dg(x.target); const w = p.current, T = w.getBoundingClientRect(), L = x.clientX - T.left + w.scrollLeft, $ = x.clientY - T.top + w.scrollTop; l.current = { x: L, y: $ }, f.current = !0, N('useDragging callback "onDragStart"', d.current?.onDragStart, 0, 0, L, $, x); }, [e, c, n, o]), g = se((x) => { if (f.current !== !1) { if (x.pointerType === "mouse" && x.buttons === 0) { C(x, !1); return; } p.current != null && N('useDragging callback "onDragContinuation"', d.current?.onDragContinuation, ...S(x)); } }, []), b = se((x) => { C(x, !1); }, []), m = se((x) => { C(x, !0); }, []), v = se(() => { C(null, !0); }, []), C = se((x, w) => { if (f.current !== !1) { if (f.current = !1, Lo(), x != null && e.current?.hasPointerCapture?.(x.pointerId) && e.current.releasePointerCapture(x.pointerId), window.removeEventListener("pointermove", g), window.removeEventListener("pointerup", b), window.removeEventListener("pointercancel", m), window.removeEventListener("blur", v), w) { N('useDragging callback "onDragCancellation"', d.current?.onDragCancellation, 0, 0, l.current.x, l.current.y, x); return; } p.current != null && u.current && N('useDragging callback "onDragFinish"', d.current?.onDragFinish, ...S(x)); } }, []); function S(x) { const w = p.current; if (w == null) return [0, 0, 0, 0, x]; const T = w.getBoundingClientRect(), L = x.clientX - T.left + w.scrollLeft, $ = x.clientY - T.top + w.scrollTop, I = L - l.current.x, M = $ - l.current.y; return [I, M, L, $, x]; } function j(x, w) { switch (!0) { // matching element (e.g. the title case w == null: return !0; case typeof w == "string": return x.closest(w) != null; default: return w.contains(x); } } return c ? h : void 0; } function io({ ViewRef: e, Container: t, onlyFrom: n, neverFrom: o, Threshold: r = 4, onClick: a, onDragStart: i, onDragContinuation: s, onDragFinish: c, onDragCancellation: d }) { Ar("ViewRef", e), Xa(t), Qn("onlyFrom", n), Qn("neverFrom", o), Dr("drag threshold", r), Oe('"onClick" callback', a), Oe('"onDragStart" callback', i), Oe('"onDragContinuation" callback', s), Oe('"onDragFinish" callback', c), Oe('"onDragCancellation" callback', d); const u = a != null, p = i != null && s != null && c != null && d != null, l = u || p, f = U(); f.current = { onClick: a, onDragStart: i, onDragContinuation: s, onDragFinish: c, onDragCancellation: d }; const h = U(!1); h.current = u; const g = U(!1); g.current = p; const b = U(r); b.current = r; const m = U(), v = U(), C = U(), S = U(!1), j = U(!1); je(() => { e.current != null && (m.current = Ya(e.current, t)); }, [ e.current /* Container */ ]), je(() => () => { window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", T), window.removeEventListener("pointercancel", L); }, []); const x = se((_) => { if (!(_.target instanceof HTMLElement) || !Ja(_) || !l || m.current == null || n != null && !M(_.target, n) || o != null && M(_.target, o)) return; window.addEventListener("pointermove", w), window.addEventListener("pointerup", T), window.addEventListener("pointercancel", L), e.current.setPointerCapture?.(_.pointerId); const F = m.current, V = F.getBoundingClientRect(), X = _.clientX - V.left + F.scrollLeft, Q = _.clientY - V.top + F.scrollTop; v.current = { x: X, y: Q }, C.current = _, S.current = !0, j.current = !1; }, [e, l, n, o]), w = se((_) => { if (S.current === !1 || m.current == null) return; const [F, V, X, Q] = I(_); if (!j.current) { if (Math.sqrt(F * F + V * V) < b.current) return; j.current = !0, g.current && N('useClickDragging callback "onDragStart"', f.current?.onDragStart, 0, 0, v.current.x, v.current.y, C.current); } g.current && N('useClickDragging callback "onDragContinuation"', f.current?.onDragContinuation, F, V, X, Q, _); }, []), T = se((_) => { $(_, !1); }, []), L = se((_) => { $(_, !0); }, []), $ = se((_, F) => { if (S.current !== !1) { if (S.current = !1, e.current?.hasPointerCapture?.(_.pointerId) && e.current.releasePointerCapture(_.pointerId), window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", T), window.removeEventListener("pointercancel", L), F) { j.current && g.current && N('useClickDragging callback "onDragCancellation"', f.current?.onDragCancellation, 0, 0, v.current.x, v.current.y, _), j.current = !1; return; } if (j.current) g.current && N('useClickDragging callback "onDragFinish"', f.current?.onDragFinish, ...I(_)); else if (h.current && m.current != null) { const V = m.current, X = V.getBoundingClientRect(), Q = _.clientX - X.left + V.scrollLeft, fe = _.clientY - X.top + V.scrollTop; N('useClickDragging callback "onClick"', f.current?.onClick, Q, fe, _); } j.current = !1; } }, []); function I(_) { const F = m.current; if (F == null) return [0, 0, 0, 0, _]; const V = F.getBoundingClientRect(), X = _.clientX - V.left + F.scrollLeft, Q = _.clientY - V.top + F.scrollTop, fe = X - v.current.x, q = Q - v.current.y; return [fe, q, X, Q, _]; } function M(_, F) { switch (!0) { case F == null: return !0; case typeof F == "string": return _.matches(F); default: return _ === F; } } return l ? x : void 0; } const Za = [ "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all" ]; function ug(e, t, { Effect: n, draggedGhost: o, onDropped: r } = {}) { Ia("Data", e), rh("MIMEType", t), Ft("Effect", n, [...Za]), Oe('"draggedGhost" callback', o), Oe('"onDropped" callback', r); const a = U(e); a.current = e; const i = U(t); i.current = t; const s = U(); s.current = n; const c = U({}); c.current = { draggedGhost: o, onDropped: r }; const d = se((p) => { const l = p.dataTransfer; if (l == null) return; l.setData(i.current, a.current), s.current != null && (l.effectAllowed = s.current); const f = Ye('useDataDragSupport callback "draggedGhost"', c.current.draggedGhost, p) ?? null; f != null && (document.body.appendChild(f), l.setDragImage(f, f.offsetWidth / 2, f.offsetHeight / 2), requestAnimationFrame(() => f.remove())); }, []), u = se((p) => { const l = p.dataTransfer?.dropEffect ?? "none"; l !== "none" && N('useDataDragSupport callback "onDropped"', c.current.onDropped, l, p); }, []); return { draggable: !0, onDragStart: d, onDragEnd: u }; } function gc(e) { const { Name: t, DragDepth: n, setIsOver: o, accepts: r, CallbacksOf: a, processedDrop: i } = e; function s(p) { r(p) && (p.preventDefault(), N(t + ' callback "onDragOver"', a().onDragOver, p)); } function c(p) { r(p) && (p.preventDefault(), ++n.current === 1 && (o(!0), N(t + ' callback "onDragEnter"', a().onDragEnter, p))); } function d(p) { n.current > 0 && --n.current === 0 && (o(!1), N(t + ' callback "onDragLeave"', a().onDragLeave, p)); } function u(p) { const l = i(p); l != null && (p.preventDefault(), n.current = 0, o(!1), N(t + ' callback "onDrop"', a().onDrop, ...l, p)); } return { handleDragEnter: c, handleDragOver: s, handleDragLeave: d, handleDrop: u }; } function pg(e, { onDragEnter: t, onDragOver: n, onDragLeave: o, onDrop: r } = {}) { switch (!0) { case So(e): e = [e]; break; case _r(e): for (const h of e) So(h) || de( 'InvalidArgument: each entry in "MIMETypes" must be a non-empty string without line breaks' ); break; default: de( 'InvalidArgument: "MIMETypes" must be a MIME type string or a non-empty array of MIME type strings' ); } Oe('"onDragEnter" callback', t), Oe('"onDragOver" callback', n), Oe('"onDragLeave" callback', o), Oe('"onDrop" callback', r); const [a, i] = Ue(!1), s = U(0), c = U({}); c.current = { onDragEnter: t, onDragOver: n, onDragLeave: o, onDrop: r }; const d = e.join(","), { handleDragEnter: u, handleDragOver: p, handleDragLeave: l, handleDrop: f } = Qt(() => { function h(g) { return g == null ? !1 : [...g.types].some((b) => e.includes(b)); } return gc({ Name: "useDataDropSupport", DragDepth: s, setIsOver: i, accepts: (g) => h(g.dataTransfer), CallbacksOf: () => c.current, processedDrop: (g) => h(g.dataTransfer) ? [g.dataTransfer] : void 0 }); }, [d]); return { isOver: a, onDragEnter: u, onDragOver: p, onDragLeave: l, onDrop: f }; } const fg = ["move", "copy", "alias"]; function hg({ ViewRef: e, Container: t, onlyFrom: n, neverFrom: o, Threshold: r = 4, Data: a, allowedEffects: i, GrabCursor: s = "grab", GrabbedCursor: c = "grabbing", onClick: d, onDragStart: u, onDragContinuation: p, onDragFinish: l, onDragCancellation: f, onDrop: h }) { Ar("preact component reference", e), Xa(t), Qn("onlyFrom", n), Qn("neverFrom", o), Dr("drag threshold", r), Ht("allowedEffects", i, (ee) => ge(ee, fg), "list of drop effects", 1), fn('"GrabCursor" CSS cursor', s), fn('"GrabbedCursor" CSS cursor', c), Oe('"onClick" callback', d), Oe('"onDragStart" callback', u), Oe('"onDragContinuation" callback', p), Oe('"onDragFinish" callback', l), Oe('"onDragCancellation" callback', f), Oe('"onDrop" callback', h); const g = d != null, b = u != null && p != null && l != null && f != null, m = g || b, v = U(); v.current = { onClick: d, onDragStart: u, onDragContinuation: p, onDragFinish: l, onDragCancellation: f, onDrop: h }; const C = U(!1); C.current = g; const S = U(!1); S.current = b; const j = U(r); j.current = r; const x = U(a); x.current = a; const w = i ?? ["move"], T = U(w); T.current = w; const L = U(c); L.current = c; const { closestDropTarget: $ } = bt(Qa), I = U($); I.current = $; const M = U(), _ = U(), F = U(), V = U(!1), X = U(!1), Q = U(), fe = U(), q = U(); je(() => { e.current != null && (M.current = Ya(e.current, t)); }, [ e.current /* Container */ ]), je(() => { if (!(!b || e.current == null)) return e.current.style.cursor = s, () => { e.current != null && (e.current.style.cursor = ""); }; }, [e, b, s]), je(() => () => { window.removeEventListener("pointermove", P), window.removeEventListener("pointerup", pe), window.removeEventListener("pointercancel", Ce), V.current && (V.current = !1, Lo()); }, []); const J = se((ee) => { if (!(ee.target instanceof HTMLElement) || !Ja(ee) || !m || M.current == null || n != null && !ne(ee.target, n) || o != null && ne(ee.target, o)) return; window.addEventListener("pointermove", P), window.addEventListener("pointerup", pe), window.addEventListener("pointercancel", Ce), e.current.setPointerCapture?.(ee.pointerId); const oe = M.current, le = oe.getBoundingClientRect(), ve = ee.clientX - le.left + oe.scrollLeft, we = ee.clientY - le.top + oe.scrollTop; _.current = { x: ve, y: we }, F.current = ee, V.current = !0, X.current = !1, Q.current = void 0, fe.current = void 0, q.current = void 0; }, [e, m, n, o]), P = se((ee) => { if (!V.current || M.current == null) return; const [oe, le, ve, we] = qe(ee); if (!X.current) { if (Math.sqrt(oe * oe + le * le) < j.current) return; X.current = !0, S.current && v.current.onDragStart?.(0, 0, _.current.x, _.current.y, F.current); } if (S.current) { const De = ee.altKey && T.current.includes("copy") ? ["copy"] : T.current, Re = I.current(ee.clientX, ee.clientY), Ve = Re?.[0], xt = Re?.[1]; if (Ve !== Q.current) { Q.current != null && fe.current.onLeave?.(x.current); const xe = Ve != null ? xt.accepts(x.current, De) : !1; xe !== !1 ? (xt.onEnter?.(x.current, xe, ve, we), Q.current = Ve, fe.current = xt, q.current = xe) : (Q.current = void 0, fe.current = void 0, q.current = void 0); } else if (Q.current != null) { const xe = fe.current.accepts(x.current, De); xe !== !1 ? (q.current = xe, fe.current.onOver?.(x.current, xe, ve, we)) : (fe.current.onLeave?.(x.current), Q.current = void 0, fe.current = void 0, q.current = void 0); } hc( // shares the singleton of "useDragging" Q.current != null ? ht(q.current) : gt(ee.clientX, ee.clientY) ? L.current : "no-drop" ), v.current.onDragContinuation?.(oe, le, ve, we, ee); } }, []), pe = se((ee) => { We(ee, !1); }, []), Ce = se((ee) => { We(ee, !0); }, []), We = se((ee, oe) => { if (V.current) { if (V.current = !1, e.current?.hasPointerCapture?.(ee.pointerId) && e.current.releasePointerCapture(ee.pointerId), window.removeEventListener("pointermove", P), window.removeEventListener("pointerup", pe), window.removeEventListener("pointercancel", Ce), X.current && Lo(), oe) { X.current && S.current && (Q.current != null && (fe.current.onLeave?.(x.current), Q.current = void 0, fe.current = void 0, q.current = void 0), v.current.onDragCancellation?.(0, 0, _.current.x, _.current.y, ee)), X.current = !1; return; } if (X.current) { if (S.current) if (Q.current != null) { const le = Q.current, ve = fe.current, we = q.current, De = le.getBoundingClientRect(), Re = ee.clientX - De.left + le.scrollLeft, Ve = ee.clientY - De.top + le.scrollTop; Q.current = void 0, fe.current = void 0, q.current = void 0, ve.onDrop?.(x.current, we, Re, Ve), v.current.onDrop?.(0, 0, _.current.x, _.current.y, ee, le, we); } else v.current.onDragFinish?.apply(null, qe(ee)); } else if (C.current && M.current != null) { const le = M.current, ve = le.getBoundingClientRect(), we = ee.clientX - ve.left + le.scrollLeft, De = ee.clientY - ve.top + le.scrollTop; v.current.onClick?.(we, De, ee); } X.current = !1; } }, []); function qe(ee) { const oe = M.current; if (oe == null) return [0, 0, 0, 0, ee]; const le = oe.getBoundingClientRect(), ve = ee.clientX - le.left + oe.scrollLeft, we = ee.clientY - le.top + oe.scrollTop, De = ve - _.current.x, Re = we - _.current.y; return [De, Re, ve, we, ee]; } function ht(ee) { switch (ee) { case "copy": return "copy"; case "alias": return "alias"; case "move": return "move"; default: return L.current; } } function gt(ee, oe) { if (e.current == null) return !1; const le = e.current.getBoundingClientRect(); return ee >= le.left && ee <= le.right && oe >= le.top && oe <= le.bottom; } function ne(ee, oe) { switch (!0) { case oe == null: return !0; case typeof oe == "string": return ee.matches(oe); default: return ee === oe; } } return m ? J : void 0; } function gg({ ViewRef: e, accepts: t, onEnter: n, onOver: o, onLeave: r, onDrop: a }) { Ar("preact component reference", e), Zt("accepts", t), Oe('"onEnter" callback', n), Oe('"onOver" callback', o), Oe('"onLeave" callback', r), Oe('"onDrop" callback', a); const [i, s] = Ue(!1), c = U( { accepts: t, onEnter: n, onOver: o, onLeave: r, onDrop: a } ); c.current = { accepts: t, onEnter: n, onOver: o, onLeave: r, onDrop: a }; const { registerDropTarget: d } = bt(Qa); return je(() => { if (e.current != null) return d(e.current, { accepts: (u, p) => c.current.accepts(u, p), onEnter: (u, p, l, f) => { s(!0), N('usePointerDropSupport callback "onEnter"', c.current.onEnter, u, p, l, f); }, onOver: (u, p, l, f) => N('usePointerDropSupport callback "onOver"', c.current.onOver, u, p, l, f), onLeave: (u) => { s(!1), N('usePointerDropSupport callback "onLeave"', c.current.onLeave, u); }, onDrop: (u, p, l, f) => { s(!1), N('usePointerDropSupport callback "onDrop"', c.current.onDrop, u, p, l, f); } }); }, [e.current]), { isOver: i }; } const ia = /* @__PURE__ */ new WeakMap(); function mg(e, t) { return ia.set(e, t), () => ia.delete(e); } function bg(e, t) { let n = document.elementFromPoint(e, t); for (; n != null; ) { const o = ia.get(n); if (o != null) return [n, o]; n = n.parentElement; } } const Qa = /* @__PURE__ */ yn({ registerDropTarget: mg, closestDropTarget: bg }); function yg(e, { multiple: t, disabled: n, onDragEnter: o, onDragOver: r, onDragLeave: a, onDrop: i } = {}) { switch (e == null && (e = "*/*"), !0) { case Ee(e): e = e.trim().replace(/[,\s]+/g, " ").split(" "); break; case Ie(e, Ee): break; default: de( 'InvalidArgument: "accept" must be a file type string or a non-empty array of file type strings' ); } on('"multiple" flag', t), on('"disabled" flag', n), Oe('"onDragEnter" callback', o), Oe('"onDragOver" callback', r), Oe('"onDragLeave" callback', a), Oe('"onDrop" callback', i); const s = e.map( (v) => v.replace(/;.*$/, "").trim().toLowerCase() ).filter((v) => v !== ""); s.length === 0 && s.push("*/*"); const c = ( // also allows for "*" wildcards /^(\*\/\*|[a-z0-9]+([._+-][a-z0-9]+)*\/(\*|[a-z0-9]+([._+-][a-z0-9]+)*))$/ ); s.every( (v) => c.test(v) ) || de( "InvalidArgument: the given list of accepted file types is invalid" ); const [d, u] = Ue(!1), p = U(0), l = U({}); l.current = { multiple: t, disabled: n, onDragEnter: o, onDragOver: r, onDragLeave: a, onDrop: i }; const f = s.join(","), { handleDragEnter: h, handleDragOver: g, handleDragLeave: b, handleDrop: m } = Qt(() => { function v(S) { return s.some((j) => j === "*/*" ? !0 : j.endsWith("/*") ? S.startsWith(j.slice(0, -1)) : S === j); } function C(S) { if (S == null) return !1; const j = S.items; return j == null ? [...S.types].includes("Files") : Array.from(j).some( (x) => x.kind === "file" && v(x.type.toLowerCase()) ); } return gc({ Name: "useFileDropSupport", DragDepth: p, setIsOver: u, accepts: (S) => l.current.disabled != !0 && C(S.dataTransfer), CallbacksOf: () => l.current, processedDrop: (S) => { if (l.current.disabled == !0) return; const j = S.dataTransfer?.files; if (j == null) return; let x = Array.from(j).filter( (w) => v(w.type.toLowerCase()) ); return l.current.multiple != !0 && (x = x.slice(0, 1)), x.length === 0 ? void 0 : [x]; } }); }, [f]); return { isOver: d, onDragEnter: h, onDragOver: g, onDragLeave: b, onDrop: m }; } function vn(e, t) { const n = U(), o = U(void 0); let r = e ?? vt; return n.current != null && document.activeElement === n.current ? r = o.current : (t != null && (r = t(r)), o.current = r), { ViewRef: n, shownValue: o, ValueToShow: r }; } function Ot(e, t) { const n = U(e ?? t), o = U(e ?? t); return e != null && e !== n.current && (o.current = e, n.current = e), o; } function wn(e) { const { Name: t, actualDisabling: n, shownValue: o, onInput: r, onValueInput: a, onBlur: i, processedInput: s } = e, c = pt(), d = se((p) => { if (Ae(p), n == !0) return; N(t + ' callback "onInput"', r, p); let l; s == null ? (l = p.target.value, o.current = l === "" ? vt : l) : l = s(p), N(t + ' callback "onValueInput"', a, l, p); }, [n, r, a]), u = se((p) => { c(), N(t + ' callback "onBlur"', i, p); }, [i]); return { _onInput: d, _onBlur: u, rerender: c }; } function kn(e, t) { const n = Bt(); let o = "", r; if (e != null && e.length > 0) { r = n + "-Suggestions"; const a = t ?? ((i) => y``); o = y` ${e.map((i) => a(i))} `; } return { SuggestionId: r, SuggestionList: o }; } function mc(e) { const [t, n] = Ue({ Width: 0, Height: 0 }); return Ea(() => { const o = e.current; if (o == null) return; const r = new ResizeObserver(() => n( (a) => { const i = o.clientWidth, s = o.clientHeight; return a.Width === i && a.Height === s ? a : { Width: i, Height: s }; } )); return r.observe(o), () => r.disconnect(); }, []), t; } function XC(e) { let t = Math.round(Math.random() * 1e4).toString(); return t += "0000".slice(t.length), e = (e || "This operation can not be undone.") + ` Please, enter the following number if you want to proceed: ` + t + ` Otherwise, the operation will be cancelled`, window.prompt(e, "") === t ? !0 : (window.alert("Operation will be cancelled"), !1); } const Mo = /* @__PURE__ */ Object.create(null); function Z(e, t) { let n = !1; return () => { n || (n = !0, Pa(e, t)); }; } let $s = !1; function xg() { if ($s || typeof document > "u") return; $s = !0; let e = document.getElementById("JCL-Stylesheet"); e == null && (e = document.createElement("style"), e.id = "JCL-Stylesheet", e.textContent = ` /******************************************************************************* * * * JavaScript Code Library (JCL) * * * *******************************************************************************/ :not(:defined) { visibility:hidden } /**** some basic settings ****/ .jcl-component { display:block; position:relative; box-sizing:border-box; } /**** OverlayView ****/ .jcl-overlay-view { box-sizing:border-box; display:block; position:fixed; background:white; color:black; box-shadow:0px 0px 5px 0px black; z-index:1000000; } .jcl-overlay-view.in-dialog { z-index:3000000; } /**** Underlay ****/ .jcl-underlay { display:block; position:fixed; left:0px; top:0px; right:auto; bottom:auto; width:100%; height:100%; z-index:1000000; pointer-events:auto; } .jcl-underlay.modal { background-image:repeating-linear-gradient(-45deg, rgba(222,222,222, 1) 0px, rgba(222,222,222, 1) 4px, rgba(0,0,0, 0) 4px, rgba(0,0,0, 0) 8px ); background-size:11.31px 11.31px; opacity:0.4; } .jcl-underlay.in-dialog.modal { opacity:0.1; } .jcl-underlay.in-dialog { z-index:3000000; } /**** DialogView ****/ .jcl-dialog-view { box-sizing:border-box; display:flex; flex-flow:column nowrap; align-items:stretch; position:fixed; overflow:hidden; border:solid 1px #000000; border-radius:4px; background:white; color:black; box-shadow:0px 0px 10px 0px rgba(0,0,0,0.5); z-index:2000000; pointer-events:auto; } .jcl-dialog-view * { box-sizing:border-box; } /**** DialogView Controls ****/ .jcl-dialog-view > .titlebar { display:flex; flex-flow:row nowrap; align-items:center; flex:0 0 auto; position:relative; left:0px; top:0px; right:0px; height:30px; overflow:hidden; background:#EEEEEE; border:none; border-bottom:solid 1px gray; border-radius:3px 3px 0px 0px; user-select:none; pointer-events:auto; -webkit-touch-callout:none; -ms-touch-action:none; touch-action:none; } .jcl-dialog-view > .titlebar > .title { display:inline-block; position:relative; flex:1 0 auto; margin-left:6px; margin-top:3px; margin-right:10px; width:auto; height:24px; border:none; font-weight:bold; color:black; line-height:24px; user-select:none; } .jcl-dialog-view.draggable > .titlebar > .title { cursor:grab; } .jcl-dialog-view > .titlebar > .close-button { display:inline-block; position:relative; margin-top:3px; margin-right:4px; width:24px; height:24px; border:none; background-color:currentColor; ${yt} ${Sh} cursor:pointer; user-select:none; pointer-events:auto; } .jcl-dialog-view > .titlebar > .close-button:focus-visible { outline:none; border-radius:4px; box-shadow:0px 0px 0px 3px color-mix( in srgb, var(--jcl-ring-color,#0075ff) 20%, transparent ); } .jcl-dialog-view > .content-pane { display:inline-block; position:relative; flex:1 1 auto; left:0px; top:0px; width:auto; height:auto; overflow:auto; border:none; border-radius:0px 0px 3px 3px; } .jcl-dialog-view.resizable > .content-pane { border-radius:0px; } .jcl-dialog-view > .resizer { display:flex; flex-flow:row nowrap; align-items:center; flex:0 0 auto; position:relative; left:0px; top:0px; width:auto; height:10px; border:none; border-top:solid 1px gray; border-radius:0px 0px 3px 3px; } .jcl-dialog-view > .resizer > .left-resizer { display:inline-block; position:relative; left:0px; bottom:0px; width:20px; height:10px; border:none; border-right:solid 1px gray; border-radius:0px 0px 0px 3px; cursor:nesw-resize; pointer-events:auto; -webkit-touch-callout:none; -ms-touch-action:none; touch-action:none; } .jcl-dialog-view > .resizer > .middle-resizer { display:inline-block; flex:1 0 auto; position:relative; left:0px; top:0px; width:auto; height:10px; border:none; border-radius:0px; cursor:ns-resize; pointer-events:auto; -webkit-touch-callout:none; -ms-touch-action:none; touch-action:none; } .jcl-dialog-view > .resizer > .right-resizer { display:inline-block; position:relative; left:0px; top:0px; width:20px; height:10px; border:none; border-left:solid 1px gray; border-radius:0px 0px 3px 0px; cursor:nwse-resize; pointer-events:auto; -webkit-touch-callout:none; -ms-touch-action:none; touch-action:none; } /**** ModalLayer ****/ .jcl-modal-layer { display:block; position:fixed; left:0px; top:0px; right:auto; bottom:auto; width:100%; height:100%; background-image:repeating-linear-gradient(-45deg, rgba(222,222,222, 1) 0px, rgba(222,222,222, 1) 4px, rgba(0,0,0, 0) 4px, rgba(0,0,0, 0) 8px ); background-size:11.31px 11.31px; opacity:0.4; z-index:1999999; pointer-events:auto; } /**** some common settings ****/ :is(:disabled, .disabled, [disabled]):not( :is(:disabled, .disabled, [disabled]) * ) { opacity:0.4 } .readonly { background:none } .pointer-unaware { pointer-events:none } /**** some special settings ****/ .jcl-component.with-outline { outline:dotted 1px blue; outline-offset:2px; } `.trim(), document.head.prepend(e)), Object.keys(Mo).forEach((t) => { Pa(t, Mo[t], !0); }); } function Pa(e, t, n = !1) { if (nc("stylesheet name", e), ot("stylesheet", t), $a("mode flag", n), typeof document > "u") return; const o = "Stylesheet-for-" + Xt(e); let r = document.head.querySelector('style[id="' + o + '"]'); if (r == null) { r = document.createElement("style"), r.id = o, r.textContent = t; const a = document.head.querySelectorAll( 'style[id^="Stylesheet-for-"]' ), i = a.length > 0 ? a[a.length - 1] : document.getElementById("JCL-Stylesheet"); i == null ? document.head.prepend(r) : i.after(r), Mo[e] = t; } else n ? (r.textContent = t, Mo[e] = t) : console.warn('multiple definitions for stylesheet "' + e + '"'); } function vg(e) { if (nc("stylesheet name", e), typeof document > "u") return; const t = "Stylesheet-for-" + Xt(e); let n = document.head.querySelector('style[id="' + t + '"]'); n?.remove(), delete Mo[e]; } function gn(e) { return H(() => { wg(), e = G(e); let t = z( e.Error, (r) => r instanceof Error || mn(r) ), n = R(e.ErrorResetter); switch (!0) { case t instanceof Error: break; case mn(t): if (/^[^\n]+\n\n[^\n]+/.test(t)) { const r = t.replace(/\n\n.*$/, ""), a = t.replace(/^[^\n]+\n\n/, ""); t = new Error(a), t.name = r; } else t = new Error(t), t.name = "Unexpected Failure"; break; default: t = new Error("" + t), t.name = "Unexpected Failure"; } return y`
{ console.warn(t), window.alert(kg(t)); }}/>`; }); } const wg = /* @__PURE__ */ Z("jcl-error-indicator", ` .jcl-error-indicator { display:inline-block; position:relative; width:24px; height:24px; } .jcl-error-indicator::after { content:''; display:block; position:absolute; overflow:hidden; left:0px; top:0px; width:24px; height:24px; background:url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg width='24px' height='24px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 17.0001H12.01M12 10.0001V14.0001M6.41209 21.0001H17.588C19.3696 21.0001 20.2604 21.0001 20.783 20.6254C21.2389 20.2985 21.5365 19.7951 21.6033 19.238C21.6798 18.5996 21.2505 17.819 20.3918 16.2579L14.8039 6.09805C13.8897 4.4359 13.4326 3.60482 12.8286 3.32987C12.3022 3.09024 11.6978 3.09024 11.1714 3.32987C10.5674 3.60482 10.1103 4.4359 9.19614 6.09805L3.6082 16.2579C2.74959 17.819 2.32028 18.5996 2.39677 19.238C2.46351 19.7951 2.76116 20.2985 3.21709 20.6254C3.7396 21.0001 4.63043 21.0001 6.41209 21.0001Z' stroke='orange' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='white'/%3E%3C/svg%3E"); pointer-events:auto; } `); function kg(e) { let t = e.name, n = e.message || "(unidentified error)", o = e.stack ?? ""; const r = t.replace(/([a-z])([A-Z])/g, "$1 $2"), a = n.charAt(0).toUpperCase() + n.slice(1); return o === "" ? `${r} ${a}` : `${r} ${a} ${o}`; } function Cg(e) { return { current: e }; } let js = !1; function H(e) { js || (js = !0, xg(), Xf()), Zt("rendering function", e); const [t, n] = Ba(); if (t != null) { const o = e.name ?? ""; return o.trim() === "" ? console.warn("rendering error within preact component: " + t) : console.warn( "rendering error within " + Lt(o) + ": " + t ), y`<${gn} Error=${t} ErrorResetter=${n}/>`; } try { return e(); } catch (o) { const r = e.name ?? ""; return r.trim() === "" ? console.warn("error while rendering a preact component: " + o) : console.warn( "error while rendering component " + Lt(r) + ": " + o ), y`<${gn} Error=${o} ErrorResetter=${n}/>`; } } function $g(e) { return H(() => { const t = Fr(), n = Ho(t), { Theme: o, SwatchSet: r, Locale: a, Direction: i } = n, s = Wo(o, r); return y`
<${$t.Provider} value=${n}> ${e.children} `; }); } function ei(e) { return e = { ...e }, Object.keys(e).forEach((t) => { e[t] === void 0 && delete e[t]; }), e; } function ti(e, t, n) { Object.assign(e, n), t != null && (t.current == null && (t.current = {}), Object.assign(t.current, n)); } function ni(e) { return () => { de("MissingArgument:function not in " + e); }; } function oi(e) { const t = U([]), n = pt(); function o(s) { Ln(e + " name", s); const c = Xt(s), d = t.current; if (d.length === 0) return; const u = d.findIndex( (p) => p[Mn] === c ); u < 0 || (t.current = d.filter( (p, l) => l !== u ), n()); } function r() { t.current.length !== 0 && (t.current = [], n()); } function a(s) { Ln(e + " name", s); const c = Xt(s); return t.current.findIndex( (d) => d[Mn] === c ) >= 0; } const i = t.current.map( (s) => s.Name ); return { ListRef: t, rerender: n, closeEntity: o, closeAllEntities: r, EntityIsOpen: a, openEntities: i }; } function ri(e, t, n) { Me(e) || de( "InvalidArgument: the given " + t + " descriptor is no plain JavaScript object" ); const o = e.Name == null ? t + " descriptor" : "descriptor for " + t + " " + Lt(e.Name); try { n(e); } catch (r) { throw (r.name === "MissingArgument" || r.name === "InvalidArgument") && (r.message += " in " + o), r; } } function bc(e, t, n, o, r) { return se((a) => { if (a.key === "Escape") { a.stopPropagation(), t.isModal || n(t.Name); return; } if (t.isModal && a.key === "Tab") { const i = e.current; if (i == null) return; const s = Array.from( i.querySelectorAll(ai) ).filter((p) => p.tabIndex >= 0); if (s.length === 0) { a.preventDefault(); return; } const c = s[0], d = s[s.length - 1], u = o && document.activeElement === i; switch (!0) { case (a.shiftKey && (document.activeElement === c || u)): a.preventDefault(), d.focus(); break; case (!a.shiftKey && document.activeElement === d): a.preventDefault(), c.focus(); break; } } }, r); } function yc(e, t) { je(() => { const n = e.current; if (n != null) return t.forEach((o) => { n.addEventListener(o, Ae); }), () => { t.forEach((o) => { n.removeEventListener(o, Ae); }); }; }, []); } let Is = !1; function xc() { if (Is) return; Is = !0; const e = { en: "Close", de: "Schließen", fr: "Fermer", es: "Cerrar", it: "Chiudi", pt: "Fechar" }; Object.keys(e).forEach((t) => { kr(t, { "jcl.overlay.close": e[t], "jcl.dialog.close": e[t] }); }); } function jg(e) { return H(() => { xc(), e = G(e); const t = D(e.Class) ?? "", n = z(e.APIRef, xn), o = e.children, r = U(), { // s. "shared Base Helpers" for these commons ListRef: a, rerender: i, closeEntity: s, closeAllEntities: c, EntityIsOpen: d, openEntities: u } = oi("overlay"); function p(m) { It("overlay descriptor", m), m = ei(m), f(m); let { Name: v, isModal: C, Renderer: S, onOpen: j, onClose: x, OffsetX: w, OffsetY: T, Width: L, Height: $, minWidth: I, minHeight: M, maxWidth: _, maxHeight: F, Role: V, Label: X } = m; const Q = Xt(v); d(v) && de( "OverlayAlreadyOpen: there is already an overlay called " + Lt(v) ), a.current.push({ Name: v, [Mn]: Q, isModal: C ?? !1, Renderer: S, onOpen: j, onClose: x, OffsetX: w ?? 0, OffsetY: T ?? 0, Width: L, Height: $, minWidth: I ?? 0, minHeight: M ?? 0, maxWidth: _, maxHeight: F, Role: V, Label: X }), i(); } function l(m, v) { It("overlay descriptor", m), v instanceof PointerEvent || de( 'InvalidArgument: "Event" must be a PointerEvent' ); const C = r.current; if (C != null) { const S = C.getBoundingClientRect(), j = v.clientX - S.left + C.scrollLeft, x = v.clientY - S.top + C.scrollTop; m = { ...m, OffsetX: j, OffsetY: x }; } p(m); } function f(m) { ri(m, "overlay", () => { Ln("Name", m.Name), on("isModal", m.isModal), Zt("Renderer", m.Renderer), Oe("onOpen", m.onOpen), Oe("onClose", m.onClose), vr("OffsetX", m.OffsetX), vr("OffsetY", m.OffsetY), Dt("Width", m.Width), Dt("Height", m.Height), Dt("minWidth", m.minWidth), Dt("minHeight", m.minHeight), Dt("maxWidth", m.maxWidth), Dt("maxHeight", m.maxHeight), Lr("Role", m.Role), fn("Label", m.Label); }); } const h = { openOverlay: p, openOverlayAtPointer: l, closeOverlay: s, closeAllOverlays: c, openOverlays: u, OverlayIsOpen: d }, g = so(); ti(g, n, h); const b = se((m) => { if (m.key !== "Escape") return; const v = a.current; for (let C = v.length - 1; C >= 0; C--) if (!v[C].isModal) { Ae(m), s(v[C].Name); break; } }, []); return y`<${Or.Provider} value=${g}>
${o} <${Ig} OverlayList=${a.current} BaseRef=${r}/> `; }); } function Ig(e) { return H(() => { e = G(e); const t = z(e.OverlayList, (a) => Ie(a, Me)), n = z(e.BaseRef, (a) => xn(a)) ?? Te("BaseRef"); if (t == null || t.length === 0) return; const { closeOverlay: o } = so(), r = t.length - 1; return y` ${t.map((a, i) => i === r ? y` <${Sg} key=${"underlay:" + a.Name} Overlay=${a} closeOverlay=${o} /> <${Ss} key=${"view:" + a.Name} Overlay=${a} BaseRef=${n} /> ` : y` <${Ss} key=${"view:" + a.Name} Overlay=${a} BaseRef=${n} /> `)} `; }); } const vc = [ "click", "dblclick", /*'mousedown',*/ "mouseup", "mousemove", "mouseover", "mouseout", "mouseenter", "mouseleave", /*'touchstart',*/ "touchend", "touchmove", "touchcancel", /*'pointerdown',*/ "pointerup", "pointermove", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointercancel", "keydown", "keyup", "keypress", "wheel", "contextmenu", "focus", "blur" ]; function Sg(e) { return H(() => { e = G(e); const t = z(e.Overlay, Me) ?? Te("Overlay"), n = R(e.closeOverlay) ?? Te("closeOverlay"), o = U(); yc(o, vc); const r = se((s) => { Ae(s), t.isModal || n(t.Name); }, [t.isModal, t.Name, n]), i = lo().DialogName != null; return to(y`