@sme.up/ketchup2 2.0.0-SNAPSHOT-20250520081534 → 2.0.0-SNAPSHOT-20250520103841
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/basic-components/cell/cell-types.d.ts +2 -1
- package/dist/basic-components/cell/cell-types.d.ts.map +1 -1
- package/dist/components/field/field-types.d.ts +3 -3
- package/dist/components/field/field-types.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +11 -11
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +644 -649
- package/dist/types/legacy.d.ts +0 -2
- package/dist/types/legacy.d.ts.map +1 -1
- package/dist/utils/legacy.d.ts +1 -3
- package/dist/utils/legacy.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var be = (n, e, t) =>
|
|
1
|
+
var wr = Object.defineProperty;
|
|
2
|
+
var Or = (n, e, t) => e in n ? wr(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var be = (n, e, t) => Or(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import * as Me from "react";
|
|
5
|
-
import
|
|
5
|
+
import fr, { useState as Q, useCallback as Oe, useEffect as he, useRef as xe, useLayoutEffect as Tr, useId as Rr } from "react";
|
|
6
6
|
var Fe = { exports: {} }, Re = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
@@ -14,23 +14,23 @@ var Fe = { exports: {} }, Re = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var Ot;
|
|
17
|
-
function
|
|
17
|
+
function Dr() {
|
|
18
18
|
if (Ot) return Re;
|
|
19
19
|
Ot = 1;
|
|
20
20
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
21
|
-
function t(r, s,
|
|
22
|
-
var
|
|
23
|
-
if (
|
|
24
|
-
|
|
21
|
+
function t(r, s, a) {
|
|
22
|
+
var i = null;
|
|
23
|
+
if (a !== void 0 && (i = "" + a), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
24
|
+
a = {};
|
|
25
25
|
for (var o in s)
|
|
26
|
-
o !== "key" && (
|
|
27
|
-
} else
|
|
28
|
-
return s =
|
|
26
|
+
o !== "key" && (a[o] = s[o]);
|
|
27
|
+
} else a = s;
|
|
28
|
+
return s = a.ref, {
|
|
29
29
|
$$typeof: n,
|
|
30
30
|
type: r,
|
|
31
|
-
key:
|
|
31
|
+
key: i,
|
|
32
32
|
ref: s !== void 0 ? s : null,
|
|
33
|
-
props:
|
|
33
|
+
props: a
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
return Re.Fragment = e, Re.jsx = t, Re.jsxs = t, Re;
|
|
@@ -46,7 +46,7 @@ var De = {};
|
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
48
|
var Tt;
|
|
49
|
-
function
|
|
49
|
+
function Pr() {
|
|
50
50
|
return Tt || (Tt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
51
51
|
function n(d) {
|
|
52
52
|
if (d == null) return null;
|
|
@@ -126,10 +126,10 @@ function Ar() {
|
|
|
126
126
|
var d = M.A;
|
|
127
127
|
return d === null ? null : d.getOwner();
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function a() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function i(d) {
|
|
133
133
|
if (U.call(d, "key")) {
|
|
134
134
|
var m = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
135
135
|
if (m && m.isReactWarning) return !1;
|
|
@@ -217,7 +217,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
217
217
|
L
|
|
218
218
|
), k[L + _] = !0);
|
|
219
219
|
}
|
|
220
|
-
if (L = null, b !== void 0 && (t(b), L = "" + b),
|
|
220
|
+
if (L = null, b !== void 0 && (t(b), L = "" + b), i(m) && (t(m.key), L = "" + m.key), "key" in m) {
|
|
221
221
|
b = {};
|
|
222
222
|
for (var W in m)
|
|
223
223
|
W !== "key" && (b[W] = m[W]);
|
|
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
239
239
|
function u(d) {
|
|
240
240
|
typeof d == "object" && d !== null && d.$$typeof === h && d._store && (d._store.validated = 1);
|
|
241
241
|
}
|
|
242
|
-
var p =
|
|
242
|
+
var p = fr, h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), O = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), F = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), M = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, U = Object.prototype.hasOwnProperty, J = Array.isArray, K = console.createTask ? console.createTask : function() {
|
|
243
243
|
return null;
|
|
244
244
|
};
|
|
245
245
|
p = {
|
|
@@ -249,8 +249,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
};
|
|
250
250
|
var ne, z = {}, V = p["react-stack-bottom-frame"].bind(
|
|
251
251
|
p,
|
|
252
|
-
|
|
253
|
-
)(), B = K(r(
|
|
252
|
+
a
|
|
253
|
+
)(), B = K(r(a)), k = {};
|
|
254
254
|
De.Fragment = y, De.jsx = function(d, m, b, _, S) {
|
|
255
255
|
var T = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
256
256
|
return f(
|
|
@@ -279,11 +279,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
279
279
|
}()), De;
|
|
280
280
|
}
|
|
281
281
|
var Rt;
|
|
282
|
-
function
|
|
283
|
-
return Rt || (Rt = 1, process.env.NODE_ENV === "production" ? Fe.exports =
|
|
282
|
+
function Ar() {
|
|
283
|
+
return Rt || (Rt = 1, process.env.NODE_ENV === "production" ? Fe.exports = Dr() : Fe.exports = Pr()), Fe.exports;
|
|
284
284
|
}
|
|
285
|
-
var w =
|
|
286
|
-
function
|
|
285
|
+
var w = Ar();
|
|
286
|
+
function Cr(n, e) {
|
|
287
287
|
if (n == null) return {};
|
|
288
288
|
var t = {};
|
|
289
289
|
for (var r in n) if ({}.hasOwnProperty.call(n, r)) {
|
|
@@ -306,13 +306,13 @@ function gt(n, e) {
|
|
|
306
306
|
return t.__proto__ = r, t;
|
|
307
307
|
}, gt(n, e);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function Lr(n, e) {
|
|
310
310
|
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, gt(n, e);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
if (t || arguments.length === 2) for (var r = 0, s = e.length,
|
|
314
|
-
(
|
|
315
|
-
return n.concat(
|
|
312
|
+
function at(n, e, t) {
|
|
313
|
+
if (t || arguments.length === 2) for (var r = 0, s = e.length, a; r < s; r++)
|
|
314
|
+
(a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
|
|
315
|
+
return n.concat(a || Array.prototype.slice.call(e));
|
|
316
316
|
}
|
|
317
317
|
var Ve = {};
|
|
318
318
|
/*!
|
|
@@ -321,16 +321,16 @@ var Ve = {};
|
|
|
321
321
|
* MIT Licensed
|
|
322
322
|
*/
|
|
323
323
|
var Dt;
|
|
324
|
-
function
|
|
324
|
+
function kr() {
|
|
325
325
|
if (Dt) return Ve;
|
|
326
326
|
Dt = 1;
|
|
327
|
-
var n = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g, e = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/, t = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, r = /\\([\u000b\u0020-\u00ff])/g, s = /([\\"])/g,
|
|
328
|
-
Ve.format =
|
|
329
|
-
function
|
|
327
|
+
var n = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g, e = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/, t = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, r = /\\([\u000b\u0020-\u00ff])/g, s = /([\\"])/g, a = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
328
|
+
Ve.format = i, Ve.parse = o;
|
|
329
|
+
function i(u) {
|
|
330
330
|
if (!u || typeof u != "object")
|
|
331
331
|
throw new TypeError("argument obj is required");
|
|
332
332
|
var p = u.parameters, h = u.type;
|
|
333
|
-
if (!h || !
|
|
333
|
+
if (!h || !a.test(h))
|
|
334
334
|
throw new TypeError("invalid type");
|
|
335
335
|
var g = h;
|
|
336
336
|
if (p && typeof p == "object")
|
|
@@ -348,7 +348,7 @@ function $r() {
|
|
|
348
348
|
if (typeof p != "string")
|
|
349
349
|
throw new TypeError("argument string is required to be a string");
|
|
350
350
|
var h = p.indexOf(";"), g = h !== -1 ? p.slice(0, h).trim() : p.trim();
|
|
351
|
-
if (!
|
|
351
|
+
if (!a.test(g))
|
|
352
352
|
throw new TypeError("invalid media type");
|
|
353
353
|
var y = new f(g.toLowerCase());
|
|
354
354
|
if (h !== -1) {
|
|
@@ -382,21 +382,21 @@ function $r() {
|
|
|
382
382
|
}
|
|
383
383
|
return Ve;
|
|
384
384
|
}
|
|
385
|
-
var
|
|
385
|
+
var $r = kr(), we = /* @__PURE__ */ new Map(), dr = function(e) {
|
|
386
386
|
return e.cloneNode(!0);
|
|
387
387
|
}, Pt = function() {
|
|
388
388
|
return window.location.protocol === "file:";
|
|
389
|
-
},
|
|
389
|
+
}, pr = function(e, t, r) {
|
|
390
390
|
var s = new XMLHttpRequest();
|
|
391
391
|
s.onreadystatechange = function() {
|
|
392
392
|
try {
|
|
393
393
|
if (!/\.svg/i.test(e) && s.readyState === 2) {
|
|
394
|
-
var
|
|
395
|
-
if (!
|
|
394
|
+
var a = s.getResponseHeader("Content-Type");
|
|
395
|
+
if (!a)
|
|
396
396
|
throw new Error("Content type not found");
|
|
397
|
-
var
|
|
398
|
-
if (!(
|
|
399
|
-
throw new Error("Invalid content type: ".concat(
|
|
397
|
+
var i = $r.parse(a).type;
|
|
398
|
+
if (!(i === "image/svg+xml" || i === "text/plain"))
|
|
399
|
+
throw new Error("Invalid content type: ".concat(i));
|
|
400
400
|
}
|
|
401
401
|
if (s.readyState === 4) {
|
|
402
402
|
if (s.status === 404 || s.responseXML === null)
|
|
@@ -415,17 +415,17 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
415
415
|
}, s.open("GET", e), s.withCredentials = t, s.overrideMimeType && s.overrideMimeType("text/xml"), s.send();
|
|
416
416
|
}, ye = {}, At = function(e, t) {
|
|
417
417
|
ye[e] = ye[e] || [], ye[e].push(t);
|
|
418
|
-
},
|
|
419
|
-
for (var t = function(
|
|
418
|
+
}, jr = function(e) {
|
|
419
|
+
for (var t = function(i, o) {
|
|
420
420
|
setTimeout(function() {
|
|
421
421
|
if (Array.isArray(ye[e])) {
|
|
422
|
-
var l = we.get(e), c = ye[e][
|
|
423
|
-
l instanceof SVGSVGElement && c(null,
|
|
422
|
+
var l = we.get(e), c = ye[e][i];
|
|
423
|
+
l instanceof SVGSVGElement && c(null, dr(l)), l instanceof Error && c(l), i === ye[e].length - 1 && delete ye[e];
|
|
424
424
|
}
|
|
425
425
|
}, 0);
|
|
426
426
|
}, r = 0, s = ye[e].length; r < s; r++)
|
|
427
427
|
t(r);
|
|
428
|
-
},
|
|
428
|
+
}, Ir = function(e, t, r) {
|
|
429
429
|
if (we.has(e)) {
|
|
430
430
|
var s = we.get(e);
|
|
431
431
|
if (s === void 0) {
|
|
@@ -433,22 +433,22 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
435
435
|
if (s instanceof SVGSVGElement) {
|
|
436
|
-
r(null,
|
|
436
|
+
r(null, dr(s));
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
we.set(e, void 0), At(e, r),
|
|
440
|
+
we.set(e, void 0), At(e, r), pr(e, t, function(a, i) {
|
|
441
441
|
var o;
|
|
442
|
-
|
|
442
|
+
a ? we.set(e, a) : ((o = i.responseXML) === null || o === void 0 ? void 0 : o.documentElement) instanceof SVGSVGElement && we.set(e, i.responseXML.documentElement), jr(e);
|
|
443
443
|
});
|
|
444
|
-
},
|
|
445
|
-
|
|
446
|
-
var
|
|
447
|
-
s ? r(s) : ((
|
|
444
|
+
}, Nr = function(e, t, r) {
|
|
445
|
+
pr(e, t, function(s, a) {
|
|
446
|
+
var i;
|
|
447
|
+
s ? r(s) : ((i = a.responseXML) === null || i === void 0 ? void 0 : i.documentElement) instanceof SVGSVGElement && r(null, a.responseXML.documentElement);
|
|
448
448
|
});
|
|
449
|
-
},
|
|
450
|
-
return ++
|
|
451
|
-
}, fe = [], Ct = {},
|
|
449
|
+
}, Mr = 0, Fr = function() {
|
|
450
|
+
return ++Mr;
|
|
451
|
+
}, fe = [], Ct = {}, Vr = "http://www.w3.org/2000/svg", it = "http://www.w3.org/1999/xlink", Lt = function(e, t, r, s, a, i, o) {
|
|
452
452
|
var l = e.getAttribute("data-src") || e.getAttribute("src");
|
|
453
453
|
if (!l) {
|
|
454
454
|
o(new Error("Invalid data-src or src attribute"));
|
|
@@ -459,8 +459,8 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
fe.push(e), e.setAttribute("src", "");
|
|
462
|
-
var c = s ?
|
|
463
|
-
c(l,
|
|
462
|
+
var c = s ? Ir : Nr;
|
|
463
|
+
c(l, a, function(f, u) {
|
|
464
464
|
if (!u) {
|
|
465
465
|
fe.splice(fe.indexOf(e), 1), e = null, o(f);
|
|
466
466
|
return;
|
|
@@ -473,7 +473,7 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
473
473
|
g && u.setAttribute("width", g);
|
|
474
474
|
var y = e.getAttribute("height");
|
|
475
475
|
y && u.setAttribute("height", y);
|
|
476
|
-
var E = Array.from(new Set(
|
|
476
|
+
var E = Array.from(new Set(at(at(at([], (u.getAttribute("class") || "").split(" "), !0), ["injected-svg"], !1), (e.getAttribute("class") || "").split(" "), !0))).join(" ").trim();
|
|
477
477
|
u.setAttribute("class", E);
|
|
478
478
|
var R = e.getAttribute("style");
|
|
479
479
|
R && u.setAttribute("style", R), u.setAttribute("data-src", l);
|
|
@@ -498,7 +498,7 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
498
498
|
Object.keys(O).forEach(function(B) {
|
|
499
499
|
D = B, A = O[B], v = u.querySelectorAll(D + "[id]");
|
|
500
500
|
for (var k = function(_, S) {
|
|
501
|
-
j = v[_].id, Y = j + "-" +
|
|
501
|
+
j = v[_].id, Y = j + "-" + Fr();
|
|
502
502
|
var T;
|
|
503
503
|
Array.prototype.forEach.call(A, function(N) {
|
|
504
504
|
T = u.querySelectorAll("[" + N + '*="' + j + '"]');
|
|
@@ -508,11 +508,11 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
510
|
for (var $ = u.querySelectorAll("[*|href]"), I = [], L = 0, q = $.length; L < q; L++) {
|
|
511
|
-
var W = $[L].getAttributeNS(
|
|
511
|
+
var W = $[L].getAttributeNS(it, "href");
|
|
512
512
|
W && W.toString() === "#" + v[_].id && I.push($[L]);
|
|
513
513
|
}
|
|
514
514
|
for (var re = 0, P = I.length; re < P; re++)
|
|
515
|
-
I[re].setAttributeNS(
|
|
515
|
+
I[re].setAttributeNS(it, "href", "#" + Y);
|
|
516
516
|
v[_].id = Y;
|
|
517
517
|
}, d = 0, m = v.length; d < m; d++)
|
|
518
518
|
k(d);
|
|
@@ -529,25 +529,25 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
529
529
|
var V = u.querySelectorAll("style");
|
|
530
530
|
if (Array.prototype.forEach.call(V, function(B) {
|
|
531
531
|
B.textContent += "";
|
|
532
|
-
}), u.setAttribute("xmlns",
|
|
532
|
+
}), u.setAttribute("xmlns", Vr), u.setAttribute("xmlns:xlink", it), i(u), !e.parentNode) {
|
|
533
533
|
fe.splice(fe.indexOf(e), 1), e = null, o(new Error("Parent node is null"));
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
536
536
|
e.parentNode.replaceChild(u, e), fe.splice(fe.indexOf(e), 1), e = null, o(null, u);
|
|
537
537
|
});
|
|
538
|
-
},
|
|
539
|
-
var r = t === void 0 ? {} : t, s = r.afterAll,
|
|
540
|
-
} : s,
|
|
541
|
-
} :
|
|
538
|
+
}, Yr = function(e, t) {
|
|
539
|
+
var r = t === void 0 ? {} : t, s = r.afterAll, a = s === void 0 ? function() {
|
|
540
|
+
} : s, i = r.afterEach, o = i === void 0 ? function() {
|
|
541
|
+
} : i, l = r.beforeEach, c = l === void 0 ? function() {
|
|
542
542
|
} : l, f = r.cacheRequests, u = f === void 0 ? !0 : f, p = r.evalScripts, h = p === void 0 ? "never" : p, g = r.httpRequestWithCredentials, y = g === void 0 ? !1 : g, E = r.renumerateIRIElements, R = E === void 0 ? !0 : E;
|
|
543
543
|
if (e && "length" in e)
|
|
544
544
|
for (var x = 0, O = 0, D = e.length; O < D; O++)
|
|
545
545
|
Lt(e[O], h, R, u, y, c, function(v, A) {
|
|
546
|
-
o(v, A), e && "length" in e && e.length === ++x &&
|
|
546
|
+
o(v, A), e && "length" in e && e.length === ++x && a(x);
|
|
547
547
|
});
|
|
548
548
|
else e ? Lt(e, h, R, u, y, c, function(v, A) {
|
|
549
|
-
o(v, A),
|
|
550
|
-
}) :
|
|
549
|
+
o(v, A), a(1), e = null;
|
|
550
|
+
}) : a(0);
|
|
551
551
|
}, Ye = { exports: {} }, Ue = { exports: {} }, X = {};
|
|
552
552
|
/** @license React v16.13.1
|
|
553
553
|
* react-is.production.min.js
|
|
@@ -558,10 +558,10 @@ var jr = $r(), we = /* @__PURE__ */ new Map(), pr = function(e) {
|
|
|
558
558
|
* LICENSE file in the root directory of this source tree.
|
|
559
559
|
*/
|
|
560
560
|
var kt;
|
|
561
|
-
function
|
|
561
|
+
function Ur() {
|
|
562
562
|
if (kt) return X;
|
|
563
563
|
kt = 1;
|
|
564
|
-
var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, r = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108,
|
|
564
|
+
var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, r = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, a = n ? Symbol.for("react.profiler") : 60114, i = n ? Symbol.for("react.provider") : 60109, o = n ? Symbol.for("react.context") : 60110, l = n ? Symbol.for("react.async_mode") : 60111, c = n ? Symbol.for("react.concurrent_mode") : 60111, f = n ? Symbol.for("react.forward_ref") : 60112, u = n ? Symbol.for("react.suspense") : 60113, p = n ? Symbol.for("react.suspense_list") : 60120, h = n ? Symbol.for("react.memo") : 60115, g = n ? Symbol.for("react.lazy") : 60116, y = n ? Symbol.for("react.block") : 60121, E = n ? Symbol.for("react.fundamental") : 60117, R = n ? Symbol.for("react.responder") : 60118, x = n ? Symbol.for("react.scope") : 60119;
|
|
565
565
|
function O(v) {
|
|
566
566
|
if (typeof v == "object" && v !== null) {
|
|
567
567
|
var A = v.$$typeof;
|
|
@@ -571,7 +571,7 @@ function Wr() {
|
|
|
571
571
|
case l:
|
|
572
572
|
case c:
|
|
573
573
|
case r:
|
|
574
|
-
case
|
|
574
|
+
case a:
|
|
575
575
|
case s:
|
|
576
576
|
case u:
|
|
577
577
|
return v;
|
|
@@ -581,7 +581,7 @@ function Wr() {
|
|
|
581
581
|
case f:
|
|
582
582
|
case g:
|
|
583
583
|
case h:
|
|
584
|
-
case
|
|
584
|
+
case i:
|
|
585
585
|
return v;
|
|
586
586
|
default:
|
|
587
587
|
return A;
|
|
@@ -595,12 +595,12 @@ function Wr() {
|
|
|
595
595
|
function D(v) {
|
|
596
596
|
return O(v) === c;
|
|
597
597
|
}
|
|
598
|
-
return X.AsyncMode = l, X.ConcurrentMode = c, X.ContextConsumer = o, X.ContextProvider =
|
|
598
|
+
return X.AsyncMode = l, X.ConcurrentMode = c, X.ContextConsumer = o, X.ContextProvider = i, X.Element = e, X.ForwardRef = f, X.Fragment = r, X.Lazy = g, X.Memo = h, X.Portal = t, X.Profiler = a, X.StrictMode = s, X.Suspense = u, X.isAsyncMode = function(v) {
|
|
599
599
|
return D(v) || O(v) === l;
|
|
600
600
|
}, X.isConcurrentMode = D, X.isContextConsumer = function(v) {
|
|
601
601
|
return O(v) === o;
|
|
602
602
|
}, X.isContextProvider = function(v) {
|
|
603
|
-
return O(v) ===
|
|
603
|
+
return O(v) === i;
|
|
604
604
|
}, X.isElement = function(v) {
|
|
605
605
|
return typeof v == "object" && v !== null && v.$$typeof === e;
|
|
606
606
|
}, X.isForwardRef = function(v) {
|
|
@@ -614,13 +614,13 @@ function Wr() {
|
|
|
614
614
|
}, X.isPortal = function(v) {
|
|
615
615
|
return O(v) === t;
|
|
616
616
|
}, X.isProfiler = function(v) {
|
|
617
|
-
return O(v) ===
|
|
617
|
+
return O(v) === a;
|
|
618
618
|
}, X.isStrictMode = function(v) {
|
|
619
619
|
return O(v) === s;
|
|
620
620
|
}, X.isSuspense = function(v) {
|
|
621
621
|
return O(v) === u;
|
|
622
622
|
}, X.isValidElementType = function(v) {
|
|
623
|
-
return typeof v == "string" || typeof v == "function" || v === r || v === c || v ===
|
|
623
|
+
return typeof v == "string" || typeof v == "function" || v === r || v === c || v === a || v === s || v === u || v === p || typeof v == "object" && v !== null && (v.$$typeof === g || v.$$typeof === h || v.$$typeof === i || v.$$typeof === o || v.$$typeof === f || v.$$typeof === E || v.$$typeof === R || v.$$typeof === x || v.$$typeof === y);
|
|
624
624
|
}, X.typeOf = O, X;
|
|
625
625
|
}
|
|
626
626
|
var Z = {};
|
|
@@ -633,12 +633,12 @@ var Z = {};
|
|
|
633
633
|
* LICENSE file in the root directory of this source tree.
|
|
634
634
|
*/
|
|
635
635
|
var $t;
|
|
636
|
-
function
|
|
636
|
+
function Wr() {
|
|
637
637
|
return $t || ($t = 1, process.env.NODE_ENV !== "production" && function() {
|
|
638
|
-
var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, r = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108,
|
|
638
|
+
var n = typeof Symbol == "function" && Symbol.for, e = n ? Symbol.for("react.element") : 60103, t = n ? Symbol.for("react.portal") : 60106, r = n ? Symbol.for("react.fragment") : 60107, s = n ? Symbol.for("react.strict_mode") : 60108, a = n ? Symbol.for("react.profiler") : 60114, i = n ? Symbol.for("react.provider") : 60109, o = n ? Symbol.for("react.context") : 60110, l = n ? Symbol.for("react.async_mode") : 60111, c = n ? Symbol.for("react.concurrent_mode") : 60111, f = n ? Symbol.for("react.forward_ref") : 60112, u = n ? Symbol.for("react.suspense") : 60113, p = n ? Symbol.for("react.suspense_list") : 60120, h = n ? Symbol.for("react.memo") : 60115, g = n ? Symbol.for("react.lazy") : 60116, y = n ? Symbol.for("react.block") : 60121, E = n ? Symbol.for("react.fundamental") : 60117, R = n ? Symbol.for("react.responder") : 60118, x = n ? Symbol.for("react.scope") : 60119;
|
|
639
639
|
function O(P) {
|
|
640
640
|
return typeof P == "string" || typeof P == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
641
|
-
P === r || P === c || P ===
|
|
641
|
+
P === r || P === c || P === a || P === s || P === u || P === p || typeof P == "object" && P !== null && (P.$$typeof === g || P.$$typeof === h || P.$$typeof === i || P.$$typeof === o || P.$$typeof === f || P.$$typeof === E || P.$$typeof === R || P.$$typeof === x || P.$$typeof === y);
|
|
642
642
|
}
|
|
643
643
|
function D(P) {
|
|
644
644
|
if (typeof P == "object" && P !== null) {
|
|
@@ -650,7 +650,7 @@ function Hr() {
|
|
|
650
650
|
case l:
|
|
651
651
|
case c:
|
|
652
652
|
case r:
|
|
653
|
-
case
|
|
653
|
+
case a:
|
|
654
654
|
case s:
|
|
655
655
|
case u:
|
|
656
656
|
return G;
|
|
@@ -661,7 +661,7 @@ function Hr() {
|
|
|
661
661
|
case f:
|
|
662
662
|
case g:
|
|
663
663
|
case h:
|
|
664
|
-
case
|
|
664
|
+
case i:
|
|
665
665
|
return ee;
|
|
666
666
|
default:
|
|
667
667
|
return N;
|
|
@@ -672,7 +672,7 @@ function Hr() {
|
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
|
-
var v = l, A = c, j = o, Y =
|
|
675
|
+
var v = l, A = c, j = o, Y = i, F = e, C = f, M = r, U = g, J = h, K = t, ne = a, z = s, V = u, B = !1;
|
|
676
676
|
function k(P) {
|
|
677
677
|
return B || (B = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), d(P) || D(P) === l;
|
|
678
678
|
}
|
|
@@ -683,7 +683,7 @@ function Hr() {
|
|
|
683
683
|
return D(P) === o;
|
|
684
684
|
}
|
|
685
685
|
function b(P) {
|
|
686
|
-
return D(P) ===
|
|
686
|
+
return D(P) === i;
|
|
687
687
|
}
|
|
688
688
|
function _(P) {
|
|
689
689
|
return typeof P == "object" && P !== null && P.$$typeof === e;
|
|
@@ -704,7 +704,7 @@ function Hr() {
|
|
|
704
704
|
return D(P) === t;
|
|
705
705
|
}
|
|
706
706
|
function q(P) {
|
|
707
|
-
return D(P) ===
|
|
707
|
+
return D(P) === a;
|
|
708
708
|
}
|
|
709
709
|
function W(P) {
|
|
710
710
|
return D(P) === s;
|
|
@@ -716,8 +716,8 @@ function Hr() {
|
|
|
716
716
|
}()), Z;
|
|
717
717
|
}
|
|
718
718
|
var jt;
|
|
719
|
-
function
|
|
720
|
-
return jt || (jt = 1, process.env.NODE_ENV === "production" ? Ue.exports =
|
|
719
|
+
function hr() {
|
|
720
|
+
return jt || (jt = 1, process.env.NODE_ENV === "production" ? Ue.exports = Ur() : Ue.exports = Wr()), Ue.exports;
|
|
721
721
|
}
|
|
722
722
|
/*
|
|
723
723
|
object-assign
|
|
@@ -725,26 +725,26 @@ object-assign
|
|
|
725
725
|
@license MIT
|
|
726
726
|
*/
|
|
727
727
|
var ot, It;
|
|
728
|
-
function
|
|
728
|
+
function Hr() {
|
|
729
729
|
if (It) return ot;
|
|
730
730
|
It = 1;
|
|
731
731
|
var n = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
732
|
-
function r(
|
|
733
|
-
if (
|
|
732
|
+
function r(a) {
|
|
733
|
+
if (a == null)
|
|
734
734
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
735
|
-
return Object(
|
|
735
|
+
return Object(a);
|
|
736
736
|
}
|
|
737
737
|
function s() {
|
|
738
738
|
try {
|
|
739
739
|
if (!Object.assign)
|
|
740
740
|
return !1;
|
|
741
|
-
var
|
|
742
|
-
if (
|
|
741
|
+
var a = new String("abc");
|
|
742
|
+
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
|
|
743
743
|
return !1;
|
|
744
|
-
for (var
|
|
745
|
-
|
|
746
|
-
var l = Object.getOwnPropertyNames(
|
|
747
|
-
return
|
|
744
|
+
for (var i = {}, o = 0; o < 10; o++)
|
|
745
|
+
i["_" + String.fromCharCode(o)] = o;
|
|
746
|
+
var l = Object.getOwnPropertyNames(i).map(function(f) {
|
|
747
|
+
return i[f];
|
|
748
748
|
});
|
|
749
749
|
if (l.join("") !== "0123456789")
|
|
750
750
|
return !1;
|
|
@@ -756,8 +756,8 @@ function qr() {
|
|
|
756
756
|
return !1;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
return ot = s() ? Object.assign : function(
|
|
760
|
-
for (var o, l = r(
|
|
759
|
+
return ot = s() ? Object.assign : function(a, i) {
|
|
760
|
+
for (var o, l = r(a), c, f = 1; f < arguments.length; f++) {
|
|
761
761
|
o = Object(arguments[f]);
|
|
762
762
|
for (var u in o)
|
|
763
763
|
e.call(o, u) && (l[u] = o[u]);
|
|
@@ -778,39 +778,39 @@ function St() {
|
|
|
778
778
|
return lt = n, lt;
|
|
779
779
|
}
|
|
780
780
|
var ct, Mt;
|
|
781
|
-
function
|
|
781
|
+
function mr() {
|
|
782
782
|
return Mt || (Mt = 1, ct = Function.call.bind(Object.prototype.hasOwnProperty)), ct;
|
|
783
783
|
}
|
|
784
784
|
var ut, Ft;
|
|
785
|
-
function
|
|
785
|
+
function qr() {
|
|
786
786
|
if (Ft) return ut;
|
|
787
787
|
Ft = 1;
|
|
788
788
|
var n = function() {
|
|
789
789
|
};
|
|
790
790
|
if (process.env.NODE_ENV !== "production") {
|
|
791
|
-
var e = /* @__PURE__ */ St(), t = {}, r = /* @__PURE__ */
|
|
792
|
-
n = function(
|
|
793
|
-
var
|
|
794
|
-
typeof console < "u" && console.error(
|
|
791
|
+
var e = /* @__PURE__ */ St(), t = {}, r = /* @__PURE__ */ mr();
|
|
792
|
+
n = function(a) {
|
|
793
|
+
var i = "Warning: " + a;
|
|
794
|
+
typeof console < "u" && console.error(i);
|
|
795
795
|
try {
|
|
796
|
-
throw new Error(
|
|
796
|
+
throw new Error(i);
|
|
797
797
|
} catch {
|
|
798
798
|
}
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
|
-
function s(
|
|
801
|
+
function s(a, i, o, l, c) {
|
|
802
802
|
if (process.env.NODE_ENV !== "production") {
|
|
803
|
-
for (var f in
|
|
804
|
-
if (r(
|
|
803
|
+
for (var f in a)
|
|
804
|
+
if (r(a, f)) {
|
|
805
805
|
var u;
|
|
806
806
|
try {
|
|
807
|
-
if (typeof
|
|
807
|
+
if (typeof a[f] != "function") {
|
|
808
808
|
var p = Error(
|
|
809
|
-
(l || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
809
|
+
(l || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
810
810
|
);
|
|
811
811
|
throw p.name = "Invariant Violation", p;
|
|
812
812
|
}
|
|
813
|
-
u =
|
|
813
|
+
u = a[f](i, f, l, o, null, e);
|
|
814
814
|
} catch (g) {
|
|
815
815
|
u = g;
|
|
816
816
|
}
|
|
@@ -831,12 +831,12 @@ function Kr() {
|
|
|
831
831
|
}, ut = s, ut;
|
|
832
832
|
}
|
|
833
833
|
var ft, Vt;
|
|
834
|
-
function
|
|
834
|
+
function Kr() {
|
|
835
835
|
if (Vt) return ft;
|
|
836
836
|
Vt = 1;
|
|
837
|
-
var n =
|
|
837
|
+
var n = hr(), e = Hr(), t = /* @__PURE__ */ St(), r = /* @__PURE__ */ mr(), s = /* @__PURE__ */ qr(), a = function() {
|
|
838
838
|
};
|
|
839
|
-
process.env.NODE_ENV !== "production" && (
|
|
839
|
+
process.env.NODE_ENV !== "production" && (a = function(o) {
|
|
840
840
|
var l = "Warning: " + o;
|
|
841
841
|
typeof console < "u" && console.error(l);
|
|
842
842
|
try {
|
|
@@ -844,7 +844,7 @@ function Br() {
|
|
|
844
844
|
} catch {
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
|
-
function
|
|
847
|
+
function i() {
|
|
848
848
|
return null;
|
|
849
849
|
}
|
|
850
850
|
return ft = function(o, l) {
|
|
@@ -895,7 +895,7 @@ function Br() {
|
|
|
895
895
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
896
896
|
var N = L + ":" + I;
|
|
897
897
|
!m[N] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
898
|
-
b < 3 && (
|
|
898
|
+
b < 3 && (a(
|
|
899
899
|
"You are manually calling a React.PropTypes validation function for the `" + W + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
900
900
|
), m[N] = !0, b++);
|
|
901
901
|
}
|
|
@@ -920,7 +920,7 @@ function Br() {
|
|
|
920
920
|
return E(m);
|
|
921
921
|
}
|
|
922
922
|
function x() {
|
|
923
|
-
return E(
|
|
923
|
+
return E(i);
|
|
924
924
|
}
|
|
925
925
|
function O(d) {
|
|
926
926
|
function m(b, _, S, T, $) {
|
|
@@ -974,9 +974,9 @@ function Br() {
|
|
|
974
974
|
}
|
|
975
975
|
function j(d) {
|
|
976
976
|
if (!Array.isArray(d))
|
|
977
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
977
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
978
978
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
979
|
-
) :
|
|
979
|
+
) : a("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
980
980
|
function m(b, _, S, T, $) {
|
|
981
981
|
for (var I = b[_], L = 0; L < d.length; L++)
|
|
982
982
|
if (g(I, d[L]))
|
|
@@ -1008,13 +1008,13 @@ function Br() {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
function F(d) {
|
|
1010
1010
|
if (!Array.isArray(d))
|
|
1011
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1011
|
+
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), i;
|
|
1012
1012
|
for (var m = 0; m < d.length; m++) {
|
|
1013
1013
|
var b = d[m];
|
|
1014
1014
|
if (typeof b != "function")
|
|
1015
|
-
return
|
|
1015
|
+
return a(
|
|
1016
1016
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + B(b) + " at index " + m + "."
|
|
1017
|
-
),
|
|
1017
|
+
), i;
|
|
1018
1018
|
}
|
|
1019
1019
|
function _(S, T, $, I, L) {
|
|
1020
1020
|
for (var q = [], W = 0; W < d.length; W++) {
|
|
@@ -1152,7 +1152,7 @@ Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
|
|
|
1152
1152
|
}, ft;
|
|
1153
1153
|
}
|
|
1154
1154
|
var dt, Yt;
|
|
1155
|
-
function
|
|
1155
|
+
function Br() {
|
|
1156
1156
|
if (Yt) return dt;
|
|
1157
1157
|
Yt = 1;
|
|
1158
1158
|
var n = /* @__PURE__ */ St();
|
|
@@ -1161,7 +1161,7 @@ function Gr() {
|
|
|
1161
1161
|
function t() {
|
|
1162
1162
|
}
|
|
1163
1163
|
return t.resetWarningCache = e, dt = function() {
|
|
1164
|
-
function r(
|
|
1164
|
+
function r(i, o, l, c, f, u) {
|
|
1165
1165
|
if (u !== n) {
|
|
1166
1166
|
var p = new Error(
|
|
1167
1167
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1173,7 +1173,7 @@ function Gr() {
|
|
|
1173
1173
|
function s() {
|
|
1174
1174
|
return r;
|
|
1175
1175
|
}
|
|
1176
|
-
var
|
|
1176
|
+
var a = {
|
|
1177
1177
|
array: r,
|
|
1178
1178
|
bigint: r,
|
|
1179
1179
|
bool: r,
|
|
@@ -1196,23 +1196,23 @@ function Gr() {
|
|
|
1196
1196
|
checkPropTypes: t,
|
|
1197
1197
|
resetWarningCache: e
|
|
1198
1198
|
};
|
|
1199
|
-
return
|
|
1199
|
+
return a.PropTypes = a, a;
|
|
1200
1200
|
}, dt;
|
|
1201
1201
|
}
|
|
1202
1202
|
var Ut;
|
|
1203
|
-
function
|
|
1203
|
+
function Gr() {
|
|
1204
1204
|
if (Ut) return Ye.exports;
|
|
1205
1205
|
if (Ut = 1, process.env.NODE_ENV !== "production") {
|
|
1206
|
-
var n =
|
|
1207
|
-
Ye.exports = /* @__PURE__ */
|
|
1206
|
+
var n = hr(), e = !0;
|
|
1207
|
+
Ye.exports = /* @__PURE__ */ Kr()(n.isElement, e);
|
|
1208
1208
|
} else
|
|
1209
|
-
Ye.exports = /* @__PURE__ */
|
|
1209
|
+
Ye.exports = /* @__PURE__ */ Br()();
|
|
1210
1210
|
return Ye.exports;
|
|
1211
1211
|
}
|
|
1212
|
-
var
|
|
1212
|
+
var ae = /* @__PURE__ */ Gr(), zr = function(e) {
|
|
1213
1213
|
var t = (e == null ? void 0 : e.ownerDocument) || document;
|
|
1214
1214
|
return t.defaultView || window;
|
|
1215
|
-
},
|
|
1215
|
+
}, Jr = function(e, t) {
|
|
1216
1216
|
for (var r in e)
|
|
1217
1217
|
if (!(r in t))
|
|
1218
1218
|
return !0;
|
|
@@ -1220,23 +1220,23 @@ var ie = /* @__PURE__ */ zr(), Jr = function(e) {
|
|
|
1220
1220
|
if (e[s] !== t[s])
|
|
1221
1221
|
return !0;
|
|
1222
1222
|
return !1;
|
|
1223
|
-
},
|
|
1223
|
+
}, Xr = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], We = "http://www.w3.org/2000/svg", Wt = "http://www.w3.org/1999/xlink", Ge = /* @__PURE__ */ function(n) {
|
|
1224
1224
|
function e() {
|
|
1225
|
-
for (var r, s = arguments.length,
|
|
1226
|
-
i
|
|
1227
|
-
return r = n.call.apply(n, [this].concat(
|
|
1225
|
+
for (var r, s = arguments.length, a = new Array(s), i = 0; i < s; i++)
|
|
1226
|
+
a[i] = arguments[i];
|
|
1227
|
+
return r = n.call.apply(n, [this].concat(a)) || this, r.initialState = {
|
|
1228
1228
|
hasError: !1,
|
|
1229
1229
|
isLoading: !0
|
|
1230
1230
|
}, r.state = r.initialState, r._isMounted = !1, r.reactWrapper = void 0, r.nonReactWrapper = void 0, r.refCallback = function(o) {
|
|
1231
1231
|
r.reactWrapper = o;
|
|
1232
1232
|
}, r;
|
|
1233
1233
|
}
|
|
1234
|
-
|
|
1234
|
+
Lr(e, n);
|
|
1235
1235
|
var t = e.prototype;
|
|
1236
1236
|
return t.renderSVG = function() {
|
|
1237
1237
|
var s = this;
|
|
1238
|
-
if (this.reactWrapper instanceof
|
|
1239
|
-
var
|
|
1238
|
+
if (this.reactWrapper instanceof zr(this.reactWrapper).Node) {
|
|
1239
|
+
var a = this.props, i = a.desc, o = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, f = a.src, u = a.title, p = a.useRequestCache, h = this.props.onError, g = this.props.beforeInjection, y = this.props.afterInjection, E = this.props.wrapper, R, x;
|
|
1240
1240
|
E === "svg" ? (R = document.createElementNS(We, E), R.setAttribute("xmlns", We), R.setAttribute("xmlns:xlink", Wt), x = document.createElementNS(We, E)) : (R = document.createElement(E), x = document.createElement(E)), R.appendChild(x), x.dataset.src = f, this.nonReactWrapper = this.reactWrapper.appendChild(R);
|
|
1241
1241
|
var O = function(j) {
|
|
1242
1242
|
if (s.removeSVG(), !s._isMounted) {
|
|
@@ -1268,11 +1268,11 @@ var ie = /* @__PURE__ */ zr(), Jr = function(e) {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
});
|
|
1270
1270
|
}, v = function(j) {
|
|
1271
|
-
if (j.setAttribute("role", "img"),
|
|
1271
|
+
if (j.setAttribute("role", "img"), i) {
|
|
1272
1272
|
var Y = j.querySelector(":scope > desc");
|
|
1273
1273
|
Y && j.removeChild(Y);
|
|
1274
1274
|
var F = document.createElement("desc");
|
|
1275
|
-
F.innerHTML =
|
|
1275
|
+
F.innerHTML = i, j.prepend(F);
|
|
1276
1276
|
}
|
|
1277
1277
|
if (u) {
|
|
1278
1278
|
var C = j.querySelector(":scope > title");
|
|
@@ -1286,7 +1286,7 @@ var ie = /* @__PURE__ */ zr(), Jr = function(e) {
|
|
|
1286
1286
|
O(U);
|
|
1287
1287
|
}
|
|
1288
1288
|
};
|
|
1289
|
-
|
|
1289
|
+
Yr(x, {
|
|
1290
1290
|
afterEach: D,
|
|
1291
1291
|
beforeEach: v,
|
|
1292
1292
|
cacheRequests: p,
|
|
@@ -1301,28 +1301,28 @@ var ie = /* @__PURE__ */ zr(), Jr = function(e) {
|
|
|
1301
1301
|
}, t.componentDidMount = function() {
|
|
1302
1302
|
this._isMounted = !0, this.renderSVG();
|
|
1303
1303
|
}, t.componentDidUpdate = function(s) {
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1306
|
-
return
|
|
1304
|
+
var a = this;
|
|
1305
|
+
Jr(Be({}, s), this.props) && this.setState(function() {
|
|
1306
|
+
return a.initialState;
|
|
1307
1307
|
}, function() {
|
|
1308
|
-
|
|
1308
|
+
a.removeSVG(), a.renderSVG();
|
|
1309
1309
|
});
|
|
1310
1310
|
}, t.componentWillUnmount = function() {
|
|
1311
1311
|
this._isMounted = !1, this.removeSVG();
|
|
1312
1312
|
}, t.render = function() {
|
|
1313
1313
|
var s = this.props;
|
|
1314
1314
|
s.afterInjection, s.beforeInjection, s.desc, s.evalScripts;
|
|
1315
|
-
var
|
|
1315
|
+
var a = s.fallback;
|
|
1316
1316
|
s.httpRequestWithCredentials;
|
|
1317
|
-
var
|
|
1317
|
+
var i = s.loading;
|
|
1318
1318
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1319
|
-
var o = s.wrapper, l =
|
|
1319
|
+
var o = s.wrapper, l = Cr(s, Xr), c = o;
|
|
1320
1320
|
return /* @__PURE__ */ Me.createElement(c, Be({}, l, {
|
|
1321
1321
|
ref: this.refCallback
|
|
1322
1322
|
}, o === "svg" ? {
|
|
1323
1323
|
xmlns: We,
|
|
1324
1324
|
xmlnsXlink: Wt
|
|
1325
|
-
} : {}), this.state.isLoading &&
|
|
1325
|
+
} : {}), this.state.isLoading && i && /* @__PURE__ */ Me.createElement(i, null), this.state.hasError && a && /* @__PURE__ */ Me.createElement(a, null));
|
|
1326
1326
|
}, e;
|
|
1327
1327
|
}(Me.Component);
|
|
1328
1328
|
Ge.defaultProps = {
|
|
@@ -1343,19 +1343,19 @@ Ge.defaultProps = {
|
|
|
1343
1343
|
wrapper: "div"
|
|
1344
1344
|
};
|
|
1345
1345
|
Ge.propTypes = {
|
|
1346
|
-
afterInjection:
|
|
1347
|
-
beforeInjection:
|
|
1348
|
-
desc:
|
|
1349
|
-
evalScripts:
|
|
1350
|
-
fallback:
|
|
1351
|
-
httpRequestWithCredentials:
|
|
1352
|
-
loading:
|
|
1353
|
-
onError:
|
|
1354
|
-
renumerateIRIElements:
|
|
1355
|
-
src:
|
|
1356
|
-
title:
|
|
1357
|
-
useRequestCache:
|
|
1358
|
-
wrapper:
|
|
1346
|
+
afterInjection: ae.func,
|
|
1347
|
+
beforeInjection: ae.func,
|
|
1348
|
+
desc: ae.string,
|
|
1349
|
+
evalScripts: ae.oneOf(["always", "once", "never"]),
|
|
1350
|
+
fallback: ae.oneOfType([ae.func, ae.object, ae.string]),
|
|
1351
|
+
httpRequestWithCredentials: ae.bool,
|
|
1352
|
+
loading: ae.oneOfType([ae.func, ae.object, ae.string]),
|
|
1353
|
+
onError: ae.func,
|
|
1354
|
+
renumerateIRIElements: ae.bool,
|
|
1355
|
+
src: ae.string.isRequired,
|
|
1356
|
+
title: ae.string,
|
|
1357
|
+
useRequestCache: ae.bool,
|
|
1358
|
+
wrapper: ae.oneOf(["div", "span", "svg"])
|
|
1359
1359
|
};
|
|
1360
1360
|
const Pe = {
|
|
1361
1361
|
"smp-icon": "_smp-icon_ttsft_1",
|
|
@@ -1372,17 +1372,17 @@ let yt = {
|
|
|
1372
1372
|
assets: "/"
|
|
1373
1373
|
// Default for storybook isolation development
|
|
1374
1374
|
};
|
|
1375
|
-
const
|
|
1375
|
+
const ns = (n) => {
|
|
1376
1376
|
yt = { ...yt, ...n };
|
|
1377
|
-
}, Ht = (n) => `${yt.assets}/${n}`.replace(/\/+/g, "/"), ve =
|
|
1377
|
+
}, Ht = (n) => `${yt.assets}/${n}`.replace(/\/+/g, "/"), ve = fr.memo(
|
|
1378
1378
|
({
|
|
1379
1379
|
icon: n,
|
|
1380
1380
|
width: e,
|
|
1381
1381
|
height: t,
|
|
1382
1382
|
placeholderIcon: r,
|
|
1383
1383
|
color: s,
|
|
1384
|
-
disabled:
|
|
1385
|
-
state:
|
|
1384
|
+
disabled: a,
|
|
1385
|
+
state: i = "base",
|
|
1386
1386
|
rotated: o = !1,
|
|
1387
1387
|
onClick: l,
|
|
1388
1388
|
isInteractable: c = !1,
|
|
@@ -1391,9 +1391,9 @@ const ss = (n) => {
|
|
|
1391
1391
|
const [u, p] = Q(n), h = n.indexOf(".") > -1 || n.indexOf("/") > -1 || n.indexOf("\\") > -1, g = Ht(`assets/svg/${n}.svg`), y = Ht(
|
|
1392
1392
|
`assets/svg/${r}.svg`
|
|
1393
1393
|
), E = {
|
|
1394
|
-
svg: `${Pe["smp-icon"]} ${
|
|
1394
|
+
svg: `${Pe["smp-icon"]} ${i ? Pe[`smp-icon-${i}`] : ""} ${o ? Pe["smp-icon-rotated"] : ""} ${c ? Pe["smp-icon-interactable"] : ""} ${f ? Pe["smp-icon-spin"] : ""}`
|
|
1395
1395
|
}, R = () => {
|
|
1396
|
-
!
|
|
1396
|
+
!a && l && l();
|
|
1397
1397
|
};
|
|
1398
1398
|
return /* @__PURE__ */ w.jsx(w.Fragment, { children: h ? /* @__PURE__ */ w.jsx(
|
|
1399
1399
|
"img",
|
|
@@ -1415,7 +1415,7 @@ const ss = (n) => {
|
|
|
1415
1415
|
title: n,
|
|
1416
1416
|
role: "application",
|
|
1417
1417
|
fill: s,
|
|
1418
|
-
"aria-disabled":
|
|
1418
|
+
"aria-disabled": a,
|
|
1419
1419
|
className: E.svg,
|
|
1420
1420
|
onClick: R
|
|
1421
1421
|
}
|
|
@@ -1438,17 +1438,17 @@ const ss = (n) => {
|
|
|
1438
1438
|
n = r, e = s;
|
|
1439
1439
|
});
|
|
1440
1440
|
return t.resolve = n, t.reject = e, t;
|
|
1441
|
-
}, qt = (n) => n == null ? "" : "" + n,
|
|
1441
|
+
}, qt = (n) => n == null ? "" : "" + n, Zr = (n, e, t) => {
|
|
1442
1442
|
n.forEach((r) => {
|
|
1443
1443
|
e[r] && (t[r] = e[r]);
|
|
1444
1444
|
});
|
|
1445
|
-
},
|
|
1445
|
+
}, Qr = /###/g, Kt = (n) => n && n.indexOf("###") > -1 ? n.replace(Qr, ".") : n, Bt = (n) => !n || H(n), $e = (n, e, t) => {
|
|
1446
1446
|
const r = H(e) ? e.split(".") : e;
|
|
1447
1447
|
let s = 0;
|
|
1448
1448
|
for (; s < r.length - 1; ) {
|
|
1449
1449
|
if (Bt(n)) return {};
|
|
1450
|
-
const
|
|
1451
|
-
!n[
|
|
1450
|
+
const a = Kt(r[s]);
|
|
1451
|
+
!n[a] && t && (n[a] = new t()), Object.prototype.hasOwnProperty.call(n, a) ? n = n[a] : n = {}, ++s;
|
|
1452
1452
|
}
|
|
1453
1453
|
return Bt(n) ? {} : {
|
|
1454
1454
|
obj: n,
|
|
@@ -1463,16 +1463,16 @@ const ss = (n) => {
|
|
|
1463
1463
|
r[s] = t;
|
|
1464
1464
|
return;
|
|
1465
1465
|
}
|
|
1466
|
-
let
|
|
1467
|
-
for (; o.obj === void 0 &&
|
|
1468
|
-
|
|
1469
|
-
o.obj[`${o.k}.${
|
|
1470
|
-
},
|
|
1466
|
+
let a = e[e.length - 1], i = e.slice(0, e.length - 1), o = $e(n, i, Object);
|
|
1467
|
+
for (; o.obj === void 0 && i.length; )
|
|
1468
|
+
a = `${i[i.length - 1]}.${a}`, i = i.slice(0, i.length - 1), o = $e(n, i, Object), o != null && o.obj && typeof o.obj[`${o.k}.${a}`] < "u" && (o.obj = void 0);
|
|
1469
|
+
o.obj[`${o.k}.${a}`] = t;
|
|
1470
|
+
}, en = (n, e, t, r) => {
|
|
1471
1471
|
const {
|
|
1472
1472
|
obj: s,
|
|
1473
|
-
k:
|
|
1473
|
+
k: a
|
|
1474
1474
|
} = $e(n, e, Object);
|
|
1475
|
-
s[
|
|
1475
|
+
s[a] = s[a] || [], s[a].push(t);
|
|
1476
1476
|
}, ze = (n, e) => {
|
|
1477
1477
|
const {
|
|
1478
1478
|
obj: t,
|
|
@@ -1480,15 +1480,15 @@ const ss = (n) => {
|
|
|
1480
1480
|
} = $e(n, e);
|
|
1481
1481
|
if (t && Object.prototype.hasOwnProperty.call(t, r))
|
|
1482
1482
|
return t[r];
|
|
1483
|
-
},
|
|
1483
|
+
}, tn = (n, e, t) => {
|
|
1484
1484
|
const r = ze(n, t);
|
|
1485
1485
|
return r !== void 0 ? r : ze(e, t);
|
|
1486
|
-
},
|
|
1486
|
+
}, gr = (n, e, t) => {
|
|
1487
1487
|
for (const r in e)
|
|
1488
|
-
r !== "__proto__" && r !== "constructor" && (r in n ? H(n[r]) || n[r] instanceof String || H(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) :
|
|
1488
|
+
r !== "__proto__" && r !== "constructor" && (r in n ? H(n[r]) || n[r] instanceof String || H(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : gr(n[r], e[r], t) : n[r] = e[r]);
|
|
1489
1489
|
return n;
|
|
1490
1490
|
}, _e = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
1491
|
-
var
|
|
1491
|
+
var rn = {
|
|
1492
1492
|
"&": "&",
|
|
1493
1493
|
"<": "<",
|
|
1494
1494
|
">": ">",
|
|
@@ -1496,8 +1496,8 @@ var nn = {
|
|
|
1496
1496
|
"'": "'",
|
|
1497
1497
|
"/": "/"
|
|
1498
1498
|
};
|
|
1499
|
-
const
|
|
1500
|
-
class
|
|
1499
|
+
const nn = (n) => H(n) ? n.replace(/[&<>"'\/]/g, (e) => rn[e]) : n;
|
|
1500
|
+
class sn {
|
|
1501
1501
|
constructor(e) {
|
|
1502
1502
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1503
1503
|
}
|
|
@@ -1509,38 +1509,38 @@ class an {
|
|
|
1509
1509
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
const
|
|
1512
|
+
const an = [" ", ",", "?", "!", ";"], on = new sn(20), ln = (n, e, t) => {
|
|
1513
1513
|
e = e || "", t = t || "";
|
|
1514
|
-
const r =
|
|
1514
|
+
const r = an.filter((i) => e.indexOf(i) < 0 && t.indexOf(i) < 0);
|
|
1515
1515
|
if (r.length === 0) return !0;
|
|
1516
|
-
const s =
|
|
1517
|
-
let
|
|
1518
|
-
if (!
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1516
|
+
const s = on.getRegExp(`(${r.map((i) => i === "?" ? "\\?" : i).join("|")})`);
|
|
1517
|
+
let a = !s.test(n);
|
|
1518
|
+
if (!a) {
|
|
1519
|
+
const i = n.indexOf(t);
|
|
1520
|
+
i > 0 && !s.test(n.substring(0, i)) && (a = !0);
|
|
1521
1521
|
}
|
|
1522
|
-
return
|
|
1522
|
+
return a;
|
|
1523
1523
|
}, vt = (n, e, t = ".") => {
|
|
1524
1524
|
if (!n) return;
|
|
1525
1525
|
if (n[e])
|
|
1526
1526
|
return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0;
|
|
1527
1527
|
const r = e.split(t);
|
|
1528
1528
|
let s = n;
|
|
1529
|
-
for (let
|
|
1529
|
+
for (let a = 0; a < r.length; ) {
|
|
1530
1530
|
if (!s || typeof s != "object")
|
|
1531
1531
|
return;
|
|
1532
|
-
let
|
|
1533
|
-
for (let l =
|
|
1534
|
-
if (l !==
|
|
1535
|
-
if (["string", "number", "boolean"].indexOf(typeof
|
|
1532
|
+
let i, o = "";
|
|
1533
|
+
for (let l = a; l < r.length; ++l)
|
|
1534
|
+
if (l !== a && (o += t), o += r[l], i = s[o], i !== void 0) {
|
|
1535
|
+
if (["string", "number", "boolean"].indexOf(typeof i) > -1 && l < r.length - 1)
|
|
1536
1536
|
continue;
|
|
1537
|
-
|
|
1537
|
+
a += l - a + 1;
|
|
1538
1538
|
break;
|
|
1539
1539
|
}
|
|
1540
|
-
s =
|
|
1540
|
+
s = i;
|
|
1541
1541
|
}
|
|
1542
1542
|
return s;
|
|
1543
|
-
}, Ie = (n) => n == null ? void 0 : n.replace("_", "-"),
|
|
1543
|
+
}, Ie = (n) => n == null ? void 0 : n.replace("_", "-"), cn = {
|
|
1544
1544
|
type: "logger",
|
|
1545
1545
|
log(n) {
|
|
1546
1546
|
this.output("log", n);
|
|
@@ -1561,7 +1561,7 @@ class Je {
|
|
|
1561
1561
|
this.init(e, t);
|
|
1562
1562
|
}
|
|
1563
1563
|
init(e, t = {}) {
|
|
1564
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
1564
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || cn, this.options = t, this.debug = t.debug;
|
|
1565
1565
|
}
|
|
1566
1566
|
log(...e) {
|
|
1567
1567
|
return this.forward(e, "log", "", !0);
|
|
@@ -1610,11 +1610,11 @@ class nt {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
1612
|
emit(e, ...t) {
|
|
1613
|
-
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s,
|
|
1614
|
-
for (let
|
|
1613
|
+
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, a]) => {
|
|
1614
|
+
for (let i = 0; i < a; i++)
|
|
1615
1615
|
s(...t);
|
|
1616
|
-
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s,
|
|
1617
|
-
for (let
|
|
1616
|
+
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, a]) => {
|
|
1617
|
+
for (let i = 0; i < a; i++)
|
|
1618
1618
|
s.apply(s, [e, ...t]);
|
|
1619
1619
|
});
|
|
1620
1620
|
}
|
|
@@ -1635,39 +1635,39 @@ class zt extends nt {
|
|
|
1635
1635
|
}
|
|
1636
1636
|
getResource(e, t, r, s = {}) {
|
|
1637
1637
|
var c, f;
|
|
1638
|
-
const
|
|
1638
|
+
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, i = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
1639
1639
|
let o;
|
|
1640
|
-
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], r && (Array.isArray(r) ? o.push(...r) : H(r) &&
|
|
1640
|
+
e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], r && (Array.isArray(r) ? o.push(...r) : H(r) && a ? o.push(...r.split(a)) : o.push(r)));
|
|
1641
1641
|
const l = ze(this.data, o);
|
|
1642
|
-
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !
|
|
1642
|
+
return !l && !t && !r && e.indexOf(".") > -1 && (e = o[0], t = o[1], r = o.slice(2).join(".")), l || !i || !H(r) ? l : vt((f = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : f[t], r, a);
|
|
1643
1643
|
}
|
|
1644
|
-
addResource(e, t, r, s,
|
|
1644
|
+
addResource(e, t, r, s, a = {
|
|
1645
1645
|
silent: !1
|
|
1646
1646
|
}) {
|
|
1647
|
-
const
|
|
1647
|
+
const i = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator;
|
|
1648
1648
|
let o = [e, t];
|
|
1649
|
-
r && (o = o.concat(
|
|
1649
|
+
r && (o = o.concat(i ? r.split(i) : r)), e.indexOf(".") > -1 && (o = e.split("."), s = t, t = o[1]), this.addNamespaces(t), Gt(this.data, o, s), a.silent || this.emit("added", e, t, r, s);
|
|
1650
1650
|
}
|
|
1651
1651
|
addResources(e, t, r, s = {
|
|
1652
1652
|
silent: !1
|
|
1653
1653
|
}) {
|
|
1654
|
-
for (const
|
|
1655
|
-
(H(r[
|
|
1654
|
+
for (const a in r)
|
|
1655
|
+
(H(r[a]) || Array.isArray(r[a])) && this.addResource(e, t, a, r[a], {
|
|
1656
1656
|
silent: !0
|
|
1657
1657
|
});
|
|
1658
1658
|
s.silent || this.emit("added", e, t, r);
|
|
1659
1659
|
}
|
|
1660
|
-
addResourceBundle(e, t, r, s,
|
|
1660
|
+
addResourceBundle(e, t, r, s, a, i = {
|
|
1661
1661
|
silent: !1,
|
|
1662
1662
|
skipCopy: !1
|
|
1663
1663
|
}) {
|
|
1664
1664
|
let o = [e, t];
|
|
1665
1665
|
e.indexOf(".") > -1 && (o = e.split("."), s = r, r = t, t = o[1]), this.addNamespaces(t);
|
|
1666
1666
|
let l = ze(this.data, o) || {};
|
|
1667
|
-
|
|
1667
|
+
i.skipCopy || (r = JSON.parse(JSON.stringify(r))), s ? gr(l, r, a) : l = {
|
|
1668
1668
|
...l,
|
|
1669
1669
|
...r
|
|
1670
|
-
}, Gt(this.data, o, l),
|
|
1670
|
+
}, Gt(this.data, o, l), i.silent || this.emit("added", e, t, r);
|
|
1671
1671
|
}
|
|
1672
1672
|
removeResourceBundle(e, t) {
|
|
1673
1673
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -1689,22 +1689,22 @@ class zt extends nt {
|
|
|
1689
1689
|
return this.data;
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
var
|
|
1692
|
+
var yr = {
|
|
1693
1693
|
processors: {},
|
|
1694
1694
|
addPostProcessor(n) {
|
|
1695
1695
|
this.processors[n.name] = n;
|
|
1696
1696
|
},
|
|
1697
1697
|
handle(n, e, t, r, s) {
|
|
1698
|
-
return n.forEach((
|
|
1699
|
-
var
|
|
1700
|
-
e = ((
|
|
1698
|
+
return n.forEach((a) => {
|
|
1699
|
+
var i;
|
|
1700
|
+
e = ((i = this.processors[a]) == null ? void 0 : i.process(e, t, r, s)) ?? e;
|
|
1701
1701
|
}), e;
|
|
1702
1702
|
}
|
|
1703
1703
|
};
|
|
1704
1704
|
const Jt = {}, Xt = (n) => !H(n) && typeof n != "boolean" && typeof n != "number";
|
|
1705
1705
|
class Xe extends nt {
|
|
1706
1706
|
constructor(e, t = {}) {
|
|
1707
|
-
super(),
|
|
1707
|
+
super(), Zr(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = pe.create("translator");
|
|
1708
1708
|
}
|
|
1709
1709
|
changeLanguage(e) {
|
|
1710
1710
|
e && (this.language = e);
|
|
@@ -1723,21 +1723,21 @@ class Xe extends nt {
|
|
|
1723
1723
|
let r = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
1724
1724
|
r === void 0 && (r = ":");
|
|
1725
1725
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
1726
|
-
let
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1726
|
+
let a = t.ns || this.options.defaultNS || [];
|
|
1727
|
+
const i = r && e.indexOf(r) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !ln(e, r, s);
|
|
1728
|
+
if (i && !o) {
|
|
1729
1729
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
1730
1730
|
if (l && l.length > 0)
|
|
1731
1731
|
return {
|
|
1732
1732
|
key: e,
|
|
1733
|
-
namespaces: H(
|
|
1733
|
+
namespaces: H(a) ? [a] : a
|
|
1734
1734
|
};
|
|
1735
1735
|
const c = e.split(r);
|
|
1736
|
-
(r !== s || r === s && this.options.ns.indexOf(c[0]) > -1) && (
|
|
1736
|
+
(r !== s || r === s && this.options.ns.indexOf(c[0]) > -1) && (a = c.shift()), e = c.join(s);
|
|
1737
1737
|
}
|
|
1738
1738
|
return {
|
|
1739
1739
|
key: e,
|
|
1740
|
-
namespaces: H(
|
|
1740
|
+
namespaces: H(a) ? [a] : a
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
1743
|
translate(e, t, r) {
|
|
@@ -1748,7 +1748,7 @@ class Xe extends nt {
|
|
|
1748
1748
|
...s
|
|
1749
1749
|
}), s || (s = {}), e == null) return "";
|
|
1750
1750
|
Array.isArray(e) || (e = [String(e)]);
|
|
1751
|
-
const
|
|
1751
|
+
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, i = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
1752
1752
|
key: o,
|
|
1753
1753
|
namespaces: l
|
|
1754
1754
|
} = this.extractFromKey(e[e.length - 1], s), c = l[l.length - 1];
|
|
@@ -1756,14 +1756,14 @@ class Xe extends nt {
|
|
|
1756
1756
|
f === void 0 && (f = ":");
|
|
1757
1757
|
const u = s.lng || this.language, p = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1758
1758
|
if ((u == null ? void 0 : u.toLowerCase()) === "cimode")
|
|
1759
|
-
return p ?
|
|
1759
|
+
return p ? a ? {
|
|
1760
1760
|
res: `${c}${f}${o}`,
|
|
1761
1761
|
usedKey: o,
|
|
1762
1762
|
exactUsedKey: o,
|
|
1763
1763
|
usedLng: u,
|
|
1764
1764
|
usedNS: c,
|
|
1765
1765
|
usedParams: this.getUsedParamsDetails(s)
|
|
1766
|
-
} : `${c}${f}${o}` :
|
|
1766
|
+
} : `${c}${f}${o}` : a ? {
|
|
1767
1767
|
res: o,
|
|
1768
1768
|
usedKey: o,
|
|
1769
1769
|
exactUsedKey: o,
|
|
@@ -1786,13 +1786,13 @@ class Xe extends nt {
|
|
|
1786
1786
|
...s,
|
|
1787
1787
|
ns: l
|
|
1788
1788
|
}) : `key '${o} (${this.language})' returned an object instead of string.`;
|
|
1789
|
-
return
|
|
1789
|
+
return a ? (h.res = J, h.usedParams = this.getUsedParamsDetails(s), h) : J;
|
|
1790
1790
|
}
|
|
1791
|
-
if (
|
|
1791
|
+
if (i) {
|
|
1792
1792
|
const J = Array.isArray(C), K = J ? [] : {}, ne = J ? E : y;
|
|
1793
1793
|
for (const z in C)
|
|
1794
1794
|
if (Object.prototype.hasOwnProperty.call(C, z)) {
|
|
1795
|
-
const V = `${ne}${
|
|
1795
|
+
const V = `${ne}${i}${z}`;
|
|
1796
1796
|
v && !g ? K[z] = this.translate(V, {
|
|
1797
1797
|
...s,
|
|
1798
1798
|
defaultValue: Xt(F) ? F[z] : void 0,
|
|
@@ -1813,7 +1813,7 @@ class Xe extends nt {
|
|
|
1813
1813
|
!this.isValidLookup(g) && v && (J = !0, g = F), this.isValidLookup(g) || (K = !0, g = o);
|
|
1814
1814
|
const z = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && K ? void 0 : g, V = v && F !== g && this.options.updateMissing;
|
|
1815
1815
|
if (K || J || V) {
|
|
1816
|
-
if (this.logger.log(V ? "updateKey" : "missingKey", u, c, o, V ? F : g),
|
|
1816
|
+
if (this.logger.log(V ? "updateKey" : "missingKey", u, c, o, V ? F : g), i) {
|
|
1817
1817
|
const m = this.resolve(o, {
|
|
1818
1818
|
...s,
|
|
1819
1819
|
keySeparator: !1
|
|
@@ -1840,9 +1840,9 @@ class Xe extends nt {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
g = this.extendTranslation(g, e, s, h, r), K && g === o && this.options.appendNamespaceToMissingKey && (g = `${c}${f}${o}`), (K || J) && this.options.parseMissingKeyHandler && (g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${f}${o}` : o, J ? g : void 0, s));
|
|
1842
1842
|
}
|
|
1843
|
-
return
|
|
1843
|
+
return a ? (h.res = g, h.usedParams = this.getUsedParamsDetails(s), h) : g;
|
|
1844
1844
|
}
|
|
1845
|
-
extendTranslation(e, t, r, s,
|
|
1845
|
+
extendTranslation(e, t, r, s, a) {
|
|
1846
1846
|
var l, c;
|
|
1847
1847
|
if ((l = this.i18nFormat) != null && l.parse)
|
|
1848
1848
|
e = this.i18nFormat.parse(e, {
|
|
@@ -1873,10 +1873,10 @@ class Xe extends nt {
|
|
|
1873
1873
|
const h = e.match(this.interpolator.nestingRegexp), g = h && h.length;
|
|
1874
1874
|
u < g && (r.nest = !1);
|
|
1875
1875
|
}
|
|
1876
|
-
!r.lng && s && s.res && (r.lng = this.language || s.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...h) => (
|
|
1876
|
+
!r.lng && s && s.res && (r.lng = this.language || s.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...h) => (a == null ? void 0 : a[0]) === h[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`), null) : this.translate(...h, t), r)), r.interpolation && this.interpolator.reset();
|
|
1877
1877
|
}
|
|
1878
|
-
const
|
|
1879
|
-
return e != null && (o != null && o.length) && r.applyPostProcessor !== !1 && (e =
|
|
1878
|
+
const i = r.postProcess || this.options.postProcess, o = H(i) ? [i] : i;
|
|
1879
|
+
return e != null && (o != null && o.length) && r.applyPostProcessor !== !1 && (e = yr.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
1880
1880
|
i18nResolved: {
|
|
1881
1881
|
...s,
|
|
1882
1882
|
usedParams: this.getUsedParamsDetails(r)
|
|
@@ -1885,7 +1885,7 @@ class Xe extends nt {
|
|
|
1885
1885
|
} : r, this)), e;
|
|
1886
1886
|
}
|
|
1887
1887
|
resolve(e, t = {}) {
|
|
1888
|
-
let r, s,
|
|
1888
|
+
let r, s, a, i, o;
|
|
1889
1889
|
return H(e) && (e = [e]), e.forEach((l) => {
|
|
1890
1890
|
if (this.isValidLookup(r)) return;
|
|
1891
1891
|
const c = this.extractFromKey(l, t), f = c.key;
|
|
@@ -1898,7 +1898,7 @@ class Xe extends nt {
|
|
|
1898
1898
|
this.isValidLookup(r) || (o = E, !Jt[`${y[0]}-${E}`] && ((R = this.utils) != null && R.hasLoadedNamespace) && !((x = this.utils) != null && x.hasLoadedNamespace(o)) && (Jt[`${y[0]}-${E}`] = !0, this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), y.forEach((O) => {
|
|
1899
1899
|
var A;
|
|
1900
1900
|
if (this.isValidLookup(r)) return;
|
|
1901
|
-
|
|
1901
|
+
i = O;
|
|
1902
1902
|
const D = [f];
|
|
1903
1903
|
if ((A = this.i18nFormat) != null && A.addLookupKeys)
|
|
1904
1904
|
this.i18nFormat.addLookupKeys(D, f, O, E, t);
|
|
@@ -1913,14 +1913,14 @@ class Xe extends nt {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
let v;
|
|
1915
1915
|
for (; v = D.pop(); )
|
|
1916
|
-
this.isValidLookup(r) || (
|
|
1916
|
+
this.isValidLookup(r) || (a = v, r = this.getResource(O, E, v, t));
|
|
1917
1917
|
}));
|
|
1918
1918
|
});
|
|
1919
1919
|
}), {
|
|
1920
1920
|
res: r,
|
|
1921
1921
|
usedKey: s,
|
|
1922
|
-
exactUsedKey:
|
|
1923
|
-
usedLng:
|
|
1922
|
+
exactUsedKey: a,
|
|
1923
|
+
usedLng: i,
|
|
1924
1924
|
usedNS: o
|
|
1925
1925
|
};
|
|
1926
1926
|
}
|
|
@@ -1928,8 +1928,8 @@ class Xe extends nt {
|
|
|
1928
1928
|
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
1929
1929
|
}
|
|
1930
1930
|
getResource(e, t, r, s = {}) {
|
|
1931
|
-
var
|
|
1932
|
-
return (
|
|
1931
|
+
var a;
|
|
1932
|
+
return (a = this.i18nFormat) != null && a.getResource ? this.i18nFormat.getResource(e, t, r, s) : this.resourceStore.getResource(e, t, r, s);
|
|
1933
1933
|
}
|
|
1934
1934
|
getUsedParamsDetails(e = {}) {
|
|
1935
1935
|
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !H(e.replace);
|
|
@@ -1941,8 +1941,8 @@ class Xe extends nt {
|
|
|
1941
1941
|
s = {
|
|
1942
1942
|
...s
|
|
1943
1943
|
};
|
|
1944
|
-
for (const
|
|
1945
|
-
delete s[
|
|
1944
|
+
for (const a of t)
|
|
1945
|
+
delete s[a];
|
|
1946
1946
|
}
|
|
1947
1947
|
return s;
|
|
1948
1948
|
}
|
|
@@ -1993,12 +1993,12 @@ class Zt {
|
|
|
1993
1993
|
if (t) return;
|
|
1994
1994
|
const s = this.getScriptPartFromCode(r);
|
|
1995
1995
|
if (this.isSupportedCode(s)) return t = s;
|
|
1996
|
-
const
|
|
1997
|
-
if (this.isSupportedCode(
|
|
1998
|
-
t = this.options.supportedLngs.find((
|
|
1999
|
-
if (
|
|
2000
|
-
if (!(
|
|
2001
|
-
return
|
|
1996
|
+
const a = this.getLanguagePartFromCode(r);
|
|
1997
|
+
if (this.isSupportedCode(a)) return t = a;
|
|
1998
|
+
t = this.options.supportedLngs.find((i) => {
|
|
1999
|
+
if (i === a) return i;
|
|
2000
|
+
if (!(i.indexOf("-") < 0 && a.indexOf("-") < 0) && (i.indexOf("-") > 0 && a.indexOf("-") < 0 && i.substring(0, i.indexOf("-")) === a || i.indexOf(a) === 0 && a.length > 1))
|
|
2001
|
+
return i;
|
|
2002
2002
|
});
|
|
2003
2003
|
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
2004
2004
|
}
|
|
@@ -2010,11 +2010,11 @@ class Zt {
|
|
|
2010
2010
|
return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
|
|
2011
2011
|
}
|
|
2012
2012
|
toResolveHierarchy(e, t) {
|
|
2013
|
-
const r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), s = [],
|
|
2014
|
-
|
|
2013
|
+
const r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), s = [], a = (i) => {
|
|
2014
|
+
i && (this.isSupportedCode(i) ? s.push(i) : this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`));
|
|
2015
2015
|
};
|
|
2016
|
-
return H(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" &&
|
|
2017
|
-
s.indexOf(
|
|
2016
|
+
return H(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : H(e) && a(this.formatLanguageCode(e)), r.forEach((i) => {
|
|
2017
|
+
s.indexOf(i) < 0 && a(this.formatLanguageCode(i));
|
|
2018
2018
|
}), s;
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
@@ -2031,7 +2031,7 @@ const Qt = {
|
|
|
2031
2031
|
pluralCategories: ["one", "other"]
|
|
2032
2032
|
})
|
|
2033
2033
|
};
|
|
2034
|
-
class
|
|
2034
|
+
class un {
|
|
2035
2035
|
constructor(e, t = {}) {
|
|
2036
2036
|
this.languageUtils = e, this.options = t, this.logger = pe.create("pluralResolver"), this.pluralRulesCache = {};
|
|
2037
2037
|
}
|
|
@@ -2042,15 +2042,15 @@ class fn {
|
|
|
2042
2042
|
this.pluralRulesCache = {};
|
|
2043
2043
|
}
|
|
2044
2044
|
getRule(e, t = {}) {
|
|
2045
|
-
const r = Ie(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal",
|
|
2045
|
+
const r = Ie(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", a = JSON.stringify({
|
|
2046
2046
|
cleanedCode: r,
|
|
2047
2047
|
type: s
|
|
2048
2048
|
});
|
|
2049
|
-
if (
|
|
2050
|
-
return this.pluralRulesCache[
|
|
2051
|
-
let
|
|
2049
|
+
if (a in this.pluralRulesCache)
|
|
2050
|
+
return this.pluralRulesCache[a];
|
|
2051
|
+
let i;
|
|
2052
2052
|
try {
|
|
2053
|
-
|
|
2053
|
+
i = new Intl.PluralRules(r, {
|
|
2054
2054
|
type: s
|
|
2055
2055
|
});
|
|
2056
2056
|
} catch {
|
|
@@ -2058,9 +2058,9 @@ class fn {
|
|
|
2058
2058
|
return this.logger.error("No Intl support, please use an Intl polyfill!"), er;
|
|
2059
2059
|
if (!e.match(/-|_/)) return er;
|
|
2060
2060
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
2061
|
-
|
|
2061
|
+
i = this.getRule(l, t);
|
|
2062
2062
|
}
|
|
2063
|
-
return this.pluralRulesCache[
|
|
2063
|
+
return this.pluralRulesCache[a] = i, i;
|
|
2064
2064
|
}
|
|
2065
2065
|
needsPlural(e, t = {}) {
|
|
2066
2066
|
let r = this.getRule(e, t);
|
|
@@ -2071,7 +2071,7 @@ class fn {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
getSuffixes(e, t = {}) {
|
|
2073
2073
|
let r = this.getRule(e, t);
|
|
2074
|
-
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((s,
|
|
2074
|
+
return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((s, a) => Qt[s] - Qt[a]).map((s) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${s}`) : [];
|
|
2075
2075
|
}
|
|
2076
2076
|
getSuffix(e, t, r = {}) {
|
|
2077
2077
|
const s = this.getRule(e, r);
|
|
@@ -2079,10 +2079,10 @@ class fn {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
2081
|
const tr = (n, e, t, r = ".", s = !0) => {
|
|
2082
|
-
let
|
|
2083
|
-
return !
|
|
2082
|
+
let a = tn(n, e, t);
|
|
2083
|
+
return !a && s && H(t) && (a = vt(n, t, r), a === void 0 && (a = vt(e, t, r))), a;
|
|
2084
2084
|
}, pt = (n) => n.replace(/\$/g, "$$$$");
|
|
2085
|
-
class
|
|
2085
|
+
class fn {
|
|
2086
2086
|
constructor(e = {}) {
|
|
2087
2087
|
var t;
|
|
2088
2088
|
this.logger = pe.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((r) => r), this.init(e);
|
|
@@ -2095,8 +2095,8 @@ class dn {
|
|
|
2095
2095
|
escape: t,
|
|
2096
2096
|
escapeValue: r,
|
|
2097
2097
|
useRawValueToEscape: s,
|
|
2098
|
-
prefix:
|
|
2099
|
-
prefixEscaped:
|
|
2098
|
+
prefix: a,
|
|
2099
|
+
prefixEscaped: i,
|
|
2100
2100
|
suffix: o,
|
|
2101
2101
|
suffixEscaped: l,
|
|
2102
2102
|
formatSeparator: c,
|
|
@@ -2110,7 +2110,7 @@ class dn {
|
|
|
2110
2110
|
maxReplaces: R,
|
|
2111
2111
|
alwaysFormat: x
|
|
2112
2112
|
} = e.interpolation;
|
|
2113
|
-
this.escape = t !== void 0 ? t :
|
|
2113
|
+
this.escape = t !== void 0 ? t : nn, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? _e(a) : i || "{{", this.suffix = o ? _e(o) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = f ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : f || "", this.nestingPrefix = p ? _e(p) : h || _e("$t("), this.nestingSuffix = g ? _e(g) : y || _e(")"), this.nestingOptionsSeparator = E || ",", this.maxReplaces = R || 1e3, this.alwaysFormat = x !== void 0 ? x : !1, this.resetRegExp();
|
|
2114
2114
|
}
|
|
2115
2115
|
reset() {
|
|
2116
2116
|
this.options && this.init(this.options);
|
|
@@ -2121,7 +2121,7 @@ class dn {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
interpolate(e, t, r, s) {
|
|
2123
2123
|
var h;
|
|
2124
|
-
let
|
|
2124
|
+
let a, i, o;
|
|
2125
2125
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (g) => {
|
|
2126
2126
|
if (g.indexOf(this.formatSeparator) < 0) {
|
|
2127
2127
|
const x = tr(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
@@ -2147,75 +2147,75 @@ class dn {
|
|
|
2147
2147
|
regex: this.regexp,
|
|
2148
2148
|
safeValue: (g) => this.escapeValue ? pt(this.escape(g)) : pt(g)
|
|
2149
2149
|
}].forEach((g) => {
|
|
2150
|
-
for (o = 0;
|
|
2151
|
-
const y =
|
|
2152
|
-
if (
|
|
2150
|
+
for (o = 0; a = g.regex.exec(e); ) {
|
|
2151
|
+
const y = a[1].trim();
|
|
2152
|
+
if (i = c(y), i === void 0)
|
|
2153
2153
|
if (typeof f == "function") {
|
|
2154
|
-
const R = f(e,
|
|
2155
|
-
|
|
2154
|
+
const R = f(e, a, s);
|
|
2155
|
+
i = H(R) ? R : "";
|
|
2156
2156
|
} else if (s && Object.prototype.hasOwnProperty.call(s, y))
|
|
2157
|
-
|
|
2157
|
+
i = "";
|
|
2158
2158
|
else if (u) {
|
|
2159
|
-
|
|
2159
|
+
i = a[0];
|
|
2160
2160
|
continue;
|
|
2161
2161
|
} else
|
|
2162
|
-
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),
|
|
2163
|
-
else !H(
|
|
2164
|
-
const E = g.safeValue(
|
|
2165
|
-
if (e = e.replace(
|
|
2162
|
+
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), i = "";
|
|
2163
|
+
else !H(i) && !this.useRawValueToEscape && (i = qt(i));
|
|
2164
|
+
const E = g.safeValue(i);
|
|
2165
|
+
if (e = e.replace(a[0], E), u ? (g.regex.lastIndex += i.length, g.regex.lastIndex -= a[0].length) : g.regex.lastIndex = 0, o++, o >= this.maxReplaces)
|
|
2166
2166
|
break;
|
|
2167
2167
|
}
|
|
2168
2168
|
}), e;
|
|
2169
2169
|
}
|
|
2170
2170
|
nest(e, t, r = {}) {
|
|
2171
|
-
let s,
|
|
2171
|
+
let s, a, i;
|
|
2172
2172
|
const o = (l, c) => {
|
|
2173
2173
|
const f = this.nestingOptionsSeparator;
|
|
2174
2174
|
if (l.indexOf(f) < 0) return l;
|
|
2175
2175
|
const u = l.split(new RegExp(`${f}[ ]*{`));
|
|
2176
2176
|
let p = `{${u[1]}`;
|
|
2177
|
-
l = u[0], p = this.interpolate(p,
|
|
2177
|
+
l = u[0], p = this.interpolate(p, i);
|
|
2178
2178
|
const h = p.match(/'/g), g = p.match(/"/g);
|
|
2179
2179
|
(((h == null ? void 0 : h.length) ?? 0) % 2 === 0 && !g || g.length % 2 !== 0) && (p = p.replace(/'/g, '"'));
|
|
2180
2180
|
try {
|
|
2181
|
-
|
|
2181
|
+
i = JSON.parse(p), c && (i = {
|
|
2182
2182
|
...c,
|
|
2183
|
-
...
|
|
2183
|
+
...i
|
|
2184
2184
|
});
|
|
2185
2185
|
} catch (y) {
|
|
2186
2186
|
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, y), `${l}${f}${p}`;
|
|
2187
2187
|
}
|
|
2188
|
-
return
|
|
2188
|
+
return i.defaultValue && i.defaultValue.indexOf(this.prefix) > -1 && delete i.defaultValue, l;
|
|
2189
2189
|
};
|
|
2190
2190
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
2191
2191
|
let l = [];
|
|
2192
|
-
|
|
2192
|
+
i = {
|
|
2193
2193
|
...r
|
|
2194
|
-
},
|
|
2194
|
+
}, i = i.replace && !H(i.replace) ? i.replace : i, i.applyPostProcessor = !1, delete i.defaultValue;
|
|
2195
2195
|
let c = !1;
|
|
2196
2196
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
2197
2197
|
const f = s[1].split(this.formatSeparator).map((u) => u.trim());
|
|
2198
2198
|
s[1] = f.shift(), l = f, c = !0;
|
|
2199
2199
|
}
|
|
2200
|
-
if (
|
|
2201
|
-
H(
|
|
2200
|
+
if (a = t(o.call(this, s[1].trim(), i), i), a && s[0] === e && !H(a)) return a;
|
|
2201
|
+
H(a) || (a = qt(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), c && (a = l.reduce((f, u) => this.format(f, u, r.lng, {
|
|
2202
2202
|
...r,
|
|
2203
2203
|
interpolationkey: s[1].trim()
|
|
2204
|
-
}),
|
|
2204
|
+
}), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
|
|
2205
2205
|
}
|
|
2206
2206
|
return e;
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
|
-
const
|
|
2209
|
+
const dn = (n) => {
|
|
2210
2210
|
let e = n.toLowerCase().trim();
|
|
2211
2211
|
const t = {};
|
|
2212
2212
|
if (n.indexOf("(") > -1) {
|
|
2213
2213
|
const r = n.split("(");
|
|
2214
2214
|
e = r[0].toLowerCase().trim();
|
|
2215
2215
|
const s = r[1].substring(0, r[1].length - 1);
|
|
2216
|
-
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((
|
|
2217
|
-
if (
|
|
2218
|
-
const [o, ...l] =
|
|
2216
|
+
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((i) => {
|
|
2217
|
+
if (i) {
|
|
2218
|
+
const [o, ...l] = i.split(":"), c = l.join(":").trim().replace(/^'+|'+$/g, ""), f = o.trim();
|
|
2219
2219
|
t[f] || (t[f] = c), c === "false" && (t[f] = !1), c === "true" && (t[f] = !0), isNaN(c) || (t[f] = parseInt(c, 10));
|
|
2220
2220
|
}
|
|
2221
2221
|
});
|
|
@@ -2227,17 +2227,17 @@ const pn = (n) => {
|
|
|
2227
2227
|
}, rr = (n) => {
|
|
2228
2228
|
const e = {};
|
|
2229
2229
|
return (t, r, s) => {
|
|
2230
|
-
let
|
|
2231
|
-
s && s.interpolationkey && s.formatParams && s.formatParams[s.interpolationkey] && s[s.interpolationkey] && (
|
|
2232
|
-
...
|
|
2230
|
+
let a = s;
|
|
2231
|
+
s && s.interpolationkey && s.formatParams && s.formatParams[s.interpolationkey] && s[s.interpolationkey] && (a = {
|
|
2232
|
+
...a,
|
|
2233
2233
|
[s.interpolationkey]: void 0
|
|
2234
2234
|
});
|
|
2235
|
-
const
|
|
2236
|
-
let o = e[
|
|
2237
|
-
return o || (o = n(Ie(r), s), e[
|
|
2235
|
+
const i = r + JSON.stringify(a);
|
|
2236
|
+
let o = e[i];
|
|
2237
|
+
return o || (o = n(Ie(r), s), e[i] = o), o(t);
|
|
2238
2238
|
};
|
|
2239
|
-
},
|
|
2240
|
-
class
|
|
2239
|
+
}, pn = (n) => (e, t, r) => n(Ie(t), r)(e);
|
|
2240
|
+
class hn {
|
|
2241
2241
|
constructor(e = {}) {
|
|
2242
2242
|
this.logger = pe.create("formatter"), this.options = e, this.init(e);
|
|
2243
2243
|
}
|
|
@@ -2245,38 +2245,38 @@ class mn {
|
|
|
2245
2245
|
interpolation: {}
|
|
2246
2246
|
}) {
|
|
2247
2247
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
2248
|
-
const r = t.cacheInBuiltFormats ? rr :
|
|
2248
|
+
const r = t.cacheInBuiltFormats ? rr : pn;
|
|
2249
2249
|
this.formats = {
|
|
2250
|
-
number: r((s,
|
|
2251
|
-
const
|
|
2252
|
-
...
|
|
2250
|
+
number: r((s, a) => {
|
|
2251
|
+
const i = new Intl.NumberFormat(s, {
|
|
2252
|
+
...a
|
|
2253
2253
|
});
|
|
2254
|
-
return (o) =>
|
|
2254
|
+
return (o) => i.format(o);
|
|
2255
2255
|
}),
|
|
2256
|
-
currency: r((s,
|
|
2257
|
-
const
|
|
2258
|
-
...
|
|
2256
|
+
currency: r((s, a) => {
|
|
2257
|
+
const i = new Intl.NumberFormat(s, {
|
|
2258
|
+
...a,
|
|
2259
2259
|
style: "currency"
|
|
2260
2260
|
});
|
|
2261
|
-
return (o) =>
|
|
2261
|
+
return (o) => i.format(o);
|
|
2262
2262
|
}),
|
|
2263
|
-
datetime: r((s,
|
|
2264
|
-
const
|
|
2265
|
-
...
|
|
2263
|
+
datetime: r((s, a) => {
|
|
2264
|
+
const i = new Intl.DateTimeFormat(s, {
|
|
2265
|
+
...a
|
|
2266
2266
|
});
|
|
2267
|
-
return (o) =>
|
|
2267
|
+
return (o) => i.format(o);
|
|
2268
2268
|
}),
|
|
2269
|
-
relativetime: r((s,
|
|
2270
|
-
const
|
|
2271
|
-
...
|
|
2269
|
+
relativetime: r((s, a) => {
|
|
2270
|
+
const i = new Intl.RelativeTimeFormat(s, {
|
|
2271
|
+
...a
|
|
2272
2272
|
});
|
|
2273
|
-
return (o) =>
|
|
2273
|
+
return (o) => i.format(o, a.range || "day");
|
|
2274
2274
|
}),
|
|
2275
|
-
list: r((s,
|
|
2276
|
-
const
|
|
2277
|
-
...
|
|
2275
|
+
list: r((s, a) => {
|
|
2276
|
+
const i = new Intl.ListFormat(s, {
|
|
2277
|
+
...a
|
|
2278
2278
|
});
|
|
2279
|
-
return (o) =>
|
|
2279
|
+
return (o) => i.format(o);
|
|
2280
2280
|
})
|
|
2281
2281
|
};
|
|
2282
2282
|
}
|
|
@@ -2287,17 +2287,17 @@ class mn {
|
|
|
2287
2287
|
this.formats[e.toLowerCase().trim()] = rr(t);
|
|
2288
2288
|
}
|
|
2289
2289
|
format(e, t, r, s = {}) {
|
|
2290
|
-
const
|
|
2291
|
-
if (
|
|
2292
|
-
const o =
|
|
2293
|
-
|
|
2290
|
+
const a = t.split(this.formatSeparator);
|
|
2291
|
+
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((o) => o.indexOf(")") > -1)) {
|
|
2292
|
+
const o = a.findIndex((l) => l.indexOf(")") > -1);
|
|
2293
|
+
a[0] = [a[0], ...a.splice(1, o)].join(this.formatSeparator);
|
|
2294
2294
|
}
|
|
2295
|
-
return
|
|
2295
|
+
return a.reduce((o, l) => {
|
|
2296
2296
|
var u;
|
|
2297
2297
|
const {
|
|
2298
2298
|
formatName: c,
|
|
2299
2299
|
formatOptions: f
|
|
2300
|
-
} =
|
|
2300
|
+
} = dn(l);
|
|
2301
2301
|
if (this.formats[c]) {
|
|
2302
2302
|
let p = o;
|
|
2303
2303
|
try {
|
|
@@ -2317,43 +2317,43 @@ class mn {
|
|
|
2317
2317
|
}, e);
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
|
-
const
|
|
2320
|
+
const mn = (n, e) => {
|
|
2321
2321
|
n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
|
|
2322
2322
|
};
|
|
2323
|
-
class
|
|
2323
|
+
class gn extends nt {
|
|
2324
2324
|
constructor(e, t, r, s = {}) {
|
|
2325
|
-
var
|
|
2326
|
-
super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = s, this.logger = pe.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], (
|
|
2325
|
+
var a, i;
|
|
2326
|
+
super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = s, this.logger = pe.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], (i = (a = this.backend) == null ? void 0 : a.init) == null || i.call(a, r, s.backend, s);
|
|
2327
2327
|
}
|
|
2328
2328
|
queueLoad(e, t, r, s) {
|
|
2329
|
-
const
|
|
2329
|
+
const a = {}, i = {}, o = {}, l = {};
|
|
2330
2330
|
return e.forEach((c) => {
|
|
2331
2331
|
let f = !0;
|
|
2332
2332
|
t.forEach((u) => {
|
|
2333
2333
|
const p = `${c}|${u}`;
|
|
2334
|
-
!r.reload && this.store.hasResourceBundle(c, u) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ?
|
|
2334
|
+
!r.reload && this.store.hasResourceBundle(c, u) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ? i[p] === void 0 && (i[p] = !0) : (this.state[p] = 1, f = !1, i[p] === void 0 && (i[p] = !0), a[p] === void 0 && (a[p] = !0), l[u] === void 0 && (l[u] = !0)));
|
|
2335
2335
|
}), f || (o[c] = !0);
|
|
2336
|
-
}), (Object.keys(
|
|
2337
|
-
pending:
|
|
2338
|
-
pendingCount: Object.keys(
|
|
2336
|
+
}), (Object.keys(a).length || Object.keys(i).length) && this.queue.push({
|
|
2337
|
+
pending: i,
|
|
2338
|
+
pendingCount: Object.keys(i).length,
|
|
2339
2339
|
loaded: {},
|
|
2340
2340
|
errors: [],
|
|
2341
2341
|
callback: s
|
|
2342
2342
|
}), {
|
|
2343
|
-
toLoad: Object.keys(
|
|
2344
|
-
pending: Object.keys(
|
|
2343
|
+
toLoad: Object.keys(a),
|
|
2344
|
+
pending: Object.keys(i),
|
|
2345
2345
|
toLoadLanguages: Object.keys(o),
|
|
2346
2346
|
toLoadNamespaces: Object.keys(l)
|
|
2347
2347
|
};
|
|
2348
2348
|
}
|
|
2349
2349
|
loaded(e, t, r) {
|
|
2350
|
-
const s = e.split("|"),
|
|
2351
|
-
t && this.emit("failedLoading",
|
|
2350
|
+
const s = e.split("|"), a = s[0], i = s[1];
|
|
2351
|
+
t && this.emit("failedLoading", a, i, t), !t && r && this.store.addResourceBundle(a, i, r, void 0, void 0, {
|
|
2352
2352
|
skipCopy: !0
|
|
2353
2353
|
}), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
|
|
2354
2354
|
const o = {};
|
|
2355
2355
|
this.queue.forEach((l) => {
|
|
2356
|
-
|
|
2356
|
+
en(l.loaded, [a], i), mn(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
2357
2357
|
o[c] || (o[c] = {});
|
|
2358
2358
|
const f = l.loaded[c];
|
|
2359
2359
|
f.length && f.forEach((u) => {
|
|
@@ -2362,16 +2362,16 @@ class yn extends nt {
|
|
|
2362
2362
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
2363
2363
|
}), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
|
|
2364
2364
|
}
|
|
2365
|
-
read(e, t, r, s = 0,
|
|
2366
|
-
if (!e.length) return
|
|
2365
|
+
read(e, t, r, s = 0, a = this.retryTimeout, i) {
|
|
2366
|
+
if (!e.length) return i(null, {});
|
|
2367
2367
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
2368
2368
|
this.waitingReads.push({
|
|
2369
2369
|
lng: e,
|
|
2370
2370
|
ns: t,
|
|
2371
2371
|
fcName: r,
|
|
2372
2372
|
tried: s,
|
|
2373
|
-
wait:
|
|
2374
|
-
callback:
|
|
2373
|
+
wait: a,
|
|
2374
|
+
callback: i
|
|
2375
2375
|
});
|
|
2376
2376
|
return;
|
|
2377
2377
|
}
|
|
@@ -2383,11 +2383,11 @@ class yn extends nt {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
if (c && f && s < this.maxRetries) {
|
|
2385
2385
|
setTimeout(() => {
|
|
2386
|
-
this.read.call(this, e, t, r, s + 1,
|
|
2387
|
-
},
|
|
2386
|
+
this.read.call(this, e, t, r, s + 1, a * 2, i);
|
|
2387
|
+
}, a);
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
2390
|
-
|
|
2390
|
+
i(c, f);
|
|
2391
2391
|
}, l = this.backend[r].bind(this.backend);
|
|
2392
2392
|
if (l.length === 2) {
|
|
2393
2393
|
try {
|
|
@@ -2404,11 +2404,11 @@ class yn extends nt {
|
|
|
2404
2404
|
if (!this.backend)
|
|
2405
2405
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
2406
2406
|
H(e) && (e = this.languageUtils.toResolveHierarchy(e)), H(t) && (t = [t]);
|
|
2407
|
-
const
|
|
2408
|
-
if (!
|
|
2409
|
-
return
|
|
2410
|
-
|
|
2411
|
-
this.loadOne(
|
|
2407
|
+
const a = this.queueLoad(e, t, r, s);
|
|
2408
|
+
if (!a.toLoad.length)
|
|
2409
|
+
return a.pending.length || s(), null;
|
|
2410
|
+
a.toLoad.forEach((i) => {
|
|
2411
|
+
this.loadOne(i);
|
|
2412
2412
|
});
|
|
2413
2413
|
}
|
|
2414
2414
|
load(e, t, r) {
|
|
@@ -2420,12 +2420,12 @@ class yn extends nt {
|
|
|
2420
2420
|
}, r);
|
|
2421
2421
|
}
|
|
2422
2422
|
loadOne(e, t = "") {
|
|
2423
|
-
const r = e.split("|"), s = r[0],
|
|
2424
|
-
this.read(s,
|
|
2425
|
-
|
|
2423
|
+
const r = e.split("|"), s = r[0], a = r[1];
|
|
2424
|
+
this.read(s, a, "read", void 0, void 0, (i, o) => {
|
|
2425
|
+
i && this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`, i), !i && o && this.logger.log(`${t}loaded namespace ${a} for language ${s}`, o), this.loaded(e, i, o);
|
|
2426
2426
|
});
|
|
2427
2427
|
}
|
|
2428
|
-
saveMissing(e, t, r, s,
|
|
2428
|
+
saveMissing(e, t, r, s, a, i = {}, o = () => {
|
|
2429
2429
|
}) {
|
|
2430
2430
|
var l, c, f, u, p;
|
|
2431
2431
|
if ((c = (l = this.services) == null ? void 0 : l.utils) != null && c.hasLoadedNamespace && !((u = (f = this.services) == null ? void 0 : f.utils) != null && u.hasLoadedNamespace(t))) {
|
|
@@ -2435,8 +2435,8 @@ class yn extends nt {
|
|
|
2435
2435
|
if (!(r == null || r === "")) {
|
|
2436
2436
|
if ((p = this.backend) != null && p.create) {
|
|
2437
2437
|
const h = {
|
|
2438
|
-
...
|
|
2439
|
-
isUpdate:
|
|
2438
|
+
...i,
|
|
2439
|
+
isUpdate: a
|
|
2440
2440
|
}, g = this.backend.create.bind(this.backend);
|
|
2441
2441
|
if (g.length < 6)
|
|
2442
2442
|
try {
|
|
@@ -2513,7 +2513,7 @@ const nr = () => ({
|
|
|
2513
2513
|
var e, t;
|
|
2514
2514
|
return H(n.ns) && (n.ns = [n.ns]), H(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), H(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
|
|
2515
2515
|
}, He = () => {
|
|
2516
|
-
},
|
|
2516
|
+
}, yn = (n) => {
|
|
2517
2517
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
2518
2518
|
typeof n[t] == "function" && (n[t] = n[t].bind(n));
|
|
2519
2519
|
});
|
|
@@ -2522,7 +2522,7 @@ class Ne extends nt {
|
|
|
2522
2522
|
constructor(e = {}, t) {
|
|
2523
2523
|
if (super(), this.options = sr(e), this.services = {}, this.logger = pe, this.modules = {
|
|
2524
2524
|
external: []
|
|
2525
|
-
},
|
|
2525
|
+
}, yn(this), t && !this.isInitialized && !e.isClone) {
|
|
2526
2526
|
if (!this.options.initAsync)
|
|
2527
2527
|
return this.init(e, t), this;
|
|
2528
2528
|
setTimeout(() => {
|
|
@@ -2545,16 +2545,16 @@ class Ne extends nt {
|
|
|
2545
2545
|
if (!this.options.isClone) {
|
|
2546
2546
|
this.modules.logger ? pe.init(s(this.modules.logger), this.options) : pe.init(null, this.options);
|
|
2547
2547
|
let c;
|
|
2548
|
-
this.modules.formatter ? c = this.modules.formatter : c =
|
|
2548
|
+
this.modules.formatter ? c = this.modules.formatter : c = hn;
|
|
2549
2549
|
const f = new Zt(this.options);
|
|
2550
2550
|
this.store = new zt(this.options.resources, this.options);
|
|
2551
2551
|
const u = this.services;
|
|
2552
|
-
u.logger = pe, u.resourceStore = this.store, u.languageUtils = f, u.pluralResolver = new
|
|
2552
|
+
u.logger = pe, u.resourceStore = this.store, u.languageUtils = f, u.pluralResolver = new un(f, {
|
|
2553
2553
|
prepend: this.options.pluralSeparator,
|
|
2554
2554
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
2555
|
-
}), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = s(c), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
2555
|
+
}), c && (!this.options.interpolation.format || this.options.interpolation.format === r.interpolation.format) && (u.formatter = s(c), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new fn(this.options), u.utils = {
|
|
2556
2556
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
2557
|
-
}, u.backendConnector = new
|
|
2557
|
+
}, u.backendConnector = new gn(s(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (p, ...h) => {
|
|
2558
2558
|
this.emit(p, ...h);
|
|
2559
2559
|
}), this.modules.languageDetector && (u.languageDetector = s(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = s(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new Xe(this.services, this.options), this.translator.on("*", (p, ...h) => {
|
|
2560
2560
|
this.emit(p, ...h);
|
|
@@ -2581,7 +2581,7 @@ class Ne extends nt {
|
|
|
2581
2581
|
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), o;
|
|
2582
2582
|
}
|
|
2583
2583
|
loadResources(e, t = He) {
|
|
2584
|
-
var
|
|
2584
|
+
var a, i;
|
|
2585
2585
|
let r = t;
|
|
2586
2586
|
const s = H(e) ? e : this.language;
|
|
2587
2587
|
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
@@ -2592,7 +2592,7 @@ class Ne extends nt {
|
|
|
2592
2592
|
u !== "cimode" && o.indexOf(u) < 0 && o.push(u);
|
|
2593
2593
|
});
|
|
2594
2594
|
};
|
|
2595
|
-
s ? l(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => l(f)), (
|
|
2595
|
+
s ? l(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((f) => l(f)), (i = (a = this.options.preload) == null ? void 0 : a.forEach) == null || i.call(a, (c) => l(c)), this.services.backendConnector.load(o, this.options.ns, (c) => {
|
|
2596
2596
|
!c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(c);
|
|
2597
2597
|
});
|
|
2598
2598
|
} else
|
|
@@ -2600,14 +2600,14 @@ class Ne extends nt {
|
|
|
2600
2600
|
}
|
|
2601
2601
|
reloadResources(e, t, r) {
|
|
2602
2602
|
const s = Ce();
|
|
2603
|
-
return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = He), this.services.backendConnector.reload(e, t, (
|
|
2604
|
-
s.resolve(), r(
|
|
2603
|
+
return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = He), this.services.backendConnector.reload(e, t, (a) => {
|
|
2604
|
+
s.resolve(), r(a);
|
|
2605
2605
|
}), s;
|
|
2606
2606
|
}
|
|
2607
2607
|
use(e) {
|
|
2608
2608
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
2609
2609
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
2610
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
2610
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && yr.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
2611
2611
|
}
|
|
2612
2612
|
setResolvedLanguage(e) {
|
|
2613
2613
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -2627,27 +2627,27 @@ class Ne extends nt {
|
|
|
2627
2627
|
this.emit("languageChanging", e);
|
|
2628
2628
|
const s = (o) => {
|
|
2629
2629
|
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
2630
|
-
},
|
|
2630
|
+
}, a = (o, l) => {
|
|
2631
2631
|
l ? this.isLanguageChangingTo === e && (s(l), this.translator.changeLanguage(l), this.isLanguageChangingTo = void 0, this.emit("languageChanged", l), this.logger.log("languageChanged", l)) : this.isLanguageChangingTo = void 0, r.resolve((...c) => this.t(...c)), t && t(o, (...c) => this.t(...c));
|
|
2632
|
-
},
|
|
2632
|
+
}, i = (o) => {
|
|
2633
2633
|
var f, u;
|
|
2634
2634
|
!e && !o && this.services.languageDetector && (o = []);
|
|
2635
2635
|
const l = H(o) ? o : o && o[0], c = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(H(o) ? [o] : o);
|
|
2636
2636
|
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), (u = (f = this.services.languageDetector) == null ? void 0 : f.cacheUserLanguage) == null || u.call(f, c)), this.loadResources(c, (p) => {
|
|
2637
|
-
|
|
2637
|
+
a(p, c);
|
|
2638
2638
|
});
|
|
2639
2639
|
};
|
|
2640
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
2640
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? i(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(i) : this.services.languageDetector.detect(i) : i(e), r;
|
|
2641
2641
|
}
|
|
2642
2642
|
getFixedT(e, t, r) {
|
|
2643
|
-
const s = (
|
|
2643
|
+
const s = (a, i, ...o) => {
|
|
2644
2644
|
let l;
|
|
2645
|
-
typeof
|
|
2646
|
-
...
|
|
2645
|
+
typeof i != "object" ? l = this.options.overloadTranslationOptionHandler([a, i].concat(o)) : l = {
|
|
2646
|
+
...i
|
|
2647
2647
|
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || r || s.keyPrefix);
|
|
2648
2648
|
const c = this.options.keySeparator || ".";
|
|
2649
2649
|
let f;
|
|
2650
|
-
return l.keyPrefix && Array.isArray(
|
|
2650
|
+
return l.keyPrefix && Array.isArray(a) ? f = a.map((u) => `${l.keyPrefix}${c}${u}`) : f = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, this.t(f, l);
|
|
2651
2651
|
};
|
|
2652
2652
|
return H(e) ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = r, s;
|
|
2653
2653
|
}
|
|
@@ -2667,17 +2667,17 @@ class Ne extends nt {
|
|
|
2667
2667
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
2668
2668
|
if (!this.languages || !this.languages.length)
|
|
2669
2669
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
2670
|
-
const r = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1,
|
|
2670
|
+
const r = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
2671
2671
|
if (r.toLowerCase() === "cimode") return !0;
|
|
2672
|
-
const
|
|
2672
|
+
const i = (o, l) => {
|
|
2673
2673
|
const c = this.services.backendConnector.state[`${o}|${l}`];
|
|
2674
2674
|
return c === -1 || c === 0 || c === 2;
|
|
2675
2675
|
};
|
|
2676
2676
|
if (t.precheck) {
|
|
2677
|
-
const o = t.precheck(this,
|
|
2677
|
+
const o = t.precheck(this, i);
|
|
2678
2678
|
if (o !== void 0) return o;
|
|
2679
2679
|
}
|
|
2680
|
-
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages ||
|
|
2680
|
+
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || i(r, e) && (!s || i(a, e)));
|
|
2681
2681
|
}
|
|
2682
2682
|
loadNamespaces(e, t) {
|
|
2683
2683
|
const r = Ce();
|
|
@@ -2690,15 +2690,15 @@ class Ne extends nt {
|
|
|
2690
2690
|
loadLanguages(e, t) {
|
|
2691
2691
|
const r = Ce();
|
|
2692
2692
|
H(e) && (e = [e]);
|
|
2693
|
-
const s = this.options.preload || [],
|
|
2694
|
-
return
|
|
2695
|
-
r.resolve(), t && t(
|
|
2693
|
+
const s = this.options.preload || [], a = e.filter((i) => s.indexOf(i) < 0 && this.services.languageUtils.isSupportedCode(i));
|
|
2694
|
+
return a.length ? (this.options.preload = s.concat(a), this.loadResources((i) => {
|
|
2695
|
+
r.resolve(), t && t(i);
|
|
2696
2696
|
}), r) : (t && t(), Promise.resolve());
|
|
2697
2697
|
}
|
|
2698
2698
|
dir(e) {
|
|
2699
|
-
var s,
|
|
2699
|
+
var s, a;
|
|
2700
2700
|
if (e || (e = this.resolvedLanguage || (((s = this.languages) == null ? void 0 : s.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
2701
|
-
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = ((
|
|
2701
|
+
const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = ((a = this.services) == null ? void 0 : a.languageUtils) || new Zt(nr());
|
|
2702
2702
|
return t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
2703
2703
|
}
|
|
2704
2704
|
static createInstance(e = {}, t) {
|
|
@@ -2711,26 +2711,26 @@ class Ne extends nt {
|
|
|
2711
2711
|
...this.options,
|
|
2712
2712
|
...e,
|
|
2713
2713
|
isClone: !0
|
|
2714
|
-
},
|
|
2715
|
-
if ((e.debug !== void 0 || e.prefix !== void 0) && (
|
|
2716
|
-
|
|
2717
|
-
}),
|
|
2714
|
+
}, a = new Ne(s);
|
|
2715
|
+
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
|
|
2716
|
+
a[o] = this[o];
|
|
2717
|
+
}), a.services = {
|
|
2718
2718
|
...this.services
|
|
2719
|
-
},
|
|
2720
|
-
hasLoadedNamespace:
|
|
2719
|
+
}, a.services.utils = {
|
|
2720
|
+
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
2721
2721
|
}, r) {
|
|
2722
2722
|
const o = Object.keys(this.store.data).reduce((l, c) => (l[c] = {
|
|
2723
2723
|
...this.store.data[c]
|
|
2724
2724
|
}, l[c] = Object.keys(l[c]).reduce((f, u) => (f[u] = {
|
|
2725
2725
|
...l[c][u]
|
|
2726
2726
|
}, f), l[c]), l), {});
|
|
2727
|
-
|
|
2727
|
+
a.store = new zt(o, s), a.services.resourceStore = a.store;
|
|
2728
2728
|
}
|
|
2729
|
-
return
|
|
2730
|
-
|
|
2731
|
-
}),
|
|
2732
|
-
hasLoadedNamespace:
|
|
2733
|
-
},
|
|
2729
|
+
return a.translator = new Xe(a.services, s), a.translator.on("*", (o, ...l) => {
|
|
2730
|
+
a.emit(o, ...l);
|
|
2731
|
+
}), a.init(s, t), a.translator.options = s, a.translator.backendConnector.services.utils = {
|
|
2732
|
+
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
2733
|
+
}, a;
|
|
2734
2734
|
}
|
|
2735
2735
|
toJSON() {
|
|
2736
2736
|
return {
|
|
@@ -2758,45 +2758,45 @@ se.setDefaultNamespace;
|
|
|
2758
2758
|
se.hasLoadedNamespace;
|
|
2759
2759
|
se.loadNamespaces;
|
|
2760
2760
|
se.loadLanguages;
|
|
2761
|
-
const
|
|
2761
|
+
const vn = { Friday: "Venerdì", FridayShort: "Ven", Monday: "Lunedì", MondayShort: "Lun", Saturday: "Sabato", SaturdayShort: "Sab", Sunday: "Domenica", SundayShort: "Dom", Tuesday: "Martedì", TuesdayShort: "Mar", Thursday: "Giovedì", ThursdayShort: "Gio", Wednesday: "Mercoledì", WednesdayShort: "Mer" }, bn = { April: "Aprile", August: "Agosto", December: "Dicembre", February: "Febbraio", January: "Gennaio", June: "Giugno", July: "Luglio", March: "Marzo", May: "Maggio", October: "Ottobre", November: "Novembre", September: "Settembre" }, xn = { CalendarFor: "Calendario per", Close: "Chiudi", SpotlightDefaultPlaceholder: "Esegui Comando" }, Sn = {
|
|
2762
2762
|
Date: { NextDay: "Giorno Successivo", NextMonth: "Mese Successivo", NextWeek: "Settimana Successiva", NextYear: "Anno Successivo", PreviousDay: "Giorno Precedente", PreviousMonth: "Mese Precedente", PreviousWeek: "Settimana Precedente", PreviousYear: "Anno Precedente", Today: "Oggi", Tomorrow: "Domani", Yesterday: "Ieri" },
|
|
2763
|
-
Day:
|
|
2764
|
-
Month:
|
|
2765
|
-
Generic:
|
|
2766
|
-
},
|
|
2763
|
+
Day: vn,
|
|
2764
|
+
Month: bn,
|
|
2765
|
+
Generic: xn
|
|
2766
|
+
}, En = { Friday: "Friday", FridayShort: "Fri", Monday: "Monday", MondayShort: "Mon", Saturday: "Saturday", SaturdayShort: "Sat", Sunday: "Sunday", SundayShort: "Sun", Tuesday: "Tuesday", TuesdayShort: "Tue", Thursday: "Thursday", ThursdayShort: "Thu", Wednesday: "Wednesday", WednesdayShort: "Wed" }, _n = { April: "April", August: "August", December: "December", February: "February", January: "January", July: "July", June: "June", March: "March", May: "May", November: "November", October: "October", September: "September" }, wn = { CalendarFor: "Calendar for", Close: "Close", SpotlightDefaultPlaceholder: "Execute Command" }, On = {
|
|
2767
2767
|
Date: { NextDay: "Next Day", NextMonth: "Next Month", NextWeek: "Next Week", NextYear: "Next Year", PreviousDay: "Previous Day", PreviousMonth: "Previous Month", PreviousWeek: "Previous Week", PreviousYear: "Previous Year", Today: "Today", Tomorrow: "Tomorrow", Yesterday: "Yesterday" },
|
|
2768
|
-
Day:
|
|
2769
|
-
Month:
|
|
2770
|
-
Generic:
|
|
2768
|
+
Day: En,
|
|
2769
|
+
Month: _n,
|
|
2770
|
+
Generic: wn
|
|
2771
2771
|
};
|
|
2772
|
-
function
|
|
2773
|
-
return new RegExp(
|
|
2772
|
+
function ar(n, e) {
|
|
2773
|
+
return new RegExp(Tn(n), e);
|
|
2774
2774
|
}
|
|
2775
|
-
function
|
|
2775
|
+
function Tn(n) {
|
|
2776
2776
|
return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2777
2777
|
}
|
|
2778
|
-
function
|
|
2778
|
+
function Rn(n, e, t, r) {
|
|
2779
2779
|
let s = e;
|
|
2780
|
-
const
|
|
2780
|
+
const a = Dn(n, t);
|
|
2781
2781
|
if (!s) {
|
|
2782
|
-
const o = Math.abs(
|
|
2782
|
+
const o = Math.abs(a);
|
|
2783
2783
|
o - Math.floor(o) ? s = "0,0.00" : s = "0,0";
|
|
2784
2784
|
}
|
|
2785
|
-
const
|
|
2786
|
-
return new Intl.NumberFormat(r,
|
|
2785
|
+
const i = Pn(s);
|
|
2786
|
+
return new Intl.NumberFormat(r, i).format(a);
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2789
|
-
let
|
|
2790
|
-
if (typeof
|
|
2788
|
+
function Dn(n, e, t, r, s) {
|
|
2789
|
+
let a = n;
|
|
2790
|
+
if (typeof a != "number") {
|
|
2791
2791
|
let o;
|
|
2792
2792
|
e && r === void 0 ? o = "," : o = ".";
|
|
2793
2793
|
const l = o == "." ? "," : ".";
|
|
2794
|
-
|
|
2794
|
+
a = a.replace(ar(l, "g"), ""), a = a.replace(ar(o, "g"), "."), a = Number(a);
|
|
2795
2795
|
}
|
|
2796
|
-
const
|
|
2797
|
-
return isNaN(
|
|
2796
|
+
const i = Number(a);
|
|
2797
|
+
return isNaN(i) ? NaN : i;
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2799
|
+
function Pn(n) {
|
|
2800
2800
|
const e = {};
|
|
2801
2801
|
n.includes(",") ? e.useGrouping = !0 : e.useGrouping = !1;
|
|
2802
2802
|
const t = n.indexOf(".");
|
|
@@ -2818,15 +2818,15 @@ se.init({
|
|
|
2818
2818
|
try {
|
|
2819
2819
|
switch (s) {
|
|
2820
2820
|
case "date": {
|
|
2821
|
-
const
|
|
2821
|
+
const a = n instanceof Date ? n : new Date(n);
|
|
2822
2822
|
return new Intl.DateTimeFormat(t, {
|
|
2823
2823
|
dateStyle: e || "short"
|
|
2824
|
-
}).format(
|
|
2824
|
+
}).format(a);
|
|
2825
2825
|
}
|
|
2826
2826
|
default:
|
|
2827
2827
|
case "number": {
|
|
2828
|
-
const
|
|
2829
|
-
return
|
|
2828
|
+
const a = (r == null ? void 0 : r.inputIsLocalized) ?? !1;
|
|
2829
|
+
return Rn(n, e, a, t);
|
|
2830
2830
|
}
|
|
2831
2831
|
}
|
|
2832
2832
|
} catch {
|
|
@@ -2836,37 +2836,32 @@ se.init({
|
|
|
2836
2836
|
},
|
|
2837
2837
|
resources: {
|
|
2838
2838
|
en: {
|
|
2839
|
-
translation:
|
|
2839
|
+
translation: On
|
|
2840
2840
|
},
|
|
2841
2841
|
it: {
|
|
2842
|
-
translation:
|
|
2842
|
+
translation: Sn
|
|
2843
2843
|
}
|
|
2844
2844
|
}
|
|
2845
2845
|
});
|
|
2846
|
-
const
|
|
2846
|
+
const An = (n, e, t, r) => se.format(n, e, t || se.language, r), Cn = (n, e) => se.t(n, e);
|
|
2847
2847
|
function st() {
|
|
2848
2848
|
const n = Oe(
|
|
2849
|
-
(r, s,
|
|
2849
|
+
(r, s, a, i) => An(r, s, a || void 0, i),
|
|
2850
2850
|
[]
|
|
2851
2851
|
), e = Oe(() => se.languages[0], []), t = Oe(
|
|
2852
|
-
(r, s) =>
|
|
2852
|
+
(r, s) => Cn(r, s),
|
|
2853
2853
|
[]
|
|
2854
2854
|
);
|
|
2855
2855
|
return { format: n, getCurrentLanguage: e, translate: t };
|
|
2856
2856
|
}
|
|
2857
|
-
const je = (n) => n == null ? !1 : typeof n == "string" ? n.toLocaleLowerCase() == "yes" : n
|
|
2858
|
-
function ar(n) {
|
|
2859
|
-
if (n)
|
|
2860
|
-
return n.toLowerCase();
|
|
2861
|
-
}
|
|
2862
|
-
const is = ({
|
|
2857
|
+
const je = (n) => n == null ? !1 : typeof n == "string" ? n.toLocaleLowerCase() == "yes" : n, ss = ({
|
|
2863
2858
|
ColumnsNumber: n = 1,
|
|
2864
2859
|
data: e = {},
|
|
2865
2860
|
ForceText: t,
|
|
2866
2861
|
TextColName: r,
|
|
2867
2862
|
TextColor: s = "var(--smp-dashList-color-base)",
|
|
2868
|
-
Fillspace:
|
|
2869
|
-
FontSize:
|
|
2863
|
+
Fillspace: a,
|
|
2864
|
+
FontSize: i,
|
|
2870
2865
|
Horizontal: o,
|
|
2871
2866
|
ForceIcon: l,
|
|
2872
2867
|
IconColName: c,
|
|
@@ -2881,7 +2876,7 @@ const is = ({
|
|
|
2881
2876
|
SelectLayout: x = "1",
|
|
2882
2877
|
onClick: O
|
|
2883
2878
|
}) => {
|
|
2884
|
-
const D = "N/A", v = (e == null ? void 0 : e.columns) || [], A = (e == null ? void 0 : e.rows) || [], j = A.length > 0, Y = "--smp-dashList-color", F = "smp-layout", C = "descr", M = "icon", U = "um", J = "value", K =
|
|
2879
|
+
const D = "N/A", v = (e == null ? void 0 : e.columns) || [], A = (e == null ? void 0 : e.rows) || [], j = A.length > 0, Y = "--smp-dashList-color", F = "smp-layout", C = "descr", M = "icon", U = "um", J = "value", K = i || "1em", ne = "18px", z = "--smp-dashList-columns", V = "--smp-dashList-fontSize", B = {
|
|
2885
2880
|
dash: (N = "1") => {
|
|
2886
2881
|
const G = d(N), ee = Ae[G], te = m(G, C), le = m(G, M), ge = m(G, U), ce = m(G, J);
|
|
2887
2882
|
return {
|
|
@@ -2892,7 +2887,7 @@ const is = ({
|
|
|
2892
2887
|
value: ce
|
|
2893
2888
|
};
|
|
2894
2889
|
},
|
|
2895
|
-
dashList: `${Ae["smp-dash-list"]} ${je(
|
|
2890
|
+
dashList: `${Ae["smp-dash-list"]} ${je(a) ? Ae["smp-dash-list-fill-space"] : ""}
|
|
2896
2891
|
${je(o) ? Ae["smp-dash-list-horizontal"] : ""}`
|
|
2897
2892
|
}, { format: k } = st(), d = (N) => `${F}-${N}`, m = (N, G) => Ae[`${N}__${G}`], b = (N) => `${Y}-${N}`, _ = (N) => {
|
|
2898
2893
|
const G = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
@@ -2973,7 +2968,7 @@ const is = ({
|
|
|
2973
2968
|
style: ge,
|
|
2974
2969
|
tabIndex: 0,
|
|
2975
2970
|
onClick: () => I(N),
|
|
2976
|
-
onKeyDown: (
|
|
2971
|
+
onKeyDown: (_r) => L(_r, N),
|
|
2977
2972
|
children: ce
|
|
2978
2973
|
},
|
|
2979
2974
|
N.id
|
|
@@ -2995,7 +2990,7 @@ const is = ({
|
|
|
2995
2990
|
SPOTLIGHT: "SPL",
|
|
2996
2991
|
TEXT_FIELD: "ITX",
|
|
2997
2992
|
PASSWORD: "PWD"
|
|
2998
|
-
},
|
|
2993
|
+
}, Ln = (n) => n.t == "D8", kn = (n) => {
|
|
2999
2994
|
if (n) {
|
|
3000
2995
|
const e = n.split(";");
|
|
3001
2996
|
if (e.length == 3)
|
|
@@ -3033,7 +3028,7 @@ class Ze {
|
|
|
3033
3028
|
return this.value ? "true" : "false";
|
|
3034
3029
|
}
|
|
3035
3030
|
}
|
|
3036
|
-
function
|
|
3031
|
+
function $n(n, e) {
|
|
3037
3032
|
if (Et(n)) {
|
|
3038
3033
|
const f = new Date(n);
|
|
3039
3034
|
if (!isNaN(f.getTime()))
|
|
@@ -3042,7 +3037,7 @@ function jn(n, e) {
|
|
|
3042
3037
|
const t = /* @__PURE__ */ new Date(), r = n.replaceAll("/", "").replaceAll("-", "");
|
|
3043
3038
|
let s = "DDMMYYYY";
|
|
3044
3039
|
e === "en" && (s = "MMDDYYYY");
|
|
3045
|
-
const
|
|
3040
|
+
const a = s.indexOf("DD"), i = s.indexOf("MM");
|
|
3046
3041
|
let o = 0, l = 0, c = "";
|
|
3047
3042
|
switch (r.length) {
|
|
3048
3043
|
case 1:
|
|
@@ -3050,18 +3045,18 @@ function jn(n, e) {
|
|
|
3050
3045
|
return o = parseInt(r), t.setDate(o), qe(t) ? t : n;
|
|
3051
3046
|
case 3:
|
|
3052
3047
|
case 4:
|
|
3053
|
-
return o = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)),
|
|
3048
|
+
return o = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), i === 0 ? (t.setDate(l), t.setMonth(o - 1)) : a === 0 && (t.setDate(o), t.setMonth(l - 1)), qe(t) ? t : n;
|
|
3054
3049
|
case 5:
|
|
3055
3050
|
case 6: {
|
|
3056
3051
|
o = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), Number(r.substring(4)) > 50 ? c = "19" + r.substring(4) : c = "20" + r.substring(4);
|
|
3057
3052
|
let f = 0, u = 0;
|
|
3058
|
-
return
|
|
3053
|
+
return i === 0 ? (f = l, u = o - 1, t.setFullYear(parseInt(c), u, f)) : a === 0 && (f = o, u = l - 1, t.setFullYear(parseInt(c), u, f)), bt(o, u, parseInt(c)) && qe(t) ? t : n;
|
|
3059
3054
|
}
|
|
3060
3055
|
case 7:
|
|
3061
3056
|
case 8: {
|
|
3062
3057
|
o = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), c = r.substring(4);
|
|
3063
3058
|
let f = 0, u = 0;
|
|
3064
|
-
return
|
|
3059
|
+
return i === 0 ? (f = l, u = o - 1, t.setFullYear(parseInt(c), u, f)) : a === 0 && (f = o, u = l - 1, t.setFullYear(parseInt(c), u, f)), bt(f, u, parseInt(c)) && qe(t) ? t : n;
|
|
3065
3060
|
}
|
|
3066
3061
|
}
|
|
3067
3062
|
return n;
|
|
@@ -3072,7 +3067,7 @@ function Et(n) {
|
|
|
3072
3067
|
function qe(n) {
|
|
3073
3068
|
return n instanceof Date && !isNaN(n.getTime());
|
|
3074
3069
|
}
|
|
3075
|
-
function
|
|
3070
|
+
function jn(n) {
|
|
3076
3071
|
if (!/^\d{8}$/.test(n)) return !1;
|
|
3077
3072
|
const e = parseInt(n.slice(0, 4), 10), t = parseInt(n.slice(4, 6), 10), r = parseInt(n.slice(6, 8), 10);
|
|
3078
3073
|
return bt(r, t - 1, e);
|
|
@@ -3081,7 +3076,7 @@ function bt(n, e, t) {
|
|
|
3081
3076
|
const r = [
|
|
3082
3077
|
31,
|
|
3083
3078
|
// January
|
|
3084
|
-
|
|
3079
|
+
In(t) ? 29 : 28,
|
|
3085
3080
|
// February
|
|
3086
3081
|
31,
|
|
3087
3082
|
// March
|
|
@@ -3106,10 +3101,10 @@ function bt(n, e, t) {
|
|
|
3106
3101
|
];
|
|
3107
3102
|
return !(e < 0 || e > 11 || n < 1 || n > r[e]);
|
|
3108
3103
|
}
|
|
3109
|
-
function
|
|
3104
|
+
function In(n) {
|
|
3110
3105
|
return n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0);
|
|
3111
3106
|
}
|
|
3112
|
-
function
|
|
3107
|
+
function Nn(n) {
|
|
3113
3108
|
const e = n.getFullYear(), t = String(n.getMonth() + 1).padStart(2, "0"), r = String(n.getDate()).padStart(2, "0");
|
|
3114
3109
|
return isNaN(e) || isNaN(Number(t)) || isNaN(Number(r)) ? n.toString() : `${e}-${t}-${r}`;
|
|
3115
3110
|
}
|
|
@@ -3120,13 +3115,13 @@ class Qe {
|
|
|
3120
3115
|
this.class = e, this.date = t;
|
|
3121
3116
|
}
|
|
3122
3117
|
static fromDataObj(e) {
|
|
3123
|
-
const t =
|
|
3118
|
+
const t = ir.get(`${e.t}${e.p}`);
|
|
3124
3119
|
if (t)
|
|
3125
3120
|
return new Qe(e, t.legacyToIso(e.k));
|
|
3126
3121
|
throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`);
|
|
3127
3122
|
}
|
|
3128
3123
|
getLegacyValue() {
|
|
3129
|
-
const e =
|
|
3124
|
+
const e = ir.get(`${this.class.t}${this.class.p}`);
|
|
3130
3125
|
if (e)
|
|
3131
3126
|
return e.isoToLegacy(this.date);
|
|
3132
3127
|
throw new Error(
|
|
@@ -3137,12 +3132,12 @@ class Qe {
|
|
|
3137
3132
|
return this.date;
|
|
3138
3133
|
}
|
|
3139
3134
|
}
|
|
3140
|
-
const
|
|
3135
|
+
const ir = /* @__PURE__ */ new Map([
|
|
3141
3136
|
[
|
|
3142
3137
|
"D8*YYMD",
|
|
3143
3138
|
{
|
|
3144
3139
|
legacyToIso(n) {
|
|
3145
|
-
return
|
|
3140
|
+
return jn(n) && `${n.substring(0, 4)}-${n.substring(4, 6)}-${n.substring(6, 8)}` || n;
|
|
3146
3141
|
},
|
|
3147
3142
|
isoToLegacy(n) {
|
|
3148
3143
|
return Et(n) && n.replaceAll("-", "") || n;
|
|
@@ -3163,14 +3158,14 @@ function _t({
|
|
|
3163
3158
|
position: n = "bottom",
|
|
3164
3159
|
enabled: e = !0
|
|
3165
3160
|
}) {
|
|
3166
|
-
const t = xe(null), r = xe(null), [s,
|
|
3161
|
+
const t = xe(null), r = xe(null), [s, a] = Q(0), i = Oe(() => {
|
|
3167
3162
|
const o = t.current, l = r.current;
|
|
3168
3163
|
if (!o || !l) return;
|
|
3169
3164
|
const { top: c, left: f, width: u, height: p } = o.getBoundingClientRect();
|
|
3170
|
-
|
|
3165
|
+
a(u);
|
|
3171
3166
|
const h = l.offsetHeight, g = l.offsetWidth;
|
|
3172
3167
|
if (g === 0 || h === 0) {
|
|
3173
|
-
requestAnimationFrame(
|
|
3168
|
+
requestAnimationFrame(i);
|
|
3174
3169
|
return;
|
|
3175
3170
|
}
|
|
3176
3171
|
let y = c + window.scrollY, E = f + window.scrollX;
|
|
@@ -3192,15 +3187,15 @@ function _t({
|
|
|
3192
3187
|
l.style.transform = `translate(${E}px, ${y}px)`;
|
|
3193
3188
|
});
|
|
3194
3189
|
}, [n]);
|
|
3195
|
-
return
|
|
3196
|
-
e && t.current && r.current &&
|
|
3190
|
+
return Tr(() => {
|
|
3191
|
+
e && t.current && r.current && i();
|
|
3197
3192
|
const o = new MutationObserver(() => {
|
|
3198
|
-
r.current &&
|
|
3193
|
+
r.current && i();
|
|
3199
3194
|
});
|
|
3200
|
-
return r.current && o.observe(r.current, { childList: !0, subtree: !0 }), window.addEventListener("resize",
|
|
3201
|
-
window.removeEventListener("resize",
|
|
3195
|
+
return r.current && o.observe(r.current, { childList: !0, subtree: !0 }), window.addEventListener("resize", i), window.addEventListener("scroll", i, !0), () => {
|
|
3196
|
+
window.removeEventListener("resize", i), window.removeEventListener("scroll", i, !0), o.disconnect();
|
|
3202
3197
|
};
|
|
3203
|
-
}, [
|
|
3198
|
+
}, [i, e]), { anchorRef: t, targetRef: r, anchorWidth: s };
|
|
3204
3199
|
}
|
|
3205
3200
|
const tt = (n, e, t) => {
|
|
3206
3201
|
if (t)
|
|
@@ -3222,7 +3217,7 @@ const tt = (n, e, t) => {
|
|
|
3222
3217
|
"smp-helper-text-danger": "_smp-helper-text-danger_10pis_9",
|
|
3223
3218
|
"smp-helper-text-warning": "_smp-helper-text-warning_10pis_13",
|
|
3224
3219
|
"smp-helper-text-disabled": "_smp-helper-text-disabled_10pis_17"
|
|
3225
|
-
},
|
|
3220
|
+
}, Mn = ({
|
|
3226
3221
|
helperText: n,
|
|
3227
3222
|
disabled: e,
|
|
3228
3223
|
state: t
|
|
@@ -3231,12 +3226,12 @@ const tt = (n, e, t) => {
|
|
|
3231
3226
|
container: `${ht["smp-helper-text"]} ${e ? ht["smp-helper-text-disabled"] : ""} ${t ? ht[`smp-helper-text-${t}`] : ""}`
|
|
3232
3227
|
};
|
|
3233
3228
|
return /* @__PURE__ */ w.jsx("span", { className: r.container, children: n });
|
|
3234
|
-
},
|
|
3229
|
+
}, or = {
|
|
3235
3230
|
"smp-label": "_smp-label_3ywt3_1",
|
|
3236
3231
|
"smp-label-disabled": "_smp-label-disabled_3ywt3_5"
|
|
3237
|
-
},
|
|
3232
|
+
}, Fn = ({ label: n, disabled: e }) => {
|
|
3238
3233
|
const t = {
|
|
3239
|
-
container: `${
|
|
3234
|
+
container: `${or["smp-label"]} ${e ? or["smp-label-disabled"] : ""}`
|
|
3240
3235
|
};
|
|
3241
3236
|
return /* @__PURE__ */ w.jsx("span", { className: t.container, children: n });
|
|
3242
3237
|
}, me = {
|
|
@@ -3258,8 +3253,8 @@ const tt = (n, e, t) => {
|
|
|
3258
3253
|
bindValue: t,
|
|
3259
3254
|
icon: r,
|
|
3260
3255
|
onBlur: s,
|
|
3261
|
-
onChange:
|
|
3262
|
-
placeholder:
|
|
3256
|
+
onChange: a,
|
|
3257
|
+
placeholder: i,
|
|
3263
3258
|
shapeIcon: o,
|
|
3264
3259
|
sizing: l,
|
|
3265
3260
|
state: c,
|
|
@@ -3276,14 +3271,14 @@ const tt = (n, e, t) => {
|
|
|
3276
3271
|
error: D
|
|
3277
3272
|
}) => {
|
|
3278
3273
|
const v = D ? "danger" : c, A = D || c == "danger" ? "error" : o, j = O || !!D, Y = (C) => {
|
|
3279
|
-
|
|
3274
|
+
a == null || a(C.target.value);
|
|
3280
3275
|
}, F = {
|
|
3281
3276
|
wrapper: `${me["smp-textfield-wrapper"]}`,
|
|
3282
|
-
container: `${me["smp-textfield"]} ${n ? me["smp-textfield-disabled"] : ""} ${e ? me["smp-textfield-readOnly"] : ""} ${
|
|
3277
|
+
container: `${me["smp-textfield"]} ${n ? me["smp-textfield-disabled"] : ""} ${e ? me["smp-textfield-readOnly"] : ""} ${i ? me["smp-textfield-placeholder"] : ""} ${l ? me[`smp-textfield-${l}`] : ""} ${v ? me[`smp-textfield-${v}`] : ""} ${f ? me[`smp-textfield-variant-${f}`] : ""}`,
|
|
3283
3278
|
input: `${me["smp-textfield-input"]}`
|
|
3284
3279
|
};
|
|
3285
3280
|
return /* @__PURE__ */ w.jsxs("div", { className: F.wrapper, children: [
|
|
3286
|
-
x && /* @__PURE__ */ w.jsx(
|
|
3281
|
+
x && /* @__PURE__ */ w.jsx(Fn, { label: x, disabled: n }),
|
|
3287
3282
|
/* @__PURE__ */ w.jsxs("div", { className: F.container, ref: h, children: [
|
|
3288
3283
|
r && /* @__PURE__ */ w.jsx(ve, { icon: r, disabled: n }),
|
|
3289
3284
|
/* @__PURE__ */ w.jsx(
|
|
@@ -3291,7 +3286,7 @@ const tt = (n, e, t) => {
|
|
|
3291
3286
|
{
|
|
3292
3287
|
type: E,
|
|
3293
3288
|
value: t,
|
|
3294
|
-
placeholder:
|
|
3289
|
+
placeholder: i,
|
|
3295
3290
|
onChange: Y,
|
|
3296
3291
|
onBlur: s,
|
|
3297
3292
|
className: F.input,
|
|
@@ -3314,7 +3309,7 @@ const tt = (n, e, t) => {
|
|
|
3314
3309
|
)
|
|
3315
3310
|
] }),
|
|
3316
3311
|
j && /* @__PURE__ */ w.jsx(
|
|
3317
|
-
|
|
3312
|
+
Mn,
|
|
3318
3313
|
{
|
|
3319
3314
|
helperText: D,
|
|
3320
3315
|
disabled: n,
|
|
@@ -3323,13 +3318,13 @@ const tt = (n, e, t) => {
|
|
|
3323
3318
|
)
|
|
3324
3319
|
] });
|
|
3325
3320
|
};
|
|
3326
|
-
function
|
|
3321
|
+
function Vn({
|
|
3327
3322
|
items: n,
|
|
3328
3323
|
itemHeight: e,
|
|
3329
3324
|
containerHeight: t,
|
|
3330
3325
|
overscan: r = 5
|
|
3331
3326
|
}) {
|
|
3332
|
-
const [s,
|
|
3327
|
+
const [s, a] = Q(0), i = xe(null), o = n.length * e, l = Math.max(0, Math.floor(s / e) - r), c = Math.min(
|
|
3333
3328
|
n.length - 1,
|
|
3334
3329
|
Math.floor((s + t) / e) + r
|
|
3335
3330
|
), f = [];
|
|
@@ -3341,16 +3336,16 @@ function Yn({
|
|
|
3341
3336
|
});
|
|
3342
3337
|
const u = Oe((h) => {
|
|
3343
3338
|
const g = h.target.scrollTop;
|
|
3344
|
-
|
|
3339
|
+
a(g);
|
|
3345
3340
|
}, []), p = (h) => {
|
|
3346
|
-
if (!
|
|
3347
|
-
const g = h * e, y = g + e, E =
|
|
3341
|
+
if (!i.current) return;
|
|
3342
|
+
const g = h * e, y = g + e, E = i.current, R = E.scrollTop, x = R + t;
|
|
3348
3343
|
g < R ? E.scrollTop = g : y > x && (E.scrollTop = y - t);
|
|
3349
3344
|
};
|
|
3350
3345
|
return {
|
|
3351
3346
|
virtualItems: f,
|
|
3352
3347
|
containerProps: {
|
|
3353
|
-
ref:
|
|
3348
|
+
ref: i,
|
|
3354
3349
|
style: {
|
|
3355
3350
|
maxHeight: `${t}px`,
|
|
3356
3351
|
overflowY: "auto",
|
|
@@ -3376,15 +3371,15 @@ function Yn({
|
|
|
3376
3371
|
scrollToIndex: p
|
|
3377
3372
|
};
|
|
3378
3373
|
}
|
|
3379
|
-
const
|
|
3374
|
+
const Yn = 10, vr = ({
|
|
3380
3375
|
id: n,
|
|
3381
3376
|
options: e,
|
|
3382
3377
|
displayMode: t,
|
|
3383
3378
|
ref: r,
|
|
3384
3379
|
showFilter: s,
|
|
3385
|
-
selectedIndex:
|
|
3380
|
+
selectedIndex: a = null,
|
|
3386
3381
|
// current outline element
|
|
3387
|
-
activeIndex:
|
|
3382
|
+
activeIndex: i = [],
|
|
3388
3383
|
// active element
|
|
3389
3384
|
width: o,
|
|
3390
3385
|
onClick: l,
|
|
@@ -3392,20 +3387,20 @@ const Un = 10, br = ({
|
|
|
3392
3387
|
}) => {
|
|
3393
3388
|
var C;
|
|
3394
3389
|
const [f, u] = Q(""), p = 24, [h, g] = Q(
|
|
3395
|
-
|
|
3396
|
-
), y = s !== void 0 ? s : e.length >
|
|
3390
|
+
a !== null ? a : -1
|
|
3391
|
+
), y = s !== void 0 ? s : e.length > Yn, E = f ? e.filter(
|
|
3397
3392
|
(M) => M.label.toLowerCase().includes(f.toLowerCase())
|
|
3398
3393
|
) : e, R = (M) => {
|
|
3399
3394
|
u(M);
|
|
3400
|
-
}, { virtualItems: x, containerProps: O, innerProps: D, scrollToIndex: v } =
|
|
3395
|
+
}, { virtualItems: x, containerProps: O, innerProps: D, scrollToIndex: v } = Vn({
|
|
3401
3396
|
items: E,
|
|
3402
3397
|
itemHeight: p,
|
|
3403
3398
|
containerHeight: 200,
|
|
3404
3399
|
overscan: 5
|
|
3405
3400
|
});
|
|
3406
3401
|
he(() => {
|
|
3407
|
-
|
|
3408
|
-
}, [
|
|
3402
|
+
a !== null && a !== h && g(a);
|
|
3403
|
+
}, [a]), he(() => {
|
|
3409
3404
|
h >= 0 && h < E.length && v(h);
|
|
3410
3405
|
}, [h, E]);
|
|
3411
3406
|
const A = (M) => {
|
|
@@ -3455,7 +3450,7 @@ const Un = 10, br = ({
|
|
|
3455
3450
|
onKeyDown: Y,
|
|
3456
3451
|
"aria-activedescendant": h >= 0 && h < E.length ? (C = E[h]) == null ? void 0 : C.id : void 0,
|
|
3457
3452
|
children: /* @__PURE__ */ w.jsx("div", { ...D, className: F.virtualScroll, children: x.map(({ item: M, index: U, offsetTop: J }) => {
|
|
3458
|
-
const K =
|
|
3453
|
+
const K = i.includes(M.id);
|
|
3459
3454
|
return (
|
|
3460
3455
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
3461
3456
|
/* @__PURE__ */ w.jsxs(
|
|
@@ -3490,23 +3485,23 @@ const Un = 10, br = ({
|
|
|
3490
3485
|
]
|
|
3491
3486
|
}
|
|
3492
3487
|
);
|
|
3493
|
-
},
|
|
3488
|
+
}, br = ({
|
|
3494
3489
|
displayMode: n,
|
|
3495
3490
|
bindValue: e,
|
|
3496
3491
|
optionalDisplayValue: t,
|
|
3497
3492
|
...r
|
|
3498
3493
|
}) => {
|
|
3499
|
-
const [s,
|
|
3494
|
+
const [s, a] = Q(
|
|
3500
3495
|
tt(e, t, n)
|
|
3501
3496
|
);
|
|
3502
3497
|
return he(() => {
|
|
3503
|
-
|
|
3498
|
+
a(e);
|
|
3504
3499
|
}, [e]), he(() => {
|
|
3505
|
-
|
|
3500
|
+
a(
|
|
3506
3501
|
tt(e, t, n)
|
|
3507
3502
|
);
|
|
3508
3503
|
}, [t, n]), /* @__PURE__ */ w.jsx(Te, { ...r, bindValue: s });
|
|
3509
|
-
},
|
|
3504
|
+
}, Un = (n) => {
|
|
3510
3505
|
const e = xe(null);
|
|
3511
3506
|
return he(() => () => {
|
|
3512
3507
|
e.current && clearTimeout(e.current);
|
|
@@ -3515,14 +3510,14 @@ const Un = 10, br = ({
|
|
|
3515
3510
|
r();
|
|
3516
3511
|
}, n);
|
|
3517
3512
|
};
|
|
3518
|
-
},
|
|
3513
|
+
}, xr = ({
|
|
3519
3514
|
bindValue: n,
|
|
3520
3515
|
optionalDisplayValue: e,
|
|
3521
3516
|
options: t,
|
|
3522
3517
|
displayMode: r,
|
|
3523
3518
|
listDisplayMode: s = "Both",
|
|
3524
|
-
minimumChars:
|
|
3525
|
-
placeholder:
|
|
3519
|
+
minimumChars: a = 3,
|
|
3520
|
+
placeholder: i,
|
|
3526
3521
|
fun: o,
|
|
3527
3522
|
_changeOnEnter: l = !1,
|
|
3528
3523
|
onChange: c,
|
|
@@ -3535,8 +3530,8 @@ const Un = 10, br = ({
|
|
|
3535
3530
|
enabled: R
|
|
3536
3531
|
});
|
|
3537
3532
|
et(C, () => x(!1));
|
|
3538
|
-
const U =
|
|
3539
|
-
V.length >=
|
|
3533
|
+
const U = Un(400), J = (V) => {
|
|
3534
|
+
V.length >= a ? o && f && U(async () => {
|
|
3540
3535
|
const B = await f(o, V);
|
|
3541
3536
|
D(B), A(B.length > 0 ? 0 : -1), x(!0);
|
|
3542
3537
|
}) : x(!1), g(V), E(e), l || c == null || c(V, e);
|
|
@@ -3562,14 +3557,14 @@ const Un = 10, br = ({
|
|
|
3562
3557
|
};
|
|
3563
3558
|
return /* @__PURE__ */ w.jsxs("div", { children: [
|
|
3564
3559
|
/* @__PURE__ */ w.jsx(
|
|
3565
|
-
|
|
3560
|
+
br,
|
|
3566
3561
|
{
|
|
3567
3562
|
...p,
|
|
3568
3563
|
bindValue: h,
|
|
3569
3564
|
optionalDisplayValue: y,
|
|
3570
3565
|
displayMode: r,
|
|
3571
3566
|
shapeIcon: "magnify",
|
|
3572
|
-
placeholder:
|
|
3567
|
+
placeholder: i,
|
|
3573
3568
|
ref: F,
|
|
3574
3569
|
onChange: J,
|
|
3575
3570
|
onKeyDown: z,
|
|
@@ -3577,7 +3572,7 @@ const Un = 10, br = ({
|
|
|
3577
3572
|
}
|
|
3578
3573
|
),
|
|
3579
3574
|
R && /* @__PURE__ */ w.jsx(
|
|
3580
|
-
|
|
3575
|
+
vr,
|
|
3581
3576
|
{
|
|
3582
3577
|
options: O,
|
|
3583
3578
|
displayMode: s,
|
|
@@ -3610,8 +3605,8 @@ const Un = 10, br = ({
|
|
|
3610
3605
|
ariaLabel: t,
|
|
3611
3606
|
icon: r,
|
|
3612
3607
|
disabled: s,
|
|
3613
|
-
sizing:
|
|
3614
|
-
variant:
|
|
3608
|
+
sizing: a = "base",
|
|
3609
|
+
variant: i = "primary",
|
|
3615
3610
|
type: o = "raised",
|
|
3616
3611
|
//FIXME: Type is sensitive value
|
|
3617
3612
|
showIcon: l = !0,
|
|
@@ -3620,7 +3615,7 @@ const Un = 10, br = ({
|
|
|
3620
3615
|
loading: u = !1
|
|
3621
3616
|
}) => {
|
|
3622
3617
|
const p = {
|
|
3623
|
-
container: `${ke["smp-button-container"]} ${
|
|
3618
|
+
container: `${ke["smp-button-container"]} ${a ? ke[`smp-button-${a}`] : ""} ${i ? ke[`smp-buttonVariant-${i}`] : ""} ${o ? ke[`smp-buttonType-${o}`] : ""} ${f ? ke["smp-button-fullWidth"] : ""}`
|
|
3624
3619
|
}, h = (g) => ({
|
|
3625
3620
|
primary: "onPrimary",
|
|
3626
3621
|
danger: "onDanger",
|
|
@@ -3634,20 +3629,20 @@ const Un = 10, br = ({
|
|
|
3634
3629
|
"aria-label": t,
|
|
3635
3630
|
disabled: s,
|
|
3636
3631
|
"aria-busy": u,
|
|
3637
|
-
children: u ? /* @__PURE__ */ w.jsx(ve, { icon: "spinner", state: h(
|
|
3632
|
+
children: u ? /* @__PURE__ */ w.jsx(ve, { icon: "spinner", state: h(i), spin: !0 }) : /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
3638
3633
|
r && l && /* @__PURE__ */ w.jsx(
|
|
3639
3634
|
ve,
|
|
3640
3635
|
{
|
|
3641
3636
|
icon: r,
|
|
3642
3637
|
disabled: s,
|
|
3643
|
-
state: h(
|
|
3638
|
+
state: h(i)
|
|
3644
3639
|
}
|
|
3645
3640
|
),
|
|
3646
3641
|
c && /* @__PURE__ */ w.jsx("span", { children: n })
|
|
3647
3642
|
] })
|
|
3648
3643
|
}
|
|
3649
3644
|
);
|
|
3650
|
-
},
|
|
3645
|
+
}, Wn = ({
|
|
3651
3646
|
bindValue: n,
|
|
3652
3647
|
onChange: e,
|
|
3653
3648
|
onBlur: t
|
|
@@ -3664,7 +3659,7 @@ const Un = 10, br = ({
|
|
|
3664
3659
|
onBlur: t
|
|
3665
3660
|
}
|
|
3666
3661
|
);
|
|
3667
|
-
},
|
|
3662
|
+
}, Hn = {
|
|
3668
3663
|
titleLarge: "h2",
|
|
3669
3664
|
title: "h3",
|
|
3670
3665
|
body: "h6",
|
|
@@ -3676,50 +3671,50 @@ const Un = 10, br = ({
|
|
|
3676
3671
|
"smp-typography-titleLarge": "_smp-typography-titleLarge_oznk3_20",
|
|
3677
3672
|
"smp-typography-label": "_smp-typography-label_oznk3_24",
|
|
3678
3673
|
"smp-typography-disabled": "_smp-typography-disabled_oznk3_29"
|
|
3679
|
-
},
|
|
3674
|
+
}, qn = ({
|
|
3680
3675
|
variant: n = "body",
|
|
3681
3676
|
bindValue: e,
|
|
3682
3677
|
...t
|
|
3683
3678
|
}) => {
|
|
3684
|
-
const r =
|
|
3679
|
+
const r = Hn[n], s = {
|
|
3685
3680
|
container: `${mt["smp-typography"]} ${n ? mt[`smp-typography-${n}`] : ""} ${t.disabled ? mt["smp-typography-disabled"] : ""}`
|
|
3686
3681
|
};
|
|
3687
3682
|
return /* @__PURE__ */ w.jsx(r, { className: s.container, disabled: t.disabled, children: e });
|
|
3688
|
-
},
|
|
3683
|
+
}, lr = {
|
|
3689
3684
|
"smp-chips-container": "_smp-chips-container_g7dut_1",
|
|
3690
3685
|
"smp-chips-element": "_smp-chips-element_g7dut_9"
|
|
3691
|
-
},
|
|
3686
|
+
}, Sr = ({
|
|
3692
3687
|
elements: n,
|
|
3693
3688
|
isEditable: e = !1,
|
|
3694
3689
|
displayMode: t = "Both",
|
|
3695
3690
|
onChange: r
|
|
3696
3691
|
}) => {
|
|
3697
3692
|
const s = {
|
|
3698
|
-
container: `${
|
|
3699
|
-
element: `${
|
|
3700
|
-
},
|
|
3701
|
-
r == null || r(n.filter((o, l) => l !==
|
|
3693
|
+
container: `${lr["smp-chips-container"]}`,
|
|
3694
|
+
element: `${lr["smp-chips-element"]}`
|
|
3695
|
+
}, a = (i) => {
|
|
3696
|
+
r == null || r(n.filter((o, l) => l !== i));
|
|
3702
3697
|
};
|
|
3703
|
-
return /* @__PURE__ */ w.jsx("div", { className: s.container, role: "list", children: n.map((
|
|
3698
|
+
return /* @__PURE__ */ w.jsx("div", { className: s.container, role: "list", children: n.map((i, o) => {
|
|
3704
3699
|
const l = tt(
|
|
3705
|
-
|
|
3706
|
-
|
|
3700
|
+
i.bindValue,
|
|
3701
|
+
i.optionalDisplayValue,
|
|
3707
3702
|
t
|
|
3708
3703
|
);
|
|
3709
3704
|
return /* @__PURE__ */ w.jsxs("div", { className: s.element, role: "listitem", children: [
|
|
3710
|
-
/* @__PURE__ */ w.jsx(
|
|
3705
|
+
/* @__PURE__ */ w.jsx(qn, { variant: "label", bindValue: l }),
|
|
3711
3706
|
e && /* @__PURE__ */ w.jsx(
|
|
3712
3707
|
ve,
|
|
3713
3708
|
{
|
|
3714
3709
|
icon: "close",
|
|
3715
3710
|
isInteractable: !0,
|
|
3716
|
-
onClick: () =>
|
|
3711
|
+
onClick: () => a(o)
|
|
3717
3712
|
}
|
|
3718
3713
|
)
|
|
3719
3714
|
] }, o);
|
|
3720
3715
|
}) });
|
|
3721
3716
|
};
|
|
3722
|
-
function
|
|
3717
|
+
function Er(n, e) {
|
|
3723
3718
|
const t = xe(null);
|
|
3724
3719
|
he(() => {
|
|
3725
3720
|
if (!n) return;
|
|
@@ -3735,7 +3730,7 @@ function _r(n, e) {
|
|
|
3735
3730
|
const c = s();
|
|
3736
3731
|
c.length > 0 && requestAnimationFrame(() => c[0].focus());
|
|
3737
3732
|
})();
|
|
3738
|
-
const
|
|
3733
|
+
const i = (c) => {
|
|
3739
3734
|
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
3740
3735
|
const f = s();
|
|
3741
3736
|
if (f.length === 0) return;
|
|
@@ -3748,33 +3743,33 @@ function _r(n, e) {
|
|
|
3748
3743
|
f.length > 0 && f[0].focus();
|
|
3749
3744
|
}
|
|
3750
3745
|
};
|
|
3751
|
-
document.addEventListener("keydown",
|
|
3746
|
+
document.addEventListener("keydown", i), document.addEventListener("mousedown", o);
|
|
3752
3747
|
const l = document.body.style.overflow;
|
|
3753
3748
|
return document.body.style.overflow = "hidden", () => {
|
|
3754
|
-
document.removeEventListener("keydown",
|
|
3749
|
+
document.removeEventListener("keydown", i), document.removeEventListener("mousedown", o), document.body.style.overflow = l, t.current && requestAnimationFrame(() => {
|
|
3755
3750
|
var c;
|
|
3756
3751
|
(c = t.current) == null || c.focus();
|
|
3757
3752
|
});
|
|
3758
3753
|
};
|
|
3759
3754
|
}, [n, e]);
|
|
3760
3755
|
}
|
|
3761
|
-
const
|
|
3756
|
+
const Kn = ({
|
|
3762
3757
|
bindValue: n,
|
|
3763
3758
|
onChange: e,
|
|
3764
3759
|
options: t = [],
|
|
3765
3760
|
optionalDisplayValue: r,
|
|
3766
3761
|
displayMode: s,
|
|
3767
|
-
listDisplayMode:
|
|
3768
|
-
fun:
|
|
3762
|
+
listDisplayMode: a = "Both",
|
|
3763
|
+
fun: i,
|
|
3769
3764
|
onOptionsRequest: o,
|
|
3770
3765
|
multiActiveIndex: l,
|
|
3771
3766
|
...c
|
|
3772
3767
|
}) => {
|
|
3773
|
-
const [f, u] = Q(!1), [p, h] = Q(t), [g, y] = Q(-1), [E, R] = Q([n]), x =
|
|
3768
|
+
const [f, u] = Q(!1), [p, h] = Q(t), [g, y] = Q(-1), [E, R] = Q([n]), x = Rr(), { anchorRef: O, targetRef: D, anchorWidth: v } = _t({
|
|
3774
3769
|
position: "bottom",
|
|
3775
3770
|
enabled: f
|
|
3776
3771
|
});
|
|
3777
|
-
et(D, () => u(!1)),
|
|
3772
|
+
et(D, () => u(!1)), Er(f, D);
|
|
3778
3773
|
const A = (C) => {
|
|
3779
3774
|
e == null || e(C.id, C.label);
|
|
3780
3775
|
const M = p.findIndex((U) => U.id === C.id);
|
|
@@ -3784,7 +3779,7 @@ const Bn = ({
|
|
|
3784
3779
|
}, Y = (C) => {
|
|
3785
3780
|
(C.key === "ArrowDown" || C.key === "ArrowUp") && (C.preventDefault(), F());
|
|
3786
3781
|
}, F = () => {
|
|
3787
|
-
|
|
3782
|
+
i && o && o(i, void 0).then((C) => {
|
|
3788
3783
|
h(C), y(C.length > 0 ? 0 : -1), u(!0);
|
|
3789
3784
|
});
|
|
3790
3785
|
};
|
|
@@ -3797,7 +3792,7 @@ const Bn = ({
|
|
|
3797
3792
|
"aria-owns": x,
|
|
3798
3793
|
children: [
|
|
3799
3794
|
/* @__PURE__ */ w.jsx(
|
|
3800
|
-
|
|
3795
|
+
br,
|
|
3801
3796
|
{
|
|
3802
3797
|
...c,
|
|
3803
3798
|
bindValue: n,
|
|
@@ -3814,11 +3809,11 @@ const Bn = ({
|
|
|
3814
3809
|
}
|
|
3815
3810
|
),
|
|
3816
3811
|
f && /* @__PURE__ */ w.jsx(
|
|
3817
|
-
|
|
3812
|
+
vr,
|
|
3818
3813
|
{
|
|
3819
3814
|
id: x,
|
|
3820
3815
|
options: p,
|
|
3821
|
-
displayMode:
|
|
3816
|
+
displayMode: a,
|
|
3822
3817
|
ref: D,
|
|
3823
3818
|
selectedIndex: g,
|
|
3824
3819
|
activeIndex: l || E,
|
|
@@ -3831,7 +3826,7 @@ const Bn = ({
|
|
|
3831
3826
|
}
|
|
3832
3827
|
);
|
|
3833
3828
|
};
|
|
3834
|
-
var wt = /* @__PURE__ */ ((n) => (n.CALENDAR_FOR = "Date.CalendarFor", n.CLOSE = "Generic.Close", n.SPOTLIGHT_DEFAULT_PLACEHOLDER = "Generic.SpotlightDefaultPlaceholder", n))(wt || {}),
|
|
3829
|
+
var wt = /* @__PURE__ */ ((n) => (n.CALENDAR_FOR = "Date.CalendarFor", n.CLOSE = "Generic.Close", n.SPOTLIGHT_DEFAULT_PLACEHOLDER = "Generic.SpotlightDefaultPlaceholder", n))(wt || {}), ie = /* @__PURE__ */ ((n) => (n.MONDAY = "Day.Monday", n.MONDAY_SHORT = "Day.MondayShort", n.TUESDAY = "Day.Tuesday", n.TUESDAY_SHORT = "Day.TuesdayShort", n.WEDNESDAY = "Day.Wednesday", n.WEDNESDAY_SHORT = "Day.WednesdayShort", n.THURSDAY = "Day.Thursday", n.THURSDAY_SHORT = "Day.ThursdayShort", n.FRIDAY = "Day.Friday", n.FRIDAY_SHORT = "Day.FridayShort", n.SATURDAY = "Day.Saturday", n.SATURDAY_SHORT = "Day.SaturdayShort", n.SUNDAY = "Day.Sunday", n.SUNDAY_SHORT = "Day.SundayShort", n))(ie || {}), oe = /* @__PURE__ */ ((n) => (n.JANUARY = "Month.January", n.FEBRUARY = "Month.February", n.MARCH = "Month.March", n.APRIL = "Month.April", n.MAY = "Month.May", n.JUNE = "Month.June", n.JULY = "Month.July", n.AUGUST = "Month.August", n.SEPTEMBER = "Month.September", n.OCTOBER = "Month.October", n.NOVEMBER = "Month.November", n.DECEMBER = "Month.December", n))(oe || {}), xt = /* @__PURE__ */ ((n) => (n.PREVIOUS_DAY = "Date.PreviousDay", n.PREVIOUS_WEEK = "Date.PreviousWeek", n.PREVIOUS_MONTH = "Date.PreviousMonth", n.PREVIOUS_YEAR = "Date.PreviousYear", n.NEXT_DAY = "Date.NextDay", n.NEXT_WEEK = "Date.NextWeek", n.NEXT_MONTH = "Date.NextMonth", n.NEXT_YEAR = "Date.NextYear", n.YESTERDAY = "Date.Yesterday", n.TODAY = "Date.Today", n.TOMORROW = "Date.Tomorrow", n))(xt || {});
|
|
3835
3830
|
const de = {
|
|
3836
3831
|
"smp-datepickercalendar": "_smp-datepickercalendar_u2io5_1",
|
|
3837
3832
|
"smp-datepickercalendar-table": "_smp-datepickercalendar-table_u2io5_30",
|
|
@@ -3842,19 +3837,19 @@ const de = {
|
|
|
3842
3837
|
"smp-datepickercalendar-td-focused": "_smp-datepickercalendar-td-focused_u2io5_83",
|
|
3843
3838
|
"smp-datepickercalendar-label": "_smp-datepickercalendar-label_u2io5_93"
|
|
3844
3839
|
};
|
|
3845
|
-
function
|
|
3840
|
+
function Bn({
|
|
3846
3841
|
selectedDate: n,
|
|
3847
3842
|
onDateChange: e,
|
|
3848
3843
|
disabledDateRanges: t = [],
|
|
3849
3844
|
initialValue: r,
|
|
3850
3845
|
targetRef: s
|
|
3851
3846
|
}) {
|
|
3852
|
-
const { translate:
|
|
3847
|
+
const { translate: a } = st(), i = () => {
|
|
3853
3848
|
if (!r) return;
|
|
3854
3849
|
const k = new Date(r);
|
|
3855
3850
|
return isNaN(k.getTime()) ? void 0 : k;
|
|
3856
3851
|
}, [o] = Q(/* @__PURE__ */ new Date()), [l, c] = Q(
|
|
3857
|
-
n ||
|
|
3852
|
+
n || i() || /* @__PURE__ */ new Date()
|
|
3858
3853
|
), [f, u] = Q(
|
|
3859
3854
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
3860
3855
|
), [p, h] = Q(
|
|
@@ -3862,52 +3857,52 @@ function Gn({
|
|
|
3862
3857
|
), [g, y] = Q(
|
|
3863
3858
|
l ? l.getDate() : null
|
|
3864
3859
|
), E = xe(null), R = xe([]), x = [
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3860
|
+
a(oe.JANUARY),
|
|
3861
|
+
a(oe.FEBRUARY),
|
|
3862
|
+
a(oe.MARCH),
|
|
3863
|
+
a(oe.APRIL),
|
|
3864
|
+
a(oe.MAY),
|
|
3865
|
+
a(oe.JUNE),
|
|
3866
|
+
a(oe.JULY),
|
|
3867
|
+
a(oe.AUGUST),
|
|
3868
|
+
a(oe.SEPTEMBER),
|
|
3869
|
+
a(oe.OCTOBER),
|
|
3870
|
+
a(oe.NOVEMBER),
|
|
3871
|
+
a(oe.DECEMBER)
|
|
3877
3872
|
], O = [
|
|
3878
3873
|
{
|
|
3879
|
-
value:
|
|
3880
|
-
full:
|
|
3874
|
+
value: a(ie.SUNDAY_SHORT),
|
|
3875
|
+
full: a(ie.SUNDAY)
|
|
3881
3876
|
},
|
|
3882
3877
|
{
|
|
3883
|
-
value:
|
|
3884
|
-
full:
|
|
3878
|
+
value: a(ie.MONDAY_SHORT),
|
|
3879
|
+
full: a(ie.MONDAY)
|
|
3885
3880
|
},
|
|
3886
3881
|
{
|
|
3887
|
-
value:
|
|
3888
|
-
full:
|
|
3882
|
+
value: a(ie.TUESDAY_SHORT),
|
|
3883
|
+
full: a(ie.TUESDAY)
|
|
3889
3884
|
},
|
|
3890
3885
|
{
|
|
3891
|
-
value:
|
|
3892
|
-
full:
|
|
3886
|
+
value: a(ie.WEDNESDAY_SHORT),
|
|
3887
|
+
full: a(ie.WEDNESDAY)
|
|
3893
3888
|
},
|
|
3894
3889
|
{
|
|
3895
|
-
value:
|
|
3896
|
-
full:
|
|
3890
|
+
value: a(ie.THURSDAY_SHORT),
|
|
3891
|
+
full: a(ie.THURSDAY)
|
|
3897
3892
|
},
|
|
3898
3893
|
{
|
|
3899
|
-
value:
|
|
3900
|
-
full:
|
|
3894
|
+
value: a(ie.FRIDAY_SHORT),
|
|
3895
|
+
full: a(ie.FRIDAY)
|
|
3901
3896
|
},
|
|
3902
3897
|
{
|
|
3903
|
-
value:
|
|
3904
|
-
full:
|
|
3898
|
+
value: a(ie.SATURDAY_SHORT),
|
|
3899
|
+
full: a(ie.SATURDAY)
|
|
3905
3900
|
}
|
|
3906
3901
|
], D = (k) => t.some((d) => {
|
|
3907
3902
|
const m = d.start.getTime(), b = d.end.getTime(), _ = k.getTime();
|
|
3908
3903
|
return _ >= m && _ <= b;
|
|
3909
3904
|
}), v = (k) => {
|
|
3910
|
-
D(k) || (c(k), y(k.getDate()), e && e(
|
|
3905
|
+
D(k) || (c(k), y(k.getDate()), e && e(Nn(k)));
|
|
3911
3906
|
}, A = () => {
|
|
3912
3907
|
f === 0 ? (u(11), h(p - 1)) : u(f - 1), y(1);
|
|
3913
3908
|
}, j = () => {
|
|
@@ -4101,7 +4096,7 @@ function Gn({
|
|
|
4101
4096
|
rt,
|
|
4102
4097
|
{
|
|
4103
4098
|
onClick: A,
|
|
4104
|
-
ariaLabel:
|
|
4099
|
+
ariaLabel: a(xt.PREVIOUS_MONTH),
|
|
4105
4100
|
bindValue: "<",
|
|
4106
4101
|
type: "ghost",
|
|
4107
4102
|
variant: "base"
|
|
@@ -4119,7 +4114,7 @@ function Gn({
|
|
|
4119
4114
|
rt,
|
|
4120
4115
|
{
|
|
4121
4116
|
onClick: j,
|
|
4122
|
-
ariaLabel:
|
|
4117
|
+
ariaLabel: a(xt.NEXT_MONTH),
|
|
4123
4118
|
bindValue: ">",
|
|
4124
4119
|
type: "ghost",
|
|
4125
4120
|
variant: "base"
|
|
@@ -4133,7 +4128,7 @@ function Gn({
|
|
|
4133
4128
|
{
|
|
4134
4129
|
ref: E,
|
|
4135
4130
|
role: "grid",
|
|
4136
|
-
"aria-label": `${
|
|
4131
|
+
"aria-label": `${a(wt.CALENDAR_FOR)} ${x[f]} ${p}`,
|
|
4137
4132
|
className: V.table,
|
|
4138
4133
|
children: [
|
|
4139
4134
|
/* @__PURE__ */ w.jsx("thead", { children: /* @__PURE__ */ w.jsx("tr", { children: O.map((k) => /* @__PURE__ */ w.jsx(
|
|
@@ -4194,19 +4189,19 @@ function Gn({
|
|
|
4194
4189
|
}
|
|
4195
4190
|
);
|
|
4196
4191
|
}
|
|
4197
|
-
const
|
|
4192
|
+
const Gn = ({
|
|
4198
4193
|
bindValue: n,
|
|
4199
4194
|
placeholder: e,
|
|
4200
4195
|
onChange: t,
|
|
4201
4196
|
disabledDateRanges: r,
|
|
4202
4197
|
...s
|
|
4203
4198
|
}) => {
|
|
4204
|
-
const [
|
|
4199
|
+
const [a, i] = Q(!1), [o, l] = Q(n || ""), [c, f] = Q(""), { anchorRef: u, targetRef: p } = _t({
|
|
4205
4200
|
position: "bottom",
|
|
4206
|
-
enabled:
|
|
4201
|
+
enabled: a
|
|
4207
4202
|
});
|
|
4208
4203
|
et(p, () => {
|
|
4209
|
-
|
|
4204
|
+
i(!1);
|
|
4210
4205
|
}), et(u, () => {
|
|
4211
4206
|
if (
|
|
4212
4207
|
// FIXME: Copied from useClickOutside.
|
|
@@ -4215,10 +4210,10 @@ const zn = ({
|
|
|
4215
4210
|
const A = u.current.querySelector("input");
|
|
4216
4211
|
A && A === document.activeElement && R();
|
|
4217
4212
|
}
|
|
4218
|
-
}),
|
|
4213
|
+
}), Er(a, p);
|
|
4219
4214
|
const { format: h, getCurrentLanguage: g } = st(), y = Oe(
|
|
4220
4215
|
(A) => {
|
|
4221
|
-
const j = A.length > 5 &&
|
|
4216
|
+
const j = A.length > 5 && $n(A, g()) || A, Y = h(j, void 0, void 0, {
|
|
4222
4217
|
type: "date"
|
|
4223
4218
|
}), F = typeof j != "string", C = F && j.toISOString().substring(0, 10) || "";
|
|
4224
4219
|
return {
|
|
@@ -4234,10 +4229,10 @@ const zn = ({
|
|
|
4234
4229
|
const { formattedDate: A, isoDate: j, isValid: Y } = y(n);
|
|
4235
4230
|
l(Y && j || n), f(Y && A || n);
|
|
4236
4231
|
}, [n, h, y]);
|
|
4237
|
-
const E = () =>
|
|
4232
|
+
const E = () => i((A) => !A), R = () => {
|
|
4238
4233
|
O(c);
|
|
4239
4234
|
}, x = (A) => {
|
|
4240
|
-
O(A),
|
|
4235
|
+
O(A), i(!1);
|
|
4241
4236
|
}, O = (A) => {
|
|
4242
4237
|
const { isoDate: j, isValid: Y } = y(A);
|
|
4243
4238
|
t && t(Y && j || A);
|
|
@@ -4261,8 +4256,8 @@ const zn = ({
|
|
|
4261
4256
|
...s
|
|
4262
4257
|
}
|
|
4263
4258
|
),
|
|
4264
|
-
|
|
4265
|
-
|
|
4259
|
+
a && /* @__PURE__ */ w.jsx(
|
|
4260
|
+
Bn,
|
|
4266
4261
|
{
|
|
4267
4262
|
disabledDateRanges: r,
|
|
4268
4263
|
onDateChange: x,
|
|
@@ -4271,16 +4266,16 @@ const zn = ({
|
|
|
4271
4266
|
}
|
|
4272
4267
|
)
|
|
4273
4268
|
] });
|
|
4274
|
-
},
|
|
4269
|
+
}, zn = {
|
|
4275
4270
|
"smp-multipleAutocomplete-container": "_smp-multipleAutocomplete-container_1mtv2_1"
|
|
4276
|
-
},
|
|
4271
|
+
}, Jn = ({
|
|
4277
4272
|
elements: n,
|
|
4278
4273
|
displayMode: e,
|
|
4279
4274
|
minimumChars: t,
|
|
4280
4275
|
listDisplayMode: r,
|
|
4281
4276
|
placeholder: s,
|
|
4282
|
-
fun:
|
|
4283
|
-
onOptionsRequest:
|
|
4277
|
+
fun: a,
|
|
4278
|
+
onOptionsRequest: i,
|
|
4284
4279
|
onChange: o
|
|
4285
4280
|
}) => {
|
|
4286
4281
|
const l = n.map((u) => u.bindValue), c = (u, p) => {
|
|
@@ -4298,11 +4293,11 @@ const zn = ({
|
|
|
4298
4293
|
}
|
|
4299
4294
|
o == null || o(h);
|
|
4300
4295
|
}, f = {
|
|
4301
|
-
container: `${
|
|
4296
|
+
container: `${zn["smp-multipleAutocomplete-container"]}`
|
|
4302
4297
|
};
|
|
4303
4298
|
return /* @__PURE__ */ w.jsxs("div", { className: f.container, children: [
|
|
4304
4299
|
/* @__PURE__ */ w.jsx(
|
|
4305
|
-
|
|
4300
|
+
Sr,
|
|
4306
4301
|
{
|
|
4307
4302
|
elements: n,
|
|
4308
4303
|
displayMode: e,
|
|
@@ -4313,21 +4308,21 @@ const zn = ({
|
|
|
4313
4308
|
}
|
|
4314
4309
|
),
|
|
4315
4310
|
/* @__PURE__ */ w.jsx(
|
|
4316
|
-
|
|
4311
|
+
xr,
|
|
4317
4312
|
{
|
|
4318
4313
|
bindValue: "",
|
|
4319
|
-
fun:
|
|
4314
|
+
fun: a,
|
|
4320
4315
|
onChange: c,
|
|
4321
4316
|
_changeOnEnter: !0,
|
|
4322
4317
|
listDisplayMode: r,
|
|
4323
4318
|
minimumChars: t,
|
|
4324
4319
|
placeholder: s,
|
|
4325
|
-
onOptionsRequest:
|
|
4320
|
+
onOptionsRequest: i,
|
|
4326
4321
|
_multiActiveIndex: l
|
|
4327
4322
|
}
|
|
4328
4323
|
)
|
|
4329
4324
|
] });
|
|
4330
|
-
},
|
|
4325
|
+
}, Xn = ({ ...n }) => {
|
|
4331
4326
|
const [e, t] = Q(!1), r = e ? "visibility-off" : "visibility";
|
|
4332
4327
|
return /* @__PURE__ */ w.jsx(
|
|
4333
4328
|
Te,
|
|
@@ -4339,10 +4334,10 @@ const zn = ({
|
|
|
4339
4334
|
ariaLabel: "password"
|
|
4340
4335
|
}
|
|
4341
4336
|
);
|
|
4342
|
-
},
|
|
4343
|
-
const [e, t] = Q(n.bindValue), { translate: r } = st(), s = (
|
|
4344
|
-
var
|
|
4345
|
-
|
|
4337
|
+
}, Zn = ({ ...n }) => {
|
|
4338
|
+
const [e, t] = Q(n.bindValue), { translate: r } = st(), s = (a) => {
|
|
4339
|
+
var i;
|
|
4340
|
+
a.key === "Enter" && (a.preventDefault(), (i = n.onEnter) == null || i.call(n, e));
|
|
4346
4341
|
};
|
|
4347
4342
|
return /* @__PURE__ */ w.jsx(
|
|
4348
4343
|
Te,
|
|
@@ -4391,13 +4386,13 @@ const Ke = (n, e, t) => ({
|
|
|
4391
4386
|
},
|
|
4392
4387
|
decode: t || n.decode,
|
|
4393
4388
|
shape: n.shape
|
|
4394
|
-
}),
|
|
4389
|
+
}), cr = (n) => {
|
|
4395
4390
|
const e = Se.fromDataObj(n.obj), t = n.decode ? Se.fromString(n.decode).getValue() : [];
|
|
4396
4391
|
return e.getValue().map((r, s) => ({
|
|
4397
4392
|
bindValue: r,
|
|
4398
4393
|
optionalDisplayValue: t.length >= s ? t[s] : ""
|
|
4399
4394
|
}));
|
|
4400
|
-
},
|
|
4395
|
+
}, Qn = (n, e) => {
|
|
4401
4396
|
const t = new Se(
|
|
4402
4397
|
n.obj,
|
|
4403
4398
|
e.map((s) => s.bindValue)
|
|
@@ -4406,14 +4401,14 @@ const Ke = (n, e, t) => ({
|
|
|
4406
4401
|
e.map((s) => s.optionalDisplayValue ? s.optionalDisplayValue : "")
|
|
4407
4402
|
).getLegacyValue();
|
|
4408
4403
|
return Ke(n, t, r);
|
|
4409
|
-
},
|
|
4404
|
+
}, es = ({
|
|
4410
4405
|
decode: n,
|
|
4411
4406
|
shape: e,
|
|
4412
4407
|
obj: t,
|
|
4413
4408
|
data: r,
|
|
4414
4409
|
icon: s,
|
|
4415
|
-
fun:
|
|
4416
|
-
placeholderIcon:
|
|
4410
|
+
fun: a,
|
|
4411
|
+
placeholderIcon: i,
|
|
4417
4412
|
label: o,
|
|
4418
4413
|
onChange: l,
|
|
4419
4414
|
onClick: c,
|
|
@@ -4428,11 +4423,11 @@ const Ke = (n, e, t) => ({
|
|
|
4428
4423
|
}, g = {
|
|
4429
4424
|
onBlur: u,
|
|
4430
4425
|
onOptionsRequest: p,
|
|
4431
|
-
fun:
|
|
4426
|
+
fun: a,
|
|
4432
4427
|
icon: s,
|
|
4433
4428
|
label: o,
|
|
4434
4429
|
...r
|
|
4435
|
-
}, y = (x, O) =>
|
|
4430
|
+
}, y = (x, O) => Ln(t) ? Ke(h, new Qe(t, x).getLegacyValue()) : Ke(h, x, O), E = (x) => Ke(h, new Ze(t, x).getLegacyValue()), R = (x) => Qn(h, x);
|
|
4436
4431
|
switch (e) {
|
|
4437
4432
|
case ue.AUTOCOMPLETE: {
|
|
4438
4433
|
const x = {
|
|
@@ -4443,7 +4438,7 @@ const Ke = (n, e, t) => ({
|
|
|
4443
4438
|
l == null || l(y(O, D));
|
|
4444
4439
|
}
|
|
4445
4440
|
};
|
|
4446
|
-
return /* @__PURE__ */ w.jsx(
|
|
4441
|
+
return /* @__PURE__ */ w.jsx(xr, { ...x });
|
|
4447
4442
|
}
|
|
4448
4443
|
case ue.BUTTON: {
|
|
4449
4444
|
const x = {
|
|
@@ -4465,7 +4460,7 @@ const Ke = (n, e, t) => ({
|
|
|
4465
4460
|
l == null || l(y(O, D));
|
|
4466
4461
|
}
|
|
4467
4462
|
};
|
|
4468
|
-
return /* @__PURE__ */ w.jsx(
|
|
4463
|
+
return /* @__PURE__ */ w.jsx(Kn, { ...x });
|
|
4469
4464
|
}
|
|
4470
4465
|
case ue.CHECKBOX: {
|
|
4471
4466
|
const x = {
|
|
@@ -4476,14 +4471,14 @@ const Ke = (n, e, t) => ({
|
|
|
4476
4471
|
l == null || l(E(O));
|
|
4477
4472
|
}
|
|
4478
4473
|
};
|
|
4479
|
-
return /* @__PURE__ */ w.jsx(
|
|
4474
|
+
return /* @__PURE__ */ w.jsx(Wn, { ...x });
|
|
4480
4475
|
}
|
|
4481
4476
|
case ue.CHIP: {
|
|
4482
4477
|
const x = {
|
|
4483
4478
|
...g,
|
|
4484
|
-
elements:
|
|
4479
|
+
elements: cr(h)
|
|
4485
4480
|
};
|
|
4486
|
-
return /* @__PURE__ */ w.jsx(
|
|
4481
|
+
return /* @__PURE__ */ w.jsx(Sr, { ...x });
|
|
4487
4482
|
}
|
|
4488
4483
|
case ue.DATE: {
|
|
4489
4484
|
const x = {
|
|
@@ -4493,13 +4488,13 @@ const Ke = (n, e, t) => ({
|
|
|
4493
4488
|
l == null || l(y(O));
|
|
4494
4489
|
}
|
|
4495
4490
|
};
|
|
4496
|
-
return /* @__PURE__ */ w.jsx(
|
|
4491
|
+
return /* @__PURE__ */ w.jsx(Gn, { ...x });
|
|
4497
4492
|
}
|
|
4498
4493
|
case ue.ICON: {
|
|
4499
4494
|
const x = {
|
|
4500
4495
|
...g,
|
|
4501
4496
|
icon: s,
|
|
4502
|
-
placeholderIcon:
|
|
4497
|
+
placeholderIcon: i,
|
|
4503
4498
|
onClick: () => {
|
|
4504
4499
|
c == null || c(y(t.k));
|
|
4505
4500
|
}
|
|
@@ -4509,12 +4504,12 @@ const Ke = (n, e, t) => ({
|
|
|
4509
4504
|
case ue.MULTI_AUTOCOMPLETE: {
|
|
4510
4505
|
const x = {
|
|
4511
4506
|
...g,
|
|
4512
|
-
elements:
|
|
4507
|
+
elements: cr(h),
|
|
4513
4508
|
onChange: (O) => {
|
|
4514
4509
|
l == null || l(R(O));
|
|
4515
4510
|
}
|
|
4516
4511
|
};
|
|
4517
|
-
return /* @__PURE__ */ w.jsx(
|
|
4512
|
+
return /* @__PURE__ */ w.jsx(Jn, { ...x });
|
|
4518
4513
|
}
|
|
4519
4514
|
case ue.PASSWORD: {
|
|
4520
4515
|
const x = {
|
|
@@ -4524,7 +4519,7 @@ const Ke = (n, e, t) => ({
|
|
|
4524
4519
|
l == null || l(y(O));
|
|
4525
4520
|
}
|
|
4526
4521
|
};
|
|
4527
|
-
return /* @__PURE__ */ w.jsx(
|
|
4522
|
+
return /* @__PURE__ */ w.jsx(Xn, { ...x });
|
|
4528
4523
|
}
|
|
4529
4524
|
case ue.SPOTLIGHT: {
|
|
4530
4525
|
const x = {
|
|
@@ -4534,7 +4529,7 @@ const Ke = (n, e, t) => ({
|
|
|
4534
4529
|
f == null || f(y(O));
|
|
4535
4530
|
}
|
|
4536
4531
|
};
|
|
4537
|
-
return /* @__PURE__ */ w.jsx(
|
|
4532
|
+
return /* @__PURE__ */ w.jsx(Zn, { ...x });
|
|
4538
4533
|
}
|
|
4539
4534
|
case ue.TEXT_FIELD:
|
|
4540
4535
|
case void 0: {
|
|
@@ -4548,20 +4543,20 @@ const Ke = (n, e, t) => ({
|
|
|
4548
4543
|
return /* @__PURE__ */ w.jsx(Te, { ...x });
|
|
4549
4544
|
}
|
|
4550
4545
|
}
|
|
4551
|
-
},
|
|
4552
|
-
"smp-field-container": "_smp-field-
|
|
4553
|
-
"smp-field-position-
|
|
4554
|
-
"smp-field-position-
|
|
4555
|
-
"smp-field-position-
|
|
4556
|
-
"smp-field-position-
|
|
4546
|
+
}, ur = {
|
|
4547
|
+
"smp-field-container": "_smp-field-container_2ay2r_1",
|
|
4548
|
+
"smp-field-position-Left": "_smp-field-position-Left_2ay2r_6",
|
|
4549
|
+
"smp-field-position-Right": "_smp-field-position-Right_2ay2r_10",
|
|
4550
|
+
"smp-field-position-Top": "_smp-field-position-Top_2ay2r_14",
|
|
4551
|
+
"smp-field-position-Bottom": "_smp-field-position-Bottom_2ay2r_18"
|
|
4557
4552
|
}, as = ({
|
|
4558
4553
|
data: n,
|
|
4559
4554
|
Type: e,
|
|
4560
4555
|
ShowSubmit: t = !1,
|
|
4561
|
-
SubmitPosition: r = "
|
|
4556
|
+
SubmitPosition: r = "Right",
|
|
4562
4557
|
DefaultValue: s,
|
|
4563
|
-
Label:
|
|
4564
|
-
LabelPosition:
|
|
4558
|
+
Label: a,
|
|
4559
|
+
LabelPosition: i = "Left",
|
|
4565
4560
|
onBlur: o,
|
|
4566
4561
|
onClick: l,
|
|
4567
4562
|
onOptionsRequest: c
|
|
@@ -4570,11 +4565,11 @@ const Ke = (n, e, t) => ({
|
|
|
4570
4565
|
he(() => {
|
|
4571
4566
|
u(() => {
|
|
4572
4567
|
const y = { ...n };
|
|
4573
|
-
return e && (y.shape = e), s && (y.obj =
|
|
4568
|
+
return e && (y.shape = e), s && (y.obj = kn(s)), y;
|
|
4574
4569
|
});
|
|
4575
4570
|
}, [n, s, e]);
|
|
4576
|
-
const p = je(t) ?
|
|
4577
|
-
container: `${
|
|
4571
|
+
const p = je(t) ? ur[`smp-field-position-${r}`] : "", h = {
|
|
4572
|
+
container: `${ur["smp-field-container"]} ${p}`
|
|
4578
4573
|
}, g = () => {
|
|
4579
4574
|
je(t) || o == null || o(f);
|
|
4580
4575
|
};
|
|
@@ -4590,15 +4585,15 @@ const Ke = (n, e, t) => ({
|
|
|
4590
4585
|
font: "var(--smp-fontLabel-base)"
|
|
4591
4586
|
},
|
|
4592
4587
|
children: /* @__PURE__ */ w.jsx(
|
|
4593
|
-
|
|
4588
|
+
es,
|
|
4594
4589
|
{
|
|
4595
4590
|
...f,
|
|
4596
4591
|
onChange: u,
|
|
4597
4592
|
onOptionsRequest: c,
|
|
4598
4593
|
fun: n.fun,
|
|
4599
4594
|
onBlur: g,
|
|
4600
|
-
label:
|
|
4601
|
-
labelPosition:
|
|
4595
|
+
label: a,
|
|
4596
|
+
labelPosition: i
|
|
4602
4597
|
}
|
|
4603
4598
|
)
|
|
4604
4599
|
}
|
|
@@ -4608,15 +4603,15 @@ const Ke = (n, e, t) => ({
|
|
|
4608
4603
|
] });
|
|
4609
4604
|
};
|
|
4610
4605
|
export {
|
|
4611
|
-
|
|
4606
|
+
xr as Autocomplete,
|
|
4612
4607
|
rt as Button,
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4608
|
+
Wn as Checkbox,
|
|
4609
|
+
Kn as Combobox,
|
|
4610
|
+
ss as DashList,
|
|
4611
|
+
Gn as DatePicker,
|
|
4617
4612
|
as as Field,
|
|
4618
4613
|
ve as Icon,
|
|
4619
|
-
|
|
4614
|
+
Xn as Password,
|
|
4620
4615
|
Te as Textfield,
|
|
4621
|
-
|
|
4616
|
+
ns as configurePaths
|
|
4622
4617
|
};
|