altcha 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/altcha.iife.js +2 -2
- package/dist/altcha.js +348 -342
- package/dist/altcha.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/altcha.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var nt = Object.defineProperty;
|
|
2
2
|
var it = (r, e, t) => e in r ? nt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var M = (r, e, t) => (it(r, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
function
|
|
4
|
+
function Q() {
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function Ge(r) {
|
|
7
7
|
return r();
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Ie() {
|
|
10
10
|
return /* @__PURE__ */ Object.create(null);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
r.forEach(
|
|
12
|
+
function te(r) {
|
|
13
|
+
r.forEach(Ge);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ue(r) {
|
|
16
16
|
return typeof r == "function";
|
|
17
17
|
}
|
|
18
18
|
function lt(r, e) {
|
|
@@ -21,13 +21,13 @@ function lt(r, e) {
|
|
|
21
21
|
function ot(r) {
|
|
22
22
|
return Object.keys(r).length === 0;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function y(r, e) {
|
|
25
25
|
r.appendChild(e);
|
|
26
26
|
}
|
|
27
27
|
function st(r, e, t) {
|
|
28
28
|
const i = ct(r);
|
|
29
29
|
if (!i.getElementById(e)) {
|
|
30
|
-
const l =
|
|
30
|
+
const l = R("style");
|
|
31
31
|
l.id = e, l.textContent = t, at(i, l);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -42,28 +42,28 @@ function ct(r) {
|
|
|
42
42
|
) : r.ownerDocument;
|
|
43
43
|
}
|
|
44
44
|
function at(r, e) {
|
|
45
|
-
return
|
|
45
|
+
return y(
|
|
46
46
|
/** @type {Document} */
|
|
47
47
|
r.head || r,
|
|
48
48
|
e
|
|
49
49
|
), e.sheet;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Z(r, e, t) {
|
|
52
52
|
r.insertBefore(e, t || null);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function S(r) {
|
|
55
55
|
r.parentNode && r.parentNode.removeChild(r);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function R(r) {
|
|
58
58
|
return document.createElement(r);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function O(r) {
|
|
61
61
|
return document.createElementNS("http://www.w3.org/2000/svg", r);
|
|
62
62
|
}
|
|
63
63
|
function ft(r) {
|
|
64
64
|
return document.createTextNode(r);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function B() {
|
|
67
67
|
return ft(" ");
|
|
68
68
|
}
|
|
69
69
|
function ae(r, e, t, i) {
|
|
@@ -90,14 +90,14 @@ function dt(r) {
|
|
|
90
90
|
}
|
|
91
91
|
), e;
|
|
92
92
|
}
|
|
93
|
-
let
|
|
94
|
-
function
|
|
95
|
-
|
|
93
|
+
let ee;
|
|
94
|
+
function q(r) {
|
|
95
|
+
ee = r;
|
|
96
96
|
}
|
|
97
97
|
function ge() {
|
|
98
|
-
if (!
|
|
98
|
+
if (!ee)
|
|
99
99
|
throw new Error("Function called outside component initialization");
|
|
100
|
-
return
|
|
100
|
+
return ee;
|
|
101
101
|
}
|
|
102
102
|
function gt(r) {
|
|
103
103
|
ge().$$.on_mount.push(r);
|
|
@@ -123,56 +123,56 @@ function bt() {
|
|
|
123
123
|
return !0;
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
const Se = [],
|
|
126
|
+
const J = [], ue = [];
|
|
127
|
+
let z = [];
|
|
128
|
+
const Se = [], Xe = /* @__PURE__ */ Promise.resolve();
|
|
129
129
|
let he = !1;
|
|
130
|
-
function
|
|
131
|
-
he || (he = !0,
|
|
130
|
+
function De() {
|
|
131
|
+
he || (he = !0, Xe.then($));
|
|
132
132
|
}
|
|
133
133
|
function pt() {
|
|
134
|
-
return
|
|
134
|
+
return De(), Xe;
|
|
135
135
|
}
|
|
136
136
|
function de(r) {
|
|
137
|
-
|
|
137
|
+
z.push(r);
|
|
138
138
|
}
|
|
139
139
|
const fe = /* @__PURE__ */ new Set();
|
|
140
|
-
let
|
|
141
|
-
function
|
|
142
|
-
if (
|
|
140
|
+
let K = 0;
|
|
141
|
+
function $() {
|
|
142
|
+
if (K !== 0)
|
|
143
143
|
return;
|
|
144
|
-
const r =
|
|
144
|
+
const r = ee;
|
|
145
145
|
do {
|
|
146
146
|
try {
|
|
147
|
-
for (;
|
|
148
|
-
const e =
|
|
149
|
-
|
|
147
|
+
for (; K < J.length; ) {
|
|
148
|
+
const e = J[K];
|
|
149
|
+
K++, q(e), yt(e.$$);
|
|
150
150
|
}
|
|
151
151
|
} catch (e) {
|
|
152
|
-
throw
|
|
152
|
+
throw J.length = 0, K = 0, e;
|
|
153
153
|
}
|
|
154
|
-
for (
|
|
154
|
+
for (q(null), J.length = 0, K = 0; ue.length; )
|
|
155
155
|
ue.pop()();
|
|
156
|
-
for (let e = 0; e <
|
|
157
|
-
const t =
|
|
156
|
+
for (let e = 0; e < z.length; e += 1) {
|
|
157
|
+
const t = z[e];
|
|
158
158
|
fe.has(t) || (fe.add(t), t());
|
|
159
159
|
}
|
|
160
|
-
|
|
161
|
-
} while (
|
|
160
|
+
z.length = 0;
|
|
161
|
+
} while (J.length);
|
|
162
162
|
for (; Se.length; )
|
|
163
163
|
Se.pop()();
|
|
164
|
-
he = !1, fe.clear(),
|
|
164
|
+
he = !1, fe.clear(), q(r);
|
|
165
165
|
}
|
|
166
166
|
function yt(r) {
|
|
167
167
|
if (r.fragment !== null) {
|
|
168
|
-
r.update(),
|
|
168
|
+
r.update(), te(r.before_update);
|
|
169
169
|
const e = r.dirty;
|
|
170
170
|
r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(de);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
function vt(r) {
|
|
174
174
|
const e = [], t = [];
|
|
175
|
-
|
|
175
|
+
z.forEach((i) => r.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), z = e;
|
|
176
176
|
}
|
|
177
177
|
const wt = /* @__PURE__ */ new Set();
|
|
178
178
|
function _t(r, e) {
|
|
@@ -181,58 +181,58 @@ function _t(r, e) {
|
|
|
181
181
|
function kt(r, e, t) {
|
|
182
182
|
const { fragment: i, after_update: l } = r.$$;
|
|
183
183
|
i && i.m(e, t), de(() => {
|
|
184
|
-
const o = r.$$.on_mount.map(
|
|
185
|
-
r.$$.on_destroy ? r.$$.on_destroy.push(...o) :
|
|
184
|
+
const o = r.$$.on_mount.map(Ge).filter(Ue);
|
|
185
|
+
r.$$.on_destroy ? r.$$.on_destroy.push(...o) : te(o), r.$$.on_mount = [];
|
|
186
186
|
}), l.forEach(de);
|
|
187
187
|
}
|
|
188
188
|
function xt(r, e) {
|
|
189
189
|
const t = r.$$;
|
|
190
|
-
t.fragment !== null && (vt(t.after_update),
|
|
190
|
+
t.fragment !== null && (vt(t.after_update), te(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
191
191
|
}
|
|
192
192
|
function Et(r, e) {
|
|
193
|
-
r.$$.dirty[0] === -1 && (
|
|
193
|
+
r.$$.dirty[0] === -1 && (J.push(r), De(), r.$$.dirty.fill(0)), r.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
194
194
|
}
|
|
195
|
-
function $t(r, e, t, i, l, o, s = null,
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
const
|
|
195
|
+
function $t(r, e, t, i, l, o, s = null, f = [-1]) {
|
|
196
|
+
const a = ee;
|
|
197
|
+
q(r);
|
|
198
|
+
const h = r.$$ = {
|
|
199
199
|
fragment: null,
|
|
200
200
|
ctx: [],
|
|
201
201
|
// state
|
|
202
202
|
props: o,
|
|
203
|
-
update:
|
|
203
|
+
update: Q,
|
|
204
204
|
not_equal: l,
|
|
205
|
-
bound:
|
|
205
|
+
bound: Ie(),
|
|
206
206
|
// lifecycle
|
|
207
207
|
on_mount: [],
|
|
208
208
|
on_destroy: [],
|
|
209
209
|
on_disconnect: [],
|
|
210
210
|
before_update: [],
|
|
211
211
|
after_update: [],
|
|
212
|
-
context: new Map(e.context || (
|
|
212
|
+
context: new Map(e.context || (a ? a.$$.context : [])),
|
|
213
213
|
// everything else
|
|
214
|
-
callbacks:
|
|
215
|
-
dirty:
|
|
214
|
+
callbacks: Ie(),
|
|
215
|
+
dirty: f,
|
|
216
216
|
skip_bound: !1,
|
|
217
|
-
root: e.target ||
|
|
217
|
+
root: e.target || a.$$.root
|
|
218
218
|
};
|
|
219
|
-
s && s(
|
|
220
|
-
let
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
return
|
|
224
|
-
}) : [],
|
|
219
|
+
s && s(h.root);
|
|
220
|
+
let A = !1;
|
|
221
|
+
if (h.ctx = t ? t(r, e.props || {}, (C, V, ...G) => {
|
|
222
|
+
const U = G.length ? G[0] : V;
|
|
223
|
+
return h.ctx && l(h.ctx[C], h.ctx[C] = U) && (!h.skip_bound && h.bound[C] && h.bound[C](U), A && Et(r, C)), V;
|
|
224
|
+
}) : [], h.update(), A = !0, te(h.before_update), h.fragment = i ? i(h.ctx) : !1, e.target) {
|
|
225
225
|
if (e.hydrate) {
|
|
226
|
-
const
|
|
227
|
-
|
|
226
|
+
const C = ut(e.target);
|
|
227
|
+
h.fragment && h.fragment.l(C), C.forEach(S);
|
|
228
228
|
} else
|
|
229
|
-
|
|
230
|
-
e.intro && _t(r.$$.fragment), kt(r, e.target, e.anchor),
|
|
229
|
+
h.fragment && h.fragment.c();
|
|
230
|
+
e.intro && _t(r.$$.fragment), kt(r, e.target, e.anchor), $();
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
q(a);
|
|
233
233
|
}
|
|
234
|
-
let
|
|
235
|
-
typeof HTMLElement == "function" && (
|
|
234
|
+
let Oe;
|
|
235
|
+
typeof HTMLElement == "function" && (Oe = class extends HTMLElement {
|
|
236
236
|
constructor(e, t, i) {
|
|
237
237
|
super();
|
|
238
238
|
/** The Svelte component constructor */
|
|
@@ -275,17 +275,17 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
275
275
|
let s;
|
|
276
276
|
return {
|
|
277
277
|
c: function() {
|
|
278
|
-
s =
|
|
278
|
+
s = R("slot"), o !== "default" && c(s, "name", o);
|
|
279
279
|
},
|
|
280
280
|
/**
|
|
281
281
|
* @param {HTMLElement} target
|
|
282
282
|
* @param {HTMLElement} [anchor]
|
|
283
283
|
*/
|
|
284
|
-
m: function(
|
|
285
|
-
|
|
284
|
+
m: function(h, A) {
|
|
285
|
+
Z(h, s, A);
|
|
286
286
|
},
|
|
287
|
-
d: function(
|
|
288
|
-
|
|
287
|
+
d: function(h) {
|
|
288
|
+
h && S(s);
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
};
|
|
@@ -297,7 +297,7 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
297
297
|
o in i && (t[o] = [e(o)]);
|
|
298
298
|
for (const o of this.attributes) {
|
|
299
299
|
const s = this.$$g_p(o.name);
|
|
300
|
-
s in this.$$d || (this.$$d[s] =
|
|
300
|
+
s in this.$$d || (this.$$d[s] = oe(s, o.value, this.$$p_d, "toProp"));
|
|
301
301
|
}
|
|
302
302
|
for (const o in this.$$p_d)
|
|
303
303
|
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
@@ -315,7 +315,7 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
315
315
|
this.$$r = !0;
|
|
316
316
|
for (const o in this.$$p_d)
|
|
317
317
|
if (this.$$d[o] = this.$$c.$$.ctx[this.$$c.$$.props[o]], this.$$p_d[o].reflect) {
|
|
318
|
-
const s =
|
|
318
|
+
const s = oe(
|
|
319
319
|
o,
|
|
320
320
|
this.$$d[o],
|
|
321
321
|
this.$$p_d,
|
|
@@ -328,8 +328,8 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
328
328
|
this.$$c.$$.after_update.push(l), l();
|
|
329
329
|
for (const o in this.$$l)
|
|
330
330
|
for (const s of this.$$l[o]) {
|
|
331
|
-
const
|
|
332
|
-
this.$$l_u.set(s,
|
|
331
|
+
const f = this.$$c.$on(o, s);
|
|
332
|
+
this.$$l_u.set(s, f);
|
|
333
333
|
}
|
|
334
334
|
this.$$l = {};
|
|
335
335
|
}
|
|
@@ -338,7 +338,7 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
338
338
|
// and setting attributes through setAttribute etc, this is helpful
|
|
339
339
|
attributeChangedCallback(e, t, i) {
|
|
340
340
|
var l;
|
|
341
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
341
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = oe(e, i, this.$$p_d, "toProp"), (l = this.$$c) == null || l.$set({ [e]: this.$$d[e] }));
|
|
342
342
|
}
|
|
343
343
|
disconnectedCallback() {
|
|
344
344
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -351,7 +351,7 @@ typeof HTMLElement == "function" && (De = class extends HTMLElement {
|
|
|
351
351
|
) || e;
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
-
function
|
|
354
|
+
function oe(r, e, t, i) {
|
|
355
355
|
var o;
|
|
356
356
|
const l = (o = t[r]) == null ? void 0 : o.type;
|
|
357
357
|
if (e = l === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[r])
|
|
@@ -382,31 +382,31 @@ function le(r, e, t, i) {
|
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
function Ct(r, e, t, i, l, o) {
|
|
385
|
-
let s = class extends
|
|
385
|
+
let s = class extends Oe {
|
|
386
386
|
constructor() {
|
|
387
387
|
super(r, t, l), this.$$p_d = e;
|
|
388
388
|
}
|
|
389
389
|
static get observedAttributes() {
|
|
390
390
|
return Object.keys(e).map(
|
|
391
|
-
(
|
|
391
|
+
(f) => (e[f].attribute || f).toLowerCase()
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
|
-
return Object.keys(e).forEach((
|
|
396
|
-
Object.defineProperty(s.prototype,
|
|
395
|
+
return Object.keys(e).forEach((f) => {
|
|
396
|
+
Object.defineProperty(s.prototype, f, {
|
|
397
397
|
get() {
|
|
398
|
-
return this.$$c &&
|
|
398
|
+
return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
|
|
399
399
|
},
|
|
400
|
-
set(
|
|
401
|
-
var
|
|
402
|
-
|
|
400
|
+
set(a) {
|
|
401
|
+
var h;
|
|
402
|
+
a = oe(f, a, e), this.$$d[f] = a, (h = this.$$c) == null || h.$set({ [f]: a });
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
|
-
}), i.forEach((
|
|
406
|
-
Object.defineProperty(s.prototype,
|
|
405
|
+
}), i.forEach((f) => {
|
|
406
|
+
Object.defineProperty(s.prototype, f, {
|
|
407
407
|
get() {
|
|
408
|
-
var
|
|
409
|
-
return (
|
|
408
|
+
var a;
|
|
409
|
+
return (a = this.$$c) == null ? void 0 : a[f];
|
|
410
410
|
}
|
|
411
411
|
});
|
|
412
412
|
}), o && (s = o(s)), r.element = /** @type {any} */
|
|
@@ -433,7 +433,7 @@ class Lt {
|
|
|
433
433
|
}
|
|
434
434
|
/** @returns {void} */
|
|
435
435
|
$destroy() {
|
|
436
|
-
xt(this, 1), this.$destroy =
|
|
436
|
+
xt(this, 1), this.$destroy = Q;
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
439
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -442,8 +442,8 @@ class Lt {
|
|
|
442
442
|
* @returns {() => void}
|
|
443
443
|
*/
|
|
444
444
|
$on(e, t) {
|
|
445
|
-
if (!
|
|
446
|
-
return
|
|
445
|
+
if (!Ue(t))
|
|
446
|
+
return Q;
|
|
447
447
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
448
448
|
return i.push(t), () => {
|
|
449
449
|
const l = i.indexOf(t);
|
|
@@ -458,13 +458,13 @@ class Lt {
|
|
|
458
458
|
this.$$set && !ot(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const
|
|
462
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
463
|
-
const Fe = "
|
|
461
|
+
const Rt = "4";
|
|
462
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Rt);
|
|
463
|
+
const Fe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK", It = (r) => Uint8Array.from(atob(r), (e) => e.charCodeAt(0)), je = typeof window < "u" && window.Blob && new Blob([It(Fe)], { type: "text/javascript;charset=utf-8" });
|
|
464
464
|
function Nt(r) {
|
|
465
465
|
let e;
|
|
466
466
|
try {
|
|
467
|
-
if (e =
|
|
467
|
+
if (e = je && (window.URL || window.webkitURL).createObjectURL(je), !e)
|
|
468
468
|
throw "";
|
|
469
469
|
const t = new Worker(e, {
|
|
470
470
|
name: r == null ? void 0 : r.name
|
|
@@ -484,13 +484,13 @@ function Nt(r) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
const St = new TextEncoder();
|
|
487
|
-
function
|
|
487
|
+
function jt(r) {
|
|
488
488
|
return [...new Uint8Array(r)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
489
489
|
}
|
|
490
|
-
async function
|
|
490
|
+
async function Zt(r, e = "SHA-256", t = 1e5) {
|
|
491
491
|
const i = Date.now().toString(16);
|
|
492
492
|
r || (r = Math.round(Math.random() * t));
|
|
493
|
-
const l = await
|
|
493
|
+
const l = await He(i, r, e);
|
|
494
494
|
return {
|
|
495
495
|
algorithm: e,
|
|
496
496
|
challenge: l,
|
|
@@ -498,62 +498,63 @@ async function At(r, e = "SHA-256", t = 1e5) {
|
|
|
498
498
|
signature: ""
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
-
async function
|
|
502
|
-
return
|
|
501
|
+
async function He(r, e, t) {
|
|
502
|
+
return jt(
|
|
503
503
|
await crypto.subtle.digest(
|
|
504
504
|
t.toUpperCase(),
|
|
505
505
|
St.encode(r + e)
|
|
506
506
|
)
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
const o = new AbortController();
|
|
509
|
+
function At(r, e, t = "SHA-256", i = 1e6, l = 0) {
|
|
510
|
+
const o = new AbortController(), s = Date.now();
|
|
511
511
|
return {
|
|
512
|
-
promise:
|
|
513
|
-
|
|
514
|
-
o.signal.aborted
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
512
|
+
promise: (async () => {
|
|
513
|
+
for (let a = l; a <= i; a += 1) {
|
|
514
|
+
if (o.signal.aborted)
|
|
515
|
+
return null;
|
|
516
|
+
if (await He(e, a, t) === r)
|
|
517
|
+
return {
|
|
518
|
+
number: a,
|
|
519
|
+
took: Date.now() - s
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
return null;
|
|
523
|
+
})(),
|
|
523
524
|
controller: o
|
|
524
525
|
};
|
|
525
526
|
}
|
|
526
|
-
var
|
|
527
|
-
function
|
|
527
|
+
var p = /* @__PURE__ */ ((r) => (r.ERROR = "error", r.VERIFIED = "verified", r.VERIFYING = "verifying", r.UNVERIFIED = "unverified", r.EXPIRED = "expired", r))(p || {});
|
|
528
|
+
function Tt(r) {
|
|
528
529
|
st(r, "svelte-14ngypa", `.altcha.svelte-14ngypa.svelte-14ngypa{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid
|
|
529
530
|
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);overflow:hidden;position:relative;text-align:left}.altcha.svelte-14ngypa.svelte-14ngypa:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha-main.svelte-14ngypa.svelte-14ngypa{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-14ngypa.svelte-14ngypa{flex-grow:1}.altcha-label.svelte-14ngypa label.svelte-14ngypa{cursor:pointer}.altcha-logo.svelte-14ngypa.svelte-14ngypa{color:currentColor;opacity:0.3}.altcha-logo.svelte-14ngypa.svelte-14ngypa:hover{opacity:1}.altcha-error.svelte-14ngypa.svelte-14ngypa{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-14ngypa.svelte-14ngypa{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-14ngypa.svelte-14ngypa:hover{opacity:1}.altcha-footer.svelte-14ngypa>.svelte-14ngypa:first-child{flex-grow:1}.altcha-footer.svelte-14ngypa a{color:currentColor}.altcha-checkbox.svelte-14ngypa.svelte-14ngypa{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-14ngypa input.svelte-14ngypa{width:18px;height:18px;margin:0}.altcha-hidden.svelte-14ngypa.svelte-14ngypa{display:none}.altcha-spinner.svelte-14ngypa.svelte-14ngypa{animation:svelte-14ngypa-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-14ngypa-altcha-spinner{100%{transform:rotate(360deg)}}`);
|
|
530
531
|
}
|
|
531
|
-
function
|
|
532
|
+
function Ze(r) {
|
|
532
533
|
let e, t, i;
|
|
533
534
|
return {
|
|
534
535
|
c() {
|
|
535
|
-
e =
|
|
536
|
+
e = O("svg"), t = O("path"), i = O("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-14ngypa"), c(e, "width", "24"), c(e, "height", "24"), c(e, "viewBox", "0 0 24 24"), c(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
536
537
|
},
|
|
537
538
|
m(l, o) {
|
|
538
|
-
|
|
539
|
+
Z(l, e, o), y(e, t), y(e, i);
|
|
539
540
|
},
|
|
540
541
|
d(l) {
|
|
541
|
-
l &&
|
|
542
|
+
l && S(e);
|
|
542
543
|
}
|
|
543
544
|
};
|
|
544
545
|
}
|
|
545
|
-
function
|
|
546
|
+
function Mt(r) {
|
|
546
547
|
let e, t = (
|
|
547
548
|
/*_strings*/
|
|
548
549
|
r[9].label + ""
|
|
549
550
|
), i;
|
|
550
551
|
return {
|
|
551
552
|
c() {
|
|
552
|
-
e =
|
|
553
|
+
e = R("label"), c(e, "for", i = /*name*/
|
|
553
554
|
r[3] + "_checkbox"), c(e, "class", "svelte-14ngypa");
|
|
554
555
|
},
|
|
555
556
|
m(l, o) {
|
|
556
|
-
|
|
557
|
+
Z(l, e, o), e.innerHTML = t;
|
|
557
558
|
},
|
|
558
559
|
p(l, o) {
|
|
559
560
|
o[0] & /*_strings*/
|
|
@@ -563,21 +564,21 @@ function Zt(r) {
|
|
|
563
564
|
l[3] + "_checkbox") && c(e, "for", i);
|
|
564
565
|
},
|
|
565
566
|
d(l) {
|
|
566
|
-
l &&
|
|
567
|
+
l && S(e);
|
|
567
568
|
}
|
|
568
569
|
};
|
|
569
570
|
}
|
|
570
|
-
function
|
|
571
|
+
function Vt(r) {
|
|
571
572
|
let e, t = (
|
|
572
573
|
/*_strings*/
|
|
573
574
|
r[9].verifying + ""
|
|
574
575
|
);
|
|
575
576
|
return {
|
|
576
577
|
c() {
|
|
577
|
-
e =
|
|
578
|
+
e = R("span");
|
|
578
579
|
},
|
|
579
580
|
m(i, l) {
|
|
580
|
-
|
|
581
|
+
Z(i, e, l), e.innerHTML = t;
|
|
581
582
|
},
|
|
582
583
|
p(i, l) {
|
|
583
584
|
l[0] & /*_strings*/
|
|
@@ -585,18 +586,18 @@ function Gt(r) {
|
|
|
585
586
|
i[9].verifying + "") && (e.innerHTML = t);
|
|
586
587
|
},
|
|
587
588
|
d(i) {
|
|
588
|
-
i &&
|
|
589
|
+
i && S(e);
|
|
589
590
|
}
|
|
590
591
|
};
|
|
591
592
|
}
|
|
592
|
-
function
|
|
593
|
+
function Gt(r) {
|
|
593
594
|
let e, t = (
|
|
594
595
|
/*_strings*/
|
|
595
596
|
r[9].verified + ""
|
|
596
597
|
), i, l;
|
|
597
598
|
return {
|
|
598
599
|
c() {
|
|
599
|
-
e =
|
|
600
|
+
e = R("span"), i = B(), l = R("input"), c(l, "type", "hidden"), c(
|
|
600
601
|
l,
|
|
601
602
|
"name",
|
|
602
603
|
/*name*/
|
|
@@ -605,7 +606,7 @@ function Vt(r) {
|
|
|
605
606
|
r[4];
|
|
606
607
|
},
|
|
607
608
|
m(o, s) {
|
|
608
|
-
|
|
609
|
+
Z(o, e, s), e.innerHTML = t, Z(o, i, s), Z(o, l, s);
|
|
609
610
|
},
|
|
610
611
|
p(o, s) {
|
|
611
612
|
s[0] & /*_strings*/
|
|
@@ -621,57 +622,57 @@ function Vt(r) {
|
|
|
621
622
|
o[4]);
|
|
622
623
|
},
|
|
623
624
|
d(o) {
|
|
624
|
-
o && (
|
|
625
|
+
o && (S(e), S(i), S(l));
|
|
625
626
|
}
|
|
626
627
|
};
|
|
627
628
|
}
|
|
628
|
-
function
|
|
629
|
+
function Ae(r) {
|
|
629
630
|
let e, t, i, l, o, s;
|
|
630
631
|
return {
|
|
631
632
|
c() {
|
|
632
|
-
e =
|
|
633
|
+
e = R("div"), t = R("a"), i = O("svg"), l = O("path"), o = O("path"), s = O("path"), c(l, "d", "M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z"), c(l, "fill", "currentColor"), c(o, "d", "M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z"), c(o, "fill", "currentColor"), c(s, "d", "M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z"), c(s, "fill", "currentColor"), c(i, "width", "22"), c(i, "height", "22"), c(i, "viewBox", "0 0 20 20"), c(i, "fill", "none"), c(i, "xmlns", "http://www.w3.org/2000/svg"), c(t, "href", Ye), c(t, "target", "_blank"), c(t, "class", "altcha-logo svelte-14ngypa");
|
|
633
634
|
},
|
|
634
|
-
m(
|
|
635
|
-
|
|
635
|
+
m(f, a) {
|
|
636
|
+
Z(f, e, a), y(e, t), y(t, i), y(i, l), y(i, o), y(i, s);
|
|
636
637
|
},
|
|
637
|
-
p:
|
|
638
|
-
d(
|
|
639
|
-
|
|
638
|
+
p: Q,
|
|
639
|
+
d(f) {
|
|
640
|
+
f && S(e);
|
|
640
641
|
}
|
|
641
642
|
};
|
|
642
643
|
}
|
|
643
|
-
function
|
|
644
|
+
function Te(r) {
|
|
644
645
|
let e, t, i, l;
|
|
645
|
-
function o(
|
|
646
|
+
function o(a, h) {
|
|
646
647
|
return (
|
|
647
648
|
/*state*/
|
|
648
|
-
|
|
649
|
+
a[5] === p.EXPIRED ? Xt : Ut
|
|
649
650
|
);
|
|
650
651
|
}
|
|
651
|
-
let s = o(r),
|
|
652
|
+
let s = o(r), f = s(r);
|
|
652
653
|
return {
|
|
653
654
|
c() {
|
|
654
|
-
e =
|
|
655
|
+
e = R("div"), t = O("svg"), i = O("path"), l = B(), f.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-14ngypa");
|
|
655
656
|
},
|
|
656
|
-
m(
|
|
657
|
-
|
|
657
|
+
m(a, h) {
|
|
658
|
+
Z(a, e, h), y(e, t), y(t, i), y(e, l), f.m(e, null);
|
|
658
659
|
},
|
|
659
|
-
p(
|
|
660
|
-
s === (s = o(
|
|
660
|
+
p(a, h) {
|
|
661
|
+
s === (s = o(a)) && f ? f.p(a, h) : (f.d(1), f = s(a), f && (f.c(), f.m(e, null)));
|
|
661
662
|
},
|
|
662
|
-
d(
|
|
663
|
-
|
|
663
|
+
d(a) {
|
|
664
|
+
a && S(e), f.d();
|
|
664
665
|
}
|
|
665
666
|
};
|
|
666
667
|
}
|
|
667
|
-
function
|
|
668
|
+
function Ut(r) {
|
|
668
669
|
let e, t = (
|
|
669
670
|
/*_strings*/
|
|
670
671
|
r[9].error + ""
|
|
671
672
|
);
|
|
672
673
|
return {
|
|
673
674
|
c() {
|
|
674
|
-
e =
|
|
675
|
+
e = R("div"), c(
|
|
675
676
|
e,
|
|
676
677
|
"title",
|
|
677
678
|
/*error*/
|
|
@@ -679,7 +680,7 @@ function Ot(r) {
|
|
|
679
680
|
);
|
|
680
681
|
},
|
|
681
682
|
m(i, l) {
|
|
682
|
-
|
|
683
|
+
Z(i, e, l), e.innerHTML = t;
|
|
683
684
|
},
|
|
684
685
|
p(i, l) {
|
|
685
686
|
l[0] & /*_strings*/
|
|
@@ -693,18 +694,18 @@ function Ot(r) {
|
|
|
693
694
|
);
|
|
694
695
|
},
|
|
695
696
|
d(i) {
|
|
696
|
-
i &&
|
|
697
|
+
i && S(e);
|
|
697
698
|
}
|
|
698
699
|
};
|
|
699
700
|
}
|
|
700
|
-
function
|
|
701
|
+
function Xt(r) {
|
|
701
702
|
let e, t = (
|
|
702
703
|
/*_strings*/
|
|
703
704
|
r[9].expired + ""
|
|
704
705
|
);
|
|
705
706
|
return {
|
|
706
707
|
c() {
|
|
707
|
-
e =
|
|
708
|
+
e = R("div"), c(
|
|
708
709
|
e,
|
|
709
710
|
"title",
|
|
710
711
|
/*error*/
|
|
@@ -712,7 +713,7 @@ function Ht(r) {
|
|
|
712
713
|
);
|
|
713
714
|
},
|
|
714
715
|
m(i, l) {
|
|
715
|
-
|
|
716
|
+
Z(i, e, l), e.innerHTML = t;
|
|
716
717
|
},
|
|
717
718
|
p(i, l) {
|
|
718
719
|
l[0] & /*_strings*/
|
|
@@ -726,21 +727,21 @@ function Ht(r) {
|
|
|
726
727
|
);
|
|
727
728
|
},
|
|
728
729
|
d(i) {
|
|
729
|
-
i &&
|
|
730
|
+
i && S(e);
|
|
730
731
|
}
|
|
731
732
|
};
|
|
732
733
|
}
|
|
733
|
-
function
|
|
734
|
+
function Me(r) {
|
|
734
735
|
let e, t, i = (
|
|
735
736
|
/*_strings*/
|
|
736
737
|
r[9].footer + ""
|
|
737
738
|
);
|
|
738
739
|
return {
|
|
739
740
|
c() {
|
|
740
|
-
e =
|
|
741
|
+
e = R("div"), t = R("div"), c(t, "class", "svelte-14ngypa"), c(e, "class", "altcha-footer svelte-14ngypa");
|
|
741
742
|
},
|
|
742
743
|
m(l, o) {
|
|
743
|
-
|
|
744
|
+
Z(l, e, o), y(e, t), t.innerHTML = i;
|
|
744
745
|
},
|
|
745
746
|
p(l, o) {
|
|
746
747
|
o[0] & /*_strings*/
|
|
@@ -748,46 +749,46 @@ function Ze(r) {
|
|
|
748
749
|
l[9].footer + "") && (t.innerHTML = i);
|
|
749
750
|
},
|
|
750
751
|
d(l) {
|
|
751
|
-
l &&
|
|
752
|
+
l && S(e);
|
|
752
753
|
}
|
|
753
754
|
};
|
|
754
755
|
}
|
|
755
|
-
function
|
|
756
|
-
let e, t, i, l, o, s,
|
|
756
|
+
function Dt(r) {
|
|
757
|
+
let e, t, i, l, o, s, f, a, h, A, C, V, G, U, w = (
|
|
757
758
|
/*state*/
|
|
758
|
-
r[5] ===
|
|
759
|
+
r[5] === p.VERIFYING && Ze()
|
|
759
760
|
);
|
|
760
|
-
function
|
|
761
|
+
function H(d, I) {
|
|
761
762
|
return (
|
|
762
763
|
/*state*/
|
|
763
|
-
d[5] ===
|
|
764
|
+
d[5] === p.VERIFIED ? Gt : (
|
|
764
765
|
/*state*/
|
|
765
|
-
d[5] ===
|
|
766
|
+
d[5] === p.VERIFYING ? Vt : Mt
|
|
766
767
|
)
|
|
767
768
|
);
|
|
768
769
|
}
|
|
769
|
-
let
|
|
770
|
+
let X = H(r), _ = X(r), k = (
|
|
770
771
|
/*hidelogo*/
|
|
771
|
-
r[2] !== !0 &&
|
|
772
|
+
r[2] !== !0 && Ae()
|
|
772
773
|
), g = (
|
|
773
774
|
/*error*/
|
|
774
775
|
(r[8] || /*state*/
|
|
775
|
-
r[5] ===
|
|
776
|
-
),
|
|
776
|
+
r[5] === p.EXPIRED) && Te(r)
|
|
777
|
+
), b = (
|
|
777
778
|
/*_strings*/
|
|
778
779
|
r[9].footer && /*hidefooter*/
|
|
779
|
-
r[1] !== !0 &&
|
|
780
|
+
r[1] !== !0 && Me(r)
|
|
780
781
|
);
|
|
781
782
|
return {
|
|
782
783
|
c() {
|
|
783
|
-
e =
|
|
784
|
-
r[3] + "_checkbox"), o.required =
|
|
784
|
+
e = R("div"), t = R("div"), w && w.c(), i = B(), l = R("div"), o = R("input"), a = B(), h = R("div"), _.c(), A = B(), k && k.c(), C = B(), g && g.c(), V = B(), b && b.c(), c(o, "type", "checkbox"), c(o, "id", s = /*name*/
|
|
785
|
+
r[3] + "_checkbox"), o.required = f = /*auto*/
|
|
785
786
|
r[0] !== "onsubmit", c(o, "class", "svelte-14ngypa"), c(l, "class", "altcha-checkbox svelte-14ngypa"), Ne(
|
|
786
787
|
l,
|
|
787
788
|
"altcha-hidden",
|
|
788
789
|
/*state*/
|
|
789
|
-
r[5] ===
|
|
790
|
-
), c(
|
|
790
|
+
r[5] === p.VERIFYING
|
|
791
|
+
), c(h, "class", "altcha-label svelte-14ngypa"), c(t, "class", "altcha-main svelte-14ngypa"), c(e, "class", "altcha svelte-14ngypa"), c(
|
|
791
792
|
e,
|
|
792
793
|
"data-state",
|
|
793
794
|
/*state*/
|
|
@@ -795,8 +796,8 @@ function Pt(r) {
|
|
|
795
796
|
);
|
|
796
797
|
},
|
|
797
798
|
m(d, I) {
|
|
798
|
-
|
|
799
|
-
r[6],
|
|
799
|
+
Z(d, e, I), y(e, t), w && w.m(t, null), y(t, i), y(t, l), y(l, o), o.checked = /*checked*/
|
|
800
|
+
r[6], y(t, a), y(t, h), _.m(h, null), y(t, A), k && k.m(t, null), y(e, C), g && g.m(e, null), y(e, V), b && b.m(e, null), r[30](e), G || (U = [
|
|
800
801
|
ae(
|
|
801
802
|
o,
|
|
802
803
|
"change",
|
|
@@ -815,28 +816,28 @@ function Pt(r) {
|
|
|
815
816
|
/*onInvalid*/
|
|
816
817
|
r[11]
|
|
817
818
|
)
|
|
818
|
-
],
|
|
819
|
+
], G = !0);
|
|
819
820
|
},
|
|
820
821
|
p(d, I) {
|
|
821
822
|
/*state*/
|
|
822
|
-
d[5] ===
|
|
823
|
+
d[5] === p.VERIFYING ? w || (w = Ze(), w.c(), w.m(t, i)) : w && (w.d(1), w = null), I[0] & /*name*/
|
|
823
824
|
8 && s !== (s = /*name*/
|
|
824
825
|
d[3] + "_checkbox") && c(o, "id", s), I[0] & /*auto*/
|
|
825
|
-
1 &&
|
|
826
|
-
d[0] !== "onsubmit") && (o.required =
|
|
826
|
+
1 && f !== (f = /*auto*/
|
|
827
|
+
d[0] !== "onsubmit") && (o.required = f), I[0] & /*checked*/
|
|
827
828
|
64 && (o.checked = /*checked*/
|
|
828
829
|
d[6]), I[0] & /*state*/
|
|
829
830
|
32 && Ne(
|
|
830
831
|
l,
|
|
831
832
|
"altcha-hidden",
|
|
832
833
|
/*state*/
|
|
833
|
-
d[5] ===
|
|
834
|
-
),
|
|
835
|
-
d[2] !== !0 ?
|
|
834
|
+
d[5] === p.VERIFYING
|
|
835
|
+
), X === (X = H(d)) && _ ? _.p(d, I) : (_.d(1), _ = X(d), _ && (_.c(), _.m(h, null))), /*hidelogo*/
|
|
836
|
+
d[2] !== !0 ? k ? k.p(d, I) : (k = Ae(), k.c(), k.m(t, null)) : k && (k.d(1), k = null), /*error*/
|
|
836
837
|
d[8] || /*state*/
|
|
837
|
-
d[5] ===
|
|
838
|
+
d[5] === p.EXPIRED ? g ? g.p(d, I) : (g = Te(d), g.c(), g.m(e, V)) : g && (g.d(1), g = null), /*_strings*/
|
|
838
839
|
d[9].footer && /*hidefooter*/
|
|
839
|
-
d[1] !== !0 ?
|
|
840
|
+
d[1] !== !0 ? b ? b.p(d, I) : (b = Me(d), b.c(), b.m(e, null)) : b && (b.d(1), b = null), I[0] & /*state*/
|
|
840
841
|
32 && c(
|
|
841
842
|
e,
|
|
842
843
|
"data-state",
|
|
@@ -844,18 +845,18 @@ function Pt(r) {
|
|
|
844
845
|
d[5]
|
|
845
846
|
);
|
|
846
847
|
},
|
|
847
|
-
i:
|
|
848
|
-
o:
|
|
848
|
+
i: Q,
|
|
849
|
+
o: Q,
|
|
849
850
|
d(d) {
|
|
850
|
-
d &&
|
|
851
|
+
d && S(e), w && w.d(), _.d(), k && k.d(), g && g.d(), b && b.d(), r[30](null), G = !1, te(U);
|
|
851
852
|
}
|
|
852
853
|
};
|
|
853
854
|
}
|
|
854
|
-
const
|
|
855
|
-
function
|
|
855
|
+
const Ye = "https://altcha.org/";
|
|
856
|
+
function Ve(r) {
|
|
856
857
|
return JSON.parse(r);
|
|
857
858
|
}
|
|
858
|
-
function
|
|
859
|
+
function Ot() {
|
|
859
860
|
try {
|
|
860
861
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
861
862
|
} catch {
|
|
@@ -863,37 +864,37 @@ function Dt() {
|
|
|
863
864
|
}
|
|
864
865
|
function Ft(r, e, t) {
|
|
865
866
|
var Ee, $e;
|
|
866
|
-
let i, l, o, { auto: s = void 0 } = e, { blockspam:
|
|
867
|
+
let i, l, o, { auto: s = void 0 } = e, { blockspam: f = void 0 } = e, { challengeurl: a = void 0 } = e, { challengejson: h = void 0 } = e, { debug: A = !1 } = e, { expire: C = void 0 } = e, { hidefooter: V = !1 } = e, { hidelogo: G = !1 } = e, { name: U = "altcha" } = e, { maxnumber: w = 1e6 } = e, { mockerror: H = !1 } = e, { refetchonexpire: X = !0 } = e, { spamfilter: _ = !1 } = e, { strings: k = void 0 } = e, { test: g = !1 } = e, { verifyurl: b = void 0 } = e, { workers: d = navigator.hardwareConcurrency || 8 } = e;
|
|
867
868
|
const I = bt(), me = ["SHA-256", "SHA-384", "SHA-512"], be = ($e = (Ee = document.documentElement.lang) == null ? void 0 : Ee.split("-")) == null ? void 0 : $e[0];
|
|
868
|
-
let
|
|
869
|
+
let F = !1, re, m = null, se = null, Y = null, D = p.UNVERIFIED, ce;
|
|
869
870
|
mt(() => {
|
|
870
|
-
|
|
871
|
+
m && (m.removeEventListener("submit", ye), m.removeEventListener("reset", ve), m.removeEventListener("focusin", pe), m = null);
|
|
871
872
|
}), gt(() => {
|
|
872
|
-
|
|
873
|
+
L("mounted", "0.4.0"), L("workers", d), g && L("using test mode"), C && ne(C), s !== void 0 && L("auto", s), m = re.closest("form"), m && (m.addEventListener("submit", ye), m.addEventListener("reset", ve), s === "onfocus" && m.addEventListener("focusin", pe)), s === "onload" && P();
|
|
873
874
|
});
|
|
874
|
-
function
|
|
875
|
-
(
|
|
875
|
+
function L(...n) {
|
|
876
|
+
(A || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", ...n);
|
|
876
877
|
}
|
|
877
878
|
function pe(n) {
|
|
878
|
-
|
|
879
|
+
P();
|
|
879
880
|
}
|
|
880
881
|
function ye(n) {
|
|
881
|
-
|
|
882
|
-
|
|
882
|
+
m && s === "onsubmit" && D === p.UNVERIFIED && (n.preventDefault(), n.stopPropagation(), P().then(() => {
|
|
883
|
+
m == null || m.requestSubmit();
|
|
883
884
|
}));
|
|
884
885
|
}
|
|
885
886
|
function ve() {
|
|
886
|
-
|
|
887
|
+
ie();
|
|
887
888
|
}
|
|
888
|
-
function we(n,
|
|
889
|
+
function we(n, u) {
|
|
889
890
|
return btoa(JSON.stringify({
|
|
890
891
|
algorithm: n.algorithm,
|
|
891
892
|
challenge: n.challenge,
|
|
892
|
-
number:
|
|
893
|
+
number: u.number,
|
|
893
894
|
salt: n.salt,
|
|
894
895
|
signature: n.signature,
|
|
895
896
|
test: g ? !0 : void 0,
|
|
896
|
-
took:
|
|
897
|
+
took: u.took
|
|
897
898
|
}));
|
|
898
899
|
}
|
|
899
900
|
function _e(n) {
|
|
@@ -908,125 +909,130 @@ function Ft(r, e, t) {
|
|
|
908
909
|
if (!n.salt || n.salt.length < 10)
|
|
909
910
|
throw new Error("Salt is too short. Min. 10 chars.");
|
|
910
911
|
}
|
|
911
|
-
async function
|
|
912
|
-
|
|
913
|
-
|
|
912
|
+
async function Pe() {
|
|
913
|
+
var n;
|
|
914
|
+
if (H)
|
|
915
|
+
throw L("mocking error"), new Error("Mocked error.");
|
|
914
916
|
if (i)
|
|
915
|
-
return
|
|
917
|
+
return L("using provided json data"), i;
|
|
916
918
|
if (g)
|
|
917
|
-
return
|
|
919
|
+
return L("generating test challenge", { test: g }), Zt(typeof g != "boolean" ? +g : void 0);
|
|
918
920
|
{
|
|
919
|
-
if (!
|
|
921
|
+
if (!a)
|
|
920
922
|
throw new Error("Attribute challengeurl not set.");
|
|
921
|
-
|
|
922
|
-
const
|
|
923
|
+
L("fetching challenge from", a);
|
|
924
|
+
const u = await fetch(a, {
|
|
923
925
|
headers: {
|
|
924
|
-
"x-altcha-spam-filter":
|
|
926
|
+
"x-altcha-spam-filter": _ ? "1" : "0"
|
|
925
927
|
}
|
|
926
928
|
});
|
|
927
|
-
if (
|
|
928
|
-
throw new Error(`Server responded with ${
|
|
929
|
-
const
|
|
930
|
-
if (
|
|
929
|
+
if (u.status !== 200)
|
|
930
|
+
throw new Error(`Server responded with ${u.status}.`);
|
|
931
|
+
const v = u.headers.get("Expires"), N = u.headers.get("X-Altcha-Config"), j = await u.json(), T = new URLSearchParams((n = j.salt.split("?")) == null ? void 0 : n[1]), W = T.get("expires") || T.get("expire");
|
|
932
|
+
if (W) {
|
|
933
|
+
const x = new Date(+W * 1e3), E = isNaN(x.getTime()) ? 0 : x.getTime() - Date.now();
|
|
934
|
+
E > 0 && ne(E);
|
|
935
|
+
}
|
|
936
|
+
if (N)
|
|
931
937
|
try {
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
} catch (
|
|
935
|
-
|
|
938
|
+
const x = JSON.parse(N);
|
|
939
|
+
x && typeof x == "object" && (x.verifyurl && (x.verifyurl = new URL(x.verifyurl, new URL(a)).toString()), xe(x));
|
|
940
|
+
} catch (x) {
|
|
941
|
+
L("unable to configure from X-Altcha-Config", x);
|
|
936
942
|
}
|
|
937
|
-
if (!
|
|
938
|
-
const
|
|
939
|
-
if (
|
|
940
|
-
const
|
|
941
|
-
|
|
943
|
+
if (!C && (v != null && v.length)) {
|
|
944
|
+
const x = Date.parse(v);
|
|
945
|
+
if (x) {
|
|
946
|
+
const E = x - Date.now();
|
|
947
|
+
E > 0 && ne(E);
|
|
942
948
|
}
|
|
943
949
|
}
|
|
944
|
-
return
|
|
950
|
+
return j;
|
|
945
951
|
}
|
|
946
952
|
}
|
|
947
953
|
function ke() {
|
|
948
|
-
|
|
954
|
+
a && X && D === p.VERIFIED ? P() : ie(p.EXPIRED, o.expired);
|
|
949
955
|
}
|
|
950
|
-
async function
|
|
951
|
-
let
|
|
956
|
+
async function We(n) {
|
|
957
|
+
let u = null;
|
|
952
958
|
if ("Worker" in window) {
|
|
953
959
|
try {
|
|
954
|
-
|
|
955
|
-
} catch (
|
|
956
|
-
|
|
960
|
+
u = await Be(n.challenge, n.salt, n.algorithm, n.maxnumber);
|
|
961
|
+
} catch (v) {
|
|
962
|
+
L(v);
|
|
957
963
|
}
|
|
958
|
-
if ((
|
|
959
|
-
return { data: n, solution:
|
|
964
|
+
if ((u == null ? void 0 : u.number) !== void 0)
|
|
965
|
+
return { data: n, solution: u };
|
|
960
966
|
}
|
|
961
967
|
return {
|
|
962
968
|
data: n,
|
|
963
|
-
solution: await
|
|
969
|
+
solution: await At(n.challenge, n.salt, n.algorithm, n.maxnumber || w).promise
|
|
964
970
|
};
|
|
965
971
|
}
|
|
966
|
-
async function
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
972
|
+
async function Be(n, u, v, N = typeof g == "number" ? g : w, j = Math.ceil(d)) {
|
|
973
|
+
const T = [];
|
|
974
|
+
if (j < 1)
|
|
969
975
|
throw new Error("Wrong number of workers configured.");
|
|
970
|
-
if (
|
|
976
|
+
if (j > 16)
|
|
971
977
|
throw new Error("Too many workers. Max. 16 allowed workers.");
|
|
972
|
-
for (let
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
const Ce =
|
|
978
|
+
for (let E = 0; E < j; E++)
|
|
979
|
+
T.push(new Nt());
|
|
980
|
+
const W = Math.ceil(N / j), x = await Promise.all(T.map((E, le) => {
|
|
981
|
+
const Ce = le * W;
|
|
976
982
|
return new Promise((rt) => {
|
|
977
|
-
|
|
983
|
+
E.addEventListener("message", (Le) => {
|
|
978
984
|
if (Le.data)
|
|
979
|
-
for (const
|
|
980
|
-
|
|
985
|
+
for (const Re of T)
|
|
986
|
+
Re !== E && Re.postMessage({ type: "abort" });
|
|
981
987
|
rt(Le.data);
|
|
982
|
-
}),
|
|
988
|
+
}), E.postMessage({
|
|
983
989
|
payload: {
|
|
984
|
-
alg:
|
|
990
|
+
alg: v,
|
|
985
991
|
challenge: n,
|
|
986
|
-
max: Ce +
|
|
987
|
-
salt:
|
|
992
|
+
max: Ce + W,
|
|
993
|
+
salt: u,
|
|
988
994
|
start: Ce
|
|
989
995
|
},
|
|
990
996
|
type: "work"
|
|
991
997
|
});
|
|
992
998
|
});
|
|
993
999
|
}));
|
|
994
|
-
for (const
|
|
995
|
-
|
|
996
|
-
return
|
|
1000
|
+
for (const E of T)
|
|
1001
|
+
E.terminate();
|
|
1002
|
+
return x.find((E) => !!E) || null;
|
|
997
1003
|
}
|
|
998
1004
|
function Ke() {
|
|
999
|
-
[
|
|
1005
|
+
[p.UNVERIFIED, p.ERROR, p.EXPIRED].includes(D) ? _ && (m == null ? void 0 : m.reportValidity()) === !1 ? t(6, F = !1) : P() : t(6, F = !0);
|
|
1000
1006
|
}
|
|
1001
1007
|
function Je() {
|
|
1002
|
-
|
|
1008
|
+
D === p.VERIFYING && alert(o.waitAlert);
|
|
1003
1009
|
}
|
|
1004
|
-
function
|
|
1005
|
-
|
|
1010
|
+
function ne(n) {
|
|
1011
|
+
L("expire", n), clearTimeout(ce), n < 1 ? ke() : ce = setTimeout(ke, n);
|
|
1006
1012
|
}
|
|
1007
1013
|
function ze(n) {
|
|
1008
|
-
var
|
|
1009
|
-
const
|
|
1010
|
-
return ((
|
|
1014
|
+
var v;
|
|
1015
|
+
const u = m == null ? void 0 : m.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1016
|
+
return ((v = u == null ? void 0 : u.value) == null ? void 0 : v.slice(u.value.indexOf("@"))) || void 0;
|
|
1011
1017
|
}
|
|
1012
1018
|
function Qe(n) {
|
|
1013
1019
|
return [
|
|
1014
|
-
...(
|
|
1020
|
+
...(m == null ? void 0 : m.querySelectorAll(n != null && n.length ? n.map((v) => `input[name="${v}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1015
1021
|
].reduce(
|
|
1016
|
-
(
|
|
1017
|
-
const
|
|
1018
|
-
return
|
|
1022
|
+
(v, N) => {
|
|
1023
|
+
const j = N.name, T = N.value.trim();
|
|
1024
|
+
return j && T && (v[j] = T), v;
|
|
1019
1025
|
},
|
|
1020
1026
|
{}
|
|
1021
1027
|
);
|
|
1022
1028
|
}
|
|
1023
1029
|
async function qe(n) {
|
|
1024
|
-
if (!
|
|
1030
|
+
if (!b)
|
|
1025
1031
|
throw new Error("Attribute verifyurl not set.");
|
|
1026
|
-
|
|
1027
|
-
const
|
|
1028
|
-
if (
|
|
1029
|
-
const { email:
|
|
1032
|
+
L("requesting server verification from", b);
|
|
1033
|
+
const u = { payload: n };
|
|
1034
|
+
if (_) {
|
|
1035
|
+
const { email: j, expectedLanguages: T, expectedCountries: W, fields: x, ipAddress: E, timeZone: le } = typeof _ == "object" ? _ : {
|
|
1030
1036
|
email: void 0,
|
|
1031
1037
|
expectedCountries: void 0,
|
|
1032
1038
|
expectedLanguages: void 0,
|
|
@@ -1034,107 +1040,107 @@ function Ft(r, e, t) {
|
|
|
1034
1040
|
ipAddress: void 0,
|
|
1035
1041
|
timeZone: void 0
|
|
1036
1042
|
};
|
|
1037
|
-
|
|
1043
|
+
u.ipAddress = E === !1 ? void 0 : E || "auto", u.email = j === !1 ? void 0 : ze(j), u.fields = x === !1 ? void 0 : Qe(x), u.timeZone = le === !1 ? void 0 : le || Ot(), u.expectedCountries = W, u.expectedLanguages = T || (be ? [be] : void 0);
|
|
1038
1044
|
}
|
|
1039
|
-
const
|
|
1040
|
-
body: JSON.stringify(
|
|
1045
|
+
const v = await fetch(b, {
|
|
1046
|
+
body: JSON.stringify(u),
|
|
1041
1047
|
headers: { "content-type": "application/json" },
|
|
1042
1048
|
method: "POST"
|
|
1043
1049
|
});
|
|
1044
|
-
if (
|
|
1045
|
-
throw new Error(`Server responded with ${
|
|
1046
|
-
const
|
|
1047
|
-
if (
|
|
1050
|
+
if (v.status !== 200)
|
|
1051
|
+
throw new Error(`Server responded with ${v.status}.`);
|
|
1052
|
+
const N = await v.json();
|
|
1053
|
+
if (N != null && N.payload && t(4, Y = N.payload), I("serververification", N), f && N.classification === "BAD")
|
|
1048
1054
|
throw new Error("SpamFilter returned negative classification.");
|
|
1049
1055
|
}
|
|
1050
1056
|
function xe(n) {
|
|
1051
|
-
n.auto !== void 0 && (t(0, s = n.auto), s === "onload" &&
|
|
1057
|
+
n.auto !== void 0 && (t(0, s = n.auto), s === "onload" && P()), n.expire !== void 0 && (ne(n.expire), t(14, C = n.expire)), n.challenge && (_e(n.challenge), i = n.challenge), n.challengeurl !== void 0 && t(12, a = n.challengeurl), n.debug !== void 0 && t(13, A = !!n.debug), n.hidefooter !== void 0 && t(1, V = !!n.hidefooter), n.hidelogo !== void 0 && t(2, G = !!n.hidelogo), n.maxnumber !== void 0 && t(15, w = +n.maxnumber), n.mockerror !== void 0 && t(16, H = !!n.mockerror), n.name !== void 0 && t(3, U = n.name), n.refetchonexpire !== void 0 && t(17, X = !!n.refetchonexpire), n.spamfilter !== void 0 && t(18, _ = typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && t(28, l = n.strings), n.test !== void 0 && t(19, g = typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && t(20, b = n.verifyurl), n.workers !== void 0 && t(21, d = +n.workers);
|
|
1052
1058
|
}
|
|
1053
|
-
function
|
|
1054
|
-
clearTimeout(
|
|
1059
|
+
function ie(n = p.UNVERIFIED, u = null) {
|
|
1060
|
+
clearTimeout(ce), t(6, F = !1), t(8, se = u), t(4, Y = null), t(5, D = n);
|
|
1055
1061
|
}
|
|
1056
|
-
async function
|
|
1057
|
-
return
|
|
1058
|
-
if (
|
|
1059
|
-
if (
|
|
1060
|
-
return qe(we(n,
|
|
1061
|
-
t(4,
|
|
1062
|
+
async function P() {
|
|
1063
|
+
return ie(p.VERIFYING), Pe().then((n) => (_e(n), L("challenge", n), We(n))).then(({ data: n, solution: u }) => {
|
|
1064
|
+
if (L("solution", u), (u == null ? void 0 : u.number) !== void 0) {
|
|
1065
|
+
if (b)
|
|
1066
|
+
return qe(we(n, u));
|
|
1067
|
+
t(4, Y = we(n, u)), L("payload", Y);
|
|
1062
1068
|
} else
|
|
1063
|
-
throw
|
|
1069
|
+
throw L("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1064
1070
|
}).then(() => {
|
|
1065
1071
|
pt().then(() => {
|
|
1066
|
-
t(5,
|
|
1072
|
+
t(5, D = p.VERIFIED), t(6, F = !0), L("verified"), I("verified", { payload: Y });
|
|
1067
1073
|
});
|
|
1068
1074
|
}).catch((n) => {
|
|
1069
|
-
|
|
1075
|
+
L(n), t(5, D = p.ERROR), t(6, F = !1), t(8, se = n.message);
|
|
1070
1076
|
});
|
|
1071
1077
|
}
|
|
1072
1078
|
function et() {
|
|
1073
|
-
|
|
1079
|
+
F = this.checked, t(6, F);
|
|
1074
1080
|
}
|
|
1075
1081
|
function tt(n) {
|
|
1076
1082
|
ue[n ? "unshift" : "push"](() => {
|
|
1077
|
-
|
|
1083
|
+
re = n, t(7, re);
|
|
1078
1084
|
});
|
|
1079
1085
|
}
|
|
1080
1086
|
return r.$$set = (n) => {
|
|
1081
|
-
"auto" in n && t(0, s = n.auto), "blockspam" in n && t(22,
|
|
1087
|
+
"auto" in n && t(0, s = n.auto), "blockspam" in n && t(22, f = n.blockspam), "challengeurl" in n && t(12, a = n.challengeurl), "challengejson" in n && t(23, h = n.challengejson), "debug" in n && t(13, A = n.debug), "expire" in n && t(14, C = n.expire), "hidefooter" in n && t(1, V = n.hidefooter), "hidelogo" in n && t(2, G = n.hidelogo), "name" in n && t(3, U = n.name), "maxnumber" in n && t(15, w = n.maxnumber), "mockerror" in n && t(16, H = n.mockerror), "refetchonexpire" in n && t(17, X = n.refetchonexpire), "spamfilter" in n && t(18, _ = n.spamfilter), "strings" in n && t(24, k = n.strings), "test" in n && t(19, g = n.test), "verifyurl" in n && t(20, b = n.verifyurl), "workers" in n && t(21, d = n.workers);
|
|
1082
1088
|
}, r.$$.update = () => {
|
|
1083
1089
|
r.$$.dirty[0] & /*challengejson*/
|
|
1084
|
-
8388608 && (i =
|
|
1085
|
-
16777216 && t(28, l =
|
|
1090
|
+
8388608 && (i = h ? Ve(h) : void 0), r.$$.dirty[0] & /*strings*/
|
|
1091
|
+
16777216 && t(28, l = k ? Ve(k) : {}), r.$$.dirty[0] & /*parsedStrings*/
|
|
1086
1092
|
268435456 && t(9, o = {
|
|
1087
1093
|
error: "Verification failed. Try again later.",
|
|
1088
1094
|
expired: "Verification expired. Try again.",
|
|
1089
|
-
footer: `Protected by <a href="${
|
|
1095
|
+
footer: `Protected by <a href="${Ye}" target="_blank">ALTCHA</a>`,
|
|
1090
1096
|
label: "I'm not a robot",
|
|
1091
1097
|
verified: "Verified",
|
|
1092
1098
|
verifying: "Verifying...",
|
|
1093
1099
|
waitAlert: "Verifying... please wait.",
|
|
1094
1100
|
...l
|
|
1095
1101
|
}), r.$$.dirty[0] & /*payload, state*/
|
|
1096
|
-
48 && I("statechange", { payload:
|
|
1102
|
+
48 && I("statechange", { payload: Y, state: D });
|
|
1097
1103
|
}, [
|
|
1098
1104
|
s,
|
|
1099
|
-
|
|
1100
|
-
Z,
|
|
1105
|
+
V,
|
|
1101
1106
|
G,
|
|
1102
|
-
|
|
1103
|
-
|
|
1107
|
+
U,
|
|
1108
|
+
Y,
|
|
1104
1109
|
D,
|
|
1105
|
-
|
|
1106
|
-
|
|
1110
|
+
F,
|
|
1111
|
+
re,
|
|
1112
|
+
se,
|
|
1107
1113
|
o,
|
|
1108
1114
|
Ke,
|
|
1109
1115
|
Je,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1116
|
+
a,
|
|
1117
|
+
A,
|
|
1118
|
+
C,
|
|
1119
|
+
w,
|
|
1120
|
+
H,
|
|
1121
|
+
X,
|
|
1113
1122
|
_,
|
|
1114
|
-
F,
|
|
1115
|
-
V,
|
|
1116
|
-
k,
|
|
1117
1123
|
g,
|
|
1118
|
-
|
|
1124
|
+
b,
|
|
1119
1125
|
d,
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1126
|
+
f,
|
|
1127
|
+
h,
|
|
1128
|
+
k,
|
|
1123
1129
|
xe,
|
|
1124
|
-
|
|
1125
|
-
|
|
1130
|
+
ie,
|
|
1131
|
+
P,
|
|
1126
1132
|
l,
|
|
1127
1133
|
et,
|
|
1128
1134
|
tt
|
|
1129
1135
|
];
|
|
1130
1136
|
}
|
|
1131
|
-
class
|
|
1137
|
+
class Ht extends Lt {
|
|
1132
1138
|
constructor(e) {
|
|
1133
1139
|
super(), $t(
|
|
1134
1140
|
this,
|
|
1135
1141
|
e,
|
|
1136
1142
|
Ft,
|
|
1137
|
-
|
|
1143
|
+
Dt,
|
|
1138
1144
|
lt,
|
|
1139
1145
|
{
|
|
1140
1146
|
auto: 0,
|
|
@@ -1158,7 +1164,7 @@ class Wt extends Lt {
|
|
|
1158
1164
|
reset: 26,
|
|
1159
1165
|
verify: 27
|
|
1160
1166
|
},
|
|
1161
|
-
|
|
1167
|
+
Tt,
|
|
1162
1168
|
[-1, -1]
|
|
1163
1169
|
);
|
|
1164
1170
|
}
|
|
@@ -1166,103 +1172,103 @@ class Wt extends Lt {
|
|
|
1166
1172
|
return this.$$.ctx[0];
|
|
1167
1173
|
}
|
|
1168
1174
|
set auto(e) {
|
|
1169
|
-
this.$$set({ auto: e }),
|
|
1175
|
+
this.$$set({ auto: e }), $();
|
|
1170
1176
|
}
|
|
1171
1177
|
get blockspam() {
|
|
1172
1178
|
return this.$$.ctx[22];
|
|
1173
1179
|
}
|
|
1174
1180
|
set blockspam(e) {
|
|
1175
|
-
this.$$set({ blockspam: e }),
|
|
1181
|
+
this.$$set({ blockspam: e }), $();
|
|
1176
1182
|
}
|
|
1177
1183
|
get challengeurl() {
|
|
1178
1184
|
return this.$$.ctx[12];
|
|
1179
1185
|
}
|
|
1180
1186
|
set challengeurl(e) {
|
|
1181
|
-
this.$$set({ challengeurl: e }),
|
|
1187
|
+
this.$$set({ challengeurl: e }), $();
|
|
1182
1188
|
}
|
|
1183
1189
|
get challengejson() {
|
|
1184
1190
|
return this.$$.ctx[23];
|
|
1185
1191
|
}
|
|
1186
1192
|
set challengejson(e) {
|
|
1187
|
-
this.$$set({ challengejson: e }),
|
|
1193
|
+
this.$$set({ challengejson: e }), $();
|
|
1188
1194
|
}
|
|
1189
1195
|
get debug() {
|
|
1190
1196
|
return this.$$.ctx[13];
|
|
1191
1197
|
}
|
|
1192
1198
|
set debug(e) {
|
|
1193
|
-
this.$$set({ debug: e }),
|
|
1199
|
+
this.$$set({ debug: e }), $();
|
|
1194
1200
|
}
|
|
1195
1201
|
get expire() {
|
|
1196
1202
|
return this.$$.ctx[14];
|
|
1197
1203
|
}
|
|
1198
1204
|
set expire(e) {
|
|
1199
|
-
this.$$set({ expire: e }),
|
|
1205
|
+
this.$$set({ expire: e }), $();
|
|
1200
1206
|
}
|
|
1201
1207
|
get hidefooter() {
|
|
1202
1208
|
return this.$$.ctx[1];
|
|
1203
1209
|
}
|
|
1204
1210
|
set hidefooter(e) {
|
|
1205
|
-
this.$$set({ hidefooter: e }),
|
|
1211
|
+
this.$$set({ hidefooter: e }), $();
|
|
1206
1212
|
}
|
|
1207
1213
|
get hidelogo() {
|
|
1208
1214
|
return this.$$.ctx[2];
|
|
1209
1215
|
}
|
|
1210
1216
|
set hidelogo(e) {
|
|
1211
|
-
this.$$set({ hidelogo: e }),
|
|
1217
|
+
this.$$set({ hidelogo: e }), $();
|
|
1212
1218
|
}
|
|
1213
1219
|
get name() {
|
|
1214
1220
|
return this.$$.ctx[3];
|
|
1215
1221
|
}
|
|
1216
1222
|
set name(e) {
|
|
1217
|
-
this.$$set({ name: e }),
|
|
1223
|
+
this.$$set({ name: e }), $();
|
|
1218
1224
|
}
|
|
1219
1225
|
get maxnumber() {
|
|
1220
1226
|
return this.$$.ctx[15];
|
|
1221
1227
|
}
|
|
1222
1228
|
set maxnumber(e) {
|
|
1223
|
-
this.$$set({ maxnumber: e }),
|
|
1229
|
+
this.$$set({ maxnumber: e }), $();
|
|
1224
1230
|
}
|
|
1225
1231
|
get mockerror() {
|
|
1226
1232
|
return this.$$.ctx[16];
|
|
1227
1233
|
}
|
|
1228
1234
|
set mockerror(e) {
|
|
1229
|
-
this.$$set({ mockerror: e }),
|
|
1235
|
+
this.$$set({ mockerror: e }), $();
|
|
1230
1236
|
}
|
|
1231
1237
|
get refetchonexpire() {
|
|
1232
1238
|
return this.$$.ctx[17];
|
|
1233
1239
|
}
|
|
1234
1240
|
set refetchonexpire(e) {
|
|
1235
|
-
this.$$set({ refetchonexpire: e }),
|
|
1241
|
+
this.$$set({ refetchonexpire: e }), $();
|
|
1236
1242
|
}
|
|
1237
1243
|
get spamfilter() {
|
|
1238
1244
|
return this.$$.ctx[18];
|
|
1239
1245
|
}
|
|
1240
1246
|
set spamfilter(e) {
|
|
1241
|
-
this.$$set({ spamfilter: e }),
|
|
1247
|
+
this.$$set({ spamfilter: e }), $();
|
|
1242
1248
|
}
|
|
1243
1249
|
get strings() {
|
|
1244
1250
|
return this.$$.ctx[24];
|
|
1245
1251
|
}
|
|
1246
1252
|
set strings(e) {
|
|
1247
|
-
this.$$set({ strings: e }),
|
|
1253
|
+
this.$$set({ strings: e }), $();
|
|
1248
1254
|
}
|
|
1249
1255
|
get test() {
|
|
1250
1256
|
return this.$$.ctx[19];
|
|
1251
1257
|
}
|
|
1252
1258
|
set test(e) {
|
|
1253
|
-
this.$$set({ test: e }),
|
|
1259
|
+
this.$$set({ test: e }), $();
|
|
1254
1260
|
}
|
|
1255
1261
|
get verifyurl() {
|
|
1256
1262
|
return this.$$.ctx[20];
|
|
1257
1263
|
}
|
|
1258
1264
|
set verifyurl(e) {
|
|
1259
|
-
this.$$set({ verifyurl: e }),
|
|
1265
|
+
this.$$set({ verifyurl: e }), $();
|
|
1260
1266
|
}
|
|
1261
1267
|
get workers() {
|
|
1262
1268
|
return this.$$.ctx[21];
|
|
1263
1269
|
}
|
|
1264
1270
|
set workers(e) {
|
|
1265
|
-
this.$$set({ workers: e }),
|
|
1271
|
+
this.$$set({ workers: e }), $();
|
|
1266
1272
|
}
|
|
1267
1273
|
get configure() {
|
|
1268
1274
|
return this.$$.ctx[25];
|
|
@@ -1274,7 +1280,7 @@ class Wt extends Lt {
|
|
|
1274
1280
|
return this.$$.ctx[27];
|
|
1275
1281
|
}
|
|
1276
1282
|
}
|
|
1277
|
-
customElements.define("altcha-widget", Ct(
|
|
1283
|
+
customElements.define("altcha-widget", Ct(Ht, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, expire: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {} }, [], ["configure", "reset", "verify"], !1));
|
|
1278
1284
|
export {
|
|
1279
|
-
|
|
1285
|
+
Ht as Altcha
|
|
1280
1286
|
};
|