@sme.up/ketchup2 2.0.0-SNAPSHOT-20250704072950 → 2.0.0-SNAPSHOT-20250704073042
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/functional-components/layout/layout.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +10 -10
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +719 -716
- package/package.json +1 -1
package/dist/ketchup2.es.js
CHANGED
|
@@ -17,16 +17,16 @@ function Yn() {
|
|
|
17
17
|
Nt = 1;
|
|
18
18
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
19
19
|
function t(r, s, a) {
|
|
20
|
-
var
|
|
21
|
-
if (a !== void 0 && (
|
|
20
|
+
var o = null;
|
|
21
|
+
if (a !== void 0 && (o = "" + a), s.key !== void 0 && (o = "" + s.key), "key" in s) {
|
|
22
22
|
a = {};
|
|
23
|
-
for (var
|
|
24
|
-
|
|
23
|
+
for (var i in s)
|
|
24
|
+
i !== "key" && (a[i] = s[i]);
|
|
25
25
|
} else a = s;
|
|
26
26
|
return s = a.ref, {
|
|
27
27
|
$$typeof: n,
|
|
28
28
|
type: r,
|
|
29
|
-
key:
|
|
29
|
+
key: o,
|
|
30
30
|
ref: s !== void 0 ? s : null,
|
|
31
31
|
props: a
|
|
32
32
|
};
|
|
@@ -60,7 +60,7 @@ function Bn() {
|
|
|
60
60
|
return "StrictMode";
|
|
61
61
|
case g:
|
|
62
62
|
return "Suspense";
|
|
63
|
-
case
|
|
63
|
+
case $:
|
|
64
64
|
return "SuspenseList";
|
|
65
65
|
case L:
|
|
66
66
|
return "Activity";
|
|
@@ -101,8 +101,8 @@ function Bn() {
|
|
|
101
101
|
}
|
|
102
102
|
if (x) {
|
|
103
103
|
x = console;
|
|
104
|
-
var
|
|
105
|
-
return
|
|
104
|
+
var k = x.error, _ = typeof Symbol == "function" && Symbol.toStringTag && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
|
105
|
+
return k.call(
|
|
106
106
|
x,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
108
|
_
|
|
@@ -127,22 +127,22 @@ function Bn() {
|
|
|
127
127
|
function a() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function o(h) {
|
|
131
131
|
if (O.call(h, "key")) {
|
|
132
132
|
var x = Object.getOwnPropertyDescriptor(h, "key").get;
|
|
133
133
|
if (x && x.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
135
|
return h.key !== void 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
function
|
|
137
|
+
function i(h, x) {
|
|
138
|
+
function k() {
|
|
139
139
|
B || (B = !0, console.error(
|
|
140
140
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
141
141
|
x
|
|
142
142
|
));
|
|
143
143
|
}
|
|
144
|
-
|
|
145
|
-
get:
|
|
144
|
+
k.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
145
|
+
get: k,
|
|
146
146
|
configurable: !0
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -152,14 +152,14 @@ function Bn() {
|
|
|
152
152
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
153
153
|
)), h = this.props.ref, h !== void 0 ? h : null;
|
|
154
154
|
}
|
|
155
|
-
function c(h, x,
|
|
156
|
-
return
|
|
155
|
+
function c(h, x, k, _, j, I, U, W) {
|
|
156
|
+
return k = I.ref, h = {
|
|
157
157
|
$$typeof: y,
|
|
158
158
|
type: h,
|
|
159
159
|
key: x,
|
|
160
160
|
props: I,
|
|
161
161
|
_owner: j
|
|
162
|
-
}, (
|
|
162
|
+
}, (k !== void 0 ? k : null) !== null ? Object.defineProperty(h, "ref", {
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
get: l
|
|
165
165
|
}) : Object.defineProperty(h, "ref", { enumerable: !1, value: null }), h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
@@ -184,7 +184,7 @@ function Bn() {
|
|
|
184
184
|
value: W
|
|
185
185
|
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
186
186
|
}
|
|
187
|
-
function d(h, x,
|
|
187
|
+
function d(h, x, k, _, j, I, U, W) {
|
|
188
188
|
var V = x.children;
|
|
189
189
|
if (V !== void 0)
|
|
190
190
|
if (_)
|
|
@@ -215,13 +215,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
215
215
|
V
|
|
216
216
|
), F[V + _] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (V = null,
|
|
219
|
-
|
|
218
|
+
if (V = null, k !== void 0 && (t(k), V = "" + k), o(x) && (t(x.key), V = "" + x.key), "key" in x) {
|
|
219
|
+
k = {};
|
|
220
220
|
for (var K in x)
|
|
221
|
-
K !== "key" && (
|
|
222
|
-
} else
|
|
223
|
-
return V &&
|
|
224
|
-
|
|
221
|
+
K !== "key" && (k[K] = x[K]);
|
|
222
|
+
} else k = x;
|
|
223
|
+
return V && i(
|
|
224
|
+
k,
|
|
225
225
|
typeof h == "function" ? h.displayName || h.name || "Unknown" : h
|
|
226
226
|
), c(
|
|
227
227
|
h,
|
|
@@ -229,7 +229,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
229
229
|
I,
|
|
230
230
|
j,
|
|
231
231
|
s(),
|
|
232
|
-
|
|
232
|
+
k,
|
|
233
233
|
U,
|
|
234
234
|
W
|
|
235
235
|
);
|
|
@@ -237,7 +237,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
function u(h) {
|
|
238
238
|
typeof h == "object" && h !== null && h.$$typeof === y && h._store && (h._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var f = rt, y = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), T = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"),
|
|
240
|
+
var f = rt, y = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), T = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), R = Symbol.for("react.client.reference"), D = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, P = Array.isArray, N = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
f = {
|
|
@@ -249,24 +249,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
f,
|
|
250
250
|
a
|
|
251
251
|
)(), X = N(r(a)), F = {};
|
|
252
|
-
Ve.Fragment = S, Ve.jsx = function(h, x,
|
|
252
|
+
Ve.Fragment = S, Ve.jsx = function(h, x, k, _, j) {
|
|
253
253
|
var I = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
254
254
|
return d(
|
|
255
255
|
h,
|
|
256
256
|
x,
|
|
257
|
-
|
|
257
|
+
k,
|
|
258
258
|
!1,
|
|
259
259
|
_,
|
|
260
260
|
j,
|
|
261
261
|
I ? Error("react-stack-top-frame") : q,
|
|
262
262
|
I ? N(r(h)) : X
|
|
263
263
|
);
|
|
264
|
-
}, Ve.jsxs = function(h, x,
|
|
264
|
+
}, Ve.jsxs = function(h, x, k, _, j) {
|
|
265
265
|
var I = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
266
266
|
return d(
|
|
267
267
|
h,
|
|
268
268
|
x,
|
|
269
|
-
|
|
269
|
+
k,
|
|
270
270
|
!0,
|
|
271
271
|
_,
|
|
272
272
|
j,
|
|
@@ -287,18 +287,18 @@ const De = ({ label: n, disabled: e, htmlFor: t }) => {
|
|
|
287
287
|
};
|
|
288
288
|
return /* @__PURE__ */ m.jsx("label", { className: r.container, htmlFor: t, children: n });
|
|
289
289
|
}, he = {
|
|
290
|
-
"smp-layout": "_smp-
|
|
291
|
-
"smp-layout-horizontal": "_smp-layout-
|
|
292
|
-
"smp-layout-vertical": "_smp-layout-
|
|
293
|
-
"smp-layout-section-grid": "_smp-layout-section-
|
|
294
|
-
"smp-layout-section-vertical": "_smp-layout-section-
|
|
295
|
-
"smp-layout-section-horizontal": "_smp-layout-section-
|
|
296
|
-
"smp-layout-cell-container": "_smp-layout-cell-
|
|
297
|
-
"smp-layout-section-flex": "_smp-layout-section-
|
|
298
|
-
"smp-grid-template-cols": "_smp-grid-template-
|
|
299
|
-
"smp-grid-template-rows": "_smp-grid-template-
|
|
300
|
-
"smp-layout-section-with-title": "_smp-layout-section-with-
|
|
301
|
-
"smp-layout-section-title": "_smp-layout-section-
|
|
290
|
+
"smp-layout": "_smp-layout_a5cbk_1",
|
|
291
|
+
"smp-layout-horizontal": "_smp-layout-horizontal_a5cbk_9",
|
|
292
|
+
"smp-layout-vertical": "_smp-layout-vertical_a5cbk_15",
|
|
293
|
+
"smp-layout-section-grid": "_smp-layout-section-grid_a5cbk_20",
|
|
294
|
+
"smp-layout-section-vertical": "_smp-layout-section-vertical_a5cbk_24",
|
|
295
|
+
"smp-layout-section-horizontal": "_smp-layout-section-horizontal_a5cbk_28",
|
|
296
|
+
"smp-layout-cell-container": "_smp-layout-cell-container_a5cbk_33",
|
|
297
|
+
"smp-layout-section-flex": "_smp-layout-section-flex_a5cbk_37",
|
|
298
|
+
"smp-grid-template-cols": "_smp-grid-template-cols_a5cbk_55",
|
|
299
|
+
"smp-grid-template-rows": "_smp-grid-template-rows_a5cbk_59",
|
|
300
|
+
"smp-layout-section-with-title": "_smp-layout-section-with-title_a5cbk_63",
|
|
301
|
+
"smp-layout-section-title": "_smp-layout-section-title_a5cbk_69"
|
|
302
302
|
}, Hn = (n, e) => {
|
|
303
303
|
const t = [];
|
|
304
304
|
for (let r = 0; r < n.length; r += e)
|
|
@@ -313,13 +313,13 @@ const De = ({ label: n, disabled: e, htmlFor: t }) => {
|
|
|
313
313
|
};
|
|
314
314
|
let r = t.sections, s = t.content;
|
|
315
315
|
return t.content?.length && t.columns && +t.columns > 1 && (r = Hn(
|
|
316
|
-
t.content.filter((
|
|
316
|
+
t.content.filter((o) => e.includes(o.id)),
|
|
317
317
|
+t.columns
|
|
318
318
|
).map(
|
|
319
|
-
(
|
|
319
|
+
(o, i) => ({
|
|
320
320
|
...t,
|
|
321
|
-
id: `${t.id}-${
|
|
322
|
-
content:
|
|
321
|
+
id: `${t.id}-${i}`,
|
|
322
|
+
content: o,
|
|
323
323
|
gridCols: t.columns,
|
|
324
324
|
horizontal: !0
|
|
325
325
|
})
|
|
@@ -378,8 +378,8 @@ function qn() {
|
|
|
378
378
|
if (Wt) return ze;
|
|
379
379
|
Wt = 1;
|
|
380
380
|
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-]+$/;
|
|
381
|
-
ze.format =
|
|
382
|
-
function
|
|
381
|
+
ze.format = o, ze.parse = i;
|
|
382
|
+
function o(u) {
|
|
383
383
|
if (!u || typeof u != "object")
|
|
384
384
|
throw new TypeError("argument obj is required");
|
|
385
385
|
var f = u.parameters, y = u.type;
|
|
@@ -394,7 +394,7 @@ function qn() {
|
|
|
394
394
|
}
|
|
395
395
|
return p;
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function i(u) {
|
|
398
398
|
if (!u)
|
|
399
399
|
throw new TypeError("argument string is required");
|
|
400
400
|
var f = typeof u == "object" ? l(u) : u;
|
|
@@ -447,9 +447,9 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
447
447
|
var a = s.getResponseHeader("Content-Type");
|
|
448
448
|
if (!a)
|
|
449
449
|
throw new Error("Content type not found");
|
|
450
|
-
var
|
|
451
|
-
if (!(
|
|
452
|
-
throw new Error("Invalid content type: ".concat(
|
|
450
|
+
var o = Jn.parse(a).type;
|
|
451
|
+
if (!(o === "image/svg+xml" || o === "text/plain"))
|
|
452
|
+
throw new Error("Invalid content type: ".concat(o));
|
|
453
453
|
}
|
|
454
454
|
if (s.readyState === 4) {
|
|
455
455
|
if (s.status === 404 || s.responseXML === null)
|
|
@@ -459,21 +459,21 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
459
459
|
else
|
|
460
460
|
throw new Error("There was a problem injecting the SVG: " + s.status + " " + s.statusText);
|
|
461
461
|
}
|
|
462
|
-
} catch (
|
|
463
|
-
if (s.abort(),
|
|
464
|
-
r(
|
|
462
|
+
} catch (i) {
|
|
463
|
+
if (s.abort(), i instanceof Error)
|
|
464
|
+
r(i, s);
|
|
465
465
|
else
|
|
466
|
-
throw
|
|
466
|
+
throw i;
|
|
467
467
|
}
|
|
468
468
|
}, s.open("GET", e), s.withCredentials = t, s.overrideMimeType && s.overrideMimeType("text/xml"), s.send();
|
|
469
469
|
}, xe = {}, Bt = function(e, t) {
|
|
470
470
|
xe[e] = xe[e] || [], xe[e].push(t);
|
|
471
471
|
}, Xn = function(e) {
|
|
472
|
-
for (var t = function(
|
|
472
|
+
for (var t = function(o, i) {
|
|
473
473
|
setTimeout(function() {
|
|
474
474
|
if (Array.isArray(xe[e])) {
|
|
475
|
-
var l = Ie.get(e), c = xe[e][
|
|
476
|
-
l instanceof SVGSVGElement && c(null, _n(l)), l instanceof Error && c(l),
|
|
475
|
+
var l = Ie.get(e), c = xe[e][o];
|
|
476
|
+
l instanceof SVGSVGElement && c(null, _n(l)), l instanceof Error && c(l), o === xe[e].length - 1 && delete xe[e];
|
|
477
477
|
}
|
|
478
478
|
}, 0);
|
|
479
479
|
}, r = 0, s = xe[e].length; r < s; r++)
|
|
@@ -490,21 +490,21 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
Ie.set(e, void 0), Bt(e, r), Rn(e, t, function(a,
|
|
494
|
-
var
|
|
495
|
-
a ? Ie.set(e, a) : ((
|
|
493
|
+
Ie.set(e, void 0), Bt(e, r), Rn(e, t, function(a, o) {
|
|
494
|
+
var i;
|
|
495
|
+
a ? Ie.set(e, a) : ((i = o.responseXML) === null || i === void 0 ? void 0 : i.documentElement) instanceof SVGSVGElement && Ie.set(e, o.responseXML.documentElement), Xn(e);
|
|
496
496
|
});
|
|
497
497
|
}, Qn = function(e, t, r) {
|
|
498
498
|
Rn(e, t, function(s, a) {
|
|
499
|
-
var
|
|
500
|
-
s ? r(s) : ((
|
|
499
|
+
var o;
|
|
500
|
+
s ? r(s) : ((o = a.responseXML) === null || o === void 0 ? void 0 : o.documentElement) instanceof SVGSVGElement && r(null, a.responseXML.documentElement);
|
|
501
501
|
});
|
|
502
502
|
}, er = 0, tr = function() {
|
|
503
503
|
return ++er;
|
|
504
|
-
}, ye = [], Gt = {}, nr = "http://www.w3.org/2000/svg", yt = "http://www.w3.org/1999/xlink", Ht = function(e, t, r, s, a,
|
|
504
|
+
}, ye = [], Gt = {}, nr = "http://www.w3.org/2000/svg", yt = "http://www.w3.org/1999/xlink", Ht = function(e, t, r, s, a, o, i) {
|
|
505
505
|
var l = e.getAttribute("data-src") || e.getAttribute("src");
|
|
506
506
|
if (!l) {
|
|
507
|
-
|
|
507
|
+
i(new Error("Invalid data-src or src attribute"));
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
510
|
if (ye.indexOf(e) !== -1) {
|
|
@@ -515,7 +515,7 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
515
515
|
var c = s ? Zn : Qn;
|
|
516
516
|
c(l, a, function(d, u) {
|
|
517
517
|
if (!u) {
|
|
518
|
-
ye.splice(ye.indexOf(e), 1), e = null,
|
|
518
|
+
ye.splice(ye.indexOf(e), 1), e = null, i(d);
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
var f = e.getAttribute("id");
|
|
@@ -547,13 +547,13 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
547
547
|
path: [],
|
|
548
548
|
pattern: ["fill", "stroke"],
|
|
549
549
|
radialGradient: ["fill", "stroke"]
|
|
550
|
-
}, v, g,
|
|
550
|
+
}, v, g, $, A, C;
|
|
551
551
|
Object.keys(T).forEach(function(X) {
|
|
552
|
-
v = X,
|
|
552
|
+
v = X, $ = T[X], g = u.querySelectorAll(v + "[id]");
|
|
553
553
|
for (var F = function(_, j) {
|
|
554
554
|
A = g[_].id, C = A + "-" + tr();
|
|
555
555
|
var I;
|
|
556
|
-
Array.prototype.forEach.call(
|
|
556
|
+
Array.prototype.forEach.call($, function(Y) {
|
|
557
557
|
I = u.querySelectorAll("[" + Y + '*="' + A + '"]');
|
|
558
558
|
for (var Z = 0, re = I.length; Z < re; Z++) {
|
|
559
559
|
var ae = I[Z].getAttribute(Y);
|
|
@@ -582,24 +582,24 @@ var Jn = qn(), Ie = /* @__PURE__ */ new Map(), _n = function(e) {
|
|
|
582
582
|
var q = u.querySelectorAll("style");
|
|
583
583
|
if (Array.prototype.forEach.call(q, function(X) {
|
|
584
584
|
X.textContent += "";
|
|
585
|
-
}), u.setAttribute("xmlns", nr), u.setAttribute("xmlns:xlink", yt),
|
|
586
|
-
ye.splice(ye.indexOf(e), 1), e = null,
|
|
585
|
+
}), u.setAttribute("xmlns", nr), u.setAttribute("xmlns:xlink", yt), o(u), !e.parentNode) {
|
|
586
|
+
ye.splice(ye.indexOf(e), 1), e = null, i(new Error("Parent node is null"));
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
|
-
e.parentNode.replaceChild(u, e), ye.splice(ye.indexOf(e), 1), e = null,
|
|
589
|
+
e.parentNode.replaceChild(u, e), ye.splice(ye.indexOf(e), 1), e = null, i(null, u);
|
|
590
590
|
});
|
|
591
591
|
}, rr = function(e, t) {
|
|
592
592
|
var r = t === void 0 ? {} : t, s = r.afterAll, a = s === void 0 ? function() {
|
|
593
|
-
} : s,
|
|
594
|
-
} :
|
|
593
|
+
} : s, o = r.afterEach, i = o === void 0 ? function() {
|
|
594
|
+
} : o, l = r.beforeEach, c = l === void 0 ? function() {
|
|
595
595
|
} : l, d = r.cacheRequests, u = d === void 0 ? !0 : d, f = r.evalScripts, y = f === void 0 ? "never" : f, p = r.httpRequestWithCredentials, S = p === void 0 ? !1 : p, w = r.renumerateIRIElements, E = w === void 0 ? !0 : w;
|
|
596
596
|
if (e && "length" in e)
|
|
597
597
|
for (var b = 0, T = 0, v = e.length; T < v; T++)
|
|
598
|
-
Ht(e[T], y, E, u, S, c, function(g,
|
|
599
|
-
|
|
598
|
+
Ht(e[T], y, E, u, S, c, function(g, $) {
|
|
599
|
+
i(g, $), e && "length" in e && e.length === ++b && a(b);
|
|
600
600
|
});
|
|
601
|
-
else e ? Ht(e, y, E, u, S, c, function(g,
|
|
602
|
-
|
|
601
|
+
else e ? Ht(e, y, E, u, S, c, function(g, $) {
|
|
602
|
+
i(g, $), a(1), e = null;
|
|
603
603
|
}) : a(0);
|
|
604
604
|
}, qe = { exports: {} }, Je = { exports: {} }, Q = {};
|
|
605
605
|
/** @license React v16.13.1
|
|
@@ -614,11 +614,11 @@ var Kt;
|
|
|
614
614
|
function sr() {
|
|
615
615
|
if (Kt) return Q;
|
|
616
616
|
Kt = 1;
|
|
617
|
-
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,
|
|
617
|
+
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, o = n ? Symbol.for("react.provider") : 60109, i = n ? Symbol.for("react.context") : 60110, l = n ? Symbol.for("react.async_mode") : 60111, c = n ? Symbol.for("react.concurrent_mode") : 60111, d = n ? Symbol.for("react.forward_ref") : 60112, u = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120, y = n ? Symbol.for("react.memo") : 60115, p = n ? Symbol.for("react.lazy") : 60116, S = n ? Symbol.for("react.block") : 60121, w = n ? Symbol.for("react.fundamental") : 60117, E = n ? Symbol.for("react.responder") : 60118, b = n ? Symbol.for("react.scope") : 60119;
|
|
618
618
|
function T(g) {
|
|
619
619
|
if (typeof g == "object" && g !== null) {
|
|
620
|
-
var
|
|
621
|
-
switch (
|
|
620
|
+
var $ = g.$$typeof;
|
|
621
|
+
switch ($) {
|
|
622
622
|
case e:
|
|
623
623
|
switch (g = g.type, g) {
|
|
624
624
|
case l:
|
|
@@ -630,30 +630,30 @@ function sr() {
|
|
|
630
630
|
return g;
|
|
631
631
|
default:
|
|
632
632
|
switch (g = g && g.$$typeof, g) {
|
|
633
|
-
case
|
|
633
|
+
case i:
|
|
634
634
|
case d:
|
|
635
635
|
case p:
|
|
636
636
|
case y:
|
|
637
|
-
case
|
|
637
|
+
case o:
|
|
638
638
|
return g;
|
|
639
639
|
default:
|
|
640
|
-
return
|
|
640
|
+
return $;
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
case t:
|
|
644
|
-
return
|
|
644
|
+
return $;
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
function v(g) {
|
|
649
649
|
return T(g) === c;
|
|
650
650
|
}
|
|
651
|
-
return Q.AsyncMode = l, Q.ConcurrentMode = c, Q.ContextConsumer =
|
|
651
|
+
return Q.AsyncMode = l, Q.ConcurrentMode = c, Q.ContextConsumer = i, Q.ContextProvider = o, Q.Element = e, Q.ForwardRef = d, Q.Fragment = r, Q.Lazy = p, Q.Memo = y, Q.Portal = t, Q.Profiler = a, Q.StrictMode = s, Q.Suspense = u, Q.isAsyncMode = function(g) {
|
|
652
652
|
return v(g) || T(g) === l;
|
|
653
653
|
}, Q.isConcurrentMode = v, Q.isContextConsumer = function(g) {
|
|
654
|
-
return T(g) === o;
|
|
655
|
-
}, Q.isContextProvider = function(g) {
|
|
656
654
|
return T(g) === i;
|
|
655
|
+
}, Q.isContextProvider = function(g) {
|
|
656
|
+
return T(g) === o;
|
|
657
657
|
}, Q.isElement = function(g) {
|
|
658
658
|
return typeof g == "object" && g !== null && g.$$typeof === e;
|
|
659
659
|
}, Q.isForwardRef = function(g) {
|
|
@@ -673,7 +673,7 @@ function sr() {
|
|
|
673
673
|
}, Q.isSuspense = function(g) {
|
|
674
674
|
return T(g) === u;
|
|
675
675
|
}, Q.isValidElementType = function(g) {
|
|
676
|
-
return typeof g == "string" || typeof g == "function" || g === r || g === c || g === a || g === s || g === u || g === f || typeof g == "object" && g !== null && (g.$$typeof === p || g.$$typeof === y || g.$$typeof ===
|
|
676
|
+
return typeof g == "string" || typeof g == "function" || g === r || g === c || g === a || g === s || g === u || g === f || typeof g == "object" && g !== null && (g.$$typeof === p || g.$$typeof === y || g.$$typeof === o || g.$$typeof === i || g.$$typeof === d || g.$$typeof === w || g.$$typeof === E || g.$$typeof === b || g.$$typeof === S);
|
|
677
677
|
}, Q.typeOf = T, Q;
|
|
678
678
|
}
|
|
679
679
|
var ee = {};
|
|
@@ -688,10 +688,10 @@ var ee = {};
|
|
|
688
688
|
var zt;
|
|
689
689
|
function ar() {
|
|
690
690
|
return zt || (zt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
691
|
-
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,
|
|
691
|
+
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, o = n ? Symbol.for("react.provider") : 60109, i = n ? Symbol.for("react.context") : 60110, l = n ? Symbol.for("react.async_mode") : 60111, c = n ? Symbol.for("react.concurrent_mode") : 60111, d = n ? Symbol.for("react.forward_ref") : 60112, u = n ? Symbol.for("react.suspense") : 60113, f = n ? Symbol.for("react.suspense_list") : 60120, y = n ? Symbol.for("react.memo") : 60115, p = n ? Symbol.for("react.lazy") : 60116, S = n ? Symbol.for("react.block") : 60121, w = n ? Symbol.for("react.fundamental") : 60117, E = n ? Symbol.for("react.responder") : 60118, b = n ? Symbol.for("react.scope") : 60119;
|
|
692
692
|
function T(M) {
|
|
693
693
|
return typeof M == "string" || typeof M == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
694
|
-
M === r || M === c || M === a || M === s || M === u || M === f || typeof M == "object" && M !== null && (M.$$typeof === p || M.$$typeof === y || M.$$typeof ===
|
|
694
|
+
M === r || M === c || M === a || M === s || M === u || M === f || typeof M == "object" && M !== null && (M.$$typeof === p || M.$$typeof === y || M.$$typeof === o || M.$$typeof === i || M.$$typeof === d || M.$$typeof === w || M.$$typeof === E || M.$$typeof === b || M.$$typeof === S);
|
|
695
695
|
}
|
|
696
696
|
function v(M) {
|
|
697
697
|
if (typeof M == "object" && M !== null) {
|
|
@@ -710,11 +710,11 @@ function ar() {
|
|
|
710
710
|
default:
|
|
711
711
|
var re = Z && Z.$$typeof;
|
|
712
712
|
switch (re) {
|
|
713
|
-
case
|
|
713
|
+
case i:
|
|
714
714
|
case d:
|
|
715
715
|
case p:
|
|
716
716
|
case y:
|
|
717
|
-
case
|
|
717
|
+
case o:
|
|
718
718
|
return re;
|
|
719
719
|
default:
|
|
720
720
|
return Y;
|
|
@@ -725,7 +725,7 @@ function ar() {
|
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
var g = l,
|
|
728
|
+
var g = l, $ = c, A = i, C = o, L = e, R = d, D = r, O = p, P = y, N = t, B = a, H = s, q = u, X = !1;
|
|
729
729
|
function F(M) {
|
|
730
730
|
return X || (X = !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.")), h(M) || v(M) === l;
|
|
731
731
|
}
|
|
@@ -733,11 +733,11 @@ function ar() {
|
|
|
733
733
|
return v(M) === c;
|
|
734
734
|
}
|
|
735
735
|
function x(M) {
|
|
736
|
-
return v(M) === o;
|
|
737
|
-
}
|
|
738
|
-
function $(M) {
|
|
739
736
|
return v(M) === i;
|
|
740
737
|
}
|
|
738
|
+
function k(M) {
|
|
739
|
+
return v(M) === o;
|
|
740
|
+
}
|
|
741
741
|
function _(M) {
|
|
742
742
|
return typeof M == "object" && M !== null && M.$$typeof === e;
|
|
743
743
|
}
|
|
@@ -765,7 +765,7 @@ function ar() {
|
|
|
765
765
|
function se(M) {
|
|
766
766
|
return v(M) === u;
|
|
767
767
|
}
|
|
768
|
-
ee.AsyncMode = g, ee.ConcurrentMode =
|
|
768
|
+
ee.AsyncMode = g, ee.ConcurrentMode = $, ee.ContextConsumer = A, ee.ContextProvider = C, ee.Element = L, ee.ForwardRef = R, ee.Fragment = D, ee.Lazy = O, ee.Memo = P, ee.Portal = N, ee.Profiler = B, ee.StrictMode = H, ee.Suspense = q, ee.isAsyncMode = F, ee.isConcurrentMode = h, ee.isContextConsumer = x, ee.isContextProvider = k, ee.isElement = _, ee.isForwardRef = j, ee.isFragment = I, ee.isLazy = U, ee.isMemo = W, ee.isPortal = V, ee.isProfiler = J, ee.isStrictMode = K, ee.isSuspense = se, ee.isValidElementType = T, ee.typeOf = v;
|
|
769
769
|
}()), ee;
|
|
770
770
|
}
|
|
771
771
|
var qt;
|
|
@@ -794,10 +794,10 @@ function or() {
|
|
|
794
794
|
var a = new String("abc");
|
|
795
795
|
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
|
|
796
796
|
return !1;
|
|
797
|
-
for (var
|
|
798
|
-
|
|
799
|
-
var l = Object.getOwnPropertyNames(
|
|
800
|
-
return
|
|
797
|
+
for (var o = {}, i = 0; i < 10; i++)
|
|
798
|
+
o["_" + String.fromCharCode(i)] = i;
|
|
799
|
+
var l = Object.getOwnPropertyNames(o).map(function(d) {
|
|
800
|
+
return o[d];
|
|
801
801
|
});
|
|
802
802
|
if (l.join("") !== "0123456789")
|
|
803
803
|
return !1;
|
|
@@ -809,22 +809,22 @@ function or() {
|
|
|
809
809
|
return !1;
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
return bt = s() ? Object.assign : function(a,
|
|
813
|
-
for (var
|
|
814
|
-
|
|
815
|
-
for (var u in
|
|
816
|
-
e.call(
|
|
812
|
+
return bt = s() ? Object.assign : function(a, o) {
|
|
813
|
+
for (var i, l = r(a), c, d = 1; d < arguments.length; d++) {
|
|
814
|
+
i = Object(arguments[d]);
|
|
815
|
+
for (var u in i)
|
|
816
|
+
e.call(i, u) && (l[u] = i[u]);
|
|
817
817
|
if (n) {
|
|
818
|
-
c = n(
|
|
818
|
+
c = n(i);
|
|
819
819
|
for (var f = 0; f < c.length; f++)
|
|
820
|
-
t.call(
|
|
820
|
+
t.call(i, c[f]) && (l[c[f]] = i[c[f]]);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
return l;
|
|
824
824
|
}, bt;
|
|
825
825
|
}
|
|
826
826
|
var vt, Xt;
|
|
827
|
-
function
|
|
827
|
+
function kt() {
|
|
828
828
|
if (Xt) return vt;
|
|
829
829
|
Xt = 1;
|
|
830
830
|
var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -841,17 +841,17 @@ function ir() {
|
|
|
841
841
|
var n = function() {
|
|
842
842
|
};
|
|
843
843
|
if (process.env.NODE_ENV !== "production") {
|
|
844
|
-
var e = /* @__PURE__ */
|
|
844
|
+
var e = /* @__PURE__ */ kt(), t = {}, r = /* @__PURE__ */ jn();
|
|
845
845
|
n = function(a) {
|
|
846
|
-
var
|
|
847
|
-
typeof console < "u" && console.error(
|
|
846
|
+
var o = "Warning: " + a;
|
|
847
|
+
typeof console < "u" && console.error(o);
|
|
848
848
|
try {
|
|
849
|
-
throw new Error(
|
|
849
|
+
throw new Error(o);
|
|
850
850
|
} catch {
|
|
851
851
|
}
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
function s(a,
|
|
854
|
+
function s(a, o, i, l, c) {
|
|
855
855
|
if (process.env.NODE_ENV !== "production") {
|
|
856
856
|
for (var d in a)
|
|
857
857
|
if (r(a, d)) {
|
|
@@ -859,21 +859,21 @@ function ir() {
|
|
|
859
859
|
try {
|
|
860
860
|
if (typeof a[d] != "function") {
|
|
861
861
|
var f = Error(
|
|
862
|
-
(l || "React class") + ": " +
|
|
862
|
+
(l || "React class") + ": " + i + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
863
863
|
);
|
|
864
864
|
throw f.name = "Invariant Violation", f;
|
|
865
865
|
}
|
|
866
|
-
u = a[d](
|
|
866
|
+
u = a[d](o, d, l, i, null, e);
|
|
867
867
|
} catch (p) {
|
|
868
868
|
u = p;
|
|
869
869
|
}
|
|
870
870
|
if (u && !(u instanceof Error) && n(
|
|
871
|
-
(l || "React class") + ": type specification of " +
|
|
871
|
+
(l || "React class") + ": type specification of " + i + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
872
872
|
), u instanceof Error && !(u.message in t)) {
|
|
873
873
|
t[u.message] = !0;
|
|
874
874
|
var y = c ? c() : "";
|
|
875
875
|
n(
|
|
876
|
-
"Failed " +
|
|
876
|
+
"Failed " + i + " type: " + u.message + (y ?? "")
|
|
877
877
|
);
|
|
878
878
|
}
|
|
879
879
|
}
|
|
@@ -887,20 +887,20 @@ var wt, en;
|
|
|
887
887
|
function lr() {
|
|
888
888
|
if (en) return wt;
|
|
889
889
|
en = 1;
|
|
890
|
-
var n = Dn(), e = or(), t = /* @__PURE__ */
|
|
890
|
+
var n = Dn(), e = or(), t = /* @__PURE__ */ kt(), r = /* @__PURE__ */ jn(), s = /* @__PURE__ */ ir(), a = function() {
|
|
891
891
|
};
|
|
892
|
-
process.env.NODE_ENV !== "production" && (a = function(
|
|
893
|
-
var l = "Warning: " +
|
|
892
|
+
process.env.NODE_ENV !== "production" && (a = function(i) {
|
|
893
|
+
var l = "Warning: " + i;
|
|
894
894
|
typeof console < "u" && console.error(l);
|
|
895
895
|
try {
|
|
896
896
|
throw new Error(l);
|
|
897
897
|
} catch {
|
|
898
898
|
}
|
|
899
899
|
});
|
|
900
|
-
function
|
|
900
|
+
function o() {
|
|
901
901
|
return null;
|
|
902
902
|
}
|
|
903
|
-
return wt = function(
|
|
903
|
+
return wt = function(i, l) {
|
|
904
904
|
var c = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
905
905
|
function u(h) {
|
|
906
906
|
var x = h && (c && h[c] || h[d]);
|
|
@@ -920,7 +920,7 @@ function lr() {
|
|
|
920
920
|
arrayOf: T,
|
|
921
921
|
element: v(),
|
|
922
922
|
elementType: g(),
|
|
923
|
-
instanceOf:
|
|
923
|
+
instanceOf: $,
|
|
924
924
|
node: R(),
|
|
925
925
|
objectOf: C,
|
|
926
926
|
oneOf: A,
|
|
@@ -937,7 +937,7 @@ function lr() {
|
|
|
937
937
|
S.prototype = Error.prototype;
|
|
938
938
|
function w(h) {
|
|
939
939
|
if (process.env.NODE_ENV !== "production")
|
|
940
|
-
var x = {},
|
|
940
|
+
var x = {}, k = 0;
|
|
941
941
|
function _(I, U, W, V, J, K, se) {
|
|
942
942
|
if (V = V || f, K = K || W, se !== t) {
|
|
943
943
|
if (l) {
|
|
@@ -948,9 +948,9 @@ function lr() {
|
|
|
948
948
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
949
949
|
var Y = V + ":" + W;
|
|
950
950
|
!x[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
951
|
-
|
|
951
|
+
k < 3 && (a(
|
|
952
952
|
"You are manually calling a React.PropTypes validation function for the `" + K + "` prop on `" + V + "`. 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."
|
|
953
|
-
), x[Y] = !0,
|
|
953
|
+
), x[Y] = !0, k++);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
return U[W] == null ? I ? U[W] === null ? new S("The " + J + " `" + K + "` is marked as required " + ("in `" + V + "`, but its value is `null`.")) : new S("The " + J + " `" + K + "` is marked as required in " + ("`" + V + "`, but its value is `undefined`.")) : null : h(U, W, V, J, K);
|
|
@@ -959,8 +959,8 @@ function lr() {
|
|
|
959
959
|
return j.isRequired = _.bind(null, !0), j;
|
|
960
960
|
}
|
|
961
961
|
function E(h) {
|
|
962
|
-
function x(
|
|
963
|
-
var V =
|
|
962
|
+
function x(k, _, j, I, U, W) {
|
|
963
|
+
var V = k[_], J = H(V);
|
|
964
964
|
if (J !== h) {
|
|
965
965
|
var K = q(V);
|
|
966
966
|
return new S(
|
|
@@ -973,13 +973,13 @@ function lr() {
|
|
|
973
973
|
return w(x);
|
|
974
974
|
}
|
|
975
975
|
function b() {
|
|
976
|
-
return w(
|
|
976
|
+
return w(o);
|
|
977
977
|
}
|
|
978
978
|
function T(h) {
|
|
979
|
-
function x(
|
|
979
|
+
function x(k, _, j, I, U) {
|
|
980
980
|
if (typeof h != "function")
|
|
981
981
|
return new S("Property `" + U + "` of component `" + j + "` has invalid PropType notation inside arrayOf.");
|
|
982
|
-
var W =
|
|
982
|
+
var W = k[_];
|
|
983
983
|
if (!Array.isArray(W)) {
|
|
984
984
|
var V = H(W);
|
|
985
985
|
return new S("Invalid " + I + " `" + U + "` of type " + ("`" + V + "` supplied to `" + j + "`, expected an array."));
|
|
@@ -994,9 +994,9 @@ function lr() {
|
|
|
994
994
|
return w(x);
|
|
995
995
|
}
|
|
996
996
|
function v() {
|
|
997
|
-
function h(x,
|
|
998
|
-
var U = x[
|
|
999
|
-
if (!
|
|
997
|
+
function h(x, k, _, j, I) {
|
|
998
|
+
var U = x[k];
|
|
999
|
+
if (!i(U)) {
|
|
1000
1000
|
var W = H(U);
|
|
1001
1001
|
return new S("Invalid " + j + " `" + I + "` of type " + ("`" + W + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
1002
1002
|
}
|
|
@@ -1005,8 +1005,8 @@ function lr() {
|
|
|
1005
1005
|
return w(h);
|
|
1006
1006
|
}
|
|
1007
1007
|
function g() {
|
|
1008
|
-
function h(x,
|
|
1009
|
-
var U = x[
|
|
1008
|
+
function h(x, k, _, j, I) {
|
|
1009
|
+
var U = x[k];
|
|
1010
1010
|
if (!n.isValidElementType(U)) {
|
|
1011
1011
|
var W = H(U);
|
|
1012
1012
|
return new S("Invalid " + j + " `" + I + "` of type " + ("`" + W + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
@@ -1015,10 +1015,10 @@ function lr() {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
return w(h);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1019
|
-
function x(
|
|
1020
|
-
if (!(
|
|
1021
|
-
var W = h.name || f, V = F(
|
|
1018
|
+
function $(h) {
|
|
1019
|
+
function x(k, _, j, I, U) {
|
|
1020
|
+
if (!(k[_] instanceof h)) {
|
|
1021
|
+
var W = h.name || f, V = F(k[_]);
|
|
1022
1022
|
return new S("Invalid " + I + " `" + U + "` of type " + ("`" + V + "` supplied to `" + j + "`, expected ") + ("instance of `" + W + "`."));
|
|
1023
1023
|
}
|
|
1024
1024
|
return null;
|
|
@@ -1029,9 +1029,9 @@ function lr() {
|
|
|
1029
1029
|
if (!Array.isArray(h))
|
|
1030
1030
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
1031
1031
|
"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])."
|
|
1032
|
-
) : a("Invalid argument supplied to oneOf, expected an array.")),
|
|
1033
|
-
function x(
|
|
1034
|
-
for (var W =
|
|
1032
|
+
) : a("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
1033
|
+
function x(k, _, j, I, U) {
|
|
1034
|
+
for (var W = k[_], V = 0; V < h.length; V++)
|
|
1035
1035
|
if (p(W, h[V]))
|
|
1036
1036
|
return null;
|
|
1037
1037
|
var J = JSON.stringify(h, function(se, M) {
|
|
@@ -1043,10 +1043,10 @@ function lr() {
|
|
|
1043
1043
|
return w(x);
|
|
1044
1044
|
}
|
|
1045
1045
|
function C(h) {
|
|
1046
|
-
function x(
|
|
1046
|
+
function x(k, _, j, I, U) {
|
|
1047
1047
|
if (typeof h != "function")
|
|
1048
1048
|
return new S("Property `" + U + "` of component `" + j + "` has invalid PropType notation inside objectOf.");
|
|
1049
|
-
var W =
|
|
1049
|
+
var W = k[_], V = H(W);
|
|
1050
1050
|
if (V !== "object")
|
|
1051
1051
|
return new S("Invalid " + I + " `" + U + "` of type " + ("`" + V + "` supplied to `" + j + "`, expected an object."));
|
|
1052
1052
|
for (var J in W)
|
|
@@ -1061,13 +1061,13 @@ function lr() {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
function L(h) {
|
|
1063
1063
|
if (!Array.isArray(h))
|
|
1064
|
-
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
1064
|
+
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
1065
1065
|
for (var x = 0; x < h.length; x++) {
|
|
1066
|
-
var
|
|
1067
|
-
if (typeof
|
|
1066
|
+
var k = h[x];
|
|
1067
|
+
if (typeof k != "function")
|
|
1068
1068
|
return a(
|
|
1069
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + X(
|
|
1070
|
-
),
|
|
1069
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + X(k) + " at index " + x + "."
|
|
1070
|
+
), o;
|
|
1071
1071
|
}
|
|
1072
1072
|
function _(j, I, U, W, V) {
|
|
1073
1073
|
for (var J = [], K = 0; K < h.length; K++) {
|
|
@@ -1082,19 +1082,19 @@ function lr() {
|
|
|
1082
1082
|
return w(_);
|
|
1083
1083
|
}
|
|
1084
1084
|
function R() {
|
|
1085
|
-
function h(x,
|
|
1086
|
-
return N(x[
|
|
1085
|
+
function h(x, k, _, j, I) {
|
|
1086
|
+
return N(x[k]) ? null : new S("Invalid " + j + " `" + I + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
1087
1087
|
}
|
|
1088
1088
|
return w(h);
|
|
1089
1089
|
}
|
|
1090
|
-
function D(h, x,
|
|
1090
|
+
function D(h, x, k, _, j) {
|
|
1091
1091
|
return new S(
|
|
1092
|
-
(h || "React class") + ": " + x + " type `" +
|
|
1092
|
+
(h || "React class") + ": " + x + " type `" + k + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + j + "`."
|
|
1093
1093
|
);
|
|
1094
1094
|
}
|
|
1095
1095
|
function O(h) {
|
|
1096
|
-
function x(
|
|
1097
|
-
var W =
|
|
1096
|
+
function x(k, _, j, I, U) {
|
|
1097
|
+
var W = k[_], V = H(W);
|
|
1098
1098
|
if (V !== "object")
|
|
1099
1099
|
return new S("Invalid " + I + " `" + U + "` of type `" + V + "` " + ("supplied to `" + j + "`, expected `object`."));
|
|
1100
1100
|
for (var J in h) {
|
|
@@ -1110,18 +1110,18 @@ function lr() {
|
|
|
1110
1110
|
return w(x);
|
|
1111
1111
|
}
|
|
1112
1112
|
function P(h) {
|
|
1113
|
-
function x(
|
|
1114
|
-
var W =
|
|
1113
|
+
function x(k, _, j, I, U) {
|
|
1114
|
+
var W = k[_], V = H(W);
|
|
1115
1115
|
if (V !== "object")
|
|
1116
1116
|
return new S("Invalid " + I + " `" + U + "` of type `" + V + "` " + ("supplied to `" + j + "`, expected `object`."));
|
|
1117
|
-
var J = e({},
|
|
1117
|
+
var J = e({}, k[_], h);
|
|
1118
1118
|
for (var K in J) {
|
|
1119
1119
|
var se = h[K];
|
|
1120
1120
|
if (r(h, K) && typeof se != "function")
|
|
1121
1121
|
return D(j, I, U, K, q(se));
|
|
1122
1122
|
if (!se)
|
|
1123
1123
|
return new S(
|
|
1124
|
-
"Invalid " + I + " `" + U + "` key `" + K + "` supplied to `" + j + "`.\nBad object: " + JSON.stringify(
|
|
1124
|
+
"Invalid " + I + " `" + U + "` key `" + K + "` supplied to `" + j + "`.\nBad object: " + JSON.stringify(k[_], null, " ") + `
|
|
1125
1125
|
Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
1126
1126
|
);
|
|
1127
1127
|
var M = se(W, K, j, I, U + "." + K, t);
|
|
@@ -1143,17 +1143,17 @@ Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
|
1143
1143
|
case "object":
|
|
1144
1144
|
if (Array.isArray(h))
|
|
1145
1145
|
return h.every(N);
|
|
1146
|
-
if (h === null ||
|
|
1146
|
+
if (h === null || i(h))
|
|
1147
1147
|
return !0;
|
|
1148
1148
|
var x = u(h);
|
|
1149
1149
|
if (x) {
|
|
1150
|
-
var
|
|
1150
|
+
var k = x.call(h), _;
|
|
1151
1151
|
if (x !== h.entries) {
|
|
1152
|
-
for (; !(_ =
|
|
1152
|
+
for (; !(_ = k.next()).done; )
|
|
1153
1153
|
if (!N(_.value))
|
|
1154
1154
|
return !1;
|
|
1155
1155
|
} else
|
|
1156
|
-
for (; !(_ =
|
|
1156
|
+
for (; !(_ = k.next()).done; ) {
|
|
1157
1157
|
var j = _.value;
|
|
1158
1158
|
if (j && !N(j[1]))
|
|
1159
1159
|
return !1;
|
|
@@ -1208,13 +1208,13 @@ var Et, tn;
|
|
|
1208
1208
|
function cr() {
|
|
1209
1209
|
if (tn) return Et;
|
|
1210
1210
|
tn = 1;
|
|
1211
|
-
var n = /* @__PURE__ */
|
|
1211
|
+
var n = /* @__PURE__ */ kt();
|
|
1212
1212
|
function e() {
|
|
1213
1213
|
}
|
|
1214
1214
|
function t() {
|
|
1215
1215
|
}
|
|
1216
1216
|
return t.resetWarningCache = e, Et = function() {
|
|
1217
|
-
function r(
|
|
1217
|
+
function r(o, i, l, c, d, u) {
|
|
1218
1218
|
if (u !== n) {
|
|
1219
1219
|
var f = new Error(
|
|
1220
1220
|
"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"
|
|
@@ -1273,15 +1273,15 @@ var ie = /* @__PURE__ */ ur(), dr = function(e) {
|
|
|
1273
1273
|
if (e[s] !== t[s])
|
|
1274
1274
|
return !0;
|
|
1275
1275
|
return !1;
|
|
1276
|
-
}, pr = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], Xe = "http://www.w3.org/2000/svg", rn = "http://www.w3.org/1999/xlink",
|
|
1276
|
+
}, pr = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], Xe = "http://www.w3.org/2000/svg", rn = "http://www.w3.org/1999/xlink", $t = /* @__PURE__ */ function(n) {
|
|
1277
1277
|
function e() {
|
|
1278
|
-
for (var r, s = arguments.length, a = new Array(s),
|
|
1279
|
-
a[
|
|
1278
|
+
for (var r, s = arguments.length, a = new Array(s), o = 0; o < s; o++)
|
|
1279
|
+
a[o] = arguments[o];
|
|
1280
1280
|
return r = n.call.apply(n, [this].concat(a)) || this, r.initialState = {
|
|
1281
1281
|
hasError: !1,
|
|
1282
1282
|
isLoading: !0
|
|
1283
|
-
}, r.state = r.initialState, r._isMounted = !1, r.reactWrapper = void 0, r.nonReactWrapper = void 0, r.refCallback = function(
|
|
1284
|
-
r.reactWrapper =
|
|
1283
|
+
}, r.state = r.initialState, r._isMounted = !1, r.reactWrapper = void 0, r.nonReactWrapper = void 0, r.refCallback = function(i) {
|
|
1284
|
+
r.reactWrapper = i;
|
|
1285
1285
|
}, r;
|
|
1286
1286
|
}
|
|
1287
1287
|
zn(e, n);
|
|
@@ -1289,7 +1289,7 @@ var ie = /* @__PURE__ */ ur(), dr = function(e) {
|
|
|
1289
1289
|
return t.renderSVG = function() {
|
|
1290
1290
|
var s = this;
|
|
1291
1291
|
if (this.reactWrapper instanceof dr(this.reactWrapper).Node) {
|
|
1292
|
-
var a = this.props,
|
|
1292
|
+
var a = this.props, o = a.desc, i = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, d = a.src, u = a.title, f = a.useRequestCache, y = this.props.onError, p = this.props.beforeInjection, S = this.props.afterInjection, w = this.props.wrapper, E, b;
|
|
1293
1293
|
w === "svg" ? (E = document.createElementNS(Xe, w), E.setAttribute("xmlns", Xe), E.setAttribute("xmlns:xlink", rn), b = document.createElementNS(Xe, w)) : (E = document.createElement(w), b = document.createElement(w)), E.appendChild(b), b.dataset.src = d, this.nonReactWrapper = this.reactWrapper.appendChild(E);
|
|
1294
1294
|
var T = function(A) {
|
|
1295
1295
|
if (s.removeSVG(), !s._isMounted) {
|
|
@@ -1321,11 +1321,11 @@ var ie = /* @__PURE__ */ ur(), dr = function(e) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
});
|
|
1323
1323
|
}, g = function(A) {
|
|
1324
|
-
if (A.setAttribute("role", "img"),
|
|
1324
|
+
if (A.setAttribute("role", "img"), o) {
|
|
1325
1325
|
var C = A.querySelector(":scope > desc");
|
|
1326
1326
|
C && A.removeChild(C);
|
|
1327
1327
|
var L = document.createElement("desc");
|
|
1328
|
-
L.innerHTML =
|
|
1328
|
+
L.innerHTML = o, A.prepend(L);
|
|
1329
1329
|
}
|
|
1330
1330
|
if (u) {
|
|
1331
1331
|
var R = A.querySelector(":scope > title");
|
|
@@ -1343,7 +1343,7 @@ var ie = /* @__PURE__ */ ur(), dr = function(e) {
|
|
|
1343
1343
|
afterEach: v,
|
|
1344
1344
|
beforeEach: g,
|
|
1345
1345
|
cacheRequests: f,
|
|
1346
|
-
evalScripts:
|
|
1346
|
+
evalScripts: i,
|
|
1347
1347
|
httpRequestWithCredentials: l,
|
|
1348
1348
|
renumerateIRIElements: c
|
|
1349
1349
|
});
|
|
@@ -1367,18 +1367,18 @@ var ie = /* @__PURE__ */ ur(), dr = function(e) {
|
|
|
1367
1367
|
s.afterInjection, s.beforeInjection, s.desc, s.evalScripts;
|
|
1368
1368
|
var a = s.fallback;
|
|
1369
1369
|
s.httpRequestWithCredentials;
|
|
1370
|
-
var
|
|
1370
|
+
var o = s.loading;
|
|
1371
1371
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1372
|
-
var
|
|
1372
|
+
var i = s.wrapper, l = Kn(s, pr), c = i;
|
|
1373
1373
|
return /* @__PURE__ */ He.createElement(c, st({}, l, {
|
|
1374
1374
|
ref: this.refCallback
|
|
1375
|
-
},
|
|
1375
|
+
}, i === "svg" ? {
|
|
1376
1376
|
xmlns: Xe,
|
|
1377
1377
|
xmlnsXlink: rn
|
|
1378
|
-
} : {}), this.state.isLoading &&
|
|
1378
|
+
} : {}), this.state.isLoading && o && /* @__PURE__ */ He.createElement(o, null), this.state.hasError && a && /* @__PURE__ */ He.createElement(a, null));
|
|
1379
1379
|
}, e;
|
|
1380
1380
|
}(He.Component);
|
|
1381
|
-
|
|
1381
|
+
$t.defaultProps = {
|
|
1382
1382
|
afterInjection: function() {
|
|
1383
1383
|
},
|
|
1384
1384
|
beforeInjection: function() {
|
|
@@ -1395,7 +1395,7 @@ kt.defaultProps = {
|
|
|
1395
1395
|
useRequestCache: !0,
|
|
1396
1396
|
wrapper: "div"
|
|
1397
1397
|
};
|
|
1398
|
-
|
|
1398
|
+
$t.propTypes = {
|
|
1399
1399
|
afterInjection: ie.func,
|
|
1400
1400
|
beforeInjection: ie.func,
|
|
1401
1401
|
desc: ie.string,
|
|
@@ -1427,8 +1427,8 @@ const ta = (n) => {
|
|
|
1427
1427
|
placeholderIcon: r,
|
|
1428
1428
|
color: s,
|
|
1429
1429
|
disabled: a,
|
|
1430
|
-
state:
|
|
1431
|
-
rotated:
|
|
1430
|
+
state: o = "base",
|
|
1431
|
+
rotated: i = !1,
|
|
1432
1432
|
onClick: l,
|
|
1433
1433
|
isInteractable: c = !1,
|
|
1434
1434
|
spin: d = !1,
|
|
@@ -1437,14 +1437,14 @@ const ta = (n) => {
|
|
|
1437
1437
|
}) => {
|
|
1438
1438
|
const [y, p] = G(!1), S = (R) => R?.toLowerCase().endsWith(".svg") || !R?.includes("/"), w = (R) => R?.startsWith("http") || R?.startsWith("/"), E = {
|
|
1439
1439
|
img: `${c ? "smp-image-interactable" : ""}`,
|
|
1440
|
-
svg: `smp-icon ${
|
|
1440
|
+
svg: `smp-icon ${o ? `smp-icon-${o}` : ""} ${i ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${d ? "smp-icon-spin" : ""}`
|
|
1441
1441
|
}, b = (R) => {
|
|
1442
1442
|
!a && c && l && l(R);
|
|
1443
1443
|
}, T = (R) => {
|
|
1444
1444
|
!a && c && (R.key === "Enter" || R.key === " ") && (R.preventDefault(), b(R));
|
|
1445
1445
|
}, v = y ? r : n, g = S(v), A = w(v) ? v : hr(`assets/svg/${v}`);
|
|
1446
1446
|
return g ? /* @__PURE__ */ m.jsx(
|
|
1447
|
-
|
|
1447
|
+
$t,
|
|
1448
1448
|
{
|
|
1449
1449
|
src: A,
|
|
1450
1450
|
onError: () => p(!0),
|
|
@@ -1494,8 +1494,8 @@ const ta = (n) => {
|
|
|
1494
1494
|
icon: r,
|
|
1495
1495
|
placeholderIcon: s,
|
|
1496
1496
|
disabled: a,
|
|
1497
|
-
sizing:
|
|
1498
|
-
variant:
|
|
1497
|
+
sizing: o = "base",
|
|
1498
|
+
variant: i = "primary",
|
|
1499
1499
|
appearance: l = "raised",
|
|
1500
1500
|
showIcon: c = !0,
|
|
1501
1501
|
showText: d = !0,
|
|
@@ -1510,7 +1510,7 @@ const ta = (n) => {
|
|
|
1510
1510
|
buttonExt: T
|
|
1511
1511
|
}) => {
|
|
1512
1512
|
const v = {
|
|
1513
|
-
container: `smp-button smp-button-container ${
|
|
1513
|
+
container: `smp-button smp-button-container ${o ? `smp-button-${o}` : ""} ${i ? `smp-buttonVariant-${i}` : ""} ${l ? `smp-buttonType-${l}` : ""} ${u ? "smp-button-fullWidth" : ""} smp-justifyContent-${y} ${w && !d ? "smp-button-squared" : ""} ${b ? "smp-buttonActive" : ""} ${T ? `smp-buttonExt-${T}` : ""}`
|
|
1514
1514
|
};
|
|
1515
1515
|
return /* @__PURE__ */ m.jsx(
|
|
1516
1516
|
"button",
|
|
@@ -1523,16 +1523,16 @@ const ta = (n) => {
|
|
|
1523
1523
|
disabled: a,
|
|
1524
1524
|
"aria-busy": f,
|
|
1525
1525
|
title: p || S,
|
|
1526
|
-
children: f ? /* @__PURE__ */ m.jsx(de, { icon: "spinner", state: an(
|
|
1526
|
+
children: f ? /* @__PURE__ */ m.jsx(de, { icon: "spinner", state: an(i), spin: !0 }) : /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
1527
1527
|
r && c && /* @__PURE__ */ m.jsx(
|
|
1528
1528
|
de,
|
|
1529
1529
|
{
|
|
1530
1530
|
icon: r,
|
|
1531
1531
|
placeholderIcon: s,
|
|
1532
1532
|
disabled: a,
|
|
1533
|
-
state: an(
|
|
1534
|
-
width: sn(
|
|
1535
|
-
height: sn(
|
|
1533
|
+
state: an(i),
|
|
1534
|
+
width: sn(o),
|
|
1535
|
+
height: sn(o)
|
|
1536
1536
|
}
|
|
1537
1537
|
),
|
|
1538
1538
|
d && /* @__PURE__ */ m.jsx("span", { children: S || n })
|
|
@@ -1585,7 +1585,7 @@ const ta = (n) => {
|
|
|
1585
1585
|
selectedIndex: r,
|
|
1586
1586
|
onTabChange: s
|
|
1587
1587
|
}) => {
|
|
1588
|
-
const [a,
|
|
1588
|
+
const [a, o] = G(r ?? 0), [i, l] = G(!1), [c, d] = G(!1), u = le(null);
|
|
1589
1589
|
if (ne(() => {
|
|
1590
1590
|
const b = u.current;
|
|
1591
1591
|
if (!b) return;
|
|
@@ -1595,7 +1595,7 @@ const ta = (n) => {
|
|
|
1595
1595
|
b.removeEventListener("scroll", T), window.removeEventListener("resize", S);
|
|
1596
1596
|
};
|
|
1597
1597
|
}, []), ne(() => {
|
|
1598
|
-
r !== void 0 &&
|
|
1598
|
+
r !== void 0 && o(r);
|
|
1599
1599
|
}, [r]), !n.children || n.children.length === 0)
|
|
1600
1600
|
return /* @__PURE__ */ m.jsx("div", { className: "tab-bar-empty", children: "No tabs available" });
|
|
1601
1601
|
const f = {
|
|
@@ -1623,7 +1623,7 @@ const ta = (n) => {
|
|
|
1623
1623
|
role: "tabpanel",
|
|
1624
1624
|
"data-component": "tab-bar",
|
|
1625
1625
|
children: [
|
|
1626
|
-
|
|
1626
|
+
i && /* @__PURE__ */ m.jsx("div", { className: f.scrollButtonLeft, children: /* @__PURE__ */ m.jsx(
|
|
1627
1627
|
Se,
|
|
1628
1628
|
{
|
|
1629
1629
|
bindValue: "",
|
|
@@ -1642,7 +1642,7 @@ const ta = (n) => {
|
|
|
1642
1642
|
"aria-selected": T === a,
|
|
1643
1643
|
tabIndex: T === a ? 0 : -1,
|
|
1644
1644
|
onClick: () => {
|
|
1645
|
-
s?.(T, b),
|
|
1645
|
+
s?.(T, b), o(T);
|
|
1646
1646
|
},
|
|
1647
1647
|
children: [
|
|
1648
1648
|
b.icon && /* @__PURE__ */ m.jsx(
|
|
@@ -1709,15 +1709,18 @@ const ta = (n) => {
|
|
|
1709
1709
|
rt.Children.forEach(n, (p) => {
|
|
1710
1710
|
rt.isValidElement(p) && (s[p.props.id] = p);
|
|
1711
1711
|
});
|
|
1712
|
-
const a = "--smp-grid-template-cols",
|
|
1712
|
+
const a = "--smp-grid-template-cols", o = "--smp-grid-template-rows", i = On(
|
|
1713
1713
|
e.sections ?? [],
|
|
1714
1714
|
Object.keys(s)
|
|
1715
1715
|
), l = (p) => p.reduce((S, w) => {
|
|
1716
1716
|
let E = "", b = {}, T = {}, v = "";
|
|
1717
|
-
return w.sections?.length ? (E = he["smp-layout-section-grid"], b = l(w.sections), w.gridCols === void 0 && (v = he[w.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"],
|
|
1717
|
+
return w.sections?.length ? (E = he["smp-layout-section-grid"], b = l(w.sections), w.gridCols === void 0 && (v = he[w.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"], w.horizontal || Ut(w.sections) ? T = Vt(
|
|
1718
1718
|
w.sections,
|
|
1719
|
-
w.horizontal ? a :
|
|
1720
|
-
)
|
|
1719
|
+
w.horizontal ? a : o
|
|
1720
|
+
) : T = {
|
|
1721
|
+
[a]: "auto",
|
|
1722
|
+
[o]: "auto"
|
|
1723
|
+
})) : w.content?.length && (w.gridCols !== void 0 && w.gridCols > 0 ? (E = he["smp-layout-section-grid"], v = he["smp-grid-template-cols"], T = {
|
|
1721
1724
|
[a]: `repeat(${w.gridCols}, 1fr)`
|
|
1722
1725
|
}) : E = he["smp-layout-section-flex"]), {
|
|
1723
1726
|
...S,
|
|
@@ -1727,9 +1730,9 @@ const ta = (n) => {
|
|
|
1727
1730
|
styles: T
|
|
1728
1731
|
}
|
|
1729
1732
|
};
|
|
1730
|
-
}, {}), c = l(
|
|
1731
|
-
|
|
1732
|
-
e.horizontal ? a :
|
|
1733
|
+
}, {}), c = l(i), d = `${he["smp-layout"]} ${e.horizontal ? he["smp-layout-horizontal"] : he["smp-layout-vertical"]}`, u = e.horizontal || Ut(e.sections || []) ? Vt(
|
|
1734
|
+
i,
|
|
1735
|
+
e.horizontal ? a : o
|
|
1733
1736
|
) : {}, f = (p, S) => {
|
|
1734
1737
|
const w = /* @__PURE__ */ m.jsx(
|
|
1735
1738
|
"div",
|
|
@@ -1784,7 +1787,7 @@ const ta = (n) => {
|
|
|
1784
1787
|
{
|
|
1785
1788
|
data: {
|
|
1786
1789
|
type: "SmeupDataTree",
|
|
1787
|
-
children:
|
|
1790
|
+
children: i.map((p) => ({
|
|
1788
1791
|
decode: p.title || p.id || "Tab",
|
|
1789
1792
|
obj: { t: "", p: "", k: "" },
|
|
1790
1793
|
placeholderIcon: "tab",
|
|
@@ -1798,7 +1801,7 @@ const ta = (n) => {
|
|
|
1798
1801
|
toolbar: !1
|
|
1799
1802
|
}
|
|
1800
1803
|
),
|
|
1801
|
-
e.sectionsType ? f(
|
|
1804
|
+
e.sectionsType ? f(i[t], !0) : i.map((p) => f(p))
|
|
1802
1805
|
] });
|
|
1803
1806
|
}, te = {
|
|
1804
1807
|
AUTOCOMPLETE: "ACP",
|
|
@@ -1868,26 +1871,26 @@ function xr(n, e) {
|
|
|
1868
1871
|
const t = /* @__PURE__ */ new Date(), r = n.replaceAll("/", "").replaceAll("-", "");
|
|
1869
1872
|
let s = "DDMMYYYY";
|
|
1870
1873
|
e === "en" && (s = "MMDDYYYY");
|
|
1871
|
-
const a = s.indexOf("DD"),
|
|
1872
|
-
let
|
|
1874
|
+
const a = s.indexOf("DD"), o = s.indexOf("MM");
|
|
1875
|
+
let i = 0, l = 0, c = "";
|
|
1873
1876
|
switch (r.length) {
|
|
1874
1877
|
case 1:
|
|
1875
1878
|
case 2:
|
|
1876
|
-
return
|
|
1879
|
+
return i = parseInt(r), t.setDate(i), Ze(t) ? t : n;
|
|
1877
1880
|
case 3:
|
|
1878
1881
|
case 4:
|
|
1879
|
-
return
|
|
1882
|
+
return i = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), o === 0 ? (t.setMonth(i - 1), t.setDate(l)) : a === 0 && (t.setMonth(l - 1), t.setDate(i)), Ze(t) ? t : n;
|
|
1880
1883
|
case 5:
|
|
1881
1884
|
case 6: {
|
|
1882
|
-
|
|
1885
|
+
i = 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);
|
|
1883
1886
|
let d = 0, u = 0;
|
|
1884
|
-
return
|
|
1887
|
+
return o === 0 ? (d = l, u = i - 1, t.setFullYear(parseInt(c), u, d)) : a === 0 && (d = i, u = l - 1, t.setFullYear(parseInt(c), u, d)), _t(i, u, parseInt(c)) && Ze(t) ? t : n;
|
|
1885
1888
|
}
|
|
1886
1889
|
case 7:
|
|
1887
1890
|
case 8: {
|
|
1888
|
-
|
|
1891
|
+
i = parseInt(r.substring(0, 2)), l = parseInt(r.substring(2, 4)), c = r.substring(4);
|
|
1889
1892
|
let d = 0, u = 0;
|
|
1890
|
-
return
|
|
1893
|
+
return o === 0 ? (d = l, u = i - 1, t.setFullYear(parseInt(c), u, d)) : a === 0 && (d = i, u = l - 1, t.setFullYear(parseInt(c), u, d)), _t(d, u, parseInt(c)) && Ze(t) ? t : n;
|
|
1891
1894
|
}
|
|
1892
1895
|
}
|
|
1893
1896
|
return n;
|
|
@@ -1980,19 +1983,19 @@ function ft({
|
|
|
1980
1983
|
position: n = "bottom",
|
|
1981
1984
|
enabled: e = !0
|
|
1982
1985
|
}) {
|
|
1983
|
-
const t = le(null), r = le(null), [s, a] = G(0),
|
|
1984
|
-
const
|
|
1985
|
-
if (!
|
|
1986
|
-
const { top: c, left: d, width: u, height: f } =
|
|
1986
|
+
const t = le(null), r = le(null), [s, a] = G(0), o = ue(() => {
|
|
1987
|
+
const i = t.current, l = r.current;
|
|
1988
|
+
if (!i || !l) return;
|
|
1989
|
+
const { top: c, left: d, width: u, height: f } = i.getBoundingClientRect();
|
|
1987
1990
|
a(u);
|
|
1988
1991
|
const y = l.offsetHeight, p = l.offsetWidth;
|
|
1989
1992
|
if (p === 0 || y === 0) {
|
|
1990
|
-
requestAnimationFrame(
|
|
1993
|
+
requestAnimationFrame(o);
|
|
1991
1994
|
return;
|
|
1992
1995
|
}
|
|
1993
1996
|
const S = window.scrollY, w = window.scrollX, E = window.innerWidth, b = window.innerHeight;
|
|
1994
1997
|
let T = c + S, v = d + w, g = n;
|
|
1995
|
-
const
|
|
1998
|
+
const $ = {
|
|
1996
1999
|
top: c - y < 0,
|
|
1997
2000
|
bottom: c + f + y > b,
|
|
1998
2001
|
left: d - p < 0,
|
|
@@ -2000,16 +2003,16 @@ function ft({
|
|
|
2000
2003
|
};
|
|
2001
2004
|
switch (n) {
|
|
2002
2005
|
case "top":
|
|
2003
|
-
|
|
2006
|
+
$.top && !$.bottom && (g = "bottom");
|
|
2004
2007
|
break;
|
|
2005
2008
|
case "bottom":
|
|
2006
|
-
|
|
2009
|
+
$.bottom && !$.top && (g = "top");
|
|
2007
2010
|
break;
|
|
2008
2011
|
case "left":
|
|
2009
|
-
|
|
2012
|
+
$.left && !$.right && (g = "right");
|
|
2010
2013
|
break;
|
|
2011
2014
|
case "right":
|
|
2012
|
-
|
|
2015
|
+
$.right && !$.left && (g = "left");
|
|
2013
2016
|
break;
|
|
2014
2017
|
}
|
|
2015
2018
|
switch (g) {
|
|
@@ -2038,19 +2041,19 @@ function ft({
|
|
|
2038
2041
|
}, [n]);
|
|
2039
2042
|
return Fn(() => {
|
|
2040
2043
|
if (!e) return;
|
|
2041
|
-
let
|
|
2044
|
+
let i;
|
|
2042
2045
|
const l = () => {
|
|
2043
2046
|
const d = t.current, u = r.current;
|
|
2044
|
-
d && u ?
|
|
2047
|
+
d && u ? o() : i = requestAnimationFrame(l);
|
|
2045
2048
|
};
|
|
2046
|
-
|
|
2049
|
+
i = requestAnimationFrame(l);
|
|
2047
2050
|
const c = new MutationObserver(() => {
|
|
2048
|
-
|
|
2051
|
+
o();
|
|
2049
2052
|
});
|
|
2050
|
-
return r.current && c.observe(r.current, { childList: !0, subtree: !0 }), window.addEventListener("resize",
|
|
2051
|
-
cancelAnimationFrame(
|
|
2053
|
+
return r.current && c.observe(r.current, { childList: !0, subtree: !0 }), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
2054
|
+
cancelAnimationFrame(i), window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), c.disconnect();
|
|
2052
2055
|
};
|
|
2053
|
-
}, [
|
|
2056
|
+
}, [o, e]), { anchorRef: t, targetRef: r, anchorWidth: s };
|
|
2054
2057
|
}
|
|
2055
2058
|
const _e = (n, e, t) => {
|
|
2056
2059
|
if (n == "" && (e == "" || e == null))
|
|
@@ -2065,7 +2068,7 @@ const _e = (n, e, t) => {
|
|
|
2065
2068
|
return `${n} - ${e}`;
|
|
2066
2069
|
}
|
|
2067
2070
|
return n;
|
|
2068
|
-
},
|
|
2071
|
+
}, kn = ({
|
|
2069
2072
|
helperText: n,
|
|
2070
2073
|
disabled: e,
|
|
2071
2074
|
state: t,
|
|
@@ -2098,8 +2101,8 @@ const _e = (n, e, t) => {
|
|
|
2098
2101
|
placeholder: r,
|
|
2099
2102
|
isEditable: s = !0,
|
|
2100
2103
|
shapeIcon: a,
|
|
2101
|
-
sizing:
|
|
2102
|
-
state:
|
|
2104
|
+
sizing: o,
|
|
2105
|
+
state: i,
|
|
2103
2106
|
variant: l,
|
|
2104
2107
|
tooltip: c = !1,
|
|
2105
2108
|
rotatedShapeIcon: d = !1,
|
|
@@ -2114,7 +2117,7 @@ const _e = (n, e, t) => {
|
|
|
2114
2117
|
fullWidth: T = !1,
|
|
2115
2118
|
_dataComponent: v = "textfield",
|
|
2116
2119
|
min: g,
|
|
2117
|
-
max:
|
|
2120
|
+
max: $,
|
|
2118
2121
|
step: A,
|
|
2119
2122
|
inputMode: C = "text",
|
|
2120
2123
|
width: L,
|
|
@@ -2127,11 +2130,11 @@ const _e = (n, e, t) => {
|
|
|
2127
2130
|
onShapeIconClick: H,
|
|
2128
2131
|
onClick: q
|
|
2129
2132
|
}) => {
|
|
2130
|
-
const X = Ce(), F = `${X}-helper`, h = E ? "danger" :
|
|
2133
|
+
const X = Ce(), F = `${X}-helper`, h = E ? "danger" : i, x = w || !!E, k = (I) => {
|
|
2131
2134
|
N?.(I.target.value);
|
|
2132
2135
|
}, _ = {
|
|
2133
2136
|
wrapper: `${me["smp-textfield-wrapper"]} ${T ? me["smp-textfield-fullWidth"] : ""}`,
|
|
2134
|
-
container: `${me["smp-textfield"]} ${n ? me["smp-textfield-disabled"] : ""} ${r ? me["smp-textfield-placeholder"] : ""} ${
|
|
2137
|
+
container: `${me["smp-textfield"]} ${n ? me["smp-textfield-disabled"] : ""} ${r ? me["smp-textfield-placeholder"] : ""} ${o ? me[`smp-textfield-${o}`] : ""} ${h ? me[`smp-textfield-${h}`] : ""} ${b ? me[`smp-textfield-${b}`] : ""} ${s ? "" : me["smp-textfield-readOnly"]} ${c ? me["smp-textfield-top-right-indicator"] : ""}`,
|
|
2135
2138
|
input: `${me["smp-textfield-input"]}`
|
|
2136
2139
|
};
|
|
2137
2140
|
if (l && (l !== "notSelectable" || s)) {
|
|
@@ -2156,7 +2159,7 @@ const _e = (n, e, t) => {
|
|
|
2156
2159
|
type: y,
|
|
2157
2160
|
value: e,
|
|
2158
2161
|
placeholder: r,
|
|
2159
|
-
onChange:
|
|
2162
|
+
onChange: k,
|
|
2160
2163
|
onBlur: P,
|
|
2161
2164
|
className: _.input,
|
|
2162
2165
|
disabled: n,
|
|
@@ -2166,7 +2169,7 @@ const _e = (n, e, t) => {
|
|
|
2166
2169
|
ref: f,
|
|
2167
2170
|
"aria-describedby": x ? F : void 0,
|
|
2168
2171
|
min: g,
|
|
2169
|
-
max:
|
|
2172
|
+
max: $,
|
|
2170
2173
|
step: A,
|
|
2171
2174
|
inputMode: C,
|
|
2172
2175
|
autoComplete: R,
|
|
@@ -2190,7 +2193,7 @@ const _e = (n, e, t) => {
|
|
|
2190
2193
|
}
|
|
2191
2194
|
),
|
|
2192
2195
|
x && /* @__PURE__ */ m.jsx(
|
|
2193
|
-
|
|
2196
|
+
kn,
|
|
2194
2197
|
{
|
|
2195
2198
|
helperText: E,
|
|
2196
2199
|
disabled: n,
|
|
@@ -2200,13 +2203,13 @@ const _e = (n, e, t) => {
|
|
|
2200
2203
|
)
|
|
2201
2204
|
] });
|
|
2202
2205
|
};
|
|
2203
|
-
function
|
|
2206
|
+
function $n({
|
|
2204
2207
|
items: n,
|
|
2205
2208
|
itemHeight: e,
|
|
2206
2209
|
containerHeight: t,
|
|
2207
2210
|
overscan: r = 5
|
|
2208
2211
|
}) {
|
|
2209
|
-
const [s, a] = G(0),
|
|
2212
|
+
const [s, a] = G(0), o = le(null), i = n.length * e, l = Math.max(0, Math.floor(s / e) - r), c = Math.min(
|
|
2210
2213
|
n.length - 1,
|
|
2211
2214
|
Math.floor((s + t) / e) + r
|
|
2212
2215
|
), d = [];
|
|
@@ -2220,14 +2223,14 @@ function kn({
|
|
|
2220
2223
|
const p = y.target.scrollTop;
|
|
2221
2224
|
a(p);
|
|
2222
2225
|
}, []), f = (y) => {
|
|
2223
|
-
if (!
|
|
2224
|
-
const p = y * e, S = p + e, w =
|
|
2226
|
+
if (!o.current) return;
|
|
2227
|
+
const p = y * e, S = p + e, w = o.current, E = w.scrollTop, b = E + t;
|
|
2225
2228
|
p < E ? w.scrollTop = p : S > b && (w.scrollTop = S - t);
|
|
2226
2229
|
};
|
|
2227
2230
|
return {
|
|
2228
2231
|
virtualItems: d,
|
|
2229
2232
|
containerProps: {
|
|
2230
|
-
ref:
|
|
2233
|
+
ref: o,
|
|
2231
2234
|
style: {
|
|
2232
2235
|
maxHeight: `${t}px`,
|
|
2233
2236
|
overflowY: "auto",
|
|
@@ -2238,7 +2241,7 @@ function kn({
|
|
|
2238
2241
|
},
|
|
2239
2242
|
innerProps: {
|
|
2240
2243
|
style: {
|
|
2241
|
-
height: `${
|
|
2244
|
+
height: `${i}px`,
|
|
2242
2245
|
position: "relative",
|
|
2243
2246
|
width: "100%"
|
|
2244
2247
|
}
|
|
@@ -2246,7 +2249,7 @@ function kn({
|
|
|
2246
2249
|
scrollInfo: {
|
|
2247
2250
|
scrollTop: s,
|
|
2248
2251
|
viewportHeight: t,
|
|
2249
|
-
totalHeight:
|
|
2252
|
+
totalHeight: i,
|
|
2250
2253
|
startIndex: l,
|
|
2251
2254
|
endIndex: c
|
|
2252
2255
|
},
|
|
@@ -2262,12 +2265,12 @@ function Tr(n, e, t = "14px IBM Plex Sans, sans-serif", r = 32) {
|
|
|
2262
2265
|
const a = document.createElement("canvas").getContext("2d");
|
|
2263
2266
|
if (!a) return 200;
|
|
2264
2267
|
a.font = t;
|
|
2265
|
-
let
|
|
2266
|
-
for (const
|
|
2267
|
-
const l = _e(
|
|
2268
|
-
|
|
2268
|
+
let o = 0;
|
|
2269
|
+
for (const i of n) {
|
|
2270
|
+
const l = _e(i.id, i.label, e), c = a.measureText(l);
|
|
2271
|
+
o = Math.max(o, c.width);
|
|
2269
2272
|
}
|
|
2270
|
-
return Math.ceil(
|
|
2273
|
+
return Math.ceil(o + r);
|
|
2271
2274
|
}
|
|
2272
2275
|
const Cr = 10, Ln = ({
|
|
2273
2276
|
id: n,
|
|
@@ -2277,20 +2280,20 @@ const Cr = 10, Ln = ({
|
|
|
2277
2280
|
showFilter: s,
|
|
2278
2281
|
selectedIndex: a = null,
|
|
2279
2282
|
// current outline element
|
|
2280
|
-
activeIndex:
|
|
2283
|
+
activeIndex: o = [],
|
|
2281
2284
|
// active element
|
|
2282
|
-
width:
|
|
2285
|
+
width: i,
|
|
2283
2286
|
onClick: l,
|
|
2284
2287
|
onKeyDown: c,
|
|
2285
2288
|
isOpen: d
|
|
2286
2289
|
}) => {
|
|
2287
2290
|
const [u, f] = G(""), y = 40, [p, S] = G(
|
|
2288
2291
|
a !== null ? a : -1
|
|
2289
|
-
), [w, E] = G(
|
|
2292
|
+
), [w, E] = G(i || 200), b = le(null), T = s !== void 0 ? s : e.length > Cr, v = u ? e.filter(
|
|
2290
2293
|
(N) => N.label.toLowerCase().includes(u.toLowerCase())
|
|
2291
2294
|
) : e, g = (N) => {
|
|
2292
2295
|
f(N);
|
|
2293
|
-
}, { virtualItems:
|
|
2296
|
+
}, { virtualItems: $, containerProps: A, innerProps: C, scrollToIndex: L } = $n({
|
|
2294
2297
|
items: v,
|
|
2295
2298
|
itemHeight: y,
|
|
2296
2299
|
containerHeight: 200,
|
|
@@ -2332,7 +2335,7 @@ const Cr = 10, Ln = ({
|
|
|
2332
2335
|
"data-component": "list",
|
|
2333
2336
|
style: {
|
|
2334
2337
|
width: w,
|
|
2335
|
-
minWidth:
|
|
2338
|
+
minWidth: i
|
|
2336
2339
|
},
|
|
2337
2340
|
children: [
|
|
2338
2341
|
T && /* @__PURE__ */ m.jsx(
|
|
@@ -2356,8 +2359,8 @@ const Cr = 10, Ln = ({
|
|
|
2356
2359
|
"aria-label": "List",
|
|
2357
2360
|
onKeyDown: O,
|
|
2358
2361
|
"aria-activedescendant": p >= 0 && p < v.length ? v[p]?.id : void 0,
|
|
2359
|
-
children: /* @__PURE__ */ m.jsx("div", { ...C, className: P.virtualScroll, children:
|
|
2360
|
-
const q =
|
|
2362
|
+
children: /* @__PURE__ */ m.jsx("div", { ...C, className: P.virtualScroll, children: $.map(({ item: N, index: B, offsetTop: H }) => {
|
|
2363
|
+
const q = o.includes(N.id);
|
|
2361
2364
|
return (
|
|
2362
2365
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
2363
2366
|
/* @__PURE__ */ m.jsxs(
|
|
@@ -2430,10 +2433,10 @@ const ht = (n, e, t) => {
|
|
|
2430
2433
|
ne(() => {
|
|
2431
2434
|
if (!e) return;
|
|
2432
2435
|
const r = (s) => {
|
|
2433
|
-
n?.some((
|
|
2434
|
-
if (typeof
|
|
2435
|
-
const
|
|
2436
|
-
return
|
|
2436
|
+
n?.some((o) => {
|
|
2437
|
+
if (typeof o == "object" && o !== null && "current" in o) {
|
|
2438
|
+
const i = o?.current;
|
|
2439
|
+
return i && i.contains(s.target);
|
|
2437
2440
|
}
|
|
2438
2441
|
}) || t();
|
|
2439
2442
|
};
|
|
@@ -2472,10 +2475,10 @@ const ht = (n, e, t) => {
|
|
|
2472
2475
|
r[s] = t;
|
|
2473
2476
|
return;
|
|
2474
2477
|
}
|
|
2475
|
-
let a = e[e.length - 1],
|
|
2476
|
-
for (;
|
|
2477
|
-
a = `${
|
|
2478
|
-
|
|
2478
|
+
let a = e[e.length - 1], o = e.slice(0, e.length - 1), i = We(n, o, Object);
|
|
2479
|
+
for (; i.obj === void 0 && o.length; )
|
|
2480
|
+
a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), i = We(n, o, Object), i?.obj && typeof i.obj[`${i.k}.${a}`] < "u" && (i.obj = void 0);
|
|
2481
|
+
i.obj[`${i.k}.${a}`] = t;
|
|
2479
2482
|
}, Dr = (n, e, t, r) => {
|
|
2480
2483
|
const {
|
|
2481
2484
|
obj: s,
|
|
@@ -2497,7 +2500,7 @@ const ht = (n, e, t) => {
|
|
|
2497
2500
|
r !== "__proto__" && r !== "constructor" && (r in n ? z(n[r]) || n[r] instanceof String || z(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : An(n[r], e[r], t) : n[r] = e[r]);
|
|
2498
2501
|
return n;
|
|
2499
2502
|
}, Ae = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
2500
|
-
var
|
|
2503
|
+
var kr = {
|
|
2501
2504
|
"&": "&",
|
|
2502
2505
|
"<": "<",
|
|
2503
2506
|
">": ">",
|
|
@@ -2505,7 +2508,7 @@ var $r = {
|
|
|
2505
2508
|
"'": "'",
|
|
2506
2509
|
"/": "/"
|
|
2507
2510
|
};
|
|
2508
|
-
const
|
|
2511
|
+
const $r = (n) => z(n) ? n.replace(/[&<>"'\/]/g, (e) => kr[e]) : n;
|
|
2509
2512
|
class Lr {
|
|
2510
2513
|
constructor(e) {
|
|
2511
2514
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -2520,13 +2523,13 @@ class Lr {
|
|
|
2520
2523
|
}
|
|
2521
2524
|
const Ar = [" ", ",", "?", "!", ";"], Pr = new Lr(20), Ir = (n, e, t) => {
|
|
2522
2525
|
e = e || "", t = t || "";
|
|
2523
|
-
const r = Ar.filter((
|
|
2526
|
+
const r = Ar.filter((o) => e.indexOf(o) < 0 && t.indexOf(o) < 0);
|
|
2524
2527
|
if (r.length === 0) return !0;
|
|
2525
|
-
const s = Pr.getRegExp(`(${r.map((
|
|
2528
|
+
const s = Pr.getRegExp(`(${r.map((o) => o === "?" ? "\\?" : o).join("|")})`);
|
|
2526
2529
|
let a = !s.test(n);
|
|
2527
2530
|
if (!a) {
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2531
|
+
const o = n.indexOf(t);
|
|
2532
|
+
o > 0 && !s.test(n.substring(0, o)) && (a = !0);
|
|
2530
2533
|
}
|
|
2531
2534
|
return a;
|
|
2532
2535
|
}, Rt = (n, e, t = ".") => {
|
|
@@ -2538,15 +2541,15 @@ const Ar = [" ", ",", "?", "!", ";"], Pr = new Lr(20), Ir = (n, e, t) => {
|
|
|
2538
2541
|
for (let a = 0; a < r.length; ) {
|
|
2539
2542
|
if (!s || typeof s != "object")
|
|
2540
2543
|
return;
|
|
2541
|
-
let
|
|
2544
|
+
let o, i = "";
|
|
2542
2545
|
for (let l = a; l < r.length; ++l)
|
|
2543
|
-
if (l !== a && (
|
|
2544
|
-
if (["string", "number", "boolean"].indexOf(typeof
|
|
2546
|
+
if (l !== a && (i += t), i += r[l], o = s[i], o !== void 0) {
|
|
2547
|
+
if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < r.length - 1)
|
|
2545
2548
|
continue;
|
|
2546
2549
|
a += l - a + 1;
|
|
2547
2550
|
break;
|
|
2548
2551
|
}
|
|
2549
|
-
s =
|
|
2552
|
+
s = o;
|
|
2550
2553
|
}
|
|
2551
2554
|
return s;
|
|
2552
2555
|
}, Ye = (n) => n?.replace("_", "-"), Nr = {
|
|
@@ -2619,10 +2622,10 @@ class mt {
|
|
|
2619
2622
|
}
|
|
2620
2623
|
emit(e, ...t) {
|
|
2621
2624
|
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, a]) => {
|
|
2622
|
-
for (let
|
|
2625
|
+
for (let o = 0; o < a; o++)
|
|
2623
2626
|
s(...t);
|
|
2624
2627
|
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, a]) => {
|
|
2625
|
-
for (let
|
|
2628
|
+
for (let o = 0; o < a; o++)
|
|
2626
2629
|
s.apply(s, [e, ...t]);
|
|
2627
2630
|
});
|
|
2628
2631
|
}
|
|
@@ -2642,18 +2645,18 @@ class fn extends mt {
|
|
|
2642
2645
|
t > -1 && this.options.ns.splice(t, 1);
|
|
2643
2646
|
}
|
|
2644
2647
|
getResource(e, t, r, s = {}) {
|
|
2645
|
-
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator,
|
|
2646
|
-
let
|
|
2647
|
-
e.indexOf(".") > -1 ?
|
|
2648
|
-
const l = lt(this.data,
|
|
2649
|
-
return !l && !t && !r && e.indexOf(".") > -1 && (e =
|
|
2648
|
+
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, o = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2649
|
+
let i;
|
|
2650
|
+
e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, t], r && (Array.isArray(r) ? i.push(...r) : z(r) && a ? i.push(...r.split(a)) : i.push(r)));
|
|
2651
|
+
const l = lt(this.data, i);
|
|
2652
|
+
return !l && !t && !r && e.indexOf(".") > -1 && (e = i[0], t = i[1], r = i.slice(2).join(".")), l || !o || !z(r) ? l : Rt(this.data?.[e]?.[t], r, a);
|
|
2650
2653
|
}
|
|
2651
2654
|
addResource(e, t, r, s, a = {
|
|
2652
2655
|
silent: !1
|
|
2653
2656
|
}) {
|
|
2654
|
-
const
|
|
2655
|
-
let
|
|
2656
|
-
r && (
|
|
2657
|
+
const o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator;
|
|
2658
|
+
let i = [e, t];
|
|
2659
|
+
r && (i = i.concat(o ? r.split(o) : r)), e.indexOf(".") > -1 && (i = e.split("."), s = t, t = i[1]), this.addNamespaces(t), dn(this.data, i, s), a.silent || this.emit("added", e, t, r, s);
|
|
2657
2660
|
}
|
|
2658
2661
|
addResources(e, t, r, s = {
|
|
2659
2662
|
silent: !1
|
|
@@ -2664,17 +2667,17 @@ class fn extends mt {
|
|
|
2664
2667
|
});
|
|
2665
2668
|
s.silent || this.emit("added", e, t, r);
|
|
2666
2669
|
}
|
|
2667
|
-
addResourceBundle(e, t, r, s, a,
|
|
2670
|
+
addResourceBundle(e, t, r, s, a, o = {
|
|
2668
2671
|
silent: !1,
|
|
2669
2672
|
skipCopy: !1
|
|
2670
2673
|
}) {
|
|
2671
|
-
let
|
|
2672
|
-
e.indexOf(".") > -1 && (
|
|
2673
|
-
let l = lt(this.data,
|
|
2674
|
-
|
|
2674
|
+
let i = [e, t];
|
|
2675
|
+
e.indexOf(".") > -1 && (i = e.split("."), s = r, r = t, t = i[1]), this.addNamespaces(t);
|
|
2676
|
+
let l = lt(this.data, i) || {};
|
|
2677
|
+
o.skipCopy || (r = JSON.parse(JSON.stringify(r))), s ? An(l, r, a) : l = {
|
|
2675
2678
|
...l,
|
|
2676
2679
|
...r
|
|
2677
|
-
}, dn(this.data,
|
|
2680
|
+
}, dn(this.data, i, l), o.silent || this.emit("added", e, t, r);
|
|
2678
2681
|
}
|
|
2679
2682
|
removeResourceBundle(e, t) {
|
|
2680
2683
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -2728,8 +2731,8 @@ class ut extends mt {
|
|
|
2728
2731
|
r === void 0 && (r = ":");
|
|
2729
2732
|
const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
2730
2733
|
let a = t.ns || this.options.defaultNS || [];
|
|
2731
|
-
const
|
|
2732
|
-
if (
|
|
2734
|
+
const o = r && e.indexOf(r) > -1, i = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ir(e, r, s);
|
|
2735
|
+
if (o && !i) {
|
|
2733
2736
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
2734
2737
|
if (l && l.length > 0)
|
|
2735
2738
|
return {
|
|
@@ -2752,8 +2755,8 @@ class ut extends mt {
|
|
|
2752
2755
|
...s
|
|
2753
2756
|
}), s || (s = {}), e == null) return "";
|
|
2754
2757
|
Array.isArray(e) || (e = [String(e)]);
|
|
2755
|
-
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails,
|
|
2756
|
-
key:
|
|
2758
|
+
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
2759
|
+
key: i,
|
|
2757
2760
|
namespaces: l
|
|
2758
2761
|
} = this.extractFromKey(e[e.length - 1], s), c = l[l.length - 1];
|
|
2759
2762
|
let d = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
@@ -2761,25 +2764,25 @@ class ut extends mt {
|
|
|
2761
2764
|
const u = s.lng || this.language, f = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2762
2765
|
if (u?.toLowerCase() === "cimode")
|
|
2763
2766
|
return f ? a ? {
|
|
2764
|
-
res: `${c}${d}${
|
|
2765
|
-
usedKey:
|
|
2766
|
-
exactUsedKey:
|
|
2767
|
+
res: `${c}${d}${i}`,
|
|
2768
|
+
usedKey: i,
|
|
2769
|
+
exactUsedKey: i,
|
|
2767
2770
|
usedLng: u,
|
|
2768
2771
|
usedNS: c,
|
|
2769
2772
|
usedParams: this.getUsedParamsDetails(s)
|
|
2770
|
-
} : `${c}${d}${
|
|
2771
|
-
res:
|
|
2772
|
-
usedKey:
|
|
2773
|
-
exactUsedKey:
|
|
2773
|
+
} : `${c}${d}${i}` : a ? {
|
|
2774
|
+
res: i,
|
|
2775
|
+
usedKey: i,
|
|
2776
|
+
exactUsedKey: i,
|
|
2774
2777
|
usedLng: u,
|
|
2775
2778
|
usedNS: c,
|
|
2776
2779
|
usedParams: this.getUsedParamsDetails(s)
|
|
2777
|
-
} :
|
|
2780
|
+
} : i;
|
|
2778
2781
|
const y = this.resolve(e, s);
|
|
2779
2782
|
let p = y?.res;
|
|
2780
|
-
const S = y?.usedKey ||
|
|
2783
|
+
const S = y?.usedKey || i, w = y?.exactUsedKey || i, E = ["[object Number]", "[object Function]", "[object RegExp]"], b = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, T = !this.i18nFormat || this.i18nFormat.handleAsObject, v = s.count !== void 0 && !z(s.count), g = ut.hasDefaultValue(s), $ = v ? this.pluralResolver.getSuffix(u, s.count, s) : "", A = s.ordinal && v ? this.pluralResolver.getSuffix(u, s.count, {
|
|
2781
2784
|
ordinal: !1
|
|
2782
|
-
}) : "", C = v && !s.ordinal && s.count === 0, L = C && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${
|
|
2785
|
+
}) : "", C = v && !s.ordinal && s.count === 0, L = C && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${$}`] || s[`defaultValue${A}`] || s.defaultValue;
|
|
2783
2786
|
let R = p;
|
|
2784
2787
|
T && !p && g && (R = L);
|
|
2785
2788
|
const D = hn(R), O = Object.prototype.toString.apply(R);
|
|
@@ -2789,14 +2792,14 @@ class ut extends mt {
|
|
|
2789
2792
|
const P = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, R, {
|
|
2790
2793
|
...s,
|
|
2791
2794
|
ns: l
|
|
2792
|
-
}) : `key '${
|
|
2795
|
+
}) : `key '${i} (${this.language})' returned an object instead of string.`;
|
|
2793
2796
|
return a ? (y.res = P, y.usedParams = this.getUsedParamsDetails(s), y) : P;
|
|
2794
2797
|
}
|
|
2795
|
-
if (
|
|
2798
|
+
if (o) {
|
|
2796
2799
|
const P = Array.isArray(R), N = P ? [] : {}, B = P ? w : S;
|
|
2797
2800
|
for (const H in R)
|
|
2798
2801
|
if (Object.prototype.hasOwnProperty.call(R, H)) {
|
|
2799
|
-
const q = `${B}${
|
|
2802
|
+
const q = `${B}${o}${H}`;
|
|
2800
2803
|
g && !p ? N[H] = this.translate(q, {
|
|
2801
2804
|
...s,
|
|
2802
2805
|
defaultValue: hn(L) ? L[H] : void 0,
|
|
@@ -2814,11 +2817,11 @@ class ut extends mt {
|
|
|
2814
2817
|
p = p.join(b), p && (p = this.extendTranslation(p, e, s, r));
|
|
2815
2818
|
else {
|
|
2816
2819
|
let P = !1, N = !1;
|
|
2817
|
-
!this.isValidLookup(p) && g && (P = !0, p = L), this.isValidLookup(p) || (N = !0, p =
|
|
2820
|
+
!this.isValidLookup(p) && g && (P = !0, p = L), this.isValidLookup(p) || (N = !0, p = i);
|
|
2818
2821
|
const H = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && N ? void 0 : p, q = g && L !== p && this.options.updateMissing;
|
|
2819
2822
|
if (N || P || q) {
|
|
2820
|
-
if (this.logger.log(q ? "updateKey" : "missingKey", u, c,
|
|
2821
|
-
const x = this.resolve(
|
|
2823
|
+
if (this.logger.log(q ? "updateKey" : "missingKey", u, c, i, q ? L : p), o) {
|
|
2824
|
+
const x = this.resolve(i, {
|
|
2822
2825
|
...s,
|
|
2823
2826
|
keySeparator: !1
|
|
2824
2827
|
});
|
|
@@ -2830,18 +2833,18 @@ class ut extends mt {
|
|
|
2830
2833
|
for (let x = 0; x < F.length; x++)
|
|
2831
2834
|
X.push(F[x]);
|
|
2832
2835
|
else this.options.saveMissingTo === "all" ? X = this.languageUtils.toResolveHierarchy(s.lng || this.language) : X.push(s.lng || this.language);
|
|
2833
|
-
const h = (x,
|
|
2836
|
+
const h = (x, k, _) => {
|
|
2834
2837
|
const j = g && _ !== p ? _ : H;
|
|
2835
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(x, c,
|
|
2838
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(x, c, k, j, q, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(x, c, k, j, q, s), this.emit("missingKey", x, c, k, p);
|
|
2836
2839
|
};
|
|
2837
2840
|
this.options.saveMissing && (this.options.saveMissingPlurals && v ? X.forEach((x) => {
|
|
2838
|
-
const
|
|
2839
|
-
C && s[`defaultValue${this.options.pluralSeparator}zero`] &&
|
|
2840
|
-
h([x],
|
|
2841
|
+
const k = this.pluralResolver.getSuffixes(x, s);
|
|
2842
|
+
C && s[`defaultValue${this.options.pluralSeparator}zero`] && k.indexOf(`${this.options.pluralSeparator}zero`) < 0 && k.push(`${this.options.pluralSeparator}zero`), k.forEach((_) => {
|
|
2843
|
+
h([x], i + _, s[`defaultValue${_}`] || L);
|
|
2841
2844
|
});
|
|
2842
|
-
}) : h(X,
|
|
2845
|
+
}) : h(X, i, L));
|
|
2843
2846
|
}
|
|
2844
|
-
p = this.extendTranslation(p, e, s, y, r), N && p ===
|
|
2847
|
+
p = this.extendTranslation(p, e, s, y, r), N && p === i && this.options.appendNamespaceToMissingKey && (p = `${c}${d}${i}`), (N || P) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${d}${i}` : i, P ? p : void 0, s));
|
|
2845
2848
|
}
|
|
2846
2849
|
return a ? (y.res = p, y.usedParams = this.getUsedParamsDetails(s), y) : p;
|
|
2847
2850
|
}
|
|
@@ -2877,8 +2880,8 @@ class ut extends mt {
|
|
|
2877
2880
|
}
|
|
2878
2881
|
!r.lng && s && s.res && (r.lng = this.language || s.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...u) => a?.[0] === u[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${t[0]}`), null) : this.translate(...u, t), r)), r.interpolation && this.interpolator.reset();
|
|
2879
2882
|
}
|
|
2880
|
-
const
|
|
2881
|
-
return e != null &&
|
|
2883
|
+
const o = r.postProcess || this.options.postProcess, i = z(o) ? [o] : o;
|
|
2884
|
+
return e != null && i?.length && r.applyPostProcessor !== !1 && (e = Pn.handle(i, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
2882
2885
|
i18nResolved: {
|
|
2883
2886
|
...s,
|
|
2884
2887
|
usedParams: this.getUsedParamsDetails(r)
|
|
@@ -2887,7 +2890,7 @@ class ut extends mt {
|
|
|
2887
2890
|
} : r, this)), e;
|
|
2888
2891
|
}
|
|
2889
2892
|
resolve(e, t = {}) {
|
|
2890
|
-
let r, s, a,
|
|
2893
|
+
let r, s, a, o, i;
|
|
2891
2894
|
return z(e) && (e = [e]), e.forEach((l) => {
|
|
2892
2895
|
if (this.isValidLookup(r)) return;
|
|
2893
2896
|
const c = this.extractFromKey(l, t), d = c.key;
|
|
@@ -2896,19 +2899,19 @@ class ut extends mt {
|
|
|
2896
2899
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
2897
2900
|
const f = t.count !== void 0 && !z(t.count), y = f && !t.ordinal && t.count === 0, p = t.context !== void 0 && (z(t.context) || typeof t.context == "number") && t.context !== "", S = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
2898
2901
|
u.forEach((w) => {
|
|
2899
|
-
this.isValidLookup(r) || (
|
|
2902
|
+
this.isValidLookup(r) || (i = w, !pn[`${S[0]}-${w}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(i) && (pn[`${S[0]}-${w}`] = !0, this.logger.warn(`key "${s}" for languages "${S.join(", ")}" won't get resolved as namespace "${i}" 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!!!")), S.forEach((E) => {
|
|
2900
2903
|
if (this.isValidLookup(r)) return;
|
|
2901
|
-
|
|
2904
|
+
o = E;
|
|
2902
2905
|
const b = [d];
|
|
2903
2906
|
if (this.i18nFormat?.addLookupKeys)
|
|
2904
2907
|
this.i18nFormat.addLookupKeys(b, d, E, w, t);
|
|
2905
2908
|
else {
|
|
2906
2909
|
let v;
|
|
2907
2910
|
f && (v = this.pluralResolver.getSuffix(E, t.count, t));
|
|
2908
|
-
const g = `${this.options.pluralSeparator}zero`,
|
|
2909
|
-
if (f && (b.push(d + v), t.ordinal && v.indexOf(
|
|
2911
|
+
const g = `${this.options.pluralSeparator}zero`, $ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
2912
|
+
if (f && (b.push(d + v), t.ordinal && v.indexOf($) === 0 && b.push(d + v.replace($, this.options.pluralSeparator)), y && b.push(d + g)), p) {
|
|
2910
2913
|
const A = `${d}${this.options.contextSeparator}${t.context}`;
|
|
2911
|
-
b.push(A), f && (b.push(A + v), t.ordinal && v.indexOf(
|
|
2914
|
+
b.push(A), f && (b.push(A + v), t.ordinal && v.indexOf($) === 0 && b.push(A + v.replace($, this.options.pluralSeparator)), y && b.push(A + g));
|
|
2912
2915
|
}
|
|
2913
2916
|
}
|
|
2914
2917
|
let T;
|
|
@@ -2920,8 +2923,8 @@ class ut extends mt {
|
|
|
2920
2923
|
res: r,
|
|
2921
2924
|
usedKey: s,
|
|
2922
2925
|
exactUsedKey: a,
|
|
2923
|
-
usedLng:
|
|
2924
|
-
usedNS:
|
|
2926
|
+
usedLng: o,
|
|
2927
|
+
usedNS: i
|
|
2925
2928
|
};
|
|
2926
2929
|
}
|
|
2927
2930
|
isValidLookup(e) {
|
|
@@ -2994,10 +2997,10 @@ class mn {
|
|
|
2994
2997
|
if (this.isSupportedCode(s)) return t = s;
|
|
2995
2998
|
const a = this.getLanguagePartFromCode(r);
|
|
2996
2999
|
if (this.isSupportedCode(a)) return t = a;
|
|
2997
|
-
t = this.options.supportedLngs.find((
|
|
2998
|
-
if (
|
|
2999
|
-
if (!(
|
|
3000
|
-
return
|
|
3000
|
+
t = this.options.supportedLngs.find((o) => {
|
|
3001
|
+
if (o === a) return o;
|
|
3002
|
+
if (!(o.indexOf("-") < 0 && a.indexOf("-") < 0) && (o.indexOf("-") > 0 && a.indexOf("-") < 0 && o.substring(0, o.indexOf("-")) === a || o.indexOf(a) === 0 && a.length > 1))
|
|
3003
|
+
return o;
|
|
3001
3004
|
});
|
|
3002
3005
|
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
3003
3006
|
}
|
|
@@ -3009,11 +3012,11 @@ class mn {
|
|
|
3009
3012
|
return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
|
|
3010
3013
|
}
|
|
3011
3014
|
toResolveHierarchy(e, t) {
|
|
3012
|
-
const r = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], a = (
|
|
3013
|
-
|
|
3015
|
+
const r = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), s = [], a = (o) => {
|
|
3016
|
+
o && (this.isSupportedCode(o) ? s.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
|
|
3014
3017
|
};
|
|
3015
|
-
return z(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))) : z(e) && a(this.formatLanguageCode(e)), r.forEach((
|
|
3016
|
-
s.indexOf(
|
|
3018
|
+
return z(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))) : z(e) && a(this.formatLanguageCode(e)), r.forEach((o) => {
|
|
3019
|
+
s.indexOf(o) < 0 && a(this.formatLanguageCode(o));
|
|
3017
3020
|
}), s;
|
|
3018
3021
|
}
|
|
3019
3022
|
}
|
|
@@ -3047,9 +3050,9 @@ class Mr {
|
|
|
3047
3050
|
});
|
|
3048
3051
|
if (a in this.pluralRulesCache)
|
|
3049
3052
|
return this.pluralRulesCache[a];
|
|
3050
|
-
let
|
|
3053
|
+
let o;
|
|
3051
3054
|
try {
|
|
3052
|
-
|
|
3055
|
+
o = new Intl.PluralRules(r, {
|
|
3053
3056
|
type: s
|
|
3054
3057
|
});
|
|
3055
3058
|
} catch {
|
|
@@ -3057,9 +3060,9 @@ class Mr {
|
|
|
3057
3060
|
return this.logger.error("No Intl support, please use an Intl polyfill!"), yn;
|
|
3058
3061
|
if (!e.match(/-|_/)) return yn;
|
|
3059
3062
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
3060
|
-
|
|
3063
|
+
o = this.getRule(l, t);
|
|
3061
3064
|
}
|
|
3062
|
-
return this.pluralRulesCache[a] =
|
|
3065
|
+
return this.pluralRulesCache[a] = o, o;
|
|
3063
3066
|
}
|
|
3064
3067
|
needsPlural(e, t = {}) {
|
|
3065
3068
|
let r = this.getRule(e, t);
|
|
@@ -3094,8 +3097,8 @@ class Fr {
|
|
|
3094
3097
|
escapeValue: r,
|
|
3095
3098
|
useRawValueToEscape: s,
|
|
3096
3099
|
prefix: a,
|
|
3097
|
-
prefixEscaped:
|
|
3098
|
-
suffix:
|
|
3100
|
+
prefixEscaped: o,
|
|
3101
|
+
suffix: i,
|
|
3099
3102
|
suffixEscaped: l,
|
|
3100
3103
|
formatSeparator: c,
|
|
3101
3104
|
unescapeSuffix: d,
|
|
@@ -3108,7 +3111,7 @@ class Fr {
|
|
|
3108
3111
|
maxReplaces: E,
|
|
3109
3112
|
alwaysFormat: b
|
|
3110
3113
|
} = e.interpolation;
|
|
3111
|
-
this.escape = t !== void 0 ? t :
|
|
3114
|
+
this.escape = t !== void 0 ? t : $r, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Ae(a) : o || "{{", this.suffix = i ? Ae(i) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = f ? Ae(f) : y || Ae("$t("), this.nestingSuffix = p ? Ae(p) : S || Ae(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
3112
3115
|
}
|
|
3113
3116
|
reset() {
|
|
3114
3117
|
this.options && this.init(this.options);
|
|
@@ -3118,7 +3121,7 @@ class Fr {
|
|
|
3118
3121
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
|
|
3119
3122
|
}
|
|
3120
3123
|
interpolate(e, t, r, s) {
|
|
3121
|
-
let a,
|
|
3124
|
+
let a, o, i;
|
|
3122
3125
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (y) => {
|
|
3123
3126
|
if (y.indexOf(this.formatSeparator) < 0) {
|
|
3124
3127
|
const E = bn(t, l, y, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
@@ -3144,53 +3147,53 @@ class Fr {
|
|
|
3144
3147
|
regex: this.regexp,
|
|
3145
3148
|
safeValue: (y) => this.escapeValue ? Tt(this.escape(y)) : Tt(y)
|
|
3146
3149
|
}].forEach((y) => {
|
|
3147
|
-
for (
|
|
3150
|
+
for (i = 0; a = y.regex.exec(e); ) {
|
|
3148
3151
|
const p = a[1].trim();
|
|
3149
|
-
if (
|
|
3152
|
+
if (o = c(p), o === void 0)
|
|
3150
3153
|
if (typeof d == "function") {
|
|
3151
3154
|
const w = d(e, a, s);
|
|
3152
|
-
|
|
3155
|
+
o = z(w) ? w : "";
|
|
3153
3156
|
} else if (s && Object.prototype.hasOwnProperty.call(s, p))
|
|
3154
|
-
|
|
3157
|
+
o = "";
|
|
3155
3158
|
else if (u) {
|
|
3156
|
-
|
|
3159
|
+
o = a[0];
|
|
3157
3160
|
continue;
|
|
3158
3161
|
} else
|
|
3159
|
-
this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),
|
|
3160
|
-
else !z(
|
|
3161
|
-
const S = y.safeValue(
|
|
3162
|
-
if (e = e.replace(a[0], S), u ? (y.regex.lastIndex +=
|
|
3162
|
+
this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`), o = "";
|
|
3163
|
+
else !z(o) && !this.useRawValueToEscape && (o = ln(o));
|
|
3164
|
+
const S = y.safeValue(o);
|
|
3165
|
+
if (e = e.replace(a[0], S), u ? (y.regex.lastIndex += o.length, y.regex.lastIndex -= a[0].length) : y.regex.lastIndex = 0, i++, i >= this.maxReplaces)
|
|
3163
3166
|
break;
|
|
3164
3167
|
}
|
|
3165
3168
|
}), e;
|
|
3166
3169
|
}
|
|
3167
3170
|
nest(e, t, r = {}) {
|
|
3168
|
-
let s, a,
|
|
3169
|
-
const
|
|
3171
|
+
let s, a, o;
|
|
3172
|
+
const i = (l, c) => {
|
|
3170
3173
|
const d = this.nestingOptionsSeparator;
|
|
3171
3174
|
if (l.indexOf(d) < 0) return l;
|
|
3172
3175
|
const u = l.split(new RegExp(`${d}[ ]*{`));
|
|
3173
3176
|
let f = `{${u[1]}`;
|
|
3174
|
-
l = u[0], f = this.interpolate(f,
|
|
3177
|
+
l = u[0], f = this.interpolate(f, o);
|
|
3175
3178
|
const y = f.match(/'/g), p = f.match(/"/g);
|
|
3176
3179
|
((y?.length ?? 0) % 2 === 0 && !p || p.length % 2 !== 0) && (f = f.replace(/'/g, '"'));
|
|
3177
3180
|
try {
|
|
3178
|
-
|
|
3181
|
+
o = JSON.parse(f), c && (o = {
|
|
3179
3182
|
...c,
|
|
3180
|
-
...
|
|
3183
|
+
...o
|
|
3181
3184
|
});
|
|
3182
3185
|
} catch (S) {
|
|
3183
3186
|
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, S), `${l}${d}${f}`;
|
|
3184
3187
|
}
|
|
3185
|
-
return
|
|
3188
|
+
return o.defaultValue && o.defaultValue.indexOf(this.prefix) > -1 && delete o.defaultValue, l;
|
|
3186
3189
|
};
|
|
3187
3190
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
3188
3191
|
let l = [];
|
|
3189
|
-
|
|
3192
|
+
o = {
|
|
3190
3193
|
...r
|
|
3191
|
-
},
|
|
3194
|
+
}, o = o.replace && !z(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
|
|
3192
3195
|
const c = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator);
|
|
3193
|
-
if (c !== -1 && (l = s[1].slice(c).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), s[1] = s[1].slice(0, c)), a = t(
|
|
3196
|
+
if (c !== -1 && (l = s[1].slice(c).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), s[1] = s[1].slice(0, c)), a = t(i.call(this, s[1].trim(), o), o), a && s[0] === e && !z(a)) return a;
|
|
3194
3197
|
z(a) || (a = ln(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), l.length && (a = l.reduce((d, u) => this.format(d, u, r.lng, {
|
|
3195
3198
|
...r,
|
|
3196
3199
|
interpolationkey: s[1].trim()
|
|
@@ -3206,9 +3209,9 @@ const Vr = (n) => {
|
|
|
3206
3209
|
const r = n.split("(");
|
|
3207
3210
|
e = r[0].toLowerCase().trim();
|
|
3208
3211
|
const s = r[1].substring(0, r[1].length - 1);
|
|
3209
|
-
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((
|
|
3210
|
-
if (
|
|
3211
|
-
const [
|
|
3212
|
+
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((o) => {
|
|
3213
|
+
if (o) {
|
|
3214
|
+
const [i, ...l] = o.split(":"), c = l.join(":").trim().replace(/^'+|'+$/g, ""), d = i.trim();
|
|
3212
3215
|
t[d] || (t[d] = c), c === "false" && (t[d] = !1), c === "true" && (t[d] = !0), isNaN(c) || (t[d] = parseInt(c, 10));
|
|
3213
3216
|
}
|
|
3214
3217
|
});
|
|
@@ -3225,9 +3228,9 @@ const Vr = (n) => {
|
|
|
3225
3228
|
...a,
|
|
3226
3229
|
[s.interpolationkey]: void 0
|
|
3227
3230
|
});
|
|
3228
|
-
const
|
|
3229
|
-
let
|
|
3230
|
-
return
|
|
3231
|
+
const o = r + JSON.stringify(a);
|
|
3232
|
+
let i = e[o];
|
|
3233
|
+
return i || (i = n(Ye(r), s), e[o] = i), i(t);
|
|
3231
3234
|
};
|
|
3232
3235
|
}, Ur = (n) => (e, t, r) => n(Ye(t), r)(e);
|
|
3233
3236
|
class Wr {
|
|
@@ -3241,35 +3244,35 @@ class Wr {
|
|
|
3241
3244
|
const r = t.cacheInBuiltFormats ? vn : Ur;
|
|
3242
3245
|
this.formats = {
|
|
3243
3246
|
number: r((s, a) => {
|
|
3244
|
-
const
|
|
3247
|
+
const o = new Intl.NumberFormat(s, {
|
|
3245
3248
|
...a
|
|
3246
3249
|
});
|
|
3247
|
-
return (
|
|
3250
|
+
return (i) => o.format(i);
|
|
3248
3251
|
}),
|
|
3249
3252
|
currency: r((s, a) => {
|
|
3250
|
-
const
|
|
3253
|
+
const o = new Intl.NumberFormat(s, {
|
|
3251
3254
|
...a,
|
|
3252
3255
|
style: "currency"
|
|
3253
3256
|
});
|
|
3254
|
-
return (
|
|
3257
|
+
return (i) => o.format(i);
|
|
3255
3258
|
}),
|
|
3256
3259
|
datetime: r((s, a) => {
|
|
3257
|
-
const
|
|
3260
|
+
const o = new Intl.DateTimeFormat(s, {
|
|
3258
3261
|
...a
|
|
3259
3262
|
});
|
|
3260
|
-
return (
|
|
3263
|
+
return (i) => o.format(i);
|
|
3261
3264
|
}),
|
|
3262
3265
|
relativetime: r((s, a) => {
|
|
3263
|
-
const
|
|
3266
|
+
const o = new Intl.RelativeTimeFormat(s, {
|
|
3264
3267
|
...a
|
|
3265
3268
|
});
|
|
3266
|
-
return (
|
|
3269
|
+
return (i) => o.format(i, a.range || "day");
|
|
3267
3270
|
}),
|
|
3268
3271
|
list: r((s, a) => {
|
|
3269
|
-
const
|
|
3272
|
+
const o = new Intl.ListFormat(s, {
|
|
3270
3273
|
...a
|
|
3271
3274
|
});
|
|
3272
|
-
return (
|
|
3275
|
+
return (i) => o.format(i);
|
|
3273
3276
|
})
|
|
3274
3277
|
};
|
|
3275
3278
|
}
|
|
@@ -3281,20 +3284,20 @@ class Wr {
|
|
|
3281
3284
|
}
|
|
3282
3285
|
format(e, t, r, s = {}) {
|
|
3283
3286
|
const a = t.split(this.formatSeparator);
|
|
3284
|
-
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((
|
|
3285
|
-
const
|
|
3286
|
-
a[0] = [a[0], ...a.splice(1,
|
|
3287
|
+
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((i) => i.indexOf(")") > -1)) {
|
|
3288
|
+
const i = a.findIndex((l) => l.indexOf(")") > -1);
|
|
3289
|
+
a[0] = [a[0], ...a.splice(1, i)].join(this.formatSeparator);
|
|
3287
3290
|
}
|
|
3288
|
-
return a.reduce((
|
|
3291
|
+
return a.reduce((i, l) => {
|
|
3289
3292
|
const {
|
|
3290
3293
|
formatName: c,
|
|
3291
3294
|
formatOptions: d
|
|
3292
3295
|
} = Vr(l);
|
|
3293
3296
|
if (this.formats[c]) {
|
|
3294
|
-
let u =
|
|
3297
|
+
let u = i;
|
|
3295
3298
|
try {
|
|
3296
3299
|
const f = s?.formatParams?.[s.interpolationkey] || {}, y = f.locale || f.lng || s.locale || s.lng || r;
|
|
3297
|
-
u = this.formats[c](
|
|
3300
|
+
u = this.formats[c](i, y, {
|
|
3298
3301
|
...d,
|
|
3299
3302
|
...s,
|
|
3300
3303
|
...f
|
|
@@ -3305,7 +3308,7 @@ class Wr {
|
|
|
3305
3308
|
return u;
|
|
3306
3309
|
} else
|
|
3307
3310
|
this.logger.warn(`there was no format function for ${c}`);
|
|
3308
|
-
return
|
|
3311
|
+
return i;
|
|
3309
3312
|
}, e);
|
|
3310
3313
|
}
|
|
3311
3314
|
}
|
|
@@ -3317,44 +3320,44 @@ class Br extends mt {
|
|
|
3317
3320
|
super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = s, this.logger = ve.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 = [], this.backend?.init?.(r, s.backend, s);
|
|
3318
3321
|
}
|
|
3319
3322
|
queueLoad(e, t, r, s) {
|
|
3320
|
-
const a = {},
|
|
3323
|
+
const a = {}, o = {}, i = {}, l = {};
|
|
3321
3324
|
return e.forEach((c) => {
|
|
3322
3325
|
let d = !0;
|
|
3323
3326
|
t.forEach((u) => {
|
|
3324
3327
|
const f = `${c}|${u}`;
|
|
3325
|
-
!r.reload && this.store.hasResourceBundle(c, u) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ?
|
|
3326
|
-
}), d || (
|
|
3327
|
-
}), (Object.keys(a).length || Object.keys(
|
|
3328
|
-
pending:
|
|
3329
|
-
pendingCount: Object.keys(
|
|
3328
|
+
!r.reload && this.store.hasResourceBundle(c, u) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ? o[f] === void 0 && (o[f] = !0) : (this.state[f] = 1, d = !1, o[f] === void 0 && (o[f] = !0), a[f] === void 0 && (a[f] = !0), l[u] === void 0 && (l[u] = !0)));
|
|
3329
|
+
}), d || (i[c] = !0);
|
|
3330
|
+
}), (Object.keys(a).length || Object.keys(o).length) && this.queue.push({
|
|
3331
|
+
pending: o,
|
|
3332
|
+
pendingCount: Object.keys(o).length,
|
|
3330
3333
|
loaded: {},
|
|
3331
3334
|
errors: [],
|
|
3332
3335
|
callback: s
|
|
3333
3336
|
}), {
|
|
3334
3337
|
toLoad: Object.keys(a),
|
|
3335
|
-
pending: Object.keys(
|
|
3336
|
-
toLoadLanguages: Object.keys(
|
|
3338
|
+
pending: Object.keys(o),
|
|
3339
|
+
toLoadLanguages: Object.keys(i),
|
|
3337
3340
|
toLoadNamespaces: Object.keys(l)
|
|
3338
3341
|
};
|
|
3339
3342
|
}
|
|
3340
3343
|
loaded(e, t, r) {
|
|
3341
|
-
const s = e.split("|"), a = s[0],
|
|
3342
|
-
t && this.emit("failedLoading", a,
|
|
3344
|
+
const s = e.split("|"), a = s[0], o = s[1];
|
|
3345
|
+
t && this.emit("failedLoading", a, o, t), !t && r && this.store.addResourceBundle(a, o, r, void 0, void 0, {
|
|
3343
3346
|
skipCopy: !0
|
|
3344
3347
|
}), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
|
|
3345
|
-
const
|
|
3348
|
+
const i = {};
|
|
3346
3349
|
this.queue.forEach((l) => {
|
|
3347
|
-
Dr(l.loaded, [a],
|
|
3348
|
-
|
|
3350
|
+
Dr(l.loaded, [a], o), Yr(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
3351
|
+
i[c] || (i[c] = {});
|
|
3349
3352
|
const d = l.loaded[c];
|
|
3350
3353
|
d.length && d.forEach((u) => {
|
|
3351
|
-
|
|
3354
|
+
i[c][u] === void 0 && (i[c][u] = !0);
|
|
3352
3355
|
});
|
|
3353
3356
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
3354
|
-
}), this.emit("loaded",
|
|
3357
|
+
}), this.emit("loaded", i), this.queue = this.queue.filter((l) => !l.done);
|
|
3355
3358
|
}
|
|
3356
|
-
read(e, t, r, s = 0, a = this.retryTimeout,
|
|
3357
|
-
if (!e.length) return
|
|
3359
|
+
read(e, t, r, s = 0, a = this.retryTimeout, o) {
|
|
3360
|
+
if (!e.length) return o(null, {});
|
|
3358
3361
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
3359
3362
|
this.waitingReads.push({
|
|
3360
3363
|
lng: e,
|
|
@@ -3362,34 +3365,34 @@ class Br extends mt {
|
|
|
3362
3365
|
fcName: r,
|
|
3363
3366
|
tried: s,
|
|
3364
3367
|
wait: a,
|
|
3365
|
-
callback:
|
|
3368
|
+
callback: o
|
|
3366
3369
|
});
|
|
3367
3370
|
return;
|
|
3368
3371
|
}
|
|
3369
3372
|
this.readingCalls++;
|
|
3370
|
-
const
|
|
3373
|
+
const i = (c, d) => {
|
|
3371
3374
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
3372
3375
|
const u = this.waitingReads.shift();
|
|
3373
3376
|
this.read(u.lng, u.ns, u.fcName, u.tried, u.wait, u.callback);
|
|
3374
3377
|
}
|
|
3375
3378
|
if (c && d && s < this.maxRetries) {
|
|
3376
3379
|
setTimeout(() => {
|
|
3377
|
-
this.read.call(this, e, t, r, s + 1, a * 2,
|
|
3380
|
+
this.read.call(this, e, t, r, s + 1, a * 2, o);
|
|
3378
3381
|
}, a);
|
|
3379
3382
|
return;
|
|
3380
3383
|
}
|
|
3381
|
-
|
|
3384
|
+
o(c, d);
|
|
3382
3385
|
}, l = this.backend[r].bind(this.backend);
|
|
3383
3386
|
if (l.length === 2) {
|
|
3384
3387
|
try {
|
|
3385
3388
|
const c = l(e, t);
|
|
3386
|
-
c && typeof c.then == "function" ? c.then((d) =>
|
|
3389
|
+
c && typeof c.then == "function" ? c.then((d) => i(null, d)).catch(i) : i(null, c);
|
|
3387
3390
|
} catch (c) {
|
|
3388
|
-
|
|
3391
|
+
i(c);
|
|
3389
3392
|
}
|
|
3390
3393
|
return;
|
|
3391
3394
|
}
|
|
3392
|
-
return l(e, t,
|
|
3395
|
+
return l(e, t, i);
|
|
3393
3396
|
}
|
|
3394
3397
|
prepareLoading(e, t, r = {}, s) {
|
|
3395
3398
|
if (!this.backend)
|
|
@@ -3398,8 +3401,8 @@ class Br extends mt {
|
|
|
3398
3401
|
const a = this.queueLoad(e, t, r, s);
|
|
3399
3402
|
if (!a.toLoad.length)
|
|
3400
3403
|
return a.pending.length || s(), null;
|
|
3401
|
-
a.toLoad.forEach((
|
|
3402
|
-
this.loadOne(
|
|
3404
|
+
a.toLoad.forEach((o) => {
|
|
3405
|
+
this.loadOne(o);
|
|
3403
3406
|
});
|
|
3404
3407
|
}
|
|
3405
3408
|
load(e, t, r) {
|
|
@@ -3412,11 +3415,11 @@ class Br extends mt {
|
|
|
3412
3415
|
}
|
|
3413
3416
|
loadOne(e, t = "") {
|
|
3414
3417
|
const r = e.split("|"), s = r[0], a = r[1];
|
|
3415
|
-
this.read(s, a, "read", void 0, void 0, (
|
|
3416
|
-
|
|
3418
|
+
this.read(s, a, "read", void 0, void 0, (o, i) => {
|
|
3419
|
+
o && this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`, o), !o && i && this.logger.log(`${t}loaded namespace ${a} for language ${s}`, i), this.loaded(e, o, i);
|
|
3417
3420
|
});
|
|
3418
3421
|
}
|
|
3419
|
-
saveMissing(e, t, r, s, a,
|
|
3422
|
+
saveMissing(e, t, r, s, a, o = {}, i = () => {
|
|
3420
3423
|
}) {
|
|
3421
3424
|
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
|
|
3422
3425
|
this.logger.warn(`did not save key "${r}" as the namespace "${t}" 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!!!");
|
|
@@ -3425,18 +3428,18 @@ class Br extends mt {
|
|
|
3425
3428
|
if (!(r == null || r === "")) {
|
|
3426
3429
|
if (this.backend?.create) {
|
|
3427
3430
|
const l = {
|
|
3428
|
-
...
|
|
3431
|
+
...o,
|
|
3429
3432
|
isUpdate: a
|
|
3430
3433
|
}, c = this.backend.create.bind(this.backend);
|
|
3431
3434
|
if (c.length < 6)
|
|
3432
3435
|
try {
|
|
3433
3436
|
let d;
|
|
3434
|
-
c.length === 5 ? d = c(e, t, r, s, l) : d = c(e, t, r, s), d && typeof d.then == "function" ? d.then((u) =>
|
|
3437
|
+
c.length === 5 ? d = c(e, t, r, s, l) : d = c(e, t, r, s), d && typeof d.then == "function" ? d.then((u) => i(null, u)).catch(i) : i(null, d);
|
|
3435
3438
|
} catch (d) {
|
|
3436
|
-
|
|
3439
|
+
i(d);
|
|
3437
3440
|
}
|
|
3438
3441
|
else
|
|
3439
|
-
c(e, t, r, s,
|
|
3442
|
+
c(e, t, r, s, i, l);
|
|
3440
3443
|
}
|
|
3441
3444
|
!e || !e[0] || this.store.addResource(e[0], t, r, s);
|
|
3442
3445
|
}
|
|
@@ -3558,28 +3561,28 @@ class Be extends mt {
|
|
|
3558
3561
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
3559
3562
|
this[c] = (...d) => (this.store[c](...d), this);
|
|
3560
3563
|
});
|
|
3561
|
-
const
|
|
3564
|
+
const i = Ue(), l = () => {
|
|
3562
3565
|
const c = (d, u) => {
|
|
3563
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options),
|
|
3566
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(u), t(d, u);
|
|
3564
3567
|
};
|
|
3565
3568
|
if (this.languages && !this.isInitialized) return c(null, this.t.bind(this));
|
|
3566
3569
|
this.changeLanguage(this.options.lng, c);
|
|
3567
3570
|
};
|
|
3568
|
-
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0),
|
|
3571
|
+
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), i;
|
|
3569
3572
|
}
|
|
3570
3573
|
loadResources(e, t = et) {
|
|
3571
3574
|
let r = t;
|
|
3572
3575
|
const s = z(e) ? e : this.language;
|
|
3573
3576
|
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3574
3577
|
if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
|
|
3575
|
-
const a = [],
|
|
3576
|
-
if (!
|
|
3577
|
-
this.services.languageUtils.toResolveHierarchy(
|
|
3578
|
+
const a = [], o = (i) => {
|
|
3579
|
+
if (!i || i === "cimode") return;
|
|
3580
|
+
this.services.languageUtils.toResolveHierarchy(i).forEach((c) => {
|
|
3578
3581
|
c !== "cimode" && a.indexOf(c) < 0 && a.push(c);
|
|
3579
3582
|
});
|
|
3580
3583
|
};
|
|
3581
|
-
s ?
|
|
3582
|
-
!
|
|
3584
|
+
s ? o(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => o(l)), this.options.preload?.forEach?.((i) => o(i)), this.services.backendConnector.load(a, this.options.ns, (i) => {
|
|
3585
|
+
!i && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(i);
|
|
3583
3586
|
});
|
|
3584
3587
|
} else
|
|
3585
3588
|
r(null);
|
|
@@ -3611,24 +3614,24 @@ class Be extends mt {
|
|
|
3611
3614
|
this.isLanguageChangingTo = e;
|
|
3612
3615
|
const r = Ue();
|
|
3613
3616
|
this.emit("languageChanging", e);
|
|
3614
|
-
const s = (
|
|
3615
|
-
this.language =
|
|
3616
|
-
}, a = (
|
|
3617
|
-
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(
|
|
3618
|
-
},
|
|
3619
|
-
!e && !
|
|
3620
|
-
const l = z(
|
|
3617
|
+
const s = (i) => {
|
|
3618
|
+
this.language = i, this.languages = this.services.languageUtils.toResolveHierarchy(i), this.resolvedLanguage = void 0, this.setResolvedLanguage(i);
|
|
3619
|
+
}, a = (i, l) => {
|
|
3620
|
+
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(i, (...c) => this.t(...c));
|
|
3621
|
+
}, o = (i) => {
|
|
3622
|
+
!e && !i && this.services.languageDetector && (i = []);
|
|
3623
|
+
const l = z(i) ? i : i && i[0], c = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(z(i) ? [i] : i);
|
|
3621
3624
|
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), this.services.languageDetector?.cacheUserLanguage?.(c)), this.loadResources(c, (d) => {
|
|
3622
3625
|
a(d, c);
|
|
3623
3626
|
});
|
|
3624
3627
|
};
|
|
3625
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
3628
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), r;
|
|
3626
3629
|
}
|
|
3627
3630
|
getFixedT(e, t, r) {
|
|
3628
|
-
const s = (a,
|
|
3631
|
+
const s = (a, o, ...i) => {
|
|
3629
3632
|
let l;
|
|
3630
|
-
typeof
|
|
3631
|
-
...
|
|
3633
|
+
typeof o != "object" ? l = this.options.overloadTranslationOptionHandler([a, o].concat(i)) : l = {
|
|
3634
|
+
...o
|
|
3632
3635
|
}, 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);
|
|
3633
3636
|
const c = this.options.keySeparator || ".";
|
|
3634
3637
|
let d;
|
|
@@ -3652,15 +3655,15 @@ class Be extends mt {
|
|
|
3652
3655
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
3653
3656
|
const r = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
3654
3657
|
if (r.toLowerCase() === "cimode") return !0;
|
|
3655
|
-
const
|
|
3656
|
-
const c = this.services.backendConnector.state[`${
|
|
3658
|
+
const o = (i, l) => {
|
|
3659
|
+
const c = this.services.backendConnector.state[`${i}|${l}`];
|
|
3657
3660
|
return c === -1 || c === 0 || c === 2;
|
|
3658
3661
|
};
|
|
3659
3662
|
if (t.precheck) {
|
|
3660
|
-
const
|
|
3661
|
-
if (
|
|
3663
|
+
const i = t.precheck(this, o);
|
|
3664
|
+
if (i !== void 0) return i;
|
|
3662
3665
|
}
|
|
3663
|
-
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages ||
|
|
3666
|
+
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, e) && (!s || o(a, e)));
|
|
3664
3667
|
}
|
|
3665
3668
|
loadNamespaces(e, t) {
|
|
3666
3669
|
const r = Ue();
|
|
@@ -3673,9 +3676,9 @@ class Be extends mt {
|
|
|
3673
3676
|
loadLanguages(e, t) {
|
|
3674
3677
|
const r = Ue();
|
|
3675
3678
|
z(e) && (e = [e]);
|
|
3676
|
-
const s = this.options.preload || [], a = e.filter((
|
|
3677
|
-
return a.length ? (this.options.preload = s.concat(a), this.loadResources((
|
|
3678
|
-
r.resolve(), t && t(
|
|
3679
|
+
const s = this.options.preload || [], a = e.filter((o) => s.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o));
|
|
3680
|
+
return a.length ? (this.options.preload = s.concat(a), this.loadResources((o) => {
|
|
3681
|
+
r.resolve(), t && t(o);
|
|
3679
3682
|
}), r) : (t && t(), Promise.resolve());
|
|
3680
3683
|
}
|
|
3681
3684
|
dir(e) {
|
|
@@ -3701,22 +3704,22 @@ class Be extends mt {
|
|
|
3701
3704
|
...e,
|
|
3702
3705
|
isClone: !0
|
|
3703
3706
|
}, a = new Be(s);
|
|
3704
|
-
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((
|
|
3705
|
-
a[
|
|
3707
|
+
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((i) => {
|
|
3708
|
+
a[i] = this[i];
|
|
3706
3709
|
}), a.services = {
|
|
3707
3710
|
...this.services
|
|
3708
3711
|
}, a.services.utils = {
|
|
3709
3712
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3710
3713
|
}, r) {
|
|
3711
|
-
const
|
|
3714
|
+
const i = Object.keys(this.store.data).reduce((l, c) => (l[c] = {
|
|
3712
3715
|
...this.store.data[c]
|
|
3713
3716
|
}, l[c] = Object.keys(l[c]).reduce((d, u) => (d[u] = {
|
|
3714
3717
|
...l[c][u]
|
|
3715
3718
|
}, d), l[c]), l), {});
|
|
3716
|
-
a.store = new fn(
|
|
3719
|
+
a.store = new fn(i, s), a.services.resourceStore = a.store;
|
|
3717
3720
|
}
|
|
3718
|
-
return a.translator = new ut(a.services, s), a.translator.on("*", (
|
|
3719
|
-
a.emit(
|
|
3721
|
+
return a.translator = new ut(a.services, s), a.translator.on("*", (i, ...l) => {
|
|
3722
|
+
a.emit(i, ...l);
|
|
3720
3723
|
}), a.init(s, t), a.translator.options = s, a.translator.backendConnector.services.utils = {
|
|
3721
3724
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3722
3725
|
}, a;
|
|
@@ -3768,18 +3771,18 @@ const ts = (n, e, t) => {
|
|
|
3768
3771
|
let r = n;
|
|
3769
3772
|
return isNaN(r) || (e != null && (r = Math.max(r, e)), t != null && (r = Math.min(r, t))), r;
|
|
3770
3773
|
}, ns = (n, e) => {
|
|
3771
|
-
const r = Intl.NumberFormat(n).formatToParts(1000.1), s = r.find((
|
|
3774
|
+
const r = Intl.NumberFormat(n).formatToParts(1000.1), s = r.find((o) => o.type === "group")?.value ?? ",", a = e ?? r.find((o) => o.type === "decimal")?.value ?? ".";
|
|
3772
3775
|
return { groupingChar: s, decimalChar: a };
|
|
3773
3776
|
};
|
|
3774
3777
|
function rs(n, e, t, r) {
|
|
3775
3778
|
let s = e;
|
|
3776
3779
|
const a = os(n, t);
|
|
3777
3780
|
if (!s) {
|
|
3778
|
-
const
|
|
3779
|
-
|
|
3781
|
+
const i = Math.abs(a);
|
|
3782
|
+
i - Math.floor(i) ? s = "0,0.00" : s = "0,0";
|
|
3780
3783
|
}
|
|
3781
|
-
const
|
|
3782
|
-
return new Intl.NumberFormat(r,
|
|
3784
|
+
const o = is(s);
|
|
3785
|
+
return new Intl.NumberFormat(r, o).format(a);
|
|
3783
3786
|
}
|
|
3784
3787
|
const ss = (n, e, t) => {
|
|
3785
3788
|
const r = n.lastIndexOf(t);
|
|
@@ -3789,26 +3792,26 @@ const ss = (n, e, t) => {
|
|
|
3789
3792
|
}, as = (n, e, t) => {
|
|
3790
3793
|
if (!n) return NaN;
|
|
3791
3794
|
let r = n.replace(/\s/g, ""), s = t;
|
|
3792
|
-
const a = (r.match(/\./g) || []).length,
|
|
3793
|
-
if (a &&
|
|
3795
|
+
const a = (r.match(/\./g) || []).length, o = (r.match(/,/g) || []).length;
|
|
3796
|
+
if (a && o)
|
|
3794
3797
|
s = r.lastIndexOf(".") > r.lastIndexOf(",") ? "." : ",";
|
|
3795
3798
|
else if (!r.includes(t)) {
|
|
3796
|
-
const l = r.includes(".") ? "." : ",", c = l === "." ? a :
|
|
3799
|
+
const l = r.includes(".") ? "." : ",", c = l === "." ? a : o;
|
|
3797
3800
|
c > 1 || c === 1 && l === e && r.length - r.lastIndexOf(l) - 1 === 3 || (s = l);
|
|
3798
3801
|
}
|
|
3799
|
-
const
|
|
3800
|
-
return r = r.replace(new RegExp(`\\${
|
|
3802
|
+
const i = s === "." ? "," : ".";
|
|
3803
|
+
return r = r.replace(new RegExp(`\\${i}`, "g"), ""), s !== "." && (r = r.replace(new RegExp(`\\${s}`, "g"), ".")), parseFloat(r);
|
|
3801
3804
|
};
|
|
3802
3805
|
function os(n, e, t, r, s) {
|
|
3803
3806
|
let a = n;
|
|
3804
3807
|
if (typeof a != "number") {
|
|
3805
|
-
let
|
|
3806
|
-
e && r === void 0 ?
|
|
3807
|
-
const l =
|
|
3808
|
-
a = a.replace(wn(l, "g"), ""), a = a.replace(wn(
|
|
3808
|
+
let i;
|
|
3809
|
+
e && r === void 0 ? i = "," : i = ".";
|
|
3810
|
+
const l = i == "." ? "," : ".";
|
|
3811
|
+
a = a.replace(wn(l, "g"), ""), a = a.replace(wn(i, "g"), "."), a = Number(a);
|
|
3809
3812
|
}
|
|
3810
|
-
const
|
|
3811
|
-
return isNaN(
|
|
3813
|
+
const o = Number(a);
|
|
3814
|
+
return isNaN(o) ? NaN : o;
|
|
3812
3815
|
}
|
|
3813
3816
|
function is(n) {
|
|
3814
3817
|
const e = {};
|
|
@@ -3858,9 +3861,9 @@ oe.init({
|
|
|
3858
3861
|
}
|
|
3859
3862
|
});
|
|
3860
3863
|
const ls = (n, e, t, r) => oe.format(n, e, t || oe.language, r), cs = (n, e) => oe.t(n, e);
|
|
3861
|
-
function
|
|
3864
|
+
function ke() {
|
|
3862
3865
|
const n = ue(
|
|
3863
|
-
(r, s, a,
|
|
3866
|
+
(r, s, a, o) => ls(r, s, a || void 0, o),
|
|
3864
3867
|
[]
|
|
3865
3868
|
), e = ue(() => oe.languages[0], []), t = ue(
|
|
3866
3869
|
(r, s) => cs(r, s),
|
|
@@ -3876,8 +3879,8 @@ const In = ({
|
|
|
3876
3879
|
displayMode: r,
|
|
3877
3880
|
listDisplayMode: s = "Both",
|
|
3878
3881
|
minimumChars: a = 3,
|
|
3879
|
-
isEditable:
|
|
3880
|
-
fun:
|
|
3882
|
+
isEditable: o = !0,
|
|
3883
|
+
fun: i,
|
|
3881
3884
|
_changeOnEnter: l = !1,
|
|
3882
3885
|
onChange: c,
|
|
3883
3886
|
onOptionsRequest: d,
|
|
@@ -3885,7 +3888,7 @@ const In = ({
|
|
|
3885
3888
|
_multiActiveIndex: f,
|
|
3886
3889
|
...y
|
|
3887
3890
|
}) => {
|
|
3888
|
-
const p = le(null), [S, w] = G(n), [E, b] = G(e), { translate: T } =
|
|
3891
|
+
const p = le(null), [S, w] = G(n), [E, b] = G(e), { translate: T } = ke(), [v, g] = G(!1), [$, A] = G(t || []), [C, L] = G(0), [R, D] = G([n]), { anchorRef: O, targetRef: P, anchorWidth: N } = ft({
|
|
3889
3892
|
position: "bottom",
|
|
3890
3893
|
enabled: v
|
|
3891
3894
|
}), B = ue(() => {
|
|
@@ -3896,8 +3899,8 @@ const In = ({
|
|
|
3896
3899
|
_.length >= a ? X(_) : B(), w(_), b(e), l || c?.(_, e);
|
|
3897
3900
|
}, X = (_) => {
|
|
3898
3901
|
H(async () => {
|
|
3899
|
-
if (
|
|
3900
|
-
const j = await d(
|
|
3902
|
+
if (i && d) {
|
|
3903
|
+
const j = await d(i, _);
|
|
3901
3904
|
A(j), L(j.length > 0 ? 0 : -1), g(!0);
|
|
3902
3905
|
}
|
|
3903
3906
|
});
|
|
@@ -3905,18 +3908,18 @@ const In = ({
|
|
|
3905
3908
|
v || u?.();
|
|
3906
3909
|
}, h = (_) => {
|
|
3907
3910
|
l ? (w(""), b("")) : (w(_.id), b(_.label)), c?.(_.id, _.label);
|
|
3908
|
-
const j =
|
|
3911
|
+
const j = $.findIndex((I) => I.id === _.id);
|
|
3909
3912
|
L(j), D([_.id]), B();
|
|
3910
3913
|
}, x = (_) => {
|
|
3911
3914
|
_.key === "Escape" && (B(), L(-1));
|
|
3912
|
-
},
|
|
3915
|
+
}, k = (_) => {
|
|
3913
3916
|
if ((_.key === "ArrowDown" || _.key === "ArrowUp") && (_.preventDefault(), v)) {
|
|
3914
|
-
const j = _.key === "ArrowDown" ? (C + 1) %
|
|
3917
|
+
const j = _.key === "ArrowDown" ? (C + 1) % $.length : (C - 1 + $.length) % $.length;
|
|
3915
3918
|
L(j);
|
|
3916
3919
|
}
|
|
3917
3920
|
switch (_.key) {
|
|
3918
3921
|
case "Enter":
|
|
3919
|
-
C >= 0 && C <
|
|
3922
|
+
C >= 0 && C < $.length ? h($[C]) : l && (c?.(S, ""), B(), w(""), b(""));
|
|
3920
3923
|
break;
|
|
3921
3924
|
case "Escape":
|
|
3922
3925
|
B(), L(-1);
|
|
@@ -3931,7 +3934,7 @@ const In = ({
|
|
|
3931
3934
|
bindValue: S,
|
|
3932
3935
|
optionalDisplayValue: E,
|
|
3933
3936
|
displayMode: r,
|
|
3934
|
-
isEditable:
|
|
3937
|
+
isEditable: o,
|
|
3935
3938
|
shapeIcon: "magnify",
|
|
3936
3939
|
placeholder: T(
|
|
3937
3940
|
Ee.AUTOCOMPLETE_DEFAULT_PLACEHOLDER
|
|
@@ -3939,7 +3942,7 @@ const In = ({
|
|
|
3939
3942
|
ref: O,
|
|
3940
3943
|
inputRef: p,
|
|
3941
3944
|
onChange: q,
|
|
3942
|
-
onKeyDown:
|
|
3945
|
+
onKeyDown: k,
|
|
3943
3946
|
onBlur: F,
|
|
3944
3947
|
onShapeIconClick: () => X(S),
|
|
3945
3948
|
"aria-autocomplete": "list"
|
|
@@ -3948,7 +3951,7 @@ const In = ({
|
|
|
3948
3951
|
v && /* @__PURE__ */ m.jsx(pt, { children: /* @__PURE__ */ m.jsx(
|
|
3949
3952
|
Ln,
|
|
3950
3953
|
{
|
|
3951
|
-
options:
|
|
3954
|
+
options: $,
|
|
3952
3955
|
displayMode: s,
|
|
3953
3956
|
onClick: h,
|
|
3954
3957
|
ref: P,
|
|
@@ -3968,8 +3971,8 @@ const In = ({
|
|
|
3968
3971
|
disposition: r = "start",
|
|
3969
3972
|
sizing: s,
|
|
3970
3973
|
variant: a,
|
|
3971
|
-
appearance:
|
|
3972
|
-
showText:
|
|
3974
|
+
appearance: o,
|
|
3975
|
+
showText: i,
|
|
3973
3976
|
showIcon: l,
|
|
3974
3977
|
fullWidth: c,
|
|
3975
3978
|
disabled: d,
|
|
@@ -3996,8 +3999,8 @@ const In = ({
|
|
|
3996
3999
|
fun: T.fun,
|
|
3997
4000
|
icon: T.icon,
|
|
3998
4001
|
variant: a,
|
|
3999
|
-
appearance:
|
|
4000
|
-
showText:
|
|
4002
|
+
appearance: o,
|
|
4003
|
+
showText: i,
|
|
4001
4004
|
showIcon: l,
|
|
4002
4005
|
fullWidth: c,
|
|
4003
4006
|
disabled: d,
|
|
@@ -4020,8 +4023,8 @@ const In = ({
|
|
|
4020
4023
|
label: r,
|
|
4021
4024
|
isEditable: s = !0,
|
|
4022
4025
|
onChange: a,
|
|
4023
|
-
onBlur:
|
|
4024
|
-
variant:
|
|
4026
|
+
onBlur: o,
|
|
4027
|
+
variant: i = "checkbox"
|
|
4025
4028
|
}) => {
|
|
4026
4029
|
const l = Ce(), c = (u) => {
|
|
4027
4030
|
s && a && a(u.target.checked);
|
|
@@ -4037,8 +4040,8 @@ const In = ({
|
|
|
4037
4040
|
type: "checkbox",
|
|
4038
4041
|
checked: n,
|
|
4039
4042
|
onChange: c,
|
|
4040
|
-
onBlur:
|
|
4041
|
-
role:
|
|
4043
|
+
onBlur: o,
|
|
4044
|
+
role: i === "switch" ? "switch" : "checkbox",
|
|
4042
4045
|
id: l
|
|
4043
4046
|
}
|
|
4044
4047
|
)
|
|
@@ -4050,9 +4053,9 @@ const In = ({
|
|
|
4050
4053
|
onChange: r,
|
|
4051
4054
|
color: s,
|
|
4052
4055
|
backgroundColor: a,
|
|
4053
|
-
isDraggable:
|
|
4056
|
+
isDraggable: o = !1
|
|
4054
4057
|
}) => {
|
|
4055
|
-
const [
|
|
4058
|
+
const [i, l] = G(null), c = {
|
|
4056
4059
|
container: `${["smp-chips-container"]}`,
|
|
4057
4060
|
element: "smp-chips-element"
|
|
4058
4061
|
}, d = (y) => {
|
|
@@ -4060,8 +4063,8 @@ const In = ({
|
|
|
4060
4063
|
}, u = (y) => {
|
|
4061
4064
|
l(y);
|
|
4062
4065
|
}, f = (y) => {
|
|
4063
|
-
if (
|
|
4064
|
-
const p = [...n], [S] = p.splice(
|
|
4066
|
+
if (i === null || i === y) return;
|
|
4067
|
+
const p = [...n], [S] = p.splice(i, 1);
|
|
4065
4068
|
p.splice(y, 0, S), r?.(p), l(null);
|
|
4066
4069
|
};
|
|
4067
4070
|
return /* @__PURE__ */ m.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: n.flatMap((y, p) => {
|
|
@@ -4074,15 +4077,15 @@ const In = ({
|
|
|
4074
4077
|
{
|
|
4075
4078
|
className: c.element,
|
|
4076
4079
|
role: "listitem",
|
|
4077
|
-
draggable:
|
|
4080
|
+
draggable: o,
|
|
4078
4081
|
onDragStart: () => u(p),
|
|
4079
|
-
onDragOver: (b) =>
|
|
4080
|
-
onDrop: () =>
|
|
4082
|
+
onDragOver: (b) => o && b.preventDefault(),
|
|
4083
|
+
onDrop: () => o && f(p),
|
|
4081
4084
|
style: {
|
|
4082
4085
|
"--smp-chips-backgroundColor-base": a
|
|
4083
4086
|
},
|
|
4084
4087
|
children: [
|
|
4085
|
-
|
|
4088
|
+
o && /* @__PURE__ */ m.jsx(de, { icon: "drag_indicator_horizontal", isInteractable: !0 }),
|
|
4086
4089
|
/* @__PURE__ */ m.jsx(Oe, { variant: "label", bindValue: S, color: s }),
|
|
4087
4090
|
e && /* @__PURE__ */ m.jsx(
|
|
4088
4091
|
de,
|
|
@@ -4096,7 +4099,7 @@ const In = ({
|
|
|
4096
4099
|
]
|
|
4097
4100
|
},
|
|
4098
4101
|
`chip-${p}`
|
|
4099
|
-
), E =
|
|
4102
|
+
), E = o && p < n.length - 1 ? /* @__PURE__ */ m.jsx(
|
|
4100
4103
|
de,
|
|
4101
4104
|
{
|
|
4102
4105
|
icon: "chevron-right",
|
|
@@ -4123,23 +4126,23 @@ function It(n, e) {
|
|
|
4123
4126
|
const c = s();
|
|
4124
4127
|
c.length > 0 && requestAnimationFrame(() => c[0].focus());
|
|
4125
4128
|
})();
|
|
4126
|
-
const
|
|
4129
|
+
const o = (c) => {
|
|
4127
4130
|
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
4128
4131
|
const d = s();
|
|
4129
4132
|
if (d.length === 0) return;
|
|
4130
4133
|
const u = d[0], f = d[d.length - 1];
|
|
4131
4134
|
c.shiftKey && document.activeElement === u ? (c.preventDefault(), f.focus()) : !c.shiftKey && document.activeElement === f && (c.preventDefault(), u.focus());
|
|
4132
|
-
},
|
|
4135
|
+
}, i = (c) => {
|
|
4133
4136
|
if (r && !r.contains(c.target)) {
|
|
4134
4137
|
c.preventDefault();
|
|
4135
4138
|
const d = s();
|
|
4136
4139
|
d.length > 0 && d[0].focus();
|
|
4137
4140
|
}
|
|
4138
4141
|
};
|
|
4139
|
-
document.addEventListener("keydown",
|
|
4142
|
+
document.addEventListener("keydown", o), document.addEventListener("mousedown", i);
|
|
4140
4143
|
const l = document.body.style.overflow;
|
|
4141
4144
|
return document.body.style.overflow = "hidden", () => {
|
|
4142
|
-
document.removeEventListener("keydown",
|
|
4145
|
+
document.removeEventListener("keydown", o), document.removeEventListener("mousedown", i), document.body.style.overflow = l, t.current && requestAnimationFrame(() => {
|
|
4143
4146
|
t.current?.focus();
|
|
4144
4147
|
});
|
|
4145
4148
|
};
|
|
@@ -4152,19 +4155,19 @@ const ps = ({
|
|
|
4152
4155
|
optionalDisplayValue: r,
|
|
4153
4156
|
isEditable: s,
|
|
4154
4157
|
displayMode: a,
|
|
4155
|
-
listDisplayMode:
|
|
4156
|
-
fun:
|
|
4158
|
+
listDisplayMode: o = "Both",
|
|
4159
|
+
fun: i,
|
|
4157
4160
|
onOptionsRequest: l,
|
|
4158
4161
|
multiActiveIndex: c,
|
|
4159
4162
|
...d
|
|
4160
4163
|
}) => {
|
|
4161
|
-
const u = le(null), [f, y] = G(!1), [p, S] = G(t), [w, E] = G(-1), [b, T] = G([n]), v = Ce(), { anchorRef: g, targetRef:
|
|
4164
|
+
const u = le(null), [f, y] = G(!1), [p, S] = G(t), [w, E] = G(-1), [b, T] = G([n]), v = Ce(), { anchorRef: g, targetRef: $, anchorWidth: A } = ft({
|
|
4162
4165
|
position: "bottom",
|
|
4163
4166
|
enabled: f
|
|
4164
4167
|
}), C = ue(() => {
|
|
4165
4168
|
y(!1), u?.current?.focus();
|
|
4166
4169
|
}, []);
|
|
4167
|
-
ht([
|
|
4170
|
+
ht([$, g], f, () => C()), It(f, $);
|
|
4168
4171
|
const L = (P) => {
|
|
4169
4172
|
e?.(P.id, P.label);
|
|
4170
4173
|
const N = p.findIndex((B) => B.id === P.id);
|
|
@@ -4174,7 +4177,7 @@ const ps = ({
|
|
|
4174
4177
|
}, D = (P) => {
|
|
4175
4178
|
(P.key === "ArrowDown" || P.key === "ArrowUp") && (P.preventDefault(), O());
|
|
4176
4179
|
}, O = () => {
|
|
4177
|
-
s && (
|
|
4180
|
+
s && (i && l ? f ? y(!1) : l(i, void 0).then((P) => {
|
|
4178
4181
|
S(P), E(P.length > 0 ? 0 : -1), y(!0);
|
|
4179
4182
|
}) : y((P) => !P));
|
|
4180
4183
|
};
|
|
@@ -4211,8 +4214,8 @@ const ps = ({
|
|
|
4211
4214
|
{
|
|
4212
4215
|
id: v,
|
|
4213
4216
|
options: p,
|
|
4214
|
-
displayMode:
|
|
4215
|
-
ref:
|
|
4217
|
+
displayMode: o,
|
|
4218
|
+
ref: $,
|
|
4216
4219
|
isOpen: f,
|
|
4217
4220
|
selectedIndex: w,
|
|
4218
4221
|
activeIndex: c || b,
|
|
@@ -4234,12 +4237,12 @@ function ms({
|
|
|
4234
4237
|
initialValue: r,
|
|
4235
4238
|
targetRef: s
|
|
4236
4239
|
}) {
|
|
4237
|
-
const { translate: a } =
|
|
4240
|
+
const { translate: a } = ke(), o = () => {
|
|
4238
4241
|
if (!r) return;
|
|
4239
4242
|
const F = new Date(r);
|
|
4240
4243
|
return isNaN(F.getTime()) ? void 0 : F;
|
|
4241
|
-
}, [
|
|
4242
|
-
n ||
|
|
4244
|
+
}, [i] = G(/* @__PURE__ */ new Date()), [l, c] = G(
|
|
4245
|
+
n || o() || /* @__PURE__ */ new Date()
|
|
4243
4246
|
), [d, u] = G(
|
|
4244
4247
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
4245
4248
|
), [f, y] = G(
|
|
@@ -4289,11 +4292,11 @@ function ms({
|
|
|
4289
4292
|
full: a(fe.SATURDAY)
|
|
4290
4293
|
}
|
|
4291
4294
|
], v = (F) => t.some((h) => {
|
|
4292
|
-
const x = h.start.getTime(),
|
|
4293
|
-
return _ >= x && _ <=
|
|
4295
|
+
const x = h.start.getTime(), k = h.end.getTime(), _ = F.getTime();
|
|
4296
|
+
return _ >= x && _ <= k;
|
|
4294
4297
|
}), g = (F) => {
|
|
4295
4298
|
v(F) || (c(F), S(F.getDate()), e && e(Er(F)));
|
|
4296
|
-
},
|
|
4299
|
+
}, $ = () => {
|
|
4297
4300
|
d === 0 ? (u(11), y(f - 1)) : u(d - 1), S(1);
|
|
4298
4301
|
}, A = () => {
|
|
4299
4302
|
d === 11 ? (u(0), y(f + 1)) : u(d + 1), S(1);
|
|
@@ -4305,13 +4308,13 @@ function ms({
|
|
|
4305
4308
|
}, D = (F, h) => {
|
|
4306
4309
|
const x = N[h];
|
|
4307
4310
|
if (!x) return;
|
|
4308
|
-
const
|
|
4311
|
+
const k = C(f, d), _ = x.getDate();
|
|
4309
4312
|
switch (F.key) {
|
|
4310
4313
|
case "ArrowRight":
|
|
4311
4314
|
F.preventDefault();
|
|
4312
4315
|
{
|
|
4313
4316
|
let j = _ + 1, I = new Date(f, d, j);
|
|
4314
|
-
if (j >
|
|
4317
|
+
if (j > k) {
|
|
4315
4318
|
const U = d === 11 ? f + 1 : f, W = d === 11 ? 0 : d + 1;
|
|
4316
4319
|
j = 1, I = new Date(U, W, j), A(), setTimeout(() => {
|
|
4317
4320
|
O(1, "forward");
|
|
@@ -4329,7 +4332,7 @@ function ms({
|
|
|
4329
4332
|
let j = _ - 1, I = new Date(f, d, j);
|
|
4330
4333
|
if (j < 1) {
|
|
4331
4334
|
const U = d === 0 ? f - 1 : f, W = d === 0 ? 11 : d - 1, V = C(U, W);
|
|
4332
|
-
j = V, I = new Date(U, W, j),
|
|
4335
|
+
j = V, I = new Date(U, W, j), $(), setTimeout(() => {
|
|
4333
4336
|
O(V, "backward");
|
|
4334
4337
|
}, 0);
|
|
4335
4338
|
return;
|
|
@@ -4343,7 +4346,7 @@ function ms({
|
|
|
4343
4346
|
let j = _ - 7, I = new Date(f, d, j);
|
|
4344
4347
|
if (j < 1) {
|
|
4345
4348
|
const U = d === 0 ? f - 1 : f, W = d === 0 ? 11 : d - 1;
|
|
4346
|
-
j = C(U, W) + j, I = new Date(U, W, j),
|
|
4349
|
+
j = C(U, W) + j, I = new Date(U, W, j), $(), setTimeout(() => {
|
|
4347
4350
|
O(j, "backward");
|
|
4348
4351
|
}, 0);
|
|
4349
4352
|
return;
|
|
@@ -4355,9 +4358,9 @@ function ms({
|
|
|
4355
4358
|
F.preventDefault();
|
|
4356
4359
|
{
|
|
4357
4360
|
let j = _ + 7, I = new Date(f, d, j);
|
|
4358
|
-
if (j >
|
|
4361
|
+
if (j > k) {
|
|
4359
4362
|
const U = d === 11 ? f + 1 : f, W = d === 11 ? 0 : d + 1;
|
|
4360
|
-
j = j -
|
|
4363
|
+
j = j - k, I = new Date(U, W, j), A(), setTimeout(() => {
|
|
4361
4364
|
O(j, "forward");
|
|
4362
4365
|
}, 0);
|
|
4363
4366
|
return;
|
|
@@ -4369,10 +4372,10 @@ function ms({
|
|
|
4369
4372
|
F.preventDefault(), O(1, "forward");
|
|
4370
4373
|
break;
|
|
4371
4374
|
case "End":
|
|
4372
|
-
F.preventDefault(), O(
|
|
4375
|
+
F.preventDefault(), O(k, "backward");
|
|
4373
4376
|
break;
|
|
4374
4377
|
case "PageUp":
|
|
4375
|
-
F.preventDefault(),
|
|
4378
|
+
F.preventDefault(), $(), setTimeout(() => {
|
|
4376
4379
|
const j = C(
|
|
4377
4380
|
d === 0 ? f - 1 : f,
|
|
4378
4381
|
d === 0 ? 11 : d - 1
|
|
@@ -4401,10 +4404,10 @@ function ms({
|
|
|
4401
4404
|
}, O = (F, h) => {
|
|
4402
4405
|
const x = C(f, d);
|
|
4403
4406
|
if (h === "forward") {
|
|
4404
|
-
for (let
|
|
4405
|
-
const _ = new Date(f, d,
|
|
4407
|
+
for (let k = F; k <= x; k++) {
|
|
4408
|
+
const _ = new Date(f, d, k);
|
|
4406
4409
|
if (!v(_)) {
|
|
4407
|
-
R(
|
|
4410
|
+
R(k);
|
|
4408
4411
|
return;
|
|
4409
4412
|
}
|
|
4410
4413
|
}
|
|
@@ -4419,17 +4422,17 @@ function ms({
|
|
|
4419
4422
|
return;
|
|
4420
4423
|
}
|
|
4421
4424
|
}
|
|
4422
|
-
const
|
|
4423
|
-
|
|
4425
|
+
const k = d === 0 ? f - 1 : f, _ = d === 0 ? 11 : d - 1, j = C(k, _);
|
|
4426
|
+
$(), setTimeout(() => {
|
|
4424
4427
|
O(j, "backward");
|
|
4425
4428
|
}, 0);
|
|
4426
4429
|
}
|
|
4427
4430
|
}, N = (() => {
|
|
4428
4431
|
const F = C(f, d), h = L(f, d), x = [];
|
|
4429
|
-
for (let
|
|
4432
|
+
for (let k = 0; k < h; k++)
|
|
4430
4433
|
x.push(null);
|
|
4431
|
-
for (let
|
|
4432
|
-
const _ = new Date(f, d,
|
|
4434
|
+
for (let k = 1; k <= F; k++) {
|
|
4435
|
+
const _ = new Date(f, d, k);
|
|
4433
4436
|
x.push(_);
|
|
4434
4437
|
}
|
|
4435
4438
|
return x;
|
|
@@ -4455,11 +4458,11 @@ function ms({
|
|
|
4455
4458
|
calendar: "smp-datepickercalendar",
|
|
4456
4459
|
table: "smp-datepickercalendar-table",
|
|
4457
4460
|
th: "smp-datepickercalendar-th",
|
|
4458
|
-
td: (F, h, x,
|
|
4461
|
+
td: (F, h, x, k) => `smp-datepickercalendar-td
|
|
4459
4462
|
${F ? "smp-datepickercalendar-td-today" : ""}
|
|
4460
4463
|
${h ? "smp-datepickercalendar-td-selected" : ""}
|
|
4461
4464
|
${x ? "smp-datepickercalendar-td-focused" : ""}
|
|
4462
|
-
${
|
|
4465
|
+
${k ? "smp-datepickercalendar-td-disabled" : ""}`
|
|
4463
4466
|
}, X = () => `${b[d]} ${f.toString()}`;
|
|
4464
4467
|
return /* @__PURE__ */ m.jsxs(
|
|
4465
4468
|
"div",
|
|
@@ -4484,7 +4487,7 @@ function ms({
|
|
|
4484
4487
|
/* @__PURE__ */ m.jsx(
|
|
4485
4488
|
Se,
|
|
4486
4489
|
{
|
|
4487
|
-
onClick:
|
|
4490
|
+
onClick: $,
|
|
4488
4491
|
ariaLabel: a(Dt.PREVIOUS_MONTH),
|
|
4489
4492
|
optionalDisplayValue: "<",
|
|
4490
4493
|
appearance: "ghost",
|
|
@@ -4532,8 +4535,8 @@ function ms({
|
|
|
4532
4535
|
},
|
|
4533
4536
|
F.value
|
|
4534
4537
|
)) }) }),
|
|
4535
|
-
/* @__PURE__ */ m.jsx("tbody", { children: B.map((F, h) => /* @__PURE__ */ m.jsx("tr", { children: F.map((x,
|
|
4536
|
-
const _ = h * 7 +
|
|
4538
|
+
/* @__PURE__ */ m.jsx("tbody", { children: B.map((F, h) => /* @__PURE__ */ m.jsx("tr", { children: F.map((x, k) => {
|
|
4539
|
+
const _ = h * 7 + k;
|
|
4537
4540
|
if (x === null)
|
|
4538
4541
|
return /* @__PURE__ */ m.jsx(
|
|
4539
4542
|
"td",
|
|
@@ -4545,9 +4548,9 @@ function ms({
|
|
|
4545
4548
|
!0
|
|
4546
4549
|
)
|
|
4547
4550
|
},
|
|
4548
|
-
`empty-${
|
|
4551
|
+
`empty-${k}`
|
|
4549
4552
|
);
|
|
4550
|
-
const j = x.getDate() ===
|
|
4553
|
+
const j = x.getDate() === i.getDate() && x.getMonth() === i.getMonth() && x.getFullYear() === i.getFullYear(), I = l && x.getDate() === l.getDate() && x.getMonth() === l.getMonth() && x.getFullYear() === l.getFullYear(), U = p === x.getDate(), W = v(x);
|
|
4551
4554
|
return /* @__PURE__ */ m.jsx(
|
|
4552
4555
|
"td",
|
|
4553
4556
|
{
|
|
@@ -4570,7 +4573,7 @@ function ms({
|
|
|
4570
4573
|
),
|
|
4571
4574
|
children: x.getDate()
|
|
4572
4575
|
},
|
|
4573
|
-
`day-${
|
|
4576
|
+
`day-${k}`
|
|
4574
4577
|
);
|
|
4575
4578
|
}) }, `week-${h}`)) })
|
|
4576
4579
|
]
|
|
@@ -4588,16 +4591,16 @@ const gs = ({
|
|
|
4588
4591
|
isEditable: s = !0,
|
|
4589
4592
|
...a
|
|
4590
4593
|
}) => {
|
|
4591
|
-
const
|
|
4594
|
+
const o = le(null), [i, l] = G(!1), [c, d] = G(n || ""), [u, f] = G(""), { anchorRef: y, targetRef: p } = ft({
|
|
4592
4595
|
position: "bottom",
|
|
4593
|
-
enabled:
|
|
4596
|
+
enabled: i
|
|
4594
4597
|
}), S = ue(() => {
|
|
4595
|
-
l(!1),
|
|
4598
|
+
l(!1), o?.current?.focus();
|
|
4596
4599
|
}, []);
|
|
4597
|
-
ht([p, y],
|
|
4600
|
+
ht([p, y], i, () => {
|
|
4598
4601
|
S();
|
|
4599
|
-
}), It(
|
|
4600
|
-
const { format: w, getCurrentLanguage: E } =
|
|
4602
|
+
}), It(i, p);
|
|
4603
|
+
const { format: w, getCurrentLanguage: E } = ke(), b = ue(
|
|
4601
4604
|
(L) => {
|
|
4602
4605
|
const R = L.length > 5 && xr(L, E()) || L, D = w(R, void 0, void 0, {
|
|
4603
4606
|
type: "date"
|
|
@@ -4616,16 +4619,16 @@ const gs = ({
|
|
|
4616
4619
|
d(D && R || n), f(D && L || n);
|
|
4617
4620
|
}, [n, w, b]);
|
|
4618
4621
|
const T = () => l((L) => !L), v = () => {
|
|
4619
|
-
|
|
4622
|
+
$(u);
|
|
4620
4623
|
}, g = (L) => {
|
|
4621
|
-
|
|
4622
|
-
},
|
|
4624
|
+
$(L), S();
|
|
4625
|
+
}, $ = (L) => {
|
|
4623
4626
|
const { isoDate: R, isValid: D } = b(L);
|
|
4624
4627
|
t && t(D && R || L);
|
|
4625
4628
|
}, A = (L) => {
|
|
4626
4629
|
f(L);
|
|
4627
4630
|
}, C = (L) => {
|
|
4628
|
-
L.key === "Enter" && (L.preventDefault(),
|
|
4631
|
+
L.key === "Enter" && (L.preventDefault(), $(u));
|
|
4629
4632
|
};
|
|
4630
4633
|
return /* @__PURE__ */ m.jsxs("div", { "data-component": "date-picker", children: [
|
|
4631
4634
|
/* @__PURE__ */ m.jsx(
|
|
@@ -4640,13 +4643,13 @@ const gs = ({
|
|
|
4640
4643
|
shapeIcon: "calendar",
|
|
4641
4644
|
onShapeIconClick: T,
|
|
4642
4645
|
ref: y,
|
|
4643
|
-
inputRef:
|
|
4646
|
+
inputRef: o,
|
|
4644
4647
|
isEditable: s,
|
|
4645
4648
|
size: 10,
|
|
4646
4649
|
maxLength: a.maxLength ? a.maxLength : 10
|
|
4647
4650
|
}
|
|
4648
4651
|
),
|
|
4649
|
-
|
|
4652
|
+
i && /* @__PURE__ */ m.jsx(pt, { children: /* @__PURE__ */ m.jsx(
|
|
4650
4653
|
ms,
|
|
4651
4654
|
{
|
|
4652
4655
|
disabledDateRanges: r,
|
|
@@ -4663,8 +4666,8 @@ const gs = ({
|
|
|
4663
4666
|
listDisplayMode: r,
|
|
4664
4667
|
isEditable: s = !0,
|
|
4665
4668
|
placeholder: a,
|
|
4666
|
-
label:
|
|
4667
|
-
disabled:
|
|
4669
|
+
label: o,
|
|
4670
|
+
disabled: i,
|
|
4668
4671
|
fun: l,
|
|
4669
4672
|
error: c,
|
|
4670
4673
|
onOptionsRequest: d,
|
|
@@ -4695,7 +4698,7 @@ const gs = ({
|
|
|
4695
4698
|
className: w.container,
|
|
4696
4699
|
"data-component": "multiple-autocomplete",
|
|
4697
4700
|
children: [
|
|
4698
|
-
|
|
4701
|
+
o && /* @__PURE__ */ m.jsx(De, { label: o, disabled: i }),
|
|
4699
4702
|
/* @__PURE__ */ m.jsx(
|
|
4700
4703
|
Pt,
|
|
4701
4704
|
{
|
|
@@ -4742,7 +4745,7 @@ const gs = ({
|
|
|
4742
4745
|
}
|
|
4743
4746
|
);
|
|
4744
4747
|
}, vs = ({ ...n }) => {
|
|
4745
|
-
const [e, t] = G(n.bindValue), { translate: r } =
|
|
4748
|
+
const [e, t] = G(n.bindValue), { translate: r } = ke(), s = (a) => {
|
|
4746
4749
|
a.key === "Enter" && (a.preventDefault(), n.onEnter?.(e));
|
|
4747
4750
|
};
|
|
4748
4751
|
return /* @__PURE__ */ m.jsx(
|
|
@@ -4852,11 +4855,11 @@ const Ne = (n, e, t) => ({
|
|
|
4852
4855
|
inputMode: r = "decimal",
|
|
4853
4856
|
dSep: s,
|
|
4854
4857
|
bindValue: a,
|
|
4855
|
-
onChange:
|
|
4856
|
-
onEnter:
|
|
4858
|
+
onChange: o,
|
|
4859
|
+
onEnter: i,
|
|
4857
4860
|
...l
|
|
4858
4861
|
}) => {
|
|
4859
|
-
const { getCurrentLanguage: c } =
|
|
4862
|
+
const { getCurrentLanguage: c } = ke(), d = le(null), u = c(), { groupingChar: f, decimalChar: y } = Vn(
|
|
4860
4863
|
() => ns(u, s),
|
|
4861
4864
|
[u, s]
|
|
4862
4865
|
), p = ue(
|
|
@@ -4868,25 +4871,25 @@ const Ne = (n, e, t) => ({
|
|
|
4868
4871
|
[u]
|
|
4869
4872
|
), S = ue(as, [f, y]), w = ue(ts, [n, e]), E = a != null && a.toString().includes(".") ? a.toString().split(".")[1].length : 0, [b, T] = G(E), [v, g] = G(
|
|
4870
4873
|
a != null ? p(a, b) : ""
|
|
4871
|
-
),
|
|
4874
|
+
), $ = le(a ?? null);
|
|
4872
4875
|
ne(() => {
|
|
4873
4876
|
if (a == null) {
|
|
4874
|
-
g(""),
|
|
4877
|
+
g(""), $.current = null;
|
|
4875
4878
|
return;
|
|
4876
4879
|
}
|
|
4877
4880
|
const O = a.toString().includes(".") ? a.toString().split(".")[1].length : 0, P = O === 0 ? b : O;
|
|
4878
|
-
P !== b && T(P), g(p(a, P)),
|
|
4881
|
+
P !== b && T(P), g(p(a, P)), $.current = a;
|
|
4879
4882
|
}, [a, p]);
|
|
4880
4883
|
const A = ue(
|
|
4881
4884
|
(O, P = !1) => {
|
|
4882
4885
|
if (O.trim() === "") {
|
|
4883
|
-
g(""),
|
|
4886
|
+
g(""), $.current = null, o?.(void 0, ""), P && i?.(void 0);
|
|
4884
4887
|
return;
|
|
4885
4888
|
}
|
|
4886
4889
|
const N = S(O, f, y);
|
|
4887
4890
|
if (isNaN(N))
|
|
4888
|
-
if (
|
|
4889
|
-
const B = p(
|
|
4891
|
+
if ($.current != null) {
|
|
4892
|
+
const B = p($.current, b);
|
|
4890
4893
|
g(B);
|
|
4891
4894
|
} else
|
|
4892
4895
|
g("");
|
|
@@ -4898,7 +4901,7 @@ const Ne = (n, e, t) => ({
|
|
|
4898
4901
|
);
|
|
4899
4902
|
T(H);
|
|
4900
4903
|
const q = p(B, H);
|
|
4901
|
-
g(q),
|
|
4904
|
+
g(q), $.current = B, o?.(B, q), P && i?.(B);
|
|
4902
4905
|
}
|
|
4903
4906
|
},
|
|
4904
4907
|
[
|
|
@@ -4909,8 +4912,8 @@ const Ne = (n, e, t) => ({
|
|
|
4909
4912
|
n,
|
|
4910
4913
|
e,
|
|
4911
4914
|
p,
|
|
4912
|
-
i,
|
|
4913
4915
|
o,
|
|
4916
|
+
i,
|
|
4914
4917
|
b
|
|
4915
4918
|
]
|
|
4916
4919
|
), C = (O) => g(O), L = () => A(v), R = (O) => {
|
|
@@ -4920,13 +4923,13 @@ const Ne = (n, e, t) => ({
|
|
|
4920
4923
|
}
|
|
4921
4924
|
if (O.key === "ArrowUp" || O.key === "ArrowDown") {
|
|
4922
4925
|
O.preventDefault();
|
|
4923
|
-
const P = O.key === "ArrowUp" ? 1 : -1, N =
|
|
4926
|
+
const P = O.key === "ArrowUp" ? 1 : -1, N = $.current ?? 0, B = w(N + P * t, n, e);
|
|
4924
4927
|
A(p(B, b));
|
|
4925
4928
|
}
|
|
4926
4929
|
}, D = (O) => {
|
|
4927
4930
|
if (!O.currentTarget.contains(document.activeElement)) return;
|
|
4928
4931
|
O.preventDefault();
|
|
4929
|
-
const P = O.deltaY < 0 ? 1 : -1, N =
|
|
4932
|
+
const P = O.deltaY < 0 ? 1 : -1, N = $.current ?? 0, B = w(N + P * t, n, e);
|
|
4930
4933
|
A(p(B, b));
|
|
4931
4934
|
};
|
|
4932
4935
|
return /* @__PURE__ */ m.jsx("div", { ref: d, "data-component": "input-number", onWheel: D, children: /* @__PURE__ */ m.jsx(
|
|
@@ -4935,7 +4938,7 @@ const Ne = (n, e, t) => ({
|
|
|
4935
4938
|
...l,
|
|
4936
4939
|
"aria-valuemin": n,
|
|
4937
4940
|
"aria-valuemax": e,
|
|
4938
|
-
"aria-valuenow":
|
|
4941
|
+
"aria-valuenow": $.current ?? void 0,
|
|
4939
4942
|
bindValue: v,
|
|
4940
4943
|
inputType: "text",
|
|
4941
4944
|
inputMode: r,
|
|
@@ -4998,8 +5001,8 @@ const Ts = ({
|
|
|
4998
5001
|
placeholder: r,
|
|
4999
5002
|
state: s,
|
|
5000
5003
|
appearance: a,
|
|
5001
|
-
isEditable:
|
|
5002
|
-
label:
|
|
5004
|
+
isEditable: o,
|
|
5005
|
+
label: i,
|
|
5003
5006
|
ariaLabel: l,
|
|
5004
5007
|
helperText: c,
|
|
5005
5008
|
error: d,
|
|
@@ -5012,10 +5015,10 @@ const Ts = ({
|
|
|
5012
5015
|
t?.(g.target.value);
|
|
5013
5016
|
}, v = {
|
|
5014
5017
|
wrapper: "smp-textarea-wrapper",
|
|
5015
|
-
container: `smp-textarea ${n ? "smp-textarea-disabled" : ""} ${r ? "smp-textarea-placeholder" : ""} ${E ? `smp-textarea-${E}` : ""} ${a ? `smp-textarea-${a}` : ""} ${
|
|
5018
|
+
container: `smp-textarea ${n ? "smp-textarea-disabled" : ""} ${r ? "smp-textarea-placeholder" : ""} ${E ? `smp-textarea-${E}` : ""} ${a ? `smp-textarea-${a}` : ""} ${o ? "" : "smp-textarea-readOnly"}`
|
|
5016
5019
|
};
|
|
5017
5020
|
return /* @__PURE__ */ m.jsxs("div", { className: v.wrapper, "data-component": "textarea", children: [
|
|
5018
|
-
|
|
5021
|
+
i && /* @__PURE__ */ m.jsx(De, { htmlFor: S, label: i, disabled: n }),
|
|
5019
5022
|
/* @__PURE__ */ m.jsx(
|
|
5020
5023
|
"textarea",
|
|
5021
5024
|
{
|
|
@@ -5026,17 +5029,17 @@ const Ts = ({
|
|
|
5026
5029
|
onBlur: u,
|
|
5027
5030
|
className: v.container,
|
|
5028
5031
|
disabled: n,
|
|
5029
|
-
readOnly: !
|
|
5032
|
+
readOnly: !o,
|
|
5030
5033
|
onKeyDown: f,
|
|
5031
|
-
"aria-label":
|
|
5032
|
-
"aria-labelledby":
|
|
5034
|
+
"aria-label": i ? void 0 : l,
|
|
5035
|
+
"aria-labelledby": i ? S : void 0,
|
|
5033
5036
|
"aria-describedby": b ? w : void 0,
|
|
5034
5037
|
rows: y,
|
|
5035
5038
|
cols: p
|
|
5036
5039
|
}
|
|
5037
5040
|
),
|
|
5038
5041
|
b && /* @__PURE__ */ m.jsx(
|
|
5039
|
-
|
|
5042
|
+
kn,
|
|
5040
5043
|
{
|
|
5041
5044
|
id: w,
|
|
5042
5045
|
helperText: d,
|
|
@@ -5061,16 +5064,16 @@ const Pe = {
|
|
|
5061
5064
|
RadCol: r,
|
|
5062
5065
|
options: s,
|
|
5063
5066
|
onOptionsRequest: a,
|
|
5064
|
-
fun:
|
|
5065
|
-
label:
|
|
5067
|
+
fun: o,
|
|
5068
|
+
label: i,
|
|
5066
5069
|
...l
|
|
5067
5070
|
}) => {
|
|
5068
5071
|
const [c, d] = G(s), u = Ce();
|
|
5069
5072
|
ne(() => {
|
|
5070
|
-
!c && a &&
|
|
5073
|
+
!c && a && o && a(o, void 0).then((g) => d(g)).catch((g) => {
|
|
5071
5074
|
console.error("Error during loading options (radio)", g);
|
|
5072
5075
|
});
|
|
5073
|
-
}, [c, a,
|
|
5076
|
+
}, [c, a, o]);
|
|
5074
5077
|
const f = parseInt(r ?? "", 10), y = t === jt.LINE_DIRECTION, p = y && !isNaN(f), S = p ? Pe["smp-radio-horizontal-grid"] : y ? Pe["smp-radio-horizontal"] : "", w = p ? { gridTemplateColumns: `repeat(${f}, 1fr)` } : void 0, E = {
|
|
5075
5078
|
container: Pe["smp-radio"],
|
|
5076
5079
|
optionsContainer: `${Pe["smp-radio-options-container"]} ${S}`,
|
|
@@ -5081,8 +5084,8 @@ const Pe = {
|
|
|
5081
5084
|
n || l.onChange?.(g.id, g.label);
|
|
5082
5085
|
}, v = Ce();
|
|
5083
5086
|
return /* @__PURE__ */ m.jsxs("div", { "smp-id": "radio-container", className: E.container, id: u, children: [
|
|
5084
|
-
|
|
5085
|
-
/* @__PURE__ */ m.jsx("div", { className: E.optionsContainer, style: w, children: c?.map((g,
|
|
5087
|
+
i && /* @__PURE__ */ m.jsx(De, { label: i, disabled: n, htmlFor: u }),
|
|
5088
|
+
/* @__PURE__ */ m.jsx("div", { className: E.optionsContainer, style: w, children: c?.map((g, $) => /* @__PURE__ */ m.jsxs("label", { className: E.option, children: [
|
|
5086
5089
|
/* @__PURE__ */ m.jsx(
|
|
5087
5090
|
"input",
|
|
5088
5091
|
{
|
|
@@ -5106,7 +5109,7 @@ const Pe = {
|
|
|
5106
5109
|
)
|
|
5107
5110
|
}
|
|
5108
5111
|
)
|
|
5109
|
-
] },
|
|
5112
|
+
] }, $)) })
|
|
5110
5113
|
] });
|
|
5111
5114
|
}, Os = ({
|
|
5112
5115
|
value: n,
|
|
@@ -5118,7 +5121,7 @@ const Pe = {
|
|
|
5118
5121
|
ne(() => {
|
|
5119
5122
|
r && s?.current && s.current.focus();
|
|
5120
5123
|
}, [r, s]);
|
|
5121
|
-
const [a,
|
|
5124
|
+
const [a, o, i] = n, l = (c) => Array.from({ length: c }, (d, u) => /* @__PURE__ */ m.jsx("option", { value: u, children: u.toString().padStart(2, "0") }, u));
|
|
5122
5125
|
return /* @__PURE__ */ m.jsxs(
|
|
5123
5126
|
"div",
|
|
5124
5127
|
{
|
|
@@ -5130,7 +5133,7 @@ const Pe = {
|
|
|
5130
5133
|
{
|
|
5131
5134
|
value: a,
|
|
5132
5135
|
ref: s,
|
|
5133
|
-
onChange: (c) => e(+c.target.value,
|
|
5136
|
+
onChange: (c) => e(+c.target.value, o, i),
|
|
5134
5137
|
id: "time-picker-hours",
|
|
5135
5138
|
children: l(24)
|
|
5136
5139
|
}
|
|
@@ -5139,8 +5142,8 @@ const Pe = {
|
|
|
5139
5142
|
/* @__PURE__ */ m.jsx(
|
|
5140
5143
|
"select",
|
|
5141
5144
|
{
|
|
5142
|
-
value:
|
|
5143
|
-
onChange: (c) => e(a, +c.target.value,
|
|
5145
|
+
value: o,
|
|
5146
|
+
onChange: (c) => e(a, +c.target.value, i),
|
|
5144
5147
|
id: "time-picker-minutes",
|
|
5145
5148
|
children: l(60)
|
|
5146
5149
|
}
|
|
@@ -5149,8 +5152,8 @@ const Pe = {
|
|
|
5149
5152
|
/* @__PURE__ */ m.jsx(
|
|
5150
5153
|
"select",
|
|
5151
5154
|
{
|
|
5152
|
-
value:
|
|
5153
|
-
onChange: (c) => e(a,
|
|
5155
|
+
value: i || 0,
|
|
5156
|
+
onChange: (c) => e(a, o, +c.target.value),
|
|
5154
5157
|
id: "time-picker-seconds",
|
|
5155
5158
|
children: l(60)
|
|
5156
5159
|
}
|
|
@@ -5161,8 +5164,8 @@ const Pe = {
|
|
|
5161
5164
|
}, Tn = (n) => {
|
|
5162
5165
|
const e = n.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);
|
|
5163
5166
|
if (!e) return !1;
|
|
5164
|
-
const [, t, r, s] = e, a = parseInt(t, 10),
|
|
5165
|
-
return a >= 0 && a <= 23 &&
|
|
5167
|
+
const [, t, r, s] = e, a = parseInt(t, 10), o = parseInt(r, 10), i = s ? parseInt(s, 10) : 0;
|
|
5168
|
+
return a >= 0 && a <= 23 && o >= 0 && o <= 59 && (s === void 0 || i >= 0 && i <= 59);
|
|
5166
5169
|
}, _s = (n) => {
|
|
5167
5170
|
const e = n.split(":").map((t) => parseInt(t, 10));
|
|
5168
5171
|
return [e[0] || 0, e[1] || 0, e[2] || 0];
|
|
@@ -5176,29 +5179,29 @@ const Pe = {
|
|
|
5176
5179
|
isEditable: r = !0,
|
|
5177
5180
|
...s
|
|
5178
5181
|
}) => {
|
|
5179
|
-
const a = le(null), [
|
|
5182
|
+
const a = le(null), [o, i] = G(!1), [l, c] = G(n || ""), [d, u] = G(""), { anchorRef: f, targetRef: y } = ft({
|
|
5180
5183
|
position: "bottom",
|
|
5181
|
-
enabled:
|
|
5184
|
+
enabled: o
|
|
5182
5185
|
}), p = ue(() => {
|
|
5183
|
-
|
|
5186
|
+
i(!1), a?.current?.focus();
|
|
5184
5187
|
}, []);
|
|
5185
|
-
ht([y, f],
|
|
5186
|
-
const g = n || "",
|
|
5187
|
-
c(g), u(
|
|
5188
|
+
ht([y, f], o, () => i(!1)), It(o, y), ne(() => {
|
|
5189
|
+
const g = n || "", $ = Tn(g) ? g : n || "";
|
|
5190
|
+
c(g), u($);
|
|
5188
5191
|
}, [n]), ne(() => {
|
|
5189
|
-
const g = (
|
|
5190
|
-
|
|
5192
|
+
const g = ($) => {
|
|
5193
|
+
$.key === "Escape" && i(!1);
|
|
5191
5194
|
};
|
|
5192
|
-
return
|
|
5195
|
+
return o && document.addEventListener("keydown", g), () => {
|
|
5193
5196
|
document.removeEventListener("keydown", g);
|
|
5194
5197
|
};
|
|
5195
|
-
}, [
|
|
5198
|
+
}, [o]);
|
|
5196
5199
|
const S = () => {
|
|
5197
|
-
r &&
|
|
5200
|
+
r && i((g) => !g);
|
|
5198
5201
|
}, w = (g) => {
|
|
5199
5202
|
u(g);
|
|
5200
|
-
}, E = (g,
|
|
5201
|
-
const C = Rs(g,
|
|
5203
|
+
}, E = (g, $, A) => {
|
|
5204
|
+
const C = Rs(g, $, A);
|
|
5202
5205
|
c(C), u(C), t?.(C), p();
|
|
5203
5206
|
}, b = () => {
|
|
5204
5207
|
v(d);
|
|
@@ -5228,13 +5231,13 @@ const Pe = {
|
|
|
5228
5231
|
inputRef: a
|
|
5229
5232
|
}
|
|
5230
5233
|
),
|
|
5231
|
-
|
|
5234
|
+
o && /* @__PURE__ */ m.jsx(pt, { children: /* @__PURE__ */ m.jsx(
|
|
5232
5235
|
Os,
|
|
5233
5236
|
{
|
|
5234
5237
|
value: _s(l),
|
|
5235
5238
|
onChange: E,
|
|
5236
5239
|
targetRef: y,
|
|
5237
|
-
isOpen:
|
|
5240
|
+
isOpen: o
|
|
5238
5241
|
}
|
|
5239
5242
|
) })
|
|
5240
5243
|
] });
|
|
@@ -5278,26 +5281,26 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5278
5281
|
}
|
|
5279
5282
|
}
|
|
5280
5283
|
]
|
|
5281
|
-
]),
|
|
5284
|
+
]), ks = {
|
|
5282
5285
|
"smp-cell-wrapper": "_smp-cell-wrapper_mdlkz_1"
|
|
5283
|
-
}, ce = (n) => n == null ? !1 : typeof n == "string" ? n.toLocaleLowerCase() == "yes" || n.toLocaleLowerCase() == "true" : n,
|
|
5286
|
+
}, ce = (n) => n == null ? !1 : typeof n == "string" ? n.toLocaleLowerCase() == "yes" || n.toLocaleLowerCase() == "true" : n, $s = ({
|
|
5284
5287
|
bindValue: n,
|
|
5285
5288
|
disabled: e = !1,
|
|
5286
5289
|
displayMode: t = "DescOnly",
|
|
5287
5290
|
BtoVer: r = "false",
|
|
5288
5291
|
options: s,
|
|
5289
5292
|
onOptionsRequest: a,
|
|
5290
|
-
fun:
|
|
5291
|
-
...
|
|
5293
|
+
fun: o,
|
|
5294
|
+
...i
|
|
5292
5295
|
}) => {
|
|
5293
5296
|
const [l, c] = G(s), d = (f) => {
|
|
5294
|
-
e ||
|
|
5297
|
+
e || i.onChange?.(f.id, f.label);
|
|
5295
5298
|
};
|
|
5296
5299
|
ne(() => {
|
|
5297
|
-
!l && a &&
|
|
5300
|
+
!l && a && o && a(o, void 0).then((f) => c(f)).catch((f) => {
|
|
5298
5301
|
console.error("Error during loading options (button group)", f);
|
|
5299
5302
|
});
|
|
5300
|
-
}, [l, a,
|
|
5303
|
+
}, [l, a, o]);
|
|
5301
5304
|
const u = {
|
|
5302
5305
|
container: `smp-button-group-container ${ce(r) ? "smp-button-group-vertical" : ""}`
|
|
5303
5306
|
};
|
|
@@ -5328,8 +5331,8 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5328
5331
|
data: r,
|
|
5329
5332
|
icon: s,
|
|
5330
5333
|
fun: a,
|
|
5331
|
-
placeholderIcon:
|
|
5332
|
-
label:
|
|
5334
|
+
placeholderIcon: o,
|
|
5335
|
+
label: i,
|
|
5333
5336
|
tooltip: l,
|
|
5334
5337
|
options: c,
|
|
5335
5338
|
onChange: d,
|
|
@@ -5353,13 +5356,13 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5353
5356
|
onOptionsRequest: p,
|
|
5354
5357
|
fun: a,
|
|
5355
5358
|
icon: s,
|
|
5356
|
-
placeholderIcon:
|
|
5359
|
+
placeholderIcon: o,
|
|
5357
5360
|
tooltip: l,
|
|
5358
|
-
label:
|
|
5361
|
+
label: i,
|
|
5359
5362
|
isEditable: w,
|
|
5360
5363
|
size: b.data && b.data.size ? b.data.size : b.data?.displayMode && ws(b.data.displayMode || "CodeOnly"),
|
|
5361
5364
|
...r
|
|
5362
|
-
}, g = (D, O, P) => yr(t) ? Ne(D, new it(t, O).getLegacyValue()) : br(t) ? Ne(D, new dt(t, O).getLegacyValue()) : Ne(D, O, P),
|
|
5365
|
+
}, g = (D, O, P) => yr(t) ? Ne(D, new it(t, O).getLegacyValue()) : br(t) ? Ne(D, new dt(t, O).getLegacyValue()) : Ne(D, O, P), $ = (D, O) => Ne(
|
|
5363
5366
|
D,
|
|
5364
5367
|
new Ge(t, O, E).getLegacyValue()
|
|
5365
5368
|
), A = (D) => Ne(b, new ot(t, D).getLegacyValue()), C = (D) => Ss(b, D), L = () => {
|
|
@@ -5456,7 +5459,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5456
5459
|
...v,
|
|
5457
5460
|
bindValue: Ge.fromDataObj(t, E).getValue(),
|
|
5458
5461
|
onChange: (O) => {
|
|
5459
|
-
d?.(
|
|
5462
|
+
d?.($(b, O));
|
|
5460
5463
|
}
|
|
5461
5464
|
};
|
|
5462
5465
|
return /* @__PURE__ */ m.jsx(Es, { ...D });
|
|
@@ -5532,7 +5535,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5532
5535
|
d?.(g(b, O, P));
|
|
5533
5536
|
}
|
|
5534
5537
|
};
|
|
5535
|
-
return /* @__PURE__ */ m.jsx(
|
|
5538
|
+
return /* @__PURE__ */ m.jsx($s, { ...D });
|
|
5536
5539
|
}
|
|
5537
5540
|
case te.TIME: {
|
|
5538
5541
|
const D = {
|
|
@@ -5554,7 +5557,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5554
5557
|
}
|
|
5555
5558
|
}
|
|
5556
5559
|
}, R = {
|
|
5557
|
-
wrapper: `${
|
|
5560
|
+
wrapper: `${ks["smp-cell-wrapper"]}`
|
|
5558
5561
|
};
|
|
5559
5562
|
return /* @__PURE__ */ m.jsx(
|
|
5560
5563
|
"span",
|
|
@@ -5572,12 +5575,12 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5572
5575
|
onEnter: t,
|
|
5573
5576
|
onContextMenu: r
|
|
5574
5577
|
}) => {
|
|
5575
|
-
const [s, a] = G(),
|
|
5576
|
-
(
|
|
5577
|
-
if (!
|
|
5578
|
+
const [s, a] = G(), o = ue(
|
|
5579
|
+
(i) => {
|
|
5580
|
+
if (!i.rows?.length || !i.columns?.length)
|
|
5578
5581
|
return {};
|
|
5579
|
-
const l =
|
|
5580
|
-
return
|
|
5582
|
+
const l = i.rows[0];
|
|
5583
|
+
return i.columns.filter((c) => c.visible).reduce((c, d) => {
|
|
5581
5584
|
const u = l.cells[d.name], f = {
|
|
5582
5585
|
...u,
|
|
5583
5586
|
id: d.name,
|
|
@@ -5614,8 +5617,8 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5614
5617
|
[e, t, r]
|
|
5615
5618
|
);
|
|
5616
5619
|
return ne(() => {
|
|
5617
|
-
n && a(
|
|
5618
|
-
}, [n,
|
|
5620
|
+
n && a(o(n));
|
|
5621
|
+
}, [n, o]), !n?.rows?.length || !n.columns?.length ? null : s && /* @__PURE__ */ m.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ m.jsx(at, { layout: n.rows[0].layout, children: Object.values(s).map((i) => /* @__PURE__ */ m.jsx(Te, { ...i })) }) });
|
|
5619
5622
|
}, Ls = (n) => n.children?.length ? n.children.map((e) => ({
|
|
5620
5623
|
id: e.obj?.k ?? "",
|
|
5621
5624
|
label: e.decode ?? e.value ?? e.obj?.k ?? "",
|
|
@@ -5628,8 +5631,8 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5628
5631
|
minifiedOnClose: r = !0,
|
|
5629
5632
|
customHeight: s = "100vh",
|
|
5630
5633
|
onClick: a,
|
|
5631
|
-
onEnter:
|
|
5632
|
-
onClose:
|
|
5634
|
+
onEnter: o,
|
|
5635
|
+
onClose: i,
|
|
5633
5636
|
loadOptions: l,
|
|
5634
5637
|
onContextMenu: c
|
|
5635
5638
|
}) => {
|
|
@@ -5638,10 +5641,10 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5638
5641
|
if (!v?.rows?.length || !v?.columns?.length)
|
|
5639
5642
|
return {};
|
|
5640
5643
|
const g = v.rows[0];
|
|
5641
|
-
return v.columns.filter((
|
|
5644
|
+
return v.columns.filter(($) => $.visible ?? !0).reduce(($, A) => {
|
|
5642
5645
|
const C = g.cells[A.name];
|
|
5643
5646
|
if (!C || !f && ce(r) && C.shape !== te.BUTTON && C.shape !== te.BUTTON_LIST)
|
|
5644
|
-
return
|
|
5647
|
+
return $;
|
|
5645
5648
|
const L = {
|
|
5646
5649
|
...C,
|
|
5647
5650
|
id: A.name,
|
|
@@ -5655,7 +5658,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5655
5658
|
R.fun && a && a(R);
|
|
5656
5659
|
},
|
|
5657
5660
|
onEnter: (R) => {
|
|
5658
|
-
|
|
5661
|
+
o && o(R);
|
|
5659
5662
|
},
|
|
5660
5663
|
onContextMenu: (R, D) => {
|
|
5661
5664
|
c && c(R, D);
|
|
@@ -5669,16 +5672,16 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5669
5672
|
justify: "center",
|
|
5670
5673
|
squared: !0
|
|
5671
5674
|
}), {
|
|
5672
|
-
|
|
5675
|
+
...$,
|
|
5673
5676
|
[A.name]: L
|
|
5674
5677
|
};
|
|
5675
5678
|
}, {});
|
|
5676
5679
|
},
|
|
5677
|
-
[f, r, a,
|
|
5680
|
+
[f, r, a, o, l, c]
|
|
5678
5681
|
), E = ue(() => {
|
|
5679
|
-
|
|
5680
|
-
}, [
|
|
5681
|
-
ce(r) ? y((v) => !v) : (y(!1),
|
|
5682
|
+
i?.();
|
|
5683
|
+
}, [i]), b = () => {
|
|
5684
|
+
ce(r) ? y((v) => !v) : (y(!1), i?.());
|
|
5682
5685
|
};
|
|
5683
5686
|
if (ne(() => {
|
|
5684
5687
|
u(w(n));
|
|
@@ -5763,8 +5766,8 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5763
5766
|
TextColName: r,
|
|
5764
5767
|
TextColor: s = "var(--smp-dashList-color-base)",
|
|
5765
5768
|
Fillspace: a,
|
|
5766
|
-
FontSize:
|
|
5767
|
-
Horizontal:
|
|
5769
|
+
FontSize: o,
|
|
5770
|
+
Horizontal: i,
|
|
5768
5771
|
ForceIcon: l,
|
|
5769
5772
|
IconColName: c,
|
|
5770
5773
|
IconColor: d = "var(--smp-dashList-color-base)",
|
|
@@ -5778,20 +5781,20 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5778
5781
|
SelectLayout: b = "1",
|
|
5779
5782
|
onClick: T
|
|
5780
5783
|
}) => {
|
|
5781
|
-
const v = "N/A", g = e?.columns || [],
|
|
5784
|
+
const v = "N/A", g = e?.columns || [], $ = e?.rows || [], A = $.length > 0, C = "--smp-dashList-color", L = "smp-layout", R = "descr", D = "icon", O = "um", P = "value", N = o || "1em", B = "18px", H = "--smp-dashList-columns", q = "--smp-dashList-fontSize", X = {
|
|
5782
5785
|
dash: (Y = "1") => {
|
|
5783
|
-
const Z = h(Y), re = Z, ae = x(Z, R),
|
|
5786
|
+
const Z = h(Y), re = Z, ae = x(Z, R), $e = x(Z, D), Me = x(Z, O), ge = x(Z, P);
|
|
5784
5787
|
return {
|
|
5785
5788
|
container: re,
|
|
5786
5789
|
descr: ae,
|
|
5787
|
-
icon:
|
|
5790
|
+
icon: $e,
|
|
5788
5791
|
um: Me,
|
|
5789
5792
|
value: ge
|
|
5790
5793
|
};
|
|
5791
5794
|
},
|
|
5792
5795
|
dashList: `smp-dash-list ${ce(a) ? "smp-dash-list-fill-space" : ""}
|
|
5793
|
-
${ce(
|
|
5794
|
-
}, { format: F } =
|
|
5796
|
+
${ce(i) ? "smp-dash-list-horizontal" : ""}`
|
|
5797
|
+
}, { format: F } = ke(), h = (Y) => `${L}-${Y}`, x = (Y, Z) => `${Y}__${Z}`, k = (Y) => `${C}-${Y}`, _ = (Y) => {
|
|
5795
5798
|
const Z = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
5796
5799
|
if (Z.test(Y)) {
|
|
5797
5800
|
const ae = Y.match(Z) || [];
|
|
@@ -5803,9 +5806,9 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5803
5806
|
if (!u) return Y;
|
|
5804
5807
|
const [Z, re] = I(u).map(
|
|
5805
5808
|
(Le) => parseInt(Le || "0")
|
|
5806
|
-
), ae = "0,0" + (re ? "." + "0".repeat(re) : ""),
|
|
5807
|
-
if (!Z) return
|
|
5808
|
-
const [Me, ge] =
|
|
5809
|
+
), ae = "0,0" + (re ? "." + "0".repeat(re) : ""), $e = F(Y, ae, "it");
|
|
5810
|
+
if (!Z) return $e;
|
|
5811
|
+
const [Me, ge] = $e.split(",");
|
|
5809
5812
|
return Me + (ge ? `,${ge}` : "");
|
|
5810
5813
|
}, I = (Y) => Y.includes(";") ? Y.split(";") : [Y], U = (Y) => {
|
|
5811
5814
|
const Z = (ae) => {
|
|
@@ -5843,11 +5846,11 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5843
5846
|
value: (re) => /* @__PURE__ */ m.jsx("div", { className: Z.value, children: re }, `${Y}-${P}`)
|
|
5844
5847
|
};
|
|
5845
5848
|
})(b), se = (Y) => {
|
|
5846
|
-
const { descr: Z, icon: re, um: ae, value:
|
|
5847
|
-
[
|
|
5848
|
-
[
|
|
5849
|
-
[
|
|
5850
|
-
}, ge = [], Le = j(
|
|
5849
|
+
const { descr: Z, icon: re, um: ae, value: $e } = U(Y), Me = {
|
|
5850
|
+
[k(R)]: _(s),
|
|
5851
|
+
[k(O)]: _(p),
|
|
5852
|
+
[k(P)]: _(E)
|
|
5853
|
+
}, ge = [], Le = j($e);
|
|
5851
5854
|
switch (b) {
|
|
5852
5855
|
case "2":
|
|
5853
5856
|
re && ge.push(K.icon(re)), ge.push(K.descr(Z)), ge.push(
|
|
@@ -5877,7 +5880,7 @@ const Cn = /* @__PURE__ */ new Map([
|
|
|
5877
5880
|
[H]: String(n),
|
|
5878
5881
|
[q]: N
|
|
5879
5882
|
};
|
|
5880
|
-
return /* @__PURE__ */ m.jsx("div", { className: X.dashList, style: M, children: A ?
|
|
5883
|
+
return /* @__PURE__ */ m.jsx("div", { className: X.dashList, style: M, children: A ? $.map((Y) => se(Y)) : v });
|
|
5881
5884
|
}, tt = {
|
|
5882
5885
|
"smp-table": "_smp-table_1qmju_1",
|
|
5883
5886
|
"smp-headerCell": "_smp-headerCell_1qmju_35",
|
|
@@ -5911,10 +5914,10 @@ const Nn = ({
|
|
|
5911
5914
|
rowHeight: r = 26,
|
|
5912
5915
|
offsetTop: s
|
|
5913
5916
|
}) => {
|
|
5914
|
-
const [a,
|
|
5915
|
-
|
|
5917
|
+
const [a, o] = G(!1), i = nt(n) && !!n.children?.length, l = n.cells && Object.keys(n.cells).length > 0, c = i, d = t * 20, u = () => {
|
|
5918
|
+
i && o(!a);
|
|
5916
5919
|
}, f = {
|
|
5917
|
-
content: `${we.rowContent} ${
|
|
5920
|
+
content: `${we.rowContent} ${i ? we.clickable : ""}`,
|
|
5918
5921
|
toggle: `${we.toggle}`,
|
|
5919
5922
|
indent: `${we.indent}`,
|
|
5920
5923
|
cell: `${we.cell}`
|
|
@@ -5938,8 +5941,8 @@ const Nn = ({
|
|
|
5938
5941
|
{
|
|
5939
5942
|
className: f.content,
|
|
5940
5943
|
onClick: u,
|
|
5941
|
-
role:
|
|
5942
|
-
"aria-expanded":
|
|
5944
|
+
role: i ? "button" : "row",
|
|
5945
|
+
"aria-expanded": i ? !a : void 0,
|
|
5943
5946
|
style: {
|
|
5944
5947
|
height: `${r}px`,
|
|
5945
5948
|
lineHeight: `calc(${r}px - 2*2px)`,
|
|
@@ -5979,7 +5982,7 @@ const Nn = ({
|
|
|
5979
5982
|
]
|
|
5980
5983
|
}
|
|
5981
5984
|
);
|
|
5982
|
-
}, E = () => a || !
|
|
5985
|
+
}, E = () => a || !i ? null : /* @__PURE__ */ m.jsx(m.Fragment, { children: nt(n) && n.children?.map((b, T) => /* @__PURE__ */ m.jsx(Nn, { row: b, level: t + 1 }, `child-${T}`)) });
|
|
5983
5986
|
return /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
5984
5987
|
w(),
|
|
5985
5988
|
E()
|
|
@@ -5992,14 +5995,14 @@ const Nn = ({
|
|
|
5992
5995
|
onClick: s,
|
|
5993
5996
|
isExpanded: a
|
|
5994
5997
|
}) => {
|
|
5995
|
-
const
|
|
5998
|
+
const o = {
|
|
5996
5999
|
tr: "smp-groupRow-tr",
|
|
5997
6000
|
td: "smp-groupRow-td"
|
|
5998
6001
|
};
|
|
5999
6002
|
return /* @__PURE__ */ m.jsx(
|
|
6000
6003
|
"tr",
|
|
6001
6004
|
{
|
|
6002
|
-
className:
|
|
6005
|
+
className: o.tr,
|
|
6003
6006
|
style: {
|
|
6004
6007
|
height: e,
|
|
6005
6008
|
top: t,
|
|
@@ -6009,7 +6012,7 @@ const Nn = ({
|
|
|
6009
6012
|
children: /* @__PURE__ */ m.jsxs(
|
|
6010
6013
|
"td",
|
|
6011
6014
|
{
|
|
6012
|
-
className:
|
|
6015
|
+
className: o.td,
|
|
6013
6016
|
style: {
|
|
6014
6017
|
paddingLeft: 10 + r * 20
|
|
6015
6018
|
},
|
|
@@ -6044,19 +6047,19 @@ function Bs(n, e) {
|
|
|
6044
6047
|
function Gs(n, e, t, r) {
|
|
6045
6048
|
const s = [];
|
|
6046
6049
|
let a = 0;
|
|
6047
|
-
return
|
|
6048
|
-
function
|
|
6050
|
+
return o(n, 0, []), { flatRows: s, offset: a };
|
|
6051
|
+
function o(u, f, y) {
|
|
6049
6052
|
if (f >= e.length) {
|
|
6050
6053
|
d(u);
|
|
6051
6054
|
return;
|
|
6052
6055
|
}
|
|
6053
|
-
const p = e[f].column, S =
|
|
6056
|
+
const p = e[f].column, S = i(u, p);
|
|
6054
6057
|
for (const [w, E] of S) {
|
|
6055
6058
|
const b = [...y, w], T = l(b, f), v = r.has(T);
|
|
6056
|
-
s.push(c(w, T, f, v)), a += t, v &&
|
|
6059
|
+
s.push(c(w, T, f, v)), a += t, v && o(E, f + 1, b);
|
|
6057
6060
|
}
|
|
6058
6061
|
}
|
|
6059
|
-
function
|
|
6062
|
+
function i(u, f) {
|
|
6060
6063
|
const y = /* @__PURE__ */ new Map();
|
|
6061
6064
|
for (const p of u) {
|
|
6062
6065
|
const S = p.cells[f]?.decode ?? "N/D";
|
|
@@ -6090,9 +6093,9 @@ const Hs = ({
|
|
|
6090
6093
|
onDrop: s,
|
|
6091
6094
|
onDragOver: a
|
|
6092
6095
|
}) => {
|
|
6093
|
-
const
|
|
6094
|
-
(
|
|
6095
|
-
bindValue:
|
|
6096
|
+
const o = n.map(
|
|
6097
|
+
(i) => ({
|
|
6098
|
+
bindValue: i.column
|
|
6096
6099
|
})
|
|
6097
6100
|
);
|
|
6098
6101
|
return /* @__PURE__ */ m.jsxs(
|
|
@@ -6106,7 +6109,7 @@ const Hs = ({
|
|
|
6106
6109
|
/* @__PURE__ */ m.jsx("td", { children: /* @__PURE__ */ m.jsx(
|
|
6107
6110
|
Pt,
|
|
6108
6111
|
{
|
|
6109
|
-
elements:
|
|
6112
|
+
elements: o,
|
|
6110
6113
|
isEditable: t,
|
|
6111
6114
|
isDraggable: e,
|
|
6112
6115
|
displayMode: "CodeOnly",
|
|
@@ -6139,26 +6142,26 @@ const Hs = ({
|
|
|
6139
6142
|
return ne(() => {
|
|
6140
6143
|
if (!(!n || n.length === 0)) {
|
|
6141
6144
|
if (r === "fixed") {
|
|
6142
|
-
const
|
|
6145
|
+
const i = Object.fromEntries(
|
|
6143
6146
|
n.map((l) => [l.name, 120])
|
|
6144
6147
|
);
|
|
6145
|
-
a(
|
|
6148
|
+
a(i);
|
|
6146
6149
|
} else if (r === "fit-grid") {
|
|
6147
|
-
const
|
|
6148
|
-
|
|
6150
|
+
const o = t.current?.offsetWidth || 800, i = n.filter((d) => d.visible !== !1), l = o / i.length, c = Object.fromEntries(
|
|
6151
|
+
i.map((d) => [d.name, l])
|
|
6149
6152
|
);
|
|
6150
6153
|
a(c);
|
|
6151
6154
|
} else if (r === "fit-content") {
|
|
6152
|
-
const
|
|
6153
|
-
for (const
|
|
6154
|
-
if (!
|
|
6155
|
-
const l =
|
|
6156
|
-
...e.map((d) => `${d.cells?.[
|
|
6155
|
+
const o = {};
|
|
6156
|
+
for (const i of n) {
|
|
6157
|
+
if (!i.visible) continue;
|
|
6158
|
+
const l = i.title?.length || 0, c = Math.max(
|
|
6159
|
+
...e.map((d) => `${d.cells?.[i.name]?.decode || d.cells?.[i.name]?.value || ""}`.length),
|
|
6157
6160
|
l
|
|
6158
6161
|
);
|
|
6159
|
-
i
|
|
6162
|
+
o[i.name] = c * 8 + 24;
|
|
6160
6163
|
}
|
|
6161
|
-
a(
|
|
6164
|
+
a(o);
|
|
6162
6165
|
}
|
|
6163
6166
|
}
|
|
6164
6167
|
}, [n, e, t, r]), [s, a];
|
|
@@ -6171,11 +6174,11 @@ const Hs = ({
|
|
|
6171
6174
|
showGroupBar: a = !0
|
|
6172
6175
|
// isEditable = false,
|
|
6173
6176
|
}) => {
|
|
6174
|
-
const [
|
|
6177
|
+
const [o, i] = G(
|
|
6175
6178
|
n ?? { columns: [], rows: [] }
|
|
6176
6179
|
), [l, c] = G(r || []), [d, u] = G(/* @__PURE__ */ new Set()), f = le(null), [y, p] = zs({
|
|
6177
|
-
columns:
|
|
6178
|
-
rows:
|
|
6180
|
+
columns: o?.columns ?? [],
|
|
6181
|
+
rows: o?.rows ?? [],
|
|
6179
6182
|
containerRef: f,
|
|
6180
6183
|
sizingMode: s
|
|
6181
6184
|
});
|
|
@@ -6187,9 +6190,9 @@ const Hs = ({
|
|
|
6187
6190
|
e,
|
|
6188
6191
|
d
|
|
6189
6192
|
);
|
|
6190
|
-
|
|
6193
|
+
i({ ...n, rows: A });
|
|
6191
6194
|
} else
|
|
6192
|
-
|
|
6195
|
+
i(n);
|
|
6193
6196
|
}, [n, l, d, e]);
|
|
6194
6197
|
const S = (A) => {
|
|
6195
6198
|
c(Bs(A, l));
|
|
@@ -6202,8 +6205,8 @@ const Hs = ({
|
|
|
6202
6205
|
c(R);
|
|
6203
6206
|
}, E = (A) => {
|
|
6204
6207
|
A.preventDefault();
|
|
6205
|
-
}, { virtualItems: b, containerProps: T, innerProps: v } =
|
|
6206
|
-
items:
|
|
6208
|
+
}, { virtualItems: b, containerProps: T, innerProps: v } = $n({
|
|
6209
|
+
items: o?.rows ?? [],
|
|
6207
6210
|
itemHeight: e,
|
|
6208
6211
|
containerHeight: t,
|
|
6209
6212
|
overscan: 5
|
|
@@ -6218,15 +6221,15 @@ const Hs = ({
|
|
|
6218
6221
|
window.removeEventListener("mousemove", D), window.removeEventListener("mouseup", O);
|
|
6219
6222
|
};
|
|
6220
6223
|
window.addEventListener("mousemove", D), window.addEventListener("mouseup", O);
|
|
6221
|
-
},
|
|
6224
|
+
}, $ = {
|
|
6222
6225
|
smpTable: `${tt["smp-table"]}`,
|
|
6223
6226
|
headerCell: `${tt["smp-headerCell"]}`,
|
|
6224
6227
|
resizer: `${tt["smp-resizer"]}`
|
|
6225
6228
|
};
|
|
6226
|
-
return
|
|
6229
|
+
return o && /* @__PURE__ */ m.jsx(
|
|
6227
6230
|
"div",
|
|
6228
6231
|
{
|
|
6229
|
-
className:
|
|
6232
|
+
className: $.smpTable,
|
|
6230
6233
|
...T,
|
|
6231
6234
|
ref: f,
|
|
6232
6235
|
children: /* @__PURE__ */ m.jsxs("table", { children: [
|
|
@@ -6240,11 +6243,11 @@ const Hs = ({
|
|
|
6240
6243
|
onDragOver: E
|
|
6241
6244
|
}
|
|
6242
6245
|
),
|
|
6243
|
-
/* @__PURE__ */ m.jsx("tr", { children:
|
|
6246
|
+
/* @__PURE__ */ m.jsx("tr", { children: o.columns && o.columns?.map(
|
|
6244
6247
|
(A) => A.visible && /* @__PURE__ */ m.jsxs(
|
|
6245
6248
|
"th",
|
|
6246
6249
|
{
|
|
6247
|
-
className:
|
|
6250
|
+
className: $.headerCell,
|
|
6248
6251
|
draggable: !0,
|
|
6249
6252
|
onDragStart: (C) => {
|
|
6250
6253
|
C.dataTransfer.setData("text/plain", A.name);
|
|
@@ -6265,7 +6268,7 @@ const Hs = ({
|
|
|
6265
6268
|
/* @__PURE__ */ m.jsx(
|
|
6266
6269
|
"div",
|
|
6267
6270
|
{
|
|
6268
|
-
className:
|
|
6271
|
+
className: $.resizer,
|
|
6269
6272
|
onMouseDown: (C) => g(C, A.name),
|
|
6270
6273
|
role: "region"
|
|
6271
6274
|
}
|
|
@@ -6304,7 +6307,7 @@ const Hs = ({
|
|
|
6304
6307
|
`row-${R}`
|
|
6305
6308
|
);
|
|
6306
6309
|
}) }),
|
|
6307
|
-
/* @__PURE__ */ m.jsx(Ks, { columns:
|
|
6310
|
+
/* @__PURE__ */ m.jsx(Ks, { columns: o.columns, columnWidths: y })
|
|
6308
6311
|
] })
|
|
6309
6312
|
}
|
|
6310
6313
|
);
|
|
@@ -6315,8 +6318,8 @@ const Hs = ({
|
|
|
6315
6318
|
SubmitPosition: r = "Right",
|
|
6316
6319
|
DefaultValue: s,
|
|
6317
6320
|
Label: a,
|
|
6318
|
-
LabelPosition:
|
|
6319
|
-
onBlur:
|
|
6321
|
+
LabelPosition: o = "Left",
|
|
6322
|
+
onBlur: i,
|
|
6320
6323
|
onClick: l,
|
|
6321
6324
|
onOptionsRequest: c
|
|
6322
6325
|
}) => {
|
|
@@ -6332,7 +6335,7 @@ const Hs = ({
|
|
|
6332
6335
|
const y = {
|
|
6333
6336
|
container: `smp-field-container ${ce(t) ? `smp-field-position-${r}` : ""}`
|
|
6334
6337
|
}, p = () => {
|
|
6335
|
-
ce(t) ||
|
|
6338
|
+
ce(t) || i?.(d);
|
|
6336
6339
|
};
|
|
6337
6340
|
if (d)
|
|
6338
6341
|
return /* @__PURE__ */ m.jsxs("div", { className: y.container, children: [
|
|
@@ -6355,7 +6358,7 @@ const Hs = ({
|
|
|
6355
6358
|
fun: n?.fun,
|
|
6356
6359
|
onBlur: p,
|
|
6357
6360
|
label: a,
|
|
6358
|
-
labelPosition:
|
|
6361
|
+
labelPosition: o
|
|
6359
6362
|
}
|
|
6360
6363
|
)
|
|
6361
6364
|
}
|
|
@@ -6390,14 +6393,14 @@ const Hs = ({
|
|
|
6390
6393
|
hiddenSubmitButton: r = !1,
|
|
6391
6394
|
updateOnClick: s = !1,
|
|
6392
6395
|
decimalSeparator: a = ".",
|
|
6393
|
-
optionsHandler:
|
|
6394
|
-
onSubmit:
|
|
6396
|
+
optionsHandler: o,
|
|
6397
|
+
onSubmit: i,
|
|
6395
6398
|
onCheck: l,
|
|
6396
6399
|
onCheckObj: c,
|
|
6397
6400
|
onContextMenu: d,
|
|
6398
6401
|
onButtonClick: u
|
|
6399
6402
|
}) => {
|
|
6400
|
-
const [f, y] = G({}), { translate: p } =
|
|
6403
|
+
const [f, y] = G({}), { translate: p } = ke(), S = Ce();
|
|
6401
6404
|
ne(() => {
|
|
6402
6405
|
y(v(n));
|
|
6403
6406
|
}, [n]);
|
|
@@ -6420,14 +6423,14 @@ const Hs = ({
|
|
|
6420
6423
|
}
|
|
6421
6424
|
})), s && (L.shape == te.CHECKBOX || L.shape == te.SWITCH)) {
|
|
6422
6425
|
const R = structuredClone(f);
|
|
6423
|
-
R[C].obj.k = L.obj.k, R[C].value = L.obj.k,
|
|
6426
|
+
R[C].obj.k = L.obj.k, R[C].value = L.obj.k, i({
|
|
6424
6427
|
value: g(R),
|
|
6425
6428
|
cell: C
|
|
6426
6429
|
});
|
|
6427
6430
|
}
|
|
6428
6431
|
}, E = (C) => {
|
|
6429
6432
|
const L = g(f);
|
|
6430
|
-
|
|
6433
|
+
i({
|
|
6431
6434
|
value: L,
|
|
6432
6435
|
cell: C
|
|
6433
6436
|
});
|
|
@@ -6497,7 +6500,7 @@ const Hs = ({
|
|
|
6497
6500
|
}
|
|
6498
6501
|
]
|
|
6499
6502
|
}
|
|
6500
|
-
}),
|
|
6503
|
+
}), $ = n.setup?.commands?.map((C, L) => /* @__PURE__ */ Un(
|
|
6501
6504
|
Te,
|
|
6502
6505
|
{
|
|
6503
6506
|
...C,
|
|
@@ -6511,7 +6514,7 @@ const Hs = ({
|
|
|
6511
6514
|
onClick: () => E(C.obj.k)
|
|
6512
6515
|
}
|
|
6513
6516
|
)) || [];
|
|
6514
|
-
r ||
|
|
6517
|
+
r || $.unshift(
|
|
6515
6518
|
/* @__PURE__ */ m.jsx(
|
|
6516
6519
|
Te,
|
|
6517
6520
|
{
|
|
@@ -6549,7 +6552,7 @@ const Hs = ({
|
|
|
6549
6552
|
{
|
|
6550
6553
|
...C,
|
|
6551
6554
|
onOptionsRequest: C.fun ? async (L, R) => Xs(
|
|
6552
|
-
await
|
|
6555
|
+
await o(L, R, n, C.id)
|
|
6553
6556
|
) : void 0,
|
|
6554
6557
|
onChange: (L) => w(C.id, L),
|
|
6555
6558
|
onBlur: () => T(C.id),
|
|
@@ -6563,7 +6566,7 @@ const Hs = ({
|
|
|
6563
6566
|
}
|
|
6564
6567
|
}
|
|
6565
6568
|
)) }),
|
|
6566
|
-
|
|
6569
|
+
$.length > 0 && /* @__PURE__ */ m.jsx(
|
|
6567
6570
|
at,
|
|
6568
6571
|
{
|
|
6569
6572
|
layout: {
|
|
@@ -6572,13 +6575,13 @@ const Hs = ({
|
|
|
6572
6575
|
id: "1",
|
|
6573
6576
|
horizontal: !0,
|
|
6574
6577
|
justify: "start",
|
|
6575
|
-
content:
|
|
6578
|
+
content: $.map((C) => ({
|
|
6576
6579
|
id: C.props.id
|
|
6577
6580
|
}))
|
|
6578
6581
|
}
|
|
6579
6582
|
]
|
|
6580
6583
|
},
|
|
6581
|
-
children:
|
|
6584
|
+
children: $
|
|
6582
6585
|
}
|
|
6583
6586
|
)
|
|
6584
6587
|
]
|