altcha 0.7.0 → 0.9.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/README.md +86 -50
- package/dist/altcha.d.ts +24 -5
- package/dist/altcha.js +972 -824
- package/dist/altcha.umd.cjs +2 -2
- package/dist_external/altcha.d.ts +24 -5
- package/dist_external/altcha.js +1009 -861
- package/dist_external/altcha.umd.cjs +2 -2
- package/dist_external/worker.js +1 -1
- package/dist_plugins/analytics.d.ts +1 -0
- package/dist_plugins/analytics.js +290 -0
- package/dist_plugins/analytics.umd.cjs +1 -0
- package/dist_plugins/obfuscation.d.ts +1 -0
- package/dist_plugins/obfuscation.js +138 -0
- package/dist_plugins/obfuscation.umd.cjs +1 -0
- package/dist_plugins/upload.d.ts +1 -0
- package/dist_plugins/upload.js +458 -0
- package/dist_plugins/upload.umd.cjs +4 -0
- package/package.json +39 -22
package/dist_external/altcha.js
CHANGED
|
@@ -1,70 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var Ut = (n, e, t) => e in n ? Pt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
-
var S = (n, e, t) => Ut(n, typeof e != "symbol" ? e + "" : e, t), rt = (n, e, t) => e.has(n) || it("Cannot " + t);
|
|
7
|
-
var U = (n, e, t) => (rt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), re = (n, e, t) => e.has(n) ? it("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), ot = (n, e, t, r) => (rt(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t);
|
|
8
|
-
function ce() {
|
|
1
|
+
var jt = Object.defineProperty;
|
|
2
|
+
var Ht = (n, e, t) => e in n ? jt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Z = (n, e, t) => Ht(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
function xe() {
|
|
9
5
|
}
|
|
10
|
-
function
|
|
6
|
+
function Ot(n, e) {
|
|
7
|
+
for (const t in e) n[t] = e[t];
|
|
8
|
+
return (
|
|
9
|
+
/** @type {T & S} */
|
|
10
|
+
n
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function ht(n) {
|
|
11
14
|
return n();
|
|
12
15
|
}
|
|
13
|
-
function
|
|
16
|
+
function nt() {
|
|
14
17
|
return /* @__PURE__ */ Object.create(null);
|
|
15
18
|
}
|
|
16
|
-
function
|
|
17
|
-
n.forEach(
|
|
19
|
+
function pe(n) {
|
|
20
|
+
n.forEach(ht);
|
|
18
21
|
}
|
|
19
|
-
function
|
|
22
|
+
function dt(n) {
|
|
20
23
|
return typeof n == "function";
|
|
21
24
|
}
|
|
22
|
-
function
|
|
25
|
+
function Ut(n, e) {
|
|
23
26
|
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
24
27
|
}
|
|
25
|
-
function
|
|
28
|
+
function $t(n) {
|
|
26
29
|
return Object.keys(n).length === 0;
|
|
27
30
|
}
|
|
28
|
-
function
|
|
31
|
+
function Bt(n, e, t, i) {
|
|
32
|
+
if (n) {
|
|
33
|
+
const o = gt(n, e, t, i);
|
|
34
|
+
return n[0](o);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function gt(n, e, t, i) {
|
|
38
|
+
return n[1] && i ? Ot(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
39
|
+
}
|
|
40
|
+
function qt(n, e, t, i) {
|
|
41
|
+
if (n[2] && i) {
|
|
42
|
+
const o = n[2](i(t));
|
|
43
|
+
if (e.dirty === void 0)
|
|
44
|
+
return o;
|
|
45
|
+
if (typeof o == "object") {
|
|
46
|
+
const l = [], s = Math.max(e.dirty.length, o.length);
|
|
47
|
+
for (let h = 0; h < s; h += 1)
|
|
48
|
+
l[h] = e.dirty[h] | o[h];
|
|
49
|
+
return l;
|
|
50
|
+
}
|
|
51
|
+
return e.dirty | o;
|
|
52
|
+
}
|
|
53
|
+
return e.dirty;
|
|
54
|
+
}
|
|
55
|
+
function Zt(n, e, t, i, o, l) {
|
|
56
|
+
if (o) {
|
|
57
|
+
const s = gt(e, t, i, l);
|
|
58
|
+
n.p(s, o);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function Gt(n) {
|
|
62
|
+
if (n.ctx.length > 32) {
|
|
63
|
+
const e = [], t = n.ctx.length / 32;
|
|
64
|
+
for (let i = 0; i < t; i++)
|
|
65
|
+
e[i] = -1;
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
return -1;
|
|
69
|
+
}
|
|
70
|
+
function L(n, e) {
|
|
29
71
|
n.appendChild(e);
|
|
30
72
|
}
|
|
31
|
-
function
|
|
73
|
+
function H(n, e, t) {
|
|
32
74
|
n.insertBefore(e, t || null);
|
|
33
75
|
}
|
|
34
|
-
function
|
|
76
|
+
function j(n) {
|
|
35
77
|
n.parentNode && n.parentNode.removeChild(n);
|
|
36
78
|
}
|
|
37
79
|
function F(n) {
|
|
38
80
|
return document.createElement(n);
|
|
39
81
|
}
|
|
40
|
-
function
|
|
82
|
+
function K(n) {
|
|
41
83
|
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
42
84
|
}
|
|
43
|
-
function
|
|
85
|
+
function Yt(n) {
|
|
44
86
|
return document.createTextNode(n);
|
|
45
87
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
function $t() {
|
|
50
|
-
return yt("");
|
|
88
|
+
function z() {
|
|
89
|
+
return Yt(" ");
|
|
51
90
|
}
|
|
52
|
-
function
|
|
53
|
-
return n.addEventListener(e, t,
|
|
91
|
+
function Le(n, e, t, i) {
|
|
92
|
+
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
54
93
|
}
|
|
55
|
-
function
|
|
94
|
+
function c(n, e, t) {
|
|
56
95
|
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
57
96
|
}
|
|
58
|
-
function
|
|
97
|
+
function Wt(n) {
|
|
59
98
|
return Array.from(n.childNodes);
|
|
60
99
|
}
|
|
61
|
-
function
|
|
100
|
+
function rt(n, e, t) {
|
|
62
101
|
n.classList.toggle(e, !!t);
|
|
63
102
|
}
|
|
64
|
-
function
|
|
65
|
-
return new CustomEvent(n, { detail: e, bubbles: t, cancelable:
|
|
103
|
+
function Xt(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
104
|
+
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
66
105
|
}
|
|
67
|
-
function
|
|
106
|
+
function Jt(n) {
|
|
68
107
|
const e = {};
|
|
69
108
|
return n.childNodes.forEach(
|
|
70
109
|
/** @param {Element} node */
|
|
@@ -73,215 +112,224 @@ function Yt(n) {
|
|
|
73
112
|
}
|
|
74
113
|
), e;
|
|
75
114
|
}
|
|
76
|
-
let
|
|
77
|
-
function
|
|
78
|
-
|
|
115
|
+
let we;
|
|
116
|
+
function _e(n) {
|
|
117
|
+
we = n;
|
|
79
118
|
}
|
|
80
|
-
function
|
|
81
|
-
if (!
|
|
82
|
-
return
|
|
119
|
+
function Te() {
|
|
120
|
+
if (!we) throw new Error("Function called outside component initialization");
|
|
121
|
+
return we;
|
|
83
122
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
123
|
+
function zt(n) {
|
|
124
|
+
Te().$$.on_mount.push(n);
|
|
86
125
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
126
|
+
function Kt(n) {
|
|
127
|
+
Te().$$.on_destroy.push(n);
|
|
89
128
|
}
|
|
90
|
-
function
|
|
91
|
-
const n =
|
|
92
|
-
return (e, t, { cancelable:
|
|
129
|
+
function Qt() {
|
|
130
|
+
const n = Te();
|
|
131
|
+
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
93
132
|
const o = n.$$.callbacks[e];
|
|
94
133
|
if (o) {
|
|
95
|
-
const
|
|
134
|
+
const l = Xt(
|
|
96
135
|
/** @type {string} */
|
|
97
136
|
e,
|
|
98
137
|
t,
|
|
99
|
-
{ cancelable:
|
|
138
|
+
{ cancelable: i }
|
|
100
139
|
);
|
|
101
|
-
return o.slice().forEach((
|
|
102
|
-
|
|
103
|
-
}), !
|
|
140
|
+
return o.slice().forEach((s) => {
|
|
141
|
+
s.call(n, l);
|
|
142
|
+
}), !l.defaultPrevented;
|
|
104
143
|
}
|
|
105
144
|
return !0;
|
|
106
145
|
};
|
|
107
146
|
}
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
const
|
|
111
|
-
let
|
|
112
|
-
function
|
|
113
|
-
|
|
147
|
+
const ce = [], Ae = [];
|
|
148
|
+
let ue = [];
|
|
149
|
+
const it = [], mt = /* @__PURE__ */ Promise.resolve();
|
|
150
|
+
let Se = !1;
|
|
151
|
+
function bt() {
|
|
152
|
+
Se || (Se = !0, mt.then(p));
|
|
114
153
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
154
|
+
function en() {
|
|
155
|
+
return bt(), mt;
|
|
117
156
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
157
|
+
function De(n) {
|
|
158
|
+
ue.push(n);
|
|
120
159
|
}
|
|
121
|
-
const
|
|
122
|
-
let
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
160
|
+
const Re = /* @__PURE__ */ new Set();
|
|
161
|
+
let fe = 0;
|
|
162
|
+
function p() {
|
|
163
|
+
if (fe !== 0)
|
|
125
164
|
return;
|
|
126
|
-
const n =
|
|
165
|
+
const n = we;
|
|
127
166
|
do {
|
|
128
167
|
try {
|
|
129
|
-
for (;
|
|
130
|
-
const e =
|
|
131
|
-
|
|
168
|
+
for (; fe < ce.length; ) {
|
|
169
|
+
const e = ce[fe];
|
|
170
|
+
fe++, _e(e), tn(e.$$);
|
|
132
171
|
}
|
|
133
172
|
} catch (e) {
|
|
134
|
-
throw
|
|
173
|
+
throw ce.length = 0, fe = 0, e;
|
|
135
174
|
}
|
|
136
|
-
for (
|
|
137
|
-
for (let e = 0; e <
|
|
138
|
-
const t =
|
|
139
|
-
|
|
175
|
+
for (_e(null), ce.length = 0, fe = 0; Ae.length; ) Ae.pop()();
|
|
176
|
+
for (let e = 0; e < ue.length; e += 1) {
|
|
177
|
+
const t = ue[e];
|
|
178
|
+
Re.has(t) || (Re.add(t), t());
|
|
140
179
|
}
|
|
141
|
-
|
|
142
|
-
} while (
|
|
143
|
-
for (;
|
|
144
|
-
|
|
145
|
-
|
|
180
|
+
ue.length = 0;
|
|
181
|
+
} while (ce.length);
|
|
182
|
+
for (; it.length; )
|
|
183
|
+
it.pop()();
|
|
184
|
+
Se = !1, Re.clear(), _e(n);
|
|
146
185
|
}
|
|
147
|
-
function
|
|
186
|
+
function tn(n) {
|
|
148
187
|
if (n.fragment !== null) {
|
|
149
|
-
n.update(),
|
|
188
|
+
n.update(), pe(n.before_update);
|
|
150
189
|
const e = n.dirty;
|
|
151
|
-
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(
|
|
190
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(De);
|
|
152
191
|
}
|
|
153
192
|
}
|
|
154
|
-
function
|
|
193
|
+
function nn(n) {
|
|
155
194
|
const e = [], t = [];
|
|
156
|
-
|
|
195
|
+
ue.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), ue = e;
|
|
157
196
|
}
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
197
|
+
const ve = /* @__PURE__ */ new Set();
|
|
198
|
+
let rn;
|
|
199
|
+
function yt(n, e) {
|
|
200
|
+
n && n.i && (ve.delete(n), n.i(e));
|
|
161
201
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
202
|
+
function on(n, e, t, i) {
|
|
203
|
+
if (n && n.o) {
|
|
204
|
+
if (ve.has(n)) return;
|
|
205
|
+
ve.add(n), rn.c.push(() => {
|
|
206
|
+
ve.delete(n);
|
|
207
|
+
}), n.o(e);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function ln(n, e, t) {
|
|
211
|
+
const { fragment: i, after_update: o } = n.$$;
|
|
212
|
+
i && i.m(e, t), De(() => {
|
|
213
|
+
const l = n.$$.on_mount.map(ht).filter(dt);
|
|
214
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...l) : pe(l), n.$$.on_mount = [];
|
|
215
|
+
}), o.forEach(De);
|
|
168
216
|
}
|
|
169
|
-
function
|
|
217
|
+
function sn(n, e) {
|
|
170
218
|
const t = n.$$;
|
|
171
|
-
t.fragment !== null && (
|
|
219
|
+
t.fragment !== null && (nn(t.after_update), pe(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
172
220
|
}
|
|
173
|
-
function
|
|
174
|
-
n.$$.dirty[0] === -1 && (
|
|
221
|
+
function fn(n, e) {
|
|
222
|
+
n.$$.dirty[0] === -1 && (ce.push(n), bt(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
175
223
|
}
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
const
|
|
224
|
+
function cn(n, e, t, i, o, l, s = null, h = [-1]) {
|
|
225
|
+
const d = we;
|
|
226
|
+
_e(n);
|
|
227
|
+
const u = n.$$ = {
|
|
180
228
|
fragment: null,
|
|
181
229
|
ctx: [],
|
|
182
230
|
// state
|
|
183
|
-
props:
|
|
184
|
-
update:
|
|
231
|
+
props: l,
|
|
232
|
+
update: xe,
|
|
185
233
|
not_equal: o,
|
|
186
|
-
bound:
|
|
234
|
+
bound: nt(),
|
|
187
235
|
// lifecycle
|
|
188
236
|
on_mount: [],
|
|
189
237
|
on_destroy: [],
|
|
190
238
|
on_disconnect: [],
|
|
191
239
|
before_update: [],
|
|
192
240
|
after_update: [],
|
|
193
|
-
context: new Map(e.context || (
|
|
241
|
+
context: new Map(e.context || (d ? d.$$.context : [])),
|
|
194
242
|
// everything else
|
|
195
|
-
callbacks:
|
|
196
|
-
dirty:
|
|
243
|
+
callbacks: nt(),
|
|
244
|
+
dirty: h,
|
|
197
245
|
skip_bound: !1,
|
|
198
|
-
root: e.target ||
|
|
246
|
+
root: e.target || d.$$.root
|
|
199
247
|
};
|
|
200
|
-
|
|
201
|
-
let
|
|
202
|
-
if (
|
|
203
|
-
const
|
|
204
|
-
return
|
|
205
|
-
}) : [],
|
|
248
|
+
s && s(u.root);
|
|
249
|
+
let A = !1;
|
|
250
|
+
if (u.ctx = t ? t(n, e.props || {}, (b, Y, ...U) => {
|
|
251
|
+
const $ = U.length ? U[0] : Y;
|
|
252
|
+
return u.ctx && o(u.ctx[b], u.ctx[b] = $) && (!u.skip_bound && u.bound[b] && u.bound[b]($), A && fn(n, b)), Y;
|
|
253
|
+
}) : [], u.update(), A = !0, pe(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
|
|
206
254
|
if (e.hydrate) {
|
|
207
|
-
const
|
|
208
|
-
|
|
255
|
+
const b = Wt(e.target);
|
|
256
|
+
u.fragment && u.fragment.l(b), b.forEach(j);
|
|
209
257
|
} else
|
|
210
|
-
|
|
211
|
-
e.intro &&
|
|
258
|
+
u.fragment && u.fragment.c();
|
|
259
|
+
e.intro && yt(n.$$.fragment), ln(n, e.target, e.anchor), p();
|
|
212
260
|
}
|
|
213
|
-
|
|
261
|
+
_e(d);
|
|
214
262
|
}
|
|
215
|
-
let
|
|
216
|
-
typeof HTMLElement == "function" && (
|
|
217
|
-
constructor(e, t,
|
|
263
|
+
let _t;
|
|
264
|
+
typeof HTMLElement == "function" && (_t = class extends HTMLElement {
|
|
265
|
+
constructor(e, t, i) {
|
|
218
266
|
super();
|
|
219
267
|
/** The Svelte component constructor */
|
|
220
|
-
|
|
268
|
+
Z(this, "$$ctor");
|
|
221
269
|
/** Slots */
|
|
222
|
-
|
|
270
|
+
Z(this, "$$s");
|
|
223
271
|
/** The Svelte component instance */
|
|
224
|
-
|
|
272
|
+
Z(this, "$$c");
|
|
225
273
|
/** Whether or not the custom element is connected */
|
|
226
|
-
|
|
274
|
+
Z(this, "$$cn", !1);
|
|
227
275
|
/** Component props data */
|
|
228
|
-
|
|
276
|
+
Z(this, "$$d", {});
|
|
229
277
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
230
|
-
|
|
278
|
+
Z(this, "$$r", !1);
|
|
231
279
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
232
|
-
|
|
280
|
+
Z(this, "$$p_d", {});
|
|
233
281
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
234
|
-
|
|
282
|
+
Z(this, "$$l", {});
|
|
235
283
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
236
|
-
|
|
237
|
-
this.$$ctor = e, this.$$s = t,
|
|
284
|
+
Z(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
285
|
+
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
|
|
238
286
|
}
|
|
239
|
-
addEventListener(e, t,
|
|
287
|
+
addEventListener(e, t, i) {
|
|
240
288
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
241
289
|
const o = this.$$c.$on(e, t);
|
|
242
290
|
this.$$l_u.set(t, o);
|
|
243
291
|
}
|
|
244
|
-
super.addEventListener(e, t,
|
|
292
|
+
super.addEventListener(e, t, i);
|
|
245
293
|
}
|
|
246
|
-
removeEventListener(e, t,
|
|
247
|
-
if (super.removeEventListener(e, t,
|
|
294
|
+
removeEventListener(e, t, i) {
|
|
295
|
+
if (super.removeEventListener(e, t, i), this.$$c) {
|
|
248
296
|
const o = this.$$l_u.get(t);
|
|
249
297
|
o && (o(), this.$$l_u.delete(t));
|
|
250
298
|
}
|
|
251
299
|
}
|
|
252
300
|
async connectedCallback() {
|
|
253
301
|
if (this.$$cn = !0, !this.$$c) {
|
|
254
|
-
let e = function(
|
|
302
|
+
let e = function(l) {
|
|
255
303
|
return () => {
|
|
256
|
-
let
|
|
304
|
+
let s;
|
|
257
305
|
return {
|
|
258
306
|
c: function() {
|
|
259
|
-
|
|
307
|
+
s = F("slot"), l !== "default" && c(s, "name", l);
|
|
260
308
|
},
|
|
261
309
|
/**
|
|
262
310
|
* @param {HTMLElement} target
|
|
263
311
|
* @param {HTMLElement} [anchor]
|
|
264
312
|
*/
|
|
265
|
-
m: function(
|
|
266
|
-
|
|
313
|
+
m: function(u, A) {
|
|
314
|
+
H(u, s, A);
|
|
267
315
|
},
|
|
268
|
-
d: function(
|
|
269
|
-
|
|
316
|
+
d: function(u) {
|
|
317
|
+
u && j(s);
|
|
270
318
|
}
|
|
271
319
|
};
|
|
272
320
|
};
|
|
273
321
|
};
|
|
274
322
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
275
323
|
return;
|
|
276
|
-
const t = {},
|
|
277
|
-
for (const
|
|
278
|
-
|
|
279
|
-
for (const
|
|
280
|
-
const
|
|
281
|
-
|
|
324
|
+
const t = {}, i = Jt(this);
|
|
325
|
+
for (const l of this.$$s)
|
|
326
|
+
l in i && (t[l] = [e(l)]);
|
|
327
|
+
for (const l of this.attributes) {
|
|
328
|
+
const s = this.$$g_p(l.name);
|
|
329
|
+
s in this.$$d || (this.$$d[s] = Ce(s, l.value, this.$$p_d, "toProp"));
|
|
282
330
|
}
|
|
283
|
-
for (const
|
|
284
|
-
!(
|
|
331
|
+
for (const l in this.$$p_d)
|
|
332
|
+
!(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
|
|
285
333
|
this.$$c = new this.$$ctor({
|
|
286
334
|
target: this.shadowRoot || this,
|
|
287
335
|
props: {
|
|
@@ -294,32 +342,32 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
294
342
|
});
|
|
295
343
|
const o = () => {
|
|
296
344
|
this.$$r = !0;
|
|
297
|
-
for (const
|
|
298
|
-
if (this.$$d[
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
this.$$d[
|
|
345
|
+
for (const l in this.$$p_d)
|
|
346
|
+
if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
|
|
347
|
+
const s = Ce(
|
|
348
|
+
l,
|
|
349
|
+
this.$$d[l],
|
|
302
350
|
this.$$p_d,
|
|
303
351
|
"toAttribute"
|
|
304
352
|
);
|
|
305
|
-
|
|
353
|
+
s == null ? this.removeAttribute(this.$$p_d[l].attribute || l) : this.setAttribute(this.$$p_d[l].attribute || l, s);
|
|
306
354
|
}
|
|
307
355
|
this.$$r = !1;
|
|
308
356
|
};
|
|
309
357
|
this.$$c.$$.after_update.push(o), o();
|
|
310
|
-
for (const
|
|
311
|
-
for (const
|
|
312
|
-
const
|
|
313
|
-
this.$$l_u.set(
|
|
358
|
+
for (const l in this.$$l)
|
|
359
|
+
for (const s of this.$$l[l]) {
|
|
360
|
+
const h = this.$$c.$on(l, s);
|
|
361
|
+
this.$$l_u.set(s, h);
|
|
314
362
|
}
|
|
315
363
|
this.$$l = {};
|
|
316
364
|
}
|
|
317
365
|
}
|
|
318
366
|
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
319
367
|
// and setting attributes through setAttribute etc, this is helpful
|
|
320
|
-
attributeChangedCallback(e, t,
|
|
368
|
+
attributeChangedCallback(e, t, i) {
|
|
321
369
|
var o;
|
|
322
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
370
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ce(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
|
|
323
371
|
}
|
|
324
372
|
disconnectedCallback() {
|
|
325
373
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -332,12 +380,12 @@ typeof HTMLElement == "function" && (kt = class extends HTMLElement {
|
|
|
332
380
|
) || e;
|
|
333
381
|
}
|
|
334
382
|
});
|
|
335
|
-
function
|
|
336
|
-
var
|
|
337
|
-
const o = (
|
|
338
|
-
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !
|
|
383
|
+
function Ce(n, e, t, i) {
|
|
384
|
+
var l;
|
|
385
|
+
const o = (l = t[n]) == null ? void 0 : l.type;
|
|
386
|
+
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[n])
|
|
339
387
|
return e;
|
|
340
|
-
if (
|
|
388
|
+
if (i === "toAttribute")
|
|
341
389
|
switch (o) {
|
|
342
390
|
case "Object":
|
|
343
391
|
case "Array":
|
|
@@ -362,38 +410,38 @@ function Te(n, e, t, r) {
|
|
|
362
410
|
return e;
|
|
363
411
|
}
|
|
364
412
|
}
|
|
365
|
-
function
|
|
366
|
-
let
|
|
413
|
+
function un(n, e, t, i, o, l) {
|
|
414
|
+
let s = class extends _t {
|
|
367
415
|
constructor() {
|
|
368
416
|
super(n, t, o), this.$$p_d = e;
|
|
369
417
|
}
|
|
370
418
|
static get observedAttributes() {
|
|
371
419
|
return Object.keys(e).map(
|
|
372
|
-
(
|
|
420
|
+
(h) => (e[h].attribute || h).toLowerCase()
|
|
373
421
|
);
|
|
374
422
|
}
|
|
375
423
|
};
|
|
376
|
-
return Object.keys(e).forEach((
|
|
377
|
-
Object.defineProperty(
|
|
424
|
+
return Object.keys(e).forEach((h) => {
|
|
425
|
+
Object.defineProperty(s.prototype, h, {
|
|
378
426
|
get() {
|
|
379
|
-
return this.$$c &&
|
|
427
|
+
return this.$$c && h in this.$$c ? this.$$c[h] : this.$$d[h];
|
|
380
428
|
},
|
|
381
|
-
set(
|
|
382
|
-
var
|
|
383
|
-
|
|
429
|
+
set(d) {
|
|
430
|
+
var u;
|
|
431
|
+
d = Ce(h, d, e), this.$$d[h] = d, (u = this.$$c) == null || u.$set({ [h]: d });
|
|
384
432
|
}
|
|
385
433
|
});
|
|
386
|
-
}),
|
|
387
|
-
Object.defineProperty(
|
|
434
|
+
}), i.forEach((h) => {
|
|
435
|
+
Object.defineProperty(s.prototype, h, {
|
|
388
436
|
get() {
|
|
389
|
-
var
|
|
390
|
-
return (
|
|
437
|
+
var d;
|
|
438
|
+
return (d = this.$$c) == null ? void 0 : d[h];
|
|
391
439
|
}
|
|
392
440
|
});
|
|
393
441
|
}), n.element = /** @type {any} */
|
|
394
|
-
|
|
442
|
+
s, s;
|
|
395
443
|
}
|
|
396
|
-
class
|
|
444
|
+
class an {
|
|
397
445
|
constructor() {
|
|
398
446
|
/**
|
|
399
447
|
* ### PRIVATE API
|
|
@@ -402,7 +450,7 @@ class ln {
|
|
|
402
450
|
*
|
|
403
451
|
* @type {any}
|
|
404
452
|
*/
|
|
405
|
-
|
|
453
|
+
Z(this, "$$");
|
|
406
454
|
/**
|
|
407
455
|
* ### PRIVATE API
|
|
408
456
|
*
|
|
@@ -410,11 +458,11 @@ class ln {
|
|
|
410
458
|
*
|
|
411
459
|
* @type {any}
|
|
412
460
|
*/
|
|
413
|
-
|
|
461
|
+
Z(this, "$$set");
|
|
414
462
|
}
|
|
415
463
|
/** @returns {void} */
|
|
416
464
|
$destroy() {
|
|
417
|
-
|
|
465
|
+
sn(this, 1), this.$destroy = xe;
|
|
418
466
|
}
|
|
419
467
|
/**
|
|
420
468
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -423,12 +471,12 @@ class ln {
|
|
|
423
471
|
* @returns {() => void}
|
|
424
472
|
*/
|
|
425
473
|
$on(e, t) {
|
|
426
|
-
if (!
|
|
427
|
-
return
|
|
428
|
-
const
|
|
429
|
-
return
|
|
430
|
-
const o =
|
|
431
|
-
o !== -1 &&
|
|
474
|
+
if (!dt(t))
|
|
475
|
+
return xe;
|
|
476
|
+
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
477
|
+
return i.push(t), () => {
|
|
478
|
+
const o = i.indexOf(t);
|
|
479
|
+
o !== -1 && i.splice(o, 1);
|
|
432
480
|
};
|
|
433
481
|
}
|
|
434
482
|
/**
|
|
@@ -436,229 +484,189 @@ class ln {
|
|
|
436
484
|
* @returns {void}
|
|
437
485
|
*/
|
|
438
486
|
$set(e) {
|
|
439
|
-
this.$$set &&
|
|
487
|
+
this.$$set && !$t(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
440
488
|
}
|
|
441
489
|
}
|
|
442
|
-
const
|
|
443
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
444
|
-
const
|
|
445
|
-
function
|
|
490
|
+
const hn = "4";
|
|
491
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(hn);
|
|
492
|
+
const wt = new TextEncoder();
|
|
493
|
+
function dn(n) {
|
|
446
494
|
return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
447
495
|
}
|
|
448
|
-
async function
|
|
449
|
-
const
|
|
496
|
+
async function gn(n, e = "SHA-256", t = 1e5) {
|
|
497
|
+
const i = Date.now().toString(16);
|
|
450
498
|
n || (n = Math.round(Math.random() * t));
|
|
451
|
-
const o = await pt(
|
|
499
|
+
const o = await pt(i, n, e);
|
|
452
500
|
return {
|
|
453
501
|
algorithm: e,
|
|
454
502
|
challenge: o,
|
|
455
|
-
salt:
|
|
503
|
+
salt: i,
|
|
456
504
|
signature: ""
|
|
457
505
|
};
|
|
458
506
|
}
|
|
459
507
|
async function pt(n, e, t) {
|
|
460
|
-
return
|
|
508
|
+
return dn(
|
|
461
509
|
await crypto.subtle.digest(
|
|
462
510
|
t.toUpperCase(),
|
|
463
|
-
|
|
511
|
+
wt.encode(n + e)
|
|
464
512
|
)
|
|
465
513
|
);
|
|
466
514
|
}
|
|
467
|
-
function
|
|
468
|
-
const
|
|
515
|
+
function mn(n, e, t = "SHA-256", i = 1e6, o = 0) {
|
|
516
|
+
const l = new AbortController(), s = Date.now();
|
|
469
517
|
return {
|
|
470
518
|
promise: (async () => {
|
|
471
|
-
for (let
|
|
472
|
-
if (
|
|
519
|
+
for (let d = o; d <= i; d += 1) {
|
|
520
|
+
if (l.signal.aborted)
|
|
473
521
|
return null;
|
|
474
|
-
if (await pt(e,
|
|
522
|
+
if (await pt(e, d, t) === n)
|
|
475
523
|
return {
|
|
476
|
-
number:
|
|
477
|
-
took: Date.now() -
|
|
524
|
+
number: d,
|
|
525
|
+
took: Date.now() - s
|
|
478
526
|
};
|
|
479
527
|
}
|
|
480
528
|
return null;
|
|
481
529
|
})(),
|
|
482
|
-
controller:
|
|
530
|
+
controller: l
|
|
483
531
|
};
|
|
484
532
|
}
|
|
485
|
-
function
|
|
533
|
+
function bn() {
|
|
486
534
|
try {
|
|
487
535
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
488
536
|
} catch {
|
|
489
537
|
}
|
|
490
538
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
data() {
|
|
509
|
-
const e = Object.entries(U(this, ae));
|
|
510
|
-
return {
|
|
511
|
-
correction: e.length && e.filter(([t, r]) => r > 1).length / e.length || 0,
|
|
512
|
-
dropoff: !this.submitTime && !this.error && U(this, fe) ? U(this, fe) : null,
|
|
513
|
-
error: this.error,
|
|
514
|
-
mobile: this.isMobile(),
|
|
515
|
-
start: this.startTime,
|
|
516
|
-
submit: this.submitTime,
|
|
517
|
-
tz: Ct()
|
|
518
|
-
};
|
|
519
|
-
}
|
|
520
|
-
dataAsBase64() {
|
|
521
|
-
try {
|
|
522
|
-
return btoa(
|
|
523
|
-
JSON.stringify(this.data())
|
|
524
|
-
);
|
|
525
|
-
} catch (e) {
|
|
526
|
-
console.error("failed to encode ALTCHA session data to base64", e);
|
|
527
|
-
}
|
|
528
|
-
return "";
|
|
529
|
-
}
|
|
530
|
-
destroy() {
|
|
531
|
-
window.removeEventListener("unload", U(this, ye)), this.elForm.removeEventListener("change", U(this, be)), this.elForm.removeEventListener("focusin", U(this, we)), this.elForm.removeEventListener("submit", U(this, _e));
|
|
532
|
-
}
|
|
533
|
-
end() {
|
|
534
|
-
this.submitTime || (this.submitTime = Date.now());
|
|
535
|
-
}
|
|
536
|
-
getFieldName(e, t = 40) {
|
|
537
|
-
const r = e.getAttribute("data-group-label"), o = e.getAttribute("name") || e.getAttribute("aria-label");
|
|
538
|
-
return ((r ? r + ": " : "") + o).slice(0, t);
|
|
539
|
-
}
|
|
540
|
-
isMobile() {
|
|
541
|
-
const e = "userAgentData" in navigator && navigator.userAgentData ? navigator.userAgentData : {};
|
|
542
|
-
return "mobile" in e ? e.mobile === !0 : /Mobi/i.test(window.navigator.userAgent);
|
|
543
|
-
}
|
|
544
|
-
isInput(e) {
|
|
545
|
-
return ["INPUT", "SELECT", "TEXTAREA"].includes(e.tagName);
|
|
546
|
-
}
|
|
547
|
-
onFormFieldChange(e) {
|
|
548
|
-
const t = this.getFieldName(e);
|
|
549
|
-
t && this.trackFieldChange(t);
|
|
550
|
-
}
|
|
551
|
-
onFormChange(e) {
|
|
552
|
-
const t = e.target;
|
|
553
|
-
t && this.isInput(t) && this.onFormFieldChange(t);
|
|
554
|
-
}
|
|
555
|
-
onFormFocus(e) {
|
|
556
|
-
const t = e.target;
|
|
557
|
-
if (this.startTime || this.start(), t && this.isInput(t)) {
|
|
558
|
-
const r = this.getFieldName(t);
|
|
559
|
-
r && ot(this, fe, r);
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
onFormSubmit() {
|
|
563
|
-
this.end();
|
|
564
|
-
}
|
|
565
|
-
onUnload() {
|
|
566
|
-
this.loadTime <= Date.now() - this.viewTimeThresholdMs && !this.submitTime && this.sendBeacon();
|
|
567
|
-
}
|
|
568
|
-
async sendBeacon() {
|
|
569
|
-
if (this.beaconUrl && "sendBeacon" in navigator)
|
|
539
|
+
function yn(n) {
|
|
540
|
+
const e = atob(n), t = new Uint8Array(e.length);
|
|
541
|
+
for (let i = 0; i < e.length; i++)
|
|
542
|
+
t[i] = e.charCodeAt(i);
|
|
543
|
+
return t;
|
|
544
|
+
}
|
|
545
|
+
function _n(n, e = 12) {
|
|
546
|
+
const t = new Uint8Array(e);
|
|
547
|
+
for (let i = 0; i < e; i++)
|
|
548
|
+
t[i] = n % 256, n = Math.floor(n / 256);
|
|
549
|
+
return t;
|
|
550
|
+
}
|
|
551
|
+
async function wn(n, e = "", t = 1e6, i = 0) {
|
|
552
|
+
const o = "AES-GCM", l = new AbortController(), s = Date.now(), h = async () => {
|
|
553
|
+
for (let A = i; A <= t; A += 1) {
|
|
554
|
+
if (l.signal.aborted || !d || !u)
|
|
555
|
+
return null;
|
|
570
556
|
try {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
557
|
+
const b = await crypto.subtle.decrypt(
|
|
558
|
+
{
|
|
559
|
+
name: o,
|
|
560
|
+
iv: _n(A)
|
|
561
|
+
},
|
|
562
|
+
d,
|
|
563
|
+
u
|
|
574
564
|
);
|
|
565
|
+
if (b)
|
|
566
|
+
return {
|
|
567
|
+
clearText: new TextDecoder().decode(b),
|
|
568
|
+
took: Date.now() - s
|
|
569
|
+
};
|
|
575
570
|
} catch {
|
|
576
571
|
}
|
|
572
|
+
}
|
|
573
|
+
return null;
|
|
574
|
+
};
|
|
575
|
+
let d = null, u = null;
|
|
576
|
+
try {
|
|
577
|
+
u = yn(n);
|
|
578
|
+
const A = await crypto.subtle.digest(
|
|
579
|
+
"SHA-256",
|
|
580
|
+
wt.encode(e)
|
|
581
|
+
);
|
|
582
|
+
d = await crypto.subtle.importKey(
|
|
583
|
+
"raw",
|
|
584
|
+
A,
|
|
585
|
+
o,
|
|
586
|
+
!1,
|
|
587
|
+
["decrypt"]
|
|
588
|
+
);
|
|
589
|
+
} catch {
|
|
590
|
+
return {
|
|
591
|
+
promise: Promise.reject(),
|
|
592
|
+
controller: l
|
|
593
|
+
};
|
|
577
594
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
this.error = e === null ? null : String(e);
|
|
583
|
-
}
|
|
584
|
-
trackFieldChange(e) {
|
|
585
|
-
U(this, ae)[e] = (U(this, ae)[e] || 0) + 1;
|
|
586
|
-
}
|
|
595
|
+
return {
|
|
596
|
+
promise: h(),
|
|
597
|
+
controller: l
|
|
598
|
+
};
|
|
587
599
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
let e, t, r;
|
|
600
|
+
var m = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.VERIFIED = "verified", n.VERIFYING = "verifying", n.UNVERIFIED = "unverified", n.EXPIRED = "expired", n))(m || {});
|
|
601
|
+
function ot(n) {
|
|
602
|
+
let e, t, i;
|
|
592
603
|
return {
|
|
593
604
|
c() {
|
|
594
|
-
e =
|
|
605
|
+
e = K("svg"), t = K("path"), i = K("path"), c(t, "d", "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"), c(t, "fill", "currentColor"), c(t, "opacity", ".25"), c(i, "d", "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"), c(i, "fill", "currentColor"), c(i, "class", "altcha-spinner"), c(e, "width", "24"), c(e, "height", "24"), c(e, "viewBox", "0 0 24 24"), c(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
595
606
|
},
|
|
596
|
-
m(o,
|
|
597
|
-
|
|
607
|
+
m(o, l) {
|
|
608
|
+
H(o, e, l), L(e, t), L(e, i);
|
|
598
609
|
},
|
|
599
610
|
d(o) {
|
|
600
|
-
o &&
|
|
611
|
+
o && j(e);
|
|
601
612
|
}
|
|
602
613
|
};
|
|
603
614
|
}
|
|
604
|
-
function
|
|
615
|
+
function pn(n) {
|
|
605
616
|
let e, t = (
|
|
606
617
|
/*_strings*/
|
|
607
|
-
n[
|
|
608
|
-
),
|
|
618
|
+
n[11].label + ""
|
|
619
|
+
), i;
|
|
609
620
|
return {
|
|
610
621
|
c() {
|
|
611
|
-
e = F("label"),
|
|
622
|
+
e = F("label"), c(e, "for", i = /*name*/
|
|
612
623
|
n[4] + "_checkbox");
|
|
613
624
|
},
|
|
614
|
-
m(o,
|
|
615
|
-
|
|
625
|
+
m(o, l) {
|
|
626
|
+
H(o, e, l), e.innerHTML = t;
|
|
616
627
|
},
|
|
617
|
-
p(o,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
o[
|
|
621
|
-
16 &&
|
|
622
|
-
o[4] + "_checkbox") &&
|
|
628
|
+
p(o, l) {
|
|
629
|
+
l[0] & /*_strings*/
|
|
630
|
+
2048 && t !== (t = /*_strings*/
|
|
631
|
+
o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
|
|
632
|
+
16 && i !== (i = /*name*/
|
|
633
|
+
o[4] + "_checkbox") && c(e, "for", i);
|
|
623
634
|
},
|
|
624
635
|
d(o) {
|
|
625
|
-
o &&
|
|
636
|
+
o && j(e);
|
|
626
637
|
}
|
|
627
638
|
};
|
|
628
639
|
}
|
|
629
|
-
function
|
|
640
|
+
function En(n) {
|
|
630
641
|
let e, t = (
|
|
631
642
|
/*_strings*/
|
|
632
|
-
n[
|
|
643
|
+
n[11].verifying + ""
|
|
633
644
|
);
|
|
634
645
|
return {
|
|
635
646
|
c() {
|
|
636
647
|
e = F("span");
|
|
637
648
|
},
|
|
638
|
-
m(
|
|
639
|
-
|
|
649
|
+
m(i, o) {
|
|
650
|
+
H(i, e, o), e.innerHTML = t;
|
|
640
651
|
},
|
|
641
|
-
p(
|
|
652
|
+
p(i, o) {
|
|
642
653
|
o[0] & /*_strings*/
|
|
643
|
-
|
|
644
|
-
|
|
654
|
+
2048 && t !== (t = /*_strings*/
|
|
655
|
+
i[11].verifying + "") && (e.innerHTML = t);
|
|
645
656
|
},
|
|
646
|
-
d(
|
|
647
|
-
|
|
657
|
+
d(i) {
|
|
658
|
+
i && j(e);
|
|
648
659
|
}
|
|
649
660
|
};
|
|
650
661
|
}
|
|
651
|
-
function
|
|
662
|
+
function kn(n) {
|
|
652
663
|
let e, t = (
|
|
653
664
|
/*_strings*/
|
|
654
|
-
n[
|
|
655
|
-
),
|
|
656
|
-
/*session*/
|
|
657
|
-
n[11] && ct(n)
|
|
658
|
-
);
|
|
665
|
+
n[11].verified + ""
|
|
666
|
+
), i, o;
|
|
659
667
|
return {
|
|
660
668
|
c() {
|
|
661
|
-
e = F("span"),
|
|
669
|
+
e = F("span"), i = z(), o = F("input"), c(o, "type", "hidden"), c(
|
|
662
670
|
o,
|
|
663
671
|
"name",
|
|
664
672
|
/*name*/
|
|
@@ -666,534 +674,412 @@ function bn(n) {
|
|
|
666
674
|
), o.value = /*payload*/
|
|
667
675
|
n[6];
|
|
668
676
|
},
|
|
669
|
-
m(l,
|
|
670
|
-
|
|
677
|
+
m(l, s) {
|
|
678
|
+
H(l, e, s), e.innerHTML = t, H(l, i, s), H(l, o, s);
|
|
671
679
|
},
|
|
672
|
-
p(l,
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
l[
|
|
676
|
-
16 &&
|
|
680
|
+
p(l, s) {
|
|
681
|
+
s[0] & /*_strings*/
|
|
682
|
+
2048 && t !== (t = /*_strings*/
|
|
683
|
+
l[11].verified + "") && (e.innerHTML = t), s[0] & /*name*/
|
|
684
|
+
16 && c(
|
|
677
685
|
o,
|
|
678
686
|
"name",
|
|
679
687
|
/*name*/
|
|
680
688
|
l[4]
|
|
681
|
-
),
|
|
689
|
+
), s[0] & /*payload*/
|
|
682
690
|
64 && (o.value = /*payload*/
|
|
683
|
-
l[6])
|
|
684
|
-
l[11] ? f ? f.p(l, c) : (f = ct(l), f.c(), f.m(u.parentNode, u)) : f && (f.d(1), f = null);
|
|
691
|
+
l[6]);
|
|
685
692
|
},
|
|
686
693
|
d(l) {
|
|
687
|
-
l && (
|
|
694
|
+
l && (j(e), j(i), j(o));
|
|
688
695
|
}
|
|
689
696
|
};
|
|
690
697
|
}
|
|
691
|
-
function
|
|
692
|
-
let e;
|
|
693
|
-
return {
|
|
694
|
-
c() {
|
|
695
|
-
e = F("input"), a(e, "type", "hidden"), a(e, "name", "__session"), e.value = /*sessionPayload*/
|
|
696
|
-
n[12];
|
|
697
|
-
},
|
|
698
|
-
m(t, r) {
|
|
699
|
-
M(t, e, r);
|
|
700
|
-
},
|
|
701
|
-
p(t, r) {
|
|
702
|
-
r[0] & /*sessionPayload*/
|
|
703
|
-
4096 && (e.value = /*sessionPayload*/
|
|
704
|
-
t[12]);
|
|
705
|
-
},
|
|
706
|
-
d(t) {
|
|
707
|
-
t && D(e);
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
}
|
|
711
|
-
function ut(n) {
|
|
712
|
-
let e, t, r, o, s, u, f;
|
|
698
|
+
function lt(n) {
|
|
699
|
+
let e, t, i, o, l, s, h;
|
|
713
700
|
return {
|
|
714
701
|
c() {
|
|
715
|
-
e = F("div"), t = F("a"),
|
|
716
|
-
n[
|
|
702
|
+
e = F("div"), t = F("a"), i = K("svg"), o = K("path"), l = K("path"), s = K("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", Et), c(t, "target", "_blank"), c(t, "class", "altcha-logo"), c(t, "aria-label", h = /*_strings*/
|
|
703
|
+
n[11].ariaLinkLabel);
|
|
717
704
|
},
|
|
718
|
-
m(
|
|
719
|
-
|
|
705
|
+
m(d, u) {
|
|
706
|
+
H(d, e, u), L(e, t), L(t, i), L(i, o), L(i, l), L(i, s);
|
|
720
707
|
},
|
|
721
|
-
p(
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
708
|
+
p(d, u) {
|
|
709
|
+
u[0] & /*_strings*/
|
|
710
|
+
2048 && h !== (h = /*_strings*/
|
|
711
|
+
d[11].ariaLinkLabel) && c(t, "aria-label", h);
|
|
725
712
|
},
|
|
726
|
-
d(
|
|
727
|
-
|
|
713
|
+
d(d) {
|
|
714
|
+
d && j(e);
|
|
728
715
|
}
|
|
729
716
|
};
|
|
730
717
|
}
|
|
731
|
-
function
|
|
732
|
-
let e, t,
|
|
733
|
-
function
|
|
718
|
+
function st(n) {
|
|
719
|
+
let e, t, i, o;
|
|
720
|
+
function l(d, u) {
|
|
734
721
|
return (
|
|
735
722
|
/*state*/
|
|
736
|
-
|
|
723
|
+
d[7] === m.EXPIRED ? Cn : vn
|
|
737
724
|
);
|
|
738
725
|
}
|
|
739
|
-
let
|
|
726
|
+
let s = l(n), h = s(n);
|
|
740
727
|
return {
|
|
741
728
|
c() {
|
|
742
|
-
e = F("div"), t =
|
|
729
|
+
e = F("div"), t = K("svg"), i = K("path"), o = z(), h.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");
|
|
743
730
|
},
|
|
744
|
-
m(
|
|
745
|
-
|
|
731
|
+
m(d, u) {
|
|
732
|
+
H(d, e, u), L(e, t), L(t, i), L(e, o), h.m(e, null);
|
|
746
733
|
},
|
|
747
|
-
p(
|
|
748
|
-
|
|
734
|
+
p(d, u) {
|
|
735
|
+
s === (s = l(d)) && h ? h.p(d, u) : (h.d(1), h = s(d), h && (h.c(), h.m(e, null)));
|
|
749
736
|
},
|
|
750
|
-
d(
|
|
751
|
-
|
|
737
|
+
d(d) {
|
|
738
|
+
d && j(e), h.d();
|
|
752
739
|
}
|
|
753
740
|
};
|
|
754
741
|
}
|
|
755
|
-
function
|
|
742
|
+
function vn(n) {
|
|
756
743
|
let e, t = (
|
|
757
744
|
/*_strings*/
|
|
758
|
-
n[
|
|
745
|
+
n[11].error + ""
|
|
759
746
|
);
|
|
760
747
|
return {
|
|
761
748
|
c() {
|
|
762
|
-
e = F("div"),
|
|
749
|
+
e = F("div"), c(
|
|
763
750
|
e,
|
|
764
751
|
"title",
|
|
765
752
|
/*error*/
|
|
766
753
|
n[5]
|
|
767
754
|
);
|
|
768
755
|
},
|
|
769
|
-
m(
|
|
770
|
-
|
|
756
|
+
m(i, o) {
|
|
757
|
+
H(i, e, o), e.innerHTML = t;
|
|
771
758
|
},
|
|
772
|
-
p(
|
|
759
|
+
p(i, o) {
|
|
773
760
|
o[0] & /*_strings*/
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
32 &&
|
|
761
|
+
2048 && t !== (t = /*_strings*/
|
|
762
|
+
i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
763
|
+
32 && c(
|
|
777
764
|
e,
|
|
778
765
|
"title",
|
|
779
766
|
/*error*/
|
|
780
|
-
|
|
767
|
+
i[5]
|
|
781
768
|
);
|
|
782
769
|
},
|
|
783
|
-
d(
|
|
784
|
-
|
|
770
|
+
d(i) {
|
|
771
|
+
i && j(e);
|
|
785
772
|
}
|
|
786
773
|
};
|
|
787
774
|
}
|
|
788
|
-
function
|
|
775
|
+
function Cn(n) {
|
|
789
776
|
let e, t = (
|
|
790
777
|
/*_strings*/
|
|
791
|
-
n[
|
|
778
|
+
n[11].expired + ""
|
|
792
779
|
);
|
|
793
780
|
return {
|
|
794
781
|
c() {
|
|
795
|
-
e = F("div"),
|
|
782
|
+
e = F("div"), c(
|
|
796
783
|
e,
|
|
797
784
|
"title",
|
|
798
785
|
/*error*/
|
|
799
786
|
n[5]
|
|
800
787
|
);
|
|
801
788
|
},
|
|
802
|
-
m(
|
|
803
|
-
|
|
789
|
+
m(i, o) {
|
|
790
|
+
H(i, e, o), e.innerHTML = t;
|
|
804
791
|
},
|
|
805
|
-
p(
|
|
792
|
+
p(i, o) {
|
|
806
793
|
o[0] & /*_strings*/
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
32 &&
|
|
794
|
+
2048 && t !== (t = /*_strings*/
|
|
795
|
+
i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
796
|
+
32 && c(
|
|
810
797
|
e,
|
|
811
798
|
"title",
|
|
812
799
|
/*error*/
|
|
813
|
-
|
|
800
|
+
i[5]
|
|
814
801
|
);
|
|
815
802
|
},
|
|
816
|
-
d(
|
|
817
|
-
|
|
803
|
+
d(i) {
|
|
804
|
+
i && j(e);
|
|
818
805
|
}
|
|
819
806
|
};
|
|
820
807
|
}
|
|
821
|
-
function
|
|
822
|
-
let e, t,
|
|
808
|
+
function ft(n) {
|
|
809
|
+
let e, t, i = (
|
|
823
810
|
/*_strings*/
|
|
824
|
-
n[
|
|
811
|
+
n[11].footer + ""
|
|
825
812
|
);
|
|
826
813
|
return {
|
|
827
814
|
c() {
|
|
828
|
-
e = F("div"), t = F("div"),
|
|
815
|
+
e = F("div"), t = F("div"), c(e, "class", "altcha-footer");
|
|
829
816
|
},
|
|
830
|
-
m(o,
|
|
831
|
-
|
|
817
|
+
m(o, l) {
|
|
818
|
+
H(o, e, l), L(e, t), t.innerHTML = i;
|
|
832
819
|
},
|
|
833
|
-
p(o,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
o[
|
|
820
|
+
p(o, l) {
|
|
821
|
+
l[0] & /*_strings*/
|
|
822
|
+
2048 && i !== (i = /*_strings*/
|
|
823
|
+
o[11].footer + "") && (t.innerHTML = i);
|
|
837
824
|
},
|
|
838
825
|
d(o) {
|
|
839
|
-
o &&
|
|
826
|
+
o && j(e);
|
|
840
827
|
}
|
|
841
828
|
};
|
|
842
829
|
}
|
|
843
|
-
function
|
|
830
|
+
function ct(n) {
|
|
844
831
|
let e;
|
|
845
832
|
return {
|
|
846
833
|
c() {
|
|
847
|
-
e = F("div"),
|
|
834
|
+
e = F("div"), c(e, "class", "altcha-anchor-arrow");
|
|
848
835
|
},
|
|
849
|
-
m(t,
|
|
850
|
-
|
|
836
|
+
m(t, i) {
|
|
837
|
+
H(t, e, i), n[48](e);
|
|
851
838
|
},
|
|
852
|
-
p:
|
|
839
|
+
p: xe,
|
|
853
840
|
d(t) {
|
|
854
|
-
t &&
|
|
841
|
+
t && j(e), n[48](null);
|
|
855
842
|
}
|
|
856
843
|
};
|
|
857
844
|
}
|
|
858
|
-
function
|
|
859
|
-
let e, t,
|
|
845
|
+
function xn(n) {
|
|
846
|
+
let e, t, i, o, l, s, h, d, u, A, b, Y, U, $, D, R, X;
|
|
847
|
+
const J = (
|
|
848
|
+
/*#slots*/
|
|
849
|
+
n[46].default
|
|
850
|
+
), N = Bt(
|
|
851
|
+
J,
|
|
852
|
+
n,
|
|
853
|
+
/*$$scope*/
|
|
854
|
+
n[45],
|
|
855
|
+
null
|
|
856
|
+
);
|
|
857
|
+
let T = (
|
|
860
858
|
/*state*/
|
|
861
|
-
n[7] ===
|
|
859
|
+
n[7] === m.VERIFYING && ot()
|
|
862
860
|
);
|
|
863
|
-
function
|
|
861
|
+
function Q(a, y) {
|
|
864
862
|
return (
|
|
865
863
|
/*state*/
|
|
866
|
-
|
|
864
|
+
a[7] === m.VERIFIED ? kn : (
|
|
867
865
|
/*state*/
|
|
868
|
-
|
|
866
|
+
a[7] === m.VERIFYING ? En : pn
|
|
869
867
|
)
|
|
870
868
|
);
|
|
871
869
|
}
|
|
872
|
-
let
|
|
870
|
+
let G = Q(n), V = G(n), v = (
|
|
873
871
|
/*hidelogo*/
|
|
874
872
|
(n[3] !== !0 || /*isFreeSaaS*/
|
|
875
|
-
n[
|
|
876
|
-
),
|
|
873
|
+
n[12]) && lt(n)
|
|
874
|
+
), P = (
|
|
877
875
|
/*error*/
|
|
878
876
|
(n[5] || /*state*/
|
|
879
|
-
n[7] ===
|
|
880
|
-
),
|
|
877
|
+
n[7] === m.EXPIRED) && st(n)
|
|
878
|
+
), S = (
|
|
881
879
|
/*_strings*/
|
|
882
|
-
n[
|
|
880
|
+
n[11].footer && /*hidefooter*/
|
|
883
881
|
(n[2] !== !0 || /*isFreeSaaS*/
|
|
884
|
-
n[
|
|
885
|
-
),
|
|
882
|
+
n[12]) && ft(n)
|
|
883
|
+
), E = (
|
|
886
884
|
/*floating*/
|
|
887
|
-
n[1] &&
|
|
885
|
+
n[1] && ct(n)
|
|
888
886
|
);
|
|
889
887
|
return {
|
|
890
888
|
c() {
|
|
891
|
-
e = F("div"),
|
|
892
|
-
n[4] + "_checkbox"), s.required =
|
|
893
|
-
n[0] !== "onsubmit"
|
|
894
|
-
|
|
889
|
+
N && N.c(), e = z(), t = F("div"), i = F("div"), T && T.c(), o = z(), l = F("div"), s = F("input"), u = z(), A = F("div"), V.c(), b = z(), v && v.c(), Y = z(), P && P.c(), U = z(), S && S.c(), $ = z(), E && E.c(), c(s, "type", "checkbox"), c(s, "id", h = /*name*/
|
|
890
|
+
n[4] + "_checkbox"), s.required = d = /*auto*/
|
|
891
|
+
n[0] !== "onsubmit" && (!/*floating*/
|
|
892
|
+
n[1] || /*auto*/
|
|
893
|
+
n[0] !== "off"), c(l, "class", "altcha-checkbox"), rt(
|
|
894
|
+
l,
|
|
895
895
|
"altcha-hidden",
|
|
896
896
|
/*state*/
|
|
897
|
-
n[7] ===
|
|
898
|
-
),
|
|
899
|
-
|
|
897
|
+
n[7] === m.VERIFYING
|
|
898
|
+
), c(A, "class", "altcha-label"), c(i, "class", "altcha-main"), c(t, "class", "altcha"), c(
|
|
899
|
+
t,
|
|
900
900
|
"data-state",
|
|
901
901
|
/*state*/
|
|
902
902
|
n[7]
|
|
903
|
-
),
|
|
904
|
-
|
|
903
|
+
), c(
|
|
904
|
+
t,
|
|
905
905
|
"data-floating",
|
|
906
906
|
/*floating*/
|
|
907
907
|
n[1]
|
|
908
908
|
);
|
|
909
909
|
},
|
|
910
|
-
m(
|
|
911
|
-
|
|
912
|
-
n[8],
|
|
913
|
-
|
|
910
|
+
m(a, y) {
|
|
911
|
+
N && N.m(a, y), H(a, e, y), H(a, t, y), L(t, i), T && T.m(i, null), L(i, o), L(i, l), L(l, s), s.checked = /*checked*/
|
|
912
|
+
n[8], L(i, u), L(i, A), V.m(A, null), L(i, b), v && v.m(i, null), L(t, Y), P && P.m(t, null), L(t, U), S && S.m(t, null), L(t, $), E && E.m(t, null), n[49](t), D = !0, R || (X = [
|
|
913
|
+
Le(
|
|
914
914
|
s,
|
|
915
915
|
"change",
|
|
916
916
|
/*input_change_handler*/
|
|
917
|
-
n[
|
|
917
|
+
n[47]
|
|
918
918
|
),
|
|
919
|
-
|
|
919
|
+
Le(
|
|
920
920
|
s,
|
|
921
921
|
"change",
|
|
922
922
|
/*onCheckedChange*/
|
|
923
|
-
n[
|
|
923
|
+
n[13]
|
|
924
924
|
),
|
|
925
|
-
|
|
925
|
+
Le(
|
|
926
926
|
s,
|
|
927
927
|
"invalid",
|
|
928
928
|
/*onInvalid*/
|
|
929
|
-
n[
|
|
929
|
+
n[14]
|
|
930
930
|
)
|
|
931
|
-
],
|
|
931
|
+
], R = !0);
|
|
932
932
|
},
|
|
933
|
-
p(
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
933
|
+
p(a, y) {
|
|
934
|
+
N && N.p && (!D || y[1] & /*$$scope*/
|
|
935
|
+
16384) && Zt(
|
|
936
|
+
N,
|
|
937
|
+
J,
|
|
938
|
+
a,
|
|
939
|
+
/*$$scope*/
|
|
940
|
+
a[45],
|
|
941
|
+
D ? qt(
|
|
942
|
+
J,
|
|
943
|
+
/*$$scope*/
|
|
944
|
+
a[45],
|
|
945
|
+
y,
|
|
946
|
+
null
|
|
947
|
+
) : Gt(
|
|
948
|
+
/*$$scope*/
|
|
949
|
+
a[45]
|
|
950
|
+
),
|
|
951
|
+
null
|
|
952
|
+
), /*state*/
|
|
953
|
+
a[7] === m.VERIFYING ? T || (T = ot(), T.c(), T.m(i, o)) : T && (T.d(1), T = null), (!D || y[0] & /*name*/
|
|
954
|
+
16 && h !== (h = /*name*/
|
|
955
|
+
a[4] + "_checkbox")) && c(s, "id", h), (!D || y[0] & /*auto, floating*/
|
|
956
|
+
3 && d !== (d = /*auto*/
|
|
957
|
+
a[0] !== "onsubmit" && (!/*floating*/
|
|
958
|
+
a[1] || /*auto*/
|
|
959
|
+
a[0] !== "off"))) && (s.required = d), y[0] & /*checked*/
|
|
940
960
|
256 && (s.checked = /*checked*/
|
|
941
|
-
|
|
942
|
-
128 &&
|
|
943
|
-
|
|
961
|
+
a[8]), (!D || y[0] & /*state*/
|
|
962
|
+
128) && rt(
|
|
963
|
+
l,
|
|
944
964
|
"altcha-hidden",
|
|
945
965
|
/*state*/
|
|
946
|
-
|
|
947
|
-
),
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
(
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
128 &&
|
|
957
|
-
|
|
966
|
+
a[7] === m.VERIFYING
|
|
967
|
+
), G === (G = Q(a)) && V ? V.p(a, y) : (V.d(1), V = G(a), V && (V.c(), V.m(A, null))), /*hidelogo*/
|
|
968
|
+
a[3] !== !0 || /*isFreeSaaS*/
|
|
969
|
+
a[12] ? v ? v.p(a, y) : (v = lt(a), v.c(), v.m(i, null)) : v && (v.d(1), v = null), /*error*/
|
|
970
|
+
a[5] || /*state*/
|
|
971
|
+
a[7] === m.EXPIRED ? P ? P.p(a, y) : (P = st(a), P.c(), P.m(t, U)) : P && (P.d(1), P = null), /*_strings*/
|
|
972
|
+
a[11].footer && /*hidefooter*/
|
|
973
|
+
(a[2] !== !0 || /*isFreeSaaS*/
|
|
974
|
+
a[12]) ? S ? S.p(a, y) : (S = ft(a), S.c(), S.m(t, $)) : S && (S.d(1), S = null), /*floating*/
|
|
975
|
+
a[1] ? E ? E.p(a, y) : (E = ct(a), E.c(), E.m(t, null)) : E && (E.d(1), E = null), (!D || y[0] & /*state*/
|
|
976
|
+
128) && c(
|
|
977
|
+
t,
|
|
958
978
|
"data-state",
|
|
959
979
|
/*state*/
|
|
960
|
-
|
|
961
|
-
),
|
|
962
|
-
2 &&
|
|
963
|
-
|
|
980
|
+
a[7]
|
|
981
|
+
), (!D || y[0] & /*floating*/
|
|
982
|
+
2) && c(
|
|
983
|
+
t,
|
|
964
984
|
"data-floating",
|
|
965
985
|
/*floating*/
|
|
966
|
-
|
|
986
|
+
a[1]
|
|
967
987
|
);
|
|
968
988
|
},
|
|
969
|
-
i
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
989
|
+
i(a) {
|
|
990
|
+
D || (yt(N, a), D = !0);
|
|
991
|
+
},
|
|
992
|
+
o(a) {
|
|
993
|
+
on(N, a), D = !1;
|
|
994
|
+
},
|
|
995
|
+
d(a) {
|
|
996
|
+
a && (j(e), j(t)), N && N.d(a), T && T.d(), V.d(), v && v.d(), P && P.d(), S && S.d(), E && E.d(), n[49](null), R = !1, pe(X);
|
|
973
997
|
}
|
|
974
998
|
};
|
|
975
999
|
}
|
|
976
|
-
const
|
|
977
|
-
function
|
|
1000
|
+
const ut = "Visit Altcha.org", Et = "https://altcha.org/";
|
|
1001
|
+
function at(n) {
|
|
978
1002
|
return JSON.parse(n);
|
|
979
1003
|
}
|
|
980
|
-
function
|
|
981
|
-
var
|
|
982
|
-
let
|
|
983
|
-
const
|
|
984
|
-
let
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
}),
|
|
988
|
-
k("mounted", "0.
|
|
1004
|
+
function An(n, e, t) {
|
|
1005
|
+
var Qe, et;
|
|
1006
|
+
let i, o, l, s, { $$slots: h = {}, $$scope: d } = e, { auto: u = void 0 } = e, { blockspam: A = void 0 } = e, { challengeurl: b = void 0 } = e, { challengejson: Y = void 0 } = e, { debug: U = !1 } = e, { delay: $ = 0 } = e, { expire: D = void 0 } = e, { floating: R = void 0 } = e, { floatinganchor: X = void 0 } = e, { floatingoffset: J = void 0 } = e, { hidefooter: N = !1 } = e, { hidelogo: T = !1 } = e, { name: Q = "altcha" } = e, { maxnumber: G = 1e6 } = e, { mockerror: V = !1 } = e, { obfuscated: v = void 0 } = e, { plugins: P = void 0 } = e, { refetchonexpire: S = !0 } = e, { spamfilter: E = !1 } = e, { strings: a = void 0 } = e, { test: y = !1 } = e, { verifyurl: ee = void 0 } = e, { workers: le = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ae = void 0 } = e;
|
|
1007
|
+
const he = Qt(), Pe = ["SHA-256", "SHA-384", "SHA-512"], Me = (et = (Qe = document.documentElement.lang) == null ? void 0 : Qe.split("-")) == null ? void 0 : et[0];
|
|
1008
|
+
let re = !1, C, ie = null, se = null, _ = null, de = null, W = null, oe = null, te = [], x = m.UNVERIFIED;
|
|
1009
|
+
Kt(() => {
|
|
1010
|
+
kt(), _ && (_.removeEventListener("submit", Oe), _.removeEventListener("reset", Ue), _.removeEventListener("focusin", He), _ = null), W && (clearTimeout(W), W = null), document.removeEventListener("click", Ve), document.removeEventListener("scroll", je), window.removeEventListener("resize", Be);
|
|
1011
|
+
}), zt(() => {
|
|
1012
|
+
k("mounted", "0.9.0"), k("workers", le), It(), k("plugins", te.length ? te.map((r) => r.constructor.pluginName).join(", ") : "none"), y && k("using test mode"), D && ke(D), u !== void 0 && k("auto", u), R !== void 0 && qe(R), _ = C.closest("form"), _ && (_.addEventListener("submit", Oe, { capture: !0 }), _.addEventListener("reset", Ue), u === "onfocus" && _.addEventListener("focusin", He)), u === "onload" && (v ? ge() : ne()), i && (N || T) && k("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
|
|
1013
|
+
he("load");
|
|
1014
|
+
});
|
|
989
1015
|
});
|
|
990
|
-
function
|
|
991
|
-
($ || i.some((h) => h instanceof Error)) && console[i[0] instanceof Error ? "error" : "log"]("ALTCHA", ...i);
|
|
992
|
-
}
|
|
993
|
-
function He(i) {
|
|
994
|
-
B === _.UNVERIFIED && ie();
|
|
995
|
-
}
|
|
996
|
-
function $e(i) {
|
|
997
|
-
g && V && B === _.VERIFIED && (V.end(), t(12, Oe = V.dataAsBase64())), g && l === "onsubmit" && (B === _.UNVERIFIED ? (i.preventDefault(), i.stopPropagation(), ie().then(() => {
|
|
998
|
-
g == null || g.requestSubmit();
|
|
999
|
-
})) : B !== _.VERIFIED && (i.preventDefault(), i.stopPropagation(), B === _.VERIFYING && ze()));
|
|
1000
|
-
}
|
|
1001
|
-
function qe() {
|
|
1002
|
-
Le();
|
|
1003
|
-
}
|
|
1004
|
-
function Ze(i, h) {
|
|
1016
|
+
function Fe(r, f) {
|
|
1005
1017
|
return btoa(JSON.stringify({
|
|
1006
|
-
algorithm:
|
|
1007
|
-
challenge:
|
|
1008
|
-
number:
|
|
1009
|
-
salt:
|
|
1010
|
-
signature:
|
|
1011
|
-
test:
|
|
1012
|
-
took:
|
|
1018
|
+
algorithm: r.algorithm,
|
|
1019
|
+
challenge: r.challenge,
|
|
1020
|
+
number: f.number,
|
|
1021
|
+
salt: r.salt,
|
|
1022
|
+
signature: r.signature,
|
|
1023
|
+
test: y ? !0 : void 0,
|
|
1024
|
+
took: f.took
|
|
1013
1025
|
}));
|
|
1014
1026
|
}
|
|
1015
|
-
function
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
if (i.signature === void 0)
|
|
1019
|
-
throw new Error("Invalid challenge. Property signature is missing.");
|
|
1020
|
-
if (!Pe.includes(i.algorithm.toUpperCase()))
|
|
1021
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${Pe.join(", ")}`);
|
|
1022
|
-
if (!i.challenge || i.challenge.length < 40)
|
|
1023
|
-
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
1024
|
-
if (!i.salt || i.salt.length < 10)
|
|
1025
|
-
throw new Error("Salt is too short. Min. 10 chars.");
|
|
1027
|
+
function kt() {
|
|
1028
|
+
for (const r of te)
|
|
1029
|
+
r.destroy();
|
|
1026
1030
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1031
|
+
function Ne() {
|
|
1032
|
+
b && S && x === m.VERIFIED ? ne() : me(m.EXPIRED, s.expired);
|
|
1033
|
+
}
|
|
1034
|
+
async function vt() {
|
|
1035
|
+
var r;
|
|
1036
|
+
if (V)
|
|
1030
1037
|
throw k("mocking error"), new Error("Mocked error.");
|
|
1031
1038
|
if (o)
|
|
1032
1039
|
return k("using provided json data"), o;
|
|
1033
|
-
if (
|
|
1034
|
-
return k("generating test challenge", { test:
|
|
1040
|
+
if (y)
|
|
1041
|
+
return k("generating test challenge", { test: y }), gn(typeof y != "boolean" ? +y : void 0);
|
|
1035
1042
|
{
|
|
1036
|
-
if (!
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1043
|
+
if (!b && _) {
|
|
1044
|
+
const w = _.getAttribute("action");
|
|
1045
|
+
w != null && w.includes("/form/") && t(15, b = w + "/altcha");
|
|
1039
1046
|
}
|
|
1040
|
-
if (!
|
|
1047
|
+
if (!b)
|
|
1041
1048
|
throw new Error("Attribute challengeurl not set.");
|
|
1042
|
-
k("fetching challenge from",
|
|
1043
|
-
const
|
|
1049
|
+
k("fetching challenge from", b);
|
|
1050
|
+
const f = await fetch(b, {
|
|
1044
1051
|
headers: E ? { "x-altcha-spam-filter": "1" } : {}
|
|
1045
1052
|
});
|
|
1046
|
-
if (
|
|
1047
|
-
throw new Error(`Server responded with ${
|
|
1048
|
-
const
|
|
1049
|
-
if (
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1053
|
+
if (f.status !== 200)
|
|
1054
|
+
throw new Error(`Server responded with ${f.status}.`);
|
|
1055
|
+
const g = f.headers.get("Expires"), I = f.headers.get("X-Altcha-Config"), B = await f.json(), O = new URLSearchParams((r = B.salt.split("?")) == null ? void 0 : r[1]), M = O.get("expires") || O.get("expire");
|
|
1056
|
+
if (M) {
|
|
1057
|
+
const w = new Date(+M * 1e3), q = isNaN(w.getTime()) ? 0 : w.getTime() - Date.now();
|
|
1058
|
+
q > 0 && ke(q);
|
|
1052
1059
|
}
|
|
1053
|
-
if (
|
|
1060
|
+
if (I)
|
|
1054
1061
|
try {
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1057
|
-
} catch (
|
|
1058
|
-
k("unable to configure from X-Altcha-Config",
|
|
1062
|
+
const w = JSON.parse(I);
|
|
1063
|
+
w && typeof w == "object" && (w.verifyurl && (w.verifyurl = new URL(w.verifyurl, new URL(b)).toString()), Ye(w));
|
|
1064
|
+
} catch (w) {
|
|
1065
|
+
k("unable to configure from X-Altcha-Config", w);
|
|
1059
1066
|
}
|
|
1060
|
-
if (!
|
|
1061
|
-
const
|
|
1062
|
-
if (
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1067
|
+
if (!D && (g != null && g.length)) {
|
|
1068
|
+
const w = Date.parse(g);
|
|
1069
|
+
if (w) {
|
|
1070
|
+
const q = w - Date.now();
|
|
1071
|
+
q > 0 && ke(q);
|
|
1065
1072
|
}
|
|
1066
1073
|
}
|
|
1067
|
-
return
|
|
1074
|
+
return B;
|
|
1068
1075
|
}
|
|
1069
1076
|
}
|
|
1070
|
-
function
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
const i = g.getAttribute("action");
|
|
1075
|
-
i && t(19, c = i + "/beacon");
|
|
1076
|
-
}
|
|
1077
|
-
t(11, V.beaconUrl = c || null, V);
|
|
1078
|
-
} else
|
|
1079
|
-
k("analytics cannot be enabled - form element not found");
|
|
1080
|
-
}
|
|
1081
|
-
function Je() {
|
|
1082
|
-
m && d && B === _.VERIFIED ? ie() : Le(_.EXPIRED, u.expired);
|
|
1083
|
-
}
|
|
1084
|
-
async function It(i) {
|
|
1085
|
-
let h = null;
|
|
1086
|
-
if ("Worker" in window) {
|
|
1087
|
-
try {
|
|
1088
|
-
h = await xt(i.challenge, i.salt, i.algorithm, i.maxnumber);
|
|
1089
|
-
} catch (w) {
|
|
1090
|
-
k(w);
|
|
1091
|
-
}
|
|
1092
|
-
if ((h == null ? void 0 : h.number) !== void 0)
|
|
1093
|
-
return { data: i, solution: h };
|
|
1094
|
-
}
|
|
1095
|
-
return {
|
|
1096
|
-
data: i,
|
|
1097
|
-
solution: await hn(i.challenge, i.salt, i.algorithm, i.maxnumber || C).promise
|
|
1098
|
-
};
|
|
1099
|
-
}
|
|
1100
|
-
async function xt(i, h, w, T = typeof Z == "number" ? Z : C, P = Math.ceil(ue)) {
|
|
1101
|
-
const N = [];
|
|
1102
|
-
P = Math.min(16, Math.max(1, P));
|
|
1103
|
-
for (let L = 0; L < P; L++)
|
|
1104
|
-
N.push(createAltchaWorker(ke));
|
|
1105
|
-
const G = Math.ceil(T / P), y = await Promise.all(N.map((L, De) => {
|
|
1106
|
-
const he = De * G;
|
|
1107
|
-
return new Promise((Ie) => {
|
|
1108
|
-
L.addEventListener("message", (xe) => {
|
|
1109
|
-
if (xe.data)
|
|
1110
|
-
for (const de of N)
|
|
1111
|
-
de !== L && de.postMessage({ type: "abort" });
|
|
1112
|
-
Ie(xe.data);
|
|
1113
|
-
}), L.postMessage({
|
|
1114
|
-
payload: {
|
|
1115
|
-
alg: w,
|
|
1116
|
-
challenge: i,
|
|
1117
|
-
max: he + G,
|
|
1118
|
-
salt: h,
|
|
1119
|
-
start: he
|
|
1120
|
-
},
|
|
1121
|
-
type: "work"
|
|
1122
|
-
});
|
|
1123
|
-
});
|
|
1124
|
-
}));
|
|
1125
|
-
for (const L of N)
|
|
1126
|
-
L.terminate();
|
|
1127
|
-
return y.find((L) => !!L) || null;
|
|
1128
|
-
}
|
|
1129
|
-
function Tt() {
|
|
1130
|
-
[_.UNVERIFIED, _.ERROR, _.EXPIRED].includes(B) ? E && (g == null ? void 0 : g.reportValidity()) === !1 ? t(8, Q = !1) : ie() : t(8, Q = !0);
|
|
1131
|
-
}
|
|
1132
|
-
function Xe(i) {
|
|
1133
|
-
const h = i.target;
|
|
1134
|
-
b && h && !A.contains(h) && B === _.VERIFIED && t(9, A.style.display = "none", A);
|
|
1135
|
-
}
|
|
1136
|
-
function We() {
|
|
1137
|
-
b && Se();
|
|
1138
|
-
}
|
|
1139
|
-
function ze() {
|
|
1140
|
-
B === _.VERIFYING && u.waitAlert && alert(u.waitAlert);
|
|
1141
|
-
}
|
|
1142
|
-
function Ft(i) {
|
|
1143
|
-
V && V.trackError(Ce);
|
|
1144
|
-
}
|
|
1145
|
-
function Rt(i) {
|
|
1146
|
-
b && B !== _.UNVERIFIED && requestAnimationFrame(() => {
|
|
1147
|
-
Se();
|
|
1148
|
-
});
|
|
1077
|
+
function Ct(r) {
|
|
1078
|
+
var g;
|
|
1079
|
+
const f = _ == null ? void 0 : _.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1080
|
+
return ((g = f == null ? void 0 : f.value) == null ? void 0 : g.slice(f.value.indexOf("@"))) || void 0;
|
|
1149
1081
|
}
|
|
1150
|
-
function
|
|
1151
|
-
b && Se();
|
|
1152
|
-
}
|
|
1153
|
-
function Ae(i) {
|
|
1154
|
-
k("expire", i), Y && (clearTimeout(Y), Y = null), i < 1 ? Je() : Y = setTimeout(Je, i);
|
|
1155
|
-
}
|
|
1156
|
-
function Qe(i) {
|
|
1157
|
-
k("floating", i), b !== i && (t(9, A.style.left = "", A), t(9, A.style.top = "", A)), t(1, b = i === !0 || i === "" ? "auto" : i === !1 || i === "false" ? void 0 : b), b ? (l || t(0, l = "onsubmit"), document.addEventListener("scroll", We), document.addEventListener("click", Xe), window.addEventListener("resize", Ke)) : l === "onsubmit" && t(0, l = void 0);
|
|
1158
|
-
}
|
|
1159
|
-
function St(i) {
|
|
1160
|
-
var w;
|
|
1161
|
-
const h = g == null ? void 0 : g.querySelector(typeof i == "string" ? `input[name="${i}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1162
|
-
return ((w = h == null ? void 0 : h.value) == null ? void 0 : w.slice(h.value.indexOf("@"))) || void 0;
|
|
1163
|
-
}
|
|
1164
|
-
function Dt(i) {
|
|
1165
|
-
return [
|
|
1166
|
-
...(g == null ? void 0 : g.querySelectorAll(i != null && i.length ? i.map((w) => `input[name="${w}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1167
|
-
].reduce(
|
|
1168
|
-
(w, T) => {
|
|
1169
|
-
const P = T.name, N = T.value;
|
|
1170
|
-
return P && N && (w[P] = /\n/.test(N) ? N.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1171
|
-
`) : N), w;
|
|
1172
|
-
},
|
|
1173
|
-
{}
|
|
1174
|
-
);
|
|
1175
|
-
}
|
|
1176
|
-
async function Mt(i) {
|
|
1177
|
-
if (!ee)
|
|
1178
|
-
throw new Error("Attribute verifyurl not set.");
|
|
1179
|
-
k("requesting server verification from", ee);
|
|
1180
|
-
const h = { payload: i };
|
|
1181
|
-
if (E) {
|
|
1182
|
-
const { blockedCountries: P, classifier: N, disableRules: G, email: y, expectedLanguages: L, expectedCountries: De, fields: he, ipAddress: Ie, text: xe, timeZone: de } = Nt();
|
|
1183
|
-
h.blockedCountries = P, h.classifier = N, h.disableRules = G, h.email = y === !1 ? void 0 : St(y), h.expectedCountries = De, h.expectedLanguages = L || (Ue ? [Ue] : void 0), h.fields = he === !1 ? void 0 : Dt(he), h.ipAddress = Ie === !1 ? void 0 : Ie || "auto", h.text = xe, h.timeZone = de === !1 ? void 0 : de || Ct();
|
|
1184
|
-
}
|
|
1185
|
-
const w = await fetch(ee, {
|
|
1186
|
-
body: JSON.stringify(h),
|
|
1187
|
-
headers: { "content-type": "application/json" },
|
|
1188
|
-
method: "POST"
|
|
1189
|
-
});
|
|
1190
|
-
if (w.status !== 200)
|
|
1191
|
-
throw new Error(`Server responded with ${w.status}.`);
|
|
1192
|
-
const T = await w.json();
|
|
1193
|
-
if (T != null && T.payload && t(6, ne = T.payload), Re("serververification", T), O && T.classification === "BAD")
|
|
1194
|
-
throw new Error("SpamFilter returned negative classification.");
|
|
1195
|
-
}
|
|
1196
|
-
function Nt() {
|
|
1082
|
+
function xt() {
|
|
1197
1083
|
return E === "ipAddress" ? {
|
|
1198
1084
|
blockedCountries: void 0,
|
|
1199
1085
|
classifier: void 0,
|
|
@@ -1218,316 +1104,578 @@ function vn(n, e, t) {
|
|
|
1218
1104
|
timeZone: void 0
|
|
1219
1105
|
};
|
|
1220
1106
|
}
|
|
1221
|
-
function
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1107
|
+
function At(r) {
|
|
1108
|
+
return [
|
|
1109
|
+
...(_ == null ? void 0 : _.querySelectorAll(r != null && r.length ? r.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1110
|
+
].reduce(
|
|
1111
|
+
(g, I) => {
|
|
1112
|
+
const B = I.name, O = I.value;
|
|
1113
|
+
return B && O && (g[B] = /\n/.test(O) ? O.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1114
|
+
`) : O), g;
|
|
1115
|
+
},
|
|
1116
|
+
{}
|
|
1117
|
+
);
|
|
1118
|
+
}
|
|
1119
|
+
function It() {
|
|
1120
|
+
const r = P !== void 0 ? P.split(",") : void 0;
|
|
1121
|
+
for (const f of globalThis.altchaPlugins)
|
|
1122
|
+
(!r || r.includes(f.pluginName)) && te.push(new f({
|
|
1123
|
+
el: C,
|
|
1124
|
+
clarify: ge,
|
|
1125
|
+
dispatch: he,
|
|
1126
|
+
getConfiguration: We,
|
|
1127
|
+
getFloatingAnchor: Xe,
|
|
1128
|
+
getState: Je,
|
|
1129
|
+
log: k,
|
|
1130
|
+
reset: me,
|
|
1131
|
+
solve: Ge,
|
|
1132
|
+
setState: Ke,
|
|
1133
|
+
setFloatingAnchor: ze,
|
|
1134
|
+
verify: ne
|
|
1135
|
+
}));
|
|
1136
|
+
}
|
|
1137
|
+
function k(...r) {
|
|
1138
|
+
(U || r.some((f) => f instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Q}]`, ...r);
|
|
1139
|
+
}
|
|
1140
|
+
function Lt() {
|
|
1141
|
+
[m.UNVERIFIED, m.ERROR, m.EXPIRED].includes(x) ? E && (_ == null ? void 0 : _.reportValidity()) === !1 ? t(8, re = !1) : v ? ge() : ne() : t(8, re = !0);
|
|
1142
|
+
}
|
|
1143
|
+
function Ve(r) {
|
|
1144
|
+
const f = r.target;
|
|
1145
|
+
R && f && !C.contains(f) && (x === m.VERIFIED || u === "off" && x === m.UNVERIFIED) && t(9, C.style.display = "none", C);
|
|
1146
|
+
}
|
|
1147
|
+
function je() {
|
|
1148
|
+
R && x !== m.UNVERIFIED && Ee();
|
|
1149
|
+
}
|
|
1150
|
+
function Rt(r) {
|
|
1151
|
+
for (const f of te)
|
|
1152
|
+
typeof f.onErrorChange == "function" && f.onErrorChange(de);
|
|
1153
|
+
}
|
|
1154
|
+
function He(r) {
|
|
1155
|
+
x === m.UNVERIFIED && ne();
|
|
1156
|
+
}
|
|
1157
|
+
function Oe(r) {
|
|
1158
|
+
_ && u === "onsubmit" ? x === m.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), ne().then(() => {
|
|
1159
|
+
_ == null || _.requestSubmit();
|
|
1160
|
+
})) : x !== m.VERIFIED && (r.preventDefault(), r.stopPropagation(), x === m.VERIFYING && $e()) : _ && R && u === "off" && x === m.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), t(9, C.style.display = "block", C), Ee());
|
|
1161
|
+
}
|
|
1162
|
+
function Ue() {
|
|
1163
|
+
me();
|
|
1164
|
+
}
|
|
1165
|
+
function $e() {
|
|
1166
|
+
x === m.VERIFYING && s.waitAlert && alert(s.waitAlert);
|
|
1167
|
+
}
|
|
1168
|
+
function St(r) {
|
|
1169
|
+
for (const f of te)
|
|
1170
|
+
typeof f.onStateChange == "function" && f.onStateChange(x);
|
|
1171
|
+
R && x !== m.UNVERIFIED && requestAnimationFrame(() => {
|
|
1172
|
+
Ee();
|
|
1173
|
+
}), t(8, re = x === m.VERIFIED);
|
|
1174
|
+
}
|
|
1175
|
+
function Be() {
|
|
1176
|
+
R && Ee();
|
|
1177
|
+
}
|
|
1178
|
+
function Ee(r = 20) {
|
|
1179
|
+
if (C)
|
|
1180
|
+
if (se || (se = (X ? document.querySelector(X) : _ == null ? void 0 : _.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || _), se) {
|
|
1181
|
+
const f = parseInt(J, 10) || 12, g = se.getBoundingClientRect(), I = C.getBoundingClientRect(), B = document.documentElement.clientHeight, O = document.documentElement.clientWidth, M = R === "auto" ? g.bottom + I.height + f + r > B : R === "top", w = Math.max(r, Math.min(O - r - I.width, g.left + g.width / 2 - I.width / 2));
|
|
1182
|
+
if (M ? t(9, C.style.top = `${g.top - (I.height + f)}px`, C) : t(9, C.style.top = `${g.bottom + f}px`, C), t(9, C.style.left = `${w}px`, C), C.setAttribute("data-floating", M ? "top" : "bottom"), ie) {
|
|
1183
|
+
const q = ie.getBoundingClientRect();
|
|
1184
|
+
t(10, ie.style.left = g.left - w + g.width / 2 - q.width / 2 + "px", ie);
|
|
1228
1185
|
}
|
|
1229
1186
|
} else
|
|
1230
1187
|
k("unable to find floating anchor element");
|
|
1231
1188
|
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1189
|
+
async function Dt(r) {
|
|
1190
|
+
if (!ee)
|
|
1191
|
+
throw new Error("Attribute verifyurl not set.");
|
|
1192
|
+
k("requesting server verification from", ee);
|
|
1193
|
+
const f = { payload: r };
|
|
1194
|
+
if (E) {
|
|
1195
|
+
const { blockedCountries: B, classifier: O, disableRules: M, email: w, expectedLanguages: q, expectedCountries: Ie, fields: be, ipAddress: ye, text: Vt, timeZone: tt } = xt();
|
|
1196
|
+
f.blockedCountries = B, f.classifier = O, f.disableRules = M, f.email = w === !1 ? void 0 : Ct(w), f.expectedCountries = Ie, f.expectedLanguages = q || (Me ? [Me] : void 0), f.fields = be === !1 ? void 0 : At(be), f.ipAddress = ye === !1 ? void 0 : ye || "auto", f.text = Vt, f.timeZone = tt === !1 ? void 0 : tt || bn();
|
|
1197
|
+
}
|
|
1198
|
+
const g = await fetch(ee, {
|
|
1199
|
+
body: JSON.stringify(f),
|
|
1200
|
+
headers: { "content-type": "application/json" },
|
|
1201
|
+
method: "POST"
|
|
1202
|
+
});
|
|
1203
|
+
if (g.status !== 200)
|
|
1204
|
+
throw new Error(`Server responded with ${g.status}.`);
|
|
1205
|
+
const I = await g.json();
|
|
1206
|
+
if (I != null && I.payload && t(6, oe = I.payload), he("serververification", I), A && I.classification === "BAD")
|
|
1207
|
+
throw new Error("SpamFilter returned negative classification.");
|
|
1208
|
+
}
|
|
1209
|
+
function ke(r) {
|
|
1210
|
+
k("expire", r), W && (clearTimeout(W), W = null), r < 1 ? Ne() : W = setTimeout(Ne, r);
|
|
1234
1211
|
}
|
|
1235
|
-
function
|
|
1236
|
-
|
|
1212
|
+
function qe(r) {
|
|
1213
|
+
k("floating", r), R !== r && (t(9, C.style.left = "", C), t(9, C.style.top = "", C)), t(1, R = r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : R), R ? (u || t(0, u = "onsubmit"), document.addEventListener("scroll", je), document.addEventListener("click", Ve), window.addEventListener("resize", Be)) : u === "onsubmit" && t(0, u = void 0);
|
|
1237
1214
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1215
|
+
function Ze(r) {
|
|
1216
|
+
if (!r.algorithm)
|
|
1217
|
+
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
1218
|
+
if (r.signature === void 0)
|
|
1219
|
+
throw new Error("Invalid challenge. Property signature is missing.");
|
|
1220
|
+
if (!Pe.includes(r.algorithm.toUpperCase()))
|
|
1221
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${Pe.join(", ")}`);
|
|
1222
|
+
if (!r.challenge || r.challenge.length < 40)
|
|
1223
|
+
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
1224
|
+
if (!r.salt || r.salt.length < 10)
|
|
1225
|
+
throw new Error("Salt is too short. Min. 10 chars.");
|
|
1226
|
+
}
|
|
1227
|
+
async function Ge(r) {
|
|
1228
|
+
let f = null;
|
|
1229
|
+
if ("Worker" in window) {
|
|
1230
|
+
try {
|
|
1231
|
+
f = await Tt(r, r.maxnumber);
|
|
1232
|
+
} catch (g) {
|
|
1233
|
+
k(g);
|
|
1234
|
+
}
|
|
1235
|
+
if ((f == null ? void 0 : f.number) !== void 0 || "obfuscated" in r)
|
|
1236
|
+
return { data: r, solution: f };
|
|
1237
|
+
}
|
|
1238
|
+
if ("obfuscated" in r) {
|
|
1239
|
+
const g = await wn(r.obfuscated, r.key, r.maxnumber);
|
|
1240
|
+
return { data: r, solution: await g.promise };
|
|
1241
|
+
}
|
|
1242
|
+
return {
|
|
1243
|
+
data: r,
|
|
1244
|
+
solution: await mn(r.challenge, r.salt, r.algorithm, r.maxnumber || G).promise
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
async function Tt(r, f = typeof y == "number" ? y : G, g = Math.ceil(le)) {
|
|
1248
|
+
const I = [];
|
|
1249
|
+
g = Math.min(16, Math.max(1, g));
|
|
1250
|
+
for (let M = 0; M < g; M++)
|
|
1251
|
+
I.push(altchaCreateWorker(ae));
|
|
1252
|
+
const B = Math.ceil(f / g), O = await Promise.all(I.map((M, w) => {
|
|
1253
|
+
const q = w * B;
|
|
1254
|
+
return new Promise((Ie) => {
|
|
1255
|
+
M.addEventListener("message", (be) => {
|
|
1256
|
+
if (be.data)
|
|
1257
|
+
for (const ye of I)
|
|
1258
|
+
ye !== M && ye.postMessage({ type: "abort" });
|
|
1259
|
+
Ie(be.data);
|
|
1260
|
+
}), M.postMessage({
|
|
1261
|
+
payload: r,
|
|
1262
|
+
max: q + B,
|
|
1263
|
+
start: q,
|
|
1264
|
+
type: "work"
|
|
1265
|
+
});
|
|
1266
|
+
});
|
|
1267
|
+
}));
|
|
1268
|
+
for (const M of I)
|
|
1269
|
+
M.terminate();
|
|
1270
|
+
return O.find((M) => !!M) || null;
|
|
1271
|
+
}
|
|
1272
|
+
async function ge() {
|
|
1273
|
+
if (!v) {
|
|
1274
|
+
t(7, x = m.ERROR);
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
const r = te.find((f) => f.constructor.pluginName === "obfuscation");
|
|
1278
|
+
if (!r || !("clarify" in r)) {
|
|
1279
|
+
t(7, x = m.ERROR), k("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
if ("clarify" in r && typeof r.clarify == "function")
|
|
1283
|
+
return r.clarify();
|
|
1284
|
+
}
|
|
1285
|
+
function Ye(r) {
|
|
1286
|
+
r.obfuscated !== void 0 && t(24, v = r.obfuscated), r.auto !== void 0 && (t(0, u = r.auto), u === "onload" && (v ? ge() : ne())), r.blockspam !== void 0 && t(16, A = !!r.blockspam), r.floatinganchor !== void 0 && t(20, X = r.floatinganchor), r.delay !== void 0 && t(18, $ = r.delay), r.floatingoffset !== void 0 && t(21, J = r.floatingoffset), r.floating !== void 0 && qe(r.floating), r.expire !== void 0 && (ke(r.expire), t(19, D = r.expire)), r.challenge && (Ze(r.challenge), o = r.challenge), r.challengeurl !== void 0 && t(15, b = r.challengeurl), r.debug !== void 0 && t(17, U = !!r.debug), r.hidefooter !== void 0 && t(2, N = !!r.hidefooter), r.hidelogo !== void 0 && t(3, T = !!r.hidelogo), r.maxnumber !== void 0 && t(22, G = +r.maxnumber), r.mockerror !== void 0 && t(23, V = !!r.mockerror), r.name !== void 0 && t(4, Q = r.name), r.refetchonexpire !== void 0 && t(25, S = !!r.refetchonexpire), r.spamfilter !== void 0 && t(26, E = typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && t(44, l = r.strings), r.test !== void 0 && t(27, y = typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && t(28, ee = r.verifyurl), r.workers !== void 0 && t(29, le = +r.workers), r.workerurl !== void 0 && t(30, ae = r.workerurl);
|
|
1287
|
+
}
|
|
1288
|
+
function We() {
|
|
1289
|
+
return {
|
|
1290
|
+
auto: u,
|
|
1291
|
+
blockspam: A,
|
|
1292
|
+
challengeurl: b,
|
|
1293
|
+
debug: U,
|
|
1294
|
+
delay: $,
|
|
1295
|
+
expire: D,
|
|
1296
|
+
floating: R,
|
|
1297
|
+
floatinganchor: X,
|
|
1298
|
+
floatingoffset: J,
|
|
1299
|
+
hidefooter: N,
|
|
1300
|
+
hidelogo: T,
|
|
1301
|
+
name: Q,
|
|
1302
|
+
maxnumber: G,
|
|
1303
|
+
mockerror: V,
|
|
1304
|
+
obfuscated: v,
|
|
1305
|
+
refetchonexpire: S,
|
|
1306
|
+
spamfilter: E,
|
|
1307
|
+
strings: s,
|
|
1308
|
+
test: y,
|
|
1309
|
+
verifyurl: ee,
|
|
1310
|
+
workers: le,
|
|
1311
|
+
workerurl: ae
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
function Xe() {
|
|
1315
|
+
return se;
|
|
1316
|
+
}
|
|
1317
|
+
function Pt(r) {
|
|
1318
|
+
return te.find((f) => f.constructor.pluginName === r);
|
|
1319
|
+
}
|
|
1320
|
+
function Je() {
|
|
1321
|
+
return x;
|
|
1322
|
+
}
|
|
1323
|
+
function me(r = m.UNVERIFIED, f = null) {
|
|
1324
|
+
W && (clearTimeout(W), W = null), t(8, re = !1), t(5, de = f), t(6, oe = null), t(7, x = r);
|
|
1325
|
+
}
|
|
1326
|
+
function ze(r) {
|
|
1327
|
+
se = r;
|
|
1328
|
+
}
|
|
1329
|
+
function Ke(r, f = null) {
|
|
1330
|
+
t(7, x = r), t(5, de = f);
|
|
1331
|
+
}
|
|
1332
|
+
async function ne() {
|
|
1333
|
+
return me(m.VERIFYING), await new Promise((r) => setTimeout(r, $ || 0)), vt().then((r) => (Ze(r), k("challenge", r), Ge(r))).then(({ data: r, solution: f }) => {
|
|
1334
|
+
if (k("solution", f), "challenge" in r && f && !("clearText" in f))
|
|
1335
|
+
if ((f == null ? void 0 : f.number) !== void 0) {
|
|
1336
|
+
if (ee)
|
|
1337
|
+
return Dt(Fe(r, f));
|
|
1338
|
+
t(6, oe = Fe(r, f)), k("payload", oe);
|
|
1339
|
+
} else
|
|
1340
|
+
throw k("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1246
1341
|
}).then(() => {
|
|
1247
|
-
|
|
1248
|
-
t(7,
|
|
1342
|
+
en().then(() => {
|
|
1343
|
+
t(7, x = m.VERIFIED), k("verified"), he("verified", { payload: oe });
|
|
1249
1344
|
});
|
|
1250
|
-
}).catch((
|
|
1251
|
-
k(
|
|
1345
|
+
}).catch((r) => {
|
|
1346
|
+
k(r), t(7, x = m.ERROR), t(5, de = r.message);
|
|
1252
1347
|
});
|
|
1253
1348
|
}
|
|
1254
|
-
function
|
|
1255
|
-
|
|
1349
|
+
function Mt() {
|
|
1350
|
+
re = this.checked, t(8, re);
|
|
1256
1351
|
}
|
|
1257
|
-
function
|
|
1258
|
-
|
|
1259
|
-
|
|
1352
|
+
function Ft(r) {
|
|
1353
|
+
Ae[r ? "unshift" : "push"](() => {
|
|
1354
|
+
ie = r, t(10, ie);
|
|
1260
1355
|
});
|
|
1261
1356
|
}
|
|
1262
|
-
function
|
|
1263
|
-
|
|
1264
|
-
|
|
1357
|
+
function Nt(r) {
|
|
1358
|
+
Ae[r ? "unshift" : "push"](() => {
|
|
1359
|
+
C = r, t(9, C);
|
|
1265
1360
|
});
|
|
1266
1361
|
}
|
|
1267
|
-
return n.$$set = (
|
|
1268
|
-
"
|
|
1362
|
+
return n.$$set = (r) => {
|
|
1363
|
+
"auto" in r && t(0, u = r.auto), "blockspam" in r && t(16, A = r.blockspam), "challengeurl" in r && t(15, b = r.challengeurl), "challengejson" in r && t(31, Y = r.challengejson), "debug" in r && t(17, U = r.debug), "delay" in r && t(18, $ = r.delay), "expire" in r && t(19, D = r.expire), "floating" in r && t(1, R = r.floating), "floatinganchor" in r && t(20, X = r.floatinganchor), "floatingoffset" in r && t(21, J = r.floatingoffset), "hidefooter" in r && t(2, N = r.hidefooter), "hidelogo" in r && t(3, T = r.hidelogo), "name" in r && t(4, Q = r.name), "maxnumber" in r && t(22, G = r.maxnumber), "mockerror" in r && t(23, V = r.mockerror), "obfuscated" in r && t(24, v = r.obfuscated), "plugins" in r && t(32, P = r.plugins), "refetchonexpire" in r && t(25, S = r.refetchonexpire), "spamfilter" in r && t(26, E = r.spamfilter), "strings" in r && t(33, a = r.strings), "test" in r && t(27, y = r.test), "verifyurl" in r && t(28, ee = r.verifyurl), "workers" in r && t(29, le = r.workers), "workerurl" in r && t(30, ae = r.workerurl), "$$scope" in r && t(45, d = r.$$scope);
|
|
1269
1364
|
}, n.$$.update = () => {
|
|
1270
1365
|
n.$$.dirty[0] & /*challengeurl*/
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
ariaLinkLabel:
|
|
1366
|
+
32768 && t(12, i = !!(b != null && b.includes(".altcha.org")) && !!(b != null && b.includes("apiKey=ckey_"))), n.$$.dirty[1] & /*challengejson*/
|
|
1367
|
+
1 && (o = Y ? at(Y) : void 0), n.$$.dirty[1] & /*strings*/
|
|
1368
|
+
4 && t(44, l = a ? at(a) : {}), n.$$.dirty[1] & /*parsedStrings*/
|
|
1369
|
+
8192 && t(11, s = {
|
|
1370
|
+
ariaLinkLabel: ut,
|
|
1276
1371
|
error: "Verification failed. Try again later.",
|
|
1277
1372
|
expired: "Verification expired. Try again.",
|
|
1278
|
-
footer: `Protected by <a href="${
|
|
1373
|
+
footer: `Protected by <a href="${Et}" target="_blank" aria-label="${l.ariaLinkLabel || ut}">ALTCHA</a>`,
|
|
1279
1374
|
label: "I'm not a robot",
|
|
1280
1375
|
verified: "Verified",
|
|
1281
1376
|
verifying: "Verifying...",
|
|
1282
1377
|
waitAlert: "Verifying... please wait.",
|
|
1283
|
-
...
|
|
1378
|
+
...l
|
|
1284
1379
|
}), n.$$.dirty[0] & /*payload, state*/
|
|
1285
|
-
192 &&
|
|
1286
|
-
32 &&
|
|
1287
|
-
128 &&
|
|
1380
|
+
192 && he("statechange", { payload: oe, state: x }), n.$$.dirty[0] & /*error*/
|
|
1381
|
+
32 && Rt(), n.$$.dirty[0] & /*state*/
|
|
1382
|
+
128 && St();
|
|
1288
1383
|
}, [
|
|
1289
|
-
|
|
1290
|
-
b,
|
|
1291
|
-
j,
|
|
1292
|
-
I,
|
|
1384
|
+
u,
|
|
1293
1385
|
R,
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
B,
|
|
1386
|
+
N,
|
|
1387
|
+
T,
|
|
1297
1388
|
Q,
|
|
1389
|
+
de,
|
|
1390
|
+
oe,
|
|
1391
|
+
x,
|
|
1392
|
+
re,
|
|
1393
|
+
C,
|
|
1394
|
+
ie,
|
|
1395
|
+
s,
|
|
1396
|
+
i,
|
|
1397
|
+
Lt,
|
|
1398
|
+
$e,
|
|
1399
|
+
b,
|
|
1298
1400
|
A,
|
|
1299
|
-
|
|
1300
|
-
V,
|
|
1301
|
-
Oe,
|
|
1302
|
-
u,
|
|
1303
|
-
r,
|
|
1304
|
-
Tt,
|
|
1305
|
-
ze,
|
|
1306
|
-
m,
|
|
1307
|
-
f,
|
|
1308
|
-
c,
|
|
1401
|
+
U,
|
|
1309
1402
|
$,
|
|
1310
|
-
|
|
1311
|
-
J,
|
|
1312
|
-
K,
|
|
1403
|
+
D,
|
|
1313
1404
|
X,
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1405
|
+
J,
|
|
1406
|
+
G,
|
|
1407
|
+
V,
|
|
1408
|
+
v,
|
|
1409
|
+
S,
|
|
1317
1410
|
E,
|
|
1318
|
-
|
|
1411
|
+
y,
|
|
1319
1412
|
ee,
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1413
|
+
le,
|
|
1414
|
+
ae,
|
|
1415
|
+
Y,
|
|
1416
|
+
P,
|
|
1417
|
+
a,
|
|
1418
|
+
ge,
|
|
1419
|
+
Ye,
|
|
1420
|
+
We,
|
|
1421
|
+
Xe,
|
|
1422
|
+
Pt,
|
|
1423
|
+
Je,
|
|
1424
|
+
me,
|
|
1425
|
+
ze,
|
|
1426
|
+
Ke,
|
|
1427
|
+
ne,
|
|
1428
|
+
l,
|
|
1429
|
+
d,
|
|
1430
|
+
h,
|
|
1431
|
+
Mt,
|
|
1432
|
+
Ft,
|
|
1433
|
+
Nt
|
|
1332
1434
|
];
|
|
1333
1435
|
}
|
|
1334
|
-
class
|
|
1436
|
+
class In extends an {
|
|
1335
1437
|
constructor(e) {
|
|
1336
|
-
super(),
|
|
1438
|
+
super(), cn(
|
|
1337
1439
|
this,
|
|
1338
1440
|
e,
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1441
|
+
An,
|
|
1442
|
+
xn,
|
|
1443
|
+
Ut,
|
|
1342
1444
|
{
|
|
1343
|
-
analytics: 18,
|
|
1344
1445
|
auto: 0,
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
expire: 22,
|
|
1446
|
+
blockspam: 16,
|
|
1447
|
+
challengeurl: 15,
|
|
1448
|
+
challengejson: 31,
|
|
1449
|
+
debug: 17,
|
|
1450
|
+
delay: 18,
|
|
1451
|
+
expire: 19,
|
|
1352
1452
|
floating: 1,
|
|
1353
|
-
floatinganchor:
|
|
1354
|
-
floatingoffset:
|
|
1453
|
+
floatinganchor: 20,
|
|
1454
|
+
floatingoffset: 21,
|
|
1355
1455
|
hidefooter: 2,
|
|
1356
1456
|
hidelogo: 3,
|
|
1357
1457
|
name: 4,
|
|
1358
|
-
maxnumber:
|
|
1359
|
-
mockerror:
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1458
|
+
maxnumber: 22,
|
|
1459
|
+
mockerror: 23,
|
|
1460
|
+
obfuscated: 24,
|
|
1461
|
+
plugins: 32,
|
|
1462
|
+
refetchonexpire: 25,
|
|
1463
|
+
spamfilter: 26,
|
|
1464
|
+
strings: 33,
|
|
1465
|
+
test: 27,
|
|
1466
|
+
verifyurl: 28,
|
|
1467
|
+
workers: 29,
|
|
1468
|
+
workerurl: 30,
|
|
1469
|
+
clarify: 34,
|
|
1470
|
+
configure: 35,
|
|
1471
|
+
getConfiguration: 36,
|
|
1472
|
+
getFloatingAnchor: 37,
|
|
1473
|
+
getPlugin: 38,
|
|
1474
|
+
getState: 39,
|
|
1475
|
+
reset: 40,
|
|
1476
|
+
setFloatingAnchor: 41,
|
|
1477
|
+
setState: 42,
|
|
1478
|
+
verify: 43
|
|
1370
1479
|
},
|
|
1371
1480
|
null,
|
|
1372
1481
|
[-1, -1, -1]
|
|
1373
1482
|
);
|
|
1374
1483
|
}
|
|
1375
|
-
get analytics() {
|
|
1376
|
-
return this.$$.ctx[18];
|
|
1377
|
-
}
|
|
1378
|
-
set analytics(e) {
|
|
1379
|
-
this.$$set({ analytics: e }), v();
|
|
1380
|
-
}
|
|
1381
1484
|
get auto() {
|
|
1382
1485
|
return this.$$.ctx[0];
|
|
1383
1486
|
}
|
|
1384
1487
|
set auto(e) {
|
|
1385
|
-
this.$$set({ auto: e }),
|
|
1386
|
-
}
|
|
1387
|
-
get beaconurl() {
|
|
1388
|
-
return this.$$.ctx[19];
|
|
1389
|
-
}
|
|
1390
|
-
set beaconurl(e) {
|
|
1391
|
-
this.$$set({ beaconurl: e }), v();
|
|
1488
|
+
this.$$set({ auto: e }), p();
|
|
1392
1489
|
}
|
|
1393
1490
|
get blockspam() {
|
|
1394
|
-
return this.$$.ctx[
|
|
1491
|
+
return this.$$.ctx[16];
|
|
1395
1492
|
}
|
|
1396
1493
|
set blockspam(e) {
|
|
1397
|
-
this.$$set({ blockspam: e }),
|
|
1494
|
+
this.$$set({ blockspam: e }), p();
|
|
1398
1495
|
}
|
|
1399
1496
|
get challengeurl() {
|
|
1400
|
-
return this.$$.ctx[
|
|
1497
|
+
return this.$$.ctx[15];
|
|
1401
1498
|
}
|
|
1402
1499
|
set challengeurl(e) {
|
|
1403
|
-
this.$$set({ challengeurl: e }),
|
|
1500
|
+
this.$$set({ challengeurl: e }), p();
|
|
1404
1501
|
}
|
|
1405
1502
|
get challengejson() {
|
|
1406
|
-
return this.$$.ctx[
|
|
1503
|
+
return this.$$.ctx[31];
|
|
1407
1504
|
}
|
|
1408
1505
|
set challengejson(e) {
|
|
1409
|
-
this.$$set({ challengejson: e }),
|
|
1506
|
+
this.$$set({ challengejson: e }), p();
|
|
1410
1507
|
}
|
|
1411
1508
|
get debug() {
|
|
1412
|
-
return this.$$.ctx[
|
|
1509
|
+
return this.$$.ctx[17];
|
|
1413
1510
|
}
|
|
1414
1511
|
set debug(e) {
|
|
1415
|
-
this.$$set({ debug: e }),
|
|
1512
|
+
this.$$set({ debug: e }), p();
|
|
1416
1513
|
}
|
|
1417
1514
|
get delay() {
|
|
1418
|
-
return this.$$.ctx[
|
|
1515
|
+
return this.$$.ctx[18];
|
|
1419
1516
|
}
|
|
1420
1517
|
set delay(e) {
|
|
1421
|
-
this.$$set({ delay: e }),
|
|
1518
|
+
this.$$set({ delay: e }), p();
|
|
1422
1519
|
}
|
|
1423
1520
|
get expire() {
|
|
1424
|
-
return this.$$.ctx[
|
|
1521
|
+
return this.$$.ctx[19];
|
|
1425
1522
|
}
|
|
1426
1523
|
set expire(e) {
|
|
1427
|
-
this.$$set({ expire: e }),
|
|
1524
|
+
this.$$set({ expire: e }), p();
|
|
1428
1525
|
}
|
|
1429
1526
|
get floating() {
|
|
1430
1527
|
return this.$$.ctx[1];
|
|
1431
1528
|
}
|
|
1432
1529
|
set floating(e) {
|
|
1433
|
-
this.$$set({ floating: e }),
|
|
1530
|
+
this.$$set({ floating: e }), p();
|
|
1434
1531
|
}
|
|
1435
1532
|
get floatinganchor() {
|
|
1436
|
-
return this.$$.ctx[
|
|
1533
|
+
return this.$$.ctx[20];
|
|
1437
1534
|
}
|
|
1438
1535
|
set floatinganchor(e) {
|
|
1439
|
-
this.$$set({ floatinganchor: e }),
|
|
1536
|
+
this.$$set({ floatinganchor: e }), p();
|
|
1440
1537
|
}
|
|
1441
1538
|
get floatingoffset() {
|
|
1442
|
-
return this.$$.ctx[
|
|
1539
|
+
return this.$$.ctx[21];
|
|
1443
1540
|
}
|
|
1444
1541
|
set floatingoffset(e) {
|
|
1445
|
-
this.$$set({ floatingoffset: e }),
|
|
1542
|
+
this.$$set({ floatingoffset: e }), p();
|
|
1446
1543
|
}
|
|
1447
1544
|
get hidefooter() {
|
|
1448
1545
|
return this.$$.ctx[2];
|
|
1449
1546
|
}
|
|
1450
1547
|
set hidefooter(e) {
|
|
1451
|
-
this.$$set({ hidefooter: e }),
|
|
1548
|
+
this.$$set({ hidefooter: e }), p();
|
|
1452
1549
|
}
|
|
1453
1550
|
get hidelogo() {
|
|
1454
1551
|
return this.$$.ctx[3];
|
|
1455
1552
|
}
|
|
1456
1553
|
set hidelogo(e) {
|
|
1457
|
-
this.$$set({ hidelogo: e }),
|
|
1554
|
+
this.$$set({ hidelogo: e }), p();
|
|
1458
1555
|
}
|
|
1459
1556
|
get name() {
|
|
1460
1557
|
return this.$$.ctx[4];
|
|
1461
1558
|
}
|
|
1462
1559
|
set name(e) {
|
|
1463
|
-
this.$$set({ name: e }),
|
|
1560
|
+
this.$$set({ name: e }), p();
|
|
1464
1561
|
}
|
|
1465
1562
|
get maxnumber() {
|
|
1466
|
-
return this.$$.ctx[
|
|
1563
|
+
return this.$$.ctx[22];
|
|
1467
1564
|
}
|
|
1468
1565
|
set maxnumber(e) {
|
|
1469
|
-
this.$$set({ maxnumber: e }),
|
|
1566
|
+
this.$$set({ maxnumber: e }), p();
|
|
1470
1567
|
}
|
|
1471
1568
|
get mockerror() {
|
|
1472
|
-
return this.$$.ctx[
|
|
1569
|
+
return this.$$.ctx[23];
|
|
1473
1570
|
}
|
|
1474
1571
|
set mockerror(e) {
|
|
1475
|
-
this.$$set({ mockerror: e }),
|
|
1572
|
+
this.$$set({ mockerror: e }), p();
|
|
1573
|
+
}
|
|
1574
|
+
get obfuscated() {
|
|
1575
|
+
return this.$$.ctx[24];
|
|
1576
|
+
}
|
|
1577
|
+
set obfuscated(e) {
|
|
1578
|
+
this.$$set({ obfuscated: e }), p();
|
|
1579
|
+
}
|
|
1580
|
+
get plugins() {
|
|
1581
|
+
return this.$$.ctx[32];
|
|
1582
|
+
}
|
|
1583
|
+
set plugins(e) {
|
|
1584
|
+
this.$$set({ plugins: e }), p();
|
|
1476
1585
|
}
|
|
1477
1586
|
get refetchonexpire() {
|
|
1478
|
-
return this.$$.ctx[
|
|
1587
|
+
return this.$$.ctx[25];
|
|
1479
1588
|
}
|
|
1480
1589
|
set refetchonexpire(e) {
|
|
1481
|
-
this.$$set({ refetchonexpire: e }),
|
|
1590
|
+
this.$$set({ refetchonexpire: e }), p();
|
|
1482
1591
|
}
|
|
1483
1592
|
get spamfilter() {
|
|
1484
|
-
return this.$$.ctx[
|
|
1593
|
+
return this.$$.ctx[26];
|
|
1485
1594
|
}
|
|
1486
1595
|
set spamfilter(e) {
|
|
1487
|
-
this.$$set({ spamfilter: e }),
|
|
1596
|
+
this.$$set({ spamfilter: e }), p();
|
|
1488
1597
|
}
|
|
1489
1598
|
get strings() {
|
|
1490
|
-
return this.$$.ctx[
|
|
1599
|
+
return this.$$.ctx[33];
|
|
1491
1600
|
}
|
|
1492
1601
|
set strings(e) {
|
|
1493
|
-
this.$$set({ strings: e }),
|
|
1602
|
+
this.$$set({ strings: e }), p();
|
|
1494
1603
|
}
|
|
1495
1604
|
get test() {
|
|
1496
|
-
return this.$$.ctx[
|
|
1605
|
+
return this.$$.ctx[27];
|
|
1497
1606
|
}
|
|
1498
1607
|
set test(e) {
|
|
1499
|
-
this.$$set({ test: e }),
|
|
1608
|
+
this.$$set({ test: e }), p();
|
|
1500
1609
|
}
|
|
1501
1610
|
get verifyurl() {
|
|
1502
|
-
return this.$$.ctx[
|
|
1611
|
+
return this.$$.ctx[28];
|
|
1503
1612
|
}
|
|
1504
1613
|
set verifyurl(e) {
|
|
1505
|
-
this.$$set({ verifyurl: e }),
|
|
1614
|
+
this.$$set({ verifyurl: e }), p();
|
|
1506
1615
|
}
|
|
1507
1616
|
get workers() {
|
|
1508
|
-
return this.$$.ctx[
|
|
1617
|
+
return this.$$.ctx[29];
|
|
1509
1618
|
}
|
|
1510
1619
|
set workers(e) {
|
|
1511
|
-
this.$$set({ workers: e }),
|
|
1620
|
+
this.$$set({ workers: e }), p();
|
|
1512
1621
|
}
|
|
1513
1622
|
get workerurl() {
|
|
1514
|
-
return this.$$.ctx[
|
|
1623
|
+
return this.$$.ctx[30];
|
|
1515
1624
|
}
|
|
1516
1625
|
set workerurl(e) {
|
|
1517
|
-
this.$$set({ workerurl: e }),
|
|
1626
|
+
this.$$set({ workerurl: e }), p();
|
|
1627
|
+
}
|
|
1628
|
+
get clarify() {
|
|
1629
|
+
return this.$$.ctx[34];
|
|
1518
1630
|
}
|
|
1519
1631
|
get configure() {
|
|
1632
|
+
return this.$$.ctx[35];
|
|
1633
|
+
}
|
|
1634
|
+
get getConfiguration() {
|
|
1520
1635
|
return this.$$.ctx[36];
|
|
1521
1636
|
}
|
|
1522
|
-
get
|
|
1637
|
+
get getFloatingAnchor() {
|
|
1523
1638
|
return this.$$.ctx[37];
|
|
1524
1639
|
}
|
|
1525
|
-
get
|
|
1640
|
+
get getPlugin() {
|
|
1526
1641
|
return this.$$.ctx[38];
|
|
1527
1642
|
}
|
|
1643
|
+
get getState() {
|
|
1644
|
+
return this.$$.ctx[39];
|
|
1645
|
+
}
|
|
1646
|
+
get reset() {
|
|
1647
|
+
return this.$$.ctx[40];
|
|
1648
|
+
}
|
|
1649
|
+
get setFloatingAnchor() {
|
|
1650
|
+
return this.$$.ctx[41];
|
|
1651
|
+
}
|
|
1652
|
+
get setState() {
|
|
1653
|
+
return this.$$.ctx[42];
|
|
1654
|
+
}
|
|
1655
|
+
get verify() {
|
|
1656
|
+
return this.$$.ctx[43];
|
|
1657
|
+
}
|
|
1528
1658
|
}
|
|
1529
|
-
customElements.define("altcha-widget",
|
|
1530
|
-
|
|
1659
|
+
customElements.define("altcha-widget", un(
|
|
1660
|
+
In,
|
|
1661
|
+
{ auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, obfuscated: {}, plugins: {}, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} },
|
|
1662
|
+
["default"],
|
|
1663
|
+
[
|
|
1664
|
+
"clarify",
|
|
1665
|
+
"configure",
|
|
1666
|
+
"getConfiguration",
|
|
1667
|
+
"getFloatingAnchor",
|
|
1668
|
+
"getPlugin",
|
|
1669
|
+
"getState",
|
|
1670
|
+
"reset",
|
|
1671
|
+
"setFloatingAnchor",
|
|
1672
|
+
"setState",
|
|
1673
|
+
"verify"
|
|
1674
|
+
],
|
|
1675
|
+
!1
|
|
1676
|
+
));
|
|
1677
|
+
globalThis.altchaCreateWorker = (n) => new Worker(new URL(n || "./worker.js", import.meta.url));
|
|
1678
|
+
globalThis.altchaPlugins = globalThis.altchaPlugins || [];
|
|
1531
1679
|
export {
|
|
1532
|
-
|
|
1680
|
+
In as Altcha
|
|
1533
1681
|
};
|