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