altcha 3.1.0 → 3.2.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/dist/external/altcha.js +2 -4
- package/dist/external/altcha.min.js +1 -1
- package/dist/external/altcha.umd.cjs +2 -4
- package/dist/external/altcha.umd.min.cjs +1 -1
- package/dist/i18n/af.js +109 -3
- package/dist/i18n/af.umd.cjs +109 -3
- package/dist/i18n/africa.js +115 -21
- package/dist/i18n/africa.umd.cjs +115 -21
- package/dist/i18n/all.js +169 -183
- package/dist/i18n/all.umd.cjs +169 -183
- package/dist/i18n/am.js +109 -3
- package/dist/i18n/am.umd.cjs +109 -3
- package/dist/i18n/americas.js +111 -9
- package/dist/i18n/americas.umd.cjs +111 -9
- package/dist/i18n/ar.js +109 -3
- package/dist/i18n/ar.umd.cjs +109 -3
- package/dist/i18n/asia.js +132 -72
- package/dist/i18n/asia.umd.cjs +132 -72
- package/dist/i18n/az.js +109 -3
- package/dist/i18n/az.umd.cjs +109 -3
- package/dist/i18n/be.js +109 -3
- package/dist/i18n/be.umd.cjs +109 -3
- package/dist/i18n/bg.js +109 -3
- package/dist/i18n/bg.umd.cjs +109 -3
- package/dist/i18n/bn.js +109 -3
- package/dist/i18n/bn.umd.cjs +109 -3
- package/dist/i18n/bs.js +109 -3
- package/dist/i18n/bs.umd.cjs +109 -3
- package/dist/i18n/ca.js +109 -3
- package/dist/i18n/ca.umd.cjs +109 -3
- package/dist/i18n/cs.js +109 -3
- package/dist/i18n/cs.umd.cjs +109 -3
- package/dist/i18n/da.js +109 -3
- package/dist/i18n/da.umd.cjs +109 -3
- package/dist/i18n/de.js +109 -3
- package/dist/i18n/de.umd.cjs +109 -3
- package/dist/i18n/el.js +109 -3
- package/dist/i18n/el.umd.cjs +109 -3
- package/dist/i18n/en.js +109 -3
- package/dist/i18n/en.umd.cjs +109 -3
- package/dist/i18n/es-419.js +109 -3
- package/dist/i18n/es-419.umd.cjs +109 -3
- package/dist/i18n/es-es.js +109 -3
- package/dist/i18n/es-es.umd.cjs +109 -3
- package/dist/i18n/et.js +109 -3
- package/dist/i18n/et.umd.cjs +109 -3
- package/dist/i18n/eu.js +109 -3
- package/dist/i18n/eu.umd.cjs +109 -3
- package/dist/i18n/europe.js +145 -111
- package/dist/i18n/europe.umd.cjs +145 -111
- package/dist/i18n/fa.js +109 -3
- package/dist/i18n/fa.umd.cjs +109 -3
- package/dist/i18n/fi.js +109 -3
- package/dist/i18n/fi.umd.cjs +109 -3
- package/dist/i18n/fr-ca.js +109 -3
- package/dist/i18n/fr-ca.umd.cjs +109 -3
- package/dist/i18n/fr-fr.js +109 -3
- package/dist/i18n/fr-fr.umd.cjs +109 -3
- package/dist/i18n/ga.js +109 -3
- package/dist/i18n/ga.umd.cjs +109 -3
- package/dist/i18n/he.js +109 -3
- package/dist/i18n/he.umd.cjs +109 -3
- package/dist/i18n/hi.js +109 -3
- package/dist/i18n/hi.umd.cjs +109 -3
- package/dist/i18n/hr.js +109 -3
- package/dist/i18n/hr.umd.cjs +109 -3
- package/dist/i18n/hu.js +109 -3
- package/dist/i18n/hu.umd.cjs +109 -3
- package/dist/i18n/hy.js +109 -3
- package/dist/i18n/hy.umd.cjs +109 -3
- package/dist/i18n/id.js +109 -3
- package/dist/i18n/id.umd.cjs +109 -3
- package/dist/i18n/is.js +109 -3
- package/dist/i18n/is.umd.cjs +109 -3
- package/dist/i18n/it.js +109 -3
- package/dist/i18n/it.umd.cjs +109 -3
- package/dist/i18n/ja.js +109 -3
- package/dist/i18n/ja.umd.cjs +109 -3
- package/dist/i18n/ka.js +109 -3
- package/dist/i18n/ka.umd.cjs +109 -3
- package/dist/i18n/kk.js +109 -3
- package/dist/i18n/kk.umd.cjs +109 -3
- package/dist/i18n/ko.js +109 -3
- package/dist/i18n/ko.umd.cjs +109 -3
- package/dist/i18n/lb.js +109 -3
- package/dist/i18n/lb.umd.cjs +109 -3
- package/dist/i18n/lt.js +109 -3
- package/dist/i18n/lt.umd.cjs +109 -3
- package/dist/i18n/lv.js +109 -3
- package/dist/i18n/lv.umd.cjs +109 -3
- package/dist/i18n/me.js +109 -3
- package/dist/i18n/me.umd.cjs +109 -3
- package/dist/i18n/mk.js +109 -3
- package/dist/i18n/mk.umd.cjs +109 -3
- package/dist/i18n/mr.js +109 -3
- package/dist/i18n/mr.umd.cjs +109 -3
- package/dist/i18n/mt.js +109 -3
- package/dist/i18n/mt.umd.cjs +109 -3
- package/dist/i18n/nb.js +109 -3
- package/dist/i18n/nb.umd.cjs +109 -3
- package/dist/i18n/nl.js +109 -3
- package/dist/i18n/nl.umd.cjs +109 -3
- package/dist/i18n/pl.js +109 -3
- package/dist/i18n/pl.umd.cjs +109 -3
- package/dist/i18n/pt-br.js +109 -3
- package/dist/i18n/pt-br.umd.cjs +109 -3
- package/dist/i18n/pt-pt.js +109 -3
- package/dist/i18n/pt-pt.umd.cjs +109 -3
- package/dist/i18n/ro.js +109 -3
- package/dist/i18n/ro.umd.cjs +109 -3
- package/dist/i18n/ru.js +109 -3
- package/dist/i18n/ru.umd.cjs +109 -3
- package/dist/i18n/sk.js +109 -3
- package/dist/i18n/sk.umd.cjs +109 -3
- package/dist/i18n/sl.js +109 -3
- package/dist/i18n/sl.umd.cjs +109 -3
- package/dist/i18n/sq.js +109 -3
- package/dist/i18n/sq.umd.cjs +109 -3
- package/dist/i18n/sr.js +109 -3
- package/dist/i18n/sr.umd.cjs +109 -3
- package/dist/i18n/sv.js +109 -3
- package/dist/i18n/sv.umd.cjs +109 -3
- package/dist/i18n/sw.js +109 -3
- package/dist/i18n/sw.umd.cjs +109 -3
- package/dist/i18n/ta.js +109 -3
- package/dist/i18n/ta.umd.cjs +109 -3
- package/dist/i18n/te.js +109 -3
- package/dist/i18n/te.umd.cjs +109 -3
- package/dist/i18n/th.js +109 -3
- package/dist/i18n/th.umd.cjs +109 -3
- package/dist/i18n/tk.js +109 -3
- package/dist/i18n/tk.umd.cjs +109 -3
- package/dist/i18n/tr.js +109 -3
- package/dist/i18n/tr.umd.cjs +109 -3
- package/dist/i18n/uk.js +109 -3
- package/dist/i18n/uk.umd.cjs +109 -3
- package/dist/i18n/ur.js +109 -3
- package/dist/i18n/ur.umd.cjs +109 -3
- package/dist/i18n/uz.js +109 -3
- package/dist/i18n/uz.umd.cjs +109 -3
- package/dist/i18n/vi.js +109 -3
- package/dist/i18n/vi.umd.cjs +109 -3
- package/dist/i18n/yo.js +109 -3
- package/dist/i18n/yo.umd.cjs +109 -3
- package/dist/i18n/zh-cn.js +109 -3
- package/dist/i18n/zh-cn.umd.cjs +109 -3
- package/dist/i18n/zh-hk.js +109 -3
- package/dist/i18n/zh-hk.umd.cjs +109 -3
- package/dist/i18n/zh-tw.js +109 -3
- package/dist/i18n/zh-tw.umd.cjs +109 -3
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.min.js +1 -1
- package/dist/lib/index.umd.cjs +2 -0
- package/dist/lib/index.umd.min.cjs +1 -1
- package/dist/main/altcha.i18n.js +67 -187
- package/dist/main/altcha.i18n.min.js +1 -1
- package/dist/main/altcha.i18n.umd.cjs +67 -187
- package/dist/main/altcha.i18n.umd.min.cjs +1 -1
- package/dist/main/altcha.js +6 -4
- package/dist/main/altcha.min.js +1 -1
- package/dist/main/altcha.umd.cjs +6 -4
- package/dist/main/altcha.umd.min.cjs +1 -1
- package/dist/plugins/obfuscation.plugin.js +3 -0
- package/dist/plugins/obfuscation.plugin.min.js +1 -1
- package/dist/plugins/obfuscation.plugin.umd.cjs +3 -0
- package/dist/plugins/obfuscation.plugin.umd.min.cjs +1 -1
- package/dist/workers/argon2id.js +2 -0
- package/dist/workers/pbkdf2.js +2 -0
- package/dist/workers/scrypt.js +2 -0
- package/dist/workers/sha.js +2 -0
- package/package.json +4 -2
package/dist/i18n/bn.umd.cjs
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
typeof define === "function" && define.amd ? define(factory) : factory();
|
|
3
3
|
})((function() {
|
|
4
4
|
"use strict";
|
|
5
|
+
const noop = () => {
|
|
6
|
+
};
|
|
7
|
+
function safe_not_equal(a, b) {
|
|
8
|
+
return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
|
|
9
|
+
}
|
|
10
|
+
function subscribe_to_store(store2, run, invalidate) {
|
|
11
|
+
if (store2 == null) {
|
|
12
|
+
run(void 0);
|
|
13
|
+
return noop;
|
|
14
|
+
}
|
|
15
|
+
const unsub = untrack(
|
|
16
|
+
() => store2.subscribe(
|
|
17
|
+
run,
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
invalidate
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
23
|
+
}
|
|
24
|
+
const subscriber_queue = [];
|
|
25
|
+
function writable(value, start = noop) {
|
|
26
|
+
let stop = null;
|
|
27
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
28
|
+
function set(new_value) {
|
|
29
|
+
if (safe_not_equal(value, new_value)) {
|
|
30
|
+
value = new_value;
|
|
31
|
+
if (stop) {
|
|
32
|
+
const run_queue = !subscriber_queue.length;
|
|
33
|
+
for (const subscriber of subscribers) {
|
|
34
|
+
subscriber[1]();
|
|
35
|
+
subscriber_queue.push(subscriber, value);
|
|
36
|
+
}
|
|
37
|
+
if (run_queue) {
|
|
38
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
39
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
40
|
+
}
|
|
41
|
+
subscriber_queue.length = 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function update(fn) {
|
|
47
|
+
set(fn(
|
|
48
|
+
/** @type {T} */
|
|
49
|
+
value
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
function subscribe(run, invalidate = noop) {
|
|
53
|
+
const subscriber = [run, invalidate];
|
|
54
|
+
subscribers.add(subscriber);
|
|
55
|
+
if (subscribers.size === 1) {
|
|
56
|
+
stop = start(set, update) || noop;
|
|
57
|
+
}
|
|
58
|
+
run(
|
|
59
|
+
/** @type {T} */
|
|
60
|
+
value
|
|
61
|
+
);
|
|
62
|
+
return () => {
|
|
63
|
+
subscribers.delete(subscriber);
|
|
64
|
+
if (subscribers.size === 0 && stop) {
|
|
65
|
+
stop();
|
|
66
|
+
stop = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return { set, update, subscribe };
|
|
71
|
+
}
|
|
72
|
+
function get(store2) {
|
|
73
|
+
let value;
|
|
74
|
+
subscribe_to_store(store2, (_) => value = _)();
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
let untracking = false;
|
|
78
|
+
function untrack(fn) {
|
|
79
|
+
var previous_untracking = untracking;
|
|
80
|
+
try {
|
|
81
|
+
untracking = true;
|
|
82
|
+
return fn();
|
|
83
|
+
} finally {
|
|
84
|
+
untracking = previous_untracking;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function store(defaultValue) {
|
|
88
|
+
const scope = {
|
|
89
|
+
get: (name) => {
|
|
90
|
+
return get(scope.store)[name];
|
|
91
|
+
},
|
|
92
|
+
set: (name, value) => {
|
|
93
|
+
if (typeof name === "string") {
|
|
94
|
+
Object.assign(get(scope.store), {
|
|
95
|
+
[name]: value
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
Object.assign(get(scope.store), name);
|
|
99
|
+
}
|
|
100
|
+
scope.store.set(get(scope.store));
|
|
101
|
+
},
|
|
102
|
+
store: writable(defaultValue)
|
|
103
|
+
};
|
|
104
|
+
return scope;
|
|
105
|
+
}
|
|
106
|
+
globalThis.$altcha = globalThis.$altcha || {
|
|
107
|
+
algorithms: /* @__PURE__ */ new Map(),
|
|
108
|
+
defaults: store({}),
|
|
109
|
+
i18n: store({}),
|
|
110
|
+
instances: /* @__PURE__ */ new Set(),
|
|
111
|
+
plugins: /* @__PURE__ */ new Set()
|
|
112
|
+
};
|
|
5
113
|
const i18n = {
|
|
6
114
|
ariaLinkLabel: "Altcha (অফিসিয়াল ওয়েবসাইট)",
|
|
7
115
|
enterCode: "কোড লিখুন",
|
|
@@ -21,7 +129,5 @@
|
|
|
21
129
|
cancel: "বাতিল করুন",
|
|
22
130
|
enterCodeFromImage: "এগিয়ে যেতে, অনুগ্রহ করে নীচের চিত্র থেকে কোডটি প্রবেশ করান।"
|
|
23
131
|
};
|
|
24
|
-
|
|
25
|
-
globalThis.$altcha.i18n.set("bn", i18n);
|
|
26
|
-
}
|
|
132
|
+
globalThis.$altcha.i18n.set("bn", i18n);
|
|
27
133
|
}));
|
package/dist/i18n/bs.js
CHANGED
|
@@ -1,3 +1,111 @@
|
|
|
1
|
+
const noop = () => {
|
|
2
|
+
};
|
|
3
|
+
function safe_not_equal(a, b) {
|
|
4
|
+
return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
|
|
5
|
+
}
|
|
6
|
+
function subscribe_to_store(store2, run, invalidate) {
|
|
7
|
+
if (store2 == null) {
|
|
8
|
+
run(void 0);
|
|
9
|
+
return noop;
|
|
10
|
+
}
|
|
11
|
+
const unsub = untrack(
|
|
12
|
+
() => store2.subscribe(
|
|
13
|
+
run,
|
|
14
|
+
// @ts-expect-error
|
|
15
|
+
invalidate
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
19
|
+
}
|
|
20
|
+
const subscriber_queue = [];
|
|
21
|
+
function writable(value, start = noop) {
|
|
22
|
+
let stop = null;
|
|
23
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
24
|
+
function set(new_value) {
|
|
25
|
+
if (safe_not_equal(value, new_value)) {
|
|
26
|
+
value = new_value;
|
|
27
|
+
if (stop) {
|
|
28
|
+
const run_queue = !subscriber_queue.length;
|
|
29
|
+
for (const subscriber of subscribers) {
|
|
30
|
+
subscriber[1]();
|
|
31
|
+
subscriber_queue.push(subscriber, value);
|
|
32
|
+
}
|
|
33
|
+
if (run_queue) {
|
|
34
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
35
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
36
|
+
}
|
|
37
|
+
subscriber_queue.length = 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function update(fn) {
|
|
43
|
+
set(fn(
|
|
44
|
+
/** @type {T} */
|
|
45
|
+
value
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
function subscribe(run, invalidate = noop) {
|
|
49
|
+
const subscriber = [run, invalidate];
|
|
50
|
+
subscribers.add(subscriber);
|
|
51
|
+
if (subscribers.size === 1) {
|
|
52
|
+
stop = start(set, update) || noop;
|
|
53
|
+
}
|
|
54
|
+
run(
|
|
55
|
+
/** @type {T} */
|
|
56
|
+
value
|
|
57
|
+
);
|
|
58
|
+
return () => {
|
|
59
|
+
subscribers.delete(subscriber);
|
|
60
|
+
if (subscribers.size === 0 && stop) {
|
|
61
|
+
stop();
|
|
62
|
+
stop = null;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return { set, update, subscribe };
|
|
67
|
+
}
|
|
68
|
+
function get(store2) {
|
|
69
|
+
let value;
|
|
70
|
+
subscribe_to_store(store2, (_) => value = _)();
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
let untracking = false;
|
|
74
|
+
function untrack(fn) {
|
|
75
|
+
var previous_untracking = untracking;
|
|
76
|
+
try {
|
|
77
|
+
untracking = true;
|
|
78
|
+
return fn();
|
|
79
|
+
} finally {
|
|
80
|
+
untracking = previous_untracking;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function store(defaultValue) {
|
|
84
|
+
const scope = {
|
|
85
|
+
get: (name) => {
|
|
86
|
+
return get(scope.store)[name];
|
|
87
|
+
},
|
|
88
|
+
set: (name, value) => {
|
|
89
|
+
if (typeof name === "string") {
|
|
90
|
+
Object.assign(get(scope.store), {
|
|
91
|
+
[name]: value
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
Object.assign(get(scope.store), name);
|
|
95
|
+
}
|
|
96
|
+
scope.store.set(get(scope.store));
|
|
97
|
+
},
|
|
98
|
+
store: writable(defaultValue)
|
|
99
|
+
};
|
|
100
|
+
return scope;
|
|
101
|
+
}
|
|
102
|
+
globalThis.$altcha = globalThis.$altcha || {
|
|
103
|
+
algorithms: /* @__PURE__ */ new Map(),
|
|
104
|
+
defaults: store({}),
|
|
105
|
+
i18n: store({}),
|
|
106
|
+
instances: /* @__PURE__ */ new Set(),
|
|
107
|
+
plugins: /* @__PURE__ */ new Set()
|
|
108
|
+
};
|
|
1
109
|
const i18n = {
|
|
2
110
|
ariaLinkLabel: "Altcha (službena web stranica)",
|
|
3
111
|
enterCode: "Unesite kod",
|
|
@@ -17,6 +125,4 @@ const i18n = {
|
|
|
17
125
|
cancel: "Odustani",
|
|
18
126
|
enterCodeFromImage: "Za nastavak, molimo unesite kod sa slike ispod."
|
|
19
127
|
};
|
|
20
|
-
|
|
21
|
-
globalThis.$altcha.i18n.set("bs", i18n);
|
|
22
|
-
}
|
|
128
|
+
globalThis.$altcha.i18n.set("bs", i18n);
|
package/dist/i18n/bs.umd.cjs
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
typeof define === "function" && define.amd ? define(factory) : factory();
|
|
3
3
|
})((function() {
|
|
4
4
|
"use strict";
|
|
5
|
+
const noop = () => {
|
|
6
|
+
};
|
|
7
|
+
function safe_not_equal(a, b) {
|
|
8
|
+
return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
|
|
9
|
+
}
|
|
10
|
+
function subscribe_to_store(store2, run, invalidate) {
|
|
11
|
+
if (store2 == null) {
|
|
12
|
+
run(void 0);
|
|
13
|
+
return noop;
|
|
14
|
+
}
|
|
15
|
+
const unsub = untrack(
|
|
16
|
+
() => store2.subscribe(
|
|
17
|
+
run,
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
invalidate
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
23
|
+
}
|
|
24
|
+
const subscriber_queue = [];
|
|
25
|
+
function writable(value, start = noop) {
|
|
26
|
+
let stop = null;
|
|
27
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
28
|
+
function set(new_value) {
|
|
29
|
+
if (safe_not_equal(value, new_value)) {
|
|
30
|
+
value = new_value;
|
|
31
|
+
if (stop) {
|
|
32
|
+
const run_queue = !subscriber_queue.length;
|
|
33
|
+
for (const subscriber of subscribers) {
|
|
34
|
+
subscriber[1]();
|
|
35
|
+
subscriber_queue.push(subscriber, value);
|
|
36
|
+
}
|
|
37
|
+
if (run_queue) {
|
|
38
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
39
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
40
|
+
}
|
|
41
|
+
subscriber_queue.length = 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function update(fn) {
|
|
47
|
+
set(fn(
|
|
48
|
+
/** @type {T} */
|
|
49
|
+
value
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
function subscribe(run, invalidate = noop) {
|
|
53
|
+
const subscriber = [run, invalidate];
|
|
54
|
+
subscribers.add(subscriber);
|
|
55
|
+
if (subscribers.size === 1) {
|
|
56
|
+
stop = start(set, update) || noop;
|
|
57
|
+
}
|
|
58
|
+
run(
|
|
59
|
+
/** @type {T} */
|
|
60
|
+
value
|
|
61
|
+
);
|
|
62
|
+
return () => {
|
|
63
|
+
subscribers.delete(subscriber);
|
|
64
|
+
if (subscribers.size === 0 && stop) {
|
|
65
|
+
stop();
|
|
66
|
+
stop = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return { set, update, subscribe };
|
|
71
|
+
}
|
|
72
|
+
function get(store2) {
|
|
73
|
+
let value;
|
|
74
|
+
subscribe_to_store(store2, (_) => value = _)();
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
let untracking = false;
|
|
78
|
+
function untrack(fn) {
|
|
79
|
+
var previous_untracking = untracking;
|
|
80
|
+
try {
|
|
81
|
+
untracking = true;
|
|
82
|
+
return fn();
|
|
83
|
+
} finally {
|
|
84
|
+
untracking = previous_untracking;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function store(defaultValue) {
|
|
88
|
+
const scope = {
|
|
89
|
+
get: (name) => {
|
|
90
|
+
return get(scope.store)[name];
|
|
91
|
+
},
|
|
92
|
+
set: (name, value) => {
|
|
93
|
+
if (typeof name === "string") {
|
|
94
|
+
Object.assign(get(scope.store), {
|
|
95
|
+
[name]: value
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
Object.assign(get(scope.store), name);
|
|
99
|
+
}
|
|
100
|
+
scope.store.set(get(scope.store));
|
|
101
|
+
},
|
|
102
|
+
store: writable(defaultValue)
|
|
103
|
+
};
|
|
104
|
+
return scope;
|
|
105
|
+
}
|
|
106
|
+
globalThis.$altcha = globalThis.$altcha || {
|
|
107
|
+
algorithms: /* @__PURE__ */ new Map(),
|
|
108
|
+
defaults: store({}),
|
|
109
|
+
i18n: store({}),
|
|
110
|
+
instances: /* @__PURE__ */ new Set(),
|
|
111
|
+
plugins: /* @__PURE__ */ new Set()
|
|
112
|
+
};
|
|
5
113
|
const i18n = {
|
|
6
114
|
ariaLinkLabel: "Altcha (službena web stranica)",
|
|
7
115
|
enterCode: "Unesite kod",
|
|
@@ -21,7 +129,5 @@
|
|
|
21
129
|
cancel: "Odustani",
|
|
22
130
|
enterCodeFromImage: "Za nastavak, molimo unesite kod sa slike ispod."
|
|
23
131
|
};
|
|
24
|
-
|
|
25
|
-
globalThis.$altcha.i18n.set("bs", i18n);
|
|
26
|
-
}
|
|
132
|
+
globalThis.$altcha.i18n.set("bs", i18n);
|
|
27
133
|
}));
|
package/dist/i18n/ca.js
CHANGED
|
@@ -1,3 +1,111 @@
|
|
|
1
|
+
const noop = () => {
|
|
2
|
+
};
|
|
3
|
+
function safe_not_equal(a, b) {
|
|
4
|
+
return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
|
|
5
|
+
}
|
|
6
|
+
function subscribe_to_store(store2, run, invalidate) {
|
|
7
|
+
if (store2 == null) {
|
|
8
|
+
run(void 0);
|
|
9
|
+
return noop;
|
|
10
|
+
}
|
|
11
|
+
const unsub = untrack(
|
|
12
|
+
() => store2.subscribe(
|
|
13
|
+
run,
|
|
14
|
+
// @ts-expect-error
|
|
15
|
+
invalidate
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
19
|
+
}
|
|
20
|
+
const subscriber_queue = [];
|
|
21
|
+
function writable(value, start = noop) {
|
|
22
|
+
let stop = null;
|
|
23
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
24
|
+
function set(new_value) {
|
|
25
|
+
if (safe_not_equal(value, new_value)) {
|
|
26
|
+
value = new_value;
|
|
27
|
+
if (stop) {
|
|
28
|
+
const run_queue = !subscriber_queue.length;
|
|
29
|
+
for (const subscriber of subscribers) {
|
|
30
|
+
subscriber[1]();
|
|
31
|
+
subscriber_queue.push(subscriber, value);
|
|
32
|
+
}
|
|
33
|
+
if (run_queue) {
|
|
34
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
35
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
36
|
+
}
|
|
37
|
+
subscriber_queue.length = 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function update(fn) {
|
|
43
|
+
set(fn(
|
|
44
|
+
/** @type {T} */
|
|
45
|
+
value
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
function subscribe(run, invalidate = noop) {
|
|
49
|
+
const subscriber = [run, invalidate];
|
|
50
|
+
subscribers.add(subscriber);
|
|
51
|
+
if (subscribers.size === 1) {
|
|
52
|
+
stop = start(set, update) || noop;
|
|
53
|
+
}
|
|
54
|
+
run(
|
|
55
|
+
/** @type {T} */
|
|
56
|
+
value
|
|
57
|
+
);
|
|
58
|
+
return () => {
|
|
59
|
+
subscribers.delete(subscriber);
|
|
60
|
+
if (subscribers.size === 0 && stop) {
|
|
61
|
+
stop();
|
|
62
|
+
stop = null;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return { set, update, subscribe };
|
|
67
|
+
}
|
|
68
|
+
function get(store2) {
|
|
69
|
+
let value;
|
|
70
|
+
subscribe_to_store(store2, (_) => value = _)();
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
let untracking = false;
|
|
74
|
+
function untrack(fn) {
|
|
75
|
+
var previous_untracking = untracking;
|
|
76
|
+
try {
|
|
77
|
+
untracking = true;
|
|
78
|
+
return fn();
|
|
79
|
+
} finally {
|
|
80
|
+
untracking = previous_untracking;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function store(defaultValue) {
|
|
84
|
+
const scope = {
|
|
85
|
+
get: (name) => {
|
|
86
|
+
return get(scope.store)[name];
|
|
87
|
+
},
|
|
88
|
+
set: (name, value) => {
|
|
89
|
+
if (typeof name === "string") {
|
|
90
|
+
Object.assign(get(scope.store), {
|
|
91
|
+
[name]: value
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
Object.assign(get(scope.store), name);
|
|
95
|
+
}
|
|
96
|
+
scope.store.set(get(scope.store));
|
|
97
|
+
},
|
|
98
|
+
store: writable(defaultValue)
|
|
99
|
+
};
|
|
100
|
+
return scope;
|
|
101
|
+
}
|
|
102
|
+
globalThis.$altcha = globalThis.$altcha || {
|
|
103
|
+
algorithms: /* @__PURE__ */ new Map(),
|
|
104
|
+
defaults: store({}),
|
|
105
|
+
i18n: store({}),
|
|
106
|
+
instances: /* @__PURE__ */ new Set(),
|
|
107
|
+
plugins: /* @__PURE__ */ new Set()
|
|
108
|
+
};
|
|
1
109
|
const i18n = {
|
|
2
110
|
ariaLinkLabel: "Altcha (lloc web oficial)",
|
|
3
111
|
enterCode: "Introdueix el codi",
|
|
@@ -17,6 +125,4 @@ const i18n = {
|
|
|
17
125
|
cancel: "Cancel·la",
|
|
18
126
|
enterCodeFromImage: "Per continuar, si us plau, introdueix el codi de la imatge següent."
|
|
19
127
|
};
|
|
20
|
-
|
|
21
|
-
globalThis.$altcha.i18n.set("ca", i18n);
|
|
22
|
-
}
|
|
128
|
+
globalThis.$altcha.i18n.set("ca", i18n);
|
package/dist/i18n/ca.umd.cjs
CHANGED
|
@@ -2,6 +2,114 @@
|
|
|
2
2
|
typeof define === "function" && define.amd ? define(factory) : factory();
|
|
3
3
|
})((function() {
|
|
4
4
|
"use strict";
|
|
5
|
+
const noop = () => {
|
|
6
|
+
};
|
|
7
|
+
function safe_not_equal(a, b) {
|
|
8
|
+
return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
|
|
9
|
+
}
|
|
10
|
+
function subscribe_to_store(store2, run, invalidate) {
|
|
11
|
+
if (store2 == null) {
|
|
12
|
+
run(void 0);
|
|
13
|
+
return noop;
|
|
14
|
+
}
|
|
15
|
+
const unsub = untrack(
|
|
16
|
+
() => store2.subscribe(
|
|
17
|
+
run,
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
invalidate
|
|
20
|
+
)
|
|
21
|
+
);
|
|
22
|
+
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
|
|
23
|
+
}
|
|
24
|
+
const subscriber_queue = [];
|
|
25
|
+
function writable(value, start = noop) {
|
|
26
|
+
let stop = null;
|
|
27
|
+
const subscribers = /* @__PURE__ */ new Set();
|
|
28
|
+
function set(new_value) {
|
|
29
|
+
if (safe_not_equal(value, new_value)) {
|
|
30
|
+
value = new_value;
|
|
31
|
+
if (stop) {
|
|
32
|
+
const run_queue = !subscriber_queue.length;
|
|
33
|
+
for (const subscriber of subscribers) {
|
|
34
|
+
subscriber[1]();
|
|
35
|
+
subscriber_queue.push(subscriber, value);
|
|
36
|
+
}
|
|
37
|
+
if (run_queue) {
|
|
38
|
+
for (let i = 0; i < subscriber_queue.length; i += 2) {
|
|
39
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
40
|
+
}
|
|
41
|
+
subscriber_queue.length = 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function update(fn) {
|
|
47
|
+
set(fn(
|
|
48
|
+
/** @type {T} */
|
|
49
|
+
value
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
function subscribe(run, invalidate = noop) {
|
|
53
|
+
const subscriber = [run, invalidate];
|
|
54
|
+
subscribers.add(subscriber);
|
|
55
|
+
if (subscribers.size === 1) {
|
|
56
|
+
stop = start(set, update) || noop;
|
|
57
|
+
}
|
|
58
|
+
run(
|
|
59
|
+
/** @type {T} */
|
|
60
|
+
value
|
|
61
|
+
);
|
|
62
|
+
return () => {
|
|
63
|
+
subscribers.delete(subscriber);
|
|
64
|
+
if (subscribers.size === 0 && stop) {
|
|
65
|
+
stop();
|
|
66
|
+
stop = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return { set, update, subscribe };
|
|
71
|
+
}
|
|
72
|
+
function get(store2) {
|
|
73
|
+
let value;
|
|
74
|
+
subscribe_to_store(store2, (_) => value = _)();
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
let untracking = false;
|
|
78
|
+
function untrack(fn) {
|
|
79
|
+
var previous_untracking = untracking;
|
|
80
|
+
try {
|
|
81
|
+
untracking = true;
|
|
82
|
+
return fn();
|
|
83
|
+
} finally {
|
|
84
|
+
untracking = previous_untracking;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function store(defaultValue) {
|
|
88
|
+
const scope = {
|
|
89
|
+
get: (name) => {
|
|
90
|
+
return get(scope.store)[name];
|
|
91
|
+
},
|
|
92
|
+
set: (name, value) => {
|
|
93
|
+
if (typeof name === "string") {
|
|
94
|
+
Object.assign(get(scope.store), {
|
|
95
|
+
[name]: value
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
Object.assign(get(scope.store), name);
|
|
99
|
+
}
|
|
100
|
+
scope.store.set(get(scope.store));
|
|
101
|
+
},
|
|
102
|
+
store: writable(defaultValue)
|
|
103
|
+
};
|
|
104
|
+
return scope;
|
|
105
|
+
}
|
|
106
|
+
globalThis.$altcha = globalThis.$altcha || {
|
|
107
|
+
algorithms: /* @__PURE__ */ new Map(),
|
|
108
|
+
defaults: store({}),
|
|
109
|
+
i18n: store({}),
|
|
110
|
+
instances: /* @__PURE__ */ new Set(),
|
|
111
|
+
plugins: /* @__PURE__ */ new Set()
|
|
112
|
+
};
|
|
5
113
|
const i18n = {
|
|
6
114
|
ariaLinkLabel: "Altcha (lloc web oficial)",
|
|
7
115
|
enterCode: "Introdueix el codi",
|
|
@@ -21,7 +129,5 @@
|
|
|
21
129
|
cancel: "Cancel·la",
|
|
22
130
|
enterCodeFromImage: "Per continuar, si us plau, introdueix el codi de la imatge següent."
|
|
23
131
|
};
|
|
24
|
-
|
|
25
|
-
globalThis.$altcha.i18n.set("ca", i18n);
|
|
26
|
-
}
|
|
132
|
+
globalThis.$altcha.i18n.set("ca", i18n);
|
|
27
133
|
}));
|