altcha 0.6.5 → 0.6.7

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.
@@ -83,17 +83,17 @@ function At(n) {
83
83
  function Rt() {
84
84
  const n = Ie();
85
85
  return (e, t, { cancelable: i = !1 } = {}) => {
86
- const l = n.$$.callbacks[e];
87
- if (l) {
88
- const o = Ct(
86
+ const o = n.$$.callbacks[e];
87
+ if (o) {
88
+ const l = Ct(
89
89
  /** @type {string} */
90
90
  e,
91
91
  t,
92
92
  { cancelable: i }
93
93
  );
94
- return l.slice().forEach((f) => {
95
- f.call(n, o);
96
- }), !o.defaultPrevented;
94
+ return o.slice().forEach((f) => {
95
+ f.call(n, l);
96
+ }), !l.defaultPrevented;
97
97
  }
98
98
  return !0;
99
99
  };
@@ -153,11 +153,11 @@ function Dt(n, e) {
153
153
  n && n.i && (Tt.delete(n), n.i(e));
154
154
  }
155
155
  function Nt(n, e, t) {
156
- const { fragment: i, after_update: l } = n.$$;
156
+ const { fragment: i, after_update: o } = n.$$;
157
157
  i && i.m(e, t), Le(() => {
158
- const o = n.$$.on_mount.map(et).filter(tt);
159
- n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ue(o), n.$$.on_mount = [];
160
- }), l.forEach(Le);
158
+ const l = n.$$.on_mount.map(et).filter(tt);
159
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : ue(l), n.$$.on_mount = [];
160
+ }), o.forEach(Le);
161
161
  }
162
162
  function jt(n, e) {
163
163
  const t = n.$$;
@@ -166,16 +166,16 @@ function jt(n, e) {
166
166
  function Vt(n, e) {
167
167
  n.$$.dirty[0] === -1 && (ne.push(n), rt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
168
168
  }
169
- function Ft(n, e, t, i, l, o, f = null, c = [-1]) {
169
+ function Ft(n, e, t, i, o, l, f = null, c = [-1]) {
170
170
  const h = ce;
171
171
  fe(n);
172
172
  const u = n.$$ = {
173
173
  fragment: null,
174
174
  ctx: [],
175
175
  // state
176
- props: o,
176
+ props: l,
177
177
  update: ie,
178
- not_equal: l,
178
+ not_equal: o,
179
179
  bound: qe(),
180
180
  // lifecycle
181
181
  on_mount: [],
@@ -194,7 +194,7 @@ function Ft(n, e, t, i, l, o, f = null, c = [-1]) {
194
194
  let H = !1;
195
195
  if (u.ctx = t ? t(n, e.props || {}, (S, B, ...P) => {
196
196
  const k = P.length ? P[0] : B;
197
- return u.ctx && l(u.ctx[S], u.ctx[S] = k) && (!u.skip_bound && u.bound[S] && u.bound[S](k), H && Vt(n, S)), B;
197
+ return u.ctx && o(u.ctx[S], u.ctx[S] = k) && (!u.skip_bound && u.bound[S] && u.bound[S](k), H && Vt(n, S)), B;
198
198
  }) : [], u.update(), H = !0, ue(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
199
199
  if (e.hydrate) {
200
200
  const S = xt(e.target);
@@ -231,25 +231,25 @@ typeof HTMLElement == "function" && (it = class extends HTMLElement {
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 f;
250
250
  return {
251
251
  c: function() {
252
- f = M("slot"), o !== "default" && s(f, "name", o);
252
+ f = M("slot"), l !== "default" && s(f, "name", l);
253
253
  },
254
254
  /**
255
255
  * @param {HTMLElement} target
@@ -267,14 +267,14 @@ typeof HTMLElement == "function" && (it = class extends HTMLElement {
267
267
  if (await Promise.resolve(), !this.$$cn || this.$$c)
268
268
  return;
269
269
  const t = {}, i = Lt(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 f = this.$$g_p(o.name);
274
- f in this.$$d || (this.$$d[f] = _e(f, o.value, this.$$p_d, "toProp"));
270
+ for (const l of this.$$s)
271
+ l in i && (t[l] = [e(l)]);
272
+ for (const l of this.attributes) {
273
+ const f = this.$$g_p(l.name);
274
+ f in this.$$d || (this.$$d[f] = _e(f, 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,24 +285,24 @@ typeof HTMLElement == "function" && (it = 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) {
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
292
  const f = _e(
293
- o,
294
- this.$$d[o],
293
+ l,
294
+ this.$$d[l],
295
295
  this.$$p_d,
296
296
  "toAttribute"
297
297
  );
298
- f == null ? this.removeAttribute(this.$$p_d[o].attribute || o) : this.setAttribute(this.$$p_d[o].attribute || o, f);
298
+ f == null ? this.removeAttribute(this.$$p_d[l].attribute || l) : this.setAttribute(this.$$p_d[l].attribute || l, f);
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 f of this.$$l[o]) {
305
- const c = this.$$c.$on(o, f);
302
+ this.$$c.$$.after_update.push(o), o();
303
+ for (const l in this.$$l)
304
+ for (const f of this.$$l[l]) {
305
+ const c = this.$$c.$on(l, f);
306
306
  this.$$l_u.set(f, c);
307
307
  }
308
308
  this.$$l = {};
@@ -311,12 +311,12 @@ typeof HTMLElement == "function" && (it = 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] = _e(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] = _e(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(() => {
319
- this.$$cn || (this.$$c.$destroy(), this.$$c = void 0);
319
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
320
320
  });
321
321
  }
322
322
  $$g_p(e) {
@@ -326,12 +326,12 @@ typeof HTMLElement == "function" && (it = class extends HTMLElement {
326
326
  }
327
327
  });
328
328
  function _e(n, e, t, i) {
329
- var o;
330
- const l = (o = t[n]) == null ? void 0 : o.type;
331
- if (e = l === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
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 _e(n, 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,10 +355,10 @@ function _e(n, e, t, i) {
355
355
  return e;
356
356
  }
357
357
  }
358
- function Pt(n, e, t, i, l, o) {
358
+ function Pt(n, e, t, i, o, l) {
359
359
  let f = class extends it {
360
360
  constructor() {
361
- super(n, 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(
@@ -383,7 +383,7 @@ function Pt(n, e, t, i, l, o) {
383
383
  return (h = this.$$c) == null ? void 0 : h[c];
384
384
  }
385
385
  });
386
- }), o && (f = o(f)), n.element = /** @type {any} */
386
+ }), n.element = /** @type {any} */
387
387
  f, f;
388
388
  }
389
389
  class Ht {
@@ -420,8 +420,8 @@ class Ht {
420
420
  return ie;
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
  /**
@@ -441,10 +441,10 @@ function Ut(n) {
441
441
  async function qt(n, e = "SHA-256", t = 1e5) {
442
442
  const i = Date.now().toString(16);
443
443
  n || (n = Math.round(Math.random() * t));
444
- const l = await ot(i, n, e);
444
+ const o = await ot(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
  };
@@ -457,12 +457,12 @@ async function ot(n, e, t) {
457
457
  )
458
458
  );
459
459
  }
460
- function Zt(n, e, t = "SHA-256", i = 1e6, l = 0) {
461
- const o = new AbortController(), f = Date.now();
460
+ function Zt(n, e, t = "SHA-256", i = 1e6, o = 0) {
461
+ const l = new AbortController(), f = Date.now();
462
462
  return {
463
463
  promise: (async () => {
464
- for (let h = l; h <= i; h += 1) {
465
- if (o.signal.aborted)
464
+ for (let h = o; h <= i; h += 1) {
465
+ if (l.signal.aborted)
466
466
  return null;
467
467
  if (await ot(e, h, t) === n)
468
468
  return {
@@ -472,7 +472,7 @@ function Zt(n, e, t = "SHA-256", i = 1e6, l = 0) {
472
472
  }
473
473
  return null;
474
474
  })(),
475
- controller: o
475
+ controller: l
476
476
  };
477
477
  }
478
478
  var b = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(b || {});
@@ -482,11 +482,11 @@ function Ge(n) {
482
482
  c() {
483
483
  e = Y("svg"), t = Y("path"), i = Y("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"), s(e, "width", "24"), s(e, "height", "24"), s(e, "viewBox", "0 0 24 24"), s(e, "xmlns", "http://www.w3.org/2000/svg");
484
484
  },
485
- m(l, o) {
486
- F(l, e, o), p(e, t), p(e, i);
485
+ m(o, l) {
486
+ F(o, e, l), p(e, t), p(e, i);
487
487
  },
488
- d(l) {
489
- l && D(e);
488
+ d(o) {
489
+ o && D(e);
490
490
  }
491
491
  };
492
492
  }
@@ -500,18 +500,18 @@ function Yt(n) {
500
500
  e = M("label"), s(e, "for", i = /*name*/
501
501
  n[4] + "_checkbox");
502
502
  },
503
- m(l, o) {
504
- F(l, e, o), e.innerHTML = t;
503
+ m(o, l) {
504
+ F(o, e, l), e.innerHTML = t;
505
505
  },
506
- p(l, o) {
507
- o[0] & /*_strings*/
506
+ p(o, l) {
507
+ l[0] & /*_strings*/
508
508
  2048 && t !== (t = /*_strings*/
509
- l[11].label + "") && (e.innerHTML = t), o[0] & /*name*/
509
+ o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
510
510
  16 && i !== (i = /*name*/
511
- l[4] + "_checkbox") && s(e, "for", i);
511
+ o[4] + "_checkbox") && s(e, "for", i);
512
512
  },
513
- d(l) {
514
- l && D(e);
513
+ d(o) {
514
+ o && D(e);
515
515
  }
516
516
  };
517
517
  }
@@ -524,11 +524,11 @@ function Gt(n) {
524
524
  c() {
525
525
  e = M("span");
526
526
  },
527
- m(i, l) {
528
- F(i, e, l), e.innerHTML = t;
527
+ m(i, o) {
528
+ F(i, e, o), e.innerHTML = t;
529
529
  },
530
- p(i, l) {
531
- l[0] & /*_strings*/
530
+ p(i, o) {
531
+ o[0] & /*_strings*/
532
532
  2048 && t !== (t = /*_strings*/
533
533
  i[11].verifying + "") && (e.innerHTML = t);
534
534
  },
@@ -541,47 +541,47 @@ function Wt(n) {
541
541
  let e, t = (
542
542
  /*_strings*/
543
543
  n[11].verified + ""
544
- ), i, l;
544
+ ), i, o;
545
545
  return {
546
546
  c() {
547
- e = M("span"), i = X(), l = M("input"), s(l, "type", "hidden"), s(
548
- l,
547
+ e = M("span"), i = X(), o = M("input"), s(o, "type", "hidden"), s(
548
+ o,
549
549
  "name",
550
550
  /*name*/
551
551
  n[4]
552
- ), l.value = /*payload*/
552
+ ), o.value = /*payload*/
553
553
  n[5];
554
554
  },
555
- m(o, f) {
556
- F(o, e, f), e.innerHTML = t, F(o, i, f), F(o, l, f);
555
+ m(l, f) {
556
+ F(l, e, f), e.innerHTML = t, F(l, i, f), F(l, o, f);
557
557
  },
558
- p(o, f) {
558
+ p(l, f) {
559
559
  f[0] & /*_strings*/
560
560
  2048 && t !== (t = /*_strings*/
561
- o[11].verified + "") && (e.innerHTML = t), f[0] & /*name*/
561
+ l[11].verified + "") && (e.innerHTML = t), f[0] & /*name*/
562
562
  16 && s(
563
- l,
563
+ o,
564
564
  "name",
565
565
  /*name*/
566
- o[4]
566
+ l[4]
567
567
  ), f[0] & /*payload*/
568
- 32 && (l.value = /*payload*/
569
- o[5]);
568
+ 32 && (o.value = /*payload*/
569
+ l[5]);
570
570
  },
571
- d(o) {
572
- o && (D(e), D(i), D(l));
571
+ d(l) {
572
+ l && (D(e), D(i), D(o));
573
573
  }
574
574
  };
575
575
  }
576
576
  function We(n) {
577
- let e, t, i, l, o, f, c;
577
+ let e, t, i, o, l, f, c;
578
578
  return {
579
579
  c() {
580
- e = M("div"), t = M("a"), i = Y("svg"), l = Y("path"), o = Y("path"), f = Y("path"), s(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"), s(l, "fill", "currentColor"), s(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"), s(o, "fill", "currentColor"), s(f, "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(f, "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", lt), s(t, "target", "_blank"), s(t, "class", "altcha-logo"), s(t, "aria-label", c = /*_strings*/
580
+ e = M("div"), t = M("a"), i = Y("svg"), o = Y("path"), l = Y("path"), f = Y("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(f, "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(f, "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", lt), s(t, "target", "_blank"), s(t, "class", "altcha-logo"), s(t, "aria-label", c = /*_strings*/
581
581
  n[11].ariaLinkLabel);
582
582
  },
583
583
  m(h, u) {
584
- F(h, e, u), p(e, t), p(t, i), p(i, l), p(i, o), p(i, f);
584
+ F(h, e, u), p(e, t), p(t, i), p(i, o), p(i, l), p(i, f);
585
585
  },
586
586
  p(h, u) {
587
587
  u[0] & /*_strings*/
@@ -594,23 +594,23 @@ function We(n) {
594
594
  };
595
595
  }
596
596
  function Xe(n) {
597
- let e, t, i, l;
598
- function o(h, u) {
597
+ let e, t, i, o;
598
+ function l(h, u) {
599
599
  return (
600
600
  /*state*/
601
601
  h[6] === b.EXPIRED ? Jt : Xt
602
602
  );
603
603
  }
604
- let f = o(n), c = f(n);
604
+ let f = l(n), c = f(n);
605
605
  return {
606
606
  c() {
607
- e = M("div"), t = Y("svg"), i = Y("path"), l = X(), c.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");
607
+ e = M("div"), t = Y("svg"), i = Y("path"), o = X(), c.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");
608
608
  },
609
609
  m(h, u) {
610
- F(h, e, u), p(e, t), p(t, i), p(e, l), c.m(e, null);
610
+ F(h, e, u), p(e, t), p(t, i), p(e, o), c.m(e, null);
611
611
  },
612
612
  p(h, u) {
613
- f === (f = o(h)) && c ? c.p(h, u) : (c.d(1), c = f(h), c && (c.c(), c.m(e, null)));
613
+ f === (f = l(h)) && c ? c.p(h, u) : (c.d(1), c = f(h), c && (c.c(), c.m(e, null)));
614
614
  },
615
615
  d(h) {
616
616
  h && D(e), c.d();
@@ -631,13 +631,13 @@ function Xt(n) {
631
631
  n[10]
632
632
  );
633
633
  },
634
- m(i, l) {
635
- F(i, e, l), e.innerHTML = t;
634
+ m(i, o) {
635
+ F(i, e, o), e.innerHTML = t;
636
636
  },
637
- p(i, l) {
638
- l[0] & /*_strings*/
637
+ p(i, o) {
638
+ o[0] & /*_strings*/
639
639
  2048 && t !== (t = /*_strings*/
640
- i[11].error + "") && (e.innerHTML = t), l[0] & /*error*/
640
+ i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
641
641
  1024 && s(
642
642
  e,
643
643
  "title",
@@ -664,13 +664,13 @@ function Jt(n) {
664
664
  n[10]
665
665
  );
666
666
  },
667
- m(i, l) {
668
- F(i, e, l), e.innerHTML = t;
667
+ m(i, o) {
668
+ F(i, e, o), e.innerHTML = t;
669
669
  },
670
- p(i, l) {
671
- l[0] & /*_strings*/
670
+ p(i, o) {
671
+ o[0] & /*_strings*/
672
672
  2048 && t !== (t = /*_strings*/
673
- i[11].expired + "") && (e.innerHTML = t), l[0] & /*error*/
673
+ i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
674
674
  1024 && s(
675
675
  e,
676
676
  "title",
@@ -692,16 +692,16 @@ function Je(n) {
692
692
  c() {
693
693
  e = M("div"), t = M("div"), s(e, "class", "altcha-footer");
694
694
  },
695
- m(l, o) {
696
- F(l, e, o), p(e, t), t.innerHTML = i;
695
+ m(o, l) {
696
+ F(o, e, l), p(e, t), t.innerHTML = i;
697
697
  },
698
- p(l, o) {
699
- o[0] & /*_strings*/
698
+ p(o, l) {
699
+ l[0] & /*_strings*/
700
700
  2048 && i !== (i = /*_strings*/
701
- l[11].footer + "") && (t.innerHTML = i);
701
+ o[11].footer + "") && (t.innerHTML = i);
702
702
  },
703
- d(l) {
704
- l && D(e);
703
+ d(o) {
704
+ o && D(e);
705
705
  }
706
706
  };
707
707
  }
@@ -721,7 +721,7 @@ function ze(n) {
721
721
  };
722
722
  }
723
723
  function zt(n) {
724
- let e, t, i, l, o, f, c, h, u, H, S, B, P, k, G, $ = (
724
+ let e, t, i, o, l, f, c, h, u, H, S, B, P, k, G, $ = (
725
725
  /*state*/
726
726
  n[6] === b.VERIFYING && Ge()
727
727
  );
@@ -753,10 +753,10 @@ function zt(n) {
753
753
  );
754
754
  return {
755
755
  c() {
756
- e = M("div"), t = M("div"), $ && $.c(), i = X(), l = M("div"), o = M("input"), h = X(), u = M("div"), N.c(), H = X(), x && x.c(), S = X(), I && I.c(), B = X(), A && A.c(), P = X(), w && w.c(), s(o, "type", "checkbox"), s(o, "id", f = /*name*/
757
- n[4] + "_checkbox"), o.required = c = /*auto*/
758
- n[0] !== "onsubmit", s(l, "class", "altcha-checkbox"), Ze(
759
- l,
756
+ e = M("div"), t = M("div"), $ && $.c(), i = X(), o = M("div"), l = M("input"), h = X(), u = M("div"), N.c(), H = X(), x && x.c(), S = X(), I && I.c(), B = X(), A && A.c(), P = X(), w && w.c(), s(l, "type", "checkbox"), s(l, "id", f = /*name*/
757
+ n[4] + "_checkbox"), l.required = c = /*auto*/
758
+ n[0] !== "onsubmit", s(o, "class", "altcha-checkbox"), Ze(
759
+ o,
760
760
  "altcha-hidden",
761
761
  /*state*/
762
762
  n[6] === b.VERIFYING
@@ -773,22 +773,22 @@ function zt(n) {
773
773
  );
774
774
  },
775
775
  m(d, _) {
776
- F(d, e, _), p(e, t), $ && $.m(t, null), p(t, i), p(t, l), p(l, o), o.checked = /*checked*/
776
+ F(d, e, _), p(e, t), $ && $.m(t, null), p(t, i), p(t, o), p(o, l), l.checked = /*checked*/
777
777
  n[7], p(t, h), p(t, u), N.m(u, null), p(t, H), x && x.m(t, null), p(e, S), I && I.m(e, null), p(e, B), A && A.m(e, null), p(e, P), w && w.m(e, null), n[38](e), k || (G = [
778
778
  pe(
779
- o,
779
+ l,
780
780
  "change",
781
781
  /*input_change_handler*/
782
782
  n[36]
783
783
  ),
784
784
  pe(
785
- o,
785
+ l,
786
786
  "change",
787
787
  /*onCheckedChange*/
788
788
  n[13]
789
789
  ),
790
790
  pe(
791
- o,
791
+ l,
792
792
  "invalid",
793
793
  /*onInvalid*/
794
794
  n[14]
@@ -799,13 +799,13 @@ function zt(n) {
799
799
  /*state*/
800
800
  d[6] === b.VERIFYING ? $ || ($ = Ge(), $.c(), $.m(t, i)) : $ && ($.d(1), $ = null), _[0] & /*name*/
801
801
  16 && f !== (f = /*name*/
802
- d[4] + "_checkbox") && s(o, "id", f), _[0] & /*auto*/
802
+ d[4] + "_checkbox") && s(l, "id", f), _[0] & /*auto*/
803
803
  1 && c !== (c = /*auto*/
804
- d[0] !== "onsubmit") && (o.required = c), _[0] & /*checked*/
805
- 128 && (o.checked = /*checked*/
804
+ d[0] !== "onsubmit") && (l.required = c), _[0] & /*checked*/
805
+ 128 && (l.checked = /*checked*/
806
806
  d[7]), _[0] & /*state*/
807
807
  64 && Ze(
808
- l,
808
+ o,
809
809
  "altcha-hidden",
810
810
  /*state*/
811
811
  d[6] === b.VERIFYING
@@ -850,13 +850,13 @@ function Kt() {
850
850
  }
851
851
  function Qt(n, e, t) {
852
852
  var Be, Ue;
853
- let i, l, o, f, { auto: c = void 0 } = e, { blockspam: h = void 0 } = e, { challengeurl: u = void 0 } = e, { challengejson: H = void 0 } = e, { debug: S = !1 } = e, { delay: B = 0 } = e, { expire: P = void 0 } = e, { floating: k = void 0 } = e, { floatinganchor: G = void 0 } = e, { floatingoffset: $ = void 0 } = e, { hidefooter: J = !1 } = e, { hidelogo: Z = !1 } = e, { name: N = "altcha" } = e, { maxnumber: x = 1e6 } = e, { mockerror: I = !1 } = e, { refetchonexpire: A = !0 } = e, { spamfilter: w = !1 } = e, { strings: d = void 0 } = e, { test: _ = !1 } = e, { verifyurl: z = void 0 } = e, { workers: oe = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
853
+ let i, o, l, f, { auto: c = void 0 } = e, { blockspam: h = void 0 } = e, { challengeurl: u = void 0 } = e, { challengejson: H = void 0 } = e, { debug: S = !1 } = e, { delay: B = 0 } = e, { expire: P = void 0 } = e, { floating: k = void 0 } = e, { floatinganchor: G = void 0 } = e, { floatingoffset: $ = void 0 } = e, { hidefooter: J = !1 } = e, { hidelogo: Z = !1 } = e, { name: N = "altcha" } = e, { maxnumber: x = 1e6 } = e, { mockerror: I = !1 } = e, { refetchonexpire: A = !0 } = e, { spamfilter: w = !1 } = e, { strings: d = void 0 } = e, { test: _ = !1 } = e, { verifyurl: z = void 0 } = e, { workers: oe = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
854
854
  const ye = Rt(), Ae = ["SHA-256", "SHA-384", "SHA-512"], Re = (Ue = (Be = document.documentElement.lang) == null ? void 0 : Be.split("-")) == null ? void 0 : Ue[0];
855
855
  let W = !1, C, K = null, he = null, m = null, ve = null, Q = null, j = b.UNVERIFIED, U = null;
856
856
  At(() => {
857
857
  m && (m.removeEventListener("submit", Me), m.removeEventListener("reset", Se), m.removeEventListener("focusin", $e), m = null), U && (clearTimeout(U), U = null), document.removeEventListener("click", je), document.removeEventListener("scroll", Ve), window.removeEventListener("resize", Pe);
858
858
  }), It(() => {
859
- E("mounted", "0.6.5"), E("workers", oe), _ && E("using test mode"), P && de(P), c !== void 0 && E("auto", c), k !== void 0 && He(k), m = C.closest("form"), m && (m.addEventListener("submit", Me, { capture: !0 }), m.addEventListener("reset", Se), c === "onfocus" && m.addEventListener("focusin", $e)), c === "onload" && ee(), i && (J || Z) && E("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.");
859
+ E("mounted", "0.6.7"), E("workers", oe), _ && E("using test mode"), P && de(P), c !== void 0 && E("auto", c), k !== void 0 && He(k), m = C.closest("form"), m && (m.addEventListener("submit", Me, { capture: !0 }), m.addEventListener("reset", Se), c === "onfocus" && m.addEventListener("focusin", $e)), c === "onload" && ee(), i && (J || Z) && E("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.");
860
860
  });
861
861
  function E(...r) {
862
862
  (S || r.some((a) => a instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", ...r);
@@ -899,8 +899,8 @@ function Qt(n, e, t) {
899
899
  var r;
900
900
  if (I)
901
901
  throw E("mocking error"), new Error("Mocked error.");
902
- if (l)
903
- return E("using provided json data"), l;
902
+ if (o)
903
+ return E("using provided json data"), o;
904
904
  if (_)
905
905
  return E("generating test challenge", { test: _ }), qt(typeof _ != "boolean" ? +_ : void 0);
906
906
  {
@@ -1085,7 +1085,7 @@ function Qt(n, e, t) {
1085
1085
  E("unable to find floating anchor element");
1086
1086
  }
1087
1087
  function Oe(r) {
1088
- r.auto !== void 0 && (t(0, c = r.auto), c === "onload" && ee()), r.floatinganchor !== void 0 && t(19, G = r.floatinganchor), r.delay !== void 0 && t(17, B = r.delay), r.floatingoffset !== void 0 && t(20, $ = r.floatingoffset), r.floating !== void 0 && He(r.floating), r.expire !== void 0 && (de(r.expire), t(18, P = r.expire)), r.challenge && (De(r.challenge), l = r.challenge), r.challengeurl !== void 0 && t(15, u = r.challengeurl), r.debug !== void 0 && t(16, S = !!r.debug), r.hidefooter !== void 0 && t(2, J = !!r.hidefooter), r.hidelogo !== void 0 && t(3, Z = !!r.hidelogo), r.maxnumber !== void 0 && t(21, x = +r.maxnumber), r.mockerror !== void 0 && t(22, I = !!r.mockerror), r.name !== void 0 && t(4, N = r.name), r.refetchonexpire !== void 0 && t(23, A = !!r.refetchonexpire), r.spamfilter !== void 0 && t(24, w = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(35, o = r.strings), r.test !== void 0 && t(25, _ = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(26, z = r.verifyurl), r.workers !== void 0 && t(27, oe = +r.workers), r.workerurl !== void 0 && t(28, ae = r.workerurl);
1088
+ r.auto !== void 0 && (t(0, c = r.auto), c === "onload" && ee()), r.floatinganchor !== void 0 && t(19, G = r.floatinganchor), r.delay !== void 0 && t(17, B = r.delay), r.floatingoffset !== void 0 && t(20, $ = r.floatingoffset), r.floating !== void 0 && He(r.floating), r.expire !== void 0 && (de(r.expire), t(18, P = r.expire)), r.challenge && (De(r.challenge), o = r.challenge), r.challengeurl !== void 0 && t(15, u = r.challengeurl), r.debug !== void 0 && t(16, S = !!r.debug), r.hidefooter !== void 0 && t(2, J = !!r.hidefooter), r.hidelogo !== void 0 && t(3, Z = !!r.hidelogo), r.maxnumber !== void 0 && t(21, x = +r.maxnumber), r.mockerror !== void 0 && t(22, I = !!r.mockerror), r.name !== void 0 && t(4, N = r.name), r.refetchonexpire !== void 0 && t(23, A = !!r.refetchonexpire), r.spamfilter !== void 0 && t(24, w = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(35, l = r.strings), r.test !== void 0 && t(25, _ = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(26, z = r.verifyurl), r.workers !== void 0 && t(27, oe = +r.workers), r.workerurl !== void 0 && t(28, ae = r.workerurl);
1089
1089
  }
1090
1090
  function ge(r = b.UNVERIFIED, a = null) {
1091
1091
  U && (clearTimeout(U), U = null), t(7, W = !1), t(10, ve = a), t(5, Q = null), t(6, j = r);
@@ -1124,18 +1124,18 @@ function Qt(n, e, t) {
1124
1124
  }, n.$$.update = () => {
1125
1125
  n.$$.dirty[0] & /*challengeurl*/
1126
1126
  32768 && t(12, i = !!(u != null && u.includes(".altcha.org")) && !!(u != null && u.includes("apiKey=ckey_"))), n.$$.dirty[0] & /*challengejson*/
1127
- 1073741824 && (l = H ? Qe(H) : void 0), n.$$.dirty[1] & /*strings*/
1128
- 1 && t(35, o = d ? Qe(d) : {}), n.$$.dirty[1] & /*parsedStrings*/
1127
+ 1073741824 && (o = H ? Qe(H) : void 0), n.$$.dirty[1] & /*strings*/
1128
+ 1 && t(35, l = d ? Qe(d) : {}), n.$$.dirty[1] & /*parsedStrings*/
1129
1129
  16 && t(11, f = {
1130
1130
  ariaLinkLabel: Ke,
1131
1131
  error: "Verification failed. Try again later.",
1132
1132
  expired: "Verification expired. Try again.",
1133
- footer: `Protected by <a href="${lt}" target="_blank" aria-label="${o.ariaLinkLabel || Ke}">ALTCHA</a>`,
1133
+ footer: `Protected by <a href="${lt}" target="_blank" aria-label="${l.ariaLinkLabel || Ke}">ALTCHA</a>`,
1134
1134
  label: "I'm not a robot",
1135
1135
  verified: "Verified",
1136
1136
  verifying: "Verifying...",
1137
1137
  waitAlert: "Verifying... please wait.",
1138
- ...o
1138
+ ...l
1139
1139
  }), n.$$.dirty[0] & /*payload, state*/
1140
1140
  96 && ye("statechange", { payload: Q, state: j }), n.$$.dirty[0] & /*state*/
1141
1141
  64 && at();
@@ -1175,7 +1175,7 @@ function Qt(n, e, t) {
1175
1175
  Oe,
1176
1176
  ge,
1177
1177
  ee,
1178
- o,
1178
+ l,
1179
1179
  bt,
1180
1180
  _t,
1181
1181
  wt