altcha 0.5.1 → 0.6.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 +8 -0
- package/dist/altcha.js +705 -606
- package/dist/altcha.umd.cjs +1 -1
- package/dist_external/altcha.css +41 -1
- package/dist_external/altcha.js +739 -640
- package/dist_external/altcha.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/altcha.js
CHANGED
|
@@ -1,227 +1,227 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
function
|
|
1
|
+
var yt = Object.defineProperty;
|
|
2
|
+
var pt = (r, e, t) => e in r ? yt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var G = (r, e, t) => pt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const Qe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK", _t = (r) => Uint8Array.from(atob(r), (e) => e.charCodeAt(0)), Ge = typeof window < "u" && window.Blob && new Blob([_t(Qe)], { type: "text/javascript;charset=utf-8" });
|
|
5
|
+
function kt(r) {
|
|
6
6
|
let e;
|
|
7
7
|
try {
|
|
8
|
-
if (e =
|
|
9
|
-
const
|
|
10
|
-
name:
|
|
8
|
+
if (e = Ge && (window.URL || window.webkitURL).createObjectURL(Ge), !e) throw "";
|
|
9
|
+
const t = new Worker(e, {
|
|
10
|
+
name: r == null ? void 0 : r.name
|
|
11
11
|
});
|
|
12
|
-
return
|
|
12
|
+
return t.addEventListener("error", () => {
|
|
13
13
|
(window.URL || window.webkitURL).revokeObjectURL(e);
|
|
14
|
-
}),
|
|
14
|
+
}), t;
|
|
15
15
|
} catch {
|
|
16
16
|
return new Worker(
|
|
17
|
-
"data:text/javascript;base64," +
|
|
17
|
+
"data:text/javascript;base64," + Qe,
|
|
18
18
|
{
|
|
19
|
-
name:
|
|
19
|
+
name: r == null ? void 0 : r.name
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
} finally {
|
|
23
23
|
e && (window.URL || window.webkitURL).revokeObjectURL(e);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function ne() {
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function et(r) {
|
|
29
|
+
return r();
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function We() {
|
|
32
32
|
return /* @__PURE__ */ Object.create(null);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
34
|
+
function se(r) {
|
|
35
|
+
r.forEach(et);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return typeof
|
|
37
|
+
function tt(r) {
|
|
38
|
+
return typeof r == "function";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
40
|
+
function xt(r, e) {
|
|
41
|
+
return r != r ? e == e : r !== e || r && typeof r == "object" || typeof r == "function";
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return Object.keys(
|
|
43
|
+
function Et(r) {
|
|
44
|
+
return Object.keys(r).length === 0;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function _(r, e) {
|
|
47
|
+
r.appendChild(e);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const i =
|
|
49
|
+
function Ct(r, e, t) {
|
|
50
|
+
const i = Lt(r);
|
|
51
51
|
if (!i.getElementById(e)) {
|
|
52
|
-
const o =
|
|
53
|
-
o.id = e, o.textContent =
|
|
52
|
+
const o = A("style");
|
|
53
|
+
o.id = e, o.textContent = t, Rt(i, o);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
if (!
|
|
58
|
-
const e =
|
|
56
|
+
function Lt(r) {
|
|
57
|
+
if (!r) return document;
|
|
58
|
+
const e = r.getRootNode ? r.getRootNode() : r.ownerDocument;
|
|
59
59
|
return e && /** @type {ShadowRoot} */
|
|
60
60
|
e.host ? (
|
|
61
61
|
/** @type {ShadowRoot} */
|
|
62
62
|
e
|
|
63
|
-
) :
|
|
63
|
+
) : r.ownerDocument;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function Rt(r, e) {
|
|
66
|
+
return _(
|
|
67
67
|
/** @type {Document} */
|
|
68
|
-
|
|
68
|
+
r.head || r,
|
|
69
69
|
e
|
|
70
70
|
), e.sheet;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
72
|
+
function $(r, e, t) {
|
|
73
|
+
r.insertBefore(e, t || null);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
|
|
75
|
+
function Z(r) {
|
|
76
|
+
r.parentNode && r.parentNode.removeChild(r);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
return document.createElement(
|
|
78
|
+
function A(r) {
|
|
79
|
+
return document.createElement(r);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return document.createElementNS("http://www.w3.org/2000/svg",
|
|
81
|
+
function B(r) {
|
|
82
|
+
return document.createElementNS("http://www.w3.org/2000/svg", r);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
return document.createTextNode(
|
|
84
|
+
function zt(r) {
|
|
85
|
+
return document.createTextNode(r);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function Y() {
|
|
88
|
+
return zt(" ");
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function ve(r, e, t, i) {
|
|
91
|
+
return r.addEventListener(e, t, i), () => r.removeEventListener(e, t, i);
|
|
92
92
|
}
|
|
93
|
-
function c(
|
|
94
|
-
|
|
93
|
+
function c(r, e, t) {
|
|
94
|
+
t == null ? r.removeAttribute(e) : r.getAttribute(e) !== t && r.setAttribute(e, t);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return Array.from(
|
|
96
|
+
function It(r) {
|
|
97
|
+
return Array.from(r.childNodes);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
99
|
+
function Xe(r, e, t) {
|
|
100
|
+
r.classList.toggle(e, !!t);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return new CustomEvent(
|
|
102
|
+
function At(r, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
103
|
+
return new CustomEvent(r, { detail: e, bubbles: t, cancelable: i });
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Nt(r) {
|
|
106
106
|
const e = {};
|
|
107
|
-
return
|
|
107
|
+
return r.childNodes.forEach(
|
|
108
108
|
/** @param {Element} node */
|
|
109
|
-
(
|
|
110
|
-
e[
|
|
109
|
+
(t) => {
|
|
110
|
+
e[t.slot || "default"] = !0;
|
|
111
111
|
}
|
|
112
112
|
), e;
|
|
113
113
|
}
|
|
114
|
-
let
|
|
115
|
-
function
|
|
116
|
-
|
|
114
|
+
let le;
|
|
115
|
+
function oe(r) {
|
|
116
|
+
le = r;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
if (!
|
|
120
|
-
return
|
|
118
|
+
function ke() {
|
|
119
|
+
if (!le) throw new Error("Function called outside component initialization");
|
|
120
|
+
return le;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
|
|
122
|
+
function St(r) {
|
|
123
|
+
ke().$$.on_mount.push(r);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
|
|
125
|
+
function jt(r) {
|
|
126
|
+
ke().$$.on_destroy.push(r);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
const
|
|
130
|
-
return (e,
|
|
131
|
-
const o =
|
|
128
|
+
function Tt() {
|
|
129
|
+
const r = ke();
|
|
130
|
+
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
131
|
+
const o = r.$$.callbacks[e];
|
|
132
132
|
if (o) {
|
|
133
|
-
const l =
|
|
133
|
+
const l = At(
|
|
134
134
|
/** @type {string} */
|
|
135
135
|
e,
|
|
136
|
-
|
|
136
|
+
t,
|
|
137
137
|
{ cancelable: i }
|
|
138
138
|
);
|
|
139
139
|
return o.slice().forEach((s) => {
|
|
140
|
-
s.call(
|
|
140
|
+
s.call(r, l);
|
|
141
141
|
}), !l.defaultPrevented;
|
|
142
142
|
}
|
|
143
143
|
return !0;
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
const
|
|
147
|
-
let
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
function
|
|
151
|
-
|
|
146
|
+
const te = [], he = [];
|
|
147
|
+
let re = [];
|
|
148
|
+
const Be = [], rt = /* @__PURE__ */ Promise.resolve();
|
|
149
|
+
let pe = !1;
|
|
150
|
+
function nt() {
|
|
151
|
+
pe || (pe = !0, rt.then(w));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
return
|
|
153
|
+
function Zt() {
|
|
154
|
+
return nt(), rt;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
156
|
+
function _e(r) {
|
|
157
|
+
re.push(r);
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
let
|
|
161
|
-
function
|
|
162
|
-
if (
|
|
159
|
+
const ye = /* @__PURE__ */ new Set();
|
|
160
|
+
let ee = 0;
|
|
161
|
+
function w() {
|
|
162
|
+
if (ee !== 0)
|
|
163
163
|
return;
|
|
164
|
-
const
|
|
164
|
+
const r = le;
|
|
165
165
|
do {
|
|
166
166
|
try {
|
|
167
|
-
for (;
|
|
168
|
-
const e =
|
|
169
|
-
|
|
167
|
+
for (; ee < te.length; ) {
|
|
168
|
+
const e = te[ee];
|
|
169
|
+
ee++, oe(e), Mt(e.$$);
|
|
170
170
|
}
|
|
171
171
|
} catch (e) {
|
|
172
|
-
throw
|
|
172
|
+
throw te.length = 0, ee = 0, e;
|
|
173
173
|
}
|
|
174
|
-
for (
|
|
175
|
-
for (let e = 0; e <
|
|
176
|
-
const
|
|
177
|
-
|
|
174
|
+
for (oe(null), te.length = 0, ee = 0; he.length; ) he.pop()();
|
|
175
|
+
for (let e = 0; e < re.length; e += 1) {
|
|
176
|
+
const t = re[e];
|
|
177
|
+
ye.has(t) || (ye.add(t), t());
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
} while (
|
|
181
|
-
for (;
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
re.length = 0;
|
|
180
|
+
} while (te.length);
|
|
181
|
+
for (; Be.length; )
|
|
182
|
+
Be.pop()();
|
|
183
|
+
pe = !1, ye.clear(), oe(r);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
const e =
|
|
189
|
-
|
|
185
|
+
function Mt(r) {
|
|
186
|
+
if (r.fragment !== null) {
|
|
187
|
+
r.update(), se(r.before_update);
|
|
188
|
+
const e = r.dirty;
|
|
189
|
+
r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(_e);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
const e = [],
|
|
194
|
-
|
|
192
|
+
function Vt(r) {
|
|
193
|
+
const e = [], t = [];
|
|
194
|
+
re.forEach((i) => r.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), re = e;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
197
|
-
function
|
|
198
|
-
|
|
196
|
+
const $t = /* @__PURE__ */ new Set();
|
|
197
|
+
function Dt(r, e) {
|
|
198
|
+
r && r.i && ($t.delete(r), r.i(e));
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
const { fragment: i, after_update: o } =
|
|
202
|
-
i && i.m(e,
|
|
203
|
-
const l =
|
|
204
|
-
|
|
205
|
-
}), o.forEach(
|
|
200
|
+
function Ut(r, e, t) {
|
|
201
|
+
const { fragment: i, after_update: o } = r.$$;
|
|
202
|
+
i && i.m(e, t), _e(() => {
|
|
203
|
+
const l = r.$$.on_mount.map(et).filter(tt);
|
|
204
|
+
r.$$.on_destroy ? r.$$.on_destroy.push(...l) : se(l), r.$$.on_mount = [];
|
|
205
|
+
}), o.forEach(_e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
|
|
207
|
+
function Ft(r, e) {
|
|
208
|
+
const t = r.$$;
|
|
209
|
+
t.fragment !== null && (Vt(t.after_update), se(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
211
|
+
function Gt(r, e) {
|
|
212
|
+
r.$$.dirty[0] === -1 && (te.push(r), nt(), r.$$.dirty.fill(0)), r.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const a =
|
|
216
|
-
|
|
217
|
-
const
|
|
214
|
+
function Wt(r, e, t, i, o, l, s = null, u = [-1]) {
|
|
215
|
+
const a = le;
|
|
216
|
+
oe(r);
|
|
217
|
+
const d = r.$$ = {
|
|
218
218
|
fragment: null,
|
|
219
219
|
ctx: [],
|
|
220
220
|
// state
|
|
221
221
|
props: l,
|
|
222
|
-
update:
|
|
222
|
+
update: ne,
|
|
223
223
|
not_equal: o,
|
|
224
|
-
bound:
|
|
224
|
+
bound: We(),
|
|
225
225
|
// lifecycle
|
|
226
226
|
on_mount: [],
|
|
227
227
|
on_destroy: [],
|
|
@@ -230,61 +230,61 @@ function It(t, e, r, i, o, l, s = null, f = [-1]) {
|
|
|
230
230
|
after_update: [],
|
|
231
231
|
context: new Map(e.context || (a ? a.$$.context : [])),
|
|
232
232
|
// everything else
|
|
233
|
-
callbacks:
|
|
234
|
-
dirty:
|
|
233
|
+
callbacks: We(),
|
|
234
|
+
dirty: u,
|
|
235
235
|
skip_bound: !1,
|
|
236
236
|
root: e.target || a.$$.root
|
|
237
237
|
};
|
|
238
|
-
s && s(
|
|
239
|
-
let
|
|
240
|
-
if (
|
|
241
|
-
const
|
|
242
|
-
return
|
|
243
|
-
}) : [],
|
|
238
|
+
s && s(d.root);
|
|
239
|
+
let U = !1;
|
|
240
|
+
if (d.ctx = t ? t(r, e.props || {}, (S, D, ...k) => {
|
|
241
|
+
const F = k.length ? k[0] : D;
|
|
242
|
+
return d.ctx && o(d.ctx[S], d.ctx[S] = F) && (!d.skip_bound && d.bound[S] && d.bound[S](F), U && Gt(r, S)), D;
|
|
243
|
+
}) : [], d.update(), U = !0, se(d.before_update), d.fragment = i ? i(d.ctx) : !1, e.target) {
|
|
244
244
|
if (e.hydrate) {
|
|
245
|
-
const
|
|
246
|
-
|
|
245
|
+
const S = It(e.target);
|
|
246
|
+
d.fragment && d.fragment.l(S), S.forEach(Z);
|
|
247
247
|
} else
|
|
248
|
-
|
|
249
|
-
e.intro &&
|
|
248
|
+
d.fragment && d.fragment.c();
|
|
249
|
+
e.intro && Dt(r.$$.fragment), Ut(r, e.target, e.anchor), w();
|
|
250
250
|
}
|
|
251
|
-
|
|
251
|
+
oe(a);
|
|
252
252
|
}
|
|
253
|
-
let
|
|
254
|
-
typeof HTMLElement == "function" && (
|
|
255
|
-
constructor(e,
|
|
253
|
+
let it;
|
|
254
|
+
typeof HTMLElement == "function" && (it = class extends HTMLElement {
|
|
255
|
+
constructor(e, t, i) {
|
|
256
256
|
super();
|
|
257
257
|
/** The Svelte component constructor */
|
|
258
|
-
|
|
258
|
+
G(this, "$$ctor");
|
|
259
259
|
/** Slots */
|
|
260
|
-
|
|
260
|
+
G(this, "$$s");
|
|
261
261
|
/** The Svelte component instance */
|
|
262
|
-
|
|
262
|
+
G(this, "$$c");
|
|
263
263
|
/** Whether or not the custom element is connected */
|
|
264
|
-
|
|
264
|
+
G(this, "$$cn", !1);
|
|
265
265
|
/** Component props data */
|
|
266
|
-
|
|
266
|
+
G(this, "$$d", {});
|
|
267
267
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
268
|
-
|
|
268
|
+
G(this, "$$r", !1);
|
|
269
269
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
270
|
-
|
|
270
|
+
G(this, "$$p_d", {});
|
|
271
271
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
272
|
-
|
|
272
|
+
G(this, "$$l", {});
|
|
273
273
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
274
|
-
|
|
275
|
-
this.$$ctor = e, this.$$s =
|
|
274
|
+
G(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
275
|
+
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
|
|
276
276
|
}
|
|
277
|
-
addEventListener(e,
|
|
278
|
-
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(
|
|
279
|
-
const o = this.$$c.$on(e,
|
|
280
|
-
this.$$l_u.set(
|
|
277
|
+
addEventListener(e, t, i) {
|
|
278
|
+
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
279
|
+
const o = this.$$c.$on(e, t);
|
|
280
|
+
this.$$l_u.set(t, o);
|
|
281
281
|
}
|
|
282
|
-
super.addEventListener(e,
|
|
282
|
+
super.addEventListener(e, t, i);
|
|
283
283
|
}
|
|
284
|
-
removeEventListener(e,
|
|
285
|
-
if (super.removeEventListener(e,
|
|
286
|
-
const o = this.$$l_u.get(
|
|
287
|
-
o && (o(), this.$$l_u.delete(
|
|
284
|
+
removeEventListener(e, t, i) {
|
|
285
|
+
if (super.removeEventListener(e, t, i), this.$$c) {
|
|
286
|
+
const o = this.$$l_u.get(t);
|
|
287
|
+
o && (o(), this.$$l_u.delete(t));
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
async connectedCallback() {
|
|
@@ -294,29 +294,29 @@ typeof HTMLElement == "function" && (He = class extends HTMLElement {
|
|
|
294
294
|
let s;
|
|
295
295
|
return {
|
|
296
296
|
c: function() {
|
|
297
|
-
s =
|
|
297
|
+
s = A("slot"), l !== "default" && c(s, "name", l);
|
|
298
298
|
},
|
|
299
299
|
/**
|
|
300
300
|
* @param {HTMLElement} target
|
|
301
301
|
* @param {HTMLElement} [anchor]
|
|
302
302
|
*/
|
|
303
|
-
m: function(
|
|
304
|
-
|
|
303
|
+
m: function(d, U) {
|
|
304
|
+
$(d, s, U);
|
|
305
305
|
},
|
|
306
|
-
d: function(
|
|
307
|
-
|
|
306
|
+
d: function(d) {
|
|
307
|
+
d && Z(s);
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
311
|
};
|
|
312
312
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
313
313
|
return;
|
|
314
|
-
const
|
|
314
|
+
const t = {}, i = Nt(this);
|
|
315
315
|
for (const l of this.$$s)
|
|
316
|
-
l in i && (
|
|
316
|
+
l in i && (t[l] = [e(l)]);
|
|
317
317
|
for (const l of this.attributes) {
|
|
318
318
|
const s = this.$$g_p(l.name);
|
|
319
|
-
s in this.$$d || (this.$$d[s] =
|
|
319
|
+
s in this.$$d || (this.$$d[s] = de(s, l.value, this.$$p_d, "toProp"));
|
|
320
320
|
}
|
|
321
321
|
for (const l in this.$$p_d)
|
|
322
322
|
!(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
|
|
@@ -324,7 +324,7 @@ typeof HTMLElement == "function" && (He = class extends HTMLElement {
|
|
|
324
324
|
target: this.shadowRoot || this,
|
|
325
325
|
props: {
|
|
326
326
|
...this.$$d,
|
|
327
|
-
$$slots:
|
|
327
|
+
$$slots: t,
|
|
328
328
|
$$scope: {
|
|
329
329
|
ctx: []
|
|
330
330
|
}
|
|
@@ -334,7 +334,7 @@ typeof HTMLElement == "function" && (He = class extends HTMLElement {
|
|
|
334
334
|
this.$$r = !0;
|
|
335
335
|
for (const l in this.$$p_d)
|
|
336
336
|
if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
|
|
337
|
-
const s =
|
|
337
|
+
const s = de(
|
|
338
338
|
l,
|
|
339
339
|
this.$$d[l],
|
|
340
340
|
this.$$p_d,
|
|
@@ -347,17 +347,17 @@ typeof HTMLElement == "function" && (He = class extends HTMLElement {
|
|
|
347
347
|
this.$$c.$$.after_update.push(o), o();
|
|
348
348
|
for (const l in this.$$l)
|
|
349
349
|
for (const s of this.$$l[l]) {
|
|
350
|
-
const
|
|
351
|
-
this.$$l_u.set(s,
|
|
350
|
+
const u = this.$$c.$on(l, s);
|
|
351
|
+
this.$$l_u.set(s, u);
|
|
352
352
|
}
|
|
353
353
|
this.$$l = {};
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
|
|
357
357
|
// and setting attributes through setAttribute etc, this is helpful
|
|
358
|
-
attributeChangedCallback(e,
|
|
358
|
+
attributeChangedCallback(e, t, i) {
|
|
359
359
|
var o;
|
|
360
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
360
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = de(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
|
|
361
361
|
}
|
|
362
362
|
disconnectedCallback() {
|
|
363
363
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -366,14 +366,14 @@ typeof HTMLElement == "function" && (He = class extends HTMLElement {
|
|
|
366
366
|
}
|
|
367
367
|
$$g_p(e) {
|
|
368
368
|
return Object.keys(this.$$p_d).find(
|
|
369
|
-
(
|
|
369
|
+
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
|
|
370
370
|
) || e;
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
|
-
function
|
|
373
|
+
function de(r, e, t, i) {
|
|
374
374
|
var l;
|
|
375
|
-
const o = (l = r
|
|
376
|
-
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !r
|
|
375
|
+
const o = (l = t[r]) == null ? void 0 : l.type;
|
|
376
|
+
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[r])
|
|
377
377
|
return e;
|
|
378
378
|
if (i === "toAttribute")
|
|
379
379
|
switch (o) {
|
|
@@ -400,38 +400,38 @@ function se(t, e, r, i) {
|
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
let s = class extends
|
|
403
|
+
function Xt(r, e, t, i, o, l) {
|
|
404
|
+
let s = class extends it {
|
|
405
405
|
constructor() {
|
|
406
|
-
super(
|
|
406
|
+
super(r, t, o), this.$$p_d = e;
|
|
407
407
|
}
|
|
408
408
|
static get observedAttributes() {
|
|
409
409
|
return Object.keys(e).map(
|
|
410
|
-
(
|
|
410
|
+
(u) => (e[u].attribute || u).toLowerCase()
|
|
411
411
|
);
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
return Object.keys(e).forEach((
|
|
415
|
-
Object.defineProperty(s.prototype,
|
|
414
|
+
return Object.keys(e).forEach((u) => {
|
|
415
|
+
Object.defineProperty(s.prototype, u, {
|
|
416
416
|
get() {
|
|
417
|
-
return this.$$c &&
|
|
417
|
+
return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
|
|
418
418
|
},
|
|
419
419
|
set(a) {
|
|
420
|
-
var
|
|
421
|
-
a =
|
|
420
|
+
var d;
|
|
421
|
+
a = de(u, a, e), this.$$d[u] = a, (d = this.$$c) == null || d.$set({ [u]: a });
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
|
-
}), i.forEach((
|
|
425
|
-
Object.defineProperty(s.prototype,
|
|
424
|
+
}), i.forEach((u) => {
|
|
425
|
+
Object.defineProperty(s.prototype, u, {
|
|
426
426
|
get() {
|
|
427
427
|
var a;
|
|
428
|
-
return (a = this.$$c) == null ? void 0 : a[
|
|
428
|
+
return (a = this.$$c) == null ? void 0 : a[u];
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
|
-
}), l && (s = l(s)),
|
|
431
|
+
}), l && (s = l(s)), r.element = /** @type {any} */
|
|
432
432
|
s, s;
|
|
433
433
|
}
|
|
434
|
-
class
|
|
434
|
+
class Bt {
|
|
435
435
|
constructor() {
|
|
436
436
|
/**
|
|
437
437
|
* ### PRIVATE API
|
|
@@ -440,7 +440,7 @@ class Nt {
|
|
|
440
440
|
*
|
|
441
441
|
* @type {any}
|
|
442
442
|
*/
|
|
443
|
-
|
|
443
|
+
G(this, "$$");
|
|
444
444
|
/**
|
|
445
445
|
* ### PRIVATE API
|
|
446
446
|
*
|
|
@@ -448,11 +448,11 @@ class Nt {
|
|
|
448
448
|
*
|
|
449
449
|
* @type {any}
|
|
450
450
|
*/
|
|
451
|
-
|
|
451
|
+
G(this, "$$set");
|
|
452
452
|
}
|
|
453
453
|
/** @returns {void} */
|
|
454
454
|
$destroy() {
|
|
455
|
-
|
|
455
|
+
Ft(this, 1), this.$destroy = ne;
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -460,12 +460,12 @@ class Nt {
|
|
|
460
460
|
* @param {((e: Events[K]) => void) | null | undefined} callback
|
|
461
461
|
* @returns {() => void}
|
|
462
462
|
*/
|
|
463
|
-
$on(e,
|
|
464
|
-
if (!
|
|
465
|
-
return
|
|
463
|
+
$on(e, t) {
|
|
464
|
+
if (!tt(t))
|
|
465
|
+
return ne;
|
|
466
466
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
467
|
-
return i.push(
|
|
468
|
-
const o = i.indexOf(
|
|
467
|
+
return i.push(t), () => {
|
|
468
|
+
const o = i.indexOf(t);
|
|
469
469
|
o !== -1 && i.splice(o, 1);
|
|
470
470
|
};
|
|
471
471
|
}
|
|
@@ -474,19 +474,19 @@ class Nt {
|
|
|
474
474
|
* @returns {void}
|
|
475
475
|
*/
|
|
476
476
|
$set(e) {
|
|
477
|
-
this.$$set && !
|
|
477
|
+
this.$$set && !Et(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
481
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
482
|
-
const
|
|
483
|
-
function
|
|
484
|
-
return [...new Uint8Array(
|
|
480
|
+
const Ht = "4";
|
|
481
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ht);
|
|
482
|
+
const Ot = new TextEncoder();
|
|
483
|
+
function Yt(r) {
|
|
484
|
+
return [...new Uint8Array(r)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function Pt(r, e = "SHA-256", t = 1e5) {
|
|
487
487
|
const i = Date.now().toString(16);
|
|
488
|
-
|
|
489
|
-
const o = await
|
|
488
|
+
r || (r = Math.round(Math.random() * t));
|
|
489
|
+
const o = await ot(i, r, e);
|
|
490
490
|
return {
|
|
491
491
|
algorithm: e,
|
|
492
492
|
challenge: o,
|
|
@@ -494,22 +494,22 @@ async function Zt(t, e = "SHA-256", r = 1e5) {
|
|
|
494
494
|
signature: ""
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
|
-
async function
|
|
498
|
-
return
|
|
497
|
+
async function ot(r, e, t) {
|
|
498
|
+
return Yt(
|
|
499
499
|
await crypto.subtle.digest(
|
|
500
|
-
|
|
501
|
-
|
|
500
|
+
t.toUpperCase(),
|
|
501
|
+
Ot.encode(r + e)
|
|
502
502
|
)
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Kt(r, e, t = "SHA-256", i = 1e6, o = 0) {
|
|
506
506
|
const l = new AbortController(), s = Date.now();
|
|
507
507
|
return {
|
|
508
508
|
promise: (async () => {
|
|
509
509
|
for (let a = o; a <= i; a += 1) {
|
|
510
510
|
if (l.signal.aborted)
|
|
511
511
|
return null;
|
|
512
|
-
if (await
|
|
512
|
+
if (await ot(e, a, t) === r)
|
|
513
513
|
return {
|
|
514
514
|
number: a,
|
|
515
515
|
took: Date.now() - s
|
|
@@ -520,519 +520,567 @@ function Tt(t, e, r = "SHA-256", i = 1e6, o = 0) {
|
|
|
520
520
|
controller: l
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
var b = /* @__PURE__ */ ((
|
|
524
|
-
function
|
|
525
|
-
|
|
523
|
+
var b = /* @__PURE__ */ ((r) => (r.ERROR = "error", r.VERIFIED = "verified", r.VERIFYING = "verifying", r.UNVERIFIED = "unverified", r.EXPIRED = "expired", r))(b || {});
|
|
524
|
+
function Jt(r) {
|
|
525
|
+
Ct(r, "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)}}');
|
|
526
526
|
}
|
|
527
|
-
function
|
|
528
|
-
let e,
|
|
527
|
+
function He(r) {
|
|
528
|
+
let e, t, i;
|
|
529
529
|
return {
|
|
530
530
|
c() {
|
|
531
|
-
e =
|
|
531
|
+
e = B("svg"), t = B("path"), i = B("path"), c(t, "d", "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"), c(t, "fill", "currentColor"), c(t, "opacity", ".25"), c(i, "d", "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z"), c(i, "fill", "currentColor"), c(i, "class", "altcha-spinner svelte-ddsc3z"), c(e, "width", "24"), c(e, "height", "24"), c(e, "viewBox", "0 0 24 24"), c(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
532
532
|
},
|
|
533
533
|
m(o, l) {
|
|
534
|
-
|
|
534
|
+
$(o, e, l), _(e, t), _(e, i);
|
|
535
535
|
},
|
|
536
536
|
d(o) {
|
|
537
|
-
o &&
|
|
537
|
+
o && Z(e);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
let e,
|
|
541
|
+
function qt(r) {
|
|
542
|
+
let e, t = (
|
|
543
543
|
/*_strings*/
|
|
544
|
-
|
|
544
|
+
r[11].label + ""
|
|
545
545
|
), i;
|
|
546
546
|
return {
|
|
547
547
|
c() {
|
|
548
|
-
e =
|
|
549
|
-
|
|
548
|
+
e = A("label"), c(e, "for", i = /*name*/
|
|
549
|
+
r[4] + "_checkbox"), c(e, "class", "svelte-ddsc3z");
|
|
550
550
|
},
|
|
551
551
|
m(o, l) {
|
|
552
|
-
|
|
552
|
+
$(o, e, l), e.innerHTML = t;
|
|
553
553
|
},
|
|
554
554
|
p(o, l) {
|
|
555
555
|
l[0] & /*_strings*/
|
|
556
|
-
|
|
557
|
-
o[
|
|
558
|
-
|
|
559
|
-
o[
|
|
556
|
+
2048 && t !== (t = /*_strings*/
|
|
557
|
+
o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
|
|
558
|
+
16 && i !== (i = /*name*/
|
|
559
|
+
o[4] + "_checkbox") && c(e, "for", i);
|
|
560
560
|
},
|
|
561
561
|
d(o) {
|
|
562
|
-
o &&
|
|
562
|
+
o && Z(e);
|
|
563
563
|
}
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
let e,
|
|
566
|
+
function Qt(r) {
|
|
567
|
+
let e, t = (
|
|
568
568
|
/*_strings*/
|
|
569
|
-
|
|
569
|
+
r[11].verifying + ""
|
|
570
570
|
);
|
|
571
571
|
return {
|
|
572
572
|
c() {
|
|
573
|
-
e =
|
|
573
|
+
e = A("span");
|
|
574
574
|
},
|
|
575
575
|
m(i, o) {
|
|
576
|
-
|
|
576
|
+
$(i, e, o), e.innerHTML = t;
|
|
577
577
|
},
|
|
578
578
|
p(i, o) {
|
|
579
579
|
o[0] & /*_strings*/
|
|
580
|
-
|
|
581
|
-
i[
|
|
580
|
+
2048 && t !== (t = /*_strings*/
|
|
581
|
+
i[11].verifying + "") && (e.innerHTML = t);
|
|
582
582
|
},
|
|
583
583
|
d(i) {
|
|
584
|
-
i &&
|
|
584
|
+
i && Z(e);
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
let e,
|
|
588
|
+
function er(r) {
|
|
589
|
+
let e, t = (
|
|
590
590
|
/*_strings*/
|
|
591
|
-
|
|
591
|
+
r[11].verified + ""
|
|
592
592
|
), i, o;
|
|
593
593
|
return {
|
|
594
594
|
c() {
|
|
595
|
-
e =
|
|
595
|
+
e = A("span"), i = Y(), o = A("input"), c(o, "type", "hidden"), c(
|
|
596
596
|
o,
|
|
597
597
|
"name",
|
|
598
598
|
/*name*/
|
|
599
|
-
|
|
599
|
+
r[4]
|
|
600
600
|
), o.value = /*payload*/
|
|
601
|
-
|
|
601
|
+
r[5];
|
|
602
602
|
},
|
|
603
603
|
m(l, s) {
|
|
604
|
-
|
|
604
|
+
$(l, e, s), e.innerHTML = t, $(l, i, s), $(l, o, s);
|
|
605
605
|
},
|
|
606
606
|
p(l, s) {
|
|
607
607
|
s[0] & /*_strings*/
|
|
608
|
-
|
|
609
|
-
l[
|
|
610
|
-
|
|
608
|
+
2048 && t !== (t = /*_strings*/
|
|
609
|
+
l[11].verified + "") && (e.innerHTML = t), s[0] & /*name*/
|
|
610
|
+
16 && c(
|
|
611
611
|
o,
|
|
612
612
|
"name",
|
|
613
613
|
/*name*/
|
|
614
|
-
l[
|
|
614
|
+
l[4]
|
|
615
615
|
), s[0] & /*payload*/
|
|
616
|
-
|
|
617
|
-
l[
|
|
616
|
+
32 && (o.value = /*payload*/
|
|
617
|
+
l[5]);
|
|
618
618
|
},
|
|
619
619
|
d(l) {
|
|
620
|
-
l && (
|
|
620
|
+
l && (Z(e), Z(i), Z(o));
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
let e,
|
|
624
|
+
function Oe(r) {
|
|
625
|
+
let e, t, i, o, l, s, u;
|
|
626
626
|
return {
|
|
627
627
|
c() {
|
|
628
|
-
e =
|
|
629
|
-
|
|
628
|
+
e = A("div"), t = A("a"), i = B("svg"), o = B("path"), l = B("path"), s = B("path"), c(o, "d", "M2.33955 16.4279C5.88954 20.6586 12.1971 21.2105 16.4279 17.6604C18.4699 15.947 19.6548 13.5911 19.9352 11.1365L17.9886 10.4279C17.8738 12.5624 16.909 14.6459 15.1423 16.1284C11.7577 18.9684 6.71167 18.5269 3.87164 15.1423C1.03163 11.7577 1.4731 6.71166 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577C16.9767 5.86872 17.5322 7.02798 17.804 8.2324L19.9522 9.01429C19.7622 7.07737 19.0059 5.17558 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956C-0.658625 5.88958 -1.21046 12.1971 2.33955 16.4279Z"), c(o, "fill", "currentColor"), c(l, "d", "M3.57212 2.33956C1.65755 3.94607 0.496389 6.11731 0.12782 8.40523L2.04639 9.13961C2.26047 7.15832 3.21057 5.25375 4.8577 3.87164C8.24231 1.03162 13.2883 1.4731 16.1284 4.8577L13.8302 6.78606L19.9633 9.13364C19.7929 7.15555 19.0335 5.20847 17.6604 3.57212C14.1104 -0.658624 7.80283 -1.21043 3.57212 2.33956Z"), c(l, "fill", "currentColor"), c(s, "d", "M7 10H5C5 12.7614 7.23858 15 10 15C12.7614 15 15 12.7614 15 10H13C13 11.6569 11.6569 13 10 13C8.3431 13 7 11.6569 7 10Z"), c(s, "fill", "currentColor"), c(i, "width", "22"), c(i, "height", "22"), c(i, "viewBox", "0 0 20 20"), c(i, "fill", "none"), c(i, "xmlns", "http://www.w3.org/2000/svg"), c(t, "href", lt), c(t, "target", "_blank"), c(t, "class", "altcha-logo svelte-ddsc3z"), c(t, "aria-label", u = /*_strings*/
|
|
629
|
+
r[11].ariaLinkLabel);
|
|
630
630
|
},
|
|
631
|
-
m(a,
|
|
632
|
-
|
|
631
|
+
m(a, d) {
|
|
632
|
+
$(a, e, d), _(e, t), _(t, i), _(i, o), _(i, l), _(i, s);
|
|
633
633
|
},
|
|
634
|
-
p(a,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
a[
|
|
634
|
+
p(a, d) {
|
|
635
|
+
d[0] & /*_strings*/
|
|
636
|
+
2048 && u !== (u = /*_strings*/
|
|
637
|
+
a[11].ariaLinkLabel) && c(t, "aria-label", u);
|
|
638
638
|
},
|
|
639
639
|
d(a) {
|
|
640
|
-
a &&
|
|
640
|
+
a && Z(e);
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
let e,
|
|
646
|
-
function l(a,
|
|
644
|
+
function Ye(r) {
|
|
645
|
+
let e, t, i, o;
|
|
646
|
+
function l(a, d) {
|
|
647
647
|
return (
|
|
648
648
|
/*state*/
|
|
649
|
-
a[
|
|
649
|
+
a[6] === b.EXPIRED ? rr : tr
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
|
-
let s = l(
|
|
652
|
+
let s = l(r), u = s(r);
|
|
653
653
|
return {
|
|
654
654
|
c() {
|
|
655
|
-
e =
|
|
655
|
+
e = A("div"), t = B("svg"), i = B("path"), o = Y(), u.c(), c(i, "stroke-linecap", "round"), c(i, "stroke-linejoin", "round"), c(i, "d", "M6 18L18 6M6 6l12 12"), c(t, "width", "14"), c(t, "height", "14"), c(t, "xmlns", "http://www.w3.org/2000/svg"), c(t, "fill", "none"), c(t, "viewBox", "0 0 24 24"), c(t, "stroke-width", "1.5"), c(t, "stroke", "currentColor"), c(e, "class", "altcha-error svelte-ddsc3z");
|
|
656
656
|
},
|
|
657
|
-
m(a,
|
|
658
|
-
|
|
657
|
+
m(a, d) {
|
|
658
|
+
$(a, e, d), _(e, t), _(t, i), _(e, o), u.m(e, null);
|
|
659
659
|
},
|
|
660
|
-
p(a,
|
|
661
|
-
s === (s = l(a)) &&
|
|
660
|
+
p(a, d) {
|
|
661
|
+
s === (s = l(a)) && u ? u.p(a, d) : (u.d(1), u = s(a), u && (u.c(), u.m(e, null)));
|
|
662
662
|
},
|
|
663
663
|
d(a) {
|
|
664
|
-
a &&
|
|
664
|
+
a && Z(e), u.d();
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
let e,
|
|
668
|
+
function tr(r) {
|
|
669
|
+
let e, t = (
|
|
670
670
|
/*_strings*/
|
|
671
|
-
|
|
671
|
+
r[11].error + ""
|
|
672
672
|
);
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e =
|
|
675
|
+
e = A("div"), c(
|
|
676
676
|
e,
|
|
677
677
|
"title",
|
|
678
678
|
/*error*/
|
|
679
|
-
|
|
679
|
+
r[10]
|
|
680
680
|
);
|
|
681
681
|
},
|
|
682
682
|
m(i, o) {
|
|
683
|
-
|
|
683
|
+
$(i, e, o), e.innerHTML = t;
|
|
684
684
|
},
|
|
685
685
|
p(i, o) {
|
|
686
686
|
o[0] & /*_strings*/
|
|
687
|
-
|
|
688
|
-
i[
|
|
689
|
-
|
|
687
|
+
2048 && t !== (t = /*_strings*/
|
|
688
|
+
i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
689
|
+
1024 && c(
|
|
690
690
|
e,
|
|
691
691
|
"title",
|
|
692
692
|
/*error*/
|
|
693
|
-
i[
|
|
693
|
+
i[10]
|
|
694
694
|
);
|
|
695
695
|
},
|
|
696
696
|
d(i) {
|
|
697
|
-
i &&
|
|
697
|
+
i && Z(e);
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
let e,
|
|
701
|
+
function rr(r) {
|
|
702
|
+
let e, t = (
|
|
703
703
|
/*_strings*/
|
|
704
|
-
|
|
704
|
+
r[11].expired + ""
|
|
705
705
|
);
|
|
706
706
|
return {
|
|
707
707
|
c() {
|
|
708
|
-
e =
|
|
708
|
+
e = A("div"), c(
|
|
709
709
|
e,
|
|
710
710
|
"title",
|
|
711
711
|
/*error*/
|
|
712
|
-
|
|
712
|
+
r[10]
|
|
713
713
|
);
|
|
714
714
|
},
|
|
715
715
|
m(i, o) {
|
|
716
|
-
|
|
716
|
+
$(i, e, o), e.innerHTML = t;
|
|
717
717
|
},
|
|
718
718
|
p(i, o) {
|
|
719
719
|
o[0] & /*_strings*/
|
|
720
|
-
|
|
721
|
-
i[
|
|
722
|
-
|
|
720
|
+
2048 && t !== (t = /*_strings*/
|
|
721
|
+
i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
722
|
+
1024 && c(
|
|
723
723
|
e,
|
|
724
724
|
"title",
|
|
725
725
|
/*error*/
|
|
726
|
-
i[
|
|
726
|
+
i[10]
|
|
727
727
|
);
|
|
728
728
|
},
|
|
729
729
|
d(i) {
|
|
730
|
-
i &&
|
|
730
|
+
i && Z(e);
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
let e,
|
|
734
|
+
function Pe(r) {
|
|
735
|
+
let e, t, i = (
|
|
736
736
|
/*_strings*/
|
|
737
|
-
|
|
737
|
+
r[11].footer + ""
|
|
738
738
|
);
|
|
739
739
|
return {
|
|
740
740
|
c() {
|
|
741
|
-
e =
|
|
741
|
+
e = A("div"), t = A("div"), c(t, "class", "svelte-ddsc3z"), c(e, "class", "altcha-footer svelte-ddsc3z");
|
|
742
742
|
},
|
|
743
743
|
m(o, l) {
|
|
744
|
-
|
|
744
|
+
$(o, e, l), _(e, t), t.innerHTML = i;
|
|
745
745
|
},
|
|
746
746
|
p(o, l) {
|
|
747
747
|
l[0] & /*_strings*/
|
|
748
|
-
|
|
749
|
-
o[
|
|
748
|
+
2048 && i !== (i = /*_strings*/
|
|
749
|
+
o[11].footer + "") && (t.innerHTML = i);
|
|
750
750
|
},
|
|
751
751
|
d(o) {
|
|
752
|
-
o &&
|
|
752
|
+
o && Z(e);
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
let e
|
|
756
|
+
function Ke(r) {
|
|
757
|
+
let e;
|
|
758
|
+
return {
|
|
759
|
+
c() {
|
|
760
|
+
e = A("div"), c(e, "class", "altcha-anchor-arrow svelte-ddsc3z");
|
|
761
|
+
},
|
|
762
|
+
m(t, i) {
|
|
763
|
+
$(t, e, i), r[36](e);
|
|
764
|
+
},
|
|
765
|
+
p: ne,
|
|
766
|
+
d(t) {
|
|
767
|
+
t && Z(e), r[36](null);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function nr(r) {
|
|
772
|
+
let e, t, i, o, l, s, u, a, d, U, S, D, k, F, P, N = (
|
|
758
773
|
/*state*/
|
|
759
|
-
|
|
774
|
+
r[6] === b.VERIFYING && He()
|
|
760
775
|
);
|
|
761
|
-
function
|
|
776
|
+
function Q(h, y) {
|
|
762
777
|
return (
|
|
763
778
|
/*state*/
|
|
764
|
-
|
|
779
|
+
h[6] === b.VERIFIED ? er : (
|
|
765
780
|
/*state*/
|
|
766
|
-
|
|
781
|
+
h[6] === b.VERIFYING ? Qt : qt
|
|
767
782
|
)
|
|
768
783
|
);
|
|
769
784
|
}
|
|
770
|
-
let
|
|
785
|
+
let H = Q(r), j = H(r), L = (
|
|
771
786
|
/*hidelogo*/
|
|
772
|
-
|
|
773
|
-
),
|
|
787
|
+
r[3] !== !0 && Oe(r)
|
|
788
|
+
), R = (
|
|
774
789
|
/*error*/
|
|
775
|
-
(
|
|
776
|
-
|
|
777
|
-
),
|
|
790
|
+
(r[10] || /*state*/
|
|
791
|
+
r[6] === b.EXPIRED) && Ye(r)
|
|
792
|
+
), v = (
|
|
778
793
|
/*_strings*/
|
|
779
|
-
|
|
780
|
-
|
|
794
|
+
r[11].footer && /*hidefooter*/
|
|
795
|
+
r[2] !== !0 && Pe(r)
|
|
796
|
+
), z = (
|
|
797
|
+
/*floating*/
|
|
798
|
+
r[1] && Ke(r)
|
|
781
799
|
);
|
|
782
800
|
return {
|
|
783
801
|
c() {
|
|
784
|
-
e =
|
|
785
|
-
|
|
786
|
-
|
|
802
|
+
e = A("div"), t = A("div"), N && N.c(), i = Y(), o = A("div"), l = A("input"), a = Y(), d = A("div"), j.c(), U = Y(), L && L.c(), S = Y(), R && R.c(), D = Y(), v && v.c(), k = Y(), z && z.c(), c(l, "type", "checkbox"), c(l, "id", s = /*name*/
|
|
803
|
+
r[4] + "_checkbox"), l.required = u = /*auto*/
|
|
804
|
+
r[0] !== "onsubmit", c(l, "class", "svelte-ddsc3z"), c(o, "class", "altcha-checkbox svelte-ddsc3z"), Xe(
|
|
787
805
|
o,
|
|
788
806
|
"altcha-hidden",
|
|
789
807
|
/*state*/
|
|
790
|
-
|
|
791
|
-
), c(
|
|
808
|
+
r[6] === b.VERIFYING
|
|
809
|
+
), c(d, "class", "altcha-label svelte-ddsc3z"), c(t, "class", "altcha-main svelte-ddsc3z"), c(e, "class", "altcha svelte-ddsc3z"), c(
|
|
792
810
|
e,
|
|
793
811
|
"data-state",
|
|
794
812
|
/*state*/
|
|
795
|
-
|
|
813
|
+
r[6]
|
|
814
|
+
), c(
|
|
815
|
+
e,
|
|
816
|
+
"data-floating",
|
|
817
|
+
/*floating*/
|
|
818
|
+
r[1]
|
|
796
819
|
);
|
|
797
820
|
},
|
|
798
|
-
m(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
821
|
+
m(h, y) {
|
|
822
|
+
$(h, e, y), _(e, t), N && N.m(t, null), _(t, i), _(t, o), _(o, l), l.checked = /*checked*/
|
|
823
|
+
r[7], _(t, a), _(t, d), j.m(d, null), _(t, U), L && L.m(t, null), _(e, S), R && R.m(e, null), _(e, D), v && v.m(e, null), _(e, k), z && z.m(e, null), r[37](e), F || (P = [
|
|
824
|
+
ve(
|
|
802
825
|
l,
|
|
803
826
|
"change",
|
|
804
827
|
/*input_change_handler*/
|
|
805
|
-
|
|
828
|
+
r[35]
|
|
806
829
|
),
|
|
807
|
-
|
|
830
|
+
ve(
|
|
808
831
|
l,
|
|
809
832
|
"change",
|
|
810
833
|
/*onCheckedChange*/
|
|
811
|
-
|
|
834
|
+
r[12]
|
|
812
835
|
),
|
|
813
|
-
|
|
836
|
+
ve(
|
|
814
837
|
l,
|
|
815
838
|
"invalid",
|
|
816
839
|
/*onInvalid*/
|
|
817
|
-
|
|
840
|
+
r[13]
|
|
818
841
|
)
|
|
819
|
-
],
|
|
842
|
+
], F = !0);
|
|
820
843
|
},
|
|
821
|
-
p(
|
|
844
|
+
p(h, y) {
|
|
822
845
|
/*state*/
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
1 &&
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
846
|
+
h[6] === b.VERIFYING ? N || (N = He(), N.c(), N.m(t, i)) : N && (N.d(1), N = null), y[0] & /*name*/
|
|
847
|
+
16 && s !== (s = /*name*/
|
|
848
|
+
h[4] + "_checkbox") && c(l, "id", s), y[0] & /*auto*/
|
|
849
|
+
1 && u !== (u = /*auto*/
|
|
850
|
+
h[0] !== "onsubmit") && (l.required = u), y[0] & /*checked*/
|
|
851
|
+
128 && (l.checked = /*checked*/
|
|
852
|
+
h[7]), y[0] & /*state*/
|
|
853
|
+
64 && Xe(
|
|
831
854
|
o,
|
|
832
855
|
"altcha-hidden",
|
|
833
856
|
/*state*/
|
|
834
|
-
|
|
835
|
-
),
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
857
|
+
h[6] === b.VERIFYING
|
|
858
|
+
), H === (H = Q(h)) && j ? j.p(h, y) : (j.d(1), j = H(h), j && (j.c(), j.m(d, null))), /*hidelogo*/
|
|
859
|
+
h[3] !== !0 ? L ? L.p(h, y) : (L = Oe(h), L.c(), L.m(t, null)) : L && (L.d(1), L = null), /*error*/
|
|
860
|
+
h[10] || /*state*/
|
|
861
|
+
h[6] === b.EXPIRED ? R ? R.p(h, y) : (R = Ye(h), R.c(), R.m(e, D)) : R && (R.d(1), R = null), /*_strings*/
|
|
862
|
+
h[11].footer && /*hidefooter*/
|
|
863
|
+
h[2] !== !0 ? v ? v.p(h, y) : (v = Pe(h), v.c(), v.m(e, k)) : v && (v.d(1), v = null), /*floating*/
|
|
864
|
+
h[1] ? z ? z.p(h, y) : (z = Ke(h), z.c(), z.m(e, null)) : z && (z.d(1), z = null), y[0] & /*state*/
|
|
865
|
+
64 && c(
|
|
842
866
|
e,
|
|
843
867
|
"data-state",
|
|
844
868
|
/*state*/
|
|
845
|
-
|
|
869
|
+
h[6]
|
|
870
|
+
), y[0] & /*floating*/
|
|
871
|
+
2 && c(
|
|
872
|
+
e,
|
|
873
|
+
"data-floating",
|
|
874
|
+
/*floating*/
|
|
875
|
+
h[1]
|
|
846
876
|
);
|
|
847
877
|
},
|
|
848
|
-
i:
|
|
849
|
-
o:
|
|
850
|
-
d(
|
|
851
|
-
|
|
878
|
+
i: ne,
|
|
879
|
+
o: ne,
|
|
880
|
+
d(h) {
|
|
881
|
+
h && Z(e), N && N.d(), j.d(), L && L.d(), R && R.d(), v && v.d(), z && z.d(), r[37](null), F = !1, se(P);
|
|
852
882
|
}
|
|
853
883
|
};
|
|
854
884
|
}
|
|
855
|
-
const
|
|
856
|
-
function
|
|
857
|
-
return JSON.parse(
|
|
885
|
+
const Je = "Visit Altcha.org", lt = "https://altcha.org/";
|
|
886
|
+
function qe(r) {
|
|
887
|
+
return JSON.parse(r);
|
|
858
888
|
}
|
|
859
|
-
function
|
|
889
|
+
function ir() {
|
|
860
890
|
try {
|
|
861
891
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
862
892
|
} catch {
|
|
863
893
|
}
|
|
864
894
|
}
|
|
865
|
-
function
|
|
866
|
-
var $e
|
|
867
|
-
let i, o, l, { auto: s = void 0 } = e, { blockspam:
|
|
868
|
-
const
|
|
869
|
-
let
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
}),
|
|
873
|
-
|
|
895
|
+
function or(r, e, t) {
|
|
896
|
+
var Ve, $e;
|
|
897
|
+
let i, o, l, { auto: s = void 0 } = e, { blockspam: u = void 0 } = e, { challengeurl: a = void 0 } = e, { challengejson: d = void 0 } = e, { debug: U = !1 } = e, { delay: S = 0 } = e, { expire: D = void 0 } = e, { floating: k = void 0 } = e, { floatinganchor: F = void 0 } = e, { floatingoffset: P = void 0 } = e, { hidefooter: N = !1 } = e, { hidelogo: Q = !1 } = e, { name: H = "altcha" } = e, { maxnumber: j = 1e6 } = e, { mockerror: L = !1 } = e, { refetchonexpire: R = !0 } = e, { spamfilter: v = !1 } = e, { strings: z = void 0 } = e, { test: h = !1 } = e, { verifyurl: y = void 0 } = e, { workers: ie = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ge = void 0 } = e;
|
|
898
|
+
const me = Tt(), xe = ["SHA-256", "SHA-384", "SHA-512"], Ee = ($e = (Ve = document.documentElement.lang) == null ? void 0 : Ve.split("-")) == null ? void 0 : $e[0];
|
|
899
|
+
let O = !1, E, K = null, ce = null, m = null, be = null, J = null, M = b.UNVERIFIED, W = null;
|
|
900
|
+
jt(() => {
|
|
901
|
+
m && (m.removeEventListener("submit", Le), m.removeEventListener("reset", Re), m.removeEventListener("focusin", Ce), m = null), W && (clearTimeout(W), W = null), document.removeEventListener("click", Ne), document.removeEventListener("scroll", Se), window.removeEventListener("resize", Te);
|
|
902
|
+
}), St(() => {
|
|
903
|
+
C("mounted", "0.6.0"), C("workers", ie), h && C("using test mode"), D && ae(D), s !== void 0 && C("auto", s), k !== void 0 && Ze(k), m = E.closest("form"), m && (m.addEventListener("submit", Le, { capture: !0 }), m.addEventListener("reset", Re), s === "onfocus" && m.addEventListener("focusin", Ce)), s === "onload" && q();
|
|
874
904
|
});
|
|
875
|
-
function
|
|
876
|
-
(
|
|
905
|
+
function C(...n) {
|
|
906
|
+
(U || n.some((f) => f instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", ...n);
|
|
877
907
|
}
|
|
878
|
-
function
|
|
879
|
-
|
|
908
|
+
function Ce(n) {
|
|
909
|
+
M === b.UNVERIFIED && q();
|
|
880
910
|
}
|
|
881
|
-
function
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
}));
|
|
911
|
+
function Le(n) {
|
|
912
|
+
m && s === "onsubmit" && (M === b.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), q().then(() => {
|
|
913
|
+
m == null || m.requestSubmit();
|
|
914
|
+
})) : M !== b.VERIFIED && (n.preventDefault(), n.stopPropagation(), M === b.VERIFYING && je()));
|
|
885
915
|
}
|
|
886
|
-
function
|
|
887
|
-
|
|
916
|
+
function Re() {
|
|
917
|
+
fe();
|
|
888
918
|
}
|
|
889
|
-
function
|
|
919
|
+
function ze(n, f) {
|
|
890
920
|
return btoa(JSON.stringify({
|
|
891
921
|
algorithm: n.algorithm,
|
|
892
922
|
challenge: n.challenge,
|
|
893
|
-
number:
|
|
923
|
+
number: f.number,
|
|
894
924
|
salt: n.salt,
|
|
895
925
|
signature: n.signature,
|
|
896
|
-
test:
|
|
897
|
-
took:
|
|
926
|
+
test: h ? !0 : void 0,
|
|
927
|
+
took: f.took
|
|
898
928
|
}));
|
|
899
929
|
}
|
|
900
|
-
function
|
|
930
|
+
function Ie(n) {
|
|
901
931
|
if (!n.algorithm)
|
|
902
932
|
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
903
933
|
if (n.signature === void 0)
|
|
904
934
|
throw new Error("Invalid challenge. Property signature is missing.");
|
|
905
|
-
if (!
|
|
906
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${
|
|
935
|
+
if (!xe.includes(n.algorithm.toUpperCase()))
|
|
936
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${xe.join(", ")}`);
|
|
907
937
|
if (!n.challenge || n.challenge.length < 40)
|
|
908
938
|
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
909
939
|
if (!n.salt || n.salt.length < 10)
|
|
910
940
|
throw new Error("Salt is too short. Min. 10 chars.");
|
|
911
941
|
}
|
|
912
|
-
async function
|
|
942
|
+
async function st() {
|
|
913
943
|
var n;
|
|
914
|
-
if (
|
|
915
|
-
throw
|
|
944
|
+
if (L)
|
|
945
|
+
throw C("mocking error"), new Error("Mocked error.");
|
|
916
946
|
if (i)
|
|
917
|
-
return
|
|
918
|
-
if (
|
|
919
|
-
return
|
|
947
|
+
return C("using provided json data"), i;
|
|
948
|
+
if (h)
|
|
949
|
+
return C("generating test challenge", { test: h }), Pt(typeof h != "boolean" ? +h : void 0);
|
|
920
950
|
{
|
|
921
951
|
if (!a)
|
|
922
952
|
throw new Error("Attribute challengeurl not set.");
|
|
923
|
-
|
|
924
|
-
const
|
|
953
|
+
C("fetching challenge from", a);
|
|
954
|
+
const f = await fetch(a, {
|
|
925
955
|
headers: {
|
|
926
|
-
"x-altcha-spam-filter":
|
|
956
|
+
"x-altcha-spam-filter": v ? "1" : "0"
|
|
927
957
|
}
|
|
928
958
|
});
|
|
929
|
-
if (
|
|
930
|
-
throw new Error(`Server responded with ${
|
|
931
|
-
const
|
|
932
|
-
if (
|
|
933
|
-
const
|
|
934
|
-
|
|
959
|
+
if (f.status !== 200)
|
|
960
|
+
throw new Error(`Server responded with ${f.status}.`);
|
|
961
|
+
const g = f.headers.get("Expires"), I = f.headers.get("X-Altcha-Config"), T = await f.json(), V = new URLSearchParams((n = T.salt.split("?")) == null ? void 0 : n[1]), X = V.get("expires") || V.get("expire");
|
|
962
|
+
if (X) {
|
|
963
|
+
const p = new Date(+X * 1e3), x = isNaN(p.getTime()) ? 0 : p.getTime() - Date.now();
|
|
964
|
+
x > 0 && ae(x);
|
|
935
965
|
}
|
|
936
|
-
if (
|
|
966
|
+
if (I)
|
|
937
967
|
try {
|
|
938
|
-
const
|
|
939
|
-
|
|
940
|
-
} catch (
|
|
941
|
-
|
|
968
|
+
const p = JSON.parse(I);
|
|
969
|
+
p && typeof p == "object" && (p.verifyurl && (p.verifyurl = new URL(p.verifyurl, new URL(a)).toString()), Me(p));
|
|
970
|
+
} catch (p) {
|
|
971
|
+
C("unable to configure from X-Altcha-Config", p);
|
|
942
972
|
}
|
|
943
|
-
if (!
|
|
944
|
-
const
|
|
945
|
-
if (
|
|
946
|
-
const
|
|
947
|
-
|
|
973
|
+
if (!D && (g != null && g.length)) {
|
|
974
|
+
const p = Date.parse(g);
|
|
975
|
+
if (p) {
|
|
976
|
+
const x = p - Date.now();
|
|
977
|
+
x > 0 && ae(x);
|
|
948
978
|
}
|
|
949
979
|
}
|
|
950
|
-
return
|
|
980
|
+
return T;
|
|
951
981
|
}
|
|
952
982
|
}
|
|
953
|
-
function
|
|
954
|
-
a &&
|
|
983
|
+
function Ae() {
|
|
984
|
+
a && R && M === b.VERIFIED ? q() : fe(b.EXPIRED, l.expired);
|
|
955
985
|
}
|
|
956
|
-
async function
|
|
957
|
-
let
|
|
986
|
+
async function ct(n) {
|
|
987
|
+
let f = null;
|
|
958
988
|
if ("Worker" in window) {
|
|
959
989
|
try {
|
|
960
|
-
|
|
961
|
-
} catch (
|
|
962
|
-
|
|
990
|
+
f = await at(n.challenge, n.salt, n.algorithm, n.maxnumber);
|
|
991
|
+
} catch (g) {
|
|
992
|
+
C(g);
|
|
963
993
|
}
|
|
964
|
-
if ((
|
|
965
|
-
return { data: n, solution:
|
|
994
|
+
if ((f == null ? void 0 : f.number) !== void 0)
|
|
995
|
+
return { data: n, solution: f };
|
|
966
996
|
}
|
|
967
997
|
return {
|
|
968
998
|
data: n,
|
|
969
|
-
solution: await
|
|
999
|
+
solution: await Kt(n.challenge, n.salt, n.algorithm, n.maxnumber || j).promise
|
|
970
1000
|
};
|
|
971
1001
|
}
|
|
972
|
-
async function
|
|
973
|
-
const
|
|
974
|
-
if (
|
|
1002
|
+
async function at(n, f, g, I = typeof h == "number" ? h : j, T = Math.ceil(ie)) {
|
|
1003
|
+
const V = [];
|
|
1004
|
+
if (T < 1)
|
|
975
1005
|
throw new Error("Wrong number of workers configured.");
|
|
976
|
-
if (
|
|
1006
|
+
if (T > 16)
|
|
977
1007
|
throw new Error("Too many workers. Max. 16 allowed workers.");
|
|
978
|
-
for (let
|
|
979
|
-
|
|
980
|
-
const
|
|
981
|
-
const
|
|
982
|
-
return new Promise((
|
|
983
|
-
|
|
984
|
-
if (
|
|
985
|
-
for (const
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
}),
|
|
1008
|
+
for (let x = 0; x < T; x++)
|
|
1009
|
+
V.push(createAltchaWorker(ge));
|
|
1010
|
+
const X = Math.ceil(I / T), p = await Promise.all(V.map((x, ue) => {
|
|
1011
|
+
const De = ue * X;
|
|
1012
|
+
return new Promise((vt) => {
|
|
1013
|
+
x.addEventListener("message", (Ue) => {
|
|
1014
|
+
if (Ue.data)
|
|
1015
|
+
for (const Fe of V)
|
|
1016
|
+
Fe !== x && Fe.postMessage({ type: "abort" });
|
|
1017
|
+
vt(Ue.data);
|
|
1018
|
+
}), x.postMessage({
|
|
989
1019
|
payload: {
|
|
990
|
-
alg:
|
|
1020
|
+
alg: g,
|
|
991
1021
|
challenge: n,
|
|
992
|
-
max:
|
|
993
|
-
salt:
|
|
994
|
-
start:
|
|
1022
|
+
max: De + X,
|
|
1023
|
+
salt: f,
|
|
1024
|
+
start: De
|
|
995
1025
|
},
|
|
996
1026
|
type: "work"
|
|
997
1027
|
});
|
|
998
1028
|
});
|
|
999
1029
|
}));
|
|
1000
|
-
for (const
|
|
1001
|
-
|
|
1002
|
-
return
|
|
1030
|
+
for (const x of V)
|
|
1031
|
+
x.terminate();
|
|
1032
|
+
return p.find((x) => !!x) || null;
|
|
1033
|
+
}
|
|
1034
|
+
function ft() {
|
|
1035
|
+
[b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(M) ? v && (m == null ? void 0 : m.reportValidity()) === !1 ? t(7, O = !1) : q() : t(7, O = !0);
|
|
1036
|
+
}
|
|
1037
|
+
function Ne(n) {
|
|
1038
|
+
const f = n.target;
|
|
1039
|
+
k && f && !E.contains(f) && M === b.VERIFIED && t(8, E.style.display = "none", E);
|
|
1040
|
+
}
|
|
1041
|
+
function Se() {
|
|
1042
|
+
k && we();
|
|
1043
|
+
}
|
|
1044
|
+
function je() {
|
|
1045
|
+
M === b.VERIFYING && alert(l.waitAlert);
|
|
1003
1046
|
}
|
|
1004
|
-
function
|
|
1005
|
-
|
|
1047
|
+
function ut(n) {
|
|
1048
|
+
k && M !== b.UNVERIFIED && requestAnimationFrame(() => {
|
|
1049
|
+
we();
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
function Te() {
|
|
1053
|
+
k && we();
|
|
1006
1054
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
1055
|
+
function ae(n) {
|
|
1056
|
+
C("expire", n), W && (clearTimeout(W), W = null), n < 1 ? Ae() : W = setTimeout(Ae, n);
|
|
1009
1057
|
}
|
|
1010
|
-
function
|
|
1011
|
-
|
|
1058
|
+
function Ze(n) {
|
|
1059
|
+
C("floating", n), k !== n && (t(8, E.style.left = "", E), t(8, E.style.top = "", E)), t(1, k = n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : k), k ? (s || t(0, s = "onsubmit"), document.addEventListener("scroll", Se), document.addEventListener("click", Ne), window.addEventListener("resize", Te)) : s === "onsubmit" && t(0, s = void 0);
|
|
1012
1060
|
}
|
|
1013
|
-
function
|
|
1014
|
-
var
|
|
1015
|
-
const
|
|
1016
|
-
return ((
|
|
1061
|
+
function dt(n) {
|
|
1062
|
+
var g;
|
|
1063
|
+
const f = m == null ? void 0 : m.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1064
|
+
return ((g = f == null ? void 0 : f.value) == null ? void 0 : g.slice(f.value.indexOf("@"))) || void 0;
|
|
1017
1065
|
}
|
|
1018
|
-
function
|
|
1066
|
+
function ht(n) {
|
|
1019
1067
|
return [
|
|
1020
|
-
...(
|
|
1068
|
+
...(m == null ? void 0 : m.querySelectorAll(n != null && n.length ? n.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1021
1069
|
].reduce(
|
|
1022
|
-
(
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1070
|
+
(g, I) => {
|
|
1071
|
+
const T = I.name, V = I.value.trim();
|
|
1072
|
+
return T && V && (g[T] = V), g;
|
|
1025
1073
|
},
|
|
1026
1074
|
{}
|
|
1027
1075
|
);
|
|
1028
1076
|
}
|
|
1029
|
-
async function
|
|
1077
|
+
async function gt(n) {
|
|
1030
1078
|
if (!y)
|
|
1031
1079
|
throw new Error("Attribute verifyurl not set.");
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
const { email:
|
|
1080
|
+
C("requesting server verification from", y);
|
|
1081
|
+
const f = { payload: n };
|
|
1082
|
+
if (v) {
|
|
1083
|
+
const { email: T, expectedLanguages: V, expectedCountries: X, fields: p, ipAddress: x, timeZone: ue } = typeof v == "object" ? v : {
|
|
1036
1084
|
email: void 0,
|
|
1037
1085
|
expectedCountries: void 0,
|
|
1038
1086
|
expectedLanguages: void 0,
|
|
@@ -1040,257 +1088,308 @@ function Ht(t, e, r) {
|
|
|
1040
1088
|
ipAddress: void 0,
|
|
1041
1089
|
timeZone: void 0
|
|
1042
1090
|
};
|
|
1043
|
-
|
|
1091
|
+
f.ipAddress = x === !1 ? void 0 : x || "auto", f.email = T === !1 ? void 0 : dt(T), f.fields = p === !1 ? void 0 : ht(p), f.timeZone = ue === !1 ? void 0 : ue || ir(), f.expectedCountries = X, f.expectedLanguages = V || (Ee ? [Ee] : void 0);
|
|
1044
1092
|
}
|
|
1045
|
-
const
|
|
1046
|
-
body: JSON.stringify(
|
|
1093
|
+
const g = await fetch(y, {
|
|
1094
|
+
body: JSON.stringify(f),
|
|
1047
1095
|
headers: { "content-type": "application/json" },
|
|
1048
1096
|
method: "POST"
|
|
1049
1097
|
});
|
|
1050
|
-
if (
|
|
1051
|
-
throw new Error(`Server responded with ${
|
|
1052
|
-
const
|
|
1053
|
-
if (
|
|
1098
|
+
if (g.status !== 200)
|
|
1099
|
+
throw new Error(`Server responded with ${g.status}.`);
|
|
1100
|
+
const I = await g.json();
|
|
1101
|
+
if (I != null && I.payload && t(5, J = I.payload), me("serververification", I), u && I.classification === "BAD")
|
|
1054
1102
|
throw new Error("SpamFilter returned negative classification.");
|
|
1055
1103
|
}
|
|
1056
|
-
function
|
|
1057
|
-
|
|
1104
|
+
function we(n = 20) {
|
|
1105
|
+
if (E)
|
|
1106
|
+
if (ce || (ce = (F ? document.querySelector(F) : m == null ? void 0 : m.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || m), ce) {
|
|
1107
|
+
const f = parseInt(P, 10) || 12, g = ce.getBoundingClientRect(), I = E.getBoundingClientRect(), T = document.documentElement.clientHeight, V = document.documentElement.clientWidth, X = k === "auto" ? g.bottom + I.height + f + n > T : k === "top", p = Math.max(n, Math.min(V - n - I.width, g.left + g.width / 2 - I.width / 2));
|
|
1108
|
+
if (X ? t(8, E.style.top = `${g.top - (I.height + f)}px`, E) : t(8, E.style.top = `${g.bottom + f}px`, E), t(8, E.style.left = `${p}px`, E), E.setAttribute("data-floating", X ? "top" : "bottom"), K) {
|
|
1109
|
+
const x = K.getBoundingClientRect();
|
|
1110
|
+
t(9, K.style.left = g.left - p + g.width / 2 - x.width / 2 + "px", K);
|
|
1111
|
+
}
|
|
1112
|
+
} else
|
|
1113
|
+
C("unable to find floating anchor element");
|
|
1114
|
+
}
|
|
1115
|
+
function Me(n) {
|
|
1116
|
+
n.auto !== void 0 && (t(0, s = n.auto), s === "onload" && q()), n.floatinganchor !== void 0 && t(18, F = n.floatinganchor), n.delay !== void 0 && t(16, S = n.delay), n.floatingoffset !== void 0 && t(19, P = n.floatingoffset), n.floating !== void 0 && Ze(n.floating), n.expire !== void 0 && (ae(n.expire), t(17, D = n.expire)), n.challenge && (Ie(n.challenge), i = n.challenge), n.challengeurl !== void 0 && t(14, a = n.challengeurl), n.debug !== void 0 && t(15, U = !!n.debug), n.hidefooter !== void 0 && t(2, N = !!n.hidefooter), n.hidelogo !== void 0 && t(3, Q = !!n.hidelogo), n.maxnumber !== void 0 && t(20, j = +n.maxnumber), n.mockerror !== void 0 && t(21, L = !!n.mockerror), n.name !== void 0 && t(4, H = n.name), n.refetchonexpire !== void 0 && t(22, R = !!n.refetchonexpire), n.spamfilter !== void 0 && t(23, v = typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && t(34, o = n.strings), n.test !== void 0 && t(24, h = typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && t(25, y = n.verifyurl), n.workers !== void 0 && t(26, ie = +n.workers);
|
|
1058
1117
|
}
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1118
|
+
function fe(n = b.UNVERIFIED, f = null) {
|
|
1119
|
+
W && (clearTimeout(W), W = null), t(7, O = !1), t(10, be = f), t(5, J = null), t(6, M = n);
|
|
1061
1120
|
}
|
|
1062
|
-
async function
|
|
1063
|
-
return
|
|
1064
|
-
if (
|
|
1121
|
+
async function q() {
|
|
1122
|
+
return fe(b.VERIFYING), await new Promise((n) => setTimeout(n, S || 0)), st().then((n) => (Ie(n), C("challenge", n), ct(n))).then(({ data: n, solution: f }) => {
|
|
1123
|
+
if (C("solution", f), (f == null ? void 0 : f.number) !== void 0) {
|
|
1065
1124
|
if (y)
|
|
1066
|
-
return
|
|
1067
|
-
|
|
1125
|
+
return gt(ze(n, f));
|
|
1126
|
+
t(5, J = ze(n, f)), C("payload", J);
|
|
1068
1127
|
} else
|
|
1069
|
-
throw
|
|
1128
|
+
throw C("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1070
1129
|
}).then(() => {
|
|
1071
|
-
|
|
1072
|
-
|
|
1130
|
+
Zt().then(() => {
|
|
1131
|
+
t(6, M = b.VERIFIED), t(7, O = !0), C("verified"), me("verified", { payload: J });
|
|
1073
1132
|
});
|
|
1074
1133
|
}).catch((n) => {
|
|
1075
|
-
|
|
1134
|
+
C(n), t(6, M = b.ERROR), t(7, O = !1), t(10, be = n.message);
|
|
1076
1135
|
});
|
|
1077
1136
|
}
|
|
1078
|
-
function
|
|
1079
|
-
|
|
1137
|
+
function mt() {
|
|
1138
|
+
O = this.checked, t(7, O);
|
|
1080
1139
|
}
|
|
1081
|
-
function
|
|
1140
|
+
function bt(n) {
|
|
1082
1141
|
he[n ? "unshift" : "push"](() => {
|
|
1083
|
-
|
|
1142
|
+
K = n, t(9, K);
|
|
1084
1143
|
});
|
|
1085
1144
|
}
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1145
|
+
function wt(n) {
|
|
1146
|
+
he[n ? "unshift" : "push"](() => {
|
|
1147
|
+
E = n, t(8, E);
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
return r.$$set = (n) => {
|
|
1151
|
+
"auto" in n && t(0, s = n.auto), "blockspam" in n && t(27, u = n.blockspam), "challengeurl" in n && t(14, a = n.challengeurl), "challengejson" in n && t(28, d = n.challengejson), "debug" in n && t(15, U = n.debug), "delay" in n && t(16, S = n.delay), "expire" in n && t(17, D = n.expire), "floating" in n && t(1, k = n.floating), "floatinganchor" in n && t(18, F = n.floatinganchor), "floatingoffset" in n && t(19, P = n.floatingoffset), "hidefooter" in n && t(2, N = n.hidefooter), "hidelogo" in n && t(3, Q = n.hidelogo), "name" in n && t(4, H = n.name), "maxnumber" in n && t(20, j = n.maxnumber), "mockerror" in n && t(21, L = n.mockerror), "refetchonexpire" in n && t(22, R = n.refetchonexpire), "spamfilter" in n && t(23, v = n.spamfilter), "strings" in n && t(29, z = n.strings), "test" in n && t(24, h = n.test), "verifyurl" in n && t(25, y = n.verifyurl), "workers" in n && t(26, ie = n.workers), "workerurl" in n && t(30, ge = n.workerurl);
|
|
1152
|
+
}, r.$$.update = () => {
|
|
1153
|
+
r.$$.dirty[0] & /*challengejson*/
|
|
1154
|
+
268435456 && (i = d ? qe(d) : void 0), r.$$.dirty[0] & /*strings*/
|
|
1155
|
+
536870912 && t(34, o = z ? qe(z) : {}), r.$$.dirty[1] & /*parsedStrings*/
|
|
1156
|
+
8 && t(11, l = {
|
|
1157
|
+
ariaLinkLabel: Je,
|
|
1094
1158
|
error: "Verification failed. Try again later.",
|
|
1095
1159
|
expired: "Verification expired. Try again.",
|
|
1096
|
-
footer: `Protected by <a href="${
|
|
1160
|
+
footer: `Protected by <a href="${lt}" target="_blank" aria-label="${o.ariaLinkLabel || Je}">ALTCHA</a>`,
|
|
1097
1161
|
label: "I'm not a robot",
|
|
1098
1162
|
verified: "Verified",
|
|
1099
1163
|
verifying: "Verifying...",
|
|
1100
1164
|
waitAlert: "Verifying... please wait.",
|
|
1101
1165
|
...o
|
|
1102
|
-
}),
|
|
1103
|
-
|
|
1166
|
+
}), r.$$.dirty[0] & /*payload, state*/
|
|
1167
|
+
96 && me("statechange", { payload: J, state: M }), r.$$.dirty[0] & /*state*/
|
|
1168
|
+
64 && ut();
|
|
1104
1169
|
}, [
|
|
1105
1170
|
s,
|
|
1171
|
+
k,
|
|
1172
|
+
N,
|
|
1173
|
+
Q,
|
|
1174
|
+
H,
|
|
1175
|
+
J,
|
|
1106
1176
|
M,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
F,
|
|
1112
|
-
ne,
|
|
1113
|
-
ae,
|
|
1177
|
+
O,
|
|
1178
|
+
E,
|
|
1179
|
+
K,
|
|
1180
|
+
be,
|
|
1114
1181
|
l,
|
|
1115
|
-
|
|
1116
|
-
|
|
1182
|
+
ft,
|
|
1183
|
+
je,
|
|
1117
1184
|
a,
|
|
1185
|
+
U,
|
|
1186
|
+
S,
|
|
1187
|
+
D,
|
|
1188
|
+
F,
|
|
1189
|
+
P,
|
|
1118
1190
|
j,
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
k,
|
|
1124
|
-
m,
|
|
1191
|
+
L,
|
|
1192
|
+
R,
|
|
1193
|
+
v,
|
|
1194
|
+
h,
|
|
1125
1195
|
y,
|
|
1126
|
-
|
|
1127
|
-
f,
|
|
1196
|
+
ie,
|
|
1128
1197
|
u,
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1198
|
+
d,
|
|
1199
|
+
z,
|
|
1200
|
+
ge,
|
|
1201
|
+
Me,
|
|
1202
|
+
fe,
|
|
1203
|
+
q,
|
|
1134
1204
|
o,
|
|
1135
|
-
|
|
1136
|
-
|
|
1205
|
+
mt,
|
|
1206
|
+
bt,
|
|
1207
|
+
wt
|
|
1137
1208
|
];
|
|
1138
1209
|
}
|
|
1139
|
-
class
|
|
1210
|
+
class lr extends Bt {
|
|
1140
1211
|
constructor(e) {
|
|
1141
|
-
super(),
|
|
1212
|
+
super(), Wt(
|
|
1142
1213
|
this,
|
|
1143
1214
|
e,
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1215
|
+
or,
|
|
1216
|
+
nr,
|
|
1217
|
+
xt,
|
|
1147
1218
|
{
|
|
1148
1219
|
auto: 0,
|
|
1149
|
-
blockspam:
|
|
1150
|
-
challengeurl:
|
|
1151
|
-
challengejson:
|
|
1152
|
-
debug:
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1220
|
+
blockspam: 27,
|
|
1221
|
+
challengeurl: 14,
|
|
1222
|
+
challengejson: 28,
|
|
1223
|
+
debug: 15,
|
|
1224
|
+
delay: 16,
|
|
1225
|
+
expire: 17,
|
|
1226
|
+
floating: 1,
|
|
1227
|
+
floatinganchor: 18,
|
|
1228
|
+
floatingoffset: 19,
|
|
1229
|
+
hidefooter: 2,
|
|
1230
|
+
hidelogo: 3,
|
|
1231
|
+
name: 4,
|
|
1232
|
+
maxnumber: 20,
|
|
1233
|
+
mockerror: 21,
|
|
1234
|
+
refetchonexpire: 22,
|
|
1235
|
+
spamfilter: 23,
|
|
1236
|
+
strings: 29,
|
|
1237
|
+
test: 24,
|
|
1238
|
+
verifyurl: 25,
|
|
1239
|
+
workers: 26,
|
|
1240
|
+
workerurl: 30,
|
|
1241
|
+
configure: 31,
|
|
1242
|
+
reset: 32,
|
|
1243
|
+
verify: 33
|
|
1169
1244
|
},
|
|
1170
|
-
|
|
1171
|
-
[-1, -1]
|
|
1245
|
+
Jt,
|
|
1246
|
+
[-1, -1, -1]
|
|
1172
1247
|
);
|
|
1173
1248
|
}
|
|
1174
1249
|
get auto() {
|
|
1175
1250
|
return this.$$.ctx[0];
|
|
1176
1251
|
}
|
|
1177
1252
|
set auto(e) {
|
|
1178
|
-
this.$$set({ auto: e }),
|
|
1253
|
+
this.$$set({ auto: e }), w();
|
|
1179
1254
|
}
|
|
1180
1255
|
get blockspam() {
|
|
1181
|
-
return this.$$.ctx[
|
|
1256
|
+
return this.$$.ctx[27];
|
|
1182
1257
|
}
|
|
1183
1258
|
set blockspam(e) {
|
|
1184
|
-
this.$$set({ blockspam: e }),
|
|
1259
|
+
this.$$set({ blockspam: e }), w();
|
|
1185
1260
|
}
|
|
1186
1261
|
get challengeurl() {
|
|
1187
|
-
return this.$$.ctx[
|
|
1262
|
+
return this.$$.ctx[14];
|
|
1188
1263
|
}
|
|
1189
1264
|
set challengeurl(e) {
|
|
1190
|
-
this.$$set({ challengeurl: e }),
|
|
1265
|
+
this.$$set({ challengeurl: e }), w();
|
|
1191
1266
|
}
|
|
1192
1267
|
get challengejson() {
|
|
1193
|
-
return this.$$.ctx[
|
|
1268
|
+
return this.$$.ctx[28];
|
|
1194
1269
|
}
|
|
1195
1270
|
set challengejson(e) {
|
|
1196
|
-
this.$$set({ challengejson: e }),
|
|
1271
|
+
this.$$set({ challengejson: e }), w();
|
|
1197
1272
|
}
|
|
1198
1273
|
get debug() {
|
|
1199
|
-
return this.$$.ctx[
|
|
1274
|
+
return this.$$.ctx[15];
|
|
1200
1275
|
}
|
|
1201
1276
|
set debug(e) {
|
|
1202
|
-
this.$$set({ debug: e }),
|
|
1277
|
+
this.$$set({ debug: e }), w();
|
|
1278
|
+
}
|
|
1279
|
+
get delay() {
|
|
1280
|
+
return this.$$.ctx[16];
|
|
1281
|
+
}
|
|
1282
|
+
set delay(e) {
|
|
1283
|
+
this.$$set({ delay: e }), w();
|
|
1203
1284
|
}
|
|
1204
1285
|
get expire() {
|
|
1205
|
-
return this.$$.ctx[
|
|
1286
|
+
return this.$$.ctx[17];
|
|
1206
1287
|
}
|
|
1207
1288
|
set expire(e) {
|
|
1208
|
-
this.$$set({ expire: e }),
|
|
1289
|
+
this.$$set({ expire: e }), w();
|
|
1209
1290
|
}
|
|
1210
|
-
get
|
|
1291
|
+
get floating() {
|
|
1211
1292
|
return this.$$.ctx[1];
|
|
1212
1293
|
}
|
|
1294
|
+
set floating(e) {
|
|
1295
|
+
this.$$set({ floating: e }), w();
|
|
1296
|
+
}
|
|
1297
|
+
get floatinganchor() {
|
|
1298
|
+
return this.$$.ctx[18];
|
|
1299
|
+
}
|
|
1300
|
+
set floatinganchor(e) {
|
|
1301
|
+
this.$$set({ floatinganchor: e }), w();
|
|
1302
|
+
}
|
|
1303
|
+
get floatingoffset() {
|
|
1304
|
+
return this.$$.ctx[19];
|
|
1305
|
+
}
|
|
1306
|
+
set floatingoffset(e) {
|
|
1307
|
+
this.$$set({ floatingoffset: e }), w();
|
|
1308
|
+
}
|
|
1309
|
+
get hidefooter() {
|
|
1310
|
+
return this.$$.ctx[2];
|
|
1311
|
+
}
|
|
1213
1312
|
set hidefooter(e) {
|
|
1214
|
-
this.$$set({ hidefooter: e }),
|
|
1313
|
+
this.$$set({ hidefooter: e }), w();
|
|
1215
1314
|
}
|
|
1216
1315
|
get hidelogo() {
|
|
1217
|
-
return this.$$.ctx[
|
|
1316
|
+
return this.$$.ctx[3];
|
|
1218
1317
|
}
|
|
1219
1318
|
set hidelogo(e) {
|
|
1220
|
-
this.$$set({ hidelogo: e }),
|
|
1319
|
+
this.$$set({ hidelogo: e }), w();
|
|
1221
1320
|
}
|
|
1222
1321
|
get name() {
|
|
1223
|
-
return this.$$.ctx[
|
|
1322
|
+
return this.$$.ctx[4];
|
|
1224
1323
|
}
|
|
1225
1324
|
set name(e) {
|
|
1226
|
-
this.$$set({ name: e }),
|
|
1325
|
+
this.$$set({ name: e }), w();
|
|
1227
1326
|
}
|
|
1228
1327
|
get maxnumber() {
|
|
1229
|
-
return this.$$.ctx[
|
|
1328
|
+
return this.$$.ctx[20];
|
|
1230
1329
|
}
|
|
1231
1330
|
set maxnumber(e) {
|
|
1232
|
-
this.$$set({ maxnumber: e }),
|
|
1331
|
+
this.$$set({ maxnumber: e }), w();
|
|
1233
1332
|
}
|
|
1234
1333
|
get mockerror() {
|
|
1235
|
-
return this.$$.ctx[
|
|
1334
|
+
return this.$$.ctx[21];
|
|
1236
1335
|
}
|
|
1237
1336
|
set mockerror(e) {
|
|
1238
|
-
this.$$set({ mockerror: e }),
|
|
1337
|
+
this.$$set({ mockerror: e }), w();
|
|
1239
1338
|
}
|
|
1240
1339
|
get refetchonexpire() {
|
|
1241
|
-
return this.$$.ctx[
|
|
1340
|
+
return this.$$.ctx[22];
|
|
1242
1341
|
}
|
|
1243
1342
|
set refetchonexpire(e) {
|
|
1244
|
-
this.$$set({ refetchonexpire: e }),
|
|
1343
|
+
this.$$set({ refetchonexpire: e }), w();
|
|
1245
1344
|
}
|
|
1246
1345
|
get spamfilter() {
|
|
1247
|
-
return this.$$.ctx[
|
|
1346
|
+
return this.$$.ctx[23];
|
|
1248
1347
|
}
|
|
1249
1348
|
set spamfilter(e) {
|
|
1250
|
-
this.$$set({ spamfilter: e }),
|
|
1349
|
+
this.$$set({ spamfilter: e }), w();
|
|
1251
1350
|
}
|
|
1252
1351
|
get strings() {
|
|
1253
|
-
return this.$$.ctx[
|
|
1352
|
+
return this.$$.ctx[29];
|
|
1254
1353
|
}
|
|
1255
1354
|
set strings(e) {
|
|
1256
|
-
this.$$set({ strings: e }),
|
|
1355
|
+
this.$$set({ strings: e }), w();
|
|
1257
1356
|
}
|
|
1258
1357
|
get test() {
|
|
1259
|
-
return this.$$.ctx[
|
|
1358
|
+
return this.$$.ctx[24];
|
|
1260
1359
|
}
|
|
1261
1360
|
set test(e) {
|
|
1262
|
-
this.$$set({ test: e }),
|
|
1361
|
+
this.$$set({ test: e }), w();
|
|
1263
1362
|
}
|
|
1264
1363
|
get verifyurl() {
|
|
1265
|
-
return this.$$.ctx[
|
|
1364
|
+
return this.$$.ctx[25];
|
|
1266
1365
|
}
|
|
1267
1366
|
set verifyurl(e) {
|
|
1268
|
-
this.$$set({ verifyurl: e }),
|
|
1367
|
+
this.$$set({ verifyurl: e }), w();
|
|
1269
1368
|
}
|
|
1270
1369
|
get workers() {
|
|
1271
|
-
return this.$$.ctx[
|
|
1370
|
+
return this.$$.ctx[26];
|
|
1272
1371
|
}
|
|
1273
1372
|
set workers(e) {
|
|
1274
|
-
this.$$set({ workers: e }),
|
|
1373
|
+
this.$$set({ workers: e }), w();
|
|
1275
1374
|
}
|
|
1276
1375
|
get workerurl() {
|
|
1277
|
-
return this.$$.ctx[
|
|
1376
|
+
return this.$$.ctx[30];
|
|
1278
1377
|
}
|
|
1279
1378
|
set workerurl(e) {
|
|
1280
|
-
this.$$set({ workerurl: e }),
|
|
1379
|
+
this.$$set({ workerurl: e }), w();
|
|
1281
1380
|
}
|
|
1282
1381
|
get configure() {
|
|
1283
|
-
return this.$$.ctx[
|
|
1382
|
+
return this.$$.ctx[31];
|
|
1284
1383
|
}
|
|
1285
1384
|
get reset() {
|
|
1286
|
-
return this.$$.ctx[
|
|
1385
|
+
return this.$$.ctx[32];
|
|
1287
1386
|
}
|
|
1288
1387
|
get verify() {
|
|
1289
|
-
return this.$$.ctx[
|
|
1388
|
+
return this.$$.ctx[33];
|
|
1290
1389
|
}
|
|
1291
1390
|
}
|
|
1292
|
-
customElements.define("altcha-widget",
|
|
1293
|
-
globalThis.createAltchaWorker = (
|
|
1391
|
+
customElements.define("altcha-widget", Xt(lr, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, [], ["configure", "reset", "verify"], !1));
|
|
1392
|
+
globalThis.createAltchaWorker = (r) => r ? new Worker(new URL(r)) : new kt();
|
|
1294
1393
|
export {
|
|
1295
|
-
|
|
1394
|
+
lr as Altcha
|
|
1296
1395
|
};
|