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