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