intl-tel-input
Version:
A JavaScript plugin for entering and validating international telephone numbers
2,062 lines • 133 kB
JavaScript
var Qs = Object.defineProperty;
var Jn = (e) => {
throw TypeError(e);
};
var Zs = (e, t, n) => t in e ? Qs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var At = (e, t, n) => Zs(e, typeof t != "symbol" ? t + "" : t, n), ln = (e, t, n) => t.has(e) || Jn("Cannot " + n);
var r = (e, t, n) => (ln(e, t, "read from private field"), n ? n.call(e) : t.get(e)), I = (e, t, n) => t.has(e) ? Jn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), C = (e, t, n, i) => (ln(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), h = (e, t, n) => (ln(e, t, "access private method"), n);
import { onMount as Js, onDestroy as tr } from "svelte";
const er = "5";
var Ii;
typeof window < "u" && ((Ii = window.__svelte ?? (window.__svelte = {})).v ?? (Ii.v = /* @__PURE__ */ new Set())).add(er);
const nr = 1, ir = 4, sr = 8, rr = 16, lr = 2, j = Symbol(), or = "http://www.w3.org/1999/xhtml", ar = "@attach", dn = !1;
var wi = Array.isArray, ur = Array.prototype.indexOf, cr = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, fr = Object.getOwnPropertyDescriptors, hr = Object.prototype, dr = Array.prototype, Ni = Object.getPrototypeOf;
function pr(e) {
for (var t = 0; t < e.length; t++)
e[t]();
}
function Ai() {
var e, t, n = new Promise((i, s) => {
e = i, t = s;
});
return { promise: n, resolve: e, reject: t };
}
const $ = 2, Xe = 4, Bn = 8, Wn = 1 << 24, Jt = 16, te = 32, me = 64, Li = 128, ct = 512, q = 1024, lt = 2048, xt = 4096, ae = 8192, Nt = 16384, Fn = 32768, ti = 65536, ei = 1 << 17, Di = 1 << 18, rn = 1 << 19, yr = 1 << 20, Qt = 32768, pn = 1 << 21, Vn = 1 << 22, kt = 1 << 23, Kt = Symbol("$state"), vr = Symbol("legacy props"), Cr = Symbol(""), ie = new class extends Error {
constructor() {
super(...arguments);
At(this, "name", "StaleReactionError");
At(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
}
}();
function _r() {
throw new Error("https://svelte.dev/e/async_derived_orphan");
}
function gr(e) {
throw new Error("https://svelte.dev/e/effect_in_teardown");
}
function mr() {
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
}
function Er(e) {
throw new Error("https://svelte.dev/e/effect_orphan");
}
function br() {
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
}
function Ir(e) {
throw new Error("https://svelte.dev/e/props_invalid_value");
}
function wr() {
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
}
function Nr() {
throw new Error("https://svelte.dev/e/state_prototype_fixed");
}
function Ar() {
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
}
function Lr() {
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
}
function Ti(e) {
return e === this.v;
}
function Dr(e, t) {
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
}
function Tr(e) {
return !Dr(e, this.v);
}
let Or = !1, Et = null;
function Qe(e) {
Et = e;
}
function Sr(e, t = !1, n) {
Et = {
p: Et,
i: !1,
c: null,
e: null,
s: e,
x: null,
l: null
};
}
function Pr(e) {
var t = (
/** @type {ComponentContext} */
Et
), n = t.e;
if (n !== null) {
t.e = null;
for (var i of n)
Vi(i);
}
return e !== void 0 && (t.x = e), t.i = !0, Et = t.p, e ?? /** @type {T} */
{};
}
function Oi() {
return !0;
}
let se = [];
function Rr() {
var e = se;
se = [], pr(e);
}
function Oe(e) {
if (se.length === 0) {
var t = se;
queueMicrotask(() => {
t === se && Rr();
});
}
se.push(e);
}
function kr(e) {
var t = H;
if (t === null)
return P.f |= kt, e;
if ((t.f & Fn) === 0) {
if ((t.f & Li) === 0)
throw e;
t.b.error(e);
} else
Ze(e, t);
}
function Ze(e, t) {
for (; t !== null; ) {
if ((t.f & Li) !== 0)
try {
t.b.error(e);
return;
} catch (n) {
e = n;
}
t = t.parent;
}
throw e;
}
const Mr = -7169;
function Q(e, t) {
e.f = e.f & Mr | t;
}
function jn(e) {
(e.f & ct) !== 0 || e.deps === null ? Q(e, q) : Q(e, xt);
}
function Si(e) {
if (e !== null)
for (const t of e)
(t.f & $) === 0 || (t.f & Qt) === 0 || (t.f ^= Qt, Si(
/** @type {Derived} */
t.deps
));
}
function Ur(e, t, n) {
(e.f & lt) !== 0 ? t.add(e) : (e.f & xt) !== 0 && n.add(e), Si(e.deps), Q(e, q);
}
const Ve = /* @__PURE__ */ new Set();
let B = null, G = null, pt = [], Gn = null, yn = !1;
var ue, ce, Vt, fe, Re, he, de, pe, It, vn, Cn, Pi;
const Xn = class Xn {
constructor() {
I(this, It);
At(this, "committed", !1);
/**
* The current values of any sources that are updated in this batch
* They keys of this map are identical to `this.#previous`
* @type {Map<Source, any>}
*/
At(this, "current", /* @__PURE__ */ new Map());
/**
* The values of any sources that are updated in this batch _before_ those updates took place.
* They keys of this map are identical to `this.#current`
* @type {Map<Source, any>}
*/
At(this, "previous", /* @__PURE__ */ new Map());
/**
* When the batch is committed (and the DOM is updated), we need to remove old branches
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
* @type {Set<() => void>}
*/
I(this, ue, /* @__PURE__ */ new Set());
/**
* If a fork is discarded, we need to destroy any effects that are no longer needed
* @type {Set<(batch: Batch) => void>}
*/
I(this, ce, /* @__PURE__ */ new Set());
/**
* The number of async effects that are currently in flight
*/
I(this, Vt, 0);
/**
* The number of async effects that are currently in flight, _not_ inside a pending boundary
*/
I(this, fe, 0);
/**
* A deferred that resolves when the batch is committed, used with `settled()`
* TODO replace with Promise.withResolvers once supported widely enough
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
*/
I(this, Re, null);
/**
* Deferred effects (which run after async work has completed) that are DIRTY
* @type {Set<Effect>}
*/
I(this, he, /* @__PURE__ */ new Set());
/**
* Deferred effects that are MAYBE_DIRTY
* @type {Set<Effect>}
*/
I(this, de, /* @__PURE__ */ new Set());
/**
* A set of branches that still exist, but will be destroyed when this batch
* is committed — we skip over these during `process`
* @type {Set<Effect>}
*/
At(this, "skipped_effects", /* @__PURE__ */ new Set());
At(this, "is_fork", !1);
I(this, pe, !1);
}
is_deferred() {
return this.is_fork || r(this, fe) > 0;
}
/**
*
* @param {Effect[]} root_effects
*/
process(t) {
var s;
pt = [], this.apply();
var n = [], i = [];
for (const l of t)
h(this, It, vn).call(this, l, n, i);
if (this.is_deferred())
h(this, It, Cn).call(this, i), h(this, It, Cn).call(this, n);
else {
for (const l of r(this, ue)) l();
r(this, ue).clear(), r(this, Vt) === 0 && h(this, It, Pi).call(this), B = null, ni(i), ni(n), (s = r(this, Re)) == null || s.resolve();
}
G = null;
}
/**
* Associate a change to a given source with the current
* batch, noting its previous and current values
* @param {Source} source
* @param {any} value
*/
capture(t, n) {
n !== j && !this.previous.has(t) && this.previous.set(t, n), (t.f & kt) === 0 && (this.current.set(t, t.v), G == null || G.set(t, t.v));
}
activate() {
B = this, this.apply();
}
deactivate() {
B === this && (B = null, G = null);
}
flush() {
if (this.activate(), pt.length > 0) {
if (Hr(), B !== null && B !== this)
return;
} else r(this, Vt) === 0 && this.process([]);
this.deactivate();
}
discard() {
for (const t of r(this, ce)) t(this);
r(this, ce).clear();
}
/**
*
* @param {boolean} blocking
*/
increment(t) {
C(this, Vt, r(this, Vt) + 1), t && C(this, fe, r(this, fe) + 1);
}
/**
*
* @param {boolean} blocking
*/
decrement(t) {
C(this, Vt, r(this, Vt) - 1), t && C(this, fe, r(this, fe) - 1), !r(this, pe) && (C(this, pe, !0), Oe(() => {
C(this, pe, !1), this.is_deferred() ? pt.length > 0 && this.flush() : this.revive();
}));
}
revive() {
for (const t of r(this, he))
r(this, de).delete(t), Q(t, lt), ge(t);
for (const t of r(this, de))
Q(t, xt), ge(t);
this.flush();
}
/** @param {() => void} fn */
oncommit(t) {
r(this, ue).add(t);
}
/** @param {(batch: Batch) => void} fn */
ondiscard(t) {
r(this, ce).add(t);
}
settled() {
return (r(this, Re) ?? C(this, Re, Ai())).promise;
}
static ensure() {
if (B === null) {
const t = B = new Xn();
Ve.add(B), Oe(() => {
B === t && t.flush();
});
}
return B;
}
apply() {
}
};
ue = new WeakMap(), ce = new WeakMap(), Vt = new WeakMap(), fe = new WeakMap(), Re = new WeakMap(), he = new WeakMap(), de = new WeakMap(), pe = new WeakMap(), It = new WeakSet(), /**
* Traverse the effect tree, executing effects or stashing
* them for later execution as appropriate
* @param {Effect} root
* @param {Effect[]} effects
* @param {Effect[]} render_effects
*/
vn = function(t, n, i) {
t.f ^= q;
for (var s = t.first, l = null; s !== null; ) {
var o = s.f, u = (o & (te | me)) !== 0, a = u && (o & q) !== 0, f = a || (o & ae) !== 0 || this.skipped_effects.has(s);
if (!f && s.fn !== null) {
u ? s.f ^= q : l !== null && (o & (Xe | Bn | Wn)) !== 0 ? l.b.defer_effect(s) : (o & Xe) !== 0 ? n.push(s) : Fe(s) && ((o & Jt) !== 0 && r(this, he).add(s), Se(s));
var d = s.first;
if (d !== null) {
s = d;
continue;
}
}
var p = s.parent;
for (s = s.next; s === null && p !== null; )
p === l && (l = null), s = p.next, p = p.parent;
}
}, /**
* @param {Effect[]} effects
*/
Cn = function(t) {
for (var n = 0; n < t.length; n += 1)
Ur(t[n], r(this, he), r(this, de));
}, Pi = function() {
var s;
if (Ve.size > 1) {
this.previous.clear();
var t = G, n = !0;
for (const l of Ve) {
if (l === this) {
n = !1;
continue;
}
const o = [];
for (const [a, f] of this.current) {
if (l.current.has(a))
if (n && f !== l.current.get(a))
l.current.set(a, f);
else
continue;
o.push(a);
}
if (o.length === 0)
continue;
const u = [...l.current.keys()].filter((a) => !this.current.has(a));
if (u.length > 0) {
var i = pt;
pt = [];
const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
for (const d of o)
Ri(d, u, a, f);
if (pt.length > 0) {
B = l, l.apply();
for (const d of pt)
h(s = l, It, vn).call(s, d, [], []);
l.deactivate();
}
pt = i;
}
}
B = null, G = t;
}
this.committed = !0, Ve.delete(this);
};
let Je = Xn;
function Hr() {
yn = !0;
var e = null;
try {
for (var t = 0; pt.length > 0; ) {
var n = Je.ensure();
if (t++ > 1e3) {
var i, s;
xr();
}
n.process(pt), Mt.clear();
}
} finally {
yn = !1, Gn = null;
}
}
function xr() {
try {
br();
} catch (e) {
Ze(e, Gn);
}
}
let dt = null;
function ni(e) {
var t = e.length;
if (t !== 0) {
for (var n = 0; n < t; ) {
var i = e[n++];
if ((i.f & (Nt | ae)) === 0 && Fe(i) && (dt = /* @__PURE__ */ new Set(), Se(i), i.deps === null && i.first === null && i.nodes === null && (i.teardown === null && i.ac === null ? zi(i) : i.fn = null), (dt == null ? void 0 : dt.size) > 0)) {
Mt.clear();
for (const s of dt) {
if ((s.f & (Nt | ae)) !== 0) continue;
const l = [s];
let o = s.parent;
for (; o !== null; )
dt.has(o) && (dt.delete(o), l.push(o)), o = o.parent;
for (let u = l.length - 1; u >= 0; u--) {
const a = l[u];
(a.f & (Nt | ae)) === 0 && Se(a);
}
}
dt.clear();
}
}
dt = null;
}
}
function Ri(e, t, n, i) {
if (!n.has(e) && (n.add(e), e.reactions !== null))
for (const s of e.reactions) {
const l = s.f;
(l & $) !== 0 ? Ri(
/** @type {Derived} */
s,
t,
n,
i
) : (l & (Vn | Jt)) !== 0 && (l & lt) === 0 && ki(s, t, i) && (Q(s, lt), ge(
/** @type {Effect} */
s
));
}
}
function ki(e, t, n) {
const i = n.get(e);
if (i !== void 0) return i;
if (e.deps !== null)
for (const s of e.deps) {
if (t.includes(s))
return !0;
if ((s.f & $) !== 0 && ki(
/** @type {Derived} */
s,
t,
n
))
return n.set(
/** @type {Derived} */
s,
!0
), !0;
}
return n.set(e, !1), !1;
}
function ge(e) {
for (var t = Gn = e; t.parent !== null; ) {
t = t.parent;
var n = t.f;
if (yn && t === H && (n & Jt) !== 0 && (n & Di) === 0)
return;
if ((n & (me | te)) !== 0) {
if ((n & q) === 0) return;
t.f ^= q;
}
}
pt.push(t);
}
function Br(e, t, n, i) {
const s = $n;
var l = e.filter((y) => !y.settled);
if (n.length === 0 && l.length === 0) {
i(t.map(s));
return;
}
var o = B, u = (
/** @type {Effect} */
H
), a = Wr(), f = l.length === 1 ? l[0].promise : l.length > 1 ? Promise.all(l.map((y) => y.promise)) : null;
function d(y) {
a();
try {
i(y);
} catch (_) {
(u.f & Nt) === 0 && Ze(_, u);
}
o == null || o.deactivate(), _n();
}
if (n.length === 0) {
f.then(() => d(t.map(s)));
return;
}
function p() {
a(), Promise.all(n.map((y) => /* @__PURE__ */ Fr(y))).then((y) => d([...t.map(s), ...y])).catch((y) => Ze(y, u));
}
f ? f.then(p) : p();
}
function Wr() {
var e = H, t = P, n = Et, i = B;
return function(l = !0) {
Ht(e), bt(t), Qe(n), l && (i == null || i.activate());
};
}
function _n() {
Ht(null), bt(null), Qe(null);
}
// @__NO_SIDE_EFFECTS__
function $n(e) {
var t = $ | lt, n = P !== null && (P.f & $) !== 0 ? (
/** @type {Derived} */
P
) : null;
return H !== null && (H.f |= rn), {
ctx: Et,
deps: null,
effects: null,
equals: Ti,
f: t,
fn: e,
reactions: null,
rv: 0,
v: (
/** @type {V} */
j
),
wv: 0,
parent: n ?? H,
ac: null
};
}
// @__NO_SIDE_EFFECTS__
function Fr(e, t, n) {
let i = (
/** @type {Effect | null} */
H
);
i === null && _r();
var s = (
/** @type {Boundary} */
i.b
), l = (
/** @type {Promise<V>} */
/** @type {unknown} */
void 0
), o = xi(
/** @type {V} */
j
), u = !P, a = /* @__PURE__ */ new Map();
return el(() => {
var _;
var f = Ai();
l = f.promise;
try {
Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
d === B && d.committed && d.deactivate(), _n();
});
} catch (g) {
f.reject(g), _n();
}
var d = (
/** @type {Batch} */
B
);
if (u) {
var p = s.is_rendered();
s.update_pending_count(1), d.increment(p), (_ = a.get(d)) == null || _.reject(ie), a.delete(d), a.set(d, f);
}
const y = (g, N = void 0) => {
if (d.activate(), N)
N !== ie && (o.f |= kt, mn(o, N));
else {
(o.f & kt) !== 0 && (o.f ^= kt), mn(o, g);
for (const [T, b] of a) {
if (a.delete(T), T === d) break;
b.reject(ie);
}
}
u && (s.update_pending_count(-1), d.decrement(p));
};
f.promise.then(y, (g) => y(null, g || "unknown"));
}), Fi(() => {
for (const f of a.values())
f.reject(ie);
}), new Promise((f) => {
function d(p) {
function y() {
p === l ? f(o) : d(l);
}
p.then(y, y);
}
d(l);
});
}
// @__NO_SIDE_EFFECTS__
function Vr(e) {
const t = /* @__PURE__ */ $n(e);
return t.equals = Tr, t;
}
function Mi(e) {
var t = e.effects;
if (t !== null) {
e.effects = null;
for (var n = 0; n < t.length; n += 1)
Zt(
/** @type {Effect} */
t[n]
);
}
}
function jr(e) {
for (var t = e.parent; t !== null; ) {
if ((t.f & $) === 0)
return (t.f & Nt) === 0 ? (
/** @type {Effect} */
t
) : null;
t = t.parent;
}
return null;
}
function Yn(e) {
var t, n = H;
Ht(jr(e));
try {
e.f &= ~Qt, Mi(e), t = Qi(e);
} finally {
Ht(n);
}
return t;
}
function Ui(e) {
var t = Yn(e);
if (!e.equals(t) && (e.wv = qi(), (!(B != null && B.is_fork) || e.deps === null) && (e.v = t, e.deps === null))) {
Q(e, q);
return;
}
Ut || (G !== null ? (Wi() || B != null && B.is_fork) && G.set(e, t) : jn(e));
}
let gn = /* @__PURE__ */ new Set();
const Mt = /* @__PURE__ */ new Map();
let Hi = !1;
function xi(e, t) {
var n = {
f: 0,
// TODO ideally we could skip this altogether, but it causes type errors
v: e,
reactions: null,
equals: Ti,
rv: 0,
wv: 0
};
return n;
}
// @__NO_SIDE_EFFECTS__
function K(e, t) {
const n = xi(e);
return rl(n), n;
}
function V(e, t, n = !1) {
P !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
// to ensure we error if state is set inside an inspect effect
(!_t || (P.f & ei) !== 0) && Oi() && (P.f & ($ | Jt | Vn | ei)) !== 0 && !(X != null && X.includes(e)) && Ar();
let i = n ? re(t) : t;
return mn(e, i);
}
function mn(e, t) {
if (!e.equals(t)) {
var n = e.v;
Ut ? Mt.set(e, t) : Mt.set(e, n), e.v = t;
var i = Je.ensure();
if (i.capture(e, n), (e.f & $) !== 0) {
const s = (
/** @type {Derived} */
e
);
(e.f & lt) !== 0 && Yn(s), jn(s);
}
e.wv = qi(), Bi(e, lt), H !== null && (H.f & q) !== 0 && (H.f & (te | me)) === 0 && (ot === null ? ll([e]) : ot.push(e)), !i.is_fork && gn.size > 0 && !Hi && Gr();
}
return t;
}
function Gr() {
Hi = !1;
for (const e of gn)
(e.f & q) !== 0 && Q(e, xt), Fe(e) && Se(e);
gn.clear();
}
function on(e) {
V(e, e.v + 1);
}
function Bi(e, t) {
var n = e.reactions;
if (n !== null)
for (var i = n.length, s = 0; s < i; s++) {
var l = n[s], o = l.f, u = (o & lt) === 0;
if (u && Q(l, t), (o & $) !== 0) {
var a = (
/** @type {Derived} */
l
);
G == null || G.delete(a), (o & Qt) === 0 && (o & ct && (l.f |= Qt), Bi(a, xt));
} else u && ((o & Jt) !== 0 && dt !== null && dt.add(
/** @type {Effect} */
l
), ge(
/** @type {Effect} */
l
));
}
}
function re(e) {
if (typeof e != "object" || e === null || Kt in e)
return e;
const t = Ni(e);
if (t !== hr && t !== dr)
return e;
var n = /* @__PURE__ */ new Map(), i = wi(e), s = /* @__PURE__ */ K(0), l = qt, o = (u) => {
if (qt === l)
return u();
var a = P, f = qt;
bt(null), ri(l);
var d = u();
return bt(a), ri(f), d;
};
return i && n.set("length", /* @__PURE__ */ K(
/** @type {any[]} */
e.length
)), new Proxy(
/** @type {any} */
e,
{
defineProperty(u, a, f) {
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && wr();
var d = n.get(a);
return d === void 0 ? d = o(() => {
var p = /* @__PURE__ */ K(f.value);
return n.set(a, p), p;
}) : V(d, f.value, !0), !0;
},
deleteProperty(u, a) {
var f = n.get(a);
if (f === void 0) {
if (a in u) {
const d = o(() => /* @__PURE__ */ K(j));
n.set(a, d), on(s);
}
} else
V(f, j), on(s);
return !0;
},
get(u, a, f) {
var _;
if (a === Kt)
return e;
var d = n.get(a), p = a in u;
if (d === void 0 && (!p || (_ = Ye(u, a)) != null && _.writable) && (d = o(() => {
var g = re(p ? u[a] : j), N = /* @__PURE__ */ K(g);
return N;
}), n.set(a, d)), d !== void 0) {
var y = S(d);
return y === j ? void 0 : y;
}
return Reflect.get(u, a, f);
},
getOwnPropertyDescriptor(u, a) {
var f = Reflect.getOwnPropertyDescriptor(u, a);
if (f && "value" in f) {
var d = n.get(a);
d && (f.value = S(d));
} else if (f === void 0) {
var p = n.get(a), y = p == null ? void 0 : p.v;
if (p !== void 0 && y !== j)
return {
enumerable: !0,
configurable: !0,
value: y,
writable: !0
};
}
return f;
},
has(u, a) {
var y;
if (a === Kt)
return !0;
var f = n.get(a), d = f !== void 0 && f.v !== j || Reflect.has(u, a);
if (f !== void 0 || H !== null && (!d || (y = Ye(u, a)) != null && y.writable)) {
f === void 0 && (f = o(() => {
var _ = d ? re(u[a]) : j, g = /* @__PURE__ */ K(_);
return g;
}), n.set(a, f));
var p = S(f);
if (p === j)
return !1;
}
return d;
},
set(u, a, f, d) {
var E;
var p = n.get(a), y = a in u;
if (i && a === "length")
for (var _ = f; _ < /** @type {Source<number>} */
p.v; _ += 1) {
var g = n.get(_ + "");
g !== void 0 ? V(g, j) : _ in u && (g = o(() => /* @__PURE__ */ K(j)), n.set(_ + "", g));
}
if (p === void 0)
(!y || (E = Ye(u, a)) != null && E.writable) && (p = o(() => /* @__PURE__ */ K(void 0)), V(p, re(f)), n.set(a, p));
else {
y = p.v !== j;
var N = o(() => re(f));
V(p, N);
}
var T = Reflect.getOwnPropertyDescriptor(u, a);
if (T != null && T.set && T.set.call(d, f), !y) {
if (i && typeof a == "string") {
var b = (
/** @type {Source<number>} */
n.get("length")
), k = Number(a);
Number.isInteger(k) && k >= b.v && V(b, k + 1);
}
on(s);
}
return !0;
},
ownKeys(u) {
S(s);
var a = Reflect.ownKeys(u).filter((p) => {
var y = n.get(p);
return y === void 0 || y.v !== j;
});
for (var [f, d] of n)
d.v !== j && !(f in u) && a.push(f);
return a;
},
setPrototypeOf() {
Nr();
}
}
);
}
function ii(e) {
try {
if (e !== null && typeof e == "object" && Kt in e)
return e[Kt];
} catch {
}
return e;
}
function $r(e, t) {
return Object.is(ii(e), ii(t));
}
var Yr, zr, Kr;
// @__NO_SIDE_EFFECTS__
function qr(e) {
return (
/** @type {TemplateNode | null} */
zr.call(e)
);
}
// @__NO_SIDE_EFFECTS__
function Xr(e) {
return (
/** @type {TemplateNode | null} */
Kr.call(e)
);
}
function Qr(e, t) {
if (t) {
const n = document.body;
e.autofocus = !0, Oe(() => {
document.activeElement === n && e.focus();
});
}
}
function zn(e) {
var t = P, n = H;
bt(null), Ht(null);
try {
return e();
} finally {
bt(t), Ht(n);
}
}
function Zr(e) {
H === null && (P === null && Er(), mr()), Ut && gr();
}
function Jr(e, t) {
var n = t.last;
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
}
function ee(e, t, n) {
var i = H;
i !== null && (i.f & ae) !== 0 && (e |= ae);
var s = {
ctx: Et,
deps: null,
nodes: null,
f: e | lt | ct,
first: null,
fn: t,
last: null,
next: null,
parent: i,
b: i && i.b,
prev: null,
teardown: null,
wv: 0,
ac: null
};
if (n)
try {
Se(s), s.f |= Fn;
} catch (u) {
throw Zt(s), u;
}
else t !== null && ge(s);
var l = s;
if (n && l.deps === null && l.teardown === null && l.nodes === null && l.first === l.last && // either `null`, or a singular child
(l.f & rn) === 0 && (l = l.first, (e & Jt) !== 0 && (e & ti) !== 0 && l !== null && (l.f |= ti)), l !== null && (l.parent = i, i !== null && Jr(l, i), P !== null && (P.f & $) !== 0 && (e & me) === 0)) {
var o = (
/** @type {Derived} */
P
);
(o.effects ?? (o.effects = [])).push(l);
}
return s;
}
function Wi() {
return P !== null && !_t;
}
function Fi(e) {
const t = ee(Bn, null, !1);
return Q(t, q), t.teardown = e, t;
}
function tl(e) {
Zr();
var t = (
/** @type {Effect} */
H.f
), n = !P && (t & te) !== 0 && (t & Fn) === 0;
if (n) {
var i = (
/** @type {ComponentContext} */
Et
);
(i.e ?? (i.e = [])).push(e);
} else
return Vi(e);
}
function Vi(e) {
return ee(Xe | yr, e, !1);
}
function Kn(e) {
return ee(Xe, e, !1);
}
function el(e) {
return ee(Vn | rn, e, !0);
}
function nl(e, t = 0) {
return ee(Bn | t, e, !0);
}
function ji(e, t = 0) {
var n = ee(Wn | t, e, !0);
return n;
}
function Gi(e) {
return ee(te | rn, e, !0);
}
function $i(e) {
var t = e.teardown;
if (t !== null) {
const n = Ut, i = P;
si(!0), bt(null);
try {
t.call(null);
} finally {
si(n), bt(i);
}
}
}
function Yi(e, t = !1) {
var n = e.first;
for (e.first = e.last = null; n !== null; ) {
const s = n.ac;
s !== null && zn(() => {
s.abort(ie);
});
var i = n.next;
(n.f & me) !== 0 ? n.parent = null : Zt(n, t), n = i;
}
}
function il(e) {
for (var t = e.first; t !== null; ) {
var n = t.next;
(t.f & te) === 0 && Zt(t), t = n;
}
}
function Zt(e, t = !0) {
var n = !1;
(t || (e.f & Di) !== 0) && e.nodes !== null && e.nodes.end !== null && (sl(
e.nodes.start,
/** @type {TemplateNode} */
e.nodes.end
), n = !0), Yi(e, t && !n), tn(e, 0), Q(e, Nt);
var i = e.nodes && e.nodes.t;
if (i !== null)
for (const l of i)
l.stop();
$i(e);
var s = e.parent;
s !== null && s.first !== null && zi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
}
function sl(e, t) {
for (; e !== null; ) {
var n = e === t ? null : /* @__PURE__ */ Xr(e);
e.remove(), e = n;
}
}
function zi(e) {
var t = e.parent, n = e.prev, i = e.next;
n !== null && (n.next = i), i !== null && (i.prev = n), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = n));
}
let ze = !1, Ut = !1;
function si(e) {
Ut = e;
}
let P = null, _t = !1;
function bt(e) {
P = e;
}
let H = null;
function Ht(e) {
H = e;
}
let X = null;
function rl(e) {
P !== null && (X === null ? X = [e] : X.push(e));
}
let J = null, nt = 0, ot = null;
function ll(e) {
ot = e;
}
let Ki = 1, Ft = 0, qt = Ft;
function ri(e) {
qt = e;
}
function qi() {
return ++Ki;
}
function Fe(e) {
var t = e.f;
if ((t & lt) !== 0)
return !0;
if (t & $ && (e.f &= ~Qt), (t & xt) !== 0) {
for (var n = (
/** @type {Value[]} */
e.deps
), i = n.length, s = 0; s < i; s++) {
var l = n[s];
if (Fe(
/** @type {Derived} */
l
) && Ui(
/** @type {Derived} */
l
), l.wv > e.wv)
return !0;
}
(t & ct) !== 0 && // During time traveling we don't want to reset the status so that
// traversal of the graph in the other batches still happens
G === null && Q(e, q);
}
return !1;
}
function Xi(e, t, n = !0) {
var i = e.reactions;
if (i !== null && !(X != null && X.includes(e)))
for (var s = 0; s < i.length; s++) {
var l = i[s];
(l.f & $) !== 0 ? Xi(
/** @type {Derived} */
l,
t,
!1
) : t === l && (n ? Q(l, lt) : (l.f & q) !== 0 && Q(l, xt), ge(
/** @type {Effect} */
l
));
}
}
function Qi(e) {
var g;
var t = J, n = nt, i = ot, s = P, l = X, o = Et, u = _t, a = qt, f = e.f;
J = /** @type {null | Value[]} */
null, nt = 0, ot = null, P = (f & (te | me)) === 0 ? e : null, X = null, Qe(e.ctx), _t = !1, qt = ++Ft, e.ac !== null && (zn(() => {
e.ac.abort(ie);
}), e.ac = null);
try {
e.f |= pn;
var d = (
/** @type {Function} */
e.fn
), p = d(), y = e.deps;
if (J !== null) {
var _;
if (tn(e, nt), y !== null && nt > 0)
for (y.length = nt + J.length, _ = 0; _ < J.length; _++)
y[nt + _] = J[_];
else
e.deps = y = J;
if (Wi() && (e.f & ct) !== 0)
for (_ = nt; _ < y.length; _++)
((g = y[_]).reactions ?? (g.reactions = [])).push(e);
} else y !== null && nt < y.length && (tn(e, nt), y.length = nt);
if (Oi() && ot !== null && !_t && y !== null && (e.f & ($ | xt | lt)) === 0)
for (_ = 0; _ < /** @type {Source[]} */
ot.length; _++)
Xi(
ot[_],
/** @type {Effect} */
e
);
if (s !== null && s !== e) {
if (Ft++, s.deps !== null)
for (let N = 0; N < n; N += 1)
s.deps[N].rv = Ft;
if (t !== null)
for (const N of t)
N.rv = Ft;
ot !== null && (i === null ? i = ot : i.push(.../** @type {Source[]} */
ot));
}
return (e.f & kt) !== 0 && (e.f ^= kt), p;
} catch (N) {
return kr(N);
} finally {
e.f ^= pn, J = t, nt = n, ot = i, P = s, X = l, Qe(o), _t = u, qt = a;
}
}
function ol(e, t) {
let n = t.reactions;
if (n !== null) {
var i = ur.call(n, e);
if (i !== -1) {
var s = n.length - 1;
s === 0 ? n = t.reactions = null : (n[i] = n[s], n.pop());
}
}
if (n === null && (t.f & $) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
(J === null || !J.includes(t))) {
var l = (
/** @type {Derived} */
t
);
(l.f & ct) !== 0 && (l.f ^= ct, l.f &= ~Qt), jn(l), Mi(l), tn(l, 0);
}
}
function tn(e, t) {
var n = e.deps;
if (n !== null)
for (var i = t; i < n.length; i++)
ol(e, n[i]);
}
function Se(e) {
var t = e.f;
if ((t & Nt) === 0) {
Q(e, q);
var n = H, i = ze;
H = e, ze = !0;
try {
(t & (Jt | Wn)) !== 0 ? il(e) : Yi(e), $i(e);
var s = Qi(e);
e.teardown = typeof s == "function" ? s : null, e.wv = Ki;
var l;
dn && Or && (e.f & lt) !== 0 && e.deps;
} finally {
ze = i, H = n;
}
}
}
function S(e) {
var t = e.f, n = (t & $) !== 0;
if (P !== null && !_t) {
var i = H !== null && (H.f & Nt) !== 0;
if (!i && !(X != null && X.includes(e))) {
var s = P.deps;
if ((P.f & pn) !== 0)
e.rv < Ft && (e.rv = Ft, J === null && s !== null && s[nt] === e ? nt++ : J === null ? J = [e] : J.push(e));
else {
(P.deps ?? (P.deps = [])).push(e);
var l = e.reactions;
l === null ? e.reactions = [P] : l.includes(P) || l.push(P);
}
}
}
if (Ut && Mt.has(e))
return Mt.get(e);
if (n) {
var o = (
/** @type {Derived} */
e
);
if (Ut) {
var u = o.v;
return ((o.f & q) === 0 && o.reactions !== null || Ji(o)) && (u = Yn(o)), Mt.set(o, u), u;
}
var a = (o.f & ct) === 0 && !_t && P !== null && (ze || (P.f & ct) !== 0), f = o.deps === null;
Fe(o) && (a && (o.f |= ct), Ui(o)), a && !f && Zi(o);
}
if (G != null && G.has(e))
return G.get(e);
if ((e.f & kt) !== 0)
throw e.v;
return e.v;
}
function Zi(e) {
if (e.deps !== null) {
e.f |= ct;
for (const t of e.deps)
(t.reactions ?? (t.reactions = [])).push(e), (t.f & $) !== 0 && (t.f & ct) === 0 && Zi(
/** @type {Derived} */
t
);
}
}
function Ji(e) {
if (e.v === j) return !0;
if (e.deps === null) return !1;
for (const t of e.deps)
if (Mt.has(t) || (t.f & $) !== 0 && Ji(
/** @type {Derived} */
t
))
return !0;
return !1;
}
function ts(e) {
var t = _t;
try {
return _t = !0, e();
} finally {
_t = t;
}
}
const al = /* @__PURE__ */ new Set(), ul = /* @__PURE__ */ new Set();
function cl(e, t, n, i = {}) {
function s(l) {
if (i.capture || hl.call(t, l), !l.cancelBubble)
return zn(() => n == null ? void 0 : n.call(this, l));
}
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Oe(() => {
t.addEventListener(e, s, i);
}) : t.addEventListener(e, s, i), s;
}
function fl(e) {
for (var t = 0; t < e.length; t++)
al.add(e[t]);
for (var n of ul)
n(e);
}
let li = null;
function hl(e) {
var T;
var t = this, n = (
/** @type {Node} */
t.ownerDocument
), i = e.type, s = ((T = e.composedPath) == null ? void 0 : T.call(e)) || [], l = (
/** @type {null | Element} */
s[0] || e.target
);
li = e;
var o = 0, u = li === e && e.__root;
if (u) {
var a = s.indexOf(u);
if (a !== -1 && (t === document || t === /** @type {any} */
window)) {
e.__root = t;
return;
}
var f = s.indexOf(t);
if (f === -1)
return;
a <= f && (o = a);
}
if (l = /** @type {Element} */
s[o] || e.target, l !== t) {
cr(e, "currentTarget", {
configurable: !0,
get() {
return l || n;
}
});
var d = P, p = H;
bt(null), Ht(null);
try {
for (var y, _ = []; l !== null; ) {
var g = l.assignedSlot || l.parentNode || /** @type {any} */
l.host || null;
try {
var N = l["__" + i];
N != null && (!/** @type {any} */
l.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
// -> the target could not have been disabled because it emits the event in the first place
e.target === l) && N.call(l, e);
} catch (b) {
y ? _.push(b) : y = b;
}
if (e.cancelBubble || g === t || g === null)
break;
l = g;
}
if (y) {
for (let b of _)
queueMicrotask(() => {
throw b;
});
throw y;
}
} finally {
e.__root = t, delete e.currentTarget, bt(d), Ht(p);
}
}
}
function dl(e) {
var t = document.createElement("template");
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
}
function pl(e, t) {
var n = (
/** @type {Effect} */
H
);
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
}
// @__NO_SIDE_EFFECTS__
function yl(e, t) {
var n = (t & lr) !== 0, i, s = !e.startsWith("<!>");
return () => {
i === void 0 && (i = dl(s ? e : "<!>" + e), i = /** @type {TemplateNode} */
/* @__PURE__ */ qr(i));
var l = (
/** @type {TemplateNode} */
n || Yr ? document.importNode(i, !0) : i.cloneNode(!0)
);
return pl(l, l), l;
};
}
function vl(e, t) {
e !== null && e.before(
/** @type {Node} */
t
);
}
function Cl(e) {
return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
}
const _l = [
"beforeinput",
"click",
"change",
"dblclick",
"contextmenu",
"focusin",
"focusout",
"input",
"keydown",
"keyup",
"mousedown",
"mousemove",
"mouseout",
"mouseover",
"mouseup",
"pointerdown",
"pointermove",
"pointerout",
"pointerover",
"pointerup",
"touchend",
"touchmove",
"touchstart"
];
function gl(e) {
return _l.includes(e);
}
const ml = {
// no `class: 'className'` because we handle that separately
formnovalidate: "formNoValidate",
ismap: "isMap",
nomodule: "noModule",
playsinline: "playsInline",
readonly: "readOnly",
defaultvalue: "defaultValue",
defaultchecked: "defaultChecked",
srcobject: "srcObject",
novalidate: "noValidate",
allowfullscreen: "allowFullscreen",
disablepictureinpicture: "disablePictureInPicture",
disableremoteplayback: "disableRemotePlayback"
};
function El(e) {
return e = e.toLowerCase(), ml[e] ?? e;
}
function bl(e, t) {
var n = void 0, i;
ji(() => {
n !== (n = t()) && (i && (Zt(i), i = null), n && (i = Gi(() => {
Kn(() => (
/** @type {(node: Element) => void} */
n(e)
));
})));
});
}
function es(e) {
var t, n, i = "";
if (typeof e == "string" || typeof e == "number") i += e;
else if (typeof e == "object") if (Array.isArray(e)) {
var s = e.length;
for (t = 0; t < s; t++) e[t] && (n = es(e[t])) && (i && (i += " "), i += n);
} else for (n in e) e[n] && (i && (i += " "), i += n);
return i;
}
function Il() {
for (var e, t, n = 0, i = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = es(e)) && (i && (i += " "), i += t);
return i;
}
function wl(e) {
return typeof e == "object" ? Il(e) : e ?? "";
}
const oi = [...`
\r\f \v\uFEFF`];
function Nl(e, t, n) {
var i = e == null ? "" : "" + e;
if (n) {
for (var s in n)
if (n[s])
i = i ? i + " " + s : s;
else if (i.length)
for (var l = s.length, o = 0; (o = i.indexOf(s, o)) >= 0; ) {
var u = o + l;
(o === 0 || oi.includes(i[o - 1])) && (u === i.length || oi.includes(i[u])) ? i = (o === 0 ? "" : i.substring(0, o)) + i.substring(u + 1) : o = u;
}
}
return i === "" ? null : i;
}
function ai(e, t = !1) {
var n = t ? " !important;" : ";", i = "";
for (var s in e) {
var l = e[s];
l != null && l !== "" && (i += " " + s + ": " + l + n);
}
return i;
}
function an(e) {
return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
}
function Al(e, t) {
if (t) {
var n = "", i, s;
if (Array.isArray(t) ? (i = t[0], s = t[1]) : i = t, e) {
e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
var l = !1, o = 0, u = !1, a = [];
i && a.push(...Object.keys(i).map(an)), s && a.push(...Object.keys(s).map(an));
var f = 0, d = -1;
const N = e.length;
for (var p = 0; p < N; p++) {
var y = e[p];
if (u ? y === "/" && e[p - 1] === "*" && (u = !1) : l ? l === y && (l = !1) : y === "/" && e[p + 1] === "*" ? u = !0 : y === '"' || y === "'" ? l = y : y === "(" ? o++ : y === ")" && o--, !u && l === !1 && o === 0) {
if (y === ":" && d === -1)
d = p;
else if (y === ";" || p === N - 1) {
if (d !== -1) {
var _ = an(e.substring(f, d).trim());
if (!a.includes(_)) {
y !== ";" && p++;
var g = e.substring(f, p).trim();
n += " " + g + ";";
}
}
f = p + 1, d = -1;
}
}
}
}
return i && (n += ai(i)), s && (n += ai(s, !0)), n = n.trim(), n === "" ? null : n;
}
return e == null ? null : String(e);
}
function Ll(e, t, n, i, s, l) {
var o = e.__className;
if (o !== n || o === void 0) {
var u = Nl(n, i, l);
u == null ? e.removeAttribute("class") : t ? e.className = u : e.setAttribute("class", u), e.__className = n;
} else if (l && s !== l)
for (var a in l) {
var f = !!l[a];
(s == null || f !== !!s[a]) && e.classList.toggle(a, f);
}
return l;
}
function un(e, t = {}, n, i) {
for (var s in n) {
var l = n[s];
t[s] !== l && (n[s] == null ? e.style.removeProperty(s) : e.style.setProperty(s, l, i));
}
}
function Dl(e, t, n, i) {
var s = e.__style;
if (s !== t) {
var l = Al(t, i);
l == null ? e.removeAttribute("style") : e.style.cssText = l, e.__style = t;
} else i && (Array.isArray(i) ? (un(e, n == null ? void 0 : n[0], i[0]), un(e, n == null ? void 0 : n[1], i[1], "important")) : un(e, n, i));
return i;
}
function En(e, t, n = !1) {
if (e.multiple) {
if (t == null)
return;
if (!wi(t))
return Lr();
for (var i of e.options)
i.selected = t.includes(ui(i));
return;
}
for (i of e.options) {
var s = ui(i);
if ($r(s, t)) {
i.selected = !0;
return;
}
}
(!n || t !== void 0) && (e.selectedIndex = -1);
}
function Tl(e) {
var t = new MutationObserver(() => {
En(e, e.__value);
});
t.observe(e, {
// Listen to option element changes
childList: !0,
subtree: !0,
// because of <optgroup>
// Listen to option element value attribute changes
// (doesn't get notified of select value changes,
// because that property is not reflected as an attribute)
attributes: !0,
attributeFilter: ["value"]
}), Fi(() => {
t.disconnect();
});
}
function ui(e) {
return "__value" in e ? e.__value : e.value;
}
const Ee = Symbol("class"), be = Symbol("style"), ns = Symbol("is custom element"), is = Symbol("is html");
function Ol(e, t) {
t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
}
function ci(e, t, n, i) {
var s = ss(e);
s[t] !== (s[t] = n) && (t === "loading" && (e[Cr] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && rs(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
}
function Sl(e, t, n, i, s = !1, l = !1) {
var o = ss(e), u = o[ns], a = !o[is], f = t || {}, d = e.tagName === "OPTION";
for (var p in t)
p in n || (n[p] = null);
n.class ? n.class = wl(n.class) : n[Ee] && (n.class = null), n[be] && (n.style ?? (n.style = null));
var y = rs(e);
for (const E in n) {
let D = n[E];
if (d && E === "value" && D == null) {
e.value = e.__value = "", f[E] = D;
continue;
}
if (E === "class") {
var _ = e.namespaceURI === "http://www.w3.org/1999/xhtml";
Ll(e, _, D, i, t == null ? void 0 : t[Ee], n[Ee]), f[E] = D, f[Ee] = n[Ee];
continue;
}
if (E === "style") {
Dl(e, D, t == null ? void 0 : t[be], n[be]), f[E] = D, f[be] = n[be];
continue;
}
var g = f[E];
if (!(D === g && !(D === void 0 && e.hasAttribute(E)))) {
f[E] = D;
var N = E[0] + E[1];
if (N !== "$$")
if (N === "on") {
const W = {}, ft = "$$" + E;
let A = E.slice(2);
var T = gl(A);
if (Cl(A) && (A = A.slice(0, -7), W.capture = !0), !T && g) {
if (D != null) continue;
e.removeEventListener(A, f[ft], W), f[ft] = null;
}
if (D != null)
if (T)
e[`__${A}`] = D, fl([A]);
else {
let tt = function(et) {
f[E].call(this, et);
};
f[ft] = cl(A, e, tt, W);
}
else T && (e[`__${A}`] = void 0);
} else if (E === "style")
ci(e, E, D);
else if (E === "autofocus")
Qr(
/** @type {HTMLElement} */
e,
!!D
);
else if (!u && (E === "__value" || E === "value" && D != null))
e.value = e.__value = D;
else if (E === "selected" && d)
Ol(
/** @type {HTMLOptionElement} */
e,
D
);
else {
var b = E;
a || (b = El(b));
var k = b === "defaultValue" || b === "defaultChecked";
if (D == null && !u && !k)
if (o[E] = null, b === "value" || b === "checked") {
let W = (
/** @type {HTMLInputElement} */
e
);
const ft = t === void 0;
if (b === "value") {
let A = W.defaultValue;
W.removeAttribute(b), W.defaultValue = A, W.value = W.__value = ft ? A : null;
} else {
let A = W.defaultChecked;
W.removeAttribute(b), W.defaultChecked = A, W.checked = ft ? A : !1;
}
} else
e.removeAttribute(E);
else k || y.includes(b) && (u || typeof D != "string") ? (e[b] = D, b in o && (o[b] = j)) : typeof D != "function" && ci(e, b, D);
}
}
}
return f;
}
function Pl(e, t, n = [], i = [], s = [], l, o = !1, u = !1) {
Br(s, n, i, (a) => {
var f = void 0, d = {}, p = e.nodeName === "SELECT", y = !1;
if (ji(() => {
var g = t(...a.map(S)), N = Sl(
e,
f,
g,
l,
o,
u
);
y && p && "value" in g && En(
/** @type {HTMLSelectElement} */
e,
g.value
);
for (let b of Object.getOwnPropertySymbols(d))
g[b] || Zt(d[b]);
for (let b of Object.getOwnPropertySymbols(g)) {
var T = g[b];
b.description === ar && (!f || T !== f[b]) && (d[b] && Zt(d[b]), d[b] = Gi(() => bl(e, () => T))), N[b] = T;
}
f = N;
}), p) {
var _ = (
/** @type {HTMLSelectElement} */
e
);
Kn(() => {
En(
_,
/** @type {Record<string | symbol, any>} */
f.value,
!0
), Tl(_);
});
}
y = !0;
});
}
function ss(e) {
return (
/** @type {Record<string | symbol, unknown>} **/
// @ts-expect-error
e.__attributes ?? (e.__attributes = {
[ns]: e.nodeName.includes("-"),
[is]: e.namespaceURI === or
})
);
}
var fi = /* @__PURE__ */ new Map();
function rs(e) {
var t = e.getAttribute("is") || e.nodeName, n = fi.get(t);
if (n) return n;
fi.set(t, n = []);
for (var i, s = e, l = Element.prototype; l !== s; ) {
i = fr(s);
for (var o in i)
i[o].set && n.push(o);
s = Ni(s);
}
return n;
}
function hi(e, t) {
return e === t || (e == null ? void 0 : e[Kt]) === t;
}
function Rl(e = {}, t, n, i) {
return Kn(() => {
var s, l;
return nl(() => {
s = l, l = [], ts(() => {
e !== n(...l) && (t(e, ...l), s && hi(n(...s), e) && t(null, ...s));
});
}), () => {
Oe(() => {
l && hi(n(...l), e) && t(null, ...l);
});
};
}), e;
}
let je = !1;
function kl(e) {
var t = je;
try {
return je = !1, [e(), je];
} finally {
je = t;
}
}
function Ie(e, t, n, i) {
var k;
var s = (n & sr) !== 0, l = (n & rr) !== 0, o = (
/** @type {V} */
i
), u = !0, a = () => (u && (u = !1, o = l ? ts(
/** @type {() => V} */
i
) : (
/** @type {V} */
i
)), o), f;
if (s) {
var d = Kt in e || vr in e;
f = ((k = Ye(e, t)) == null ? void 0 : k.set) ?? (d && t in e ? (E) => e[t] = E : void 0);
}
var p, y = !1;
s ? [p, y] = kl(() => (
/** @type {V} */
e[t]
)) : p = /** @type {V} */
e[t], p === void 0 && i !== void 0 && (p = a(), f && (Ir(), f(p)));
var _;
if (_ = () => {
var E = (
/** @type {V} */
e[t]
);
return E === void 0 ? a() : (u = !0, E);
}, (n & ir) === 0)
return _;
if (f) {
var g = e.$$legacy;
return (
/** @type {() => V} */
(function(E, D) {
return arguments.length > 0 ? ((!D || g || y) && f(D ? _() : E), E) : _();
})
);
}
var N = !1, T = ((n & nr) !== 0 ? $n : Vr)(() => (N = !1, _()));
s && S(T);
var b = (
/** @type {Effect} */
H
);
return (
/** @type {() => V} */
(function(E, D) {
if (arguments.length > 0) {
const W = D ? S(T) : s ? re(E) : E;
return V(T, W), N = !0, o !== void 0 && (o = W), E;
}
return Ut && N || (b.f & Nt) !== 0 ? T.v : S(T);
})
);
}
const Ml = [
[
"af",
// Afghanistan
"93",
0,
null,
"0"
],
[
"ax",
// Åland Islands
"358",
1,
["18", "4"],
// (4 is a mobile range shared with FI)
"0"
],
[
"al",
// Albania
"355",
0,
null,
"0"
],
[
"dz",
// Algeria
"213",
0,
null,
"0"
],
[
"as",
// American Samoa
"1",
5,
["684"],
"1"
],
[
"ad",
// Andorra
"376"
],
[
"ao",
// Angola
"244"
],
[
"ai",
// Anguilla
"1",
6,
["264"],
"1"
],
[
"ag",
// Antigua and Barbuda
"1",
7,
["268"],
"1"
],
[
"ar",
// Argentina
"54",
0,
null,
"0"
],
[
"am",
// Armenia
"374",
0,
null,
"0"
],
[
"aw",
// Aruba
"297"
],
[
"ac",
// Ascension Island
"247"
],
[
"au",
// Australia
"61",
0,
["4"],
// (mobile range shared with CX and CC)
"0"
],
[
"at",
// Austria
"43",
0,
null,
"0"
],
[
"az",
// Azerbaijan
"994",
0,
null,
"0"
],
[
"bs",
// Bahamas
"1",
8,
["242"],
"1"
],
[
"bh",
// Bahrain
"973"
],
[
"bd",
// Bangladesh
"880",
0,
null,
"0"
],
[
"bb",
// Barbados
"1",
9,
["246"],
"1"
],
[
"by",
// Belarus
"375",
0,
null,
"8"
],
[
"be",
// Belgium
"32",
0,
null,
"0"
],
[
"bz",
// Belize
"501"
],
[
"bj",
// Benin
"229"
],
[
"bm",
// Bermuda
"1",
10,
["441"],
"1"
],
[
"bt",
// Bhutan
"975"
],
[
"bo",
// Bolivia
"591",
0,
null,
"0"
],
[
"ba",
// Bosnia and Herzegovina
"387",
0,
null,
"0"
],
[
"bw",
// Botswana
"267"
],
[
"br",
// Brazil
"55",
0,
null,
"0"
],
[
"io",
// British Indian Ocean Territory
"246"
],
[
"vg",
// British Virgin Islands
"1",
11,
["284"],
"1"
],
[
"bn",
// Brunei
"673"
],
[
"bg",
// Bulgaria
"359",
0,
null,
"0"
],
[
"bf",
// Burkina Faso
"226"
],
[
"bi",
// Bu