altcha 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/altcha.js CHANGED
@@ -1,48 +1,38 @@
1
- var Bo = Object.defineProperty;
2
- var Vn = (e) => {
3
- throw TypeError(e);
4
- };
5
- var Ho = (e, t, r) => t in e ? Bo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
- var Ee = (e, t, r) => Ho(e, typeof t != "symbol" ? t + "" : t, r), Un = (e, t, r) => t.has(e) || Vn("Cannot " + r);
7
- var se = (e, t, r) => (Un(e, t, "read from private field"), r ? r.call(e) : t.get(e)), $r = (e, t, r) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Sr = (e, t, r, i) => (Un(e, t, "write to private field"), i ? i.call(e, r) : t.set(e, r), r);
8
- const ni = `(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,s=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=s;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const s="AES-GCM",o=new AbortController,a=Date.now(),l=async()=>{for(let u=n;u<=r;u+=1){if(o.signal.aborted||!c||!y)return null;try{const f=await crypto.subtle.decrypt({name:s,iv:g(u)},c,y);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,y=null;try{y=h(e);const u=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",u,s,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:l(),controller:o}}let i;onmessage=async e=>{const{type:t,payload:r,start:n,max:s}=e.data;let o=null;if(t==="abort")i==null||i.abort(),i=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:l}=r||{};o=await m(l,a,s,n)}else{const{algorithm:a,challenge:l,salt:c}=r||{};o=w(l,c,a,s,n)}i=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
9
- `, jn = typeof self < "u" && self.Blob && new Blob([ni], { type: "text/javascript;charset=utf-8" });
10
- function Go(e) {
1
+ const Yn = `(function(){"use strict";const d=new TextEncoder;function p(e){return[...new Uint8Array(e)].map(t=>t.toString(16).padStart(2,"0")).join("")}async function b(e,t,r){if(typeof crypto>"u"||!("subtle"in crypto)||!("digest"in crypto.subtle))throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");return p(await crypto.subtle.digest(r.toUpperCase(),d.encode(e+t)))}function w(e,t,r="SHA-256",n=1e6,l=0){const o=new AbortController,a=Date.now();return{promise:(async()=>{for(let c=l;c<=n;c+=1){if(o.signal.aborted)return null;if(await b(t,c,r)===e)return{number:c,took:Date.now()-a}}return null})(),controller:o}}function h(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function g(e,t=12){const r=new Uint8Array(t);for(let n=0;n<t;n++)r[n]=e%256,e=Math.floor(e/256);return r}async function m(e,t="",r=1e6,n=0){const l="AES-GCM",o=new AbortController,a=Date.now(),s=async()=>{for(let i=n;i<=r;i+=1){if(o.signal.aborted||!c||!u)return null;try{const f=await crypto.subtle.decrypt({name:l,iv:g(i)},c,u);if(f)return{clearText:new TextDecoder().decode(f),took:Date.now()-a}}catch{}}return null};let c=null,u=null;try{u=h(e);const i=await crypto.subtle.digest("SHA-256",d.encode(t));c=await crypto.subtle.importKey("raw",i,l,!1,["decrypt"])}catch{return{promise:Promise.reject(),controller:o}}return{promise:s(),controller:o}}let y;onmessage=async e=>{const{type:t,payload:r,start:n,max:l}=e.data;let o=null;if(t==="abort")y?.abort(),y=void 0;else if(t==="work"){if("obfuscated"in r){const{key:a,obfuscated:s}=r||{};o=await m(s,a,l,n)}else{const{algorithm:a,challenge:s,salt:c}=r||{};o=w(s,c,a,l,n)}y=o.controller,o.promise.then(a=>{self.postMessage(a&&{...a,worker:!0})})}}})();
2
+ `, Dn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Yn], { type: "text/javascript;charset=utf-8" });
3
+ function Ni(e) {
11
4
  let t;
12
5
  try {
13
- if (t = jn && (self.URL || self.webkitURL).createObjectURL(jn), !t) throw "";
6
+ if (t = Dn && (self.URL || self.webkitURL).createObjectURL(Dn), !t) throw "";
14
7
  const r = new Worker(t, {
15
- name: e == null ? void 0 : e.name
8
+ name: e?.name
16
9
  });
17
10
  return r.addEventListener("error", () => {
18
11
  (self.URL || self.webkitURL).revokeObjectURL(t);
19
12
  }), r;
20
13
  } catch {
21
14
  return new Worker(
22
- "data:text/javascript;charset=utf-8," + encodeURIComponent(ni),
15
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(Yn),
23
16
  {
24
- name: e == null ? void 0 : e.name
17
+ name: e?.name
25
18
  }
26
19
  );
27
- } finally {
28
- t && (self.URL || self.webkitURL).revokeObjectURL(t);
29
20
  }
30
21
  }
31
- const Wo = "5";
32
- var ri;
33
- typeof window < "u" && ((ri = window.__svelte ?? (window.__svelte = {})).v ?? (ri.v = /* @__PURE__ */ new Set())).add(Wo);
34
- const Yo = 1, Zo = 4, zo = 8, Jo = 16, Ko = 1, Xo = 2, qr = "[", ii = "[!", oi = "]", Et = {}, ue = Symbol(), Qo = "http://www.w3.org/1999/xhtml", qn = !1;
35
- function ai(e) {
22
+ const Li = "5";
23
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Li);
24
+ const Pi = 1, Oi = 4, Fi = 8, Mi = 16, Vi = 1, Ui = 2, Mr = "[", Zn = "[!", zn = "]", bt = {}, ae = Symbol(), ji = "http://www.w3.org/1999/xhtml", Nn = !1;
25
+ function Jn(e) {
36
26
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
37
27
  }
38
- var li = Array.isArray, ea = Array.prototype.indexOf, ta = Array.from, lr = Object.keys, qt = Object.defineProperty, it = Object.getOwnPropertyDescriptor, ra = Object.getOwnPropertyDescriptors, na = Object.prototype, ia = Array.prototype, si = Object.getPrototypeOf, Bn = Object.isExtensible;
39
- const Ct = () => {
28
+ var Kn = Array.isArray, qi = Array.prototype.indexOf, Bi = Array.from, or = Object.keys, Mt = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, Hi = Object.getOwnPropertyDescriptors, Gi = Object.prototype, Wi = Array.prototype, Xn = Object.getPrototypeOf, Ln = Object.isExtensible;
29
+ const yt = () => {
40
30
  };
41
- function ui(e) {
31
+ function Qn(e) {
42
32
  for (var t = 0; t < e.length; t++)
43
33
  e[t]();
44
34
  }
45
- function oa(e, t, r = !1) {
35
+ function Yi(e, t, r = !1) {
46
36
  return e === void 0 ? r ? (
47
37
  /** @type {() => V} */
48
38
  t()
@@ -51,294 +41,291 @@ function oa(e, t, r = !1) {
51
41
  t
52
42
  ) : e;
53
43
  }
54
- const Ce = 2, fi = 4, vr = 8, Br = 16, Fe = 32, lt = 64, sr = 128, ve = 256, ur = 512, fe = 1024, Ne = 2048, st = 4096, xt = 8192, gr = 16384, aa = 32768, Hr = 65536, la = 1 << 19, ci = 1 << 20, Lr = 1 << 21, Ut = Symbol("$state"), di = Symbol("legacy props"), sa = Symbol("");
55
- function ua(e) {
44
+ const me = 2, eo = 4, fr = 8, Vr = 16, De = 32, it = 64, ir = 128, fe = 256, ar = 512, le = 1024, Ie = 2048, at = 4096, wt = 8192, dr = 16384, Zi = 32768, Ur = 65536, zi = 1 << 19, to = 1 << 20, Sr = 1 << 21, Ot = Symbol("$state"), ro = Symbol("legacy props"), Ji = Symbol("");
45
+ function Ki(e) {
56
46
  throw new Error("https://svelte.dev/e/effect_in_teardown");
57
47
  }
58
- function fa() {
48
+ function Xi() {
59
49
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
60
50
  }
61
- function ca(e) {
51
+ function Qi(e) {
62
52
  throw new Error("https://svelte.dev/e/effect_orphan");
63
53
  }
64
- function da() {
54
+ function ea() {
65
55
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
66
56
  }
67
- function ha() {
57
+ function ta() {
68
58
  throw new Error("https://svelte.dev/e/hydration_failed");
69
59
  }
70
- function va(e) {
60
+ function ra(e) {
71
61
  throw new Error("https://svelte.dev/e/props_invalid_value");
72
62
  }
73
- function ga() {
63
+ function na() {
74
64
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
75
65
  }
76
- function pa() {
66
+ function oa() {
77
67
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
78
68
  }
79
- function ma() {
69
+ function ia() {
80
70
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
81
71
  }
82
- function pr(e) {
72
+ function hr(e) {
83
73
  console.warn("https://svelte.dev/e/hydration_mismatch");
84
74
  }
85
- let F = !1;
86
- function wt(e) {
87
- F = e;
75
+ let O = !1;
76
+ function _t(e) {
77
+ O = e;
88
78
  }
89
- let O;
90
- function Ge(e) {
79
+ let P;
80
+ function Ue(e) {
91
81
  if (e === null)
92
- throw pr(), Et;
93
- return O = e;
82
+ throw hr(), bt;
83
+ return P = e;
94
84
  }
95
- function kt() {
96
- return Ge(
85
+ function Et() {
86
+ return Ue(
97
87
  /** @type {TemplateNode} */
98
- /* @__PURE__ */ Ze(O)
88
+ /* @__PURE__ */ Be(P)
99
89
  );
100
90
  }
101
- function Y(e) {
102
- if (F) {
103
- if (/* @__PURE__ */ Ze(O) !== null)
104
- throw pr(), Et;
105
- O = e;
91
+ function Z(e) {
92
+ if (O) {
93
+ if (/* @__PURE__ */ Be(P) !== null)
94
+ throw hr(), bt;
95
+ P = e;
106
96
  }
107
97
  }
108
- function _a() {
109
- for (var e = 0, t = O; ; ) {
98
+ function aa() {
99
+ for (var e = 0, t = P; ; ) {
110
100
  if (t.nodeType === 8) {
111
101
  var r = (
112
102
  /** @type {Comment} */
113
103
  t.data
114
104
  );
115
- if (r === oi) {
105
+ if (r === zn) {
116
106
  if (e === 0) return t;
117
107
  e -= 1;
118
- } else (r === qr || r === ii) && (e += 1);
108
+ } else (r === Mr || r === Zn) && (e += 1);
119
109
  }
120
- var i = (
110
+ var o = (
121
111
  /** @type {TemplateNode} */
122
- /* @__PURE__ */ Ze(t)
112
+ /* @__PURE__ */ Be(t)
123
113
  );
124
- t.remove(), t = i;
114
+ t.remove(), t = o;
125
115
  }
126
116
  }
127
- let ba = !1;
128
- function Be(e) {
129
- if (typeof e != "object" || e === null || Ut in e)
117
+ let la = !1;
118
+ function Me(e) {
119
+ if (typeof e != "object" || e === null || Ot in e)
130
120
  return e;
131
- const t = si(e);
132
- if (t !== na && t !== ia)
121
+ const t = Xn(e);
122
+ if (t !== Gi && t !== Wi)
133
123
  return e;
134
- var r = /* @__PURE__ */ new Map(), i = li(e), l = /* @__PURE__ */ L(0), o = T, f = (s) => {
135
- var c = T;
136
- Le(o);
137
- var d = s();
138
- return Le(c), d;
124
+ var r = /* @__PURE__ */ new Map(), o = Kn(e), l = /* @__PURE__ */ N(0), a = $, s = (c) => {
125
+ var f = $;
126
+ Re(a);
127
+ var d = c();
128
+ return Re(f), d;
139
129
  };
140
- return i && r.set("length", /* @__PURE__ */ L(
130
+ return o && r.set("length", /* @__PURE__ */ N(
141
131
  /** @type {any[]} */
142
132
  e.length
143
133
  )), new Proxy(
144
134
  /** @type {any} */
145
135
  e,
146
136
  {
147
- defineProperty(s, c, d) {
148
- (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && ga();
149
- var _ = r.get(c);
150
- return _ === void 0 ? (_ = f(() => /* @__PURE__ */ L(d.value)), r.set(c, _)) : b(
151
- _,
152
- f(() => Be(d.value))
137
+ defineProperty(c, f, d) {
138
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && na();
139
+ var m = r.get(f);
140
+ return m === void 0 ? (m = s(() => /* @__PURE__ */ N(d.value)), r.set(f, m)) : b(
141
+ m,
142
+ s(() => Me(d.value))
153
143
  ), !0;
154
144
  },
155
- deleteProperty(s, c) {
156
- var d = r.get(c);
145
+ deleteProperty(c, f) {
146
+ var d = r.get(f);
157
147
  if (d === void 0)
158
- c in s && (r.set(
159
- c,
160
- f(() => /* @__PURE__ */ L(ue))
161
- ), Tr(l));
148
+ f in c && (r.set(
149
+ f,
150
+ s(() => /* @__PURE__ */ N(ae))
151
+ ), Ir(l));
162
152
  else {
163
- if (i && typeof c == "string") {
164
- var _ = (
153
+ if (o && typeof f == "string") {
154
+ var m = (
165
155
  /** @type {Source<number>} */
166
156
  r.get("length")
167
- ), v = Number(c);
168
- Number.isInteger(v) && v < _.v && b(_, v);
157
+ ), v = Number(f);
158
+ Number.isInteger(v) && v < m.v && b(m, v);
169
159
  }
170
- b(d, ue), Tr(l);
160
+ b(d, ae), Ir(l);
171
161
  }
172
162
  return !0;
173
163
  },
174
- get(s, c, d) {
175
- var y;
176
- if (c === Ut)
164
+ get(c, f, d) {
165
+ if (f === Ot)
177
166
  return e;
178
- var _ = r.get(c), v = c in s;
179
- if (_ === void 0 && (!v || (y = it(s, c)) != null && y.writable) && (_ = f(() => /* @__PURE__ */ L(Be(v ? s[c] : ue))), r.set(c, _)), _ !== void 0) {
180
- var m = a(_);
181
- return m === ue ? void 0 : m;
167
+ var m = r.get(f), v = f in c;
168
+ if (m === void 0 && (!v || rt(c, f)?.writable) && (m = s(() => /* @__PURE__ */ N(Me(v ? c[f] : ae))), r.set(f, m)), m !== void 0) {
169
+ var _ = i(m);
170
+ return _ === ae ? void 0 : _;
182
171
  }
183
- return Reflect.get(s, c, d);
172
+ return Reflect.get(c, f, d);
184
173
  },
185
- getOwnPropertyDescriptor(s, c) {
186
- var d = Reflect.getOwnPropertyDescriptor(s, c);
174
+ getOwnPropertyDescriptor(c, f) {
175
+ var d = Reflect.getOwnPropertyDescriptor(c, f);
187
176
  if (d && "value" in d) {
188
- var _ = r.get(c);
189
- _ && (d.value = a(_));
177
+ var m = r.get(f);
178
+ m && (d.value = i(m));
190
179
  } else if (d === void 0) {
191
- var v = r.get(c), m = v == null ? void 0 : v.v;
192
- if (v !== void 0 && m !== ue)
180
+ var v = r.get(f), _ = v?.v;
181
+ if (v !== void 0 && _ !== ae)
193
182
  return {
194
183
  enumerable: !0,
195
184
  configurable: !0,
196
- value: m,
185
+ value: _,
197
186
  writable: !0
198
187
  };
199
188
  }
200
189
  return d;
201
190
  },
202
- has(s, c) {
203
- var m;
204
- if (c === Ut)
191
+ has(c, f) {
192
+ if (f === Ot)
205
193
  return !0;
206
- var d = r.get(c), _ = d !== void 0 && d.v !== ue || Reflect.has(s, c);
207
- if (d !== void 0 || D !== null && (!_ || (m = it(s, c)) != null && m.writable)) {
208
- d === void 0 && (d = f(() => /* @__PURE__ */ L(_ ? Be(s[c]) : ue)), r.set(c, d));
209
- var v = a(d);
210
- if (v === ue)
194
+ var d = r.get(f), m = d !== void 0 && d.v !== ae || Reflect.has(c, f);
195
+ if (d !== void 0 || S !== null && (!m || rt(c, f)?.writable)) {
196
+ d === void 0 && (d = s(() => /* @__PURE__ */ N(m ? Me(c[f]) : ae)), r.set(f, d));
197
+ var v = i(d);
198
+ if (v === ae)
211
199
  return !1;
212
200
  }
213
- return _;
201
+ return m;
214
202
  },
215
- set(s, c, d, _) {
216
- var K;
217
- var v = r.get(c), m = c in s;
218
- if (i && c === "length")
219
- for (var y = d; y < /** @type {Source<number>} */
220
- v.v; y += 1) {
221
- var $ = r.get(y + "");
222
- $ !== void 0 ? b($, ue) : y in s && ($ = f(() => /* @__PURE__ */ L(ue)), r.set(y + "", $));
203
+ set(c, f, d, m) {
204
+ var v = r.get(f), _ = f in c;
205
+ if (o && f === "length")
206
+ for (var w = d; w < /** @type {Source<number>} */
207
+ v.v; w += 1) {
208
+ var F = r.get(w + "");
209
+ F !== void 0 ? b(F, ae) : w in c && (F = s(() => /* @__PURE__ */ N(ae)), r.set(w + "", F));
223
210
  }
224
- v === void 0 ? (!m || (K = it(s, c)) != null && K.writable) && (v = f(() => /* @__PURE__ */ L(void 0)), b(
211
+ v === void 0 ? (!_ || rt(c, f)?.writable) && (v = s(() => /* @__PURE__ */ N(void 0)), b(
225
212
  v,
226
- f(() => Be(d))
227
- ), r.set(c, v)) : (m = v.v !== ue, b(
213
+ s(() => Me(d))
214
+ ), r.set(f, v)) : (_ = v.v !== ae, b(
228
215
  v,
229
- f(() => Be(d))
216
+ s(() => Me(d))
230
217
  ));
231
- var E = Reflect.getOwnPropertyDescriptor(s, c);
232
- if (E != null && E.set && E.set.call(_, d), !m) {
233
- if (i && typeof c == "string") {
218
+ var M = Reflect.getOwnPropertyDescriptor(c, f);
219
+ if (M?.set && M.set.call(m, d), !_) {
220
+ if (o && typeof f == "string") {
234
221
  var U = (
235
222
  /** @type {Source<number>} */
236
223
  r.get("length")
237
- ), ce = Number(c);
238
- Number.isInteger(ce) && ce >= U.v && b(U, ce + 1);
224
+ ), I = Number(f);
225
+ Number.isInteger(I) && I >= U.v && b(U, I + 1);
239
226
  }
240
- Tr(l);
227
+ Ir(l);
241
228
  }
242
229
  return !0;
243
230
  },
244
- ownKeys(s) {
245
- a(l);
246
- var c = Reflect.ownKeys(s).filter((v) => {
247
- var m = r.get(v);
248
- return m === void 0 || m.v !== ue;
231
+ ownKeys(c) {
232
+ i(l);
233
+ var f = Reflect.ownKeys(c).filter((v) => {
234
+ var _ = r.get(v);
235
+ return _ === void 0 || _.v !== ae;
249
236
  });
250
- for (var [d, _] of r)
251
- _.v !== ue && !(d in s) && c.push(d);
252
- return c;
237
+ for (var [d, m] of r)
238
+ m.v !== ae && !(d in c) && f.push(d);
239
+ return f;
253
240
  },
254
241
  setPrototypeOf() {
255
- pa();
242
+ oa();
256
243
  }
257
244
  }
258
245
  );
259
246
  }
260
- function Tr(e, t = 1) {
247
+ function Ir(e, t = 1) {
261
248
  b(e, e.v + t);
262
249
  }
263
- var Hn, hi, vi, gi;
264
- function Pr() {
265
- if (Hn === void 0) {
266
- Hn = window, hi = /Firefox/.test(navigator.userAgent);
250
+ var Pn, no, oo, io;
251
+ function Tr() {
252
+ if (Pn === void 0) {
253
+ Pn = window, no = /Firefox/.test(navigator.userAgent);
267
254
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
268
- vi = it(t, "firstChild").get, gi = it(t, "nextSibling").get, Bn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Bn(r) && (r.__t = void 0);
255
+ oo = rt(t, "firstChild").get, io = rt(t, "nextSibling").get, Ln(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ln(r) && (r.__t = void 0);
269
256
  }
270
257
  }
271
- function mr(e = "") {
258
+ function vr(e = "") {
272
259
  return document.createTextNode(e);
273
260
  }
274
261
  // @__NO_SIDE_EFFECTS__
275
- function _e(e) {
276
- return vi.call(e);
262
+ function ve(e) {
263
+ return oo.call(e);
277
264
  }
278
265
  // @__NO_SIDE_EFFECTS__
279
- function Ze(e) {
280
- return gi.call(e);
266
+ function Be(e) {
267
+ return io.call(e);
281
268
  }
282
- function Z(e, t) {
283
- if (!F)
284
- return /* @__PURE__ */ _e(e);
269
+ function z(e, t) {
270
+ if (!O)
271
+ return /* @__PURE__ */ ve(e);
285
272
  var r = (
286
273
  /** @type {TemplateNode} */
287
- /* @__PURE__ */ _e(O)
274
+ /* @__PURE__ */ ve(P)
288
275
  );
289
- return r === null && (r = O.appendChild(mr())), Ge(r), r;
276
+ return r === null && (r = P.appendChild(vr())), Ue(r), r;
290
277
  }
291
- function Ft(e, t) {
292
- if (!F) {
278
+ function Nt(e, t) {
279
+ if (!O) {
293
280
  var r = (
294
281
  /** @type {DocumentFragment} */
295
- /* @__PURE__ */ _e(
282
+ /* @__PURE__ */ ve(
296
283
  /** @type {Node} */
297
284
  e
298
285
  )
299
286
  );
300
- return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Ze(r) : r;
287
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Be(r) : r;
301
288
  }
302
- return O;
289
+ return P;
303
290
  }
304
- function z(e, t = 1, r = !1) {
305
- let i = F ? O : e;
291
+ function J(e, t = 1, r = !1) {
292
+ let o = O ? P : e;
306
293
  for (var l; t--; )
307
- l = i, i = /** @type {TemplateNode} */
308
- /* @__PURE__ */ Ze(i);
309
- if (!F)
310
- return i;
311
- var o = i == null ? void 0 : i.nodeType;
312
- if (r && o !== 3) {
313
- var f = mr();
314
- return i === null ? l == null || l.after(f) : i.before(f), Ge(f), f;
315
- }
316
- return Ge(i), /** @type {TemplateNode} */
317
- i;
318
- }
319
- function ya(e) {
294
+ l = o, o = /** @type {TemplateNode} */
295
+ /* @__PURE__ */ Be(o);
296
+ if (!O)
297
+ return o;
298
+ var a = o?.nodeType;
299
+ if (r && a !== 3) {
300
+ var s = vr();
301
+ return o === null ? l?.after(s) : o.before(s), Ue(s), s;
302
+ }
303
+ return Ue(o), /** @type {TemplateNode} */
304
+ o;
305
+ }
306
+ function sa(e) {
320
307
  e.textContent = "";
321
308
  }
322
- function pi(e) {
309
+ function ao(e) {
323
310
  return e === this.v;
324
311
  }
325
- function mi(e, t) {
312
+ function lo(e, t) {
326
313
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
327
314
  }
328
- function Gr(e) {
329
- return !mi(e, this.v);
315
+ function jr(e) {
316
+ return !lo(e, this.v);
330
317
  }
331
318
  // @__NO_SIDE_EFFECTS__
332
- function _r(e) {
333
- var t = Ce | Ne, r = T !== null && (T.f & Ce) !== 0 ? (
319
+ function gr(e) {
320
+ var t = me | Ie, r = $ !== null && ($.f & me) !== 0 ? (
334
321
  /** @type {Derived} */
335
- T
322
+ $
336
323
  ) : null;
337
- return D === null || r !== null && (r.f & ve) !== 0 ? t |= ve : D.f |= ci, {
338
- ctx: oe,
324
+ return S === null || r !== null && (r.f & fe) !== 0 ? t |= fe : S.f |= to, {
325
+ ctx: ne,
339
326
  deps: null,
340
327
  effects: null,
341
- equals: pi,
328
+ equals: ao,
342
329
  f: t,
343
330
  fn: e,
344
331
  reactions: null,
@@ -348,33 +335,33 @@ function _r(e) {
348
335
  null
349
336
  ),
350
337
  wv: 0,
351
- parent: r ?? D
338
+ parent: r ?? S
352
339
  };
353
340
  }
354
341
  // @__NO_SIDE_EFFECTS__
355
- function Mt(e) {
356
- const t = /* @__PURE__ */ _r(e);
357
- return Si(t), t;
342
+ function Lt(e) {
343
+ const t = /* @__PURE__ */ gr(e);
344
+ return wo(t), t;
358
345
  }
359
346
  // @__NO_SIDE_EFFECTS__
360
- function wa(e) {
361
- const t = /* @__PURE__ */ _r(e);
362
- return t.equals = Gr, t;
347
+ function ua(e) {
348
+ const t = /* @__PURE__ */ gr(e);
349
+ return t.equals = jr, t;
363
350
  }
364
- function _i(e) {
351
+ function so(e) {
365
352
  var t = e.effects;
366
353
  if (t !== null) {
367
354
  e.effects = null;
368
355
  for (var r = 0; r < t.length; r += 1)
369
- We(
356
+ je(
370
357
  /** @type {Effect} */
371
358
  t[r]
372
359
  );
373
360
  }
374
361
  }
375
- function Ea(e) {
362
+ function ca(e) {
376
363
  for (var t = e.parent; t !== null; ) {
377
- if ((t.f & Ce) === 0)
364
+ if ((t.f & me) === 0)
378
365
  return (
379
366
  /** @type {Effect} */
380
367
  t
@@ -383,34 +370,34 @@ function Ea(e) {
383
370
  }
384
371
  return null;
385
372
  }
386
- function bi(e) {
387
- var t, r = D;
388
- Ye(Ea(e));
373
+ function uo(e) {
374
+ var t, r = S;
375
+ qe(ca(e));
389
376
  try {
390
- _i(e), t = Li(e);
377
+ so(e), t = ko(e);
391
378
  } finally {
392
- Ye(r);
379
+ qe(r);
393
380
  }
394
381
  return t;
395
382
  }
396
- function yi(e) {
397
- var t = bi(e), r = (He || (e.f & ve) !== 0) && e.deps !== null ? st : fe;
398
- xe(e, r), e.equals(t) || (e.v = t, e.wv = Di());
383
+ function co(e) {
384
+ var t = uo(e), r = (Ve || (e.f & fe) !== 0) && e.deps !== null ? at : le;
385
+ _e(e, r), e.equals(t) || (e.v = t, e.wv = xo());
399
386
  }
400
- function Ca(e) {
401
- D === null && T === null && ca(), T !== null && (T.f & ve) !== 0 && D === null && fa(), Wt && ua();
387
+ function fa(e) {
388
+ S === null && $ === null && Qi(), $ !== null && ($.f & fe) !== 0 && S === null && Xi(), qt && Ki();
402
389
  }
403
- function xa(e, t) {
390
+ function da(e, t) {
404
391
  var r = t.last;
405
392
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
406
393
  }
407
- function ut(e, t, r, i = !0) {
408
- var l = D, o = {
409
- ctx: oe,
394
+ function lt(e, t, r, o = !0) {
395
+ var l = S, a = {
396
+ ctx: ne,
410
397
  deps: null,
411
398
  nodes_start: null,
412
399
  nodes_end: null,
413
- f: e | Ne,
400
+ f: e | Ie,
414
401
  first: null,
415
402
  fn: t,
416
403
  last: null,
@@ -423,463 +410,461 @@ function ut(e, t, r, i = !0) {
423
410
  };
424
411
  if (r)
425
412
  try {
426
- Jr(o), o.f |= aa;
427
- } catch (c) {
428
- throw We(o), c;
413
+ Wr(a), a.f |= Zi;
414
+ } catch (f) {
415
+ throw je(a), f;
429
416
  }
430
- else t !== null && yr(o);
431
- var f = r && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (ci | sr)) === 0;
432
- if (!f && i && (l !== null && xa(o, l), T !== null && (T.f & Ce) !== 0)) {
433
- var s = (
417
+ else t !== null && mr(a);
418
+ var s = r && a.deps === null && a.first === null && a.nodes_start === null && a.teardown === null && (a.f & (to | ir)) === 0;
419
+ if (!s && o && (l !== null && da(a, l), $ !== null && ($.f & me) !== 0)) {
420
+ var c = (
434
421
  /** @type {Derived} */
435
- T
422
+ $
436
423
  );
437
- (s.effects ?? (s.effects = [])).push(o);
424
+ (c.effects ??= []).push(a);
438
425
  }
439
- return o;
426
+ return a;
440
427
  }
441
- function Wr(e) {
442
- const t = ut(vr, null, !1);
443
- return xe(t, fe), t.teardown = e, t;
428
+ function qr(e) {
429
+ const t = lt(fr, null, !1);
430
+ return _e(t, le), t.teardown = e, t;
444
431
  }
445
- function Or(e) {
446
- Ca();
447
- var t = D !== null && (D.f & Fe) !== 0 && oe !== null && !oe.m;
432
+ function Dr(e) {
433
+ fa();
434
+ var t = S !== null && (S.f & De) !== 0 && ne !== null && !ne.m;
448
435
  if (t) {
449
436
  var r = (
450
437
  /** @type {ComponentContext} */
451
- oe
438
+ ne
452
439
  );
453
- (r.e ?? (r.e = [])).push({
440
+ (r.e ??= []).push({
454
441
  fn: e,
455
- effect: D,
456
- reaction: T
442
+ effect: S,
443
+ reaction: $
457
444
  });
458
445
  } else {
459
- var i = Yr(e);
460
- return i;
446
+ var o = Br(e);
447
+ return o;
461
448
  }
462
449
  }
463
- function ka(e) {
464
- const t = ut(lt, e, !0);
450
+ function ha(e) {
451
+ const t = lt(it, e, !0);
465
452
  return () => {
466
- We(t);
453
+ je(t);
467
454
  };
468
455
  }
469
- function Aa(e) {
470
- const t = ut(lt, e, !0);
471
- return (r = {}) => new Promise((i) => {
472
- r.outro ? Mr(t, () => {
473
- We(t), i(void 0);
474
- }) : (We(t), i(void 0));
456
+ function va(e) {
457
+ const t = lt(it, e, !0);
458
+ return (r = {}) => new Promise((o) => {
459
+ r.outro ? Lr(t, () => {
460
+ je(t), o(void 0);
461
+ }) : (je(t), o(void 0));
475
462
  });
476
463
  }
477
- function Yr(e) {
478
- return ut(fi, e, !1);
464
+ function Br(e) {
465
+ return lt(eo, e, !1);
479
466
  }
480
- function Zr(e) {
481
- return ut(vr, e, !0);
467
+ function Hr(e) {
468
+ return lt(fr, e, !0);
482
469
  }
483
- function Se(e, t = [], r = _r) {
484
- const i = t.map(r);
485
- return wi(() => e(...i.map(a)));
470
+ function Ce(e, t = [], r = gr) {
471
+ const o = t.map(r);
472
+ return fo(() => e(...o.map(i)));
486
473
  }
487
- function wi(e, t = 0) {
488
- return ut(vr | Br | t, e, !0);
474
+ function fo(e, t = 0) {
475
+ return lt(fr | Vr | t, e, !0);
489
476
  }
490
- function Fr(e, t = !0) {
491
- return ut(vr | Fe, e, !0, t);
477
+ function Nr(e, t = !0) {
478
+ return lt(fr | De, e, !0, t);
492
479
  }
493
- function Ei(e) {
480
+ function ho(e) {
494
481
  var t = e.teardown;
495
482
  if (t !== null) {
496
- const r = Wt, i = T;
497
- Wn(!0), Le(null);
483
+ const r = qt, o = $;
484
+ Fn(!0), Re(null);
498
485
  try {
499
486
  t.call(null);
500
487
  } finally {
501
- Wn(r), Le(i);
488
+ Fn(r), Re(o);
502
489
  }
503
490
  }
504
491
  }
505
- function Ci(e, t = !1) {
492
+ function vo(e, t = !1) {
506
493
  var r = e.first;
507
494
  for (e.first = e.last = null; r !== null; ) {
508
- var i = r.next;
509
- (r.f & lt) !== 0 ? r.parent = null : We(r, t), r = i;
495
+ var o = r.next;
496
+ (r.f & it) !== 0 ? r.parent = null : je(r, t), r = o;
510
497
  }
511
498
  }
512
- function Ia(e) {
499
+ function ga(e) {
513
500
  for (var t = e.first; t !== null; ) {
514
501
  var r = t.next;
515
- (t.f & Fe) === 0 && We(t), t = r;
502
+ (t.f & De) === 0 && je(t), t = r;
516
503
  }
517
504
  }
518
- function We(e, t = !0) {
505
+ function je(e, t = !0) {
519
506
  var r = !1;
520
- (t || (e.f & la) !== 0) && e.nodes_start !== null && (xi(
507
+ (t || (e.f & zi) !== 0) && e.nodes_start !== null && (go(
521
508
  e.nodes_start,
522
509
  /** @type {TemplateNode} */
523
510
  e.nodes_end
524
- ), r = !0), Ci(e, t && !r), hr(e, 0), xe(e, gr);
525
- var i = e.transitions;
526
- if (i !== null)
527
- for (const o of i)
528
- o.stop();
529
- Ei(e);
511
+ ), r = !0), vo(e, t && !r), cr(e, 0), _e(e, dr);
512
+ var o = e.transitions;
513
+ if (o !== null)
514
+ for (const a of o)
515
+ a.stop();
516
+ ho(e);
530
517
  var l = e.parent;
531
- l !== null && l.first !== null && ki(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
518
+ l !== null && l.first !== null && po(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
532
519
  }
533
- function xi(e, t) {
520
+ function go(e, t) {
534
521
  for (; e !== null; ) {
535
522
  var r = e === t ? null : (
536
523
  /** @type {TemplateNode} */
537
- /* @__PURE__ */ Ze(e)
524
+ /* @__PURE__ */ Be(e)
538
525
  );
539
526
  e.remove(), e = r;
540
527
  }
541
528
  }
542
- function ki(e) {
543
- var t = e.parent, r = e.prev, i = e.next;
544
- r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
529
+ function po(e) {
530
+ var t = e.parent, r = e.prev, o = e.next;
531
+ r !== null && (r.next = o), o !== null && (o.prev = r), t !== null && (t.first === e && (t.first = o), t.last === e && (t.last = r));
545
532
  }
546
- function Mr(e, t) {
533
+ function Lr(e, t) {
547
534
  var r = [];
548
- Ai(e, r, !0), Ra(r, () => {
549
- We(e), t && t();
535
+ mo(e, r, !0), pa(r, () => {
536
+ je(e), t && t();
550
537
  });
551
538
  }
552
- function Ra(e, t) {
539
+ function pa(e, t) {
553
540
  var r = e.length;
554
541
  if (r > 0) {
555
- var i = () => --r || t();
542
+ var o = () => --r || t();
556
543
  for (var l of e)
557
- l.out(i);
544
+ l.out(o);
558
545
  } else
559
546
  t();
560
547
  }
561
- function Ai(e, t, r) {
562
- if ((e.f & xt) === 0) {
563
- if (e.f ^= xt, e.transitions !== null)
564
- for (const f of e.transitions)
565
- (f.is_global || r) && t.push(f);
566
- for (var i = e.first; i !== null; ) {
567
- var l = i.next, o = (i.f & Hr) !== 0 || (i.f & Fe) !== 0;
568
- Ai(i, t, o ? r : !1), i = l;
548
+ function mo(e, t, r) {
549
+ if ((e.f & wt) === 0) {
550
+ if (e.f ^= wt, e.transitions !== null)
551
+ for (const s of e.transitions)
552
+ (s.is_global || r) && t.push(s);
553
+ for (var o = e.first; o !== null; ) {
554
+ var l = o.next, a = (o.f & Ur) !== 0 || (o.f & De) !== 0;
555
+ mo(o, t, a ? r : !1), o = l;
569
556
  }
570
557
  }
571
558
  }
572
- function Gn(e) {
573
- Ii(e, !0);
559
+ function On(e) {
560
+ _o(e, !0);
574
561
  }
575
- function Ii(e, t) {
576
- if ((e.f & xt) !== 0) {
577
- e.f ^= xt, (e.f & fe) === 0 && (e.f ^= fe), Yt(e) && (xe(e, Ne), yr(e));
562
+ function _o(e, t) {
563
+ if ((e.f & wt) !== 0) {
564
+ e.f ^= wt, (e.f & le) === 0 && (e.f ^= le), Bt(e) && (_e(e, Ie), mr(e));
578
565
  for (var r = e.first; r !== null; ) {
579
- var i = r.next, l = (r.f & Hr) !== 0 || (r.f & Fe) !== 0;
580
- Ii(r, l ? t : !1), r = i;
566
+ var o = r.next, l = (r.f & Ur) !== 0 || (r.f & De) !== 0;
567
+ _o(r, l ? t : !1), r = o;
581
568
  }
582
569
  if (e.transitions !== null)
583
- for (const o of e.transitions)
584
- (o.is_global || t) && o.in();
570
+ for (const a of e.transitions)
571
+ (a.is_global || t) && a.in();
585
572
  }
586
573
  }
587
- const $a = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
588
- let Bt = [], Ht = [];
589
- function Ri() {
590
- var e = Bt;
591
- Bt = [], ui(e);
574
+ const ma = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
575
+ let Vt = [], Ut = [];
576
+ function bo() {
577
+ var e = Vt;
578
+ Vt = [], Qn(e);
592
579
  }
593
- function $i() {
594
- var e = Ht;
595
- Ht = [], ui(e);
580
+ function yo() {
581
+ var e = Ut;
582
+ Ut = [], Qn(e);
596
583
  }
597
- function zr(e) {
598
- Bt.length === 0 && queueMicrotask(Ri), Bt.push(e);
584
+ function Gr(e) {
585
+ Vt.length === 0 && queueMicrotask(bo), Vt.push(e);
599
586
  }
600
- function Sa(e) {
601
- Ht.length === 0 && $a($i), Ht.push(e);
587
+ function _a(e) {
588
+ Ut.length === 0 && ma(yo), Ut.push(e);
602
589
  }
603
- function Ta() {
604
- Bt.length > 0 && Ri(), Ht.length > 0 && $i();
590
+ function ba() {
591
+ Vt.length > 0 && bo(), Ut.length > 0 && yo();
605
592
  }
606
- let ir = !1, fr = !1, cr = null, ot = !1, Wt = !1;
607
- function Wn(e) {
608
- Wt = e;
593
+ let tr = !1, lr = !1, sr = null, nt = !1, qt = !1;
594
+ function Fn(e) {
595
+ qt = e;
609
596
  }
610
- let jt = [];
611
- let T = null, Te = !1;
612
- function Le(e) {
613
- T = e;
597
+ let Ft = [];
598
+ let $ = null, ke = !1;
599
+ function Re(e) {
600
+ $ = e;
614
601
  }
615
- let D = null;
616
- function Ye(e) {
617
- D = e;
602
+ let S = null;
603
+ function qe(e) {
604
+ S = e;
618
605
  }
619
- let ie = null;
620
- function Si(e) {
621
- T !== null && T.f & Lr && (ie === null ? ie = [e] : ie.push(e));
606
+ let Te = null;
607
+ function wo(e) {
608
+ $ !== null && $.f & Sr && (Te === null ? Te = [e] : Te.push(e));
622
609
  }
623
- let ne = null, he = 0, pe = null;
624
- function Da(e) {
625
- pe = e;
610
+ let re = null, ce = 0, he = null;
611
+ function ya(e) {
612
+ he = e;
626
613
  }
627
- let Ti = 1, dr = 0, He = !1;
628
- function Di() {
629
- return ++Ti;
614
+ let Eo = 1, ur = 0, Ve = !1;
615
+ function xo() {
616
+ return ++Eo;
630
617
  }
631
- function Yt(e) {
632
- var v;
618
+ function Bt(e) {
633
619
  var t = e.f;
634
- if ((t & Ne) !== 0)
620
+ if ((t & Ie) !== 0)
635
621
  return !0;
636
- if ((t & st) !== 0) {
637
- var r = e.deps, i = (t & ve) !== 0;
622
+ if ((t & at) !== 0) {
623
+ var r = e.deps, o = (t & fe) !== 0;
638
624
  if (r !== null) {
639
- var l, o, f = (t & ur) !== 0, s = i && D !== null && !He, c = r.length;
640
- if (f || s) {
625
+ var l, a, s = (t & ar) !== 0, c = o && S !== null && !Ve, f = r.length;
626
+ if (s || c) {
641
627
  var d = (
642
628
  /** @type {Derived} */
643
629
  e
644
- ), _ = d.parent;
645
- for (l = 0; l < c; l++)
646
- o = r[l], (f || !((v = o == null ? void 0 : o.reactions) != null && v.includes(d))) && (o.reactions ?? (o.reactions = [])).push(d);
647
- f && (d.f ^= ur), s && _ !== null && (_.f & ve) === 0 && (d.f ^= ve);
630
+ ), m = d.parent;
631
+ for (l = 0; l < f; l++)
632
+ a = r[l], (s || !a?.reactions?.includes(d)) && (a.reactions ??= []).push(d);
633
+ s && (d.f ^= ar), c && m !== null && (m.f & fe) === 0 && (d.f ^= fe);
648
634
  }
649
- for (l = 0; l < c; l++)
650
- if (o = r[l], Yt(
635
+ for (l = 0; l < f; l++)
636
+ if (a = r[l], Bt(
651
637
  /** @type {Derived} */
652
- o
653
- ) && yi(
638
+ a
639
+ ) && co(
654
640
  /** @type {Derived} */
655
- o
656
- ), o.wv > e.wv)
641
+ a
642
+ ), a.wv > e.wv)
657
643
  return !0;
658
644
  }
659
- (!i || D !== null && !He) && xe(e, fe);
645
+ (!o || S !== null && !Ve) && _e(e, le);
660
646
  }
661
647
  return !1;
662
648
  }
663
- function Na(e, t) {
649
+ function wa(e, t) {
664
650
  for (var r = t; r !== null; ) {
665
- if ((r.f & sr) !== 0)
651
+ if ((r.f & ir) !== 0)
666
652
  try {
667
653
  r.fn(e);
668
654
  return;
669
655
  } catch {
670
- r.f ^= sr;
656
+ r.f ^= ir;
671
657
  }
672
658
  r = r.parent;
673
659
  }
674
- throw ir = !1, e;
660
+ throw tr = !1, e;
675
661
  }
676
- function Yn(e) {
677
- return (e.f & gr) === 0 && (e.parent === null || (e.parent.f & sr) === 0);
662
+ function Mn(e) {
663
+ return (e.f & dr) === 0 && (e.parent === null || (e.parent.f & ir) === 0);
678
664
  }
679
- function br(e, t, r, i) {
680
- if (ir) {
681
- if (r === null && (ir = !1), Yn(t))
665
+ function pr(e, t, r, o) {
666
+ if (tr) {
667
+ if (r === null && (tr = !1), Mn(t))
682
668
  throw e;
683
669
  return;
684
670
  }
685
- if (r !== null && (ir = !0), Na(e, t), Yn(t))
671
+ if (r !== null && (tr = !0), wa(e, t), Mn(t))
686
672
  throw e;
687
673
  }
688
- function Ni(e, t, r = !0) {
689
- var i = e.reactions;
690
- if (i !== null)
691
- for (var l = 0; l < i.length; l++) {
692
- var o = i[l];
693
- ie != null && ie.includes(e) || ((o.f & Ce) !== 0 ? Ni(
674
+ function Co(e, t, r = !0) {
675
+ var o = e.reactions;
676
+ if (o !== null)
677
+ for (var l = 0; l < o.length; l++) {
678
+ var a = o[l];
679
+ Te?.includes(e) || ((a.f & me) !== 0 ? Co(
694
680
  /** @type {Derived} */
695
- o,
681
+ a,
696
682
  t,
697
683
  !1
698
- ) : t === o && (r ? xe(o, Ne) : (o.f & fe) !== 0 && xe(o, st), yr(
684
+ ) : t === a && (r ? _e(a, Ie) : (a.f & le) !== 0 && _e(a, at), mr(
699
685
  /** @type {Effect} */
700
- o
686
+ a
701
687
  )));
702
688
  }
703
689
  }
704
- function Li(e) {
705
- var y;
706
- var t = ne, r = he, i = pe, l = T, o = He, f = ie, s = oe, c = Te, d = e.f;
707
- ne = /** @type {null | Value[]} */
708
- null, he = 0, pe = null, He = (d & ve) !== 0 && (Te || !ot || T === null), T = (d & (Fe | lt)) === 0 ? e : null, ie = null, Zn(e.ctx), Te = !1, dr++, e.f |= Lr;
690
+ function ko(e) {
691
+ var t = re, r = ce, o = he, l = $, a = Ve, s = Te, c = ne, f = ke, d = e.f;
692
+ re = /** @type {null | Value[]} */
693
+ null, ce = 0, he = null, Ve = (d & fe) !== 0 && (ke || !nt || $ === null), $ = (d & (De | it)) === 0 ? e : null, Te = null, Vn(e.ctx), ke = !1, ur++, e.f |= Sr;
709
694
  try {
710
- var _ = (
695
+ var m = (
711
696
  /** @type {Function} */
712
697
  (0, e.fn)()
713
698
  ), v = e.deps;
714
- if (ne !== null) {
715
- var m;
716
- if (hr(e, he), v !== null && he > 0)
717
- for (v.length = he + ne.length, m = 0; m < ne.length; m++)
718
- v[he + m] = ne[m];
699
+ if (re !== null) {
700
+ var _;
701
+ if (cr(e, ce), v !== null && ce > 0)
702
+ for (v.length = ce + re.length, _ = 0; _ < re.length; _++)
703
+ v[ce + _] = re[_];
719
704
  else
720
- e.deps = v = ne;
721
- if (!He)
722
- for (m = he; m < v.length; m++)
723
- ((y = v[m]).reactions ?? (y.reactions = [])).push(e);
724
- } else v !== null && he < v.length && (hr(e, he), v.length = he);
725
- if (Ui() && pe !== null && !Te && v !== null && (e.f & (Ce | st | Ne)) === 0)
726
- for (m = 0; m < /** @type {Source[]} */
727
- pe.length; m++)
728
- Ni(
729
- pe[m],
705
+ e.deps = v = re;
706
+ if (!Ve)
707
+ for (_ = ce; _ < v.length; _++)
708
+ (v[_].reactions ??= []).push(e);
709
+ } else v !== null && ce < v.length && (cr(e, ce), v.length = ce);
710
+ if (To() && he !== null && !ke && v !== null && (e.f & (me | at | Ie)) === 0)
711
+ for (_ = 0; _ < /** @type {Source[]} */
712
+ he.length; _++)
713
+ Co(
714
+ he[_],
730
715
  /** @type {Effect} */
731
716
  e
732
717
  );
733
- return l !== null && l !== e && (dr++, pe !== null && (i === null ? i = pe : i.push(.../** @type {Source[]} */
734
- pe))), _;
718
+ return l !== null && l !== e && (ur++, he !== null && (o === null ? o = he : o.push(.../** @type {Source[]} */
719
+ he))), m;
735
720
  } finally {
736
- ne = t, he = r, pe = i, T = l, He = o, ie = f, Zn(s), Te = c, e.f ^= Lr;
721
+ re = t, ce = r, he = o, $ = l, Ve = a, Te = s, Vn(c), ke = f, e.f ^= Sr;
737
722
  }
738
723
  }
739
- function La(e, t) {
724
+ function Ea(e, t) {
740
725
  let r = t.reactions;
741
726
  if (r !== null) {
742
- var i = ea.call(r, e);
743
- if (i !== -1) {
727
+ var o = qi.call(r, e);
728
+ if (o !== -1) {
744
729
  var l = r.length - 1;
745
- l === 0 ? r = t.reactions = null : (r[i] = r[l], r.pop());
730
+ l === 0 ? r = t.reactions = null : (r[o] = r[l], r.pop());
746
731
  }
747
732
  }
748
- r === null && (t.f & Ce) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
733
+ r === null && (t.f & me) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
749
734
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
750
735
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
751
- (ne === null || !ne.includes(t)) && (xe(t, st), (t.f & (ve | ur)) === 0 && (t.f ^= ur), _i(
736
+ (re === null || !re.includes(t)) && (_e(t, at), (t.f & (fe | ar)) === 0 && (t.f ^= ar), so(
752
737
  /** @type {Derived} **/
753
738
  t
754
- ), hr(
739
+ ), cr(
755
740
  /** @type {Derived} **/
756
741
  t,
757
742
  0
758
743
  ));
759
744
  }
760
- function hr(e, t) {
745
+ function cr(e, t) {
761
746
  var r = e.deps;
762
747
  if (r !== null)
763
- for (var i = t; i < r.length; i++)
764
- La(e, r[i]);
748
+ for (var o = t; o < r.length; o++)
749
+ Ea(e, r[o]);
765
750
  }
766
- function Jr(e) {
751
+ function Wr(e) {
767
752
  var t = e.f;
768
- if ((t & gr) === 0) {
769
- xe(e, fe);
770
- var r = D, i = oe, l = ot;
771
- D = e, ot = !0;
753
+ if ((t & dr) === 0) {
754
+ _e(e, le);
755
+ var r = S, o = ne, l = nt;
756
+ S = e, nt = !0;
772
757
  try {
773
- (t & Br) !== 0 ? Ia(e) : Ci(e), Ei(e);
774
- var o = Li(e);
775
- e.teardown = typeof o == "function" ? o : null, e.wv = Ti;
776
- var f = e.deps, s;
777
- qn && ba && e.f & Ne;
778
- } catch (c) {
779
- br(c, e, r, i || e.ctx);
758
+ (t & Vr) !== 0 ? ga(e) : vo(e), ho(e);
759
+ var a = ko(e);
760
+ e.teardown = typeof a == "function" ? a : null, e.wv = Eo;
761
+ var s = e.deps, c;
762
+ Nn && la && e.f & Ie;
763
+ } catch (f) {
764
+ pr(f, e, r, o || e.ctx);
780
765
  } finally {
781
- ot = l, D = r;
766
+ nt = l, S = r;
782
767
  }
783
768
  }
784
769
  }
785
- function Pa() {
770
+ function xa() {
786
771
  try {
787
- da();
772
+ ea();
788
773
  } catch (e) {
789
- if (cr !== null)
790
- br(e, cr, null);
774
+ if (sr !== null)
775
+ pr(e, sr, null);
791
776
  else
792
777
  throw e;
793
778
  }
794
779
  }
795
- function Pi() {
796
- var e = ot;
780
+ function Ao() {
781
+ var e = nt;
797
782
  try {
798
783
  var t = 0;
799
- for (ot = !0; jt.length > 0; ) {
800
- t++ > 1e3 && Pa();
801
- var r = jt, i = r.length;
802
- jt = [];
803
- for (var l = 0; l < i; l++) {
804
- var o = Fa(r[l]);
805
- Oa(o);
784
+ for (nt = !0; Ft.length > 0; ) {
785
+ t++ > 1e3 && xa();
786
+ var r = Ft, o = r.length;
787
+ Ft = [];
788
+ for (var l = 0; l < o; l++) {
789
+ var a = ka(r[l]);
790
+ Ca(a);
806
791
  }
807
- Gt.clear();
792
+ jt.clear();
808
793
  }
809
794
  } finally {
810
- fr = !1, ot = e, cr = null;
795
+ lr = !1, nt = e, sr = null;
811
796
  }
812
797
  }
813
- function Oa(e) {
798
+ function Ca(e) {
814
799
  var t = e.length;
815
800
  if (t !== 0)
816
801
  for (var r = 0; r < t; r++) {
817
- var i = e[r];
818
- if ((i.f & (gr | xt)) === 0)
802
+ var o = e[r];
803
+ if ((o.f & (dr | wt)) === 0)
819
804
  try {
820
- Yt(i) && (Jr(i), i.deps === null && i.first === null && i.nodes_start === null && (i.teardown === null ? ki(i) : i.fn = null));
805
+ Bt(o) && (Wr(o), o.deps === null && o.first === null && o.nodes_start === null && (o.teardown === null ? po(o) : o.fn = null));
821
806
  } catch (l) {
822
- br(l, i, null, i.ctx);
807
+ pr(l, o, null, o.ctx);
823
808
  }
824
809
  }
825
810
  }
826
- function yr(e) {
827
- fr || (fr = !0, queueMicrotask(Pi));
828
- for (var t = cr = e; t.parent !== null; ) {
811
+ function mr(e) {
812
+ lr || (lr = !0, queueMicrotask(Ao));
813
+ for (var t = sr = e; t.parent !== null; ) {
829
814
  t = t.parent;
830
815
  var r = t.f;
831
- if ((r & (lt | Fe)) !== 0) {
832
- if ((r & fe) === 0) return;
833
- t.f ^= fe;
816
+ if ((r & (it | De)) !== 0) {
817
+ if ((r & le) === 0) return;
818
+ t.f ^= le;
834
819
  }
835
820
  }
836
- jt.push(t);
821
+ Ft.push(t);
837
822
  }
838
- function Fa(e) {
823
+ function ka(e) {
839
824
  for (var t = [], r = e; r !== null; ) {
840
- var i = r.f, l = (i & (Fe | lt)) !== 0, o = l && (i & fe) !== 0;
841
- if (!o && (i & xt) === 0) {
842
- if ((i & fi) !== 0)
825
+ var o = r.f, l = (o & (De | it)) !== 0, a = l && (o & le) !== 0;
826
+ if (!a && (o & wt) === 0) {
827
+ if ((o & eo) !== 0)
843
828
  t.push(r);
844
829
  else if (l)
845
- r.f ^= fe;
830
+ r.f ^= le;
846
831
  else
847
832
  try {
848
- Yt(r) && Jr(r);
849
- } catch (c) {
850
- br(c, r, null, r.ctx);
833
+ Bt(r) && Wr(r);
834
+ } catch (f) {
835
+ pr(f, r, null, r.ctx);
851
836
  }
852
- var f = r.first;
853
- if (f !== null) {
854
- r = f;
837
+ var s = r.first;
838
+ if (s !== null) {
839
+ r = s;
855
840
  continue;
856
841
  }
857
842
  }
858
- var s = r.parent;
859
- for (r = r.next; r === null && s !== null; )
860
- r = s.next, s = s.parent;
843
+ var c = r.parent;
844
+ for (r = r.next; r === null && c !== null; )
845
+ r = c.next, c = c.parent;
861
846
  }
862
847
  return t;
863
848
  }
864
- function x(e) {
849
+ function E(e) {
865
850
  for (var t; ; ) {
866
- if (Ta(), jt.length === 0)
851
+ if (ba(), Ft.length === 0)
867
852
  return (
868
853
  /** @type {T} */
869
854
  t
870
855
  );
871
- fr = !0, Pi();
856
+ lr = !0, Ao();
872
857
  }
873
858
  }
874
- async function Dr() {
875
- await Promise.resolve(), x();
859
+ async function Rr() {
860
+ await Promise.resolve(), E();
876
861
  }
877
- function a(e) {
878
- var t = e.f, r = (t & Ce) !== 0;
879
- if (T !== null && !Te) {
880
- if (!(ie != null && ie.includes(e))) {
881
- var i = T.deps;
882
- e.rv < dr && (e.rv = dr, ne === null && i !== null && i[he] === e ? he++ : ne === null ? ne = [e] : (!He || !ne.includes(e)) && ne.push(e));
862
+ function i(e) {
863
+ var t = e.f, r = (t & me) !== 0;
864
+ if ($ !== null && !ke) {
865
+ if (!Te?.includes(e)) {
866
+ var o = $.deps;
867
+ e.rv < ur && (e.rv = ur, re === null && o !== null && o[ce] === e ? ce++ : re === null ? re = [e] : (!Ve || !re.includes(e)) && re.push(e));
883
868
  }
884
869
  } else if (r && /** @type {Derived} */
885
870
  e.deps === null && /** @type {Derived} */
@@ -887,84 +872,84 @@ function a(e) {
887
872
  var l = (
888
873
  /** @type {Derived} */
889
874
  e
890
- ), o = l.parent;
891
- o !== null && (o.f & ve) === 0 && (l.f ^= ve);
875
+ ), a = l.parent;
876
+ a !== null && (a.f & fe) === 0 && (l.f ^= fe);
892
877
  }
893
878
  return r && (l = /** @type {Derived} */
894
- e, Yt(l) && yi(l)), Wt && Gt.has(e) ? Gt.get(e) : e.v;
879
+ e, Bt(l) && co(l)), qt && jt.has(e) ? jt.get(e) : e.v;
895
880
  }
896
- function at(e) {
897
- var t = Te;
881
+ function ot(e) {
882
+ var t = ke;
898
883
  try {
899
- return Te = !0, e();
884
+ return ke = !0, e();
900
885
  } finally {
901
- Te = t;
886
+ ke = t;
902
887
  }
903
888
  }
904
- const Ma = -7169;
905
- function xe(e, t) {
906
- e.f = e.f & Ma | t;
889
+ const Aa = -7169;
890
+ function _e(e, t) {
891
+ e.f = e.f & Aa | t;
907
892
  }
908
- const Gt = /* @__PURE__ */ new Map();
909
- function Oi(e, t) {
893
+ const jt = /* @__PURE__ */ new Map();
894
+ function Io(e, t) {
910
895
  var r = {
911
896
  f: 0,
912
897
  // TODO ideally we could skip this altogether, but it causes type errors
913
898
  v: e,
914
899
  reactions: null,
915
- equals: pi,
900
+ equals: ao,
916
901
  rv: 0,
917
902
  wv: 0
918
903
  };
919
904
  return r;
920
905
  }
921
906
  // @__NO_SIDE_EFFECTS__
922
- function L(e, t) {
923
- const r = Oi(e);
924
- return Si(r), r;
907
+ function N(e, t) {
908
+ const r = Io(e);
909
+ return wo(r), r;
925
910
  }
926
911
  // @__NO_SIDE_EFFECTS__
927
- function Kr(e, t = !1) {
928
- const r = Oi(e);
929
- return t || (r.equals = Gr), r;
912
+ function Yr(e, t = !1) {
913
+ const r = Io(e);
914
+ return t || (r.equals = jr), r;
930
915
  }
931
916
  function b(e, t, r = !1) {
932
- T !== null && !Te && Ui() && (T.f & (Ce | Br)) !== 0 && !(ie != null && ie.includes(e)) && ma();
933
- let i = r ? Be(t) : t;
934
- return Va(e, i);
917
+ $ !== null && !ke && To() && ($.f & (me | Vr)) !== 0 && !Te?.includes(e) && ia();
918
+ let o = r ? Me(t) : t;
919
+ return Ia(e, o);
935
920
  }
936
- function Va(e, t) {
921
+ function Ia(e, t) {
937
922
  if (!e.equals(t)) {
938
923
  var r = e.v;
939
- Wt ? Gt.set(e, t) : Gt.set(e, r), e.v = t, (e.f & Ce) !== 0 && ((e.f & Ne) !== 0 && bi(
924
+ qt ? jt.set(e, t) : jt.set(e, r), e.v = t, (e.f & me) !== 0 && ((e.f & Ie) !== 0 && uo(
940
925
  /** @type {Derived} */
941
926
  e
942
- ), xe(e, (e.f & ve) === 0 ? fe : st)), e.wv = Di(), Fi(e, Ne), D !== null && (D.f & fe) !== 0 && (D.f & (Fe | lt)) === 0 && (pe === null ? Da([e]) : pe.push(e));
927
+ ), _e(e, (e.f & fe) === 0 ? le : at)), e.wv = xo(), Ro(e, Ie), S !== null && (S.f & le) !== 0 && (S.f & (De | it)) === 0 && (he === null ? ya([e]) : he.push(e));
943
928
  }
944
929
  return t;
945
930
  }
946
- function Fi(e, t) {
931
+ function Ro(e, t) {
947
932
  var r = e.reactions;
948
933
  if (r !== null)
949
- for (var i = r.length, l = 0; l < i; l++) {
950
- var o = r[l], f = o.f;
951
- (f & Ne) === 0 && (xe(o, t), (f & (fe | ve)) !== 0 && ((f & Ce) !== 0 ? Fi(
934
+ for (var o = r.length, l = 0; l < o; l++) {
935
+ var a = r[l], s = a.f;
936
+ (s & Ie) === 0 && (_e(a, t), (s & (le | fe)) !== 0 && ((s & me) !== 0 ? Ro(
952
937
  /** @type {Derived} */
953
- o,
954
- st
955
- ) : yr(
938
+ a,
939
+ at
940
+ ) : mr(
956
941
  /** @type {Effect} */
957
- o
942
+ a
958
943
  )));
959
944
  }
960
945
  }
961
- let oe = null;
962
- function Zn(e) {
963
- oe = e;
946
+ let ne = null;
947
+ function Vn(e) {
948
+ ne = e;
964
949
  }
965
- function Mi(e, t = !1, r) {
966
- var i = oe = {
967
- p: oe,
950
+ function $o(e, t = !1, r) {
951
+ var o = ne = {
952
+ p: ne,
968
953
  c: null,
969
954
  d: !1,
970
955
  e: null,
@@ -973,117 +958,115 @@ function Mi(e, t = !1, r) {
973
958
  x: null,
974
959
  l: null
975
960
  };
976
- Wr(() => {
977
- i.d = !0;
961
+ qr(() => {
962
+ o.d = !0;
978
963
  });
979
964
  }
980
- function Vi(e) {
981
- const t = oe;
965
+ function So(e) {
966
+ const t = ne;
982
967
  if (t !== null) {
983
968
  e !== void 0 && (t.x = e);
984
- const f = t.e;
985
- if (f !== null) {
986
- var r = D, i = T;
969
+ const s = t.e;
970
+ if (s !== null) {
971
+ var r = S, o = $;
987
972
  t.e = null;
988
973
  try {
989
- for (var l = 0; l < f.length; l++) {
990
- var o = f[l];
991
- Ye(o.effect), Le(o.reaction), Yr(o.fn);
974
+ for (var l = 0; l < s.length; l++) {
975
+ var a = s[l];
976
+ qe(a.effect), Re(a.reaction), Br(a.fn);
992
977
  }
993
978
  } finally {
994
- Ye(r), Le(i);
979
+ qe(r), Re(o);
995
980
  }
996
981
  }
997
- oe = t.p, t.m = !0;
982
+ ne = t.p, t.m = !0;
998
983
  }
999
984
  return e || /** @type {T} */
1000
985
  {};
1001
986
  }
1002
- function Ui() {
987
+ function To() {
1003
988
  return !0;
1004
989
  }
1005
- const Ua = ["touchstart", "touchmove"];
1006
- function ja(e) {
1007
- return Ua.includes(e);
990
+ const Ra = ["touchstart", "touchmove"];
991
+ function $a(e) {
992
+ return Ra.includes(e);
1008
993
  }
1009
- function qa(e, t) {
994
+ function Sa(e, t) {
1010
995
  if (t) {
1011
996
  const r = document.body;
1012
- e.autofocus = !0, zr(() => {
997
+ e.autofocus = !0, Gr(() => {
1013
998
  document.activeElement === r && e.focus();
1014
999
  });
1015
1000
  }
1016
1001
  }
1017
- let zn = !1;
1018
- function ji() {
1019
- zn || (zn = !0, document.addEventListener(
1002
+ let Un = !1;
1003
+ function Do() {
1004
+ Un || (Un = !0, document.addEventListener(
1020
1005
  "reset",
1021
1006
  (e) => {
1022
1007
  Promise.resolve().then(() => {
1023
- var t;
1024
1008
  if (!e.defaultPrevented)
1025
1009
  for (
1026
- const r of
1010
+ const t of
1027
1011
  /**@type {HTMLFormElement} */
1028
1012
  e.target.elements
1029
1013
  )
1030
- (t = r.__on_r) == null || t.call(r);
1014
+ t.__on_r?.();
1031
1015
  });
1032
1016
  },
1033
1017
  // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
1034
1018
  { capture: !0 }
1035
1019
  ));
1036
1020
  }
1037
- function qi(e) {
1038
- var t = T, r = D;
1039
- Le(null), Ye(null);
1021
+ function No(e) {
1022
+ var t = $, r = S;
1023
+ Re(null), qe(null);
1040
1024
  try {
1041
1025
  return e();
1042
1026
  } finally {
1043
- Le(t), Ye(r);
1027
+ Re(t), qe(r);
1044
1028
  }
1045
1029
  }
1046
- function Ba(e, t, r, i = r) {
1047
- e.addEventListener(t, () => qi(r));
1030
+ function Ta(e, t, r, o = r) {
1031
+ e.addEventListener(t, () => No(r));
1048
1032
  const l = e.__on_r;
1049
1033
  l ? e.__on_r = () => {
1050
- l(), i(!0);
1051
- } : e.__on_r = () => i(!0), ji();
1052
- }
1053
- const Bi = /* @__PURE__ */ new Set(), Vr = /* @__PURE__ */ new Set();
1054
- function Ha(e, t, r, i = {}) {
1055
- function l(o) {
1056
- if (i.capture || Vt.call(t, o), !o.cancelBubble)
1057
- return qi(() => r == null ? void 0 : r.call(this, o));
1058
- }
1059
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? zr(() => {
1060
- t.addEventListener(e, l, i);
1061
- }) : t.addEventListener(e, l, i), l;
1062
- }
1063
- function qe(e, t, r, i, l) {
1064
- var o = { capture: i, passive: l }, f = Ha(e, t, r, o);
1065
- (t === document.body || t === window || t === document) && Wr(() => {
1066
- t.removeEventListener(e, f, o);
1034
+ l(), o(!0);
1035
+ } : e.__on_r = () => o(!0), Do();
1036
+ }
1037
+ const Lo = /* @__PURE__ */ new Set(), Pr = /* @__PURE__ */ new Set();
1038
+ function Da(e, t, r, o = {}) {
1039
+ function l(a) {
1040
+ if (o.capture || Pt.call(t, a), !a.cancelBubble)
1041
+ return No(() => r?.call(this, a));
1042
+ }
1043
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Gr(() => {
1044
+ t.addEventListener(e, l, o);
1045
+ }) : t.addEventListener(e, l, o), l;
1046
+ }
1047
+ function Fe(e, t, r, o, l) {
1048
+ var a = { capture: o, passive: l }, s = Da(e, t, r, a);
1049
+ (t === document.body || t === window || t === document) && qr(() => {
1050
+ t.removeEventListener(e, s, a);
1067
1051
  });
1068
1052
  }
1069
- function Ga(e) {
1053
+ function Na(e) {
1070
1054
  for (var t = 0; t < e.length; t++)
1071
- Bi.add(e[t]);
1072
- for (var r of Vr)
1055
+ Lo.add(e[t]);
1056
+ for (var r of Pr)
1073
1057
  r(e);
1074
1058
  }
1075
- function Vt(e) {
1076
- var K;
1059
+ function Pt(e) {
1077
1060
  var t = this, r = (
1078
1061
  /** @type {Node} */
1079
1062
  t.ownerDocument
1080
- ), i = e.type, l = ((K = e.composedPath) == null ? void 0 : K.call(e)) || [], o = (
1063
+ ), o = e.type, l = e.composedPath?.() || [], a = (
1081
1064
  /** @type {null | Element} */
1082
1065
  l[0] || e.target
1083
- ), f = 0, s = e.__root;
1084
- if (s) {
1085
- var c = l.indexOf(s);
1086
- if (c !== -1 && (t === document || t === /** @type {any} */
1066
+ ), s = 0, c = e.__root;
1067
+ if (c) {
1068
+ var f = l.indexOf(c);
1069
+ if (f !== -1 && (t === document || t === /** @type {any} */
1087
1070
  window)) {
1088
1071
  e.__root = t;
1089
1072
  return;
@@ -1091,122 +1074,122 @@ function Vt(e) {
1091
1074
  var d = l.indexOf(t);
1092
1075
  if (d === -1)
1093
1076
  return;
1094
- c <= d && (f = c);
1077
+ f <= d && (s = f);
1095
1078
  }
1096
- if (o = /** @type {Element} */
1097
- l[f] || e.target, o !== t) {
1098
- qt(e, "currentTarget", {
1079
+ if (a = /** @type {Element} */
1080
+ l[s] || e.target, a !== t) {
1081
+ Mt(e, "currentTarget", {
1099
1082
  configurable: !0,
1100
1083
  get() {
1101
- return o || r;
1084
+ return a || r;
1102
1085
  }
1103
1086
  });
1104
- var _ = T, v = D;
1105
- Le(null), Ye(null);
1087
+ var m = $, v = S;
1088
+ Re(null), qe(null);
1106
1089
  try {
1107
- for (var m, y = []; o !== null; ) {
1108
- var $ = o.assignedSlot || o.parentNode || /** @type {any} */
1109
- o.host || null;
1090
+ for (var _, w = []; a !== null; ) {
1091
+ var F = a.assignedSlot || a.parentNode || /** @type {any} */
1092
+ a.host || null;
1110
1093
  try {
1111
- var E = o["__" + i];
1112
- if (E != null && (!/** @type {any} */
1113
- o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1094
+ var M = a["__" + o];
1095
+ if (M != null && (!/** @type {any} */
1096
+ a.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1114
1097
  // -> the target could not have been disabled because it emits the event in the first place
1115
- e.target === o))
1116
- if (li(E)) {
1117
- var [U, ...ce] = E;
1118
- U.apply(o, [e, ...ce]);
1098
+ e.target === a))
1099
+ if (Kn(M)) {
1100
+ var [U, ...I] = M;
1101
+ U.apply(a, [e, ...I]);
1119
1102
  } else
1120
- E.call(o, e);
1121
- } catch (te) {
1122
- m ? y.push(te) : m = te;
1103
+ M.call(a, e);
1104
+ } catch (ee) {
1105
+ _ ? w.push(ee) : _ = ee;
1123
1106
  }
1124
- if (e.cancelBubble || $ === t || $ === null)
1107
+ if (e.cancelBubble || F === t || F === null)
1125
1108
  break;
1126
- o = $;
1109
+ a = F;
1127
1110
  }
1128
- if (m) {
1129
- for (let te of y)
1111
+ if (_) {
1112
+ for (let ee of w)
1130
1113
  queueMicrotask(() => {
1131
- throw te;
1114
+ throw ee;
1132
1115
  });
1133
- throw m;
1116
+ throw _;
1134
1117
  }
1135
1118
  } finally {
1136
- e.__root = t, delete e.currentTarget, Le(_), Ye(v);
1119
+ e.__root = t, delete e.currentTarget, Re(m), qe(v);
1137
1120
  }
1138
1121
  }
1139
1122
  }
1140
- function Xr(e) {
1123
+ function Zr(e) {
1141
1124
  var t = document.createElement("template");
1142
1125
  return t.innerHTML = e, t.content;
1143
1126
  }
1144
- function De(e, t) {
1127
+ function Ae(e, t) {
1145
1128
  var r = (
1146
1129
  /** @type {Effect} */
1147
- D
1130
+ S
1148
1131
  );
1149
1132
  r.nodes_start === null && (r.nodes_start = e, r.nodes_end = t);
1150
1133
  }
1151
1134
  // @__NO_SIDE_EFFECTS__
1152
- function ke(e, t) {
1153
- var r = (t & Ko) !== 0, i = (t & Xo) !== 0, l, o = !e.startsWith("<!>");
1135
+ function be(e, t) {
1136
+ var r = (t & Vi) !== 0, o = (t & Ui) !== 0, l, a = !e.startsWith("<!>");
1154
1137
  return () => {
1155
- if (F)
1156
- return De(O, null), O;
1157
- l === void 0 && (l = Xr(o ? e : "<!>" + e), r || (l = /** @type {Node} */
1158
- /* @__PURE__ */ _e(l)));
1159
- var f = (
1138
+ if (O)
1139
+ return Ae(P, null), P;
1140
+ l === void 0 && (l = Zr(a ? e : "<!>" + e), r || (l = /** @type {Node} */
1141
+ /* @__PURE__ */ ve(l)));
1142
+ var s = (
1160
1143
  /** @type {TemplateNode} */
1161
- i || hi ? document.importNode(l, !0) : l.cloneNode(!0)
1144
+ o || no ? document.importNode(l, !0) : l.cloneNode(!0)
1162
1145
  );
1163
1146
  if (r) {
1164
- var s = (
1147
+ var c = (
1165
1148
  /** @type {TemplateNode} */
1166
- /* @__PURE__ */ _e(f)
1167
- ), c = (
1149
+ /* @__PURE__ */ ve(s)
1150
+ ), f = (
1168
1151
  /** @type {TemplateNode} */
1169
- f.lastChild
1152
+ s.lastChild
1170
1153
  );
1171
- De(s, c);
1154
+ Ae(c, f);
1172
1155
  } else
1173
- De(f, f);
1174
- return f;
1156
+ Ae(s, s);
1157
+ return s;
1175
1158
  };
1176
1159
  }
1177
1160
  // @__NO_SIDE_EFFECTS__
1178
- function wr(e, t, r = "svg") {
1179
- var i = !e.startsWith("<!>"), l = `<${r}>${i ? e : "<!>" + e}</${r}>`, o;
1161
+ function _r(e, t, r = "svg") {
1162
+ var o = !e.startsWith("<!>"), l = `<${r}>${o ? e : "<!>" + e}</${r}>`, a;
1180
1163
  return () => {
1181
- if (F)
1182
- return De(O, null), O;
1183
- if (!o) {
1184
- var f = (
1164
+ if (O)
1165
+ return Ae(P, null), P;
1166
+ if (!a) {
1167
+ var s = (
1185
1168
  /** @type {DocumentFragment} */
1186
- Xr(l)
1187
- ), s = (
1169
+ Zr(l)
1170
+ ), c = (
1188
1171
  /** @type {Element} */
1189
- /* @__PURE__ */ _e(f)
1172
+ /* @__PURE__ */ ve(s)
1190
1173
  );
1191
- o = /** @type {Element} */
1192
- /* @__PURE__ */ _e(s);
1174
+ a = /** @type {Element} */
1175
+ /* @__PURE__ */ ve(c);
1193
1176
  }
1194
- var c = (
1177
+ var f = (
1195
1178
  /** @type {TemplateNode} */
1196
- o.cloneNode(!0)
1179
+ a.cloneNode(!0)
1197
1180
  );
1198
- return De(c, c), c;
1181
+ return Ae(f, f), f;
1199
1182
  };
1200
1183
  }
1201
- function tr() {
1202
- if (F)
1203
- return De(O, null), O;
1204
- var e = document.createDocumentFragment(), t = document.createComment(""), r = mr();
1205
- return e.append(t, r), De(t, r), e;
1184
+ function Xt() {
1185
+ if (O)
1186
+ return Ae(P, null), P;
1187
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = vr();
1188
+ return e.append(t, r), Ae(t, r), e;
1206
1189
  }
1207
- function j(e, t) {
1208
- if (F) {
1209
- D.nodes_end = O, kt();
1190
+ function B(e, t) {
1191
+ if (O) {
1192
+ S.nodes_end = P, Et();
1210
1193
  return;
1211
1194
  }
1212
1195
  e !== null && e.before(
@@ -1214,373 +1197,371 @@ function j(e, t) {
1214
1197
  t
1215
1198
  );
1216
1199
  }
1217
- function Wa(e, t) {
1200
+ function La(e, t) {
1218
1201
  var r = t == null ? "" : typeof t == "object" ? t + "" : t;
1219
- r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = r + "");
1202
+ r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
1220
1203
  }
1221
- function Hi(e, t) {
1222
- return Gi(e, t);
1204
+ function Po(e, t) {
1205
+ return Oo(e, t);
1223
1206
  }
1224
- function Ya(e, t) {
1225
- Pr(), t.intro = t.intro ?? !1;
1226
- const r = t.target, i = F, l = O;
1207
+ function Pa(e, t) {
1208
+ Tr(), t.intro = t.intro ?? !1;
1209
+ const r = t.target, o = O, l = P;
1227
1210
  try {
1228
- for (var o = (
1211
+ for (var a = (
1229
1212
  /** @type {TemplateNode} */
1230
- /* @__PURE__ */ _e(r)
1231
- ); o && (o.nodeType !== 8 || /** @type {Comment} */
1232
- o.data !== qr); )
1233
- o = /** @type {TemplateNode} */
1234
- /* @__PURE__ */ Ze(o);
1235
- if (!o)
1236
- throw Et;
1237
- wt(!0), Ge(
1213
+ /* @__PURE__ */ ve(r)
1214
+ ); a && (a.nodeType !== 8 || /** @type {Comment} */
1215
+ a.data !== Mr); )
1216
+ a = /** @type {TemplateNode} */
1217
+ /* @__PURE__ */ Be(a);
1218
+ if (!a)
1219
+ throw bt;
1220
+ _t(!0), Ue(
1238
1221
  /** @type {Comment} */
1239
- o
1240
- ), kt();
1241
- const f = Gi(e, { ...t, anchor: o });
1242
- if (O === null || O.nodeType !== 8 || /** @type {Comment} */
1243
- O.data !== oi)
1244
- throw pr(), Et;
1245
- return wt(!1), /** @type {Exports} */
1246
- f;
1247
- } catch (f) {
1248
- if (f === Et)
1249
- return t.recover === !1 && ha(), Pr(), ya(r), wt(!1), Hi(e, t);
1250
- throw f;
1222
+ a
1223
+ ), Et();
1224
+ const s = Oo(e, { ...t, anchor: a });
1225
+ if (P === null || P.nodeType !== 8 || /** @type {Comment} */
1226
+ P.data !== zn)
1227
+ throw hr(), bt;
1228
+ return _t(!1), /** @type {Exports} */
1229
+ s;
1230
+ } catch (s) {
1231
+ if (s === bt)
1232
+ return t.recover === !1 && ta(), Tr(), sa(r), _t(!1), Po(e, t);
1233
+ throw s;
1251
1234
  } finally {
1252
- wt(i), Ge(l);
1253
- }
1254
- }
1255
- const bt = /* @__PURE__ */ new Map();
1256
- function Gi(e, { target: t, anchor: r, props: i = {}, events: l, context: o, intro: f = !0 }) {
1257
- Pr();
1258
- var s = /* @__PURE__ */ new Set(), c = (v) => {
1259
- for (var m = 0; m < v.length; m++) {
1260
- var y = v[m];
1261
- if (!s.has(y)) {
1262
- s.add(y);
1263
- var $ = ja(y);
1264
- t.addEventListener(y, Vt, { passive: $ });
1265
- var E = bt.get(y);
1266
- E === void 0 ? (document.addEventListener(y, Vt, { passive: $ }), bt.set(y, 1)) : bt.set(y, E + 1);
1235
+ _t(o), Ue(l);
1236
+ }
1237
+ }
1238
+ const pt = /* @__PURE__ */ new Map();
1239
+ function Oo(e, { target: t, anchor: r, props: o = {}, events: l, context: a, intro: s = !0 }) {
1240
+ Tr();
1241
+ var c = /* @__PURE__ */ new Set(), f = (v) => {
1242
+ for (var _ = 0; _ < v.length; _++) {
1243
+ var w = v[_];
1244
+ if (!c.has(w)) {
1245
+ c.add(w);
1246
+ var F = $a(w);
1247
+ t.addEventListener(w, Pt, { passive: F });
1248
+ var M = pt.get(w);
1249
+ M === void 0 ? (document.addEventListener(w, Pt, { passive: F }), pt.set(w, 1)) : pt.set(w, M + 1);
1267
1250
  }
1268
1251
  }
1269
1252
  };
1270
- c(ta(Bi)), Vr.add(c);
1271
- var d = void 0, _ = Aa(() => {
1272
- var v = r ?? t.appendChild(mr());
1273
- return Fr(() => {
1274
- if (o) {
1275
- Mi({});
1276
- var m = (
1253
+ f(Bi(Lo)), Pr.add(f);
1254
+ var d = void 0, m = va(() => {
1255
+ var v = r ?? t.appendChild(vr());
1256
+ return Nr(() => {
1257
+ if (a) {
1258
+ $o({});
1259
+ var _ = (
1277
1260
  /** @type {ComponentContext} */
1278
- oe
1261
+ ne
1279
1262
  );
1280
- m.c = o;
1263
+ _.c = a;
1281
1264
  }
1282
- l && (i.$$events = l), F && De(
1265
+ l && (o.$$events = l), O && Ae(
1283
1266
  /** @type {TemplateNode} */
1284
1267
  v,
1285
1268
  null
1286
- ), d = e(v, i) || {}, F && (D.nodes_end = O), o && Vi();
1269
+ ), d = e(v, o) || {}, O && (S.nodes_end = P), a && So();
1287
1270
  }), () => {
1288
- var $;
1289
- for (var m of s) {
1290
- t.removeEventListener(m, Vt);
1291
- var y = (
1271
+ for (var _ of c) {
1272
+ t.removeEventListener(_, Pt);
1273
+ var w = (
1292
1274
  /** @type {number} */
1293
- bt.get(m)
1275
+ pt.get(_)
1294
1276
  );
1295
- --y === 0 ? (document.removeEventListener(m, Vt), bt.delete(m)) : bt.set(m, y);
1277
+ --w === 0 ? (document.removeEventListener(_, Pt), pt.delete(_)) : pt.set(_, w);
1296
1278
  }
1297
- Vr.delete(c), v !== r && (($ = v.parentNode) == null || $.removeChild(v));
1279
+ Pr.delete(f), v !== r && v.parentNode?.removeChild(v);
1298
1280
  };
1299
1281
  });
1300
- return Ur.set(d, _), d;
1301
- }
1302
- let Ur = /* @__PURE__ */ new WeakMap();
1303
- function Za(e, t) {
1304
- const r = Ur.get(e);
1305
- return r ? (Ur.delete(e), r(t)) : Promise.resolve();
1306
- }
1307
- function J(e, t, [r, i] = [0, 0]) {
1308
- F && r === 0 && kt();
1309
- var l = e, o = null, f = null, s = ue, c = r > 0 ? Hr : 0, d = !1;
1310
- const _ = (m, y = !0) => {
1311
- d = !0, v(y, m);
1312
- }, v = (m, y) => {
1313
- if (s === (s = m)) return;
1314
- let $ = !1;
1315
- if (F && i !== -1) {
1282
+ return Or.set(d, m), d;
1283
+ }
1284
+ let Or = /* @__PURE__ */ new WeakMap();
1285
+ function Oa(e, t) {
1286
+ const r = Or.get(e);
1287
+ return r ? (Or.delete(e), r(t)) : Promise.resolve();
1288
+ }
1289
+ function K(e, t, [r, o] = [0, 0]) {
1290
+ O && r === 0 && Et();
1291
+ var l = e, a = null, s = null, c = ae, f = r > 0 ? Ur : 0, d = !1;
1292
+ const m = (_, w = !0) => {
1293
+ d = !0, v(w, _);
1294
+ }, v = (_, w) => {
1295
+ if (c === (c = _)) return;
1296
+ let F = !1;
1297
+ if (O && o !== -1) {
1316
1298
  if (r === 0) {
1317
1299
  const U = (
1318
1300
  /** @type {Comment} */
1319
1301
  l.data
1320
1302
  );
1321
- U === qr ? i = 0 : U === ii ? i = 1 / 0 : (i = parseInt(U.substring(1)), i !== i && (i = s ? 1 / 0 : -1));
1303
+ U === Mr ? o = 0 : U === Zn ? o = 1 / 0 : (o = parseInt(U.substring(1)), o !== o && (o = c ? 1 / 0 : -1));
1322
1304
  }
1323
- const E = i > r;
1324
- !!s === E && (l = _a(), Ge(l), wt(!1), $ = !0, i = -1);
1305
+ const M = o > r;
1306
+ !!c === M && (l = aa(), Ue(l), _t(!1), F = !0, o = -1);
1325
1307
  }
1326
- s ? (o ? Gn(o) : y && (o = Fr(() => y(l))), f && Mr(f, () => {
1327
- f = null;
1328
- })) : (f ? Gn(f) : y && (f = Fr(() => y(l, [r + 1, i]))), o && Mr(o, () => {
1329
- o = null;
1330
- })), $ && wt(!0);
1308
+ c ? (a ? On(a) : w && (a = Nr(() => w(l))), s && Lr(s, () => {
1309
+ s = null;
1310
+ })) : (s ? On(s) : w && (s = Nr(() => w(l, [r + 1, o]))), a && Lr(a, () => {
1311
+ a = null;
1312
+ })), F && _t(!0);
1331
1313
  };
1332
- wi(() => {
1333
- d = !1, t(_), d || v(null, null);
1334
- }, c), F && (l = O);
1314
+ fo(() => {
1315
+ d = !1, t(m), d || v(null, null);
1316
+ }, f), O && (l = P);
1335
1317
  }
1336
- function nt(e, t, r = !1, i = !1, l = !1) {
1337
- var o = e, f = "";
1338
- Se(() => {
1339
- var s = (
1318
+ function tt(e, t, r = !1, o = !1, l = !1) {
1319
+ var a = e, s = "";
1320
+ Ce(() => {
1321
+ var c = (
1340
1322
  /** @type {Effect} */
1341
- D
1323
+ S
1342
1324
  );
1343
- if (f === (f = t() ?? "")) {
1344
- F && kt();
1325
+ if (s === (s = t() ?? "")) {
1326
+ O && Et();
1345
1327
  return;
1346
1328
  }
1347
- if (s.nodes_start !== null && (xi(
1348
- s.nodes_start,
1329
+ if (c.nodes_start !== null && (go(
1330
+ c.nodes_start,
1349
1331
  /** @type {TemplateNode} */
1350
- s.nodes_end
1351
- ), s.nodes_start = s.nodes_end = null), f !== "") {
1352
- if (F) {
1353
- O.data;
1354
- for (var c = kt(), d = c; c !== null && (c.nodeType !== 8 || /** @type {Comment} */
1355
- c.data !== ""); )
1356
- d = c, c = /** @type {TemplateNode} */
1357
- /* @__PURE__ */ Ze(c);
1358
- if (c === null)
1359
- throw pr(), Et;
1360
- De(O, d), o = Ge(c);
1332
+ c.nodes_end
1333
+ ), c.nodes_start = c.nodes_end = null), s !== "") {
1334
+ if (O) {
1335
+ P.data;
1336
+ for (var f = Et(), d = f; f !== null && (f.nodeType !== 8 || /** @type {Comment} */
1337
+ f.data !== ""); )
1338
+ d = f, f = /** @type {TemplateNode} */
1339
+ /* @__PURE__ */ Be(f);
1340
+ if (f === null)
1341
+ throw hr(), bt;
1342
+ Ae(P, d), a = Ue(f);
1361
1343
  return;
1362
1344
  }
1363
- var _ = f + "";
1364
- r ? _ = `<svg>${_}</svg>` : i && (_ = `<math>${_}</math>`);
1365
- var v = Xr(_);
1366
- if ((r || i) && (v = /** @type {Element} */
1367
- /* @__PURE__ */ _e(v)), De(
1345
+ var m = s + "";
1346
+ r ? m = `<svg>${m}</svg>` : o && (m = `<math>${m}</math>`);
1347
+ var v = Zr(m);
1348
+ if ((r || o) && (v = /** @type {Element} */
1349
+ /* @__PURE__ */ ve(v)), Ae(
1368
1350
  /** @type {TemplateNode} */
1369
- /* @__PURE__ */ _e(v),
1351
+ /* @__PURE__ */ ve(v),
1370
1352
  /** @type {TemplateNode} */
1371
1353
  v.lastChild
1372
- ), r || i)
1373
- for (; /* @__PURE__ */ _e(v); )
1374
- o.before(
1354
+ ), r || o)
1355
+ for (; /* @__PURE__ */ ve(v); )
1356
+ a.before(
1375
1357
  /** @type {Node} */
1376
- /* @__PURE__ */ _e(v)
1358
+ /* @__PURE__ */ ve(v)
1377
1359
  );
1378
1360
  else
1379
- o.before(v);
1361
+ a.before(v);
1380
1362
  }
1381
1363
  });
1382
1364
  }
1383
- function za(e, t, r, i, l) {
1384
- var s;
1385
- F && kt();
1386
- var o = (s = t.$$slots) == null ? void 0 : s[r], f = !1;
1387
- o === !0 && (o = t.children, f = !0), o === void 0 || o(e, f ? () => i : i);
1365
+ function Fa(e, t, r, o, l) {
1366
+ O && Et();
1367
+ var a = t.$$slots?.[r], s = !1;
1368
+ a === !0 && (a = t.children, s = !0), a === void 0 || a(e, s ? () => o : o);
1388
1369
  }
1389
- const Jn = [...`
1370
+ const jn = [...`
1390
1371
  \r\f \v\uFEFF`];
1391
- function Ja(e, t, r) {
1392
- var i = "" + e;
1372
+ function Ma(e, t, r) {
1373
+ var o = "" + e;
1393
1374
  if (r) {
1394
1375
  for (var l in r)
1395
1376
  if (r[l])
1396
- i = i ? i + " " + l : l;
1397
- else if (i.length)
1398
- for (var o = l.length, f = 0; (f = i.indexOf(l, f)) >= 0; ) {
1399
- var s = f + o;
1400
- (f === 0 || Jn.includes(i[f - 1])) && (s === i.length || Jn.includes(i[s])) ? i = (f === 0 ? "" : i.substring(0, f)) + i.substring(s + 1) : f = s;
1377
+ o = o ? o + " " + l : l;
1378
+ else if (o.length)
1379
+ for (var a = l.length, s = 0; (s = o.indexOf(l, s)) >= 0; ) {
1380
+ var c = s + a;
1381
+ (s === 0 || jn.includes(o[s - 1])) && (c === o.length || jn.includes(o[c])) ? o = (s === 0 ? "" : o.substring(0, s)) + o.substring(c + 1) : s = c;
1401
1382
  }
1402
1383
  }
1403
- return i === "" ? null : i;
1404
- }
1405
- function Ka(e, t, r, i, l, o) {
1406
- var f = e.__className;
1407
- if (F || f !== r || f === void 0) {
1408
- var s = Ja(r, i, o);
1409
- (!F || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : e.className = s), e.__className = r;
1410
- } else if (o && l !== o)
1411
- for (var c in o) {
1412
- var d = !!o[c];
1413
- (l == null || d !== !!l[c]) && e.classList.toggle(c, d);
1384
+ return o === "" ? null : o;
1385
+ }
1386
+ function Va(e, t, r, o, l, a) {
1387
+ var s = e.__className;
1388
+ if (O || s !== r || s === void 0) {
1389
+ var c = Ma(r, o, a);
1390
+ (!O || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : e.className = c), e.__className = r;
1391
+ } else if (a && l !== a)
1392
+ for (var f in a) {
1393
+ var d = !!a[f];
1394
+ (l == null || d !== !!l[f]) && e.classList.toggle(f, d);
1414
1395
  }
1415
- return o;
1396
+ return a;
1416
1397
  }
1417
- const Xa = Symbol("is custom element"), Qa = Symbol("is html");
1418
- function Kn(e) {
1419
- if (F) {
1398
+ const Ua = Symbol("is custom element"), ja = Symbol("is html");
1399
+ function qn(e) {
1400
+ if (O) {
1420
1401
  var t = !1, r = () => {
1421
1402
  if (!t) {
1422
1403
  if (t = !0, e.hasAttribute("value")) {
1423
- var i = e.value;
1424
- S(e, "value", null), e.value = i;
1404
+ var o = e.value;
1405
+ R(e, "value", null), e.value = o;
1425
1406
  }
1426
1407
  if (e.hasAttribute("checked")) {
1427
1408
  var l = e.checked;
1428
- S(e, "checked", null), e.checked = l;
1409
+ R(e, "checked", null), e.checked = l;
1429
1410
  }
1430
1411
  }
1431
1412
  };
1432
- e.__on_r = r, Sa(r), ji();
1413
+ e.__on_r = r, _a(r), Do();
1433
1414
  }
1434
1415
  }
1435
- function el(e, t) {
1436
- var r = Wi(e);
1416
+ function qa(e, t) {
1417
+ var r = Fo(e);
1437
1418
  r.value === (r.value = // treat null and undefined the same for the initial value
1438
1419
  t ?? void 0) || // @ts-expect-error
1439
1420
  // `progress` elements always need their value set when it's `0`
1440
1421
  e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
1441
1422
  }
1442
- function S(e, t, r, i) {
1443
- var l = Wi(e);
1444
- F && (l[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || l[t] !== (l[t] = r) && (t === "loading" && (e[sa] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && tl(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1423
+ function R(e, t, r, o) {
1424
+ var l = Fo(e);
1425
+ O && (l[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || l[t] !== (l[t] = r) && (t === "loading" && (e[Ji] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ba(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
1445
1426
  }
1446
- function Wi(e) {
1427
+ function Fo(e) {
1447
1428
  return (
1448
1429
  /** @type {Record<string | symbol, unknown>} **/
1449
1430
  // @ts-expect-error
1450
- e.__attributes ?? (e.__attributes = {
1451
- [Xa]: e.nodeName.includes("-"),
1452
- [Qa]: e.namespaceURI === Qo
1453
- })
1431
+ e.__attributes ??= {
1432
+ [Ua]: e.nodeName.includes("-"),
1433
+ [ja]: e.namespaceURI === ji
1434
+ }
1454
1435
  );
1455
1436
  }
1456
- var Xn = /* @__PURE__ */ new Map();
1457
- function tl(e) {
1458
- var t = Xn.get(e.nodeName);
1437
+ var Bn = /* @__PURE__ */ new Map();
1438
+ function Ba(e) {
1439
+ var t = Bn.get(e.nodeName);
1459
1440
  if (t) return t;
1460
- Xn.set(e.nodeName, t = []);
1461
- for (var r, i = e, l = Element.prototype; l !== i; ) {
1462
- r = ra(i);
1463
- for (var o in r)
1464
- r[o].set && t.push(o);
1465
- i = si(i);
1441
+ Bn.set(e.nodeName, t = []);
1442
+ for (var r, o = e, l = Element.prototype; l !== o; ) {
1443
+ r = Hi(o);
1444
+ for (var a in r)
1445
+ r[a].set && t.push(a);
1446
+ o = Xn(o);
1466
1447
  }
1467
1448
  return t;
1468
1449
  }
1469
- function rl(e, t, r = t) {
1470
- Ba(e, "change", (i) => {
1471
- var l = i ? e.defaultChecked : e.checked;
1450
+ function Ha(e, t, r = t) {
1451
+ Ta(e, "change", (o) => {
1452
+ var l = o ? e.defaultChecked : e.checked;
1472
1453
  r(l);
1473
1454
  }), // If we are hydrating and the value has since changed,
1474
1455
  // then use the update value from the input instead.
1475
- (F && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1476
- at(t) == null) && r(e.checked), Zr(() => {
1477
- var i = t();
1478
- e.checked = !!i;
1456
+ (O && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1457
+ ot(t) == null) && r(e.checked), Hr(() => {
1458
+ var o = t();
1459
+ e.checked = !!o;
1479
1460
  });
1480
1461
  }
1481
- function Qn(e, t) {
1482
- return e === t || (e == null ? void 0 : e[Ut]) === t;
1462
+ function Hn(e, t) {
1463
+ return e === t || e?.[Ot] === t;
1483
1464
  }
1484
- function rr(e = {}, t, r, i) {
1485
- return Yr(() => {
1486
- var l, o;
1487
- return Zr(() => {
1488
- l = o, o = [], at(() => {
1489
- e !== r(...o) && (t(e, ...o), l && Qn(r(...l), e) && t(null, ...l));
1465
+ function Qt(e = {}, t, r, o) {
1466
+ return Br(() => {
1467
+ var l, a;
1468
+ return Hr(() => {
1469
+ l = a, a = [], ot(() => {
1470
+ e !== r(...a) && (t(e, ...a), l && Hn(r(...l), e) && t(null, ...l));
1490
1471
  });
1491
1472
  }), () => {
1492
- zr(() => {
1493
- o && Qn(r(...o), e) && t(null, ...o);
1473
+ Gr(() => {
1474
+ a && Hn(r(...a), e) && t(null, ...a);
1494
1475
  });
1495
1476
  };
1496
1477
  }), e;
1497
1478
  }
1498
- function Yi(e) {
1499
- oe === null && ai(), Or(() => {
1500
- const t = at(e);
1479
+ function Mo(e) {
1480
+ ne === null && Jn(), Dr(() => {
1481
+ const t = ot(e);
1501
1482
  if (typeof t == "function") return (
1502
1483
  /** @type {() => void} */
1503
1484
  t
1504
1485
  );
1505
1486
  });
1506
1487
  }
1507
- function nl(e) {
1508
- oe === null && ai(), Yi(() => () => at(e));
1488
+ function Ga(e) {
1489
+ ne === null && Jn(), Mo(() => () => ot(e));
1509
1490
  }
1510
- function Zi(e, t, r) {
1491
+ function Vo(e, t, r) {
1511
1492
  if (e == null)
1512
- return t(void 0), Ct;
1513
- const i = at(
1493
+ return t(void 0), yt;
1494
+ const o = ot(
1514
1495
  () => e.subscribe(
1515
1496
  t,
1516
1497
  // @ts-expect-error
1517
1498
  r
1518
1499
  )
1519
1500
  );
1520
- return i.unsubscribe ? () => i.unsubscribe() : i;
1501
+ return o.unsubscribe ? () => o.unsubscribe() : o;
1521
1502
  }
1522
- const yt = [];
1523
- function il(e, t = Ct) {
1503
+ const mt = [];
1504
+ function Wa(e, t = yt) {
1524
1505
  let r = null;
1525
- const i = /* @__PURE__ */ new Set();
1526
- function l(s) {
1527
- if (mi(e, s) && (e = s, r)) {
1528
- const c = !yt.length;
1529
- for (const d of i)
1530
- d[1](), yt.push(d, e);
1531
- if (c) {
1532
- for (let d = 0; d < yt.length; d += 2)
1533
- yt[d][0](yt[d + 1]);
1534
- yt.length = 0;
1506
+ const o = /* @__PURE__ */ new Set();
1507
+ function l(c) {
1508
+ if (lo(e, c) && (e = c, r)) {
1509
+ const f = !mt.length;
1510
+ for (const d of o)
1511
+ d[1](), mt.push(d, e);
1512
+ if (f) {
1513
+ for (let d = 0; d < mt.length; d += 2)
1514
+ mt[d][0](mt[d + 1]);
1515
+ mt.length = 0;
1535
1516
  }
1536
1517
  }
1537
1518
  }
1538
- function o(s) {
1539
- l(s(
1519
+ function a(c) {
1520
+ l(c(
1540
1521
  /** @type {T} */
1541
1522
  e
1542
1523
  ));
1543
1524
  }
1544
- function f(s, c = Ct) {
1545
- const d = [s, c];
1546
- return i.add(d), i.size === 1 && (r = t(l, o) || Ct), s(
1525
+ function s(c, f = yt) {
1526
+ const d = [c, f];
1527
+ return o.add(d), o.size === 1 && (r = t(l, a) || yt), c(
1547
1528
  /** @type {T} */
1548
1529
  e
1549
1530
  ), () => {
1550
- i.delete(d), i.size === 0 && r && (r(), r = null);
1531
+ o.delete(d), o.size === 0 && r && (r(), r = null);
1551
1532
  };
1552
1533
  }
1553
- return { set: l, update: o, subscribe: f };
1534
+ return { set: l, update: a, subscribe: s };
1554
1535
  }
1555
- function or(e) {
1536
+ function rr(e) {
1556
1537
  let t;
1557
- return Zi(e, (r) => t = r)(), t;
1538
+ return Vo(e, (r) => t = r)(), t;
1558
1539
  }
1559
- let nr = !1, jr = Symbol();
1560
- function ol(e, t, r) {
1561
- const i = r[t] ?? (r[t] = {
1540
+ let er = !1, Fr = Symbol();
1541
+ function Ya(e, t, r) {
1542
+ const o = r[t] ??= {
1562
1543
  store: null,
1563
- source: /* @__PURE__ */ Kr(void 0),
1564
- unsubscribe: Ct
1565
- });
1566
- if (i.store !== e && !(jr in r))
1567
- if (i.unsubscribe(), i.store = e ?? null, e == null)
1568
- i.source.v = void 0, i.unsubscribe = Ct;
1544
+ source: /* @__PURE__ */ Yr(void 0),
1545
+ unsubscribe: yt
1546
+ };
1547
+ if (o.store !== e && !(Fr in r))
1548
+ if (o.unsubscribe(), o.store = e ?? null, e == null)
1549
+ o.source.v = void 0, o.unsubscribe = yt;
1569
1550
  else {
1570
1551
  var l = !0;
1571
- i.unsubscribe = Zi(e, (o) => {
1572
- l ? i.source.v = o : b(i.source, o);
1552
+ o.unsubscribe = Vo(e, (a) => {
1553
+ l ? o.source.v = a : b(o.source, a);
1573
1554
  }), l = !1;
1574
1555
  }
1575
- return e && jr in r ? or(e) : a(i.source);
1556
+ return e && Fr in r ? rr(e) : i(o.source);
1576
1557
  }
1577
- function al() {
1558
+ function Za() {
1578
1559
  const e = {};
1579
1560
  function t() {
1580
- Wr(() => {
1561
+ qr(() => {
1581
1562
  for (var r in e)
1582
1563
  e[r].unsubscribe();
1583
- qt(e, jr, {
1564
+ Mt(e, Fr, {
1584
1565
  enumerable: !1,
1585
1566
  value: !0
1586
1567
  });
@@ -1588,130 +1569,126 @@ function al() {
1588
1569
  }
1589
1570
  return [e, t];
1590
1571
  }
1591
- function ll(e) {
1592
- var t = nr;
1572
+ function za(e) {
1573
+ var t = er;
1593
1574
  try {
1594
- return nr = !1, [e(), nr];
1575
+ return er = !1, [e(), er];
1595
1576
  } finally {
1596
- nr = t;
1577
+ er = t;
1597
1578
  }
1598
1579
  }
1599
- function ei(e) {
1600
- var t;
1601
- return ((t = e.ctx) == null ? void 0 : t.d) ?? !1;
1580
+ function Gn(e) {
1581
+ return e.ctx?.d ?? !1;
1602
1582
  }
1603
- function k(e, t, r, i) {
1604
- var ft;
1605
- var l = (r & Yo) !== 0, o = !0, f = (r & zo) !== 0, s = (r & Jo) !== 0, c = !1, d;
1606
- f ? [d, c] = ll(() => (
1583
+ function x(e, t, r, o) {
1584
+ var l = (r & Pi) !== 0, a = !0, s = (r & Fi) !== 0, c = (r & Mi) !== 0, f = !1, d;
1585
+ s ? [d, f] = za(() => (
1607
1586
  /** @type {V} */
1608
1587
  e[t]
1609
1588
  )) : d = /** @type {V} */
1610
1589
  e[t];
1611
- var _ = Ut in e || di in e, v = f && (((ft = it(e, t)) == null ? void 0 : ft.set) ?? (_ && t in e && ((q) => e[t] = q))) || void 0, m = (
1590
+ var m = Ot in e || ro in e, v = s && (rt(e, t)?.set ?? (m && t in e && ((j) => e[t] = j))) || void 0, _ = (
1612
1591
  /** @type {V} */
1613
- i
1614
- ), y = !0, $ = !1, E = () => ($ = !0, y && (y = !1, s ? m = at(
1592
+ o
1593
+ ), w = !0, F = !1, M = () => (F = !0, w && (w = !1, c ? _ = ot(
1615
1594
  /** @type {() => V} */
1616
- i
1617
- ) : m = /** @type {V} */
1618
- i), m);
1619
- d === void 0 && i !== void 0 && (v && o && va(), d = E(), v && v(d));
1595
+ o
1596
+ ) : _ = /** @type {V} */
1597
+ o), _);
1598
+ d === void 0 && o !== void 0 && (v && a && ra(), d = M(), v && v(d));
1620
1599
  var U;
1621
1600
  if (U = () => {
1622
- var q = (
1601
+ var j = (
1623
1602
  /** @type {V} */
1624
1603
  e[t]
1625
1604
  );
1626
- return q === void 0 ? E() : (y = !0, $ = !1, q);
1627
- }, (r & Zo) === 0)
1605
+ return j === void 0 ? M() : (w = !0, F = !1, j);
1606
+ }, (r & Oi) === 0)
1628
1607
  return U;
1629
1608
  if (v) {
1630
- var ce = e.$$legacy;
1631
- return function(q, ae) {
1632
- return arguments.length > 0 ? ((!ae || ce || c) && v(ae ? U() : q), q) : U();
1609
+ var I = e.$$legacy;
1610
+ return function(j, se) {
1611
+ return arguments.length > 0 ? ((!se || I || f) && v(se ? U() : j), j) : U();
1633
1612
  };
1634
1613
  }
1635
- var K = !1, te = /* @__PURE__ */ Kr(d), X = /* @__PURE__ */ _r(() => {
1636
- var q = U(), ae = a(te);
1637
- return K ? (K = !1, ae) : te.v = q;
1614
+ var ee = !1, $e = /* @__PURE__ */ Yr(d), X = /* @__PURE__ */ gr(() => {
1615
+ var j = U(), se = i($e);
1616
+ return ee ? (ee = !1, se) : $e.v = j;
1638
1617
  });
1639
- return f && a(X), l || (X.equals = Gr), function(q, ae) {
1618
+ return s && i(X), l || (X.equals = jr), function(j, se) {
1640
1619
  if (arguments.length > 0) {
1641
- const be = ae ? a(X) : f ? Be(q) : q;
1642
- if (!X.equals(be)) {
1643
- if (K = !0, b(te, be), $ && m !== void 0 && (m = be), ei(X))
1644
- return q;
1645
- at(() => a(X));
1620
+ const He = se ? i(X) : s ? Me(j) : j;
1621
+ if (!X.equals(He)) {
1622
+ if (ee = !0, b($e, He), F && _ !== void 0 && (_ = He), Gn(X))
1623
+ return j;
1624
+ ot(() => i(X));
1646
1625
  }
1647
- return q;
1626
+ return j;
1648
1627
  }
1649
- return ei(X) ? X.v : a(X);
1628
+ return Gn(X) ? X.v : i(X);
1650
1629
  };
1651
1630
  }
1652
- function sl(e) {
1653
- return new ul(e);
1631
+ function Ja(e) {
1632
+ return new Ka(e);
1654
1633
  }
1655
- var Oe, me;
1656
- class ul {
1634
+ class Ka {
1635
+ /** @type {any} */
1636
+ #t;
1637
+ /** @type {Record<string, any>} */
1638
+ #e;
1657
1639
  /**
1658
1640
  * @param {ComponentConstructorOptions & {
1659
1641
  * component: any;
1660
1642
  * }} options
1661
1643
  */
1662
1644
  constructor(t) {
1663
- /** @type {any} */
1664
- $r(this, Oe);
1665
- /** @type {Record<string, any>} */
1666
- $r(this, me);
1667
- var o;
1668
- var r = /* @__PURE__ */ new Map(), i = (f, s) => {
1669
- var c = /* @__PURE__ */ Kr(s);
1670
- return r.set(f, c), c;
1645
+ var r = /* @__PURE__ */ new Map(), o = (a, s) => {
1646
+ var c = /* @__PURE__ */ Yr(s);
1647
+ return r.set(a, c), c;
1671
1648
  };
1672
1649
  const l = new Proxy(
1673
1650
  { ...t.props || {}, $$events: {} },
1674
1651
  {
1675
- get(f, s) {
1676
- return a(r.get(s) ?? i(s, Reflect.get(f, s)));
1652
+ get(a, s) {
1653
+ return i(r.get(s) ?? o(s, Reflect.get(a, s)));
1677
1654
  },
1678
- has(f, s) {
1679
- return s === di ? !0 : (a(r.get(s) ?? i(s, Reflect.get(f, s))), Reflect.has(f, s));
1655
+ has(a, s) {
1656
+ return s === ro ? !0 : (i(r.get(s) ?? o(s, Reflect.get(a, s))), Reflect.has(a, s));
1680
1657
  },
1681
- set(f, s, c) {
1682
- return b(r.get(s) ?? i(s, c), c), Reflect.set(f, s, c);
1658
+ set(a, s, c) {
1659
+ return b(r.get(s) ?? o(s, c), c), Reflect.set(a, s, c);
1683
1660
  }
1684
1661
  }
1685
1662
  );
1686
- Sr(this, me, (t.hydrate ? Ya : Hi)(t.component, {
1663
+ this.#e = (t.hydrate ? Pa : Po)(t.component, {
1687
1664
  target: t.target,
1688
1665
  anchor: t.anchor,
1689
1666
  props: l,
1690
1667
  context: t.context,
1691
1668
  intro: t.intro ?? !1,
1692
1669
  recover: t.recover
1693
- })), (!((o = t == null ? void 0 : t.props) != null && o.$$host) || t.sync === !1) && x(), Sr(this, Oe, l.$$events);
1694
- for (const f of Object.keys(se(this, me)))
1695
- f === "$set" || f === "$destroy" || f === "$on" || qt(this, f, {
1670
+ }), (!t?.props?.$$host || t.sync === !1) && E(), this.#t = l.$$events;
1671
+ for (const a of Object.keys(this.#e))
1672
+ a === "$set" || a === "$destroy" || a === "$on" || Mt(this, a, {
1696
1673
  get() {
1697
- return se(this, me)[f];
1674
+ return this.#e[a];
1698
1675
  },
1699
1676
  /** @param {any} value */
1700
1677
  set(s) {
1701
- se(this, me)[f] = s;
1678
+ this.#e[a] = s;
1702
1679
  },
1703
1680
  enumerable: !0
1704
1681
  });
1705
- se(this, me).$set = /** @param {Record<string, any>} next */
1706
- (f) => {
1707
- Object.assign(l, f);
1708
- }, se(this, me).$destroy = () => {
1709
- Za(se(this, me));
1682
+ this.#e.$set = /** @param {Record<string, any>} next */
1683
+ (a) => {
1684
+ Object.assign(l, a);
1685
+ }, this.#e.$destroy = () => {
1686
+ Oa(this.#e);
1710
1687
  };
1711
1688
  }
1712
1689
  /** @param {Record<string, any>} props */
1713
1690
  $set(t) {
1714
- se(this, me).$set(t);
1691
+ this.#e.$set(t);
1715
1692
  }
1716
1693
  /**
1717
1694
  * @param {string} event
@@ -1719,123 +1696,120 @@ class ul {
1719
1696
  * @returns {any}
1720
1697
  */
1721
1698
  $on(t, r) {
1722
- se(this, Oe)[t] = se(this, Oe)[t] || [];
1723
- const i = (...l) => r.call(this, ...l);
1724
- return se(this, Oe)[t].push(i), () => {
1725
- se(this, Oe)[t] = se(this, Oe)[t].filter(
1699
+ this.#t[t] = this.#t[t] || [];
1700
+ const o = (...l) => r.call(this, ...l);
1701
+ return this.#t[t].push(o), () => {
1702
+ this.#t[t] = this.#t[t].filter(
1726
1703
  /** @param {any} fn */
1727
- (l) => l !== i
1704
+ (l) => l !== o
1728
1705
  );
1729
1706
  };
1730
1707
  }
1731
1708
  $destroy() {
1732
- se(this, me).$destroy();
1733
- }
1734
- }
1735
- Oe = new WeakMap(), me = new WeakMap();
1736
- let zi;
1737
- typeof HTMLElement == "function" && (zi = class extends HTMLElement {
1709
+ this.#e.$destroy();
1710
+ }
1711
+ }
1712
+ let Uo;
1713
+ typeof HTMLElement == "function" && (Uo = class extends HTMLElement {
1714
+ /** The Svelte component constructor */
1715
+ $$ctor;
1716
+ /** Slots */
1717
+ $$s;
1718
+ /** @type {any} The Svelte component instance */
1719
+ $$c;
1720
+ /** Whether or not the custom element is connected */
1721
+ $$cn = !1;
1722
+ /** @type {Record<string, any>} Component props data */
1723
+ $$d = {};
1724
+ /** `true` if currently in the process of reflecting component props back to attributes */
1725
+ $$r = !1;
1726
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
1727
+ $$p_d = {};
1728
+ /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
1729
+ $$l = {};
1730
+ /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
1731
+ $$l_u = /* @__PURE__ */ new Map();
1732
+ /** @type {any} The managed render effect for reflecting attributes */
1733
+ $$me;
1738
1734
  /**
1739
1735
  * @param {*} $$componentCtor
1740
1736
  * @param {*} $$slots
1741
1737
  * @param {*} use_shadow_dom
1742
1738
  */
1743
- constructor(t, r, i) {
1744
- super();
1745
- /** The Svelte component constructor */
1746
- Ee(this, "$$ctor");
1747
- /** Slots */
1748
- Ee(this, "$$s");
1749
- /** @type {any} The Svelte component instance */
1750
- Ee(this, "$$c");
1751
- /** Whether or not the custom element is connected */
1752
- Ee(this, "$$cn", !1);
1753
- /** @type {Record<string, any>} Component props data */
1754
- Ee(this, "$$d", {});
1755
- /** `true` if currently in the process of reflecting component props back to attributes */
1756
- Ee(this, "$$r", !1);
1757
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
1758
- Ee(this, "$$p_d", {});
1759
- /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
1760
- Ee(this, "$$l", {});
1761
- /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
1762
- Ee(this, "$$l_u", /* @__PURE__ */ new Map());
1763
- /** @type {any} The managed render effect for reflecting attributes */
1764
- Ee(this, "$$me");
1765
- this.$$ctor = t, this.$$s = r, i && this.attachShadow({ mode: "open" });
1739
+ constructor(e, t, r) {
1740
+ super(), this.$$ctor = e, this.$$s = t, r && this.attachShadow({ mode: "open" });
1766
1741
  }
1767
1742
  /**
1768
1743
  * @param {string} type
1769
1744
  * @param {EventListenerOrEventListenerObject} listener
1770
1745
  * @param {boolean | AddEventListenerOptions} [options]
1771
1746
  */
1772
- addEventListener(t, r, i) {
1773
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
1774
- const l = this.$$c.$on(t, r);
1775
- this.$$l_u.set(r, l);
1747
+ addEventListener(e, t, r) {
1748
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
1749
+ const o = this.$$c.$on(e, t);
1750
+ this.$$l_u.set(t, o);
1776
1751
  }
1777
- super.addEventListener(t, r, i);
1752
+ super.addEventListener(e, t, r);
1778
1753
  }
1779
1754
  /**
1780
1755
  * @param {string} type
1781
1756
  * @param {EventListenerOrEventListenerObject} listener
1782
1757
  * @param {boolean | AddEventListenerOptions} [options]
1783
1758
  */
1784
- removeEventListener(t, r, i) {
1785
- if (super.removeEventListener(t, r, i), this.$$c) {
1786
- const l = this.$$l_u.get(r);
1787
- l && (l(), this.$$l_u.delete(r));
1759
+ removeEventListener(e, t, r) {
1760
+ if (super.removeEventListener(e, t, r), this.$$c) {
1761
+ const o = this.$$l_u.get(t);
1762
+ o && (o(), this.$$l_u.delete(t));
1788
1763
  }
1789
1764
  }
1790
1765
  async connectedCallback() {
1791
1766
  if (this.$$cn = !0, !this.$$c) {
1792
- let t = function(l) {
1793
- return (o) => {
1794
- const f = document.createElement("slot");
1795
- l !== "default" && (f.name = l), j(o, f);
1767
+ let e = function(o) {
1768
+ return (l) => {
1769
+ const a = document.createElement("slot");
1770
+ o !== "default" && (a.name = o), B(l, a);
1796
1771
  };
1797
1772
  };
1798
1773
  if (await Promise.resolve(), !this.$$cn || this.$$c)
1799
1774
  return;
1800
- const r = {}, i = fl(this);
1801
- for (const l of this.$$s)
1802
- l in i && (l === "default" && !this.$$d.children ? (this.$$d.children = t(l), r.default = !0) : r[l] = t(l));
1803
- for (const l of this.attributes) {
1804
- const o = this.$$g_p(l.name);
1805
- o in this.$$d || (this.$$d[o] = ar(o, l.value, this.$$p_d, "toProp"));
1775
+ const t = {}, r = Xa(this);
1776
+ for (const o of this.$$s)
1777
+ o in r && (o === "default" && !this.$$d.children ? (this.$$d.children = e(o), t.default = !0) : t[o] = e(o));
1778
+ for (const o of this.attributes) {
1779
+ const l = this.$$g_p(o.name);
1780
+ l in this.$$d || (this.$$d[l] = nr(l, o.value, this.$$p_d, "toProp"));
1806
1781
  }
1807
- for (const l in this.$$p_d)
1808
- !(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
1809
- this.$$c = sl({
1782
+ for (const o in this.$$p_d)
1783
+ !(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
1784
+ this.$$c = Ja({
1810
1785
  component: this.$$ctor,
1811
1786
  target: this.shadowRoot || this,
1812
1787
  props: {
1813
1788
  ...this.$$d,
1814
- $$slots: r,
1789
+ $$slots: t,
1815
1790
  $$host: this
1816
1791
  }
1817
- }), this.$$me = ka(() => {
1818
- Zr(() => {
1819
- var l;
1792
+ }), this.$$me = ha(() => {
1793
+ Hr(() => {
1820
1794
  this.$$r = !0;
1821
- for (const o of lr(this.$$c)) {
1822
- if (!((l = this.$$p_d[o]) != null && l.reflect)) continue;
1795
+ for (const o of or(this.$$c)) {
1796
+ if (!this.$$p_d[o]?.reflect) continue;
1823
1797
  this.$$d[o] = this.$$c[o];
1824
- const f = ar(
1798
+ const l = nr(
1825
1799
  o,
1826
1800
  this.$$d[o],
1827
1801
  this.$$p_d,
1828
1802
  "toAttribute"
1829
1803
  );
1830
- f == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, f);
1804
+ l == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, l);
1831
1805
  }
1832
1806
  this.$$r = !1;
1833
1807
  });
1834
1808
  });
1835
- for (const l in this.$$l)
1836
- for (const o of this.$$l[l]) {
1837
- const f = this.$$c.$on(l, o);
1838
- this.$$l_u.set(o, f);
1809
+ for (const o in this.$$l)
1810
+ for (const l of this.$$l[o]) {
1811
+ const a = this.$$c.$on(o, l);
1812
+ this.$$l_u.set(l, a);
1839
1813
  }
1840
1814
  this.$$l = {};
1841
1815
  }
@@ -1847,9 +1821,8 @@ typeof HTMLElement == "function" && (zi = class extends HTMLElement {
1847
1821
  * @param {string} _oldValue
1848
1822
  * @param {string} newValue
1849
1823
  */
1850
- attributeChangedCallback(t, r, i) {
1851
- var l;
1852
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = ar(t, i, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [t]: this.$$d[t] }));
1824
+ attributeChangedCallback(e, t, r) {
1825
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = nr(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
1853
1826
  }
1854
1827
  disconnectedCallback() {
1855
1828
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -1859,18 +1832,17 @@ typeof HTMLElement == "function" && (zi = class extends HTMLElement {
1859
1832
  /**
1860
1833
  * @param {string} attribute_name
1861
1834
  */
1862
- $$g_p(t) {
1863
- return lr(this.$$p_d).find(
1864
- (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
1865
- ) || t;
1835
+ $$g_p(e) {
1836
+ return or(this.$$p_d).find(
1837
+ (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
1838
+ ) || e;
1866
1839
  }
1867
1840
  });
1868
- function ar(e, t, r, i) {
1869
- var o;
1870
- const l = (o = r[e]) == null ? void 0 : o.type;
1871
- if (t = l === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e])
1841
+ function nr(e, t, r, o) {
1842
+ const l = r[e]?.type;
1843
+ if (t = l === "Boolean" && typeof t != "boolean" ? t != null : t, !o || !r[e])
1872
1844
  return t;
1873
- if (i === "toAttribute")
1845
+ if (o === "toAttribute")
1874
1846
  switch (l) {
1875
1847
  case "Object":
1876
1848
  case "Array":
@@ -1896,7 +1868,7 @@ function ar(e, t, r, i) {
1896
1868
  return t;
1897
1869
  }
1898
1870
  }
1899
- function fl(e) {
1871
+ function Xa(e) {
1900
1872
  const t = {};
1901
1873
  return e.childNodes.forEach((r) => {
1902
1874
  t[
@@ -1905,137 +1877,135 @@ function fl(e) {
1905
1877
  ] = !0;
1906
1878
  }), t;
1907
1879
  }
1908
- function cl(e, t, r, i, l, o) {
1909
- let f = class extends zi {
1880
+ function Qa(e, t, r, o, l, a) {
1881
+ let s = class extends Uo {
1910
1882
  constructor() {
1911
1883
  super(e, r, l), this.$$p_d = t;
1912
1884
  }
1913
1885
  static get observedAttributes() {
1914
- return lr(t).map(
1915
- (s) => (t[s].attribute || s).toLowerCase()
1886
+ return or(t).map(
1887
+ (c) => (t[c].attribute || c).toLowerCase()
1916
1888
  );
1917
1889
  }
1918
1890
  };
1919
- return lr(t).forEach((s) => {
1920
- qt(f.prototype, s, {
1891
+ return or(t).forEach((c) => {
1892
+ Mt(s.prototype, c, {
1921
1893
  get() {
1922
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
1894
+ return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
1923
1895
  },
1924
- set(c) {
1925
- var v;
1926
- c = ar(s, c, t), this.$$d[s] = c;
1896
+ set(f) {
1897
+ f = nr(c, f, t), this.$$d[c] = f;
1927
1898
  var d = this.$$c;
1928
1899
  if (d) {
1929
- var _ = (v = it(d, s)) == null ? void 0 : v.get;
1930
- _ ? d[s] = c : d.$set({ [s]: c });
1900
+ var m = rt(d, c)?.get;
1901
+ m ? d[c] = f : d.$set({ [c]: f });
1931
1902
  }
1932
1903
  }
1933
1904
  });
1934
- }), i.forEach((s) => {
1935
- qt(f.prototype, s, {
1905
+ }), o.forEach((c) => {
1906
+ Mt(s.prototype, c, {
1936
1907
  get() {
1937
- var c;
1938
- return (c = this.$$c) == null ? void 0 : c[s];
1908
+ return this.$$c?.[c];
1939
1909
  }
1940
1910
  });
1941
1911
  }), e.element = /** @type {any} */
1942
- f, f;
1912
+ s, s;
1943
1913
  }
1944
- const Ji = new TextEncoder();
1945
- function dl(e) {
1914
+ const jo = new TextEncoder();
1915
+ function el(e) {
1946
1916
  return [...new Uint8Array(e)].map((t) => t.toString(16).padStart(2, "0")).join("");
1947
1917
  }
1948
- async function hl(e, t = "SHA-256", r = 1e5) {
1949
- const i = Date.now().toString(16);
1918
+ async function tl(e, t = "SHA-256", r = 1e5) {
1919
+ const o = Date.now().toString(16);
1950
1920
  e || (e = Math.round(Math.random() * r));
1951
- const l = await Ki(i, e, t);
1921
+ const l = await qo(o, e, t);
1952
1922
  return {
1953
1923
  algorithm: t,
1954
1924
  challenge: l,
1955
- salt: i,
1925
+ salt: o,
1956
1926
  signature: ""
1957
1927
  };
1958
1928
  }
1959
- async function Ki(e, t, r) {
1929
+ async function qo(e, t, r) {
1960
1930
  if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
1961
1931
  throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
1962
- return dl(
1932
+ return el(
1963
1933
  await crypto.subtle.digest(
1964
1934
  r.toUpperCase(),
1965
- Ji.encode(e + t)
1935
+ jo.encode(e + t)
1966
1936
  )
1967
1937
  );
1968
1938
  }
1969
- function vl(e, t, r = "SHA-256", i = 1e6, l = 0) {
1970
- const o = new AbortController(), f = Date.now();
1939
+ function rl(e, t, r = "SHA-256", o = 1e6, l = 0) {
1940
+ const a = new AbortController(), s = Date.now();
1971
1941
  return {
1972
1942
  promise: (async () => {
1973
- for (let c = l; c <= i; c += 1) {
1974
- if (o.signal.aborted)
1943
+ for (let f = l; f <= o; f += 1) {
1944
+ if (a.signal.aborted)
1975
1945
  return null;
1976
- if (await Ki(t, c, r) === e)
1946
+ if (await qo(t, f, r) === e)
1977
1947
  return {
1978
- number: c,
1979
- took: Date.now() - f
1948
+ number: f,
1949
+ took: Date.now() - s
1980
1950
  };
1981
1951
  }
1982
1952
  return null;
1983
1953
  })(),
1984
- controller: o
1954
+ controller: a
1985
1955
  };
1986
1956
  }
1987
- function ti() {
1957
+ function Wn() {
1988
1958
  try {
1989
1959
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1990
1960
  } catch {
1991
1961
  }
1992
1962
  }
1993
- function gl(e) {
1963
+ function nl(e) {
1994
1964
  const t = atob(e), r = new Uint8Array(t.length);
1995
- for (let i = 0; i < t.length; i++)
1996
- r[i] = t.charCodeAt(i);
1965
+ for (let o = 0; o < t.length; o++)
1966
+ r[o] = t.charCodeAt(o);
1997
1967
  return r;
1998
1968
  }
1999
- function pl(e, t = 12) {
1969
+ function ol(e, t = 12) {
2000
1970
  const r = new Uint8Array(t);
2001
- for (let i = 0; i < t; i++)
2002
- r[i] = e % 256, e = Math.floor(e / 256);
1971
+ for (let o = 0; o < t; o++)
1972
+ r[o] = e % 256, e = Math.floor(e / 256);
2003
1973
  return r;
2004
1974
  }
2005
- async function ml(e, t = "", r = 1e6, i = 0) {
2006
- const l = "AES-GCM", o = new AbortController(), f = Date.now(), s = async () => {
2007
- for (let _ = i; _ <= r; _ += 1) {
2008
- if (o.signal.aborted || !c || !d)
1975
+ async function il(e, t = "", r = 1e6, o = 0) {
1976
+ const l = "AES-GCM", a = new AbortController(), s = Date.now(), c = async () => {
1977
+ for (let m = o; m <= r; m += 1) {
1978
+ if (a.signal.aborted || !f || !d)
2009
1979
  return null;
2010
1980
  try {
2011
1981
  const v = await crypto.subtle.decrypt(
2012
1982
  {
2013
1983
  name: l,
2014
- iv: pl(_)
1984
+ iv: ol(m)
2015
1985
  },
2016
- c,
1986
+ f,
2017
1987
  d
2018
1988
  );
2019
1989
  if (v)
2020
1990
  return {
2021
1991
  clearText: new TextDecoder().decode(v),
2022
- took: Date.now() - f
1992
+ took: Date.now() - s
2023
1993
  };
2024
1994
  } catch {
2025
1995
  }
2026
1996
  }
2027
1997
  return null;
2028
1998
  };
2029
- let c = null, d = null;
1999
+ let f = null, d = null;
2030
2000
  try {
2031
- d = gl(e);
2032
- const _ = await crypto.subtle.digest(
2001
+ d = nl(e);
2002
+ const m = await crypto.subtle.digest(
2033
2003
  "SHA-256",
2034
- Ji.encode(t)
2004
+ jo.encode(t)
2035
2005
  );
2036
- c = await crypto.subtle.importKey(
2006
+ f = await crypto.subtle.importKey(
2037
2007
  "raw",
2038
- _,
2008
+ m,
2039
2009
  l,
2040
2010
  !1,
2041
2011
  ["decrypt"]
@@ -2043,26 +2013,26 @@ async function ml(e, t = "", r = 1e6, i = 0) {
2043
2013
  } catch {
2044
2014
  return {
2045
2015
  promise: Promise.reject(),
2046
- controller: o
2016
+ controller: a
2047
2017
  };
2048
2018
  }
2049
2019
  return {
2050
- promise: s(),
2051
- controller: o
2020
+ promise: c(),
2021
+ controller: a
2052
2022
  };
2053
2023
  }
2054
- var w = /* @__PURE__ */ ((e) => (e.CODE = "code", e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(w || {}), ee = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.READY = "ready", e))(ee || {});
2024
+ var y = /* @__PURE__ */ ((e) => (e.CODE = "code", e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(y || {}), Q = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.READY = "ready", e))(Q || {});
2055
2025
  globalThis.altchaPlugins = globalThis.altchaPlugins || [];
2056
2026
  globalThis.altchaI18n = globalThis.altchaI18n || {
2057
- get: (e) => or(globalThis.altchaI18n.store)[e],
2027
+ get: (e) => rr(globalThis.altchaI18n.store)[e],
2058
2028
  set: (e, t) => {
2059
- Object.assign(or(globalThis.altchaI18n.store), {
2029
+ Object.assign(rr(globalThis.altchaI18n.store), {
2060
2030
  [e]: t
2061
- }), globalThis.altchaI18n.store.set(or(globalThis.altchaI18n.store));
2031
+ }), globalThis.altchaI18n.store.set(rr(globalThis.altchaI18n.store));
2062
2032
  },
2063
- store: il({})
2033
+ store: Wa({})
2064
2034
  };
2065
- const _l = {
2035
+ const al = {
2066
2036
  ariaLinkLabel: "Visit Altcha.org",
2067
2037
  enterCode: "Enter code",
2068
2038
  enterCodeAria: "Enter code you hear. Press Space to play audio.",
@@ -2079,137 +2049,130 @@ const _l = {
2079
2049
  verifying: "Verifying...",
2080
2050
  waitAlert: "Verifying... please wait."
2081
2051
  };
2082
- globalThis.altchaI18n.set("en", _l);
2083
- const Nr = (e, t) => {
2084
- let r = /* @__PURE__ */ wa(() => oa(t == null ? void 0 : t(), 24));
2085
- var i = El();
2086
- Se(() => {
2087
- S(i, "width", a(r)), S(i, "height", a(r));
2088
- }), j(e, i);
2052
+ globalThis.altchaI18n.set("en", al);
2053
+ const $r = (e, t) => {
2054
+ let r = /* @__PURE__ */ ua(() => Yi(t?.(), 24));
2055
+ var o = cl();
2056
+ Ce(() => {
2057
+ R(o, "width", i(r)), R(o, "height", i(r));
2058
+ }), B(e, o);
2089
2059
  };
2090
- function bl(e, t) {
2060
+ function ll(e, t) {
2091
2061
  e.code === "Space" && (e.preventDefault(), e.stopImmediatePropagation(), t());
2092
2062
  }
2093
- function yl(e, t) {
2063
+ function sl(e, t) {
2094
2064
  e.preventDefault(), t();
2095
2065
  }
2096
- function wl(e, t, r, i, l, o, f, s) {
2097
- var c;
2066
+ function ul(e, t, r, o, l, a, s, c) {
2098
2067
  [
2099
- w.UNVERIFIED,
2100
- w.ERROR,
2101
- w.EXPIRED,
2102
- w.CODE
2103
- ].includes(a(t)) ? r() !== !1 && ((c = a(i)) == null ? void 0 : c.reportValidity()) === !1 ? b(l, !1) : o() ? f() : s() : b(l, !0);
2104
- }
2105
- var El = /* @__PURE__ */ wr('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'), Cl = /* @__PURE__ */ ke('<input type="hidden">'), xl = /* @__PURE__ */ ke('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'), kl = /* @__PURE__ */ wr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'), Al = /* @__PURE__ */ wr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'), Il = /* @__PURE__ */ wr('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'), Rl = /* @__PURE__ */ ke('<button type="button" class="altcha-code-challenge-audio"><!></button>'), $l = /* @__PURE__ */ ke("<audio hidden autoplay><source></audio>"), Sl = /* @__PURE__ */ ke('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'), Tl = /* @__PURE__ */ ke("<div><!></div>"), Dl = /* @__PURE__ */ ke("<div><!></div>"), Nl = /* @__PURE__ */ ke('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), Ll = /* @__PURE__ */ ke('<div class="altcha-footer"><div><!></div></div>'), Pl = /* @__PURE__ */ ke('<div class="altcha-anchor-arrow"></div>'), Ol = /* @__PURE__ */ ke('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>', 1);
2106
- function Fl(e, t) {
2107
- var Fn, Mn;
2108
- Mi(t, !0);
2109
- const [r, i] = al(), l = () => ol(to, "$altchaI18nStore", r);
2110
- let o = k(t, "auto", 7, void 0), f = k(t, "blockspam", 7, void 0), s = k(t, "challengeurl", 7, void 0), c = k(t, "challengejson", 7, void 0), d = k(t, "credentials", 7, void 0), _ = k(t, "customfetch", 7, void 0), v = k(t, "debug", 7, !1), m = k(t, "delay", 7, 0), y = k(t, "disableautofocus", 7, !1), $ = k(t, "expire", 7, void 0), E = k(t, "floating", 7, void 0), U = k(t, "floatinganchor", 7, void 0), ce = k(t, "floatingoffset", 7, void 0), K = k(t, "floatingpersist", 7, !1), te = k(t, "hidefooter", 7, !1), X = k(t, "hidelogo", 7, !1), ft = k(t, "id", 7, void 0), q = k(t, "language", 7, void 0), ae = k(t, "name", 7, "altcha"), be = k(t, "maxnumber", 7, 1e6), At = k(t, "mockerror", 7, !1), Me = k(t, "obfuscated", 7, void 0), ye = k(t, "overlay", 7, void 0), It = k(t, "overlaycontent", 7, void 0), Zt = k(t, "plugins", 7, void 0), Rt = k(t, "refetchonexpire", 7, !0), ze = k(t, "sentinel", 7, void 0), Ae = k(t, "spamfilter", 7, !1), ct = k(t, "strings", 7, void 0), ge = k(t, "test", 7, !1), re = k(t, "verifyurl", 7, void 0), dt = k(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), $t = k(t, "workerurl", 7, void 0);
2111
- const { altchaI18n: eo } = globalThis, to = eo.store, Qr = ["SHA-256", "SHA-384", "SHA-512"], ro = "https://altcha.org/", Ve = (n, u) => {
2068
+ y.UNVERIFIED,
2069
+ y.ERROR,
2070
+ y.EXPIRED,
2071
+ y.CODE
2072
+ ].includes(i(t)) ? r() !== !1 && i(o)?.reportValidity() === !1 ? b(l, !1) : a() ? s() : c() : b(l, !0);
2073
+ }
2074
+ var cl = /* @__PURE__ */ _r('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" fill="currentColor" opacity=".25"></path><path d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" fill="currentColor"></path></svg>'), fl = /* @__PURE__ */ be('<input type="hidden">'), dl = /* @__PURE__ */ be('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z" fill="currentColor"></path><path d="M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z" fill="currentColor"></path><path d="M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z" fill="currentColor"></path></svg></a></div>'), hl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'), vl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'), gl = /* @__PURE__ */ _r('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'), pl = /* @__PURE__ */ be('<button type="button" class="altcha-code-challenge-audio"><!></button>'), ml = /* @__PURE__ */ be("<audio hidden autoplay><source></audio>"), _l = /* @__PURE__ */ be('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'), bl = /* @__PURE__ */ be("<div><!></div>"), yl = /* @__PURE__ */ be("<div><!></div>"), wl = /* @__PURE__ */ be('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), El = /* @__PURE__ */ be('<div class="altcha-footer"><div><!></div></div>'), xl = /* @__PURE__ */ be('<div class="altcha-anchor-arrow"></div>'), Cl = /* @__PURE__ */ be('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>', 1);
2075
+ function kl(e, t) {
2076
+ $o(t, !0);
2077
+ const [r, o] = Za(), l = () => Ya(Wo, "$altchaI18nStore", r);
2078
+ let a = x(t, "auto", 7, void 0), s = x(t, "blockspam", 7, void 0), c = x(t, "challengeurl", 7, void 0), f = x(t, "challengejson", 7, void 0), d = x(t, "credentials", 7, void 0), m = x(t, "customfetch", 7, void 0), v = x(t, "debug", 7, !1), _ = x(t, "delay", 7, 0), w = x(t, "disableautofocus", 7, !1), F = x(t, "refetchonexpire", 7, !0), M = x(t, "disablerefetchonexpire", 23, () => !F()), U = x(t, "expire", 7, void 0), I = x(t, "floating", 7, void 0), ee = x(t, "floatinganchor", 7, void 0), $e = x(t, "floatingoffset", 7, void 0), X = x(t, "floatingpersist", 7, !1), j = x(t, "hidefooter", 7, !1), se = x(t, "hidelogo", 7, !1), He = x(t, "id", 7, void 0), Ht = x(t, "language", 7, void 0), Ge = x(t, "name", 7, "altcha"), We = x(t, "maxnumber", 7, 1e6), xt = x(t, "mockerror", 7, !1), Ne = x(t, "obfuscated", 7, void 0), ge = x(t, "overlay", 7, void 0), Ct = x(t, "overlaycontent", 7, void 0), Gt = x(t, "plugins", 7, void 0), Ye = x(t, "sentinel", 7, void 0), ye = x(t, "spamfilter", 7, !1), st = x(t, "strings", 7, void 0), de = x(t, "test", 7, !1), te = x(t, "verifyurl", 7, void 0), ut = x(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), kt = x(t, "workerurl", 7, void 0);
2079
+ const { altchaI18n: Go } = globalThis, Wo = Go.store, zr = ["SHA-256", "SHA-384", "SHA-512"], Yo = "https://altcha.org/", Le = (n, u) => {
2112
2080
  t.$$host.dispatchEvent(new CustomEvent(n, { detail: u }));
2113
- }, en = (Mn = (Fn = document.documentElement.lang) == null ? void 0 : Fn.split("-")) == null ? void 0 : Mn[0], Er = /* @__PURE__ */ Mt(() => {
2114
- var n;
2115
- return s() && new URL(s(), location.origin).host.endsWith(".altcha.org") && !!((n = s()) != null && n.includes("apiKey=ckey_"));
2116
- }), zt = /* @__PURE__ */ Mt(() => c() ? pn(c()) : void 0), no = /* @__PURE__ */ Mt(() => ct() ? pn(ct()) : {}), P = /* @__PURE__ */ Mt(() => ({
2117
- ...on(l()),
2118
- ...a(no)
2119
- })), tn = /* @__PURE__ */ Mt(() => `${ft() || ae()}_checkbox_${Math.round(Math.random() * 1e8)}`);
2120
- let Je = /* @__PURE__ */ L(null), St = /* @__PURE__ */ L(!1), H = /* @__PURE__ */ L(null), I = /* @__PURE__ */ L(Be(w.UNVERIFIED)), M = /* @__PURE__ */ L(void 0), Tt = /* @__PURE__ */ L(null), Ue = /* @__PURE__ */ L(null), de = /* @__PURE__ */ L(null), Cr = /* @__PURE__ */ L(null), ht = /* @__PURE__ */ L(null), N = /* @__PURE__ */ L(null), Dt = /* @__PURE__ */ L(null), Ke = /* @__PURE__ */ L(null), Ie = null, G = /* @__PURE__ */ L(null), Xe = /* @__PURE__ */ L(!1), je = [], xr = /* @__PURE__ */ L(!1), Re = /* @__PURE__ */ L(null);
2121
- Or(() => {
2122
- mo(a(Ke));
2123
- }), Or(() => {
2124
- _o(a(I));
2125
- }), nl(() => {
2126
- io(), b(Dt, null), a(N) && (a(N).removeEventListener("submit", cn), a(N).removeEventListener("reset", dn), a(N).removeEventListener("focusin", fn), b(N, null)), Ie && (clearTimeout(Ie), Ie = null), document.removeEventListener("click", sn), document.removeEventListener("scroll", un), window.removeEventListener("resize", gn);
2127
- }), Yi(() => {
2128
- var n;
2129
- R("mounted", "2.2.2"), R("workers", dt()), so(), R("plugins", je.length ? je.map((u) => u.constructor.pluginName).join(", ") : "none"), ge() && R("using test mode"), $() && kr($()), o() !== void 0 && R("auto", o()), E() !== void 0 && yn(E()), b(N, (n = a(M)) == null ? void 0 : n.closest("form"), !0), a(N) && (a(N).addEventListener("submit", cn, { capture: !0 }), a(N).addEventListener("reset", dn), (o() === "onfocus" || K() === "focus") && a(N).addEventListener("focusin", fn)), ye() && wn(!0), o() === "onload" && (Me() ? Nt() : Pe()), a(Er) && (te() || X()) && R("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
2130
- Ve("load");
2081
+ }, Jr = document.documentElement.lang?.split("-")?.[0], br = /* @__PURE__ */ Lt(() => c() && new URL(c(), location.origin).host.endsWith(".altcha.org") && !!c()?.includes("apiKey=ckey_")), Wt = /* @__PURE__ */ Lt(() => f() ? fn(f()) : void 0), Zo = /* @__PURE__ */ Lt(() => st() ? fn(st()) : {}), L = /* @__PURE__ */ Lt(() => ({
2082
+ ...Qr(l()),
2083
+ ...i(Zo)
2084
+ })), Kr = /* @__PURE__ */ Lt(() => `${He() || Ge()}_checkbox_${Math.round(Math.random() * 1e8)}`);
2085
+ let Ze = /* @__PURE__ */ N(null), At = /* @__PURE__ */ N(!1), G = /* @__PURE__ */ N(null), k = /* @__PURE__ */ N(Me(y.UNVERIFIED)), V = /* @__PURE__ */ N(void 0), It = /* @__PURE__ */ N(null), Pe = /* @__PURE__ */ N(null), ue = /* @__PURE__ */ N(null), yr = /* @__PURE__ */ N(null), ct = /* @__PURE__ */ N(null), T = /* @__PURE__ */ N(null), Rt = /* @__PURE__ */ N(null), ze = /* @__PURE__ */ N(null), we = null, W = /* @__PURE__ */ N(null), Je = /* @__PURE__ */ N(!1), Oe = [], wr = /* @__PURE__ */ N(!1), Ee = /* @__PURE__ */ N(null);
2086
+ Dr(() => {
2087
+ li(i(ze));
2088
+ }), Dr(() => {
2089
+ si(i(k));
2090
+ }), Ga(() => {
2091
+ zo(), b(Rt, null), i(T) && (i(T).removeEventListener("submit", an), i(T).removeEventListener("reset", ln), i(T).removeEventListener("focusin", on), b(T, null)), we && (clearTimeout(we), we = null), document.removeEventListener("click", rn), document.removeEventListener("scroll", nn), window.removeEventListener("resize", cn);
2092
+ }), Mo(() => {
2093
+ A("mounted", "2.2.4"), A("workers", ut()), Qo(), A("plugins", Oe.length ? Oe.map((n) => n.constructor.pluginName).join(", ") : "none"), de() && A("using test mode"), U() && xr(U()), a() !== void 0 && A("auto", a()), I() !== void 0 && gn(I()), b(T, i(V)?.closest("form"), !0), i(T) && (i(T).addEventListener("submit", an, { capture: !0 }), i(T).addEventListener("reset", ln), (a() === "onfocus" || X() === "focus") && i(T).addEventListener("focusin", on)), ge() && pn(!0), a() === "onload" && (Ne() ? $t() : Se()), i(br) && (j() || se()) && A("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
2094
+ Le("load");
2131
2095
  });
2132
2096
  });
2133
- function Jt(n, u) {
2097
+ function Yt(n, u) {
2134
2098
  return btoa(JSON.stringify({
2135
2099
  algorithm: n.algorithm,
2136
2100
  challenge: n.challenge,
2137
2101
  number: u.number,
2138
2102
  salt: n.salt,
2139
2103
  signature: n.signature,
2140
- test: ge() ? !0 : void 0,
2104
+ test: de() ? !0 : void 0,
2141
2105
  took: u.took
2142
2106
  }));
2143
2107
  }
2144
- function io() {
2145
- for (const n of je)
2108
+ function zo() {
2109
+ for (const n of Oe)
2146
2110
  n.destroy();
2147
2111
  }
2148
- function rn() {
2149
- s() && Rt() && a(I) === w.VERIFIED ? Pe() : Qe(w.EXPIRED, a(P).expired);
2112
+ function Xr() {
2113
+ c() && !M() && i(k) === y.VERIFIED ? Se() : Ke(y.EXPIRED, i(L).expired);
2150
2114
  }
2151
- async function oo() {
2152
- if (At())
2153
- throw R("mocking error"), new Error("Mocked error.");
2154
- if (a(zt))
2155
- return R("using provided json data"), mn(a(zt).salt), a(zt);
2156
- if (ge())
2157
- return R("generating test challenge", { test: ge() }), hl(typeof ge() != "boolean" ? +ge() : void 0);
2115
+ async function Jo() {
2116
+ if (xt())
2117
+ throw A("mocking error"), new Error("Mocked error.");
2118
+ if (i(Wt))
2119
+ return A("using provided json data"), dn(i(Wt).salt), i(Wt);
2120
+ if (de())
2121
+ return A("generating test challenge", { test: de() }), tl(typeof de() != "boolean" ? +de() : void 0);
2158
2122
  {
2159
- if (!s() && a(N)) {
2160
- const h = a(N).getAttribute("action");
2161
- h != null && h.includes("/form/") && s(h + "/altcha");
2123
+ if (!c() && i(T)) {
2124
+ const g = i(T).getAttribute("action");
2125
+ g?.includes("/form/") && c(g + "/altcha");
2162
2126
  }
2163
- if (!s())
2127
+ if (!c())
2164
2128
  throw new Error("Attribute challengeurl not set.");
2165
- R("fetching challenge from", s());
2129
+ A("fetching challenge from", c());
2166
2130
  const n = {
2167
2131
  credentials: typeof d() == "boolean" ? "include" : d(),
2168
- headers: Ae() !== !1 ? { "x-altcha-spam-filter": "1" } : {}
2169
- }, u = await nn()(s(), n);
2132
+ headers: ye() !== !1 ? { "x-altcha-spam-filter": "1" } : {}
2133
+ }, u = await Er()(c(), n);
2170
2134
  if (!u || !(u instanceof Response))
2171
2135
  throw new Error("Custom fetch function did not return a response.");
2172
2136
  if (u.status !== 200)
2173
2137
  throw new Error(`Server responded with ${u.status}.`);
2174
- const g = u.headers.get("X-Altcha-Config"), p = await u.json();
2175
- if (mn(p.salt), g)
2138
+ const h = u.headers.get("X-Altcha-Config"), p = await u.json();
2139
+ if (dn(p.salt), h)
2176
2140
  try {
2177
- const h = JSON.parse(g);
2178
- h && typeof h == "object" && (h.verifyurl && !h.verifyurl.startsWith("fn:") && (h.verifyurl = ln(h.verifyurl)), xn(h));
2179
- } catch (h) {
2180
- R("unable to configure from X-Altcha-Config", h);
2141
+ const g = JSON.parse(h);
2142
+ g && typeof g == "object" && (g.verifyurl && !g.verifyurl.startsWith("fn:") && (g.verifyurl = tn(g.verifyurl)), bn(g));
2143
+ } catch (g) {
2144
+ A("unable to configure from X-Altcha-Config", g);
2181
2145
  }
2182
2146
  return p;
2183
2147
  }
2184
2148
  }
2185
- function ao(n) {
2186
- var g, p;
2187
- const u = (g = a(N)) == null ? void 0 : g.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
2188
- return ((p = u == null ? void 0 : u.value) == null ? void 0 : p.slice(u.value.indexOf("@"))) || void 0;
2149
+ function Ko(n) {
2150
+ const u = i(T)?.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
2151
+ return u?.value?.slice(u.value.indexOf("@")) || void 0;
2189
2152
  }
2190
- function nn() {
2153
+ function Er() {
2191
2154
  let n = fetch;
2192
- if (_())
2193
- if (R("using customfetch"), typeof _() == "string") {
2194
- if (n = globalThis[_()] || null, !n)
2195
- throw new Error(`Custom fetch function not found: ${_()}`);
2155
+ if (m())
2156
+ if (A("using customfetch"), typeof m() == "string") {
2157
+ if (n = globalThis[m()] || null, !n)
2158
+ throw new Error(`Custom fetch function not found: ${m()}`);
2196
2159
  } else
2197
- n = _();
2160
+ n = m();
2198
2161
  return n;
2199
2162
  }
2200
- function on(n, u = [
2201
- q() || "",
2163
+ function Qr(n, u = [
2164
+ Ht() || "",
2202
2165
  document.documentElement.lang || "",
2203
2166
  ...navigator.languages
2204
2167
  ]) {
2205
- const g = Object.keys(n).map((h) => h.toLowerCase()), p = u.reduce(
2206
- (h, C) => (C = C.toLowerCase(), h || (n[C] ? C : null) || g.find((A) => C.split("-")[0] === A.split("-")[0]) || null),
2168
+ const h = Object.keys(n).map((g) => g.toLowerCase()), p = u.reduce(
2169
+ (g, C) => (C = C.toLowerCase(), g || (n[C] ? C : null) || h.find((D) => C.split("-")[0] === D.split("-")[0]) || null),
2207
2170
  null
2208
2171
  );
2209
2172
  return n[p || "en"];
2210
2173
  }
2211
- function lo() {
2212
- return Ae() === "ipAddress" ? {
2174
+ function Xo() {
2175
+ return ye() === "ipAddress" ? {
2213
2176
  blockedCountries: void 0,
2214
2177
  classifier: void 0,
2215
2178
  disableRules: void 0,
@@ -2220,7 +2183,7 @@ function Fl(e, t) {
2220
2183
  ipAddress: void 0,
2221
2184
  text: void 0,
2222
2185
  timeZone: void 0
2223
- } : typeof Ae() == "object" ? Ae() : {
2186
+ } : typeof ye() == "object" ? ye() : {
2224
2187
  blockedCountries: void 0,
2225
2188
  classifier: void 0,
2226
2189
  disableRules: void 0,
@@ -2233,187 +2196,179 @@ function Fl(e, t) {
2233
2196
  timeZone: void 0
2234
2197
  };
2235
2198
  }
2236
- function an(n) {
2237
- var g;
2199
+ function en(n) {
2238
2200
  return [
2239
- ...((g = a(N)) == null ? void 0 : g.querySelectorAll(n != null && n.length ? n.map((p) => `input[name="${p}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
2201
+ ...i(T)?.querySelectorAll(n?.length ? n.map((h) => `input[name="${h}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])') || []
2240
2202
  ].reduce(
2241
- (p, h) => {
2242
- const C = h.name, A = h.value;
2243
- return C && A && (p[C] = /\n/.test(A) ? A.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
2244
- `) : A), p;
2203
+ (h, p) => {
2204
+ const g = p.name, C = p.value;
2205
+ return g && C && (h[g] = /\n/.test(C) ? C.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
2206
+ `) : C), h;
2245
2207
  },
2246
2208
  {}
2247
2209
  );
2248
2210
  }
2249
- function ln(n, u) {
2250
- const g = new URL(s() || location.origin), p = new URL(n, g);
2251
- if (p.search || (p.search = g.search), u)
2252
- for (const h in u)
2253
- u[h] !== void 0 && u[h] !== null && p.searchParams.set(h, u[h]);
2211
+ function tn(n, u) {
2212
+ const h = new URL(c() || location.origin), p = new URL(n, h);
2213
+ if (p.search || (p.search = h.search), u)
2214
+ for (const g in u)
2215
+ u[g] !== void 0 && u[g] !== null && p.searchParams.set(g, u[g]);
2254
2216
  return p.toString();
2255
2217
  }
2256
- function so() {
2257
- const n = Zt() !== void 0 ? Zt().split(",") : void 0;
2218
+ function Qo() {
2219
+ const n = Gt() !== void 0 ? Gt().split(",") : void 0;
2258
2220
  for (const u of globalThis.altchaPlugins)
2259
- (!n || n.includes(u.pluginName)) && je.push(new u({
2260
- el: a(M),
2261
- clarify: Nt,
2262
- dispatch: Ve,
2263
- getConfiguration: kn,
2264
- getFloatingAnchor: An,
2265
- getState: In,
2266
- log: R,
2267
- reset: Qe,
2268
- solve: Cn,
2269
- setState: $e,
2270
- setFloatingAnchor: Rn,
2271
- verify: Pe
2221
+ (!n || n.includes(u.pluginName)) && Oe.push(new u({
2222
+ el: i(V),
2223
+ clarify: $t,
2224
+ dispatch: Le,
2225
+ getConfiguration: yn,
2226
+ getFloatingAnchor: wn,
2227
+ getState: En,
2228
+ log: A,
2229
+ reset: Ke,
2230
+ solve: _n,
2231
+ setState: xe,
2232
+ setFloatingAnchor: xn,
2233
+ verify: Se
2272
2234
  }));
2273
2235
  }
2274
- function R(...n) {
2275
- (v() || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${ae()}]`, ...n);
2236
+ function A(...n) {
2237
+ (v() || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Ge()}]`, ...n);
2276
2238
  }
2277
- function uo() {
2278
- b(G, ee.PAUSED, !0);
2239
+ function ei() {
2240
+ b(W, Q.PAUSED, !0);
2279
2241
  }
2280
- function fo(n) {
2281
- b(G, ee.ERROR, !0);
2242
+ function ti(n) {
2243
+ b(W, Q.ERROR, !0);
2282
2244
  }
2283
- function co() {
2284
- b(G, ee.READY, !0);
2245
+ function ri() {
2246
+ b(W, Q.READY, !0);
2285
2247
  }
2286
- function ho() {
2287
- b(G, ee.LOADING, !0);
2248
+ function ni() {
2249
+ b(W, Q.LOADING, !0);
2288
2250
  }
2289
- function vo() {
2290
- b(G, ee.PLAYING, !0);
2251
+ function oi() {
2252
+ b(W, Q.PLAYING, !0);
2291
2253
  }
2292
- function go() {
2293
- b(G, ee.PAUSED, !0);
2254
+ function ii() {
2255
+ b(W, Q.PAUSED, !0);
2294
2256
  }
2295
- function po(n) {
2296
- var u;
2297
- if (n.preventDefault(), n.stopPropagation(), a(H)) {
2298
- const g = new FormData(n.target), p = String(g.get("code"));
2299
- if ((u = re()) != null && u.startsWith("fn:")) {
2300
- const h = re().replace(/^fn:/, "");
2301
- if (R(`calling ${h} function instead of verifyurl`), !(h in globalThis))
2302
- throw new Error(`Global function "${h}" is undefined.`);
2303
- return globalThis[h]({
2304
- challenge: a(H).challenge,
2305
- code: p,
2306
- solution: a(H).solution
2257
+ function ai(n) {
2258
+ if (n.preventDefault(), n.stopPropagation(), i(G)) {
2259
+ const u = new FormData(n.target), h = String(u.get("code"));
2260
+ if (te()?.startsWith("fn:")) {
2261
+ const p = te().replace(/^fn:/, "");
2262
+ if (A(`calling ${p} function instead of verifyurl`), !(p in globalThis))
2263
+ throw new Error(`Global function "${p}" is undefined.`);
2264
+ return globalThis[p]({
2265
+ challenge: i(G).challenge,
2266
+ code: h,
2267
+ solution: i(G).solution
2307
2268
  });
2308
2269
  }
2309
- b(Xe, !0), _n(Jt(a(H).challenge, a(H).solution), p).then(({ reason: h, verified: C }) => {
2310
- C ? (b(H, null), $e(w.VERIFIED), R("verified"), Dr().then(() => {
2311
- var A;
2312
- (A = a(Cr)) == null || A.focus(), Ve("verified", { payload: a(Re) }), o() === "onsubmit" ? bn(a(Dt)) : ye() && Lt();
2313
- })) : (Qe(), b(Ke, h || "Verification failed", !0));
2314
- }).catch((h) => {
2315
- b(H, null), $e(w.ERROR, h), R("sentinel verification failed:", h);
2270
+ b(Je, !0), hn(Yt(i(G).challenge, i(G).solution), h).then(({ reason: p, verified: g }) => {
2271
+ g ? (b(G, null), xe(y.VERIFIED), A("verified"), Rr().then(() => {
2272
+ i(yr)?.focus(), Le("verified", { payload: i(Ee) }), a() === "onsubmit" ? vn(i(Rt)) : ge() && St();
2273
+ })) : (Ke(), b(ze, p || "Verification failed", !0));
2274
+ }).catch((p) => {
2275
+ b(G, null), xe(y.ERROR, p), A("sentinel verification failed:", p);
2316
2276
  }).finally(() => {
2317
- b(Xe, !1);
2277
+ b(Je, !1);
2318
2278
  });
2319
2279
  }
2320
2280
  }
2321
- function sn(n) {
2322
- var g;
2281
+ function rn(n) {
2323
2282
  const u = n.target;
2324
- E() && u && !a(M).contains(u) && (a(I) === w.VERIFIED && K() === !1 || a(I) === w.VERIFIED && K() === "focus" && !((g = a(N)) != null && g.matches(":focus-within")) || o() === "off" && a(I) === w.UNVERIFIED) && Lt();
2283
+ I() && u && !i(V).contains(u) && (i(k) === y.VERIFIED && X() === !1 || i(k) === y.VERIFIED && X() === "focus" && !i(T)?.matches(":focus-within") || a() === "off" && i(k) === y.UNVERIFIED) && St();
2325
2284
  }
2326
- function un() {
2327
- E() && a(I) !== w.UNVERIFIED && Pt();
2285
+ function nn() {
2286
+ I() && i(k) !== y.UNVERIFIED && Tt();
2328
2287
  }
2329
- function mo(n) {
2330
- for (const u of je)
2331
- typeof u.onErrorChange == "function" && u.onErrorChange(a(Ke));
2288
+ function li(n) {
2289
+ for (const u of Oe)
2290
+ typeof u.onErrorChange == "function" && u.onErrorChange(i(ze));
2332
2291
  }
2333
- function fn(n) {
2334
- a(I) === w.UNVERIFIED ? Pe() : E() && K() === "focus" && a(I) === w.VERIFIED && Kt();
2292
+ function on(n) {
2293
+ i(k) === y.UNVERIFIED ? Se() : I() && X() === "focus" && i(k) === y.VERIFIED && Zt();
2335
2294
  }
2336
- function cn(n) {
2337
- var p;
2338
- const u = n.target;
2339
- u != null && u.hasAttribute("data-code-challenge-form") || (b(Dt, n.submitter, !0), a(N) && o() === "onsubmit" ? ((p = a(Dt)) == null || p.blur(), a(I) === w.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), Pe().then(() => {
2340
- bn(a(Dt));
2341
- })) : a(I) !== w.VERIFIED && (n.preventDefault(), n.stopPropagation(), a(I) === w.VERIFYING && hn())) : a(N) && E() && o() === "off" && a(I) === w.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), Kt()));
2295
+ function an(n) {
2296
+ n.target?.hasAttribute("data-code-challenge-form") || (b(Rt, n.submitter, !0), i(T) && a() === "onsubmit" ? (i(Rt)?.blur(), i(k) === y.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), Se().then(() => {
2297
+ vn(i(Rt));
2298
+ })) : i(k) !== y.VERIFIED && (n.preventDefault(), n.stopPropagation(), i(k) === y.VERIFYING && sn())) : i(T) && I() && a() === "off" && i(k) === y.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), Zt()));
2342
2299
  }
2343
- function dn() {
2344
- Qe();
2300
+ function ln() {
2301
+ Ke();
2345
2302
  }
2346
- function hn() {
2347
- a(I) === w.VERIFYING && a(P).waitAlert && alert(a(P).waitAlert);
2303
+ function sn() {
2304
+ i(k) === y.VERIFYING && i(L).waitAlert && alert(i(L).waitAlert);
2348
2305
  }
2349
- function vn() {
2350
- a(Ue) ? a(Ue).paused ? (a(Ue).currentTime = 0, a(Ue).play()) : a(Ue).pause() : (b(xr, !0), requestAnimationFrame(() => {
2351
- var n;
2352
- (n = a(Ue)) == null || n.play();
2306
+ function un() {
2307
+ i(Pe) ? i(Pe).paused ? (i(Pe).currentTime = 0, i(Pe).play()) : i(Pe).pause() : (b(wr, !0), requestAnimationFrame(() => {
2308
+ i(Pe)?.play();
2353
2309
  }));
2354
2310
  }
2355
- function _o(n) {
2356
- for (const u of je)
2357
- typeof u.onStateChange == "function" && u.onStateChange(a(I));
2358
- E() && a(I) !== w.UNVERIFIED && requestAnimationFrame(() => {
2359
- Pt();
2360
- }), b(St, a(I) === w.VERIFIED), ye() && a(de) && (a(I) !== w.UNVERIFIED ? Kt() : Lt());
2311
+ function si(n) {
2312
+ for (const u of Oe)
2313
+ typeof u.onStateChange == "function" && u.onStateChange(i(k));
2314
+ I() && i(k) !== y.UNVERIFIED && requestAnimationFrame(() => {
2315
+ Tt();
2316
+ }), b(At, i(k) === y.VERIFIED), ge() && i(ue) && (i(k) !== y.UNVERIFIED ? Zt() : St());
2361
2317
  }
2362
- function gn() {
2363
- E() && Pt();
2318
+ function cn() {
2319
+ I() && Tt();
2364
2320
  }
2365
- function pn(n) {
2321
+ function fn(n) {
2366
2322
  return JSON.parse(n);
2367
2323
  }
2368
- function mn(n) {
2369
- var p;
2370
- const u = new URLSearchParams((p = n.split("?")) == null ? void 0 : p[1]), g = u.get("expires") || u.get("expire");
2371
- if (g) {
2372
- const h = new Date(+g * 1e3), C = isNaN(h.getTime()) ? 0 : h.getTime() - Date.now();
2373
- C > 0 && kr(C);
2374
- } else Ie && (clearTimeout(Ie), Ie = null);
2375
- }
2376
- async function bo(n) {
2377
- if (!re())
2324
+ function dn(n) {
2325
+ const u = new URLSearchParams(n.split("?")?.[1]), h = u.get("expires") || u.get("expire");
2326
+ if (h) {
2327
+ const p = new Date(+h * 1e3), g = isNaN(p.getTime()) ? 0 : p.getTime() - Date.now();
2328
+ g > 0 && xr(g);
2329
+ } else we && (clearTimeout(we), we = null);
2330
+ }
2331
+ async function ui(n) {
2332
+ if (!te())
2378
2333
  throw new Error("Attribute verifyurl not set.");
2379
- R("requesting server verification from", re());
2334
+ A("requesting server verification from", te());
2380
2335
  const u = { payload: n };
2381
- if (Ae() !== !1) {
2336
+ if (ye() !== !1) {
2382
2337
  const {
2383
- blockedCountries: h,
2338
+ blockedCountries: g,
2384
2339
  classifier: C,
2385
- disableRules: A,
2386
- email: B,
2387
- expectedLanguages: V,
2388
- expectedCountries: Q,
2389
- fields: le,
2390
- ipAddress: tt,
2391
- text: gt,
2392
- timeZone: rt
2393
- } = lo();
2394
- u.blockedCountries = h, u.classifier = C, u.disableRules = A, u.email = B === !1 ? void 0 : ao(B), u.expectedCountries = Q, u.expectedLanguages = V || (en ? [en] : void 0), u.fields = le === !1 ? void 0 : an(le), u.ipAddress = tt === !1 ? void 0 : tt || "auto", u.text = gt, u.timeZone = rt === !1 ? void 0 : rt || ti();
2340
+ disableRules: D,
2341
+ email: H,
2342
+ expectedLanguages: q,
2343
+ expectedCountries: oe,
2344
+ fields: ie,
2345
+ ipAddress: Qe,
2346
+ text: dt,
2347
+ timeZone: et
2348
+ } = Xo();
2349
+ u.blockedCountries = g, u.classifier = C, u.disableRules = D, u.email = H === !1 ? void 0 : Ko(H), u.expectedCountries = oe, u.expectedLanguages = q || (Jr ? [Jr] : void 0), u.fields = ie === !1 ? void 0 : en(ie), u.ipAddress = Qe === !1 ? void 0 : Qe || "auto", u.text = dt, u.timeZone = et === !1 ? void 0 : et || Wn();
2395
2350
  }
2396
- const g = await nn()(re(), {
2351
+ const h = await Er()(te(), {
2397
2352
  body: JSON.stringify(u),
2398
2353
  headers: { "content-type": "application/json" },
2399
2354
  method: "POST"
2400
2355
  });
2401
- if (!g || !(g instanceof Response))
2356
+ if (!h || !(h instanceof Response))
2402
2357
  throw new Error("Custom fetch function did not return a response.");
2403
- if (g.status !== 200)
2404
- throw new Error(`Server responded with ${g.status}.`);
2405
- const p = await g.json();
2406
- if (p != null && p.payload && b(Re, p.payload, !0), Ve("serververification", p), f() && p.classification === "BAD")
2358
+ if (h.status !== 200)
2359
+ throw new Error(`Server responded with ${h.status}.`);
2360
+ const p = await h.json();
2361
+ if (p?.payload && b(Ee, p.payload, !0), Le("serververification", p), s() && p.classification === "BAD")
2407
2362
  throw new Error("SpamFilter returned negative classification.");
2408
2363
  }
2409
- async function _n(n, u) {
2410
- if (!re())
2364
+ async function hn(n, u) {
2365
+ if (!te())
2411
2366
  throw new Error("Attribute verifyurl not set.");
2412
- R("requesting sentinel verification from", re());
2413
- const g = { code: u, payload: n };
2414
- ze() && (g.fields = ze().fields ? an() : void 0, g.timeZone = ze().timeZone ? ti() : void 0);
2415
- const p = await fetch(re(), {
2416
- body: JSON.stringify(g),
2367
+ A("requesting sentinel verification from", te());
2368
+ const h = { code: u, payload: n };
2369
+ Ye() && (h.fields = Ye().fields ? en() : void 0, h.timeZone = Ye().timeZone ? Wn() : void 0);
2370
+ const p = await Er()(te(), {
2371
+ body: JSON.stringify(h),
2417
2372
  headers: { "content-type": "application/json" },
2418
2373
  method: "POST"
2419
2374
  });
@@ -2421,668 +2376,672 @@ function Fl(e, t) {
2421
2376
  throw new Error("Fetch function did not return a response.");
2422
2377
  if (p.status !== 200)
2423
2378
  throw new Error(`Server responded with ${p.status}.`);
2424
- const h = await p.json();
2425
- return h != null && h.payload && b(Re, h.payload, !0), Ve("sentinelverification", h), h;
2379
+ const g = await p.json();
2380
+ return g?.payload && b(Ee, g.payload, !0), Le("sentinelverification", g), g;
2426
2381
  }
2427
- function bn(n) {
2428
- var u;
2429
- a(N) && "requestSubmit" in a(N) ? a(N).requestSubmit(n) : (u = a(N)) != null && u.reportValidity() && (n ? n.click() : a(N).submit());
2430
- }
2431
- function kr(n) {
2432
- R("expire", n), Ie && (clearTimeout(Ie), Ie = null), n < 1 ? rn() : Ie = setTimeout(rn, n);
2433
- }
2434
- function yn(n) {
2435
- R("floating", n), E() !== n && (a(M).style.left = "", a(M).style.top = ""), E(n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : E()), E() ? (o() || o("onsubmit"), document.addEventListener("scroll", un), document.addEventListener("click", sn), window.addEventListener("resize", gn)) : o() === "onsubmit" && o(void 0);
2436
- }
2437
- function wn(n) {
2438
- var u, g;
2439
- if (R("overlay", n), ye(n), n) {
2440
- if (o() || o("onsubmit"), a(de) && a(M).parentElement && a(de).replaceWith(a(M).parentElement), (g = (u = a(M)) == null ? void 0 : u.parentElement) != null && g.parentElement) {
2441
- b(de, document.createElement("div"), !0), a(M).parentElement.parentElement.appendChild(a(de));
2442
- const p = document.createElement("div"), h = document.createElement("button");
2443
- h.type = "button", h.innerHTML = "&times;", h.addEventListener("click", (C) => {
2444
- C.preventDefault(), Qe();
2445
- }), a(de).classList.add("altcha-overlay-backdrop"), h.classList.add("altcha-overlay-close-button"), p.classList.add("altcha-overlay"), a(de).append(p), p.append(h), It() && p.append(...document.querySelectorAll(It())), p.append(a(M).parentElement);
2382
+ function vn(n) {
2383
+ i(T) && "requestSubmit" in i(T) ? i(T).requestSubmit(n) : i(T)?.reportValidity() && (n ? n.click() : i(T).submit());
2384
+ }
2385
+ function xr(n) {
2386
+ A("expire", n), we && (clearTimeout(we), we = null), n < 1 ? Xr() : we = setTimeout(Xr, n);
2387
+ }
2388
+ function gn(n) {
2389
+ A("floating", n), I() !== n && (i(V).style.left = "", i(V).style.top = ""), I(n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : I()), I() ? (a() || a("onsubmit"), document.addEventListener("scroll", nn), document.addEventListener("click", rn), window.addEventListener("resize", cn)) : a() === "onsubmit" && a(void 0);
2390
+ }
2391
+ function pn(n) {
2392
+ if (A("overlay", n), ge(n), n) {
2393
+ if (a() || a("onsubmit"), i(ue) && i(V).parentElement && i(ue).replaceWith(i(V).parentElement), i(V)?.parentElement?.parentElement) {
2394
+ b(ue, document.createElement("div"), !0), i(V).parentElement.parentElement.appendChild(i(ue));
2395
+ const u = document.createElement("div"), h = document.createElement("button");
2396
+ h.type = "button", h.innerHTML = "&times;", h.addEventListener("click", (p) => {
2397
+ p.preventDefault(), Ke();
2398
+ }), i(ue).classList.add("altcha-overlay-backdrop"), h.classList.add("altcha-overlay-close-button"), u.classList.add("altcha-overlay"), i(ue).append(u), u.append(h), Ct() && u.append(...document.querySelectorAll(Ct())), u.append(i(V).parentElement);
2446
2399
  }
2447
- } else a(de) && a(M).parentElement && (a(de).replaceWith(a(M).parentElement), a(M).style.display = "block");
2400
+ } else i(ue) && i(V).parentElement && (i(ue).replaceWith(i(V).parentElement), i(V).style.display = "block");
2448
2401
  }
2449
- function En(n) {
2402
+ function mn(n) {
2450
2403
  if (!n.algorithm)
2451
2404
  throw new Error("Invalid challenge. Property algorithm is missing.");
2452
2405
  if (n.signature === void 0)
2453
2406
  throw new Error("Invalid challenge. Property signature is missing.");
2454
- if (!Qr.includes(n.algorithm.toUpperCase()))
2455
- throw new Error(`Unknown algorithm value. Allowed values: ${Qr.join(", ")}`);
2407
+ if (!zr.includes(n.algorithm.toUpperCase()))
2408
+ throw new Error(`Unknown algorithm value. Allowed values: ${zr.join(", ")}`);
2456
2409
  if (!n.challenge || n.challenge.length < 40)
2457
2410
  throw new Error("Challenge is too short. Min. 40 chars.");
2458
2411
  if (!n.salt || n.salt.length < 10)
2459
2412
  throw new Error("Salt is too short. Min. 10 chars.");
2460
2413
  }
2461
- async function Cn(n) {
2462
- let u = null, g = null;
2414
+ async function _n(n) {
2415
+ let u = null, h = null;
2463
2416
  if ("Worker" in window) {
2464
2417
  try {
2465
- u = yo(n, n.maxNumber || n.maxnumber || be()), b(Je, u.controller, !0), g = await u.promise;
2418
+ u = ci(n, n.maxNumber || n.maxnumber || We()), b(Ze, u.controller, !0), h = await u.promise;
2466
2419
  } catch (p) {
2467
- R(p);
2420
+ A(p);
2468
2421
  } finally {
2469
- b(Je, null);
2422
+ b(Ze, null);
2470
2423
  }
2471
- if (g === null || (g == null ? void 0 : g.number) !== void 0 || "obfuscated" in n)
2472
- return { data: n, solution: g };
2424
+ if (h === null || h?.number !== void 0 || "obfuscated" in n)
2425
+ return { data: n, solution: h };
2473
2426
  }
2474
2427
  if ("obfuscated" in n) {
2475
- const p = await ml(n.obfuscated, n.key, n.maxNumber || n.maxnumber);
2428
+ const p = await il(n.obfuscated, n.key, n.maxNumber || n.maxnumber);
2476
2429
  return { data: n, solution: await p.promise };
2477
2430
  }
2478
- u = vl(n.challenge, n.salt, n.algorithm, n.maxNumber || n.maxnumber || be()), b(Je, u.controller, !0);
2431
+ u = rl(n.challenge, n.salt, n.algorithm, n.maxNumber || n.maxnumber || We()), b(Ze, u.controller, !0);
2479
2432
  try {
2480
- g = await u.promise;
2433
+ h = await u.promise;
2481
2434
  } catch (p) {
2482
- R(p);
2435
+ A(p);
2483
2436
  } finally {
2484
- b(Je, null);
2437
+ b(Ze, null);
2485
2438
  }
2486
- return { data: n, solution: g };
2487
- }
2488
- function yo(n, u = typeof ge() == "number" ? ge() : n.maxNumber || n.maxnumber || be(), g = Math.ceil(dt())) {
2489
- const p = new AbortController(), h = [];
2490
- g = Math.min(16, u, Math.max(1, g));
2491
- for (let B = 0; B < g; B++)
2492
- h.push(altchaCreateWorker($t()));
2493
- const C = Math.ceil(u / g);
2439
+ return { data: n, solution: h };
2440
+ }
2441
+ function ci(n, u = typeof de() == "number" ? de() : n.maxNumber || n.maxnumber || We(), h = Math.ceil(ut())) {
2442
+ const p = new AbortController(), g = [];
2443
+ h = Math.min(16, u, Math.max(1, h));
2444
+ for (let H = 0; H < h; H++)
2445
+ g.push(altchaCreateWorker(kt()));
2446
+ const C = Math.ceil(u / h);
2494
2447
  return { promise: (async () => {
2495
- const B = await Promise.all(h.map((V, Q) => {
2496
- const le = Q * C;
2448
+ const H = await Promise.all(g.map((q, oe) => {
2449
+ const ie = oe * C;
2497
2450
  return p.signal.addEventListener("abort", () => {
2498
- V.postMessage({ type: "abort" });
2499
- }), new Promise((tt) => {
2500
- V.addEventListener("message", (gt) => {
2501
- if (gt.data)
2502
- for (const rt of h)
2503
- rt !== V && rt.postMessage({ type: "abort" });
2504
- tt(gt.data);
2505
- }), V.postMessage({
2451
+ q.postMessage({ type: "abort" });
2452
+ }), new Promise((Qe) => {
2453
+ q.addEventListener("message", (dt) => {
2454
+ if (dt.data)
2455
+ for (const et of g)
2456
+ et !== q && et.postMessage({ type: "abort" });
2457
+ Qe(dt.data);
2458
+ }), q.postMessage({
2506
2459
  payload: n,
2507
- max: le + C,
2508
- start: le,
2460
+ max: ie + C,
2461
+ start: ie,
2509
2462
  type: "work"
2510
2463
  });
2511
2464
  });
2512
2465
  }));
2513
- for (const V of h)
2514
- V.terminate();
2515
- return B.find((V) => !!V) || null;
2466
+ for (const q of g)
2467
+ q.terminate();
2468
+ return H.find((q) => !!q) || null;
2516
2469
  })(), controller: p };
2517
2470
  }
2518
- async function Nt() {
2519
- if (!Me()) {
2520
- $e(w.ERROR);
2471
+ async function $t() {
2472
+ if (!Ne()) {
2473
+ xe(y.ERROR);
2521
2474
  return;
2522
2475
  }
2523
- const n = je.find((u) => u.constructor.pluginName === "obfuscation");
2476
+ const n = Oe.find((u) => u.constructor.pluginName === "obfuscation");
2524
2477
  if (!n || !("clarify" in n)) {
2525
- $e(w.ERROR), R("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
2478
+ xe(y.ERROR), A("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
2526
2479
  return;
2527
2480
  }
2528
2481
  if ("clarify" in n && typeof n.clarify == "function")
2529
2482
  return n.clarify();
2530
2483
  }
2531
- function xn(n) {
2532
- n.obfuscated !== void 0 && Me(n.obfuscated), n.auto !== void 0 && (o(n.auto), o() === "onload" && (Me() ? Nt() : Pe())), n.blockspam !== void 0 && f(!!n.blockspam), n.customfetch !== void 0 && _(n.customfetch), n.floatinganchor !== void 0 && U(n.floatinganchor), n.delay !== void 0 && m(n.delay), n.floatingoffset !== void 0 && ce(n.floatingoffset), n.floating !== void 0 && yn(n.floating), n.expire !== void 0 && (kr(n.expire), $(n.expire)), n.challenge && (c(typeof n.challenge == "string" ? n.challenge : JSON.stringify(n.challenge)), En(a(zt))), n.challengeurl !== void 0 && s(n.challengeurl), n.debug !== void 0 && v(!!n.debug), n.hidefooter !== void 0 && te(!!n.hidefooter), n.hidelogo !== void 0 && X(!!n.hidelogo), n.language !== void 0 && ct(on(l(), [n.language])), n.maxnumber !== void 0 && be(+n.maxnumber), n.mockerror !== void 0 && At(!!n.mockerror), n.name !== void 0 && ae(n.name), n.overlaycontent !== void 0 && It(n.overlaycontent), n.overlay !== void 0 && wn(n.overlay), n.refetchonexpire !== void 0 && Rt(!!n.refetchonexpire), n.sentinel !== void 0 && typeof n.sentinel == "object" && ze(n.sentinel), n.spamfilter !== void 0 && Ae(typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && ct(typeof n.strings == "string" ? n.strings : JSON.stringify(n.strings)), n.test !== void 0 && ge(typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && re(n.verifyurl), n.workers !== void 0 && dt(+n.workers), n.workerurl !== void 0 && $t(n.workerurl);
2484
+ function bn(n) {
2485
+ n.obfuscated !== void 0 && Ne(n.obfuscated), n.auto !== void 0 && (a(n.auto), a() === "onload" && (Ne() ? $t() : Se())), n.blockspam !== void 0 && s(!!n.blockspam), n.customfetch !== void 0 && m(n.customfetch), n.floatinganchor !== void 0 && ee(n.floatinganchor), n.delay !== void 0 && _(n.delay), n.floatingoffset !== void 0 && $e(n.floatingoffset), n.floating !== void 0 && gn(n.floating), n.expire !== void 0 && (xr(n.expire), U(n.expire)), n.challenge && (f(typeof n.challenge == "string" ? n.challenge : JSON.stringify(n.challenge)), mn(i(Wt))), n.challengeurl !== void 0 && c(n.challengeurl), n.debug !== void 0 && v(!!n.debug), n.hidefooter !== void 0 && j(!!n.hidefooter), n.hidelogo !== void 0 && se(!!n.hidelogo), n.language !== void 0 && st(Qr(l(), [n.language])), n.maxnumber !== void 0 && We(+n.maxnumber), n.mockerror !== void 0 && xt(!!n.mockerror), n.name !== void 0 && Ge(n.name), n.overlaycontent !== void 0 && Ct(n.overlaycontent), n.overlay !== void 0 && pn(n.overlay), n.refetchonexpire !== void 0 && M(!n.refetchonexpire), n.disablerefetchonexpire !== void 0 && M(!n.disablerefetchonexpire), n.sentinel !== void 0 && typeof n.sentinel == "object" && Ye(n.sentinel), n.spamfilter !== void 0 && ye(typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && st(typeof n.strings == "string" ? n.strings : JSON.stringify(n.strings)), n.test !== void 0 && de(typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && te(n.verifyurl), n.workers !== void 0 && ut(+n.workers), n.workerurl !== void 0 && kt(n.workerurl);
2533
2486
  }
2534
- function kn() {
2487
+ function yn() {
2535
2488
  return {
2536
- auto: o(),
2537
- blockspam: f(),
2538
- challengeurl: s(),
2489
+ auto: a(),
2490
+ blockspam: s(),
2491
+ challengeurl: c(),
2539
2492
  debug: v(),
2540
- delay: m(),
2541
- expire: $(),
2542
- floating: E(),
2543
- floatinganchor: U(),
2544
- floatingoffset: ce(),
2545
- hidefooter: te(),
2546
- hidelogo: X(),
2547
- name: ae(),
2548
- maxnumber: be(),
2549
- mockerror: At(),
2550
- obfuscated: Me(),
2551
- overlay: ye(),
2552
- refetchonexpire: Rt(),
2553
- spamfilter: Ae(),
2554
- strings: a(P),
2555
- test: ge(),
2556
- verifyurl: re(),
2557
- workers: dt(),
2558
- workerurl: $t()
2493
+ delay: _(),
2494
+ disableautofocus: w(),
2495
+ disablerefetchonexpire: M(),
2496
+ expire: U(),
2497
+ floating: I(),
2498
+ floatinganchor: ee(),
2499
+ floatingoffset: $e(),
2500
+ hidefooter: j(),
2501
+ hidelogo: se(),
2502
+ name: Ge(),
2503
+ maxnumber: We(),
2504
+ mockerror: xt(),
2505
+ obfuscated: Ne(),
2506
+ overlay: ge(),
2507
+ refetchonexpire: !M(),
2508
+ spamfilter: ye(),
2509
+ strings: i(L),
2510
+ test: de(),
2511
+ verifyurl: te(),
2512
+ workers: ut(),
2513
+ workerurl: kt()
2559
2514
  };
2560
2515
  }
2561
- function An() {
2562
- return a(ht);
2516
+ function wn() {
2517
+ return i(ct);
2563
2518
  }
2564
- function wo(n) {
2565
- return je.find((u) => u.constructor.pluginName === n);
2519
+ function fi(n) {
2520
+ return Oe.find((u) => u.constructor.pluginName === n);
2566
2521
  }
2567
- function In() {
2568
- return a(I);
2522
+ function En() {
2523
+ return i(k);
2569
2524
  }
2570
- function Lt() {
2571
- a(M).style.display = "none", ye() && a(de) && (a(de).style.display = "none");
2525
+ function St() {
2526
+ i(V).style.display = "none", ge() && i(ue) && (i(ue).style.display = "none");
2572
2527
  }
2573
- function Pt(n = 20) {
2574
- var u;
2575
- if (a(M))
2576
- if (a(ht) || b(ht, (U() ? document.querySelector(U()) : (u = a(N)) == null ? void 0 : u.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || a(N), !0), a(ht)) {
2577
- const g = parseInt(ce(), 10) || 12, p = a(ht).getBoundingClientRect(), h = a(M).getBoundingClientRect(), C = document.documentElement.clientHeight, A = document.documentElement.clientWidth, B = E() === "auto" ? p.bottom + h.height + g + n > C : E() === "top", V = Math.max(n, Math.min(A - n - h.width, p.left + p.width / 2 - h.width / 2));
2578
- if (B ? a(M).style.top = `${p.top - (h.height + g)}px` : a(M).style.top = `${p.bottom + g}px`, a(M).style.left = `${V}px`, a(M).setAttribute("data-floating", B ? "top" : "bottom"), a(Tt)) {
2579
- const Q = a(Tt).getBoundingClientRect();
2580
- a(Tt).style.left = p.left - V + p.width / 2 - Q.width / 2 + "px";
2528
+ function Tt(n = 20) {
2529
+ if (i(V))
2530
+ if (i(ct) || b(ct, (ee() ? document.querySelector(ee()) : i(T)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || i(T), !0), i(ct)) {
2531
+ const u = parseInt($e(), 10) || 12, h = i(ct).getBoundingClientRect(), p = i(V).getBoundingClientRect(), g = document.documentElement.clientHeight, C = document.documentElement.clientWidth, D = I() === "auto" ? h.bottom + p.height + u + n > g : I() === "top", H = Math.max(n, Math.min(C - n - p.width, h.left + h.width / 2 - p.width / 2));
2532
+ if (D ? i(V).style.top = `${h.top - (p.height + u)}px` : i(V).style.top = `${h.bottom + u}px`, i(V).style.left = `${H}px`, i(V).setAttribute("data-floating", D ? "top" : "bottom"), i(It)) {
2533
+ const q = i(It).getBoundingClientRect();
2534
+ i(It).style.left = h.left - H + h.width / 2 - q.width / 2 + "px";
2581
2535
  }
2582
2536
  } else
2583
- R("unable to find floating anchor element");
2537
+ A("unable to find floating anchor element");
2584
2538
  }
2585
- function Qe(n = w.UNVERIFIED, u = null) {
2586
- a(Je) && (a(Je).abort(), b(Je, null)), b(St, !1), b(Re, null), b(H, null), b(xr, !1), b(G, null), $e(n, u);
2539
+ function Ke(n = y.UNVERIFIED, u = null) {
2540
+ i(Ze) && (i(Ze).abort(), b(Ze, null)), b(At, !1), b(Ee, null), b(G, null), b(wr, !1), b(W, null), xe(n, u);
2587
2541
  }
2588
- function Rn(n) {
2589
- b(ht, n, !0);
2542
+ function xn(n) {
2543
+ b(ct, n, !0);
2590
2544
  }
2591
- function $e(n, u = null) {
2592
- b(I, n, !0), b(Ke, u, !0), Ve("statechange", {
2593
- payload: a(Re),
2594
- state: a(I)
2545
+ function xe(n, u = null) {
2546
+ b(k, n, !0), b(ze, u, !0), Le("statechange", {
2547
+ payload: i(Ee),
2548
+ state: i(k)
2595
2549
  });
2596
2550
  }
2597
- function Kt() {
2598
- a(M).style.display = "block", E() && Pt(), ye() && a(de) && (a(de).style.display = "flex");
2551
+ function Zt() {
2552
+ i(V).style.display = "block", I() && Tt(), ge() && i(ue) && (i(ue).style.display = "flex");
2599
2553
  }
2600
- async function Pe() {
2601
- return Qe(w.VERIFYING), await new Promise((n) => setTimeout(n, m() || 0)), oo().then((n) => (En(n), R("challenge", n), Cn(n))).then(({ data: n, solution: u }) => {
2602
- var g;
2603
- if (R("solution", u), !u || n && "challenge" in n && !("clearText" in u)) {
2604
- if ((u == null ? void 0 : u.number) !== void 0 && "challenge" in n)
2605
- if (re() && "codeChallenge" in n)
2606
- ["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(((g = document.activeElement) == null ? void 0 : g.tagName) || "") && y() === !1 && document.activeElement.blur(), b(H, { challenge: n, solution: u }, !0);
2554
+ async function Se() {
2555
+ return Ke(y.VERIFYING), await new Promise((n) => setTimeout(n, _() || 0)), Jo().then((n) => (mn(n), A("challenge", n), _n(n))).then(({ data: n, solution: u }) => {
2556
+ if (A("solution", u), !u || n && "challenge" in n && !("clearText" in u)) {
2557
+ if (u?.number !== void 0 && "challenge" in n)
2558
+ if (te() && "codeChallenge" in n)
2559
+ ["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(document.activeElement?.tagName || "") && w() === !1 && document.activeElement.blur(), b(G, { challenge: n, solution: u }, !0);
2607
2560
  else {
2608
- if (re() && ze() !== void 0)
2609
- return _n(Jt(n, u));
2610
- if (re())
2611
- return bo(Jt(n, u));
2612
- b(Re, Jt(n, u), !0), R("payload", a(Re));
2561
+ if (te() && Ye() !== void 0)
2562
+ return hn(Yt(n, u));
2563
+ if (te())
2564
+ return ui(Yt(n, u));
2565
+ b(Ee, Yt(n, u), !0), A("payload", i(Ee));
2613
2566
  }
2614
- else if (a(I) !== w.EXPIRED)
2615
- throw R("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
2567
+ else if (i(k) !== y.EXPIRED)
2568
+ throw A("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
2616
2569
  }
2617
2570
  }).then(() => {
2618
- a(H) ? ($e(w.CODE), Dr().then(() => {
2619
- Ve("code", { codeChallenge: a(H) });
2620
- })) : a(Re) && ($e(w.VERIFIED), R("verified"), Dr().then(() => {
2621
- Ve("verified", { payload: a(Re) }), ye() && Lt();
2571
+ i(G) ? (xe(y.CODE), Rr().then(() => {
2572
+ Le("code", { codeChallenge: i(G) });
2573
+ })) : i(Ee) && (xe(y.VERIFIED), A("verified"), Rr().then(() => {
2574
+ Le("verified", { payload: i(Ee) }), ge() && St();
2622
2575
  }));
2623
2576
  }).catch((n) => {
2624
- R(n), $e(w.ERROR, n.message);
2577
+ A(n), xe(y.ERROR, n.message);
2625
2578
  });
2626
2579
  }
2627
- var $n = Ol(), Sn = Ft($n);
2628
- za(Sn, t, "default", {});
2629
- var vt = z(Sn, 2), Ar = Z(vt), Xt = Z(Ar);
2630
- let Tn;
2631
- var Dn = Z(Xt);
2580
+ var Cn = Cl(), kn = Nt(Cn);
2581
+ Fa(kn, t, "default", {});
2582
+ var ft = J(kn, 2), Cr = z(ft), zt = z(Cr);
2583
+ let An;
2584
+ var In = z(zt);
2632
2585
  {
2633
- var Eo = (n) => {
2634
- Nr(n);
2586
+ var di = (n) => {
2587
+ $r(n);
2635
2588
  };
2636
- J(Dn, (n) => {
2637
- a(I) === w.VERIFYING && n(Eo);
2589
+ K(In, (n) => {
2590
+ i(k) === y.VERIFYING && n(di);
2638
2591
  });
2639
2592
  }
2640
- var et = z(Dn, 2);
2641
- Kn(et), et.__change = [
2642
- wl,
2643
- I,
2644
- Ae,
2645
- N,
2646
- St,
2647
- Me,
2648
- Nt,
2649
- Pe
2650
- ], rr(et, (n) => b(Cr, n), () => a(Cr)), Y(Xt);
2651
- var Qt = z(Xt, 2), Co = Z(Qt);
2593
+ var Xe = J(In, 2);
2594
+ qn(Xe), Xe.__change = [
2595
+ ul,
2596
+ k,
2597
+ ye,
2598
+ T,
2599
+ At,
2600
+ Ne,
2601
+ $t,
2602
+ Se
2603
+ ], Qt(Xe, (n) => b(yr, n), () => i(yr)), Z(zt);
2604
+ var Jt = J(zt, 2), hi = z(Jt);
2652
2605
  {
2653
- var xo = (n) => {
2654
- var u = tr(), g = Ft(u);
2655
- nt(g, () => a(P).verified), j(n, u);
2656
- }, ko = (n, u) => {
2606
+ var vi = (n) => {
2607
+ var u = Xt(), h = Nt(u);
2608
+ tt(h, () => i(L).verified), B(n, u);
2609
+ }, gi = (n, u) => {
2657
2610
  {
2658
- var g = (h) => {
2659
- var C = tr(), A = Ft(C);
2660
- nt(A, () => a(P).verifying), j(h, C);
2661
- }, p = (h, C) => {
2611
+ var h = (g) => {
2612
+ var C = Xt(), D = Nt(C);
2613
+ tt(D, () => i(L).verifying), B(g, C);
2614
+ }, p = (g, C) => {
2662
2615
  {
2663
- var A = (V) => {
2664
- var Q = tr(), le = Ft(Q);
2665
- nt(le, () => a(P).verificationRequired), j(V, Q);
2666
- }, B = (V) => {
2667
- var Q = tr(), le = Ft(Q);
2668
- nt(le, () => a(P).label), j(V, Q);
2616
+ var D = (q) => {
2617
+ var oe = Xt(), ie = Nt(oe);
2618
+ tt(ie, () => i(L).verificationRequired), B(q, oe);
2619
+ }, H = (q) => {
2620
+ var oe = Xt(), ie = Nt(oe);
2621
+ tt(ie, () => i(L).label), B(q, oe);
2669
2622
  };
2670
- J(
2671
- h,
2672
- (V) => {
2673
- a(I) === w.CODE ? V(A) : V(B, !1);
2623
+ K(
2624
+ g,
2625
+ (q) => {
2626
+ i(k) === y.CODE ? q(D) : q(H, !1);
2674
2627
  },
2675
2628
  C
2676
2629
  );
2677
2630
  }
2678
2631
  };
2679
- J(
2632
+ K(
2680
2633
  n,
2681
- (h) => {
2682
- a(I) === w.VERIFYING ? h(g) : h(p, !1);
2634
+ (g) => {
2635
+ i(k) === y.VERIFYING ? g(h) : g(p, !1);
2683
2636
  },
2684
2637
  u
2685
2638
  );
2686
2639
  }
2687
2640
  };
2688
- J(Co, (n) => {
2689
- a(I) === w.VERIFIED ? n(xo) : n(ko, !1);
2641
+ K(hi, (n) => {
2642
+ i(k) === y.VERIFIED ? n(vi) : n(gi, !1);
2690
2643
  });
2691
2644
  }
2692
- Y(Qt);
2693
- var Nn = z(Qt, 2);
2645
+ Z(Jt);
2646
+ var Rn = J(Jt, 2);
2694
2647
  {
2695
- var Ao = (n) => {
2696
- var u = Cl();
2697
- Kn(u), Se(() => {
2698
- S(u, "name", ae()), el(u, a(Re));
2699
- }), j(n, u);
2648
+ var pi = (n) => {
2649
+ var u = fl();
2650
+ qn(u), Ce(() => {
2651
+ R(u, "name", Ge()), qa(u, i(Ee));
2652
+ }), B(n, u);
2700
2653
  };
2701
- J(Nn, (n) => {
2702
- a(I) === w.VERIFIED && n(Ao);
2654
+ K(Rn, (n) => {
2655
+ i(k) === y.VERIFIED && n(pi);
2703
2656
  });
2704
2657
  }
2705
- var Ln = z(Nn, 2);
2658
+ var $n = J(Rn, 2);
2706
2659
  {
2707
- var Io = (n) => {
2708
- var u = xl(), g = Z(u);
2709
- S(g, "href", ro), Y(u), Se(() => S(g, "aria-label", a(P).ariaLinkLabel)), j(n, u);
2660
+ var mi = (n) => {
2661
+ var u = dl(), h = z(u);
2662
+ R(h, "href", Yo), Z(u), Ce(() => R(h, "aria-label", i(L).ariaLinkLabel)), B(n, u);
2710
2663
  };
2711
- J(Ln, (n) => {
2712
- (X() !== !0 || a(Er)) && n(Io);
2664
+ K($n, (n) => {
2665
+ (se() !== !0 || i(br)) && n(mi);
2713
2666
  });
2714
2667
  }
2715
- var Ro = z(Ln, 2);
2668
+ var _i = J($n, 2);
2716
2669
  {
2717
- var $o = (n) => {
2718
- var u = Sl(), g = z(Z(u), 2), p = Z(g), h = z(p, 2);
2719
- qa(h, !y()), h.__keydown = [
2720
- bl,
2721
- vn
2670
+ var bi = (n) => {
2671
+ var u = _l(), h = J(z(u), 2), p = z(h), g = J(p, 2);
2672
+ Sa(g, !w()), g.__keydown = [
2673
+ ll,
2674
+ un
2722
2675
  ];
2723
- var C = z(h, 2), A = Z(C), B = Z(A);
2676
+ var C = J(g, 2), D = z(C), H = z(D);
2724
2677
  {
2725
- var V = (we) => {
2726
- var W = Rl();
2727
- W.__click = vn;
2728
- var er = Z(W);
2678
+ var q = (pe) => {
2679
+ var Y = pl();
2680
+ Y.__click = un;
2681
+ var Kt = z(Y);
2729
2682
  {
2730
- var Ot = (pt) => {
2731
- Nr(pt, () => 20);
2732
- }, Fo = (pt, Mo) => {
2683
+ var Dt = (ht) => {
2684
+ $r(ht, () => 20);
2685
+ }, Ii = (ht, Ri) => {
2733
2686
  {
2734
- var Vo = (mt) => {
2735
- var Ir = kl();
2736
- j(mt, Ir);
2737
- }, Uo = (mt, Ir) => {
2687
+ var $i = (vt) => {
2688
+ var kr = hl();
2689
+ B(vt, kr);
2690
+ }, Si = (vt, kr) => {
2738
2691
  {
2739
- var jo = (_t) => {
2740
- var Rr = Al();
2741
- j(_t, Rr);
2742
- }, qo = (_t) => {
2743
- var Rr = Il();
2744
- j(_t, Rr);
2692
+ var Ti = (gt) => {
2693
+ var Ar = vl();
2694
+ B(gt, Ar);
2695
+ }, Di = (gt) => {
2696
+ var Ar = gl();
2697
+ B(gt, Ar);
2745
2698
  };
2746
- J(
2747
- mt,
2748
- (_t) => {
2749
- a(G) === ee.PLAYING ? _t(jo) : _t(qo, !1);
2699
+ K(
2700
+ vt,
2701
+ (gt) => {
2702
+ i(W) === Q.PLAYING ? gt(Ti) : gt(Di, !1);
2750
2703
  },
2751
- Ir
2704
+ kr
2752
2705
  );
2753
2706
  }
2754
2707
  };
2755
- J(
2756
- pt,
2757
- (mt) => {
2758
- a(G) === ee.ERROR ? mt(Vo) : mt(Uo, !1);
2708
+ K(
2709
+ ht,
2710
+ (vt) => {
2711
+ i(W) === Q.ERROR ? vt($i) : vt(Si, !1);
2759
2712
  },
2760
- Mo
2713
+ Ri
2761
2714
  );
2762
2715
  }
2763
2716
  };
2764
- J(er, (pt) => {
2765
- a(G) === ee.LOADING ? pt(Ot) : pt(Fo, !1);
2717
+ K(Kt, (ht) => {
2718
+ i(W) === Q.LOADING ? ht(Dt) : ht(Ii, !1);
2766
2719
  });
2767
2720
  }
2768
- Y(W), Se(() => {
2769
- S(W, "title", a(P).getAudioChallenge), W.disabled = a(G) === ee.LOADING || a(G) === ee.ERROR || a(Xe), S(W, "aria-label", a(G) === ee.LOADING ? a(P).loading : a(P).getAudioChallenge);
2770
- }), j(we, W);
2721
+ Z(Y), Ce(() => {
2722
+ R(Y, "title", i(L).getAudioChallenge), Y.disabled = i(W) === Q.LOADING || i(W) === Q.ERROR || i(Je), R(Y, "aria-label", i(W) === Q.LOADING ? i(L).loading : i(L).getAudioChallenge);
2723
+ }), B(pe, Y);
2771
2724
  };
2772
- J(B, (we) => {
2773
- a(H).challenge.codeChallenge.audio && we(V);
2725
+ K(H, (pe) => {
2726
+ i(G).challenge.codeChallenge.audio && pe(q);
2774
2727
  });
2775
2728
  }
2776
- var Q = z(B, 2);
2777
- Q.__click = [yl, Pe], Y(A);
2778
- var le = z(A, 2), tt = Z(le);
2729
+ var oe = J(H, 2);
2730
+ oe.__click = [sl, Se], Z(D);
2731
+ var ie = J(D, 2), Qe = z(ie);
2779
2732
  {
2780
- var gt = (we) => {
2781
- Nr(we, () => 16);
2733
+ var dt = (pe) => {
2734
+ $r(pe, () => 16);
2782
2735
  };
2783
- J(tt, (we) => {
2784
- a(Xe) && we(gt);
2736
+ K(Qe, (pe) => {
2737
+ i(Je) && pe(dt);
2785
2738
  });
2786
2739
  }
2787
- var rt = z(tt);
2788
- Y(le), Y(C);
2789
- var Po = z(C, 2);
2740
+ var et = J(Qe);
2741
+ Z(ie), Z(C);
2742
+ var ki = J(C, 2);
2790
2743
  {
2791
- var Oo = (we) => {
2792
- var W = $l(), er = Z(W);
2793
- Y(W), rr(W, (Ot) => b(Ue, Ot), () => a(Ue)), Se((Ot) => S(er, "src", Ot), [
2794
- () => ln(a(H).challenge.codeChallenge.audio, { language: q() })
2795
- ]), qe("loadstart", W, ho), qe("canplay", W, co), qe("pause", W, go), qe("playing", W, vo), qe("ended", W, uo), qe("error", er, fo), j(we, W);
2744
+ var Ai = (pe) => {
2745
+ var Y = ml(), Kt = z(Y);
2746
+ Z(Y), Qt(Y, (Dt) => b(Pe, Dt), () => i(Pe)), Ce((Dt) => R(Kt, "src", Dt), [
2747
+ () => tn(i(G).challenge.codeChallenge.audio, { language: Ht() })
2748
+ ]), Fe("loadstart", Y, ni), Fe("canplay", Y, ri), Fe("pause", Y, ii), Fe("playing", Y, oi), Fe("ended", Y, ei), Fe("error", Kt, ti), B(pe, Y);
2796
2749
  };
2797
- J(Po, (we) => {
2798
- a(H).challenge.codeChallenge.audio && a(xr) && we(Oo);
2750
+ K(ki, (pe) => {
2751
+ i(G).challenge.codeChallenge.audio && i(wr) && pe(Ai);
2799
2752
  });
2800
2753
  }
2801
- Y(g), Y(u), Se(() => {
2802
- S(u, "aria-label", a(P).verificationRequired), S(p, "src", a(H).challenge.codeChallenge.image), S(h, "minlength", a(H).challenge.codeChallenge.length || 1), S(h, "maxlength", a(H).challenge.codeChallenge.length), S(h, "placeholder", a(P).enterCode), S(h, "aria-label", a(G) === ee.LOADING ? a(P).loading : a(G) === ee.PLAYING ? "" : a(P).enterCodeAria), S(h, "aria-live", a(G) ? "assertive" : "polite"), S(h, "aria-busy", a(G) === ee.LOADING), h.disabled = a(Xe), S(Q, "aria-label", a(P).reload), S(Q, "title", a(P).reload), Q.disabled = a(Xe), le.disabled = a(Xe), S(le, "aria-label", a(P).verify), Wa(rt, ` ${a(P).verify ?? ""}`);
2803
- }), qe("submit", g, po, !0), j(n, u);
2754
+ Z(h), Z(u), Ce(() => {
2755
+ R(u, "aria-label", i(L).verificationRequired), R(p, "src", i(G).challenge.codeChallenge.image), R(g, "minlength", i(G).challenge.codeChallenge.length || 1), R(g, "maxlength", i(G).challenge.codeChallenge.length), R(g, "placeholder", i(L).enterCode), R(g, "aria-label", i(W) === Q.LOADING ? i(L).loading : i(W) === Q.PLAYING ? "" : i(L).enterCodeAria), R(g, "aria-live", i(W) ? "assertive" : "polite"), R(g, "aria-busy", i(W) === Q.LOADING), g.disabled = i(Je), R(oe, "aria-label", i(L).reload), R(oe, "title", i(L).reload), oe.disabled = i(Je), ie.disabled = i(Je), R(ie, "aria-label", i(L).verify), La(et, ` ${i(L).verify ?? ""}`);
2756
+ }), Fe("submit", h, ai, !0), B(n, u);
2804
2757
  };
2805
- J(Ro, (n) => {
2806
- var u;
2807
- (u = a(H)) != null && u.challenge.codeChallenge && n($o);
2758
+ K(_i, (n) => {
2759
+ i(G)?.challenge.codeChallenge && n(bi);
2808
2760
  });
2809
2761
  }
2810
- Y(Ar);
2811
- var Pn = z(Ar, 2);
2762
+ Z(Cr);
2763
+ var Sn = J(Cr, 2);
2812
2764
  {
2813
- var So = (n) => {
2814
- var u = Nl(), g = z(Z(u), 2);
2765
+ var yi = (n) => {
2766
+ var u = wl(), h = J(z(u), 2);
2815
2767
  {
2816
2768
  var p = (C) => {
2817
- var A = Tl(), B = Z(A);
2818
- nt(B, () => a(P).expired), Y(A), Se(() => S(A, "title", a(Ke))), j(C, A);
2819
- }, h = (C) => {
2820
- var A = Dl(), B = Z(A);
2821
- nt(B, () => a(P).error), Y(A), Se(() => S(A, "title", a(Ke))), j(C, A);
2769
+ var D = bl(), H = z(D);
2770
+ tt(H, () => i(L).expired), Z(D), Ce(() => R(D, "title", i(ze))), B(C, D);
2771
+ }, g = (C) => {
2772
+ var D = yl(), H = z(D);
2773
+ tt(H, () => i(L).error), Z(D), Ce(() => R(D, "title", i(ze))), B(C, D);
2822
2774
  };
2823
- J(g, (C) => {
2824
- a(I) === w.EXPIRED ? C(p) : C(h, !1);
2775
+ K(h, (C) => {
2776
+ i(k) === y.EXPIRED ? C(p) : C(g, !1);
2825
2777
  });
2826
2778
  }
2827
- Y(u), j(n, u);
2779
+ Z(u), B(n, u);
2828
2780
  };
2829
- J(Pn, (n) => {
2830
- (a(Ke) || a(I) === w.EXPIRED) && n(So);
2781
+ K(Sn, (n) => {
2782
+ (i(ze) || i(k) === y.EXPIRED) && n(yi);
2831
2783
  });
2832
2784
  }
2833
- var On = z(Pn, 2);
2785
+ var Tn = J(Sn, 2);
2834
2786
  {
2835
- var To = (n) => {
2836
- var u = Ll(), g = Z(u), p = Z(g);
2837
- nt(p, () => a(P).footer), Y(g), Y(u), j(n, u);
2787
+ var wi = (n) => {
2788
+ var u = El(), h = z(u), p = z(h);
2789
+ tt(p, () => i(L).footer), Z(h), Z(u), B(n, u);
2838
2790
  };
2839
- J(On, (n) => {
2840
- a(P).footer && (te() !== !0 || a(Er)) && n(To);
2791
+ K(Tn, (n) => {
2792
+ i(L).footer && (j() !== !0 || i(br)) && n(wi);
2841
2793
  });
2842
2794
  }
2843
- var Do = z(On, 2);
2795
+ var Ei = J(Tn, 2);
2844
2796
  {
2845
- var No = (n) => {
2846
- var u = Pl();
2847
- rr(u, (g) => b(Tt, g), () => a(Tt)), j(n, u);
2797
+ var xi = (n) => {
2798
+ var u = xl();
2799
+ Qt(u, (h) => b(It, h), () => i(It)), B(n, u);
2848
2800
  };
2849
- J(Do, (n) => {
2850
- E() && n(No);
2801
+ K(Ei, (n) => {
2802
+ I() && n(xi);
2851
2803
  });
2852
2804
  }
2853
- Y(vt), rr(vt, (n) => b(M, n), () => a(M)), Se(
2805
+ Z(ft), Qt(ft, (n) => b(V, n), () => i(V)), Ce(
2854
2806
  (n) => {
2855
- S(vt, "data-state", a(I)), S(vt, "data-floating", E()), S(vt, "data-overlay", ye()), Tn = Ka(Xt, 1, "altcha-checkbox", null, Tn, n), S(et, "id", a(tn)), et.required = o() !== "onsubmit" && (!E() || o() !== "off"), S(Qt, "for", a(tn));
2807
+ R(ft, "data-state", i(k)), R(ft, "data-floating", I()), R(ft, "data-overlay", ge()), An = Va(zt, 1, "altcha-checkbox", null, An, n), R(Xe, "id", i(Kr)), Xe.required = a() !== "onsubmit" && (!I() || a() !== "off"), R(Jt, "for", i(Kr));
2856
2808
  },
2857
2809
  [
2858
2810
  () => ({
2859
- "altcha-checkbox-verifying": a(I) === w.VERIFYING
2811
+ "altcha-checkbox-verifying": i(k) === y.VERIFYING
2860
2812
  })
2861
2813
  ]
2862
- ), qe("invalid", et, hn), rl(et, () => a(St), (n) => b(St, n)), j(e, $n);
2863
- var Lo = Vi({
2864
- clarify: Nt,
2865
- configure: xn,
2866
- getConfiguration: kn,
2867
- getFloatingAnchor: An,
2868
- getPlugin: wo,
2869
- getState: In,
2870
- hide: Lt,
2871
- repositionFloating: Pt,
2872
- reset: Qe,
2873
- setFloatingAnchor: Rn,
2874
- setState: $e,
2875
- show: Kt,
2876
- verify: Pe,
2814
+ ), Fe("invalid", Xe, sn), Ha(Xe, () => i(At), (n) => b(At, n)), B(e, Cn);
2815
+ var Ci = So({
2816
+ clarify: $t,
2817
+ configure: bn,
2818
+ getConfiguration: yn,
2819
+ getFloatingAnchor: wn,
2820
+ getPlugin: fi,
2821
+ getState: En,
2822
+ hide: St,
2823
+ repositionFloating: Tt,
2824
+ reset: Ke,
2825
+ setFloatingAnchor: xn,
2826
+ setState: xe,
2827
+ show: Zt,
2828
+ verify: Se,
2877
2829
  get auto() {
2878
- return o();
2830
+ return a();
2879
2831
  },
2880
2832
  set auto(n = void 0) {
2881
- o(n), x();
2833
+ a(n), E();
2882
2834
  },
2883
2835
  get blockspam() {
2884
- return f();
2836
+ return s();
2885
2837
  },
2886
2838
  set blockspam(n = void 0) {
2887
- f(n), x();
2839
+ s(n), E();
2888
2840
  },
2889
2841
  get challengeurl() {
2890
- return s();
2842
+ return c();
2891
2843
  },
2892
2844
  set challengeurl(n = void 0) {
2893
- s(n), x();
2845
+ c(n), E();
2894
2846
  },
2895
2847
  get challengejson() {
2896
- return c();
2848
+ return f();
2897
2849
  },
2898
2850
  set challengejson(n = void 0) {
2899
- c(n), x();
2851
+ f(n), E();
2900
2852
  },
2901
2853
  get credentials() {
2902
2854
  return d();
2903
2855
  },
2904
2856
  set credentials(n = void 0) {
2905
- d(n), x();
2857
+ d(n), E();
2906
2858
  },
2907
2859
  get customfetch() {
2908
- return _();
2860
+ return m();
2909
2861
  },
2910
2862
  set customfetch(n = void 0) {
2911
- _(n), x();
2863
+ m(n), E();
2912
2864
  },
2913
2865
  get debug() {
2914
2866
  return v();
2915
2867
  },
2916
2868
  set debug(n = !1) {
2917
- v(n), x();
2869
+ v(n), E();
2918
2870
  },
2919
2871
  get delay() {
2920
- return m();
2872
+ return _();
2921
2873
  },
2922
2874
  set delay(n = 0) {
2923
- m(n), x();
2875
+ _(n), E();
2924
2876
  },
2925
2877
  get disableautofocus() {
2926
- return y();
2878
+ return w();
2927
2879
  },
2928
2880
  set disableautofocus(n = !1) {
2929
- y(n), x();
2881
+ w(n), E();
2882
+ },
2883
+ get refetchonexpire() {
2884
+ return F();
2885
+ },
2886
+ set refetchonexpire(n = !0) {
2887
+ F(n), E();
2888
+ },
2889
+ get disablerefetchonexpire() {
2890
+ return M();
2891
+ },
2892
+ set disablerefetchonexpire(n = !F) {
2893
+ M(n), E();
2930
2894
  },
2931
2895
  get expire() {
2932
- return $();
2896
+ return U();
2933
2897
  },
2934
2898
  set expire(n = void 0) {
2935
- $(n), x();
2899
+ U(n), E();
2936
2900
  },
2937
2901
  get floating() {
2938
- return E();
2902
+ return I();
2939
2903
  },
2940
2904
  set floating(n = void 0) {
2941
- E(n), x();
2905
+ I(n), E();
2942
2906
  },
2943
2907
  get floatinganchor() {
2944
- return U();
2908
+ return ee();
2945
2909
  },
2946
2910
  set floatinganchor(n = void 0) {
2947
- U(n), x();
2911
+ ee(n), E();
2948
2912
  },
2949
2913
  get floatingoffset() {
2950
- return ce();
2914
+ return $e();
2951
2915
  },
2952
2916
  set floatingoffset(n = void 0) {
2953
- ce(n), x();
2917
+ $e(n), E();
2954
2918
  },
2955
2919
  get floatingpersist() {
2956
- return K();
2920
+ return X();
2957
2921
  },
2958
2922
  set floatingpersist(n = !1) {
2959
- K(n), x();
2923
+ X(n), E();
2960
2924
  },
2961
2925
  get hidefooter() {
2962
- return te();
2926
+ return j();
2963
2927
  },
2964
2928
  set hidefooter(n = !1) {
2965
- te(n), x();
2929
+ j(n), E();
2966
2930
  },
2967
2931
  get hidelogo() {
2968
- return X();
2932
+ return se();
2969
2933
  },
2970
2934
  set hidelogo(n = !1) {
2971
- X(n), x();
2935
+ se(n), E();
2972
2936
  },
2973
2937
  get id() {
2974
- return ft();
2938
+ return He();
2975
2939
  },
2976
2940
  set id(n = void 0) {
2977
- ft(n), x();
2941
+ He(n), E();
2978
2942
  },
2979
2943
  get language() {
2980
- return q();
2944
+ return Ht();
2981
2945
  },
2982
2946
  set language(n = void 0) {
2983
- q(n), x();
2947
+ Ht(n), E();
2984
2948
  },
2985
2949
  get name() {
2986
- return ae();
2950
+ return Ge();
2987
2951
  },
2988
2952
  set name(n = "altcha") {
2989
- ae(n), x();
2953
+ Ge(n), E();
2990
2954
  },
2991
2955
  get maxnumber() {
2992
- return be();
2956
+ return We();
2993
2957
  },
2994
2958
  set maxnumber(n = 1e6) {
2995
- be(n), x();
2959
+ We(n), E();
2996
2960
  },
2997
2961
  get mockerror() {
2998
- return At();
2962
+ return xt();
2999
2963
  },
3000
2964
  set mockerror(n = !1) {
3001
- At(n), x();
2965
+ xt(n), E();
3002
2966
  },
3003
2967
  get obfuscated() {
3004
- return Me();
2968
+ return Ne();
3005
2969
  },
3006
2970
  set obfuscated(n = void 0) {
3007
- Me(n), x();
2971
+ Ne(n), E();
3008
2972
  },
3009
2973
  get overlay() {
3010
- return ye();
2974
+ return ge();
3011
2975
  },
3012
2976
  set overlay(n = void 0) {
3013
- ye(n), x();
2977
+ ge(n), E();
3014
2978
  },
3015
2979
  get overlaycontent() {
3016
- return It();
2980
+ return Ct();
3017
2981
  },
3018
2982
  set overlaycontent(n = void 0) {
3019
- It(n), x();
2983
+ Ct(n), E();
3020
2984
  },
3021
2985
  get plugins() {
3022
- return Zt();
2986
+ return Gt();
3023
2987
  },
3024
2988
  set plugins(n = void 0) {
3025
- Zt(n), x();
3026
- },
3027
- get refetchonexpire() {
3028
- return Rt();
3029
- },
3030
- set refetchonexpire(n = !0) {
3031
- Rt(n), x();
2989
+ Gt(n), E();
3032
2990
  },
3033
2991
  get sentinel() {
3034
- return ze();
2992
+ return Ye();
3035
2993
  },
3036
2994
  set sentinel(n = void 0) {
3037
- ze(n), x();
2995
+ Ye(n), E();
3038
2996
  },
3039
2997
  get spamfilter() {
3040
- return Ae();
2998
+ return ye();
3041
2999
  },
3042
3000
  set spamfilter(n = !1) {
3043
- Ae(n), x();
3001
+ ye(n), E();
3044
3002
  },
3045
3003
  get strings() {
3046
- return ct();
3004
+ return st();
3047
3005
  },
3048
3006
  set strings(n = void 0) {
3049
- ct(n), x();
3007
+ st(n), E();
3050
3008
  },
3051
3009
  get test() {
3052
- return ge();
3010
+ return de();
3053
3011
  },
3054
3012
  set test(n = !1) {
3055
- ge(n), x();
3013
+ de(n), E();
3056
3014
  },
3057
3015
  get verifyurl() {
3058
- return re();
3016
+ return te();
3059
3017
  },
3060
3018
  set verifyurl(n = void 0) {
3061
- re(n), x();
3019
+ te(n), E();
3062
3020
  },
3063
3021
  get workers() {
3064
- return dt();
3022
+ return ut();
3065
3023
  },
3066
3024
  set workers(n = Math.min(16, navigator.hardwareConcurrency || 8)) {
3067
- dt(n), x();
3025
+ ut(n), E();
3068
3026
  },
3069
3027
  get workerurl() {
3070
- return $t();
3028
+ return kt();
3071
3029
  },
3072
3030
  set workerurl(n = void 0) {
3073
- $t(n), x();
3031
+ kt(n), E();
3074
3032
  }
3075
3033
  });
3076
- return i(), Lo;
3034
+ return o(), Ci;
3077
3035
  }
3078
- Ga(["change", "keydown", "click"]);
3079
- customElements.define("altcha-widget", cl(
3080
- Fl,
3036
+ Na(["change", "keydown", "click"]);
3037
+ customElements.define("altcha-widget", Qa(
3038
+ kl,
3081
3039
  {
3082
3040
  blockspam: { type: "Boolean" },
3083
3041
  debug: { type: "Boolean" },
3084
3042
  delay: { type: "Number" },
3085
3043
  disableautofocus: { type: "Boolean" },
3044
+ disablerefetchonexpire: { type: "Boolean" },
3086
3045
  expire: { type: "Number" },
3087
3046
  floatingoffset: { type: "Number" },
3088
3047
  hidefooter: { type: "Boolean" },
@@ -3131,16 +3090,16 @@ customElements.define("altcha-widget", cl(
3131
3090
  ],
3132
3091
  !1
3133
3092
  ));
3134
- const Xi = '@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';
3135
- function Qi(e, t = "__altcha-css") {
3093
+ const Bo = '@keyframes overlay-slidein{to{opacity:1;top:50%}}@keyframes altcha-spinner{to{transform:rotate(360deg)}}.altcha{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative}.altcha:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top] .altcha-anchor-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom]:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top]:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating]:not([data-state=unverified]){display:block}.altcha-anchor-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main{align-items:center;display:flex;gap:.4rem;padding:.7rem;position:relative}.altcha-code-challenge{background:var(--altcha-color-base, white);border:1px solid var(--altcha-color-border-focus, currentColor);border-radius:var(--altcha-border-radius, 3px);filter:drop-shadow(3px 3px 6px rgba(0,0,0,.2));padding:.5rem;position:absolute;top:2.5rem;z-index:9999999}.altcha-code-challenge>form{display:flex;flex-direction:column;gap:.5rem}.altcha-code-challenge-input{border:1px solid currentColor;border-radius:3px;box-sizing:border-box;outline:0;font-size:16px;padding:.35rem;width:220px}.altcha-code-challenge-input:focus{outline:2px solid color-mix(in srgb,var(--altcha-color-active, #1D1DC9) 20%,transparent)}.altcha-code-challenge-input:disabled{opacity:.7}.altcha-code-challenge-image{background-color:#fff;border:1px solid currentColor;border-radius:3px;box-sizing:border-box;object-fit:contain;height:50px;width:220px}.altcha-code-challenge-audio,.altcha-code-challenge-reload{background:color-mix(in srgb,var(--altcha-color-text, currentColor) 10%,transparent);border:0;border-radius:3px;color:var(--altcha-color-text, currentColor);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:.35rem}.altcha-code-challenge-audio:disabled,.altcha-code-challenge-reload:disabled,.altcha-code-challenge-verify:disabled{opacity:.7;pointer-events:none}.altcha-code-challenge-audio>*,.altcha-code-challenge-reload>*{height:20px;width:20px}.altcha-code-challenge-buttons{display:flex;justify-content:space-between}.altcha-code-challenge-buttons-left{display:flex;gap:.25rem}.altcha-code-challenge-verify{align-items:center;background:var(--altcha-color-active, #1D1DC9);border:0;border-radius:3px;color:#fff;cursor:pointer;display:flex;gap:.5rem;font-size:100%;padding:.35rem 1rem}.altcha-code-challenge-arrow{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, currentColor);content:"";height:0;left:.15rem;position:absolute;top:-12px;width:0}.altcha[data-floating=top] .altcha-code-challenge{top:-150px}.altcha[data-floating=top] .altcha-code-challenge-arrow{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, currentColor);bottom:-12px;top:auto}.altcha-label{cursor:pointer;flex-grow:1}.altcha-logo{color:currentColor!important;opacity:.7}.altcha-footer:hover,.altcha-logo:hover{opacity:1}.altcha-error{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:.85rem;gap:.3rem;padding:0 .7rem .7rem}.altcha-footer{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:.75rem;opacity:.7;justify-content:end;padding:.2rem .7rem}.altcha-footer a{color:currentColor}.altcha-checkbox{display:flex;align-items:center;justify-content:center;height:24px;position:relative;width:24px}.altcha-checkbox .altcha-spinner{bottom:0;left:0;position:absolute;right:0;top:0}.altcha-checkbox input{width:18px;height:18px;margin:0}.altcha-checkbox-verifying input{appearance:none;opacity:0;pointer-events:none}.altcha-spinner{animation:altcha-spinner .75s infinite linear;transform-origin:center}.altcha-overlay{--altcha-color-base:#fff;--altcha-color-text:#000;animation:overlay-slidein .5s forwards;display:flex;flex-direction:column;gap:.5rem;left:50%;width:260px;opacity:0;position:fixed;top:45%;transform:translate(-50%,-50%)}.altcha-overlay-backdrop{background:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:99999999}.altcha-overlay-close-button{align-self:flex-end;background:0 0;border:0;padding:.25rem;cursor:pointer;color:currentColor;font-size:130%;line-height:1;opacity:.7}@media (max-height:450px){.altcha-overlay{top:10%!important;transform:translate(-50%,0)}}';
3094
+ function Ho(e, t = "__altcha-css") {
3136
3095
  if (!document.getElementById(t)) {
3137
3096
  const r = document.createElement("style");
3138
3097
  r.id = t, r.textContent = e, document.head.appendChild(r);
3139
3098
  }
3140
3099
  }
3141
- globalThis.altchaCreateWorker = (e) => e ? new Worker(new URL(e)) : new Go();
3142
- Qi(Xi);
3143
- Qi(Xi);
3100
+ globalThis.altchaCreateWorker = (e) => e ? new Worker(new URL(e)) : new Ni();
3101
+ Ho(Bo);
3102
+ Ho(Bo);
3144
3103
  export {
3145
- Fl as Altcha
3104
+ kl as Altcha
3146
3105
  };