altcha 0.5.1 → 0.6.0

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.
@@ -1,280 +1,280 @@
1
- var nt = Object.defineProperty;
2
- var it = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var D = (r, e, t) => it(r, typeof e != "symbol" ? e + "" : e, t);
4
- function ee() {
1
+ var wt = Object.defineProperty;
2
+ var _t = (n, e, t) => e in n ? wt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var B = (n, e, t) => _t(n, typeof e != "symbol" ? e + "" : e, t);
4
+ function re() {
5
5
  }
6
- function Pe(r) {
7
- return r();
6
+ function Ke(n) {
7
+ return n();
8
8
  }
9
- function Re() {
9
+ function Be() {
10
10
  return /* @__PURE__ */ Object.create(null);
11
11
  }
12
- function re(r) {
13
- r.forEach(Pe);
12
+ function se(n) {
13
+ n.forEach(Ke);
14
14
  }
15
- function He(r) {
16
- return typeof r == "function";
15
+ function Qe(n) {
16
+ return typeof n == "function";
17
17
  }
18
- function lt(r, e) {
19
- return r != r ? e == e : r !== e || r && typeof r == "object" || typeof r == "function";
18
+ function yt(n, e) {
19
+ return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
20
20
  }
21
- function ot(r) {
22
- return Object.keys(r).length === 0;
21
+ function kt(n) {
22
+ return Object.keys(n).length === 0;
23
23
  }
24
- function v(r, e) {
25
- r.appendChild(e);
24
+ function p(n, e) {
25
+ n.appendChild(e);
26
26
  }
27
- function j(r, e, t) {
28
- r.insertBefore(e, t || null);
27
+ function P(n, e, t) {
28
+ n.insertBefore(e, t || null);
29
29
  }
30
- function M(r) {
31
- r.parentNode && r.parentNode.removeChild(r);
30
+ function N(n) {
31
+ n.parentNode && n.parentNode.removeChild(n);
32
32
  }
33
- function I(r) {
34
- return document.createElement(r);
33
+ function $(n) {
34
+ return document.createElement(n);
35
35
  }
36
- function B(r) {
37
- return document.createElementNS("http://www.w3.org/2000/svg", r);
36
+ function Z(n) {
37
+ return document.createElementNS("http://www.w3.org/2000/svg", n);
38
38
  }
39
- function st(r) {
40
- return document.createTextNode(r);
39
+ function Et(n) {
40
+ return document.createTextNode(n);
41
41
  }
42
- function J() {
43
- return st(" ");
42
+ function W() {
43
+ return Et(" ");
44
44
  }
45
- function ue(r, e, t, i) {
46
- return r.addEventListener(e, t, i), () => r.removeEventListener(e, t, i);
45
+ function _e(n, e, t, i) {
46
+ return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
47
47
  }
48
- function c(r, e, t) {
49
- t == null ? r.removeAttribute(e) : r.getAttribute(e) !== t && r.setAttribute(e, t);
48
+ function f(n, e, t) {
49
+ t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
50
50
  }
51
- function ct(r) {
52
- return Array.from(r.childNodes);
51
+ function vt(n) {
52
+ return Array.from(n.childNodes);
53
53
  }
54
- function Me(r, e, t) {
55
- r.classList.toggle(e, !!t);
54
+ function Ue(n, e, t) {
55
+ n.classList.toggle(e, !!t);
56
56
  }
57
- function ft(r, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
58
- return new CustomEvent(r, { detail: e, bubbles: t, cancelable: i });
57
+ function pt(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
58
+ return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
59
59
  }
60
- function ut(r) {
60
+ function xt(n) {
61
61
  const e = {};
62
- return r.childNodes.forEach(
62
+ return n.childNodes.forEach(
63
63
  /** @param {Element} node */
64
64
  (t) => {
65
65
  e[t.slot || "default"] = !0;
66
66
  }
67
67
  ), e;
68
68
  }
69
- let te;
70
- function Q(r) {
71
- te = r;
69
+ let le;
70
+ function oe(n) {
71
+ le = n;
72
72
  }
73
- function me() {
74
- if (!te) throw new Error("Function called outside component initialization");
75
- return te;
73
+ function ve() {
74
+ if (!le) throw new Error("Function called outside component initialization");
75
+ return le;
76
76
  }
77
- function at(r) {
78
- me().$$.on_mount.push(r);
77
+ function Ct(n) {
78
+ ve().$$.on_mount.push(n);
79
79
  }
80
- function ht(r) {
81
- me().$$.on_destroy.push(r);
80
+ function Lt(n) {
81
+ ve().$$.on_destroy.push(n);
82
82
  }
83
- function dt() {
84
- const r = me();
83
+ function It() {
84
+ const n = ve();
85
85
  return (e, t, { cancelable: i = !1 } = {}) => {
86
- const l = r.$$.callbacks[e];
87
- if (l) {
88
- const o = ft(
86
+ const o = n.$$.callbacks[e];
87
+ if (o) {
88
+ const l = pt(
89
89
  /** @type {string} */
90
90
  e,
91
91
  t,
92
92
  { cancelable: i }
93
93
  );
94
- return l.slice().forEach((s) => {
95
- s.call(r, o);
96
- }), !o.defaultPrevented;
94
+ return o.slice().forEach((s) => {
95
+ s.call(n, l);
96
+ }), !l.defaultPrevented;
97
97
  }
98
98
  return !0;
99
99
  };
100
100
  }
101
- const z = [], he = [];
102
- let K = [];
103
- const Te = [], Fe = /* @__PURE__ */ Promise.resolve();
104
- let de = !1;
105
- function Ue() {
106
- de || (de = !0, Fe.then(y));
101
+ const te = [], de = [];
102
+ let ne = [];
103
+ const qe = [], et = /* @__PURE__ */ Promise.resolve();
104
+ let ke = !1;
105
+ function tt() {
106
+ ke || (ke = !0, et.then(w));
107
107
  }
108
- function gt() {
109
- return Ue(), Fe;
108
+ function At() {
109
+ return tt(), et;
110
110
  }
111
- function ge(r) {
112
- K.push(r);
111
+ function Ee(n) {
112
+ ne.push(n);
113
113
  }
114
- const ae = /* @__PURE__ */ new Set();
115
- let W = 0;
116
- function y() {
117
- if (W !== 0)
114
+ const ye = /* @__PURE__ */ new Set();
115
+ let ee = 0;
116
+ function w() {
117
+ if (ee !== 0)
118
118
  return;
119
- const r = te;
119
+ const n = le;
120
120
  do {
121
121
  try {
122
- for (; W < z.length; ) {
123
- const e = z[W];
124
- W++, Q(e), mt(e.$$);
122
+ for (; ee < te.length; ) {
123
+ const e = te[ee];
124
+ ee++, oe(e), Rt(e.$$);
125
125
  }
126
126
  } catch (e) {
127
- throw z.length = 0, W = 0, e;
127
+ throw te.length = 0, ee = 0, e;
128
128
  }
129
- for (Q(null), z.length = 0, W = 0; he.length; ) he.pop()();
130
- for (let e = 0; e < K.length; e += 1) {
131
- const t = K[e];
132
- ae.has(t) || (ae.add(t), t());
129
+ for (oe(null), te.length = 0, ee = 0; de.length; ) de.pop()();
130
+ for (let e = 0; e < ne.length; e += 1) {
131
+ const t = ne[e];
132
+ ye.has(t) || (ye.add(t), t());
133
133
  }
134
- K.length = 0;
135
- } while (z.length);
136
- for (; Te.length; )
137
- Te.pop()();
138
- de = !1, ae.clear(), Q(r);
134
+ ne.length = 0;
135
+ } while (te.length);
136
+ for (; qe.length; )
137
+ qe.pop()();
138
+ ke = !1, ye.clear(), oe(n);
139
139
  }
140
- function mt(r) {
141
- if (r.fragment !== null) {
142
- r.update(), re(r.before_update);
143
- const e = r.dirty;
144
- r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(ge);
140
+ function Rt(n) {
141
+ if (n.fragment !== null) {
142
+ n.update(), se(n.before_update);
143
+ const e = n.dirty;
144
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Ee);
145
145
  }
146
146
  }
147
- function bt(r) {
147
+ function $t(n) {
148
148
  const e = [], t = [];
149
- K.forEach((i) => r.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), K = e;
149
+ ne.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), ne = e;
150
150
  }
151
- const _t = /* @__PURE__ */ new Set();
152
- function wt(r, e) {
153
- r && r.i && (_t.delete(r), r.i(e));
151
+ const Mt = /* @__PURE__ */ new Set();
152
+ function Tt(n, e) {
153
+ n && n.i && (Mt.delete(n), n.i(e));
154
154
  }
155
- function yt(r, e, t) {
156
- const { fragment: i, after_update: l } = r.$$;
157
- i && i.m(e, t), ge(() => {
158
- const o = r.$$.on_mount.map(Pe).filter(He);
159
- r.$$.on_destroy ? r.$$.on_destroy.push(...o) : re(o), r.$$.on_mount = [];
160
- }), l.forEach(ge);
155
+ function St(n, e, t) {
156
+ const { fragment: i, after_update: o } = n.$$;
157
+ i && i.m(e, t), Ee(() => {
158
+ const l = n.$$.on_mount.map(Ke).filter(Qe);
159
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : se(l), n.$$.on_mount = [];
160
+ }), o.forEach(Ee);
161
161
  }
162
- function vt(r, e) {
163
- const t = r.$$;
164
- t.fragment !== null && (bt(t.after_update), re(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
162
+ function Dt(n, e) {
163
+ const t = n.$$;
164
+ t.fragment !== null && ($t(t.after_update), se(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
165
165
  }
166
- function kt(r, e) {
167
- r.$$.dirty[0] === -1 && (z.push(r), Ue(), r.$$.dirty.fill(0)), r.$$.dirty[e / 31 | 0] |= 1 << e % 31;
166
+ function Nt(n, e) {
167
+ n.$$.dirty[0] === -1 && (te.push(n), tt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
168
168
  }
169
- function pt(r, e, t, i, l, o, s = null, u = [-1]) {
170
- const f = te;
171
- Q(r);
172
- const a = r.$$ = {
169
+ function jt(n, e, t, i, o, l, s = null, a = [-1]) {
170
+ const c = le;
171
+ oe(n);
172
+ const h = n.$$ = {
173
173
  fragment: null,
174
174
  ctx: [],
175
175
  // state
176
- props: o,
177
- update: ee,
178
- not_equal: l,
179
- bound: Re(),
176
+ props: l,
177
+ update: re,
178
+ not_equal: o,
179
+ bound: Be(),
180
180
  // lifecycle
181
181
  on_mount: [],
182
182
  on_destroy: [],
183
183
  on_disconnect: [],
184
184
  before_update: [],
185
185
  after_update: [],
186
- context: new Map(e.context || (f ? f.$$.context : [])),
186
+ context: new Map(e.context || (c ? c.$$.context : [])),
187
187
  // everything else
188
- callbacks: Re(),
189
- dirty: u,
188
+ callbacks: Be(),
189
+ dirty: a,
190
190
  skip_bound: !1,
191
- root: e.target || f.$$.root
191
+ root: e.target || c.$$.root
192
192
  };
193
- s && s(a.root);
194
- let N = !1;
195
- if (a.ctx = t ? t(r, e.props || {}, (C, V, ...O) => {
196
- const F = O.length ? O[0] : V;
197
- return a.ctx && l(a.ctx[C], a.ctx[C] = F) && (!a.skip_bound && a.bound[C] && a.bound[C](F), N && kt(r, C)), V;
198
- }) : [], a.update(), N = !0, re(a.before_update), a.fragment = i ? i(a.ctx) : !1, e.target) {
193
+ s && s(h.root);
194
+ let H = !1;
195
+ if (h.ctx = t ? t(n, e.props || {}, (T, F, ...E) => {
196
+ const O = E.length ? E[0] : F;
197
+ return h.ctx && o(h.ctx[T], h.ctx[T] = O) && (!h.skip_bound && h.bound[T] && h.bound[T](O), H && Nt(n, T)), F;
198
+ }) : [], h.update(), H = !0, se(h.before_update), h.fragment = i ? i(h.ctx) : !1, e.target) {
199
199
  if (e.hydrate) {
200
- const C = ct(e.target);
201
- a.fragment && a.fragment.l(C), C.forEach(M);
200
+ const T = vt(e.target);
201
+ h.fragment && h.fragment.l(T), T.forEach(N);
202
202
  } else
203
- a.fragment && a.fragment.c();
204
- e.intro && wt(r.$$.fragment), yt(r, e.target, e.anchor), y();
203
+ h.fragment && h.fragment.c();
204
+ e.intro && Tt(n.$$.fragment), St(n, e.target, e.anchor), w();
205
205
  }
206
- Q(f);
206
+ oe(c);
207
207
  }
208
- let Be;
209
- typeof HTMLElement == "function" && (Be = class extends HTMLElement {
208
+ let nt;
209
+ typeof HTMLElement == "function" && (nt = class extends HTMLElement {
210
210
  constructor(e, t, i) {
211
211
  super();
212
212
  /** The Svelte component constructor */
213
- D(this, "$$ctor");
213
+ B(this, "$$ctor");
214
214
  /** Slots */
215
- D(this, "$$s");
215
+ B(this, "$$s");
216
216
  /** The Svelte component instance */
217
- D(this, "$$c");
217
+ B(this, "$$c");
218
218
  /** Whether or not the custom element is connected */
219
- D(this, "$$cn", !1);
219
+ B(this, "$$cn", !1);
220
220
  /** Component props data */
221
- D(this, "$$d", {});
221
+ B(this, "$$d", {});
222
222
  /** `true` if currently in the process of reflecting component props back to attributes */
223
- D(this, "$$r", !1);
223
+ B(this, "$$r", !1);
224
224
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
225
- D(this, "$$p_d", {});
225
+ B(this, "$$p_d", {});
226
226
  /** @type {Record<string, Function[]>} Event listeners */
227
- D(this, "$$l", {});
227
+ B(this, "$$l", {});
228
228
  /** @type {Map<Function, Function>} Event listener unsubscribe functions */
229
- D(this, "$$l_u", /* @__PURE__ */ new Map());
229
+ B(this, "$$l_u", /* @__PURE__ */ new Map());
230
230
  this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
231
231
  }
232
232
  addEventListener(e, t, i) {
233
233
  if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
234
- const l = this.$$c.$on(e, t);
235
- this.$$l_u.set(t, l);
234
+ const o = this.$$c.$on(e, t);
235
+ this.$$l_u.set(t, o);
236
236
  }
237
237
  super.addEventListener(e, t, i);
238
238
  }
239
239
  removeEventListener(e, t, i) {
240
240
  if (super.removeEventListener(e, t, i), this.$$c) {
241
- const l = this.$$l_u.get(t);
242
- l && (l(), this.$$l_u.delete(t));
241
+ const o = this.$$l_u.get(t);
242
+ o && (o(), this.$$l_u.delete(t));
243
243
  }
244
244
  }
245
245
  async connectedCallback() {
246
246
  if (this.$$cn = !0, !this.$$c) {
247
- let e = function(o) {
247
+ let e = function(l) {
248
248
  return () => {
249
249
  let s;
250
250
  return {
251
251
  c: function() {
252
- s = I("slot"), o !== "default" && c(s, "name", o);
252
+ s = $("slot"), l !== "default" && f(s, "name", l);
253
253
  },
254
254
  /**
255
255
  * @param {HTMLElement} target
256
256
  * @param {HTMLElement} [anchor]
257
257
  */
258
- m: function(a, N) {
259
- j(a, s, N);
258
+ m: function(h, H) {
259
+ P(h, s, H);
260
260
  },
261
- d: function(a) {
262
- a && M(s);
261
+ d: function(h) {
262
+ h && N(s);
263
263
  }
264
264
  };
265
265
  };
266
266
  };
267
267
  if (await Promise.resolve(), !this.$$cn || this.$$c)
268
268
  return;
269
- const t = {}, i = ut(this);
270
- for (const o of this.$$s)
271
- o in i && (t[o] = [e(o)]);
272
- for (const o of this.attributes) {
273
- const s = this.$$g_p(o.name);
274
- s in this.$$d || (this.$$d[s] = se(s, o.value, this.$$p_d, "toProp"));
269
+ const t = {}, i = xt(this);
270
+ for (const l of this.$$s)
271
+ l in i && (t[l] = [e(l)]);
272
+ for (const l of this.attributes) {
273
+ const s = this.$$g_p(l.name);
274
+ s in this.$$d || (this.$$d[s] = he(s, l.value, this.$$p_d, "toProp"));
275
275
  }
276
- for (const o in this.$$p_d)
277
- !(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
276
+ for (const l in this.$$p_d)
277
+ !(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
278
278
  this.$$c = new this.$$ctor({
279
279
  target: this.shadowRoot || this,
280
280
  props: {
@@ -285,25 +285,25 @@ typeof HTMLElement == "function" && (Be = class extends HTMLElement {
285
285
  }
286
286
  }
287
287
  });
288
- const l = () => {
288
+ const o = () => {
289
289
  this.$$r = !0;
290
- for (const o in this.$$p_d)
291
- if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
292
- const s = se(
293
- o,
294
- this.$$d[o],
290
+ for (const l in this.$$p_d)
291
+ if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
292
+ const s = he(
293
+ l,
294
+ this.$$d[l],
295
295
  this.$$p_d,
296
296
  "toAttribute"
297
297
  );
298
- s == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, s);
298
+ s == null ? this.removeAttribute(this.$$p_d[l].attribute || l) : this.setAttribute(this.$$p_d[l].attribute || l, s);
299
299
  }
300
300
  this.$$r = !1;
301
301
  };
302
- this.$$c.$$.after_update.push(l), l();
303
- for (const o in this.$$l)
304
- for (const s of this.$$l[o]) {
305
- const u = this.$$c.$on(o, s);
306
- this.$$l_u.set(s, u);
302
+ this.$$c.$$.after_update.push(o), o();
303
+ for (const l in this.$$l)
304
+ for (const s of this.$$l[l]) {
305
+ const a = this.$$c.$on(l, s);
306
+ this.$$l_u.set(s, a);
307
307
  }
308
308
  this.$$l = {};
309
309
  }
@@ -311,8 +311,8 @@ typeof HTMLElement == "function" && (Be = class extends HTMLElement {
311
311
  // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
312
312
  // and setting attributes through setAttribute etc, this is helpful
313
313
  attributeChangedCallback(e, t, i) {
314
- var l;
315
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = se(e, i, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [e]: this.$$d[e] }));
314
+ var o;
315
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = he(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
316
316
  }
317
317
  disconnectedCallback() {
318
318
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -325,13 +325,13 @@ typeof HTMLElement == "function" && (Be = class extends HTMLElement {
325
325
  ) || e;
326
326
  }
327
327
  });
328
- function se(r, e, t, i) {
329
- var o;
330
- const l = (o = t[r]) == null ? void 0 : o.type;
331
- if (e = l === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[r])
328
+ function he(n, e, t, i) {
329
+ var l;
330
+ const o = (l = t[n]) == null ? void 0 : l.type;
331
+ if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
332
332
  return e;
333
333
  if (i === "toAttribute")
334
- switch (l) {
334
+ switch (o) {
335
335
  case "Object":
336
336
  case "Array":
337
337
  return e == null ? null : JSON.stringify(e);
@@ -343,7 +343,7 @@ function se(r, e, t, i) {
343
343
  return e;
344
344
  }
345
345
  else
346
- switch (l) {
346
+ switch (o) {
347
347
  case "Object":
348
348
  case "Array":
349
349
  return e && JSON.parse(e);
@@ -355,38 +355,38 @@ function se(r, e, t, i) {
355
355
  return e;
356
356
  }
357
357
  }
358
- function Et(r, e, t, i, l, o) {
359
- let s = class extends Be {
358
+ function Vt(n, e, t, i, o, l) {
359
+ let s = class extends nt {
360
360
  constructor() {
361
- super(r, t, l), this.$$p_d = e;
361
+ super(n, t, o), this.$$p_d = e;
362
362
  }
363
363
  static get observedAttributes() {
364
364
  return Object.keys(e).map(
365
- (u) => (e[u].attribute || u).toLowerCase()
365
+ (a) => (e[a].attribute || a).toLowerCase()
366
366
  );
367
367
  }
368
368
  };
369
- return Object.keys(e).forEach((u) => {
370
- Object.defineProperty(s.prototype, u, {
369
+ return Object.keys(e).forEach((a) => {
370
+ Object.defineProperty(s.prototype, a, {
371
371
  get() {
372
- return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
372
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
373
373
  },
374
- set(f) {
375
- var a;
376
- f = se(u, f, e), this.$$d[u] = f, (a = this.$$c) == null || a.$set({ [u]: f });
374
+ set(c) {
375
+ var h;
376
+ c = he(a, c, e), this.$$d[a] = c, (h = this.$$c) == null || h.$set({ [a]: c });
377
377
  }
378
378
  });
379
- }), i.forEach((u) => {
380
- Object.defineProperty(s.prototype, u, {
379
+ }), i.forEach((a) => {
380
+ Object.defineProperty(s.prototype, a, {
381
381
  get() {
382
- var f;
383
- return (f = this.$$c) == null ? void 0 : f[u];
382
+ var c;
383
+ return (c = this.$$c) == null ? void 0 : c[a];
384
384
  }
385
385
  });
386
- }), o && (s = o(s)), r.element = /** @type {any} */
386
+ }), l && (s = l(s)), n.element = /** @type {any} */
387
387
  s, s;
388
388
  }
389
- class $t {
389
+ class Pt {
390
390
  constructor() {
391
391
  /**
392
392
  * ### PRIVATE API
@@ -395,7 +395,7 @@ class $t {
395
395
  *
396
396
  * @type {any}
397
397
  */
398
- D(this, "$$");
398
+ B(this, "$$");
399
399
  /**
400
400
  * ### PRIVATE API
401
401
  *
@@ -403,11 +403,11 @@ class $t {
403
403
  *
404
404
  * @type {any}
405
405
  */
406
- D(this, "$$set");
406
+ B(this, "$$set");
407
407
  }
408
408
  /** @returns {void} */
409
409
  $destroy() {
410
- vt(this, 1), this.$destroy = ee;
410
+ Dt(this, 1), this.$destroy = re;
411
411
  }
412
412
  /**
413
413
  * @template {Extract<keyof Events, string>} K
@@ -416,12 +416,12 @@ class $t {
416
416
  * @returns {() => void}
417
417
  */
418
418
  $on(e, t) {
419
- if (!He(t))
420
- return ee;
419
+ if (!Qe(t))
420
+ return re;
421
421
  const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
422
422
  return i.push(t), () => {
423
- const l = i.indexOf(t);
424
- l !== -1 && i.splice(l, 1);
423
+ const o = i.indexOf(t);
424
+ o !== -1 && i.splice(o, 1);
425
425
  };
426
426
  }
427
427
  /**
@@ -429,562 +429,610 @@ class $t {
429
429
  * @returns {void}
430
430
  */
431
431
  $set(e) {
432
- this.$$set && !ot(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
432
+ this.$$set && !kt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
433
433
  }
434
434
  }
435
- const xt = "4";
436
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xt);
437
- const Ct = new TextEncoder();
438
- function Lt(r) {
439
- return [...new Uint8Array(r)].map((e) => e.toString(16).padStart(2, "0")).join("");
435
+ const Ft = "4";
436
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ft);
437
+ const Ht = new TextEncoder();
438
+ function Ot(n) {
439
+ return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("");
440
440
  }
441
- async function It(r, e = "SHA-256", t = 1e5) {
441
+ async function Bt(n, e = "SHA-256", t = 1e5) {
442
442
  const i = Date.now().toString(16);
443
- r || (r = Math.round(Math.random() * t));
444
- const l = await Ze(i, r, e);
443
+ n || (n = Math.round(Math.random() * t));
444
+ const o = await rt(i, n, e);
445
445
  return {
446
446
  algorithm: e,
447
- challenge: l,
447
+ challenge: o,
448
448
  salt: i,
449
449
  signature: ""
450
450
  };
451
451
  }
452
- async function Ze(r, e, t) {
453
- return Lt(
452
+ async function rt(n, e, t) {
453
+ return Ot(
454
454
  await crypto.subtle.digest(
455
455
  t.toUpperCase(),
456
- Ct.encode(r + e)
456
+ Ht.encode(n + e)
457
457
  )
458
458
  );
459
459
  }
460
- function At(r, e, t = "SHA-256", i = 1e6, l = 0) {
461
- const o = new AbortController(), s = Date.now();
460
+ function Ut(n, e, t = "SHA-256", i = 1e6, o = 0) {
461
+ const l = new AbortController(), s = Date.now();
462
462
  return {
463
463
  promise: (async () => {
464
- for (let f = l; f <= i; f += 1) {
465
- if (o.signal.aborted)
464
+ for (let c = o; c <= i; c += 1) {
465
+ if (l.signal.aborted)
466
466
  return null;
467
- if (await Ze(e, f, t) === r)
467
+ if (await rt(e, c, t) === n)
468
468
  return {
469
- number: f,
469
+ number: c,
470
470
  took: Date.now() - s
471
471
  };
472
472
  }
473
473
  return null;
474
474
  })(),
475
- controller: o
475
+ controller: l
476
476
  };
477
477
  }
478
- var b = /* @__PURE__ */ ((r) => (r.ERROR = "error", r.VERIFIED = "verified", r.VERIFYING = "verifying", r.UNVERIFIED = "unverified", r.EXPIRED = "expired", r))(b || {});
479
- function je(r) {
478
+ var b = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(b || {});
479
+ function Ze(n) {
480
480
  let e, t, i;
481
481
  return {
482
482
  c() {
483
- e = B("svg"), t = B("path"), i = B("path"), c(t, "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"), c(t, "fill", "currentColor"), c(t, "opacity", ".25"), c(i, "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"), c(i, "fill", "currentColor"), c(i, "class", "altcha-spinner"), c(e, "width", "24"), c(e, "height", "24"), c(e, "viewBox", "0 0 24 24"), c(e, "xmlns", "http://www.w3.org/2000/svg");
483
+ e = Z("svg"), t = Z("path"), i = Z("path"), f(t, "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"), f(t, "fill", "currentColor"), f(t, "opacity", ".25"), f(i, "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"), f(i, "fill", "currentColor"), f(i, "class", "altcha-spinner"), f(e, "width", "24"), f(e, "height", "24"), f(e, "viewBox", "0 0 24 24"), f(e, "xmlns", "http://www.w3.org/2000/svg");
484
484
  },
485
- m(l, o) {
486
- j(l, e, o), v(e, t), v(e, i);
485
+ m(o, l) {
486
+ P(o, e, l), p(e, t), p(e, i);
487
487
  },
488
- d(l) {
489
- l && M(e);
488
+ d(o) {
489
+ o && N(e);
490
490
  }
491
491
  };
492
492
  }
493
- function Rt(r) {
493
+ function qt(n) {
494
494
  let e, t = (
495
495
  /*_strings*/
496
- r[9].label + ""
496
+ n[11].label + ""
497
497
  ), i;
498
498
  return {
499
499
  c() {
500
- e = I("label"), c(e, "for", i = /*name*/
501
- r[3] + "_checkbox");
500
+ e = $("label"), f(e, "for", i = /*name*/
501
+ n[4] + "_checkbox");
502
502
  },
503
- m(l, o) {
504
- j(l, e, o), e.innerHTML = t;
503
+ m(o, l) {
504
+ P(o, e, l), e.innerHTML = t;
505
505
  },
506
- p(l, o) {
507
- o[0] & /*_strings*/
508
- 512 && t !== (t = /*_strings*/
509
- l[9].label + "") && (e.innerHTML = t), o[0] & /*name*/
510
- 8 && i !== (i = /*name*/
511
- l[3] + "_checkbox") && c(e, "for", i);
506
+ p(o, l) {
507
+ l[0] & /*_strings*/
508
+ 2048 && t !== (t = /*_strings*/
509
+ o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
510
+ 16 && i !== (i = /*name*/
511
+ o[4] + "_checkbox") && f(e, "for", i);
512
512
  },
513
- d(l) {
514
- l && M(e);
513
+ d(o) {
514
+ o && N(e);
515
515
  }
516
516
  };
517
517
  }
518
- function Mt(r) {
518
+ function Zt(n) {
519
519
  let e, t = (
520
520
  /*_strings*/
521
- r[9].verifying + ""
521
+ n[11].verifying + ""
522
522
  );
523
523
  return {
524
524
  c() {
525
- e = I("span");
525
+ e = $("span");
526
526
  },
527
- m(i, l) {
528
- j(i, e, l), e.innerHTML = t;
527
+ m(i, o) {
528
+ P(i, e, o), e.innerHTML = t;
529
529
  },
530
- p(i, l) {
531
- l[0] & /*_strings*/
532
- 512 && t !== (t = /*_strings*/
533
- i[9].verifying + "") && (e.innerHTML = t);
530
+ p(i, o) {
531
+ o[0] & /*_strings*/
532
+ 2048 && t !== (t = /*_strings*/
533
+ i[11].verifying + "") && (e.innerHTML = t);
534
534
  },
535
535
  d(i) {
536
- i && M(e);
536
+ i && N(e);
537
537
  }
538
538
  };
539
539
  }
540
- function Tt(r) {
540
+ function Yt(n) {
541
541
  let e, t = (
542
542
  /*_strings*/
543
- r[9].verified + ""
544
- ), i, l;
543
+ n[11].verified + ""
544
+ ), i, o;
545
545
  return {
546
546
  c() {
547
- e = I("span"), i = J(), l = I("input"), c(l, "type", "hidden"), c(
548
- l,
547
+ e = $("span"), i = W(), o = $("input"), f(o, "type", "hidden"), f(
548
+ o,
549
549
  "name",
550
550
  /*name*/
551
- r[3]
552
- ), l.value = /*payload*/
553
- r[4];
551
+ n[4]
552
+ ), o.value = /*payload*/
553
+ n[5];
554
554
  },
555
- m(o, s) {
556
- j(o, e, s), e.innerHTML = t, j(o, i, s), j(o, l, s);
555
+ m(l, s) {
556
+ P(l, e, s), e.innerHTML = t, P(l, i, s), P(l, o, s);
557
557
  },
558
- p(o, s) {
558
+ p(l, s) {
559
559
  s[0] & /*_strings*/
560
- 512 && t !== (t = /*_strings*/
561
- o[9].verified + "") && (e.innerHTML = t), s[0] & /*name*/
562
- 8 && c(
563
- l,
560
+ 2048 && t !== (t = /*_strings*/
561
+ l[11].verified + "") && (e.innerHTML = t), s[0] & /*name*/
562
+ 16 && f(
563
+ o,
564
564
  "name",
565
565
  /*name*/
566
- o[3]
566
+ l[4]
567
567
  ), s[0] & /*payload*/
568
- 16 && (l.value = /*payload*/
569
- o[4]);
568
+ 32 && (o.value = /*payload*/
569
+ l[5]);
570
570
  },
571
- d(o) {
572
- o && (M(e), M(i), M(l));
571
+ d(l) {
572
+ l && (N(e), N(i), N(o));
573
573
  }
574
574
  };
575
575
  }
576
- function Ne(r) {
577
- let e, t, i, l, o, s, u;
576
+ function Ye(n) {
577
+ let e, t, i, o, l, s, a;
578
578
  return {
579
579
  c() {
580
- e = I("div"), t = I("a"), i = B("svg"), l = B("path"), o = B("path"), s = B("path"), c(l, "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"), c(l, "fill", "currentColor"), c(o, "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"), c(o, "fill", "currentColor"), c(s, "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"), c(s, "fill", "currentColor"), c(i, "width", "22"), c(i, "height", "22"), c(i, "viewBox", "0 0 20 20"), c(i, "fill", "none"), c(i, "xmlns", "http://www.w3.org/2000/svg"), c(t, "href", qe), c(t, "target", "_blank"), c(t, "class", "altcha-logo"), c(t, "aria-label", u = /*_strings*/
581
- r[9].ariaLinkLabel);
580
+ e = $("div"), t = $("a"), i = Z("svg"), o = Z("path"), l = Z("path"), s = Z("path"), f(o, "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"), f(o, "fill", "currentColor"), f(l, "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"), f(l, "fill", "currentColor"), f(s, "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"), f(s, "fill", "currentColor"), f(i, "width", "22"), f(i, "height", "22"), f(i, "viewBox", "0 0 20 20"), f(i, "fill", "none"), f(i, "xmlns", "http://www.w3.org/2000/svg"), f(t, "href", it), f(t, "target", "_blank"), f(t, "class", "altcha-logo"), f(t, "aria-label", a = /*_strings*/
581
+ n[11].ariaLinkLabel);
582
582
  },
583
- m(f, a) {
584
- j(f, e, a), v(e, t), v(t, i), v(i, l), v(i, o), v(i, s);
583
+ m(c, h) {
584
+ P(c, e, h), p(e, t), p(t, i), p(i, o), p(i, l), p(i, s);
585
585
  },
586
- p(f, a) {
587
- a[0] & /*_strings*/
588
- 512 && u !== (u = /*_strings*/
589
- f[9].ariaLinkLabel) && c(t, "aria-label", u);
586
+ p(c, h) {
587
+ h[0] & /*_strings*/
588
+ 2048 && a !== (a = /*_strings*/
589
+ c[11].ariaLinkLabel) && f(t, "aria-label", a);
590
590
  },
591
- d(f) {
592
- f && M(e);
591
+ d(c) {
592
+ c && N(e);
593
593
  }
594
594
  };
595
595
  }
596
- function Se(r) {
597
- let e, t, i, l;
598
- function o(f, a) {
596
+ function Ge(n) {
597
+ let e, t, i, o;
598
+ function l(c, h) {
599
599
  return (
600
600
  /*state*/
601
- f[5] === b.EXPIRED ? Nt : jt
601
+ c[6] === b.EXPIRED ? Wt : Gt
602
602
  );
603
603
  }
604
- let s = o(r), u = s(r);
604
+ let s = l(n), a = s(n);
605
605
  return {
606
606
  c() {
607
- e = I("div"), t = B("svg"), i = B("path"), l = J(), u.c(), c(i, "stroke-linecap", "round"), c(i, "stroke-linejoin", "round"), c(i, "d", "M6 18L18 6M6 6l12 12"), c(t, "width", "14"), c(t, "height", "14"), c(t, "xmlns", "http://www.w3.org/2000/svg"), c(t, "fill", "none"), c(t, "viewBox", "0 0 24 24"), c(t, "stroke-width", "1.5"), c(t, "stroke", "currentColor"), c(e, "class", "altcha-error");
607
+ e = $("div"), t = Z("svg"), i = Z("path"), o = W(), a.c(), f(i, "stroke-linecap", "round"), f(i, "stroke-linejoin", "round"), f(i, "d", "M6 18L18 6M6 6l12 12"), f(t, "width", "14"), f(t, "height", "14"), f(t, "xmlns", "http://www.w3.org/2000/svg"), f(t, "fill", "none"), f(t, "viewBox", "0 0 24 24"), f(t, "stroke-width", "1.5"), f(t, "stroke", "currentColor"), f(e, "class", "altcha-error");
608
608
  },
609
- m(f, a) {
610
- j(f, e, a), v(e, t), v(t, i), v(e, l), u.m(e, null);
609
+ m(c, h) {
610
+ P(c, e, h), p(e, t), p(t, i), p(e, o), a.m(e, null);
611
611
  },
612
- p(f, a) {
613
- s === (s = o(f)) && u ? u.p(f, a) : (u.d(1), u = s(f), u && (u.c(), u.m(e, null)));
612
+ p(c, h) {
613
+ s === (s = l(c)) && a ? a.p(c, h) : (a.d(1), a = s(c), a && (a.c(), a.m(e, null)));
614
614
  },
615
- d(f) {
616
- f && M(e), u.d();
615
+ d(c) {
616
+ c && N(e), a.d();
617
617
  }
618
618
  };
619
619
  }
620
- function jt(r) {
620
+ function Gt(n) {
621
621
  let e, t = (
622
622
  /*_strings*/
623
- r[9].error + ""
623
+ n[11].error + ""
624
624
  );
625
625
  return {
626
626
  c() {
627
- e = I("div"), c(
627
+ e = $("div"), f(
628
628
  e,
629
629
  "title",
630
630
  /*error*/
631
- r[8]
631
+ n[10]
632
632
  );
633
633
  },
634
- m(i, l) {
635
- j(i, e, l), e.innerHTML = t;
634
+ m(i, o) {
635
+ P(i, e, o), e.innerHTML = t;
636
636
  },
637
- p(i, l) {
638
- l[0] & /*_strings*/
639
- 512 && t !== (t = /*_strings*/
640
- i[9].error + "") && (e.innerHTML = t), l[0] & /*error*/
641
- 256 && c(
637
+ p(i, o) {
638
+ o[0] & /*_strings*/
639
+ 2048 && t !== (t = /*_strings*/
640
+ i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
641
+ 1024 && f(
642
642
  e,
643
643
  "title",
644
644
  /*error*/
645
- i[8]
645
+ i[10]
646
646
  );
647
647
  },
648
648
  d(i) {
649
- i && M(e);
649
+ i && N(e);
650
650
  }
651
651
  };
652
652
  }
653
- function Nt(r) {
653
+ function Wt(n) {
654
654
  let e, t = (
655
655
  /*_strings*/
656
- r[9].expired + ""
656
+ n[11].expired + ""
657
657
  );
658
658
  return {
659
659
  c() {
660
- e = I("div"), c(
660
+ e = $("div"), f(
661
661
  e,
662
662
  "title",
663
663
  /*error*/
664
- r[8]
664
+ n[10]
665
665
  );
666
666
  },
667
- m(i, l) {
668
- j(i, e, l), e.innerHTML = t;
667
+ m(i, o) {
668
+ P(i, e, o), e.innerHTML = t;
669
669
  },
670
- p(i, l) {
671
- l[0] & /*_strings*/
672
- 512 && t !== (t = /*_strings*/
673
- i[9].expired + "") && (e.innerHTML = t), l[0] & /*error*/
674
- 256 && c(
670
+ p(i, o) {
671
+ o[0] & /*_strings*/
672
+ 2048 && t !== (t = /*_strings*/
673
+ i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
674
+ 1024 && f(
675
675
  e,
676
676
  "title",
677
677
  /*error*/
678
- i[8]
678
+ i[10]
679
679
  );
680
680
  },
681
681
  d(i) {
682
- i && M(e);
682
+ i && N(e);
683
683
  }
684
684
  };
685
685
  }
686
- function De(r) {
686
+ function We(n) {
687
687
  let e, t, i = (
688
688
  /*_strings*/
689
- r[9].footer + ""
689
+ n[11].footer + ""
690
690
  );
691
691
  return {
692
692
  c() {
693
- e = I("div"), t = I("div"), c(e, "class", "altcha-footer");
693
+ e = $("div"), t = $("div"), f(e, "class", "altcha-footer");
694
694
  },
695
- m(l, o) {
696
- j(l, e, o), v(e, t), t.innerHTML = i;
695
+ m(o, l) {
696
+ P(o, e, l), p(e, t), t.innerHTML = i;
697
697
  },
698
- p(l, o) {
699
- o[0] & /*_strings*/
700
- 512 && i !== (i = /*_strings*/
701
- l[9].footer + "") && (t.innerHTML = i);
698
+ p(o, l) {
699
+ l[0] & /*_strings*/
700
+ 2048 && i !== (i = /*_strings*/
701
+ o[11].footer + "") && (t.innerHTML = i);
702
702
  },
703
- d(l) {
704
- l && M(e);
703
+ d(o) {
704
+ o && N(e);
705
+ }
706
+ };
707
+ }
708
+ function Xe(n) {
709
+ let e;
710
+ return {
711
+ c() {
712
+ e = $("div"), f(e, "class", "altcha-anchor-arrow");
713
+ },
714
+ m(t, i) {
715
+ P(t, e, i), n[36](e);
716
+ },
717
+ p: re,
718
+ d(t) {
719
+ t && N(e), n[36](null);
705
720
  }
706
721
  };
707
722
  }
708
- function St(r) {
709
- let e, t, i, l, o, s, u, f, a, N, C, V, O, F, k = (
723
+ function Xt(n) {
724
+ let e, t, i, o, l, s, a, c, h, H, T, F, E, O, X, M = (
710
725
  /*state*/
711
- r[5] === b.VERIFYING && je()
726
+ n[6] === b.VERIFYING && Ze()
712
727
  );
713
- function q(d, A) {
728
+ function Q(d, y) {
714
729
  return (
715
730
  /*state*/
716
- d[5] === b.VERIFIED ? Tt : (
731
+ d[6] === b.VERIFIED ? Yt : (
717
732
  /*state*/
718
- d[5] === b.VERIFYING ? Mt : Rt
733
+ d[6] === b.VERIFYING ? Zt : qt
719
734
  )
720
735
  );
721
736
  }
722
- let U = q(r), p = U(r), E = (
737
+ let Y = Q(n), S = Y(n), L = (
723
738
  /*hidelogo*/
724
- r[2] !== !0 && Ne(r)
725
- ), g = (
739
+ n[3] !== !0 && Ye(n)
740
+ ), I = (
726
741
  /*error*/
727
- (r[8] || /*state*/
728
- r[5] === b.EXPIRED) && Se(r)
742
+ (n[10] || /*state*/
743
+ n[6] === b.EXPIRED) && Ge(n)
729
744
  ), _ = (
730
745
  /*_strings*/
731
- r[9].footer && /*hidefooter*/
732
- r[1] !== !0 && De(r)
746
+ n[11].footer && /*hidefooter*/
747
+ n[2] !== !0 && We(n)
748
+ ), A = (
749
+ /*floating*/
750
+ n[1] && Xe(n)
733
751
  );
734
752
  return {
735
753
  c() {
736
- e = I("div"), t = I("div"), k && k.c(), i = J(), l = I("div"), o = I("input"), f = J(), a = I("div"), p.c(), N = J(), E && E.c(), C = J(), g && g.c(), V = J(), _ && _.c(), c(o, "type", "checkbox"), c(o, "id", s = /*name*/
737
- r[3] + "_checkbox"), o.required = u = /*auto*/
738
- r[0] !== "onsubmit", c(l, "class", "altcha-checkbox"), Me(
739
- l,
754
+ e = $("div"), t = $("div"), M && M.c(), i = W(), o = $("div"), l = $("input"), c = W(), h = $("div"), S.c(), H = W(), L && L.c(), T = W(), I && I.c(), F = W(), _ && _.c(), E = W(), A && A.c(), f(l, "type", "checkbox"), f(l, "id", s = /*name*/
755
+ n[4] + "_checkbox"), l.required = a = /*auto*/
756
+ n[0] !== "onsubmit", f(o, "class", "altcha-checkbox"), Ue(
757
+ o,
740
758
  "altcha-hidden",
741
759
  /*state*/
742
- r[5] === b.VERIFYING
743
- ), c(a, "class", "altcha-label"), c(t, "class", "altcha-main"), c(e, "class", "altcha"), c(
760
+ n[6] === b.VERIFYING
761
+ ), f(h, "class", "altcha-label"), f(t, "class", "altcha-main"), f(e, "class", "altcha"), f(
744
762
  e,
745
763
  "data-state",
746
764
  /*state*/
747
- r[5]
765
+ n[6]
766
+ ), f(
767
+ e,
768
+ "data-floating",
769
+ /*floating*/
770
+ n[1]
748
771
  );
749
772
  },
750
- m(d, A) {
751
- j(d, e, A), v(e, t), k && k.m(t, null), v(t, i), v(t, l), v(l, o), o.checked = /*checked*/
752
- r[6], v(t, f), v(t, a), p.m(a, null), v(t, N), E && E.m(t, null), v(e, C), g && g.m(e, null), v(e, V), _ && _.m(e, null), r[31](e), O || (F = [
753
- ue(
754
- o,
773
+ m(d, y) {
774
+ P(d, e, y), p(e, t), M && M.m(t, null), p(t, i), p(t, o), p(o, l), l.checked = /*checked*/
775
+ n[7], p(t, c), p(t, h), S.m(h, null), p(t, H), L && L.m(t, null), p(e, T), I && I.m(e, null), p(e, F), _ && _.m(e, null), p(e, E), A && A.m(e, null), n[37](e), O || (X = [
776
+ _e(
777
+ l,
755
778
  "change",
756
779
  /*input_change_handler*/
757
- r[30]
780
+ n[35]
758
781
  ),
759
- ue(
760
- o,
782
+ _e(
783
+ l,
761
784
  "change",
762
785
  /*onCheckedChange*/
763
- r[10]
786
+ n[12]
764
787
  ),
765
- ue(
766
- o,
788
+ _e(
789
+ l,
767
790
  "invalid",
768
791
  /*onInvalid*/
769
- r[11]
792
+ n[13]
770
793
  )
771
794
  ], O = !0);
772
795
  },
773
- p(d, A) {
796
+ p(d, y) {
774
797
  /*state*/
775
- d[5] === b.VERIFYING ? k || (k = je(), k.c(), k.m(t, i)) : k && (k.d(1), k = null), A[0] & /*name*/
776
- 8 && s !== (s = /*name*/
777
- d[3] + "_checkbox") && c(o, "id", s), A[0] & /*auto*/
778
- 1 && u !== (u = /*auto*/
779
- d[0] !== "onsubmit") && (o.required = u), A[0] & /*checked*/
780
- 64 && (o.checked = /*checked*/
781
- d[6]), A[0] & /*state*/
782
- 32 && Me(
783
- l,
798
+ d[6] === b.VERIFYING ? M || (M = Ze(), M.c(), M.m(t, i)) : M && (M.d(1), M = null), y[0] & /*name*/
799
+ 16 && s !== (s = /*name*/
800
+ d[4] + "_checkbox") && f(l, "id", s), y[0] & /*auto*/
801
+ 1 && a !== (a = /*auto*/
802
+ d[0] !== "onsubmit") && (l.required = a), y[0] & /*checked*/
803
+ 128 && (l.checked = /*checked*/
804
+ d[7]), y[0] & /*state*/
805
+ 64 && Ue(
806
+ o,
784
807
  "altcha-hidden",
785
808
  /*state*/
786
- d[5] === b.VERIFYING
787
- ), U === (U = q(d)) && p ? p.p(d, A) : (p.d(1), p = U(d), p && (p.c(), p.m(a, null))), /*hidelogo*/
788
- d[2] !== !0 ? E ? E.p(d, A) : (E = Ne(d), E.c(), E.m(t, null)) : E && (E.d(1), E = null), /*error*/
789
- d[8] || /*state*/
790
- d[5] === b.EXPIRED ? g ? g.p(d, A) : (g = Se(d), g.c(), g.m(e, V)) : g && (g.d(1), g = null), /*_strings*/
791
- d[9].footer && /*hidefooter*/
792
- d[1] !== !0 ? _ ? _.p(d, A) : (_ = De(d), _.c(), _.m(e, null)) : _ && (_.d(1), _ = null), A[0] & /*state*/
793
- 32 && c(
809
+ d[6] === b.VERIFYING
810
+ ), Y === (Y = Q(d)) && S ? S.p(d, y) : (S.d(1), S = Y(d), S && (S.c(), S.m(h, null))), /*hidelogo*/
811
+ d[3] !== !0 ? L ? L.p(d, y) : (L = Ye(d), L.c(), L.m(t, null)) : L && (L.d(1), L = null), /*error*/
812
+ d[10] || /*state*/
813
+ d[6] === b.EXPIRED ? I ? I.p(d, y) : (I = Ge(d), I.c(), I.m(e, F)) : I && (I.d(1), I = null), /*_strings*/
814
+ d[11].footer && /*hidefooter*/
815
+ d[2] !== !0 ? _ ? _.p(d, y) : (_ = We(d), _.c(), _.m(e, E)) : _ && (_.d(1), _ = null), /*floating*/
816
+ d[1] ? A ? A.p(d, y) : (A = Xe(d), A.c(), A.m(e, null)) : A && (A.d(1), A = null), y[0] & /*state*/
817
+ 64 && f(
794
818
  e,
795
819
  "data-state",
796
820
  /*state*/
797
- d[5]
821
+ d[6]
822
+ ), y[0] & /*floating*/
823
+ 2 && f(
824
+ e,
825
+ "data-floating",
826
+ /*floating*/
827
+ d[1]
798
828
  );
799
829
  },
800
- i: ee,
801
- o: ee,
830
+ i: re,
831
+ o: re,
802
832
  d(d) {
803
- d && M(e), k && k.d(), p.d(), E && E.d(), g && g.d(), _ && _.d(), r[31](null), O = !1, re(F);
833
+ d && N(e), M && M.d(), S.d(), L && L.d(), I && I.d(), _ && _.d(), A && A.d(), n[37](null), O = !1, se(X);
804
834
  }
805
835
  };
806
836
  }
807
- const Ve = "Visit Altcha.org", qe = "https://altcha.org/";
808
- function Oe(r) {
809
- return JSON.parse(r);
837
+ const Je = "Visit Altcha.org", it = "https://altcha.org/";
838
+ function ze(n) {
839
+ return JSON.parse(n);
810
840
  }
811
- function Dt() {
841
+ function Jt() {
812
842
  try {
813
843
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
814
844
  } catch {
815
845
  }
816
846
  }
817
- function Vt(r, e, t) {
818
- var xe, Ce;
819
- let i, l, o, { auto: s = void 0 } = e, { blockspam: u = void 0 } = e, { challengeurl: f = void 0 } = e, { challengejson: a = void 0 } = e, { debug: N = !1 } = e, { expire: C = void 0 } = e, { hidefooter: V = !1 } = e, { hidelogo: O = !1 } = e, { name: F = "altcha" } = e, { maxnumber: k = 1e6 } = e, { mockerror: q = !1 } = e, { refetchonexpire: U = !0 } = e, { spamfilter: p = !1 } = e, { strings: E = void 0 } = e, { test: g = !1 } = e, { verifyurl: _ = void 0 } = e, { workers: d = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: A = void 0 } = e;
820
- const ce = dt(), be = ["SHA-256", "SHA-384", "SHA-512"], _e = (Ce = (xe = document.documentElement.lang) == null ? void 0 : xe.split("-")) == null ? void 0 : Ce[0];
821
- let Z = !1, ne, m = null, fe = null, G = null, P = b.UNVERIFIED, H = null;
822
- ht(() => {
823
- m && (m.removeEventListener("submit", ye), m.removeEventListener("reset", ve), m.removeEventListener("focusin", we), m = null), H && (clearTimeout(H), H = null);
824
- }), at(() => {
825
- L("mounted", "0.5.1"), L("workers", d), g && L("using test mode"), C && ie(C), s !== void 0 && L("auto", s), m = ne.closest("form"), m && (m.addEventListener("submit", ye), m.addEventListener("reset", ve), s === "onfocus" && m.addEventListener("focusin", we)), s === "onload" && X();
847
+ function zt(n, e, t) {
848
+ var Ve, Pe;
849
+ let i, o, l, { auto: s = void 0 } = e, { blockspam: a = void 0 } = e, { challengeurl: c = void 0 } = e, { challengejson: h = void 0 } = e, { debug: H = !1 } = e, { delay: T = 0 } = e, { expire: F = void 0 } = e, { floating: E = void 0 } = e, { floatinganchor: O = void 0 } = e, { floatingoffset: X = void 0 } = e, { hidefooter: M = !1 } = e, { hidelogo: Q = !1 } = e, { name: Y = "altcha" } = e, { maxnumber: S = 1e6 } = e, { mockerror: L = !1 } = e, { refetchonexpire: I = !0 } = e, { spamfilter: _ = !1 } = e, { strings: A = void 0 } = e, { test: d = !1 } = e, { verifyurl: y = void 0 } = e, { workers: ie = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ge = void 0 } = e;
850
+ const me = It(), pe = ["SHA-256", "SHA-384", "SHA-512"], xe = (Pe = (Ve = document.documentElement.lang) == null ? void 0 : Ve.split("-")) == null ? void 0 : Pe[0];
851
+ let G = !1, x, J = null, fe = null, m = null, be = null, z = null, j = b.UNVERIFIED, U = null;
852
+ Lt(() => {
853
+ m && (m.removeEventListener("submit", Le), m.removeEventListener("reset", Ie), m.removeEventListener("focusin", Ce), m = null), U && (clearTimeout(U), U = null), document.removeEventListener("click", Me), document.removeEventListener("scroll", Te), window.removeEventListener("resize", De);
854
+ }), Ct(() => {
855
+ C("mounted", "0.6.0"), C("workers", ie), d && C("using test mode"), F && ce(F), s !== void 0 && C("auto", s), E !== void 0 && Ne(E), m = x.closest("form"), m && (m.addEventListener("submit", Le, { capture: !0 }), m.addEventListener("reset", Ie), s === "onfocus" && m.addEventListener("focusin", Ce)), s === "onload" && K();
826
856
  });
827
- function L(...n) {
828
- (N || n.some((h) => h instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", ...n);
857
+ function C(...r) {
858
+ (H || r.some((u) => u instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", ...r);
829
859
  }
830
- function we(n) {
831
- P === b.UNVERIFIED && X();
860
+ function Ce(r) {
861
+ j === b.UNVERIFIED && K();
832
862
  }
833
- function ye(n) {
834
- m && s === "onsubmit" && P === b.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), X().then(() => {
863
+ function Le(r) {
864
+ m && s === "onsubmit" && (j === b.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), K().then(() => {
835
865
  m == null || m.requestSubmit();
836
- }));
866
+ })) : j !== b.VERIFIED && (r.preventDefault(), r.stopPropagation(), j === b.VERIFYING && Se()));
837
867
  }
838
- function ve() {
839
- le();
868
+ function Ie() {
869
+ ue();
840
870
  }
841
- function ke(n, h) {
871
+ function Ae(r, u) {
842
872
  return btoa(JSON.stringify({
843
- algorithm: n.algorithm,
844
- challenge: n.challenge,
845
- number: h.number,
846
- salt: n.salt,
847
- signature: n.signature,
848
- test: g ? !0 : void 0,
849
- took: h.took
873
+ algorithm: r.algorithm,
874
+ challenge: r.challenge,
875
+ number: u.number,
876
+ salt: r.salt,
877
+ signature: r.signature,
878
+ test: d ? !0 : void 0,
879
+ took: u.took
850
880
  }));
851
881
  }
852
- function pe(n) {
853
- if (!n.algorithm)
882
+ function Re(r) {
883
+ if (!r.algorithm)
854
884
  throw new Error("Invalid challenge. Property algorithm is missing.");
855
- if (n.signature === void 0)
885
+ if (r.signature === void 0)
856
886
  throw new Error("Invalid challenge. Property signature is missing.");
857
- if (!be.includes(n.algorithm.toUpperCase()))
858
- throw new Error(`Unknown algorithm value. Allowed values: ${be.join(", ")}`);
859
- if (!n.challenge || n.challenge.length < 40)
887
+ if (!pe.includes(r.algorithm.toUpperCase()))
888
+ throw new Error(`Unknown algorithm value. Allowed values: ${pe.join(", ")}`);
889
+ if (!r.challenge || r.challenge.length < 40)
860
890
  throw new Error("Challenge is too short. Min. 40 chars.");
861
- if (!n.salt || n.salt.length < 10)
891
+ if (!r.salt || r.salt.length < 10)
862
892
  throw new Error("Salt is too short. Min. 10 chars.");
863
893
  }
864
- async function Ge() {
865
- var n;
866
- if (q)
867
- throw L("mocking error"), new Error("Mocked error.");
894
+ async function ot() {
895
+ var r;
896
+ if (L)
897
+ throw C("mocking error"), new Error("Mocked error.");
868
898
  if (i)
869
- return L("using provided json data"), i;
870
- if (g)
871
- return L("generating test challenge", { test: g }), It(typeof g != "boolean" ? +g : void 0);
899
+ return C("using provided json data"), i;
900
+ if (d)
901
+ return C("generating test challenge", { test: d }), Bt(typeof d != "boolean" ? +d : void 0);
872
902
  {
873
- if (!f)
903
+ if (!c)
874
904
  throw new Error("Attribute challengeurl not set.");
875
- L("fetching challenge from", f);
876
- const h = await fetch(f, {
905
+ C("fetching challenge from", c);
906
+ const u = await fetch(c, {
877
907
  headers: {
878
- "x-altcha-spam-filter": p ? "1" : "0"
908
+ "x-altcha-spam-filter": _ ? "1" : "0"
879
909
  }
880
910
  });
881
- if (h.status !== 200)
882
- throw new Error(`Server responded with ${h.status}.`);
883
- const w = h.headers.get("Expires"), R = h.headers.get("X-Altcha-Config"), T = await h.json(), S = new URLSearchParams((n = T.salt.split("?")) == null ? void 0 : n[1]), Y = S.get("expires") || S.get("expire");
884
- if (Y) {
885
- const $ = new Date(+Y * 1e3), x = isNaN($.getTime()) ? 0 : $.getTime() - Date.now();
886
- x > 0 && ie(x);
911
+ if (u.status !== 200)
912
+ throw new Error(`Server responded with ${u.status}.`);
913
+ const g = u.headers.get("Expires"), R = u.headers.get("X-Altcha-Config"), D = await u.json(), V = new URLSearchParams((r = D.salt.split("?")) == null ? void 0 : r[1]), q = V.get("expires") || V.get("expire");
914
+ if (q) {
915
+ const k = new Date(+q * 1e3), v = isNaN(k.getTime()) ? 0 : k.getTime() - Date.now();
916
+ v > 0 && ce(v);
887
917
  }
888
918
  if (R)
889
919
  try {
890
- const $ = JSON.parse(R);
891
- $ && typeof $ == "object" && ($.verifyurl && ($.verifyurl = new URL($.verifyurl, new URL(f)).toString()), $e($));
892
- } catch ($) {
893
- L("unable to configure from X-Altcha-Config", $);
920
+ const k = JSON.parse(R);
921
+ k && typeof k == "object" && (k.verifyurl && (k.verifyurl = new URL(k.verifyurl, new URL(c)).toString()), je(k));
922
+ } catch (k) {
923
+ C("unable to configure from X-Altcha-Config", k);
894
924
  }
895
- if (!C && (w != null && w.length)) {
896
- const $ = Date.parse(w);
897
- if ($) {
898
- const x = $ - Date.now();
899
- x > 0 && ie(x);
925
+ if (!F && (g != null && g.length)) {
926
+ const k = Date.parse(g);
927
+ if (k) {
928
+ const v = k - Date.now();
929
+ v > 0 && ce(v);
900
930
  }
901
931
  }
902
- return T;
932
+ return D;
903
933
  }
904
934
  }
905
- function Ee() {
906
- f && U && P === b.VERIFIED ? X() : le(b.EXPIRED, o.expired);
935
+ function $e() {
936
+ c && I && j === b.VERIFIED ? K() : ue(b.EXPIRED, l.expired);
907
937
  }
908
- async function Xe(n) {
909
- let h = null;
938
+ async function lt(r) {
939
+ let u = null;
910
940
  if ("Worker" in window) {
911
941
  try {
912
- h = await Ye(n.challenge, n.salt, n.algorithm, n.maxnumber);
913
- } catch (w) {
914
- L(w);
942
+ u = await st(r.challenge, r.salt, r.algorithm, r.maxnumber);
943
+ } catch (g) {
944
+ C(g);
915
945
  }
916
- if ((h == null ? void 0 : h.number) !== void 0)
917
- return { data: n, solution: h };
946
+ if ((u == null ? void 0 : u.number) !== void 0)
947
+ return { data: r, solution: u };
918
948
  }
919
949
  return {
920
- data: n,
921
- solution: await At(n.challenge, n.salt, n.algorithm, n.maxnumber || k).promise
950
+ data: r,
951
+ solution: await Ut(r.challenge, r.salt, r.algorithm, r.maxnumber || S).promise
922
952
  };
923
953
  }
924
- async function Ye(n, h, w, R = typeof g == "number" ? g : k, T = Math.ceil(d)) {
925
- const S = [];
926
- if (T < 1)
954
+ async function st(r, u, g, R = typeof d == "number" ? d : S, D = Math.ceil(ie)) {
955
+ const V = [];
956
+ if (D < 1)
927
957
  throw new Error("Wrong number of workers configured.");
928
- if (T > 16)
958
+ if (D > 16)
929
959
  throw new Error("Too many workers. Max. 16 allowed workers.");
930
- for (let x = 0; x < T; x++)
931
- S.push(createAltchaWorker(A));
932
- const Y = Math.ceil(R / T), $ = await Promise.all(S.map((x, oe) => {
933
- const Le = oe * Y;
934
- return new Promise((rt) => {
935
- x.addEventListener("message", (Ie) => {
936
- if (Ie.data)
937
- for (const Ae of S)
938
- Ae !== x && Ae.postMessage({ type: "abort" });
939
- rt(Ie.data);
940
- }), x.postMessage({
960
+ for (let v = 0; v < D; v++)
961
+ V.push(createAltchaWorker(ge));
962
+ const q = Math.ceil(R / D), k = await Promise.all(V.map((v, ae) => {
963
+ const Fe = ae * q;
964
+ return new Promise((bt) => {
965
+ v.addEventListener("message", (He) => {
966
+ if (He.data)
967
+ for (const Oe of V)
968
+ Oe !== v && Oe.postMessage({ type: "abort" });
969
+ bt(He.data);
970
+ }), v.postMessage({
941
971
  payload: {
942
- alg: w,
943
- challenge: n,
944
- max: Le + Y,
945
- salt: h,
946
- start: Le
972
+ alg: g,
973
+ challenge: r,
974
+ max: Fe + q,
975
+ salt: u,
976
+ start: Fe
947
977
  },
948
978
  type: "work"
949
979
  });
950
980
  });
951
981
  }));
952
- for (const x of S)
953
- x.terminate();
954
- return $.find((x) => !!x) || null;
982
+ for (const v of V)
983
+ v.terminate();
984
+ return k.find((v) => !!v) || null;
985
+ }
986
+ function ft() {
987
+ [b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(j) ? _ && (m == null ? void 0 : m.reportValidity()) === !1 ? t(7, G = !1) : K() : t(7, G = !0);
988
+ }
989
+ function Me(r) {
990
+ const u = r.target;
991
+ E && u && !x.contains(u) && j === b.VERIFIED && t(8, x.style.display = "none", x);
955
992
  }
956
- function Je() {
957
- [b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(P) ? p && (m == null ? void 0 : m.reportValidity()) === !1 ? t(6, Z = !1) : X() : t(6, Z = !0);
993
+ function Te() {
994
+ E && we();
958
995
  }
959
- function We() {
960
- P === b.VERIFYING && alert(o.waitAlert);
996
+ function Se() {
997
+ j === b.VERIFYING && alert(l.waitAlert);
961
998
  }
962
- function ie(n) {
963
- L("expire", n), H && (clearTimeout(H), H = null), n < 1 ? Ee() : H = setTimeout(Ee, n);
999
+ function ct(r) {
1000
+ E && j !== b.UNVERIFIED && requestAnimationFrame(() => {
1001
+ we();
1002
+ });
1003
+ }
1004
+ function De() {
1005
+ E && we();
1006
+ }
1007
+ function ce(r) {
1008
+ C("expire", r), U && (clearTimeout(U), U = null), r < 1 ? $e() : U = setTimeout($e, r);
964
1009
  }
965
- function ze(n) {
966
- var w;
967
- const h = m == null ? void 0 : m.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
968
- return ((w = h == null ? void 0 : h.value) == null ? void 0 : w.slice(h.value.indexOf("@"))) || void 0;
1010
+ function Ne(r) {
1011
+ C("floating", r), E !== r && (t(8, x.style.left = "", x), t(8, x.style.top = "", x)), t(1, E = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : E), E ? (s || t(0, s = "onsubmit"), document.addEventListener("scroll", Te), document.addEventListener("click", Me), window.addEventListener("resize", De)) : s === "onsubmit" && t(0, s = void 0);
969
1012
  }
970
- function Ke(n) {
1013
+ function ut(r) {
1014
+ var g;
1015
+ const u = m == null ? void 0 : m.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
1016
+ return ((g = u == null ? void 0 : u.value) == null ? void 0 : g.slice(u.value.indexOf("@"))) || void 0;
1017
+ }
1018
+ function at(r) {
971
1019
  return [
972
- ...(m == null ? void 0 : m.querySelectorAll(n != null && n.length ? n.map((w) => `input[name="${w}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
1020
+ ...(m == null ? void 0 : m.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
973
1021
  ].reduce(
974
- (w, R) => {
975
- const T = R.name, S = R.value.trim();
976
- return T && S && (w[T] = S), w;
1022
+ (g, R) => {
1023
+ const D = R.name, V = R.value.trim();
1024
+ return D && V && (g[D] = V), g;
977
1025
  },
978
1026
  {}
979
1027
  );
980
1028
  }
981
- async function Qe(n) {
982
- if (!_)
1029
+ async function ht(r) {
1030
+ if (!y)
983
1031
  throw new Error("Attribute verifyurl not set.");
984
- L("requesting server verification from", _);
985
- const h = { payload: n };
986
- if (p) {
987
- const { email: T, expectedLanguages: S, expectedCountries: Y, fields: $, ipAddress: x, timeZone: oe } = typeof p == "object" ? p : {
1032
+ C("requesting server verification from", y);
1033
+ const u = { payload: r };
1034
+ if (_) {
1035
+ const { email: D, expectedLanguages: V, expectedCountries: q, fields: k, ipAddress: v, timeZone: ae } = typeof _ == "object" ? _ : {
988
1036
  email: void 0,
989
1037
  expectedCountries: void 0,
990
1038
  expectedLanguages: void 0,
@@ -992,257 +1040,308 @@ function Vt(r, e, t) {
992
1040
  ipAddress: void 0,
993
1041
  timeZone: void 0
994
1042
  };
995
- h.ipAddress = x === !1 ? void 0 : x || "auto", h.email = T === !1 ? void 0 : ze(T), h.fields = $ === !1 ? void 0 : Ke($), h.timeZone = oe === !1 ? void 0 : oe || Dt(), h.expectedCountries = Y, h.expectedLanguages = S || (_e ? [_e] : void 0);
1043
+ u.ipAddress = v === !1 ? void 0 : v || "auto", u.email = D === !1 ? void 0 : ut(D), u.fields = k === !1 ? void 0 : at(k), u.timeZone = ae === !1 ? void 0 : ae || Jt(), u.expectedCountries = q, u.expectedLanguages = V || (xe ? [xe] : void 0);
996
1044
  }
997
- const w = await fetch(_, {
998
- body: JSON.stringify(h),
1045
+ const g = await fetch(y, {
1046
+ body: JSON.stringify(u),
999
1047
  headers: { "content-type": "application/json" },
1000
1048
  method: "POST"
1001
1049
  });
1002
- if (w.status !== 200)
1003
- throw new Error(`Server responded with ${w.status}.`);
1004
- const R = await w.json();
1005
- if (R != null && R.payload && t(4, G = R.payload), ce("serververification", R), u && R.classification === "BAD")
1050
+ if (g.status !== 200)
1051
+ throw new Error(`Server responded with ${g.status}.`);
1052
+ const R = await g.json();
1053
+ if (R != null && R.payload && t(5, z = R.payload), me("serververification", R), a && R.classification === "BAD")
1006
1054
  throw new Error("SpamFilter returned negative classification.");
1007
1055
  }
1008
- function $e(n) {
1009
- n.auto !== void 0 && (t(0, s = n.auto), s === "onload" && X()), n.expire !== void 0 && (ie(n.expire), t(14, C = n.expire)), n.challenge && (pe(n.challenge), i = n.challenge), n.challengeurl !== void 0 && t(12, f = n.challengeurl), n.debug !== void 0 && t(13, N = !!n.debug), n.hidefooter !== void 0 && t(1, V = !!n.hidefooter), n.hidelogo !== void 0 && t(2, O = !!n.hidelogo), n.maxnumber !== void 0 && t(15, k = +n.maxnumber), n.mockerror !== void 0 && t(16, q = !!n.mockerror), n.name !== void 0 && t(3, F = n.name), n.refetchonexpire !== void 0 && t(17, U = !!n.refetchonexpire), n.spamfilter !== void 0 && t(18, p = typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && t(29, l = n.strings), n.test !== void 0 && t(19, g = typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && t(20, _ = n.verifyurl), n.workers !== void 0 && t(21, d = +n.workers);
1056
+ function we(r = 20) {
1057
+ if (x)
1058
+ if (fe || (fe = (O ? document.querySelector(O) : m == null ? void 0 : m.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || m), fe) {
1059
+ const u = parseInt(X, 10) || 12, g = fe.getBoundingClientRect(), R = x.getBoundingClientRect(), D = document.documentElement.clientHeight, V = document.documentElement.clientWidth, q = E === "auto" ? g.bottom + R.height + u + r > D : E === "top", k = Math.max(r, Math.min(V - r - R.width, g.left + g.width / 2 - R.width / 2));
1060
+ if (q ? t(8, x.style.top = `${g.top - (R.height + u)}px`, x) : t(8, x.style.top = `${g.bottom + u}px`, x), t(8, x.style.left = `${k}px`, x), x.setAttribute("data-floating", q ? "top" : "bottom"), J) {
1061
+ const v = J.getBoundingClientRect();
1062
+ t(9, J.style.left = g.left - k + g.width / 2 - v.width / 2 + "px", J);
1063
+ }
1064
+ } else
1065
+ C("unable to find floating anchor element");
1066
+ }
1067
+ function je(r) {
1068
+ r.auto !== void 0 && (t(0, s = r.auto), s === "onload" && K()), r.floatinganchor !== void 0 && t(18, O = r.floatinganchor), r.delay !== void 0 && t(16, T = r.delay), r.floatingoffset !== void 0 && t(19, X = r.floatingoffset), r.floating !== void 0 && Ne(r.floating), r.expire !== void 0 && (ce(r.expire), t(17, F = r.expire)), r.challenge && (Re(r.challenge), i = r.challenge), r.challengeurl !== void 0 && t(14, c = r.challengeurl), r.debug !== void 0 && t(15, H = !!r.debug), r.hidefooter !== void 0 && t(2, M = !!r.hidefooter), r.hidelogo !== void 0 && t(3, Q = !!r.hidelogo), r.maxnumber !== void 0 && t(20, S = +r.maxnumber), r.mockerror !== void 0 && t(21, L = !!r.mockerror), r.name !== void 0 && t(4, Y = r.name), r.refetchonexpire !== void 0 && t(22, I = !!r.refetchonexpire), r.spamfilter !== void 0 && t(23, _ = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(34, o = r.strings), r.test !== void 0 && t(24, d = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(25, y = r.verifyurl), r.workers !== void 0 && t(26, ie = +r.workers);
1010
1069
  }
1011
- function le(n = b.UNVERIFIED, h = null) {
1012
- H && (clearTimeout(H), H = null), t(6, Z = !1), t(8, fe = h), t(4, G = null), t(5, P = n);
1070
+ function ue(r = b.UNVERIFIED, u = null) {
1071
+ U && (clearTimeout(U), U = null), t(7, G = !1), t(10, be = u), t(5, z = null), t(6, j = r);
1013
1072
  }
1014
- async function X() {
1015
- return le(b.VERIFYING), Ge().then((n) => (pe(n), L("challenge", n), Xe(n))).then(({ data: n, solution: h }) => {
1016
- if (L("solution", h), (h == null ? void 0 : h.number) !== void 0) {
1017
- if (_)
1018
- return Qe(ke(n, h));
1019
- t(4, G = ke(n, h)), L("payload", G);
1073
+ async function K() {
1074
+ return ue(b.VERIFYING), await new Promise((r) => setTimeout(r, T || 0)), ot().then((r) => (Re(r), C("challenge", r), lt(r))).then(({ data: r, solution: u }) => {
1075
+ if (C("solution", u), (u == null ? void 0 : u.number) !== void 0) {
1076
+ if (y)
1077
+ return ht(Ae(r, u));
1078
+ t(5, z = Ae(r, u)), C("payload", z);
1020
1079
  } else
1021
- throw L("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
1080
+ throw C("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
1022
1081
  }).then(() => {
1023
- gt().then(() => {
1024
- t(5, P = b.VERIFIED), t(6, Z = !0), L("verified"), ce("verified", { payload: G });
1082
+ At().then(() => {
1083
+ t(6, j = b.VERIFIED), t(7, G = !0), C("verified"), me("verified", { payload: z });
1025
1084
  });
1026
- }).catch((n) => {
1027
- L(n), t(5, P = b.ERROR), t(6, Z = !1), t(8, fe = n.message);
1085
+ }).catch((r) => {
1086
+ C(r), t(6, j = b.ERROR), t(7, G = !1), t(10, be = r.message);
1028
1087
  });
1029
1088
  }
1030
- function et() {
1031
- Z = this.checked, t(6, Z);
1089
+ function dt() {
1090
+ G = this.checked, t(7, G);
1091
+ }
1092
+ function gt(r) {
1093
+ de[r ? "unshift" : "push"](() => {
1094
+ J = r, t(9, J);
1095
+ });
1032
1096
  }
1033
- function tt(n) {
1034
- he[n ? "unshift" : "push"](() => {
1035
- ne = n, t(7, ne);
1097
+ function mt(r) {
1098
+ de[r ? "unshift" : "push"](() => {
1099
+ x = r, t(8, x);
1036
1100
  });
1037
1101
  }
1038
- return r.$$set = (n) => {
1039
- "auto" in n && t(0, s = n.auto), "blockspam" in n && t(22, u = n.blockspam), "challengeurl" in n && t(12, f = n.challengeurl), "challengejson" in n && t(23, a = n.challengejson), "debug" in n && t(13, N = n.debug), "expire" in n && t(14, C = n.expire), "hidefooter" in n && t(1, V = n.hidefooter), "hidelogo" in n && t(2, O = n.hidelogo), "name" in n && t(3, F = n.name), "maxnumber" in n && t(15, k = n.maxnumber), "mockerror" in n && t(16, q = n.mockerror), "refetchonexpire" in n && t(17, U = n.refetchonexpire), "spamfilter" in n && t(18, p = n.spamfilter), "strings" in n && t(24, E = n.strings), "test" in n && t(19, g = n.test), "verifyurl" in n && t(20, _ = n.verifyurl), "workers" in n && t(21, d = n.workers), "workerurl" in n && t(25, A = n.workerurl);
1040
- }, r.$$.update = () => {
1041
- r.$$.dirty[0] & /*challengejson*/
1042
- 8388608 && (i = a ? Oe(a) : void 0), r.$$.dirty[0] & /*strings*/
1043
- 16777216 && t(29, l = E ? Oe(E) : {}), r.$$.dirty[0] & /*parsedStrings*/
1044
- 536870912 && t(9, o = {
1045
- ariaLinkLabel: Ve,
1102
+ return n.$$set = (r) => {
1103
+ "auto" in r && t(0, s = r.auto), "blockspam" in r && t(27, a = r.blockspam), "challengeurl" in r && t(14, c = r.challengeurl), "challengejson" in r && t(28, h = r.challengejson), "debug" in r && t(15, H = r.debug), "delay" in r && t(16, T = r.delay), "expire" in r && t(17, F = r.expire), "floating" in r && t(1, E = r.floating), "floatinganchor" in r && t(18, O = r.floatinganchor), "floatingoffset" in r && t(19, X = r.floatingoffset), "hidefooter" in r && t(2, M = r.hidefooter), "hidelogo" in r && t(3, Q = r.hidelogo), "name" in r && t(4, Y = r.name), "maxnumber" in r && t(20, S = r.maxnumber), "mockerror" in r && t(21, L = r.mockerror), "refetchonexpire" in r && t(22, I = r.refetchonexpire), "spamfilter" in r && t(23, _ = r.spamfilter), "strings" in r && t(29, A = r.strings), "test" in r && t(24, d = r.test), "verifyurl" in r && t(25, y = r.verifyurl), "workers" in r && t(26, ie = r.workers), "workerurl" in r && t(30, ge = r.workerurl);
1104
+ }, n.$$.update = () => {
1105
+ n.$$.dirty[0] & /*challengejson*/
1106
+ 268435456 && (i = h ? ze(h) : void 0), n.$$.dirty[0] & /*strings*/
1107
+ 536870912 && t(34, o = A ? ze(A) : {}), n.$$.dirty[1] & /*parsedStrings*/
1108
+ 8 && t(11, l = {
1109
+ ariaLinkLabel: Je,
1046
1110
  error: "Verification failed. Try again later.",
1047
1111
  expired: "Verification expired. Try again.",
1048
- footer: `Protected by <a href="${qe}" target="_blank" aria-label="${l.ariaLinkLabel || Ve}">ALTCHA</a>`,
1112
+ footer: `Protected by <a href="${it}" target="_blank" aria-label="${o.ariaLinkLabel || Je}">ALTCHA</a>`,
1049
1113
  label: "I'm not a robot",
1050
1114
  verified: "Verified",
1051
1115
  verifying: "Verifying...",
1052
1116
  waitAlert: "Verifying... please wait.",
1053
- ...l
1054
- }), r.$$.dirty[0] & /*payload, state*/
1055
- 48 && ce("statechange", { payload: G, state: P });
1117
+ ...o
1118
+ }), n.$$.dirty[0] & /*payload, state*/
1119
+ 96 && me("statechange", { payload: z, state: j }), n.$$.dirty[0] & /*state*/
1120
+ 64 && ct();
1056
1121
  }, [
1057
1122
  s,
1058
- V,
1059
- O,
1060
- F,
1123
+ E,
1124
+ M,
1125
+ Q,
1126
+ Y,
1127
+ z,
1128
+ j,
1061
1129
  G,
1062
- P,
1063
- Z,
1064
- ne,
1065
- fe,
1066
- o,
1067
- Je,
1068
- We,
1069
- f,
1070
- N,
1071
- C,
1072
- k,
1073
- q,
1074
- U,
1075
- p,
1076
- g,
1130
+ x,
1131
+ J,
1132
+ be,
1133
+ l,
1134
+ ft,
1135
+ Se,
1136
+ c,
1137
+ H,
1138
+ T,
1139
+ F,
1140
+ O,
1141
+ X,
1142
+ S,
1143
+ L,
1144
+ I,
1077
1145
  _,
1078
1146
  d,
1079
- u,
1147
+ y,
1148
+ ie,
1080
1149
  a,
1081
- E,
1150
+ h,
1082
1151
  A,
1083
- $e,
1084
- le,
1085
- X,
1086
- l,
1087
- et,
1088
- tt
1152
+ ge,
1153
+ je,
1154
+ ue,
1155
+ K,
1156
+ o,
1157
+ dt,
1158
+ gt,
1159
+ mt
1089
1160
  ];
1090
1161
  }
1091
- class Ot extends $t {
1162
+ class Kt extends Pt {
1092
1163
  constructor(e) {
1093
- super(), pt(
1164
+ super(), jt(
1094
1165
  this,
1095
1166
  e,
1096
- Vt,
1097
- St,
1098
- lt,
1167
+ zt,
1168
+ Xt,
1169
+ yt,
1099
1170
  {
1100
1171
  auto: 0,
1101
- blockspam: 22,
1102
- challengeurl: 12,
1103
- challengejson: 23,
1104
- debug: 13,
1105
- expire: 14,
1106
- hidefooter: 1,
1107
- hidelogo: 2,
1108
- name: 3,
1109
- maxnumber: 15,
1110
- mockerror: 16,
1111
- refetchonexpire: 17,
1112
- spamfilter: 18,
1113
- strings: 24,
1114
- test: 19,
1115
- verifyurl: 20,
1116
- workers: 21,
1117
- workerurl: 25,
1118
- configure: 26,
1119
- reset: 27,
1120
- verify: 28
1172
+ blockspam: 27,
1173
+ challengeurl: 14,
1174
+ challengejson: 28,
1175
+ debug: 15,
1176
+ delay: 16,
1177
+ expire: 17,
1178
+ floating: 1,
1179
+ floatinganchor: 18,
1180
+ floatingoffset: 19,
1181
+ hidefooter: 2,
1182
+ hidelogo: 3,
1183
+ name: 4,
1184
+ maxnumber: 20,
1185
+ mockerror: 21,
1186
+ refetchonexpire: 22,
1187
+ spamfilter: 23,
1188
+ strings: 29,
1189
+ test: 24,
1190
+ verifyurl: 25,
1191
+ workers: 26,
1192
+ workerurl: 30,
1193
+ configure: 31,
1194
+ reset: 32,
1195
+ verify: 33
1121
1196
  },
1122
1197
  null,
1123
- [-1, -1]
1198
+ [-1, -1, -1]
1124
1199
  );
1125
1200
  }
1126
1201
  get auto() {
1127
1202
  return this.$$.ctx[0];
1128
1203
  }
1129
1204
  set auto(e) {
1130
- this.$$set({ auto: e }), y();
1205
+ this.$$set({ auto: e }), w();
1131
1206
  }
1132
1207
  get blockspam() {
1133
- return this.$$.ctx[22];
1208
+ return this.$$.ctx[27];
1134
1209
  }
1135
1210
  set blockspam(e) {
1136
- this.$$set({ blockspam: e }), y();
1211
+ this.$$set({ blockspam: e }), w();
1137
1212
  }
1138
1213
  get challengeurl() {
1139
- return this.$$.ctx[12];
1214
+ return this.$$.ctx[14];
1140
1215
  }
1141
1216
  set challengeurl(e) {
1142
- this.$$set({ challengeurl: e }), y();
1217
+ this.$$set({ challengeurl: e }), w();
1143
1218
  }
1144
1219
  get challengejson() {
1145
- return this.$$.ctx[23];
1220
+ return this.$$.ctx[28];
1146
1221
  }
1147
1222
  set challengejson(e) {
1148
- this.$$set({ challengejson: e }), y();
1223
+ this.$$set({ challengejson: e }), w();
1149
1224
  }
1150
1225
  get debug() {
1151
- return this.$$.ctx[13];
1226
+ return this.$$.ctx[15];
1152
1227
  }
1153
1228
  set debug(e) {
1154
- this.$$set({ debug: e }), y();
1229
+ this.$$set({ debug: e }), w();
1230
+ }
1231
+ get delay() {
1232
+ return this.$$.ctx[16];
1233
+ }
1234
+ set delay(e) {
1235
+ this.$$set({ delay: e }), w();
1155
1236
  }
1156
1237
  get expire() {
1157
- return this.$$.ctx[14];
1238
+ return this.$$.ctx[17];
1158
1239
  }
1159
1240
  set expire(e) {
1160
- this.$$set({ expire: e }), y();
1241
+ this.$$set({ expire: e }), w();
1161
1242
  }
1162
- get hidefooter() {
1243
+ get floating() {
1163
1244
  return this.$$.ctx[1];
1164
1245
  }
1246
+ set floating(e) {
1247
+ this.$$set({ floating: e }), w();
1248
+ }
1249
+ get floatinganchor() {
1250
+ return this.$$.ctx[18];
1251
+ }
1252
+ set floatinganchor(e) {
1253
+ this.$$set({ floatinganchor: e }), w();
1254
+ }
1255
+ get floatingoffset() {
1256
+ return this.$$.ctx[19];
1257
+ }
1258
+ set floatingoffset(e) {
1259
+ this.$$set({ floatingoffset: e }), w();
1260
+ }
1261
+ get hidefooter() {
1262
+ return this.$$.ctx[2];
1263
+ }
1165
1264
  set hidefooter(e) {
1166
- this.$$set({ hidefooter: e }), y();
1265
+ this.$$set({ hidefooter: e }), w();
1167
1266
  }
1168
1267
  get hidelogo() {
1169
- return this.$$.ctx[2];
1268
+ return this.$$.ctx[3];
1170
1269
  }
1171
1270
  set hidelogo(e) {
1172
- this.$$set({ hidelogo: e }), y();
1271
+ this.$$set({ hidelogo: e }), w();
1173
1272
  }
1174
1273
  get name() {
1175
- return this.$$.ctx[3];
1274
+ return this.$$.ctx[4];
1176
1275
  }
1177
1276
  set name(e) {
1178
- this.$$set({ name: e }), y();
1277
+ this.$$set({ name: e }), w();
1179
1278
  }
1180
1279
  get maxnumber() {
1181
- return this.$$.ctx[15];
1280
+ return this.$$.ctx[20];
1182
1281
  }
1183
1282
  set maxnumber(e) {
1184
- this.$$set({ maxnumber: e }), y();
1283
+ this.$$set({ maxnumber: e }), w();
1185
1284
  }
1186
1285
  get mockerror() {
1187
- return this.$$.ctx[16];
1286
+ return this.$$.ctx[21];
1188
1287
  }
1189
1288
  set mockerror(e) {
1190
- this.$$set({ mockerror: e }), y();
1289
+ this.$$set({ mockerror: e }), w();
1191
1290
  }
1192
1291
  get refetchonexpire() {
1193
- return this.$$.ctx[17];
1292
+ return this.$$.ctx[22];
1194
1293
  }
1195
1294
  set refetchonexpire(e) {
1196
- this.$$set({ refetchonexpire: e }), y();
1295
+ this.$$set({ refetchonexpire: e }), w();
1197
1296
  }
1198
1297
  get spamfilter() {
1199
- return this.$$.ctx[18];
1298
+ return this.$$.ctx[23];
1200
1299
  }
1201
1300
  set spamfilter(e) {
1202
- this.$$set({ spamfilter: e }), y();
1301
+ this.$$set({ spamfilter: e }), w();
1203
1302
  }
1204
1303
  get strings() {
1205
- return this.$$.ctx[24];
1304
+ return this.$$.ctx[29];
1206
1305
  }
1207
1306
  set strings(e) {
1208
- this.$$set({ strings: e }), y();
1307
+ this.$$set({ strings: e }), w();
1209
1308
  }
1210
1309
  get test() {
1211
- return this.$$.ctx[19];
1310
+ return this.$$.ctx[24];
1212
1311
  }
1213
1312
  set test(e) {
1214
- this.$$set({ test: e }), y();
1313
+ this.$$set({ test: e }), w();
1215
1314
  }
1216
1315
  get verifyurl() {
1217
- return this.$$.ctx[20];
1316
+ return this.$$.ctx[25];
1218
1317
  }
1219
1318
  set verifyurl(e) {
1220
- this.$$set({ verifyurl: e }), y();
1319
+ this.$$set({ verifyurl: e }), w();
1221
1320
  }
1222
1321
  get workers() {
1223
- return this.$$.ctx[21];
1322
+ return this.$$.ctx[26];
1224
1323
  }
1225
1324
  set workers(e) {
1226
- this.$$set({ workers: e }), y();
1325
+ this.$$set({ workers: e }), w();
1227
1326
  }
1228
1327
  get workerurl() {
1229
- return this.$$.ctx[25];
1328
+ return this.$$.ctx[30];
1230
1329
  }
1231
1330
  set workerurl(e) {
1232
- this.$$set({ workerurl: e }), y();
1331
+ this.$$set({ workerurl: e }), w();
1233
1332
  }
1234
1333
  get configure() {
1235
- return this.$$.ctx[26];
1334
+ return this.$$.ctx[31];
1236
1335
  }
1237
1336
  get reset() {
1238
- return this.$$.ctx[27];
1337
+ return this.$$.ctx[32];
1239
1338
  }
1240
1339
  get verify() {
1241
- return this.$$.ctx[28];
1340
+ return this.$$.ctx[33];
1242
1341
  }
1243
1342
  }
1244
- customElements.define("altcha-widget", Et(Ot, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, expire: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, [], ["configure", "reset", "verify"], !1));
1245
- globalThis.createAltchaWorker = (r) => new Worker(new URL(r || "./worker.js", import.meta.url));
1343
+ customElements.define("altcha-widget", Vt(Kt, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, [], ["configure", "reset", "verify"], !1));
1344
+ globalThis.createAltchaWorker = (n) => new Worker(new URL(n || "./worker.js", import.meta.url));
1246
1345
  export {
1247
- Ot as Altcha
1346
+ Kt as Altcha
1248
1347
  };