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