@sme.up/ketchup2 2.0.0-SNAPSHOT-20250716103357 → 2.0.0-SNAPSHOT-20250716103413
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/ketchup2.es.js
CHANGED
|
@@ -17,16 +17,16 @@ function tn() {
|
|
|
17
17
|
Gt = 1;
|
|
18
18
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
19
19
|
function r(n, 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: t,
|
|
28
28
|
type: n,
|
|
29
|
-
key:
|
|
29
|
+
key: o,
|
|
30
30
|
ref: s !== void 0 ? s : null,
|
|
31
31
|
props: a
|
|
32
32
|
};
|
|
@@ -62,7 +62,7 @@ function rn() {
|
|
|
62
62
|
return "Suspense";
|
|
63
63
|
case N:
|
|
64
64
|
return "SuspenseList";
|
|
65
|
-
case
|
|
65
|
+
case L:
|
|
66
66
|
return "Activity";
|
|
67
67
|
}
|
|
68
68
|
if (typeof m == "object")
|
|
@@ -101,11 +101,11 @@ function rn() {
|
|
|
101
101
|
}
|
|
102
102
|
if (v) {
|
|
103
103
|
v = console;
|
|
104
|
-
var $ = v.error,
|
|
104
|
+
var $ = v.error, k = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
105
105
|
return $.call(
|
|
106
106
|
v,
|
|
107
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
108
|
-
|
|
108
|
+
k
|
|
109
109
|
), e(m);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -127,14 +127,14 @@ function rn() {
|
|
|
127
127
|
function a() {
|
|
128
128
|
return Error("react-stack-top-frame");
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function o(m) {
|
|
131
131
|
if (O.call(m, "key")) {
|
|
132
132
|
var v = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
133
133
|
if (v && v.isReactWarning) return !1;
|
|
134
134
|
}
|
|
135
135
|
return m.key !== void 0;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function i(m, v) {
|
|
138
138
|
function $() {
|
|
139
139
|
z || (z = !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)",
|
|
@@ -152,7 +152,7 @@ function rn() {
|
|
|
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
|
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
154
154
|
}
|
|
155
|
-
function c(m, v, $,
|
|
155
|
+
function c(m, v, $, k, _, I, U, B) {
|
|
156
156
|
return $ = I.ref, m = {
|
|
157
157
|
$$typeof: y,
|
|
158
158
|
type: m,
|
|
@@ -184,13 +184,13 @@ function rn() {
|
|
|
184
184
|
value: B
|
|
185
185
|
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
186
186
|
}
|
|
187
|
-
function d(m, v, $,
|
|
187
|
+
function d(m, v, $, k, _, I, U, B) {
|
|
188
188
|
var W = v.children;
|
|
189
189
|
if (W !== void 0)
|
|
190
|
-
if (
|
|
190
|
+
if (k)
|
|
191
191
|
if (A(W)) {
|
|
192
|
-
for (
|
|
193
|
-
u(W[
|
|
192
|
+
for (k = 0; k < W.length; k++)
|
|
193
|
+
u(W[k]);
|
|
194
194
|
Object.freeze && Object.freeze(W);
|
|
195
195
|
} else
|
|
196
196
|
console.error(
|
|
@@ -202,25 +202,25 @@ function rn() {
|
|
|
202
202
|
var X = Object.keys(v).filter(function(te) {
|
|
203
203
|
return te !== "key";
|
|
204
204
|
});
|
|
205
|
-
|
|
205
|
+
k = 0 < X.length ? "{key: someKey, " + X.join(": ..., ") + ": ...}" : "{key: someKey}", V[W + k] || (X = 0 < X.length ? "{" + X.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
206
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
207
207
|
let props = %s;
|
|
208
208
|
<%s {...props} />
|
|
209
209
|
React keys must be passed directly to JSX without using spread:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s key={someKey} {...props} />`,
|
|
212
|
-
|
|
212
|
+
k,
|
|
213
213
|
W,
|
|
214
214
|
X,
|
|
215
215
|
W
|
|
216
|
-
), V[W +
|
|
216
|
+
), V[W + k] = !0);
|
|
217
217
|
}
|
|
218
|
-
if (W = null, $ !== void 0 && (r($), W = "" + $),
|
|
218
|
+
if (W = null, $ !== void 0 && (r($), W = "" + $), o(v) && (r(v.key), W = "" + v.key), "key" in v) {
|
|
219
219
|
$ = {};
|
|
220
220
|
for (var H in v)
|
|
221
221
|
H !== "key" && ($[H] = v[H]);
|
|
222
222
|
} else $ = v;
|
|
223
|
-
return W &&
|
|
223
|
+
return W && i(
|
|
224
224
|
$,
|
|
225
225
|
typeof m == "function" ? m.displayName || m.name || "Unknown" : m
|
|
226
226
|
), c(
|
|
@@ -237,7 +237,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
function u(m) {
|
|
238
238
|
typeof m == "object" && m !== null && m.$$typeof === y && m._store && (m._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var p = ct, y = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), C = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), R = Symbol.for("react.lazy"),
|
|
240
|
+
var p = ct, y = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), C = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), L = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), j = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, A = Array.isArray, M = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
p = {
|
|
@@ -249,26 +249,26 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
p,
|
|
250
250
|
a
|
|
251
251
|
)(), Q = M(n(a)), V = {};
|
|
252
|
-
Ge.Fragment = x, Ge.jsx = function(m, v, $,
|
|
252
|
+
Ge.Fragment = x, Ge.jsx = function(m, v, $, k, _) {
|
|
253
253
|
var I = 1e4 > j.recentlyCreatedOwnerStacks++;
|
|
254
254
|
return d(
|
|
255
255
|
m,
|
|
256
256
|
v,
|
|
257
257
|
$,
|
|
258
258
|
!1,
|
|
259
|
-
|
|
259
|
+
k,
|
|
260
260
|
_,
|
|
261
261
|
I ? Error("react-stack-top-frame") : J,
|
|
262
262
|
I ? M(n(m)) : Q
|
|
263
263
|
);
|
|
264
|
-
}, Ge.jsxs = function(m, v, $,
|
|
264
|
+
}, Ge.jsxs = function(m, v, $, k, _) {
|
|
265
265
|
var I = 1e4 > j.recentlyCreatedOwnerStacks++;
|
|
266
266
|
return d(
|
|
267
267
|
m,
|
|
268
268
|
v,
|
|
269
269
|
$,
|
|
270
270
|
!0,
|
|
271
|
-
|
|
271
|
+
k,
|
|
272
272
|
_,
|
|
273
273
|
I ? Error("react-stack-top-frame") : J,
|
|
274
274
|
I ? M(n(m)) : Q
|
|
@@ -314,13 +314,13 @@ const je = ({ label: t, disabled: e, htmlFor: r }) => {
|
|
|
314
314
|
};
|
|
315
315
|
let n = r.sections, s = r.content;
|
|
316
316
|
return r.content?.length && r.columns && +r.columns > 1 && (n = sn(
|
|
317
|
-
r.content.filter((
|
|
317
|
+
r.content.filter((o) => e.includes(o.id)),
|
|
318
318
|
+r.columns
|
|
319
319
|
).map(
|
|
320
|
-
(
|
|
320
|
+
(o, i) => ({
|
|
321
321
|
...r,
|
|
322
|
-
id: `${r.id}-${
|
|
323
|
-
content:
|
|
322
|
+
id: `${r.id}-${i}`,
|
|
323
|
+
content: o,
|
|
324
324
|
gridCols: r.columns,
|
|
325
325
|
horizontal: !0
|
|
326
326
|
})
|
|
@@ -379,8 +379,8 @@ function ln() {
|
|
|
379
379
|
if (Jt) return Ze;
|
|
380
380
|
Jt = 1;
|
|
381
381
|
var t = /; *([!#$%&'*+.^_`|~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]+$/, r = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/, n = /\\([\u000b\u0020-\u00ff])/g, s = /([\\"])/g, a = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
|
|
382
|
-
Ze.format =
|
|
383
|
-
function
|
|
382
|
+
Ze.format = o, Ze.parse = i;
|
|
383
|
+
function o(u) {
|
|
384
384
|
if (!u || typeof u != "object")
|
|
385
385
|
throw new TypeError("argument obj is required");
|
|
386
386
|
var p = u.parameters, y = u.type;
|
|
@@ -395,7 +395,7 @@ function ln() {
|
|
|
395
395
|
}
|
|
396
396
|
return f;
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function i(u) {
|
|
399
399
|
if (!u)
|
|
400
400
|
throw new TypeError("argument string is required");
|
|
401
401
|
var p = typeof u == "object" ? l(u) : u;
|
|
@@ -448,9 +448,9 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
448
448
|
var a = s.getResponseHeader("Content-Type");
|
|
449
449
|
if (!a)
|
|
450
450
|
throw new Error("Content type not found");
|
|
451
|
-
var
|
|
452
|
-
if (!(
|
|
453
|
-
throw new Error("Invalid content type: ".concat(
|
|
451
|
+
var o = cn.parse(a).type;
|
|
452
|
+
if (!(o === "image/svg+xml" || o === "text/plain"))
|
|
453
|
+
throw new Error("Invalid content type: ".concat(o));
|
|
454
454
|
}
|
|
455
455
|
if (s.readyState === 4) {
|
|
456
456
|
if (s.status === 404 || s.responseXML === null)
|
|
@@ -460,21 +460,21 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
460
460
|
else
|
|
461
461
|
throw new Error("There was a problem injecting the SVG: " + s.status + " " + s.statusText);
|
|
462
462
|
}
|
|
463
|
-
} catch (
|
|
464
|
-
if (s.abort(),
|
|
465
|
-
n(
|
|
463
|
+
} catch (i) {
|
|
464
|
+
if (s.abort(), i instanceof Error)
|
|
465
|
+
n(i, s);
|
|
466
466
|
else
|
|
467
|
-
throw
|
|
467
|
+
throw i;
|
|
468
468
|
}
|
|
469
469
|
}, s.open("GET", e), s.withCredentials = r, s.overrideMimeType && s.overrideMimeType("text/xml"), s.send();
|
|
470
470
|
}, _e = {}, Qt = function(e, r) {
|
|
471
471
|
_e[e] = _e[e] || [], _e[e].push(r);
|
|
472
472
|
}, un = function(e) {
|
|
473
|
-
for (var r = function(
|
|
473
|
+
for (var r = function(o, i) {
|
|
474
474
|
setTimeout(function() {
|
|
475
475
|
if (Array.isArray(_e[e])) {
|
|
476
|
-
var l = Me.get(e), c = _e[e][
|
|
477
|
-
l instanceof SVGSVGElement && c(null, Ir(l)), l instanceof Error && c(l),
|
|
476
|
+
var l = Me.get(e), c = _e[e][o];
|
|
477
|
+
l instanceof SVGSVGElement && c(null, Ir(l)), l instanceof Error && c(l), o === _e[e].length - 1 && delete _e[e];
|
|
478
478
|
}
|
|
479
479
|
}, 0);
|
|
480
480
|
}, n = 0, s = _e[e].length; n < s; n++)
|
|
@@ -491,21 +491,21 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
Me.set(e, void 0), Qt(e, n), Pr(e, r, function(a,
|
|
495
|
-
var
|
|
496
|
-
a ? Me.set(e, a) : ((
|
|
494
|
+
Me.set(e, void 0), Qt(e, n), Pr(e, r, function(a, o) {
|
|
495
|
+
var i;
|
|
496
|
+
a ? Me.set(e, a) : ((i = o.responseXML) === null || i === void 0 ? void 0 : i.documentElement) instanceof SVGSVGElement && Me.set(e, o.responseXML.documentElement), un(e);
|
|
497
497
|
});
|
|
498
498
|
}, fn = function(e, r, n) {
|
|
499
499
|
Pr(e, r, function(s, a) {
|
|
500
|
-
var
|
|
501
|
-
s ? n(s) : ((
|
|
500
|
+
var o;
|
|
501
|
+
s ? n(s) : ((o = a.responseXML) === null || o === void 0 ? void 0 : o.documentElement) instanceof SVGSVGElement && n(null, a.responseXML.documentElement);
|
|
502
502
|
});
|
|
503
503
|
}, pn = 0, hn = function() {
|
|
504
504
|
return ++pn;
|
|
505
|
-
}, xe = [], Zt = {}, mn = "http://www.w3.org/2000/svg", St = "http://www.w3.org/1999/xlink", er = function(e, r, n, s, a,
|
|
505
|
+
}, xe = [], Zt = {}, mn = "http://www.w3.org/2000/svg", St = "http://www.w3.org/1999/xlink", er = function(e, r, n, s, a, o, i) {
|
|
506
506
|
var l = e.getAttribute("data-src") || e.getAttribute("src");
|
|
507
507
|
if (!l) {
|
|
508
|
-
|
|
508
|
+
i(new Error("Invalid data-src or src attribute"));
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
511
511
|
if (xe.indexOf(e) !== -1) {
|
|
@@ -516,7 +516,7 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
516
516
|
var c = s ? dn : fn;
|
|
517
517
|
c(l, a, function(d, u) {
|
|
518
518
|
if (!u) {
|
|
519
|
-
xe.splice(xe.indexOf(e), 1), e = null,
|
|
519
|
+
xe.splice(xe.indexOf(e), 1), e = null, i(d);
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
522
|
var p = e.getAttribute("id");
|
|
@@ -551,8 +551,8 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
551
551
|
}, S, g, N, F, R;
|
|
552
552
|
Object.keys(C).forEach(function(Q) {
|
|
553
553
|
S = Q, N = C[Q], g = u.querySelectorAll(S + "[id]");
|
|
554
|
-
for (var V = function(
|
|
555
|
-
F = g[
|
|
554
|
+
for (var V = function(k, _) {
|
|
555
|
+
F = g[k].id, R = F + "-" + hn();
|
|
556
556
|
var I;
|
|
557
557
|
Array.prototype.forEach.call(N, function(P) {
|
|
558
558
|
I = u.querySelectorAll("[" + P + '*="' + F + '"]');
|
|
@@ -563,18 +563,18 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
563
563
|
});
|
|
564
564
|
for (var U = u.querySelectorAll("[*|href]"), B = [], W = 0, X = U.length; W < X; W++) {
|
|
565
565
|
var H = U[W].getAttributeNS(St, "href");
|
|
566
|
-
H && H.toString() === "#" + g[
|
|
566
|
+
H && H.toString() === "#" + g[k].id && B.push(U[W]);
|
|
567
567
|
}
|
|
568
568
|
for (var te = 0, T = B.length; te < T; te++)
|
|
569
569
|
B[te].setAttributeNS(St, "href", "#" + R);
|
|
570
|
-
g[
|
|
570
|
+
g[k].id = R;
|
|
571
571
|
}, m = 0, v = g.length; m < v; m++)
|
|
572
572
|
V(m);
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
575
|
u.removeAttribute("xmlns:a");
|
|
576
|
-
for (var
|
|
577
|
-
O =
|
|
576
|
+
for (var L = u.querySelectorAll("script"), D = [], j, O, A = 0, M = L.length; A < M; A++)
|
|
577
|
+
O = L[A].getAttribute("type"), (!O || O === "application/ecmascript" || O === "application/javascript" || O === "text/javascript") && (j = L[A].innerText || L[A].textContent, j && D.push(j), u.removeChild(L[A]));
|
|
578
578
|
if (D.length > 0 && (r === "always" || r === "once" && !Zt[l])) {
|
|
579
579
|
for (var z = 0, q = D.length; z < q; z++)
|
|
580
580
|
new Function(D[z])(window);
|
|
@@ -583,24 +583,24 @@ var cn = ln(), Me = /* @__PURE__ */ new Map(), Ir = function(e) {
|
|
|
583
583
|
var J = u.querySelectorAll("style");
|
|
584
584
|
if (Array.prototype.forEach.call(J, function(Q) {
|
|
585
585
|
Q.textContent += "";
|
|
586
|
-
}), u.setAttribute("xmlns", mn), u.setAttribute("xmlns:xlink", St),
|
|
587
|
-
xe.splice(xe.indexOf(e), 1), e = null,
|
|
586
|
+
}), u.setAttribute("xmlns", mn), u.setAttribute("xmlns:xlink", St), o(u), !e.parentNode) {
|
|
587
|
+
xe.splice(xe.indexOf(e), 1), e = null, i(new Error("Parent node is null"));
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
e.parentNode.replaceChild(u, e), xe.splice(xe.indexOf(e), 1), e = null,
|
|
590
|
+
e.parentNode.replaceChild(u, e), xe.splice(xe.indexOf(e), 1), e = null, i(null, u);
|
|
591
591
|
});
|
|
592
592
|
}, gn = function(e, r) {
|
|
593
593
|
var n = r === void 0 ? {} : r, s = n.afterAll, a = s === void 0 ? function() {
|
|
594
|
-
} : s,
|
|
595
|
-
} :
|
|
594
|
+
} : s, o = n.afterEach, i = o === void 0 ? function() {
|
|
595
|
+
} : o, l = n.beforeEach, c = l === void 0 ? function() {
|
|
596
596
|
} : l, d = n.cacheRequests, u = d === void 0 ? !0 : d, p = n.evalScripts, y = p === void 0 ? "never" : p, f = n.httpRequestWithCredentials, x = f === void 0 ? !1 : f, E = n.renumerateIRIElements, w = E === void 0 ? !0 : E;
|
|
597
597
|
if (e && "length" in e)
|
|
598
598
|
for (var b = 0, C = 0, S = e.length; C < S; C++)
|
|
599
599
|
er(e[C], y, w, u, x, c, function(g, N) {
|
|
600
|
-
|
|
600
|
+
i(g, N), e && "length" in e && e.length === ++b && a(b);
|
|
601
601
|
});
|
|
602
602
|
else e ? er(e, y, w, u, x, c, function(g, N) {
|
|
603
|
-
|
|
603
|
+
i(g, N), a(1), e = null;
|
|
604
604
|
}) : a(0);
|
|
605
605
|
}, et = { exports: {} }, tt = { exports: {} }, ne = {};
|
|
606
606
|
/** @license React v16.13.1
|
|
@@ -615,7 +615,7 @@ var tr;
|
|
|
615
615
|
function yn() {
|
|
616
616
|
if (tr) return ne;
|
|
617
617
|
tr = 1;
|
|
618
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114,
|
|
618
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, i = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, u = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, y = t ? Symbol.for("react.memo") : 60115, f = t ? Symbol.for("react.lazy") : 60116, x = t ? Symbol.for("react.block") : 60121, E = t ? Symbol.for("react.fundamental") : 60117, w = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
619
619
|
function C(g) {
|
|
620
620
|
if (typeof g == "object" && g !== null) {
|
|
621
621
|
var N = g.$$typeof;
|
|
@@ -631,11 +631,11 @@ function yn() {
|
|
|
631
631
|
return g;
|
|
632
632
|
default:
|
|
633
633
|
switch (g = g && g.$$typeof, g) {
|
|
634
|
-
case
|
|
634
|
+
case i:
|
|
635
635
|
case d:
|
|
636
636
|
case f:
|
|
637
637
|
case y:
|
|
638
|
-
case
|
|
638
|
+
case o:
|
|
639
639
|
return g;
|
|
640
640
|
default:
|
|
641
641
|
return N;
|
|
@@ -649,12 +649,12 @@ function yn() {
|
|
|
649
649
|
function S(g) {
|
|
650
650
|
return C(g) === c;
|
|
651
651
|
}
|
|
652
|
-
return ne.AsyncMode = l, ne.ConcurrentMode = c, ne.ContextConsumer =
|
|
652
|
+
return ne.AsyncMode = l, ne.ConcurrentMode = c, ne.ContextConsumer = i, ne.ContextProvider = o, ne.Element = e, ne.ForwardRef = d, ne.Fragment = n, ne.Lazy = f, ne.Memo = y, ne.Portal = r, ne.Profiler = a, ne.StrictMode = s, ne.Suspense = u, ne.isAsyncMode = function(g) {
|
|
653
653
|
return S(g) || C(g) === l;
|
|
654
654
|
}, ne.isConcurrentMode = S, ne.isContextConsumer = function(g) {
|
|
655
|
-
return C(g) === o;
|
|
656
|
-
}, ne.isContextProvider = function(g) {
|
|
657
655
|
return C(g) === i;
|
|
656
|
+
}, ne.isContextProvider = function(g) {
|
|
657
|
+
return C(g) === o;
|
|
658
658
|
}, ne.isElement = function(g) {
|
|
659
659
|
return typeof g == "object" && g !== null && g.$$typeof === e;
|
|
660
660
|
}, ne.isForwardRef = function(g) {
|
|
@@ -674,7 +674,7 @@ function yn() {
|
|
|
674
674
|
}, ne.isSuspense = function(g) {
|
|
675
675
|
return C(g) === u;
|
|
676
676
|
}, ne.isValidElementType = function(g) {
|
|
677
|
-
return typeof g == "string" || typeof g == "function" || g === n || g === c || g === a || g === s || g === u || g === p || typeof g == "object" && g !== null && (g.$$typeof === f || g.$$typeof === y || g.$$typeof ===
|
|
677
|
+
return typeof g == "string" || typeof g == "function" || g === n || g === c || g === a || g === s || g === u || g === p || typeof g == "object" && g !== null && (g.$$typeof === f || g.$$typeof === y || g.$$typeof === o || g.$$typeof === i || g.$$typeof === d || g.$$typeof === E || g.$$typeof === w || g.$$typeof === b || g.$$typeof === x);
|
|
678
678
|
}, ne.typeOf = C, ne;
|
|
679
679
|
}
|
|
680
680
|
var se = {};
|
|
@@ -689,10 +689,10 @@ var se = {};
|
|
|
689
689
|
var rr;
|
|
690
690
|
function bn() {
|
|
691
691
|
return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
692
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114,
|
|
692
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, i = t ? Symbol.for("react.context") : 60110, l = t ? Symbol.for("react.async_mode") : 60111, c = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, u = t ? Symbol.for("react.suspense") : 60113, p = t ? Symbol.for("react.suspense_list") : 60120, y = t ? Symbol.for("react.memo") : 60115, f = t ? Symbol.for("react.lazy") : 60116, x = t ? Symbol.for("react.block") : 60121, E = t ? Symbol.for("react.fundamental") : 60117, w = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
693
693
|
function C(T) {
|
|
694
694
|
return typeof T == "string" || typeof T == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
695
|
-
T === n || T === c || T === a || T === s || T === u || T === p || typeof T == "object" && T !== null && (T.$$typeof === f || T.$$typeof === y || T.$$typeof ===
|
|
695
|
+
T === n || T === c || T === a || T === s || T === u || T === p || typeof T == "object" && T !== null && (T.$$typeof === f || T.$$typeof === y || T.$$typeof === o || T.$$typeof === i || T.$$typeof === d || T.$$typeof === E || T.$$typeof === w || T.$$typeof === b || T.$$typeof === x);
|
|
696
696
|
}
|
|
697
697
|
function S(T) {
|
|
698
698
|
if (typeof T == "object" && T !== null) {
|
|
@@ -711,11 +711,11 @@ function bn() {
|
|
|
711
711
|
default:
|
|
712
712
|
var Z = G && G.$$typeof;
|
|
713
713
|
switch (Z) {
|
|
714
|
-
case
|
|
714
|
+
case i:
|
|
715
715
|
case d:
|
|
716
716
|
case f:
|
|
717
717
|
case y:
|
|
718
|
-
case
|
|
718
|
+
case o:
|
|
719
719
|
return Z;
|
|
720
720
|
default:
|
|
721
721
|
return P;
|
|
@@ -726,7 +726,7 @@ function bn() {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
var g = l, N = c, F =
|
|
729
|
+
var g = l, N = c, F = i, R = o, L = e, D = d, j = n, O = f, A = y, M = r, z = a, q = s, J = u, Q = !1;
|
|
730
730
|
function V(T) {
|
|
731
731
|
return Q || (Q = !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.")), m(T) || S(T) === l;
|
|
732
732
|
}
|
|
@@ -734,12 +734,12 @@ function bn() {
|
|
|
734
734
|
return S(T) === c;
|
|
735
735
|
}
|
|
736
736
|
function v(T) {
|
|
737
|
-
return S(T) ===
|
|
737
|
+
return S(T) === i;
|
|
738
738
|
}
|
|
739
739
|
function $(T) {
|
|
740
|
-
return S(T) ===
|
|
740
|
+
return S(T) === o;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function k(T) {
|
|
743
743
|
return typeof T == "object" && T !== null && T.$$typeof === e;
|
|
744
744
|
}
|
|
745
745
|
function _(T) {
|
|
@@ -766,7 +766,7 @@ function bn() {
|
|
|
766
766
|
function te(T) {
|
|
767
767
|
return S(T) === u;
|
|
768
768
|
}
|
|
769
|
-
se.AsyncMode = g, se.ConcurrentMode = N, se.ContextConsumer = F, se.ContextProvider = R, se.Element =
|
|
769
|
+
se.AsyncMode = g, se.ConcurrentMode = N, se.ContextConsumer = F, se.ContextProvider = R, se.Element = L, se.ForwardRef = D, se.Fragment = j, se.Lazy = O, se.Memo = A, se.Portal = M, se.Profiler = z, se.StrictMode = q, se.Suspense = J, se.isAsyncMode = V, se.isConcurrentMode = m, se.isContextConsumer = v, se.isContextProvider = $, se.isElement = k, se.isForwardRef = _, se.isFragment = I, se.isLazy = U, se.isMemo = B, se.isPortal = W, se.isProfiler = X, se.isStrictMode = H, se.isSuspense = te, se.isValidElementType = C, se.typeOf = S;
|
|
770
770
|
}()), se;
|
|
771
771
|
}
|
|
772
772
|
var nr;
|
|
@@ -795,10 +795,10 @@ function vn() {
|
|
|
795
795
|
var a = new String("abc");
|
|
796
796
|
if (a[5] = "de", Object.getOwnPropertyNames(a)[0] === "5")
|
|
797
797
|
return !1;
|
|
798
|
-
for (var
|
|
799
|
-
|
|
800
|
-
var l = Object.getOwnPropertyNames(
|
|
801
|
-
return
|
|
798
|
+
for (var o = {}, i = 0; i < 10; i++)
|
|
799
|
+
o["_" + String.fromCharCode(i)] = i;
|
|
800
|
+
var l = Object.getOwnPropertyNames(o).map(function(d) {
|
|
801
|
+
return o[d];
|
|
802
802
|
});
|
|
803
803
|
if (l.join("") !== "0123456789")
|
|
804
804
|
return !1;
|
|
@@ -810,15 +810,15 @@ function vn() {
|
|
|
810
810
|
return !1;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
return Et = s() ? Object.assign : function(a,
|
|
814
|
-
for (var
|
|
815
|
-
|
|
816
|
-
for (var u in
|
|
817
|
-
e.call(
|
|
813
|
+
return Et = s() ? Object.assign : function(a, o) {
|
|
814
|
+
for (var i, l = n(a), c, d = 1; d < arguments.length; d++) {
|
|
815
|
+
i = Object(arguments[d]);
|
|
816
|
+
for (var u in i)
|
|
817
|
+
e.call(i, u) && (l[u] = i[u]);
|
|
818
818
|
if (t) {
|
|
819
|
-
c = t(
|
|
819
|
+
c = t(i);
|
|
820
820
|
for (var p = 0; p < c.length; p++)
|
|
821
|
-
r.call(
|
|
821
|
+
r.call(i, c[p]) && (l[c[p]] = i[c[p]]);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
return l;
|
|
@@ -844,15 +844,15 @@ function xn() {
|
|
|
844
844
|
if (process.env.NODE_ENV !== "production") {
|
|
845
845
|
var e = /* @__PURE__ */ Ft(), r = {}, n = /* @__PURE__ */ Mr();
|
|
846
846
|
t = function(a) {
|
|
847
|
-
var
|
|
848
|
-
typeof console < "u" && console.error(
|
|
847
|
+
var o = "Warning: " + a;
|
|
848
|
+
typeof console < "u" && console.error(o);
|
|
849
849
|
try {
|
|
850
|
-
throw new Error(
|
|
850
|
+
throw new Error(o);
|
|
851
851
|
} catch {
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
|
-
function s(a,
|
|
855
|
+
function s(a, o, i, l, c) {
|
|
856
856
|
if (process.env.NODE_ENV !== "production") {
|
|
857
857
|
for (var d in a)
|
|
858
858
|
if (n(a, d)) {
|
|
@@ -860,21 +860,21 @@ function xn() {
|
|
|
860
860
|
try {
|
|
861
861
|
if (typeof a[d] != "function") {
|
|
862
862
|
var p = Error(
|
|
863
|
-
(l || "React class") + ": " +
|
|
863
|
+
(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`."
|
|
864
864
|
);
|
|
865
865
|
throw p.name = "Invariant Violation", p;
|
|
866
866
|
}
|
|
867
|
-
u = a[d](
|
|
867
|
+
u = a[d](o, d, l, i, null, e);
|
|
868
868
|
} catch (f) {
|
|
869
869
|
u = f;
|
|
870
870
|
}
|
|
871
871
|
if (u && !(u instanceof Error) && t(
|
|
872
|
-
(l || "React class") + ": type specification of " +
|
|
872
|
+
(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)."
|
|
873
873
|
), u instanceof Error && !(u.message in r)) {
|
|
874
874
|
r[u.message] = !0;
|
|
875
875
|
var y = c ? c() : "";
|
|
876
876
|
t(
|
|
877
|
-
"Failed " +
|
|
877
|
+
"Failed " + i + " type: " + u.message + (y ?? "")
|
|
878
878
|
);
|
|
879
879
|
}
|
|
880
880
|
}
|
|
@@ -890,18 +890,18 @@ function wn() {
|
|
|
890
890
|
lr = 1;
|
|
891
891
|
var t = Fr(), e = vn(), r = /* @__PURE__ */ Ft(), n = /* @__PURE__ */ Mr(), s = /* @__PURE__ */ xn(), a = function() {
|
|
892
892
|
};
|
|
893
|
-
process.env.NODE_ENV !== "production" && (a = function(
|
|
894
|
-
var l = "Warning: " +
|
|
893
|
+
process.env.NODE_ENV !== "production" && (a = function(i) {
|
|
894
|
+
var l = "Warning: " + i;
|
|
895
895
|
typeof console < "u" && console.error(l);
|
|
896
896
|
try {
|
|
897
897
|
throw new Error(l);
|
|
898
898
|
} catch {
|
|
899
899
|
}
|
|
900
900
|
});
|
|
901
|
-
function
|
|
901
|
+
function o() {
|
|
902
902
|
return null;
|
|
903
903
|
}
|
|
904
|
-
return _t = function(
|
|
904
|
+
return _t = function(i, l) {
|
|
905
905
|
var c = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
906
906
|
function u(m) {
|
|
907
907
|
var v = m && (c && m[c] || m[d]);
|
|
@@ -925,7 +925,7 @@ function wn() {
|
|
|
925
925
|
node: D(),
|
|
926
926
|
objectOf: R,
|
|
927
927
|
oneOf: F,
|
|
928
|
-
oneOfType:
|
|
928
|
+
oneOfType: L,
|
|
929
929
|
shape: O,
|
|
930
930
|
exact: A
|
|
931
931
|
};
|
|
@@ -939,7 +939,7 @@ function wn() {
|
|
|
939
939
|
function E(m) {
|
|
940
940
|
if (process.env.NODE_ENV !== "production")
|
|
941
941
|
var v = {}, $ = 0;
|
|
942
|
-
function
|
|
942
|
+
function k(I, U, B, W, X, H, te) {
|
|
943
943
|
if (W = W || p, H = H || B, te !== r) {
|
|
944
944
|
if (l) {
|
|
945
945
|
var T = new Error(
|
|
@@ -956,12 +956,12 @@ function wn() {
|
|
|
956
956
|
}
|
|
957
957
|
return U[B] == null ? I ? U[B] === null ? new x("The " + X + " `" + H + "` is marked as required " + ("in `" + W + "`, but its value is `null`.")) : new x("The " + X + " `" + H + "` is marked as required in " + ("`" + W + "`, but its value is `undefined`.")) : null : m(U, B, W, X, H);
|
|
958
958
|
}
|
|
959
|
-
var _ =
|
|
960
|
-
return _.isRequired =
|
|
959
|
+
var _ = k.bind(null, !1);
|
|
960
|
+
return _.isRequired = k.bind(null, !0), _;
|
|
961
961
|
}
|
|
962
962
|
function w(m) {
|
|
963
|
-
function v($,
|
|
964
|
-
var W = $[
|
|
963
|
+
function v($, k, _, I, U, B) {
|
|
964
|
+
var W = $[k], X = q(W);
|
|
965
965
|
if (X !== m) {
|
|
966
966
|
var H = J(W);
|
|
967
967
|
return new x(
|
|
@@ -974,13 +974,13 @@ function wn() {
|
|
|
974
974
|
return E(v);
|
|
975
975
|
}
|
|
976
976
|
function b() {
|
|
977
|
-
return E(
|
|
977
|
+
return E(o);
|
|
978
978
|
}
|
|
979
979
|
function C(m) {
|
|
980
|
-
function v($,
|
|
980
|
+
function v($, k, _, I, U) {
|
|
981
981
|
if (typeof m != "function")
|
|
982
982
|
return new x("Property `" + U + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
|
|
983
|
-
var B = $[
|
|
983
|
+
var B = $[k];
|
|
984
984
|
if (!Array.isArray(B)) {
|
|
985
985
|
var W = q(B);
|
|
986
986
|
return new x("Invalid " + I + " `" + U + "` of type " + ("`" + W + "` supplied to `" + _ + "`, expected an array."));
|
|
@@ -995,31 +995,31 @@ function wn() {
|
|
|
995
995
|
return E(v);
|
|
996
996
|
}
|
|
997
997
|
function S() {
|
|
998
|
-
function m(v, $,
|
|
998
|
+
function m(v, $, k, _, I) {
|
|
999
999
|
var U = v[$];
|
|
1000
|
-
if (!
|
|
1000
|
+
if (!i(U)) {
|
|
1001
1001
|
var B = q(U);
|
|
1002
|
-
return new x("Invalid " + _ + " `" + I + "` of type " + ("`" + B + "` supplied to `" +
|
|
1002
|
+
return new x("Invalid " + _ + " `" + I + "` of type " + ("`" + B + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1003
1003
|
}
|
|
1004
1004
|
return null;
|
|
1005
1005
|
}
|
|
1006
1006
|
return E(m);
|
|
1007
1007
|
}
|
|
1008
1008
|
function g() {
|
|
1009
|
-
function m(v, $,
|
|
1009
|
+
function m(v, $, k, _, I) {
|
|
1010
1010
|
var U = v[$];
|
|
1011
1011
|
if (!t.isValidElementType(U)) {
|
|
1012
1012
|
var B = q(U);
|
|
1013
|
-
return new x("Invalid " + _ + " `" + I + "` of type " + ("`" + B + "` supplied to `" +
|
|
1013
|
+
return new x("Invalid " + _ + " `" + I + "` of type " + ("`" + B + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1014
1014
|
}
|
|
1015
1015
|
return null;
|
|
1016
1016
|
}
|
|
1017
1017
|
return E(m);
|
|
1018
1018
|
}
|
|
1019
1019
|
function N(m) {
|
|
1020
|
-
function v($,
|
|
1021
|
-
if (!($[
|
|
1022
|
-
var B = m.name || p, W = V($[
|
|
1020
|
+
function v($, k, _, I, U) {
|
|
1021
|
+
if (!($[k] instanceof m)) {
|
|
1022
|
+
var B = m.name || p, W = V($[k]);
|
|
1023
1023
|
return new x("Invalid " + I + " `" + U + "` of type " + ("`" + W + "` supplied to `" + _ + "`, expected ") + ("instance of `" + B + "`."));
|
|
1024
1024
|
}
|
|
1025
1025
|
return null;
|
|
@@ -1030,9 +1030,9 @@ function wn() {
|
|
|
1030
1030
|
if (!Array.isArray(m))
|
|
1031
1031
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
1032
1032
|
"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])."
|
|
1033
|
-
) : a("Invalid argument supplied to oneOf, expected an array.")),
|
|
1034
|
-
function v($,
|
|
1035
|
-
for (var B = $[
|
|
1033
|
+
) : a("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
1034
|
+
function v($, k, _, I, U) {
|
|
1035
|
+
for (var B = $[k], W = 0; W < m.length; W++)
|
|
1036
1036
|
if (f(B, m[W]))
|
|
1037
1037
|
return null;
|
|
1038
1038
|
var X = JSON.stringify(m, function(te, T) {
|
|
@@ -1044,10 +1044,10 @@ function wn() {
|
|
|
1044
1044
|
return E(v);
|
|
1045
1045
|
}
|
|
1046
1046
|
function R(m) {
|
|
1047
|
-
function v($,
|
|
1047
|
+
function v($, k, _, I, U) {
|
|
1048
1048
|
if (typeof m != "function")
|
|
1049
1049
|
return new x("Property `" + U + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
|
|
1050
|
-
var B = $[
|
|
1050
|
+
var B = $[k], W = q(B);
|
|
1051
1051
|
if (W !== "object")
|
|
1052
1052
|
return new x("Invalid " + I + " `" + U + "` of type " + ("`" + W + "` supplied to `" + _ + "`, expected an object."));
|
|
1053
1053
|
for (var X in B)
|
|
@@ -1060,17 +1060,17 @@ function wn() {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
return E(v);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function L(m) {
|
|
1064
1064
|
if (!Array.isArray(m))
|
|
1065
|
-
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
1065
|
+
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
1066
1066
|
for (var v = 0; v < m.length; v++) {
|
|
1067
1067
|
var $ = m[v];
|
|
1068
1068
|
if (typeof $ != "function")
|
|
1069
1069
|
return a(
|
|
1070
1070
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Q($) + " at index " + v + "."
|
|
1071
|
-
),
|
|
1071
|
+
), o;
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function k(_, I, U, B, W) {
|
|
1074
1074
|
for (var X = [], H = 0; H < m.length; H++) {
|
|
1075
1075
|
var te = m[H], T = te(_, I, U, B, W, r);
|
|
1076
1076
|
if (T == null)
|
|
@@ -1080,22 +1080,22 @@ function wn() {
|
|
|
1080
1080
|
var P = X.length > 0 ? ", expected one of type [" + X.join(", ") + "]" : "";
|
|
1081
1081
|
return new x("Invalid " + B + " `" + W + "` supplied to " + ("`" + U + "`" + P + "."));
|
|
1082
1082
|
}
|
|
1083
|
-
return E(
|
|
1083
|
+
return E(k);
|
|
1084
1084
|
}
|
|
1085
1085
|
function D() {
|
|
1086
|
-
function m(v, $,
|
|
1087
|
-
return M(v[$]) ? null : new x("Invalid " + _ + " `" + I + "` supplied to " + ("`" +
|
|
1086
|
+
function m(v, $, k, _, I) {
|
|
1087
|
+
return M(v[$]) ? null : new x("Invalid " + _ + " `" + I + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1088
1088
|
}
|
|
1089
1089
|
return E(m);
|
|
1090
1090
|
}
|
|
1091
|
-
function j(m, v, $,
|
|
1091
|
+
function j(m, v, $, k, _) {
|
|
1092
1092
|
return new x(
|
|
1093
|
-
(m || "React class") + ": " + v + " type `" + $ + "." +
|
|
1093
|
+
(m || "React class") + ": " + v + " type `" + $ + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
|
|
1094
1094
|
);
|
|
1095
1095
|
}
|
|
1096
1096
|
function O(m) {
|
|
1097
|
-
function v($,
|
|
1098
|
-
var B = $[
|
|
1097
|
+
function v($, k, _, I, U) {
|
|
1098
|
+
var B = $[k], W = q(B);
|
|
1099
1099
|
if (W !== "object")
|
|
1100
1100
|
return new x("Invalid " + I + " `" + U + "` of type `" + W + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1101
1101
|
for (var X in m) {
|
|
@@ -1111,18 +1111,18 @@ function wn() {
|
|
|
1111
1111
|
return E(v);
|
|
1112
1112
|
}
|
|
1113
1113
|
function A(m) {
|
|
1114
|
-
function v($,
|
|
1115
|
-
var B = $[
|
|
1114
|
+
function v($, k, _, I, U) {
|
|
1115
|
+
var B = $[k], W = q(B);
|
|
1116
1116
|
if (W !== "object")
|
|
1117
1117
|
return new x("Invalid " + I + " `" + U + "` of type `" + W + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1118
|
-
var X = e({}, $[
|
|
1118
|
+
var X = e({}, $[k], m);
|
|
1119
1119
|
for (var H in X) {
|
|
1120
1120
|
var te = m[H];
|
|
1121
1121
|
if (n(m, H) && typeof te != "function")
|
|
1122
1122
|
return j(_, I, U, H, J(te));
|
|
1123
1123
|
if (!te)
|
|
1124
1124
|
return new x(
|
|
1125
|
-
"Invalid " + I + " `" + U + "` key `" + H + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify($[
|
|
1125
|
+
"Invalid " + I + " `" + U + "` key `" + H + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify($[k], null, " ") + `
|
|
1126
1126
|
Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
1127
1127
|
);
|
|
1128
1128
|
var T = te(B, H, _, I, U + "." + H, r);
|
|
@@ -1144,18 +1144,18 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1144
1144
|
case "object":
|
|
1145
1145
|
if (Array.isArray(m))
|
|
1146
1146
|
return m.every(M);
|
|
1147
|
-
if (m === null ||
|
|
1147
|
+
if (m === null || i(m))
|
|
1148
1148
|
return !0;
|
|
1149
1149
|
var v = u(m);
|
|
1150
1150
|
if (v) {
|
|
1151
|
-
var $ = v.call(m),
|
|
1151
|
+
var $ = v.call(m), k;
|
|
1152
1152
|
if (v !== m.entries) {
|
|
1153
|
-
for (; !(
|
|
1154
|
-
if (!M(
|
|
1153
|
+
for (; !(k = $.next()).done; )
|
|
1154
|
+
if (!M(k.value))
|
|
1155
1155
|
return !1;
|
|
1156
1156
|
} else
|
|
1157
|
-
for (; !(
|
|
1158
|
-
var _ =
|
|
1157
|
+
for (; !(k = $.next()).done; ) {
|
|
1158
|
+
var _ = k.value;
|
|
1159
1159
|
if (_ && !M(_[1]))
|
|
1160
1160
|
return !1;
|
|
1161
1161
|
}
|
|
@@ -1215,7 +1215,7 @@ function Sn() {
|
|
|
1215
1215
|
function r() {
|
|
1216
1216
|
}
|
|
1217
1217
|
return r.resetWarningCache = e, Rt = function() {
|
|
1218
|
-
function n(
|
|
1218
|
+
function n(o, i, l, c, d, u) {
|
|
1219
1219
|
if (u !== t) {
|
|
1220
1220
|
var p = new Error(
|
|
1221
1221
|
"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"
|
|
@@ -1276,13 +1276,13 @@ var le = /* @__PURE__ */ En(), Cn = function(e) {
|
|
|
1276
1276
|
return !1;
|
|
1277
1277
|
}, On = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], rt = "http://www.w3.org/2000/svg", dr = "http://www.w3.org/1999/xlink", Mt = /* @__PURE__ */ function(t) {
|
|
1278
1278
|
function e() {
|
|
1279
|
-
for (var n, s = arguments.length, a = new Array(s),
|
|
1280
|
-
a[
|
|
1279
|
+
for (var n, s = arguments.length, a = new Array(s), o = 0; o < s; o++)
|
|
1280
|
+
a[o] = arguments[o];
|
|
1281
1281
|
return n = t.call.apply(t, [this].concat(a)) || this, n.initialState = {
|
|
1282
1282
|
hasError: !1,
|
|
1283
1283
|
isLoading: !0
|
|
1284
|
-
}, n.state = n.initialState, n._isMounted = !1, n.reactWrapper = void 0, n.nonReactWrapper = void 0, n.refCallback = function(
|
|
1285
|
-
n.reactWrapper =
|
|
1284
|
+
}, n.state = n.initialState, n._isMounted = !1, n.reactWrapper = void 0, n.nonReactWrapper = void 0, n.refCallback = function(i) {
|
|
1285
|
+
n.reactWrapper = i;
|
|
1286
1286
|
}, n;
|
|
1287
1287
|
}
|
|
1288
1288
|
on(e, t);
|
|
@@ -1290,7 +1290,7 @@ var le = /* @__PURE__ */ En(), Cn = function(e) {
|
|
|
1290
1290
|
return r.renderSVG = function() {
|
|
1291
1291
|
var s = this;
|
|
1292
1292
|
if (this.reactWrapper instanceof Cn(this.reactWrapper).Node) {
|
|
1293
|
-
var a = this.props,
|
|
1293
|
+
var a = this.props, o = a.desc, i = a.evalScripts, l = a.httpRequestWithCredentials, c = a.renumerateIRIElements, d = a.src, u = a.title, p = a.useRequestCache, y = this.props.onError, f = this.props.beforeInjection, x = this.props.afterInjection, E = this.props.wrapper, w, b;
|
|
1294
1294
|
E === "svg" ? (w = document.createElementNS(rt, E), w.setAttribute("xmlns", rt), w.setAttribute("xmlns:xlink", dr), b = document.createElementNS(rt, E)) : (w = document.createElement(E), b = document.createElement(E)), w.appendChild(b), b.dataset.src = d, this.nonReactWrapper = this.reactWrapper.appendChild(w);
|
|
1295
1295
|
var C = function(F) {
|
|
1296
1296
|
if (s.removeSVG(), !s._isMounted) {
|
|
@@ -1317,16 +1317,16 @@ var le = /* @__PURE__ */ En(), Cn = function(e) {
|
|
|
1317
1317
|
}, function() {
|
|
1318
1318
|
try {
|
|
1319
1319
|
x(R);
|
|
1320
|
-
} catch (
|
|
1321
|
-
C(
|
|
1320
|
+
} catch (L) {
|
|
1321
|
+
C(L);
|
|
1322
1322
|
}
|
|
1323
1323
|
});
|
|
1324
1324
|
}, g = function(F) {
|
|
1325
|
-
if (F.setAttribute("role", "img"),
|
|
1325
|
+
if (F.setAttribute("role", "img"), o) {
|
|
1326
1326
|
var R = F.querySelector(":scope > desc");
|
|
1327
1327
|
R && F.removeChild(R);
|
|
1328
|
-
var
|
|
1329
|
-
|
|
1328
|
+
var L = document.createElement("desc");
|
|
1329
|
+
L.innerHTML = o, F.prepend(L);
|
|
1330
1330
|
}
|
|
1331
1331
|
if (u) {
|
|
1332
1332
|
var D = F.querySelector(":scope > title");
|
|
@@ -1344,7 +1344,7 @@ var le = /* @__PURE__ */ En(), Cn = function(e) {
|
|
|
1344
1344
|
afterEach: S,
|
|
1345
1345
|
beforeEach: g,
|
|
1346
1346
|
cacheRequests: p,
|
|
1347
|
-
evalScripts:
|
|
1347
|
+
evalScripts: i,
|
|
1348
1348
|
httpRequestWithCredentials: l,
|
|
1349
1349
|
renumerateIRIElements: c
|
|
1350
1350
|
});
|
|
@@ -1368,15 +1368,15 @@ var le = /* @__PURE__ */ En(), Cn = function(e) {
|
|
|
1368
1368
|
s.afterInjection, s.beforeInjection, s.desc, s.evalScripts;
|
|
1369
1369
|
var a = s.fallback;
|
|
1370
1370
|
s.httpRequestWithCredentials;
|
|
1371
|
-
var
|
|
1371
|
+
var o = s.loading;
|
|
1372
1372
|
s.renumerateIRIElements, s.src, s.title, s.useRequestCache;
|
|
1373
|
-
var
|
|
1373
|
+
var i = s.wrapper, l = an(s, On), c = i;
|
|
1374
1374
|
return /* @__PURE__ */ Xe.createElement(c, ut({}, l, {
|
|
1375
1375
|
ref: this.refCallback
|
|
1376
|
-
},
|
|
1376
|
+
}, i === "svg" ? {
|
|
1377
1377
|
xmlns: rt,
|
|
1378
1378
|
xmlnsXlink: dr
|
|
1379
|
-
} : {}), this.state.isLoading &&
|
|
1379
|
+
} : {}), this.state.isLoading && o && /* @__PURE__ */ Xe.createElement(o, null), this.state.hasError && a && /* @__PURE__ */ Xe.createElement(a, null));
|
|
1380
1380
|
}, e;
|
|
1381
1381
|
}(Xe.Component);
|
|
1382
1382
|
Mt.defaultProps = {
|
|
@@ -1428,8 +1428,8 @@ const ba = (t) => {
|
|
|
1428
1428
|
placeholderIcon: n,
|
|
1429
1429
|
color: s,
|
|
1430
1430
|
disabled: a,
|
|
1431
|
-
state:
|
|
1432
|
-
rotated:
|
|
1431
|
+
state: o = "base",
|
|
1432
|
+
rotated: i = !1,
|
|
1433
1433
|
onClick: l,
|
|
1434
1434
|
isInteractable: c = !1,
|
|
1435
1435
|
spin: d = !1,
|
|
@@ -1438,7 +1438,7 @@ const ba = (t) => {
|
|
|
1438
1438
|
}) => {
|
|
1439
1439
|
const [y, f] = Y(!1), x = (D) => D?.toLowerCase().endsWith(".svg") || !D?.includes("/"), E = (D) => D?.startsWith("http") || D?.startsWith("/"), w = {
|
|
1440
1440
|
img: `${c ? "smp-image-interactable" : ""}`,
|
|
1441
|
-
svg: `smp-icon ${
|
|
1441
|
+
svg: `smp-icon ${o ? `smp-icon-${o}` : ""} ${i ? "smp-icon-rotated" : ""} ${c ? "smp-icon-interactable" : ""} ${d ? "smp-icon-spin" : ""}`
|
|
1442
1442
|
}, b = (D) => {
|
|
1443
1443
|
!a && c && l && l(D);
|
|
1444
1444
|
}, C = (D) => {
|
|
@@ -1495,8 +1495,8 @@ const ba = (t) => {
|
|
|
1495
1495
|
icon: n,
|
|
1496
1496
|
placeholderIcon: s,
|
|
1497
1497
|
disabled: a,
|
|
1498
|
-
sizing:
|
|
1499
|
-
variant:
|
|
1498
|
+
sizing: o = "base",
|
|
1499
|
+
variant: i = "primary",
|
|
1500
1500
|
appearance: l = "raised",
|
|
1501
1501
|
showIcon: c = !0,
|
|
1502
1502
|
showText: d = !0,
|
|
@@ -1511,7 +1511,7 @@ const ba = (t) => {
|
|
|
1511
1511
|
buttonExt: C
|
|
1512
1512
|
}) => {
|
|
1513
1513
|
const S = {
|
|
1514
|
-
container: `smp-button smp-button-container ${
|
|
1514
|
+
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} ${E && !d ? "smp-button-squared" : ""} ${b ? "smp-buttonActive" : ""} ${C ? `smp-buttonExt-${C}` : ""}`
|
|
1515
1515
|
};
|
|
1516
1516
|
return /* @__PURE__ */ h.jsx(
|
|
1517
1517
|
"button",
|
|
@@ -1524,16 +1524,16 @@ const ba = (t) => {
|
|
|
1524
1524
|
disabled: a,
|
|
1525
1525
|
"aria-busy": p,
|
|
1526
1526
|
title: f || x,
|
|
1527
|
-
children: p ? /* @__PURE__ */ h.jsx(ce, { icon: "spinner", state: pr(
|
|
1527
|
+
children: p ? /* @__PURE__ */ h.jsx(ce, { icon: "spinner", state: pr(i), spin: !0 }) : /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
1528
1528
|
n && c && /* @__PURE__ */ h.jsx(
|
|
1529
1529
|
ce,
|
|
1530
1530
|
{
|
|
1531
1531
|
icon: n,
|
|
1532
1532
|
placeholderIcon: s,
|
|
1533
1533
|
disabled: a,
|
|
1534
|
-
state: pr(
|
|
1535
|
-
width: fr(
|
|
1536
|
-
height: fr(
|
|
1534
|
+
state: pr(i),
|
|
1535
|
+
width: fr(o),
|
|
1536
|
+
height: fr(o)
|
|
1537
1537
|
}
|
|
1538
1538
|
),
|
|
1539
1539
|
d && /* @__PURE__ */ h.jsx("span", { children: x || t })
|
|
@@ -1545,7 +1545,7 @@ const ba = (t) => {
|
|
|
1545
1545
|
title: "h3",
|
|
1546
1546
|
body: "h6",
|
|
1547
1547
|
label: "label"
|
|
1548
|
-
},
|
|
1548
|
+
}, ke = ({
|
|
1549
1549
|
variant: t = "body",
|
|
1550
1550
|
bindValue: e,
|
|
1551
1551
|
color: r,
|
|
@@ -1586,7 +1586,7 @@ const ba = (t) => {
|
|
|
1586
1586
|
selectedIndex: n,
|
|
1587
1587
|
onTabChange: s
|
|
1588
1588
|
}) => {
|
|
1589
|
-
const [a,
|
|
1589
|
+
const [a, o] = Y(n ?? 0), [i, l] = Y(!1), [c, d] = Y(!1), u = ue(null);
|
|
1590
1590
|
if (ae(() => {
|
|
1591
1591
|
const b = u.current;
|
|
1592
1592
|
if (!b) return;
|
|
@@ -1596,7 +1596,7 @@ const ba = (t) => {
|
|
|
1596
1596
|
b.removeEventListener("scroll", C), window.removeEventListener("resize", x);
|
|
1597
1597
|
};
|
|
1598
1598
|
}, []), ae(() => {
|
|
1599
|
-
n !== void 0 &&
|
|
1599
|
+
n !== void 0 && o(n);
|
|
1600
1600
|
}, [n]), !t.children || t.children.length === 0)
|
|
1601
1601
|
return /* @__PURE__ */ h.jsx("div", { className: "tab-bar-empty", children: "No tabs available" });
|
|
1602
1602
|
const p = {
|
|
@@ -1624,7 +1624,7 @@ const ba = (t) => {
|
|
|
1624
1624
|
role: "tabpanel",
|
|
1625
1625
|
"data-component": "tab-bar",
|
|
1626
1626
|
children: [
|
|
1627
|
-
|
|
1627
|
+
i && /* @__PURE__ */ h.jsx("div", { className: p.scrollButtonLeft, children: /* @__PURE__ */ h.jsx(
|
|
1628
1628
|
fe,
|
|
1629
1629
|
{
|
|
1630
1630
|
bindValue: "",
|
|
@@ -1643,7 +1643,7 @@ const ba = (t) => {
|
|
|
1643
1643
|
"aria-selected": C === a,
|
|
1644
1644
|
tabIndex: C === a ? 0 : -1,
|
|
1645
1645
|
onClick: () => {
|
|
1646
|
-
s?.(C, b),
|
|
1646
|
+
s?.(C, b), o(C);
|
|
1647
1647
|
},
|
|
1648
1648
|
children: [
|
|
1649
1649
|
b.icon && /* @__PURE__ */ h.jsx(
|
|
@@ -1654,7 +1654,7 @@ const ba = (t) => {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
),
|
|
1656
1656
|
/* @__PURE__ */ h.jsx(
|
|
1657
|
-
|
|
1657
|
+
ke,
|
|
1658
1658
|
{
|
|
1659
1659
|
variant: "body",
|
|
1660
1660
|
bindValue: b.decode || "Tab[object Object]"
|
|
@@ -1710,17 +1710,17 @@ const ba = (t) => {
|
|
|
1710
1710
|
ct.Children.forEach(t, (f) => {
|
|
1711
1711
|
ct.isValidElement(f) && (s[f.props.id] = f);
|
|
1712
1712
|
});
|
|
1713
|
-
const a = "--smp-grid-template-cols",
|
|
1713
|
+
const a = "--smp-grid-template-cols", o = "--smp-grid-template-rows", i = Ar(
|
|
1714
1714
|
e.sections ?? [],
|
|
1715
1715
|
Object.keys(s)
|
|
1716
1716
|
), l = (f) => f.reduce((x, E) => {
|
|
1717
1717
|
let w = "", b = {}, C = {}, S = "";
|
|
1718
1718
|
return E.sections?.length ? (w = me["smp-layout-section-grid"], b = l(E.sections), E.gridCols === void 0 && (S = me[E.horizontal ? "smp-grid-template-cols" : "smp-grid-template-rows"], E.horizontal || Kt(E.sections) ? C = zt(
|
|
1719
1719
|
E.sections,
|
|
1720
|
-
E.horizontal ? a :
|
|
1720
|
+
E.horizontal ? a : o
|
|
1721
1721
|
) : C = {
|
|
1722
1722
|
[a]: "auto",
|
|
1723
|
-
[
|
|
1723
|
+
[o]: "auto"
|
|
1724
1724
|
})) : E.content?.length && (E.gridCols !== void 0 && E.gridCols > 0 ? (w = me["smp-layout-section-grid"], S = me["smp-grid-template-cols"], C = {
|
|
1725
1725
|
[a]: `repeat(${E.gridCols}, 1fr)`
|
|
1726
1726
|
}) : w = me["smp-layout-section-flex"]), {
|
|
@@ -1731,11 +1731,11 @@ const ba = (t) => {
|
|
|
1731
1731
|
styles: C
|
|
1732
1732
|
}
|
|
1733
1733
|
};
|
|
1734
|
-
}, {}), c = l(
|
|
1734
|
+
}, {}), c = l(i), d = `${me["smp-layout"]} ${e.horizontal ? me["smp-layout-horizontal"] : me["smp-layout-vertical"]} ${e.inline ? me["smp-layout-inline"] : ""}`;
|
|
1735
1735
|
let u = {};
|
|
1736
1736
|
(e.horizontal || Kt(e.sections || [])) && (u = zt(
|
|
1737
|
-
|
|
1738
|
-
e.horizontal ? a :
|
|
1737
|
+
i,
|
|
1738
|
+
e.horizontal ? a : o
|
|
1739
1739
|
));
|
|
1740
1740
|
const p = (f, x) => {
|
|
1741
1741
|
const E = /* @__PURE__ */ h.jsx(
|
|
@@ -1791,7 +1791,7 @@ const ba = (t) => {
|
|
|
1791
1791
|
{
|
|
1792
1792
|
data: {
|
|
1793
1793
|
type: "SmeupDataTree",
|
|
1794
|
-
children:
|
|
1794
|
+
children: i.map((f) => ({
|
|
1795
1795
|
decode: f.title || f.id || "Tab",
|
|
1796
1796
|
obj: { t: "", p: "", k: "" },
|
|
1797
1797
|
placeholderIcon: "tab",
|
|
@@ -1805,7 +1805,7 @@ const ba = (t) => {
|
|
|
1805
1805
|
toolbar: !1
|
|
1806
1806
|
}
|
|
1807
1807
|
),
|
|
1808
|
-
e.sectionsType ? p(
|
|
1808
|
+
e.sectionsType ? p(i[r], !0) : i.map((f) => p(f))
|
|
1809
1809
|
] });
|
|
1810
1810
|
}, ee = {
|
|
1811
1811
|
AUTOCOMPLETE: "ACP",
|
|
@@ -1870,7 +1870,7 @@ class ft {
|
|
|
1870
1870
|
return this.value ? "true" : "false";
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function Ln(t, e) {
|
|
1874
1874
|
if (Vt(t)) {
|
|
1875
1875
|
const d = new Date(t);
|
|
1876
1876
|
if (!isNaN(d.getTime()))
|
|
@@ -1881,26 +1881,26 @@ function kn(t, e) {
|
|
|
1881
1881
|
/[/-]/.test(t) ? n = t.split(/[/-]/).map((u, p) => p < 2 && u.length === 1 ? "0" + u : u).join("") : n = t.replaceAll("/", "").replaceAll("-", "");
|
|
1882
1882
|
let s = "DDMMYYYY";
|
|
1883
1883
|
e === "en" && (s = "MMDDYYYY");
|
|
1884
|
-
const a = s.indexOf("DD"),
|
|
1885
|
-
let
|
|
1884
|
+
const a = s.indexOf("DD"), o = s.indexOf("MM");
|
|
1885
|
+
let i = 0, l = 0, c = "";
|
|
1886
1886
|
switch (n.length) {
|
|
1887
1887
|
case 1:
|
|
1888
1888
|
case 2:
|
|
1889
|
-
return
|
|
1889
|
+
return i = parseInt(n), r.setDate(i), st(r) ? r : t;
|
|
1890
1890
|
case 3:
|
|
1891
1891
|
case 4:
|
|
1892
|
-
return
|
|
1892
|
+
return i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), o === 0 ? (r.setMonth(i - 1), r.setDate(l)) : a === 0 && (r.setMonth(l - 1), r.setDate(i)), st(r) ? r : t;
|
|
1893
1893
|
case 5:
|
|
1894
1894
|
case 6: {
|
|
1895
|
-
|
|
1895
|
+
i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), Number(n.substring(4)) >= 50 ? c = "19" + n.substring(4) : c = "20" + n.substring(4);
|
|
1896
1896
|
let d = 0, u = 0;
|
|
1897
|
-
return
|
|
1897
|
+
return o === 0 ? (d = l, u = i - 1, r.setFullYear(parseInt(c), u, d)) : a === 0 && (d = i, u = l - 1, r.setFullYear(parseInt(c), u, d)), Lt(i, u, parseInt(c)) && st(r) ? r : t;
|
|
1898
1898
|
}
|
|
1899
1899
|
case 7:
|
|
1900
1900
|
case 8: {
|
|
1901
|
-
|
|
1901
|
+
i = parseInt(n.substring(0, 2)), l = parseInt(n.substring(2, 4)), c = n.substring(4);
|
|
1902
1902
|
let d = 0, u = 0;
|
|
1903
|
-
return
|
|
1903
|
+
return o === 0 ? (d = l, u = i - 1, r.setFullYear(parseInt(c), u, d)) : a === 0 && (d = i, u = l - 1, r.setFullYear(parseInt(c), u, d)), Lt(d, u, parseInt(c)) && st(r) ? r : t;
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
1906
|
return t;
|
|
@@ -1911,12 +1911,12 @@ function Vt(t) {
|
|
|
1911
1911
|
function st(t) {
|
|
1912
1912
|
return t instanceof Date && !isNaN(t.getTime());
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function kn(t) {
|
|
1915
1915
|
if (!/^\d{8}$/.test(t)) return !1;
|
|
1916
1916
|
const e = parseInt(t.slice(0, 4), 10), r = parseInt(t.slice(4, 6), 10), n = parseInt(t.slice(6, 8), 10);
|
|
1917
|
-
return
|
|
1917
|
+
return Lt(n, r - 1, e);
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1919
|
+
function Lt(t, e, r) {
|
|
1920
1920
|
const n = [
|
|
1921
1921
|
31,
|
|
1922
1922
|
// January
|
|
@@ -1981,7 +1981,7 @@ const hr = /* @__PURE__ */ new Map([
|
|
|
1981
1981
|
"D8*YYMD",
|
|
1982
1982
|
{
|
|
1983
1983
|
legacyToIso(t) {
|
|
1984
|
-
return
|
|
1984
|
+
return kn(t) && `${t.substring(0, 4)}-${t.substring(4, 6)}-${t.substring(6, 8)}` || t;
|
|
1985
1985
|
},
|
|
1986
1986
|
isoToLegacy(t) {
|
|
1987
1987
|
return Vt(t) && t.replaceAll("-", "") || t;
|
|
@@ -1993,14 +1993,14 @@ function Be({
|
|
|
1993
1993
|
position: t = "bottom",
|
|
1994
1994
|
enabled: e = !0
|
|
1995
1995
|
}) {
|
|
1996
|
-
const r = ue(null), n = ue(null), [s, a] = Y(0),
|
|
1997
|
-
const
|
|
1998
|
-
if (!
|
|
1999
|
-
const { top: c, left: d, width: u, height: p } =
|
|
1996
|
+
const r = ue(null), n = ue(null), [s, a] = Y(0), o = oe(() => {
|
|
1997
|
+
const i = r.current, l = n.current;
|
|
1998
|
+
if (!i || !l) return;
|
|
1999
|
+
const { top: c, left: d, width: u, height: p } = i.getBoundingClientRect();
|
|
2000
2000
|
a(u);
|
|
2001
2001
|
const y = l.offsetHeight, f = l.offsetWidth;
|
|
2002
2002
|
if (f === 0 || y === 0) {
|
|
2003
|
-
requestAnimationFrame(
|
|
2003
|
+
requestAnimationFrame(o);
|
|
2004
2004
|
return;
|
|
2005
2005
|
}
|
|
2006
2006
|
const x = window.scrollY, E = window.scrollX, w = window.innerWidth, b = window.innerHeight;
|
|
@@ -2051,19 +2051,19 @@ function Be({
|
|
|
2051
2051
|
}, [t]);
|
|
2052
2052
|
return Qr(() => {
|
|
2053
2053
|
if (!e) return;
|
|
2054
|
-
let
|
|
2054
|
+
let i;
|
|
2055
2055
|
const l = () => {
|
|
2056
2056
|
const d = r.current, u = n.current;
|
|
2057
|
-
d && u ?
|
|
2057
|
+
d && u ? o() : i = requestAnimationFrame(l);
|
|
2058
2058
|
};
|
|
2059
|
-
|
|
2059
|
+
i = requestAnimationFrame(l);
|
|
2060
2060
|
const c = new MutationObserver(() => {
|
|
2061
|
-
|
|
2061
|
+
o();
|
|
2062
2062
|
});
|
|
2063
|
-
return n.current && c.observe(n.current, { childList: !0, subtree: !0 }), window.addEventListener("resize",
|
|
2064
|
-
cancelAnimationFrame(
|
|
2063
|
+
return n.current && c.observe(n.current, { childList: !0, subtree: !0 }), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
2064
|
+
cancelAnimationFrame(i), window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0), c.disconnect();
|
|
2065
2065
|
};
|
|
2066
|
-
}, [
|
|
2066
|
+
}, [o, e]), { anchorRef: r, targetRef: n, anchorWidth: s };
|
|
2067
2067
|
}
|
|
2068
2068
|
const Ae = (t, e, r) => {
|
|
2069
2069
|
if (t == "" && (e == "" || e == null))
|
|
@@ -2111,8 +2111,8 @@ const Ae = (t, e, r) => {
|
|
|
2111
2111
|
placeholder: n,
|
|
2112
2112
|
isEditable: s = !0,
|
|
2113
2113
|
shapeIcon: a,
|
|
2114
|
-
sizing:
|
|
2115
|
-
state:
|
|
2114
|
+
sizing: o,
|
|
2115
|
+
state: i,
|
|
2116
2116
|
variant: l,
|
|
2117
2117
|
tooltip: c = !1,
|
|
2118
2118
|
rotatedShapeIcon: d = !1,
|
|
@@ -2130,7 +2130,7 @@ const Ae = (t, e, r) => {
|
|
|
2130
2130
|
min: N,
|
|
2131
2131
|
max: F,
|
|
2132
2132
|
step: R,
|
|
2133
|
-
inputMode:
|
|
2133
|
+
inputMode: L = "text",
|
|
2134
2134
|
width: D,
|
|
2135
2135
|
autocomplete: j,
|
|
2136
2136
|
size: O,
|
|
@@ -2141,13 +2141,13 @@ const Ae = (t, e, r) => {
|
|
|
2141
2141
|
onShapeIconClick: J,
|
|
2142
2142
|
onClick: Q
|
|
2143
2143
|
}) => {
|
|
2144
|
-
const V = De(), m = `${V}-helper`, v = w ? "danger" :
|
|
2144
|
+
const V = De(), m = `${V}-helper`, v = w ? "danger" : i, $ = E || !!w, k = (B) => {
|
|
2145
2145
|
z?.(B.target.value);
|
|
2146
2146
|
}, _ = () => {
|
|
2147
2147
|
e && e != "" && z?.("");
|
|
2148
2148
|
}, I = {
|
|
2149
2149
|
wrapper: `${ye["smp-textfield-wrapper"]} ${S ? ye["smp-textfield-fullWidth"] : ""}`,
|
|
2150
|
-
container: `${ye["smp-textfield"]} ${t ? ye["smp-textfield-disabled"] : ""} ${n ? ye["smp-textfield-placeholder"] : ""} ${
|
|
2150
|
+
container: `${ye["smp-textfield"]} ${t ? ye["smp-textfield-disabled"] : ""} ${n ? ye["smp-textfield-placeholder"] : ""} ${o ? ye[`smp-textfield-${o}`] : ""} ${v ? ye[`smp-textfield-${v}`] : ""} ${b ? ye[`smp-textfield-${b}`] : ""} ${s ? "" : ye["smp-textfield-readOnly"]} ${c ? ye["smp-textfield-top-right-indicator"] : ""}`,
|
|
2151
2151
|
input: `${ye["smp-textfield-input"]}`
|
|
2152
2152
|
};
|
|
2153
2153
|
if (l && (l !== "notSelectable" || s)) {
|
|
@@ -2172,7 +2172,7 @@ const Ae = (t, e, r) => {
|
|
|
2172
2172
|
type: y,
|
|
2173
2173
|
value: e,
|
|
2174
2174
|
placeholder: n,
|
|
2175
|
-
onChange:
|
|
2175
|
+
onChange: k,
|
|
2176
2176
|
onBlur: M,
|
|
2177
2177
|
className: I.input,
|
|
2178
2178
|
disabled: t,
|
|
@@ -2184,7 +2184,7 @@ const Ae = (t, e, r) => {
|
|
|
2184
2184
|
min: N,
|
|
2185
2185
|
max: F,
|
|
2186
2186
|
step: R,
|
|
2187
|
-
inputMode:
|
|
2187
|
+
inputMode: L,
|
|
2188
2188
|
autoComplete: j,
|
|
2189
2189
|
size: O,
|
|
2190
2190
|
maxLength: A,
|
|
@@ -2231,7 +2231,7 @@ function Ur({
|
|
|
2231
2231
|
containerHeight: r,
|
|
2232
2232
|
overscan: n = 5
|
|
2233
2233
|
}) {
|
|
2234
|
-
const [s, a] = Y(0),
|
|
2234
|
+
const [s, a] = Y(0), o = ue(null), i = t.length * e, l = Math.max(0, Math.floor(s / e) - n), c = Math.min(
|
|
2235
2235
|
t.length - 1,
|
|
2236
2236
|
Math.floor((s + r) / e) + n
|
|
2237
2237
|
), d = [];
|
|
@@ -2245,14 +2245,14 @@ function Ur({
|
|
|
2245
2245
|
const f = y.target.scrollTop;
|
|
2246
2246
|
a(f);
|
|
2247
2247
|
}, []), p = (y) => {
|
|
2248
|
-
if (!
|
|
2249
|
-
const f = y * e, x = f + e, E =
|
|
2248
|
+
if (!o.current) return;
|
|
2249
|
+
const f = y * e, x = f + e, E = o.current, w = E.scrollTop, b = w + r;
|
|
2250
2250
|
f < w ? E.scrollTop = f : x > b && (E.scrollTop = x - r);
|
|
2251
2251
|
};
|
|
2252
2252
|
return {
|
|
2253
2253
|
virtualItems: d,
|
|
2254
2254
|
containerProps: {
|
|
2255
|
-
ref:
|
|
2255
|
+
ref: o,
|
|
2256
2256
|
style: {
|
|
2257
2257
|
maxHeight: `${r}px`,
|
|
2258
2258
|
overflowY: "auto",
|
|
@@ -2263,7 +2263,7 @@ function Ur({
|
|
|
2263
2263
|
},
|
|
2264
2264
|
innerProps: {
|
|
2265
2265
|
style: {
|
|
2266
|
-
height: `${
|
|
2266
|
+
height: `${i}px`,
|
|
2267
2267
|
position: "relative",
|
|
2268
2268
|
width: "100%"
|
|
2269
2269
|
}
|
|
@@ -2271,7 +2271,7 @@ function Ur({
|
|
|
2271
2271
|
scrollInfo: {
|
|
2272
2272
|
scrollTop: s,
|
|
2273
2273
|
viewportHeight: r,
|
|
2274
|
-
totalHeight:
|
|
2274
|
+
totalHeight: i,
|
|
2275
2275
|
startIndex: l,
|
|
2276
2276
|
endIndex: c
|
|
2277
2277
|
},
|
|
@@ -2287,12 +2287,12 @@ function Pn(t, e, r = "14px IBM Plex Sans, sans-serif", n = 32) {
|
|
|
2287
2287
|
const a = document.createElement("canvas").getContext("2d");
|
|
2288
2288
|
if (!a) return 200;
|
|
2289
2289
|
a.font = r;
|
|
2290
|
-
let
|
|
2291
|
-
for (const
|
|
2292
|
-
const l = Ae(
|
|
2293
|
-
|
|
2290
|
+
let o = 0;
|
|
2291
|
+
for (const i of t) {
|
|
2292
|
+
const l = Ae(i.id, i.label, e), c = a.measureText(l);
|
|
2293
|
+
o = Math.max(o, c.width);
|
|
2294
2294
|
}
|
|
2295
|
-
return Math.ceil(
|
|
2295
|
+
return Math.ceil(o + n);
|
|
2296
2296
|
}
|
|
2297
2297
|
const Fn = 10, Br = ({
|
|
2298
2298
|
id: t,
|
|
@@ -2302,20 +2302,20 @@ const Fn = 10, Br = ({
|
|
|
2302
2302
|
showFilter: s,
|
|
2303
2303
|
selectedIndex: a = null,
|
|
2304
2304
|
// current outline element
|
|
2305
|
-
activeIndex:
|
|
2305
|
+
activeIndex: o = [],
|
|
2306
2306
|
// active element
|
|
2307
|
-
width:
|
|
2307
|
+
width: i,
|
|
2308
2308
|
onClick: l,
|
|
2309
2309
|
onKeyDown: c,
|
|
2310
2310
|
isOpen: d
|
|
2311
2311
|
}) => {
|
|
2312
2312
|
const [u, p] = Y(""), y = 40, [f, x] = Y(
|
|
2313
2313
|
a !== null ? a : -1
|
|
2314
|
-
), [E, w] = Y(
|
|
2314
|
+
), [E, w] = Y(i || 200), b = ue(null), C = s !== void 0 ? s : e.length > Fn, S = u ? e.filter(
|
|
2315
2315
|
(M) => M.label.toLowerCase().includes(u.toLowerCase())
|
|
2316
2316
|
) : e, g = (M) => {
|
|
2317
2317
|
p(M);
|
|
2318
|
-
}, { virtualItems: N, containerProps: F, innerProps: R, scrollToIndex:
|
|
2318
|
+
}, { virtualItems: N, containerProps: F, innerProps: R, scrollToIndex: L } = Ur({
|
|
2319
2319
|
items: S,
|
|
2320
2320
|
itemHeight: y,
|
|
2321
2321
|
containerHeight: 200,
|
|
@@ -2324,7 +2324,7 @@ const Fn = 10, Br = ({
|
|
|
2324
2324
|
ae(() => {
|
|
2325
2325
|
a !== null && a !== f && x(a);
|
|
2326
2326
|
}, [a]), ae(() => {
|
|
2327
|
-
f >= 0 && f < S.length &&
|
|
2327
|
+
f >= 0 && f < S.length && L(f);
|
|
2328
2328
|
}, [f, S]), ae(() => {
|
|
2329
2329
|
d && b?.current && b.current.focus();
|
|
2330
2330
|
}, [d, b]), ae(() => {
|
|
@@ -2357,7 +2357,7 @@ const Fn = 10, Br = ({
|
|
|
2357
2357
|
"data-component": "list",
|
|
2358
2358
|
style: {
|
|
2359
2359
|
width: E,
|
|
2360
|
-
minWidth:
|
|
2360
|
+
minWidth: i
|
|
2361
2361
|
},
|
|
2362
2362
|
children: [
|
|
2363
2363
|
C && /* @__PURE__ */ h.jsx(
|
|
@@ -2382,7 +2382,7 @@ const Fn = 10, Br = ({
|
|
|
2382
2382
|
onKeyDown: O,
|
|
2383
2383
|
"aria-activedescendant": f >= 0 && f < S.length ? S[f]?.id : void 0,
|
|
2384
2384
|
children: /* @__PURE__ */ h.jsx("div", { ...R, className: A.virtualScroll, children: N.map(({ item: M, index: z, offsetTop: q }) => {
|
|
2385
|
-
const J =
|
|
2385
|
+
const J = o.includes(M.id);
|
|
2386
2386
|
return (
|
|
2387
2387
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
2388
2388
|
/* @__PURE__ */ h.jsxs(
|
|
@@ -2455,10 +2455,10 @@ const bt = (t, e, r) => {
|
|
|
2455
2455
|
ae(() => {
|
|
2456
2456
|
if (!e) return;
|
|
2457
2457
|
const n = (s) => {
|
|
2458
|
-
t?.some((
|
|
2459
|
-
if (typeof
|
|
2460
|
-
const
|
|
2461
|
-
return
|
|
2458
|
+
t?.some((o) => {
|
|
2459
|
+
if (typeof o == "object" && o !== null && "current" in o) {
|
|
2460
|
+
const i = o?.current;
|
|
2461
|
+
return i && i.contains(s.target);
|
|
2462
2462
|
}
|
|
2463
2463
|
}) || r();
|
|
2464
2464
|
};
|
|
@@ -2497,10 +2497,10 @@ const bt = (t, e, r) => {
|
|
|
2497
2497
|
n[s] = r;
|
|
2498
2498
|
return;
|
|
2499
2499
|
}
|
|
2500
|
-
let a = e[e.length - 1],
|
|
2501
|
-
for (;
|
|
2502
|
-
a = `${
|
|
2503
|
-
|
|
2500
|
+
let a = e[e.length - 1], o = e.slice(0, e.length - 1), i = He(t, o, Object);
|
|
2501
|
+
for (; i.obj === void 0 && o.length; )
|
|
2502
|
+
a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), i = He(t, o, Object), i?.obj && typeof i.obj[`${i.k}.${a}`] < "u" && (i.obj = void 0);
|
|
2503
|
+
i.obj[`${i.k}.${a}`] = r;
|
|
2504
2504
|
}, Bn = (t, e, r, n) => {
|
|
2505
2505
|
const {
|
|
2506
2506
|
obj: s,
|
|
@@ -2545,16 +2545,16 @@ class qn {
|
|
|
2545
2545
|
}
|
|
2546
2546
|
const Hn = [" ", ",", "?", "!", ";"], zn = new qn(20), Kn = (t, e, r) => {
|
|
2547
2547
|
e = e || "", r = r || "";
|
|
2548
|
-
const n = Hn.filter((
|
|
2548
|
+
const n = Hn.filter((o) => e.indexOf(o) < 0 && r.indexOf(o) < 0);
|
|
2549
2549
|
if (n.length === 0) return !0;
|
|
2550
|
-
const s = zn.getRegExp(`(${n.map((
|
|
2550
|
+
const s = zn.getRegExp(`(${n.map((o) => o === "?" ? "\\?" : o).join("|")})`);
|
|
2551
2551
|
let a = !s.test(t);
|
|
2552
2552
|
if (!a) {
|
|
2553
|
-
const
|
|
2554
|
-
|
|
2553
|
+
const o = t.indexOf(r);
|
|
2554
|
+
o > 0 && !s.test(t.substring(0, o)) && (a = !0);
|
|
2555
2555
|
}
|
|
2556
2556
|
return a;
|
|
2557
|
-
},
|
|
2557
|
+
}, kt = (t, e, r = ".") => {
|
|
2558
2558
|
if (!t) return;
|
|
2559
2559
|
if (t[e])
|
|
2560
2560
|
return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
|
|
@@ -2563,15 +2563,15 @@ const Hn = [" ", ",", "?", "!", ";"], zn = new qn(20), Kn = (t, e, r) => {
|
|
|
2563
2563
|
for (let a = 0; a < n.length; ) {
|
|
2564
2564
|
if (!s || typeof s != "object")
|
|
2565
2565
|
return;
|
|
2566
|
-
let
|
|
2566
|
+
let o, i = "";
|
|
2567
2567
|
for (let l = a; l < n.length; ++l)
|
|
2568
|
-
if (l !== a && (
|
|
2569
|
-
if (["string", "number", "boolean"].indexOf(typeof
|
|
2568
|
+
if (l !== a && (i += r), i += n[l], o = s[i], o !== void 0) {
|
|
2569
|
+
if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < n.length - 1)
|
|
2570
2570
|
continue;
|
|
2571
2571
|
a += l - a + 1;
|
|
2572
2572
|
break;
|
|
2573
2573
|
}
|
|
2574
|
-
s =
|
|
2574
|
+
s = o;
|
|
2575
2575
|
}
|
|
2576
2576
|
return s;
|
|
2577
2577
|
}, ze = (t) => t?.replace("_", "-"), Jn = {
|
|
@@ -2644,10 +2644,10 @@ class vt {
|
|
|
2644
2644
|
}
|
|
2645
2645
|
emit(e, ...r) {
|
|
2646
2646
|
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([s, a]) => {
|
|
2647
|
-
for (let
|
|
2647
|
+
for (let o = 0; o < a; o++)
|
|
2648
2648
|
s(...r);
|
|
2649
2649
|
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([s, a]) => {
|
|
2650
|
-
for (let
|
|
2650
|
+
for (let o = 0; o < a; o++)
|
|
2651
2651
|
s.apply(s, [e, ...r]);
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
@@ -2667,18 +2667,18 @@ class vr extends vt {
|
|
|
2667
2667
|
r > -1 && this.options.ns.splice(r, 1);
|
|
2668
2668
|
}
|
|
2669
2669
|
getResource(e, r, n, s = {}) {
|
|
2670
|
-
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator,
|
|
2671
|
-
let
|
|
2672
|
-
e.indexOf(".") > -1 ?
|
|
2673
|
-
const l = ht(this.data,
|
|
2674
|
-
return !l && !r && !n && e.indexOf(".") > -1 && (e =
|
|
2670
|
+
const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, o = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
2671
|
+
let i;
|
|
2672
|
+
e.indexOf(".") > -1 ? i = e.split(".") : (i = [e, r], n && (Array.isArray(n) ? i.push(...n) : K(n) && a ? i.push(...n.split(a)) : i.push(n)));
|
|
2673
|
+
const l = ht(this.data, i);
|
|
2674
|
+
return !l && !r && !n && e.indexOf(".") > -1 && (e = i[0], r = i[1], n = i.slice(2).join(".")), l || !o || !K(n) ? l : kt(this.data?.[e]?.[r], n, a);
|
|
2675
2675
|
}
|
|
2676
2676
|
addResource(e, r, n, s, a = {
|
|
2677
2677
|
silent: !1
|
|
2678
2678
|
}) {
|
|
2679
|
-
const
|
|
2680
|
-
let
|
|
2681
|
-
n && (
|
|
2679
|
+
const o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator;
|
|
2680
|
+
let i = [e, r];
|
|
2681
|
+
n && (i = i.concat(o ? n.split(o) : n)), e.indexOf(".") > -1 && (i = e.split("."), s = r, r = i[1]), this.addNamespaces(r), br(this.data, i, s), a.silent || this.emit("added", e, r, n, s);
|
|
2682
2682
|
}
|
|
2683
2683
|
addResources(e, r, n, s = {
|
|
2684
2684
|
silent: !1
|
|
@@ -2689,17 +2689,17 @@ class vr extends vt {
|
|
|
2689
2689
|
});
|
|
2690
2690
|
s.silent || this.emit("added", e, r, n);
|
|
2691
2691
|
}
|
|
2692
|
-
addResourceBundle(e, r, n, s, a,
|
|
2692
|
+
addResourceBundle(e, r, n, s, a, o = {
|
|
2693
2693
|
silent: !1,
|
|
2694
2694
|
skipCopy: !1
|
|
2695
2695
|
}) {
|
|
2696
|
-
let
|
|
2697
|
-
e.indexOf(".") > -1 && (
|
|
2698
|
-
let l = ht(this.data,
|
|
2699
|
-
|
|
2696
|
+
let i = [e, r];
|
|
2697
|
+
e.indexOf(".") > -1 && (i = e.split("."), s = n, n = r, r = i[1]), this.addNamespaces(r);
|
|
2698
|
+
let l = ht(this.data, i) || {};
|
|
2699
|
+
o.skipCopy || (n = JSON.parse(JSON.stringify(n))), s ? Wr(l, n, a) : l = {
|
|
2700
2700
|
...l,
|
|
2701
2701
|
...n
|
|
2702
|
-
}, br(this.data,
|
|
2702
|
+
}, br(this.data, i, l), o.silent || this.emit("added", e, r, n);
|
|
2703
2703
|
}
|
|
2704
2704
|
removeResourceBundle(e, r) {
|
|
2705
2705
|
this.hasResourceBundle(e, r) && delete this.data[e][r], this.removeNamespaces(r), this.emit("removed", e, r);
|
|
@@ -2753,8 +2753,8 @@ class gt extends vt {
|
|
|
2753
2753
|
n === void 0 && (n = ":");
|
|
2754
2754
|
const s = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator;
|
|
2755
2755
|
let a = r.ns || this.options.defaultNS || [];
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2756
|
+
const o = n && e.indexOf(n) > -1, i = !this.options.userDefinedKeySeparator && !r.keySeparator && !this.options.userDefinedNsSeparator && !r.nsSeparator && !Kn(e, n, s);
|
|
2757
|
+
if (o && !i) {
|
|
2758
2758
|
const l = e.match(this.interpolator.nestingRegexp);
|
|
2759
2759
|
if (l && l.length > 0)
|
|
2760
2760
|
return {
|
|
@@ -2777,8 +2777,8 @@ class gt extends vt {
|
|
|
2777
2777
|
...s
|
|
2778
2778
|
}), s || (s = {}), e == null) return "";
|
|
2779
2779
|
Array.isArray(e) || (e = [String(e)]);
|
|
2780
|
-
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails,
|
|
2781
|
-
key:
|
|
2780
|
+
const a = s.returnDetails !== void 0 ? s.returnDetails : this.options.returnDetails, o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, {
|
|
2781
|
+
key: i,
|
|
2782
2782
|
namespaces: l
|
|
2783
2783
|
} = this.extractFromKey(e[e.length - 1], s), c = l[l.length - 1];
|
|
2784
2784
|
let d = s.nsSeparator !== void 0 ? s.nsSeparator : this.options.nsSeparator;
|
|
@@ -2786,27 +2786,27 @@ class gt extends vt {
|
|
|
2786
2786
|
const u = s.lng || this.language, p = s.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2787
2787
|
if (u?.toLowerCase() === "cimode")
|
|
2788
2788
|
return p ? a ? {
|
|
2789
|
-
res: `${c}${d}${
|
|
2790
|
-
usedKey:
|
|
2791
|
-
exactUsedKey:
|
|
2789
|
+
res: `${c}${d}${i}`,
|
|
2790
|
+
usedKey: i,
|
|
2791
|
+
exactUsedKey: i,
|
|
2792
2792
|
usedLng: u,
|
|
2793
2793
|
usedNS: c,
|
|
2794
2794
|
usedParams: this.getUsedParamsDetails(s)
|
|
2795
|
-
} : `${c}${d}${
|
|
2796
|
-
res:
|
|
2797
|
-
usedKey:
|
|
2798
|
-
exactUsedKey:
|
|
2795
|
+
} : `${c}${d}${i}` : a ? {
|
|
2796
|
+
res: i,
|
|
2797
|
+
usedKey: i,
|
|
2798
|
+
exactUsedKey: i,
|
|
2799
2799
|
usedLng: u,
|
|
2800
2800
|
usedNS: c,
|
|
2801
2801
|
usedParams: this.getUsedParamsDetails(s)
|
|
2802
|
-
} :
|
|
2802
|
+
} : i;
|
|
2803
2803
|
const y = this.resolve(e, s);
|
|
2804
2804
|
let f = y?.res;
|
|
2805
|
-
const x = y?.usedKey ||
|
|
2805
|
+
const x = y?.usedKey || i, E = y?.exactUsedKey || i, w = ["[object Number]", "[object Function]", "[object RegExp]"], b = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !K(s.count), g = gt.hasDefaultValue(s), N = S ? this.pluralResolver.getSuffix(u, s.count, s) : "", F = s.ordinal && S ? this.pluralResolver.getSuffix(u, s.count, {
|
|
2806
2806
|
ordinal: !1
|
|
2807
|
-
}) : "", R = S && !s.ordinal && s.count === 0,
|
|
2807
|
+
}) : "", R = S && !s.ordinal && s.count === 0, L = R && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${N}`] || s[`defaultValue${F}`] || s.defaultValue;
|
|
2808
2808
|
let D = f;
|
|
2809
|
-
C && !f && g && (D =
|
|
2809
|
+
C && !f && g && (D = L);
|
|
2810
2810
|
const j = wr(D), O = Object.prototype.toString.apply(D);
|
|
2811
2811
|
if (C && D && j && w.indexOf(O) < 0 && !(K(b) && Array.isArray(D))) {
|
|
2812
2812
|
if (!s.returnObjects && !this.options.returnObjects) {
|
|
@@ -2814,17 +2814,17 @@ class gt extends vt {
|
|
|
2814
2814
|
const A = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(x, D, {
|
|
2815
2815
|
...s,
|
|
2816
2816
|
ns: l
|
|
2817
|
-
}) : `key '${
|
|
2817
|
+
}) : `key '${i} (${this.language})' returned an object instead of string.`;
|
|
2818
2818
|
return a ? (y.res = A, y.usedParams = this.getUsedParamsDetails(s), y) : A;
|
|
2819
2819
|
}
|
|
2820
|
-
if (
|
|
2820
|
+
if (o) {
|
|
2821
2821
|
const A = Array.isArray(D), M = A ? [] : {}, z = A ? E : x;
|
|
2822
2822
|
for (const q in D)
|
|
2823
2823
|
if (Object.prototype.hasOwnProperty.call(D, q)) {
|
|
2824
|
-
const J = `${z}${
|
|
2824
|
+
const J = `${z}${o}${q}`;
|
|
2825
2825
|
g && !f ? M[q] = this.translate(J, {
|
|
2826
2826
|
...s,
|
|
2827
|
-
defaultValue: wr(
|
|
2827
|
+
defaultValue: wr(L) ? L[q] : void 0,
|
|
2828
2828
|
joinArrays: !1,
|
|
2829
2829
|
ns: l
|
|
2830
2830
|
}) : M[q] = this.translate(J, {
|
|
@@ -2839,11 +2839,11 @@ class gt extends vt {
|
|
|
2839
2839
|
f = f.join(b), f && (f = this.extendTranslation(f, e, s, n));
|
|
2840
2840
|
else {
|
|
2841
2841
|
let A = !1, M = !1;
|
|
2842
|
-
!this.isValidLookup(f) && g && (A = !0, f =
|
|
2843
|
-
const q = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : f, J = g &&
|
|
2842
|
+
!this.isValidLookup(f) && g && (A = !0, f = L), this.isValidLookup(f) || (M = !0, f = i);
|
|
2843
|
+
const q = (s.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : f, J = g && L !== f && this.options.updateMissing;
|
|
2844
2844
|
if (M || A || J) {
|
|
2845
|
-
if (this.logger.log(J ? "updateKey" : "missingKey", u, c,
|
|
2846
|
-
const v = this.resolve(
|
|
2845
|
+
if (this.logger.log(J ? "updateKey" : "missingKey", u, c, i, J ? L : f), o) {
|
|
2846
|
+
const v = this.resolve(i, {
|
|
2847
2847
|
...s,
|
|
2848
2848
|
keySeparator: !1
|
|
2849
2849
|
});
|
|
@@ -2855,18 +2855,18 @@ class gt extends vt {
|
|
|
2855
2855
|
for (let v = 0; v < V.length; v++)
|
|
2856
2856
|
Q.push(V[v]);
|
|
2857
2857
|
else this.options.saveMissingTo === "all" ? Q = this.languageUtils.toResolveHierarchy(s.lng || this.language) : Q.push(s.lng || this.language);
|
|
2858
|
-
const m = (v, $,
|
|
2859
|
-
const _ = g &&
|
|
2858
|
+
const m = (v, $, k) => {
|
|
2859
|
+
const _ = g && k !== f ? k : q;
|
|
2860
2860
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(v, c, $, _, J, s) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(v, c, $, _, J, s), this.emit("missingKey", v, c, $, f);
|
|
2861
2861
|
};
|
|
2862
2862
|
this.options.saveMissing && (this.options.saveMissingPlurals && S ? Q.forEach((v) => {
|
|
2863
2863
|
const $ = this.pluralResolver.getSuffixes(v, s);
|
|
2864
|
-
R && s[`defaultValue${this.options.pluralSeparator}zero`] && $.indexOf(`${this.options.pluralSeparator}zero`) < 0 && $.push(`${this.options.pluralSeparator}zero`), $.forEach((
|
|
2865
|
-
m([v],
|
|
2864
|
+
R && s[`defaultValue${this.options.pluralSeparator}zero`] && $.indexOf(`${this.options.pluralSeparator}zero`) < 0 && $.push(`${this.options.pluralSeparator}zero`), $.forEach((k) => {
|
|
2865
|
+
m([v], i + k, s[`defaultValue${k}`] || L);
|
|
2866
2866
|
});
|
|
2867
|
-
}) : m(Q,
|
|
2867
|
+
}) : m(Q, i, L));
|
|
2868
2868
|
}
|
|
2869
|
-
f = this.extendTranslation(f, e, s, y, n), M && f ===
|
|
2869
|
+
f = this.extendTranslation(f, e, s, y, n), M && f === i && this.options.appendNamespaceToMissingKey && (f = `${c}${d}${i}`), (M || A) && this.options.parseMissingKeyHandler && (f = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${d}${i}` : i, A ? f : void 0, s));
|
|
2870
2870
|
}
|
|
2871
2871
|
return a ? (y.res = f, y.usedParams = this.getUsedParamsDetails(s), y) : f;
|
|
2872
2872
|
}
|
|
@@ -2902,8 +2902,8 @@ class gt extends vt {
|
|
|
2902
2902
|
}
|
|
2903
2903
|
!n.lng && s && s.res && (n.lng = this.language || s.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...u) => a?.[0] === u[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${r[0]}`), null) : this.translate(...u, r), n)), n.interpolation && this.interpolator.reset();
|
|
2904
2904
|
}
|
|
2905
|
-
const
|
|
2906
|
-
return e != null &&
|
|
2905
|
+
const o = n.postProcess || this.options.postProcess, i = K(o) ? [o] : o;
|
|
2906
|
+
return e != null && i?.length && n.applyPostProcessor !== !1 && (e = Yr.handle(i, e, r, this.options && this.options.postProcessPassResolved ? {
|
|
2907
2907
|
i18nResolved: {
|
|
2908
2908
|
...s,
|
|
2909
2909
|
usedParams: this.getUsedParamsDetails(n)
|
|
@@ -2912,7 +2912,7 @@ class gt extends vt {
|
|
|
2912
2912
|
} : n, this)), e;
|
|
2913
2913
|
}
|
|
2914
2914
|
resolve(e, r = {}) {
|
|
2915
|
-
let n, s, a,
|
|
2915
|
+
let n, s, a, o, i;
|
|
2916
2916
|
return K(e) && (e = [e]), e.forEach((l) => {
|
|
2917
2917
|
if (this.isValidLookup(n)) return;
|
|
2918
2918
|
const c = this.extractFromKey(l, r), d = c.key;
|
|
@@ -2921,9 +2921,9 @@ class gt extends vt {
|
|
|
2921
2921
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
2922
2922
|
const p = r.count !== void 0 && !K(r.count), y = p && !r.ordinal && r.count === 0, f = r.context !== void 0 && (K(r.context) || typeof r.context == "number") && r.context !== "", x = r.lngs ? r.lngs : this.languageUtils.toResolveHierarchy(r.lng || this.language, r.fallbackLng);
|
|
2923
2923
|
u.forEach((E) => {
|
|
2924
|
-
this.isValidLookup(n) || (
|
|
2924
|
+
this.isValidLookup(n) || (i = E, !xr[`${x[0]}-${E}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(i) && (xr[`${x[0]}-${E}`] = !0, this.logger.warn(`key "${s}" for languages "${x.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!!!")), x.forEach((w) => {
|
|
2925
2925
|
if (this.isValidLookup(n)) return;
|
|
2926
|
-
|
|
2926
|
+
o = w;
|
|
2927
2927
|
const b = [d];
|
|
2928
2928
|
if (this.i18nFormat?.addLookupKeys)
|
|
2929
2929
|
this.i18nFormat.addLookupKeys(b, d, w, E, r);
|
|
@@ -2945,8 +2945,8 @@ class gt extends vt {
|
|
|
2945
2945
|
res: n,
|
|
2946
2946
|
usedKey: s,
|
|
2947
2947
|
exactUsedKey: a,
|
|
2948
|
-
usedLng:
|
|
2949
|
-
usedNS:
|
|
2948
|
+
usedLng: o,
|
|
2949
|
+
usedNS: i
|
|
2950
2950
|
};
|
|
2951
2951
|
}
|
|
2952
2952
|
isValidLookup(e) {
|
|
@@ -3019,10 +3019,10 @@ class Sr {
|
|
|
3019
3019
|
if (this.isSupportedCode(s)) return r = s;
|
|
3020
3020
|
const a = this.getLanguagePartFromCode(n);
|
|
3021
3021
|
if (this.isSupportedCode(a)) return r = a;
|
|
3022
|
-
r = this.options.supportedLngs.find((
|
|
3023
|
-
if (
|
|
3024
|
-
if (!(
|
|
3025
|
-
return
|
|
3022
|
+
r = this.options.supportedLngs.find((o) => {
|
|
3023
|
+
if (o === a) return o;
|
|
3024
|
+
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))
|
|
3025
|
+
return o;
|
|
3026
3026
|
});
|
|
3027
3027
|
}), r || (r = this.getFallbackCodes(this.options.fallbackLng)[0]), r;
|
|
3028
3028
|
}
|
|
@@ -3034,11 +3034,11 @@ class Sr {
|
|
|
3034
3034
|
return n || (n = e[this.getScriptPartFromCode(r)]), n || (n = e[this.formatLanguageCode(r)]), n || (n = e[this.getLanguagePartFromCode(r)]), n || (n = e.default), n || [];
|
|
3035
3035
|
}
|
|
3036
3036
|
toResolveHierarchy(e, r) {
|
|
3037
|
-
const n = this.getFallbackCodes((r === !1 ? [] : r) || this.options.fallbackLng || [], e), s = [], a = (
|
|
3038
|
-
|
|
3037
|
+
const n = this.getFallbackCodes((r === !1 ? [] : r) || this.options.fallbackLng || [], e), s = [], a = (o) => {
|
|
3038
|
+
o && (this.isSupportedCode(o) ? s.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
|
|
3039
3039
|
};
|
|
3040
|
-
return K(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))) : K(e) && a(this.formatLanguageCode(e)), n.forEach((
|
|
3041
|
-
s.indexOf(
|
|
3040
|
+
return K(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))) : K(e) && a(this.formatLanguageCode(e)), n.forEach((o) => {
|
|
3041
|
+
s.indexOf(o) < 0 && a(this.formatLanguageCode(o));
|
|
3042
3042
|
}), s;
|
|
3043
3043
|
}
|
|
3044
3044
|
}
|
|
@@ -3072,9 +3072,9 @@ class Xn {
|
|
|
3072
3072
|
});
|
|
3073
3073
|
if (a in this.pluralRulesCache)
|
|
3074
3074
|
return this.pluralRulesCache[a];
|
|
3075
|
-
let
|
|
3075
|
+
let o;
|
|
3076
3076
|
try {
|
|
3077
|
-
|
|
3077
|
+
o = new Intl.PluralRules(n, {
|
|
3078
3078
|
type: s
|
|
3079
3079
|
});
|
|
3080
3080
|
} catch {
|
|
@@ -3082,9 +3082,9 @@ class Xn {
|
|
|
3082
3082
|
return this.logger.error("No Intl support, please use an Intl polyfill!"), Cr;
|
|
3083
3083
|
if (!e.match(/-|_/)) return Cr;
|
|
3084
3084
|
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
3085
|
-
|
|
3085
|
+
o = this.getRule(l, r);
|
|
3086
3086
|
}
|
|
3087
|
-
return this.pluralRulesCache[a] =
|
|
3087
|
+
return this.pluralRulesCache[a] = o, o;
|
|
3088
3088
|
}
|
|
3089
3089
|
needsPlural(e, r = {}) {
|
|
3090
3090
|
let n = this.getRule(e, r);
|
|
@@ -3104,7 +3104,7 @@ class Xn {
|
|
|
3104
3104
|
}
|
|
3105
3105
|
const Tr = (t, e, r, n = ".", s = !0) => {
|
|
3106
3106
|
let a = Wn(t, e, r);
|
|
3107
|
-
return !a && s && K(r) && (a =
|
|
3107
|
+
return !a && s && K(r) && (a = kt(t, r, n), a === void 0 && (a = kt(e, r, n))), a;
|
|
3108
3108
|
}, Dt = (t) => t.replace(/\$/g, "$$$$");
|
|
3109
3109
|
class Qn {
|
|
3110
3110
|
constructor(e = {}) {
|
|
@@ -3119,8 +3119,8 @@ class Qn {
|
|
|
3119
3119
|
escapeValue: n,
|
|
3120
3120
|
useRawValueToEscape: s,
|
|
3121
3121
|
prefix: a,
|
|
3122
|
-
prefixEscaped:
|
|
3123
|
-
suffix:
|
|
3122
|
+
prefixEscaped: o,
|
|
3123
|
+
suffix: i,
|
|
3124
3124
|
suffixEscaped: l,
|
|
3125
3125
|
formatSeparator: c,
|
|
3126
3126
|
unescapeSuffix: d,
|
|
@@ -3133,7 +3133,7 @@ class Qn {
|
|
|
3133
3133
|
maxReplaces: w,
|
|
3134
3134
|
alwaysFormat: b
|
|
3135
3135
|
} = e.interpolation;
|
|
3136
|
-
this.escape = r !== void 0 ? r : Gn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Pe(a) :
|
|
3136
|
+
this.escape = r !== void 0 ? r : Gn, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? Pe(a) : o || "{{", this.suffix = i ? Pe(i) : l || "}}", this.formatSeparator = c || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = p ? Pe(p) : y || Pe("$t("), this.nestingSuffix = f ? Pe(f) : x || Pe(")"), this.nestingOptionsSeparator = E || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
|
|
3137
3137
|
}
|
|
3138
3138
|
reset() {
|
|
3139
3139
|
this.options && this.init(this.options);
|
|
@@ -3143,7 +3143,7 @@ class Qn {
|
|
|
3143
3143
|
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}`);
|
|
3144
3144
|
}
|
|
3145
3145
|
interpolate(e, r, n, s) {
|
|
3146
|
-
let a,
|
|
3146
|
+
let a, o, i;
|
|
3147
3147
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (y) => {
|
|
3148
3148
|
if (y.indexOf(this.formatSeparator) < 0) {
|
|
3149
3149
|
const w = Tr(r, l, y, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
@@ -3169,53 +3169,53 @@ class Qn {
|
|
|
3169
3169
|
regex: this.regexp,
|
|
3170
3170
|
safeValue: (y) => this.escapeValue ? Dt(this.escape(y)) : Dt(y)
|
|
3171
3171
|
}].forEach((y) => {
|
|
3172
|
-
for (
|
|
3172
|
+
for (i = 0; a = y.regex.exec(e); ) {
|
|
3173
3173
|
const f = a[1].trim();
|
|
3174
|
-
if (
|
|
3174
|
+
if (o = c(f), o === void 0)
|
|
3175
3175
|
if (typeof d == "function") {
|
|
3176
3176
|
const E = d(e, a, s);
|
|
3177
|
-
|
|
3177
|
+
o = K(E) ? E : "";
|
|
3178
3178
|
} else if (s && Object.prototype.hasOwnProperty.call(s, f))
|
|
3179
|
-
|
|
3179
|
+
o = "";
|
|
3180
3180
|
else if (u) {
|
|
3181
|
-
|
|
3181
|
+
o = a[0];
|
|
3182
3182
|
continue;
|
|
3183
3183
|
} else
|
|
3184
|
-
this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`),
|
|
3185
|
-
else !K(
|
|
3186
|
-
const x = y.safeValue(
|
|
3187
|
-
if (e = e.replace(a[0], x), u ? (y.regex.lastIndex +=
|
|
3184
|
+
this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`), o = "";
|
|
3185
|
+
else !K(o) && !this.useRawValueToEscape && (o = mr(o));
|
|
3186
|
+
const x = y.safeValue(o);
|
|
3187
|
+
if (e = e.replace(a[0], x), u ? (y.regex.lastIndex += o.length, y.regex.lastIndex -= a[0].length) : y.regex.lastIndex = 0, i++, i >= this.maxReplaces)
|
|
3188
3188
|
break;
|
|
3189
3189
|
}
|
|
3190
3190
|
}), e;
|
|
3191
3191
|
}
|
|
3192
3192
|
nest(e, r, n = {}) {
|
|
3193
|
-
let s, a,
|
|
3194
|
-
const
|
|
3193
|
+
let s, a, o;
|
|
3194
|
+
const i = (l, c) => {
|
|
3195
3195
|
const d = this.nestingOptionsSeparator;
|
|
3196
3196
|
if (l.indexOf(d) < 0) return l;
|
|
3197
3197
|
const u = l.split(new RegExp(`${d}[ ]*{`));
|
|
3198
3198
|
let p = `{${u[1]}`;
|
|
3199
|
-
l = u[0], p = this.interpolate(p,
|
|
3199
|
+
l = u[0], p = this.interpolate(p, o);
|
|
3200
3200
|
const y = p.match(/'/g), f = p.match(/"/g);
|
|
3201
3201
|
((y?.length ?? 0) % 2 === 0 && !f || f.length % 2 !== 0) && (p = p.replace(/'/g, '"'));
|
|
3202
3202
|
try {
|
|
3203
|
-
|
|
3203
|
+
o = JSON.parse(p), c && (o = {
|
|
3204
3204
|
...c,
|
|
3205
|
-
...
|
|
3205
|
+
...o
|
|
3206
3206
|
});
|
|
3207
3207
|
} catch (x) {
|
|
3208
3208
|
return this.logger.warn(`failed parsing options string in nesting for key ${l}`, x), `${l}${d}${p}`;
|
|
3209
3209
|
}
|
|
3210
|
-
return
|
|
3210
|
+
return o.defaultValue && o.defaultValue.indexOf(this.prefix) > -1 && delete o.defaultValue, l;
|
|
3211
3211
|
};
|
|
3212
3212
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
3213
3213
|
let l = [];
|
|
3214
|
-
|
|
3214
|
+
o = {
|
|
3215
3215
|
...n
|
|
3216
|
-
},
|
|
3216
|
+
}, o = o.replace && !K(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
|
|
3217
3217
|
const c = /{.*}/.test(s[1]) ? s[1].lastIndexOf("}") + 1 : s[1].indexOf(this.formatSeparator);
|
|
3218
|
-
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 = r(
|
|
3218
|
+
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 = r(i.call(this, s[1].trim(), o), o), a && s[0] === e && !K(a)) return a;
|
|
3219
3219
|
K(a) || (a = mr(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, n.lng, {
|
|
3220
3220
|
...n,
|
|
3221
3221
|
interpolationkey: s[1].trim()
|
|
@@ -3231,9 +3231,9 @@ const Zn = (t) => {
|
|
|
3231
3231
|
const n = t.split("(");
|
|
3232
3232
|
e = n[0].toLowerCase().trim();
|
|
3233
3233
|
const s = n[1].substring(0, n[1].length - 1);
|
|
3234
|
-
e === "currency" && s.indexOf(":") < 0 ? r.currency || (r.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? r.range || (r.range = s.trim()) : s.split(";").forEach((
|
|
3235
|
-
if (
|
|
3236
|
-
const [
|
|
3234
|
+
e === "currency" && s.indexOf(":") < 0 ? r.currency || (r.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? r.range || (r.range = s.trim()) : s.split(";").forEach((o) => {
|
|
3235
|
+
if (o) {
|
|
3236
|
+
const [i, ...l] = o.split(":"), c = l.join(":").trim().replace(/^'+|'+$/g, ""), d = i.trim();
|
|
3237
3237
|
r[d] || (r[d] = c), c === "false" && (r[d] = !1), c === "true" && (r[d] = !0), isNaN(c) || (r[d] = parseInt(c, 10));
|
|
3238
3238
|
}
|
|
3239
3239
|
});
|
|
@@ -3250,9 +3250,9 @@ const Zn = (t) => {
|
|
|
3250
3250
|
...a,
|
|
3251
3251
|
[s.interpolationkey]: void 0
|
|
3252
3252
|
});
|
|
3253
|
-
const
|
|
3254
|
-
let
|
|
3255
|
-
return
|
|
3253
|
+
const o = n + JSON.stringify(a);
|
|
3254
|
+
let i = e[o];
|
|
3255
|
+
return i || (i = t(ze(n), s), e[o] = i), i(r);
|
|
3256
3256
|
};
|
|
3257
3257
|
}, es = (t) => (e, r, n) => t(ze(r), n)(e);
|
|
3258
3258
|
class ts {
|
|
@@ -3266,35 +3266,35 @@ class ts {
|
|
|
3266
3266
|
const n = r.cacheInBuiltFormats ? Or : es;
|
|
3267
3267
|
this.formats = {
|
|
3268
3268
|
number: n((s, a) => {
|
|
3269
|
-
const
|
|
3269
|
+
const o = new Intl.NumberFormat(s, {
|
|
3270
3270
|
...a
|
|
3271
3271
|
});
|
|
3272
|
-
return (
|
|
3272
|
+
return (i) => o.format(i);
|
|
3273
3273
|
}),
|
|
3274
3274
|
currency: n((s, a) => {
|
|
3275
|
-
const
|
|
3275
|
+
const o = new Intl.NumberFormat(s, {
|
|
3276
3276
|
...a,
|
|
3277
3277
|
style: "currency"
|
|
3278
3278
|
});
|
|
3279
|
-
return (
|
|
3279
|
+
return (i) => o.format(i);
|
|
3280
3280
|
}),
|
|
3281
3281
|
datetime: n((s, a) => {
|
|
3282
|
-
const
|
|
3282
|
+
const o = new Intl.DateTimeFormat(s, {
|
|
3283
3283
|
...a
|
|
3284
3284
|
});
|
|
3285
|
-
return (
|
|
3285
|
+
return (i) => o.format(i);
|
|
3286
3286
|
}),
|
|
3287
3287
|
relativetime: n((s, a) => {
|
|
3288
|
-
const
|
|
3288
|
+
const o = new Intl.RelativeTimeFormat(s, {
|
|
3289
3289
|
...a
|
|
3290
3290
|
});
|
|
3291
|
-
return (
|
|
3291
|
+
return (i) => o.format(i, a.range || "day");
|
|
3292
3292
|
}),
|
|
3293
3293
|
list: n((s, a) => {
|
|
3294
|
-
const
|
|
3294
|
+
const o = new Intl.ListFormat(s, {
|
|
3295
3295
|
...a
|
|
3296
3296
|
});
|
|
3297
|
-
return (
|
|
3297
|
+
return (i) => o.format(i);
|
|
3298
3298
|
})
|
|
3299
3299
|
};
|
|
3300
3300
|
}
|
|
@@ -3306,20 +3306,20 @@ class ts {
|
|
|
3306
3306
|
}
|
|
3307
3307
|
format(e, r, n, s = {}) {
|
|
3308
3308
|
const a = r.split(this.formatSeparator);
|
|
3309
|
-
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((
|
|
3310
|
-
const
|
|
3311
|
-
a[0] = [a[0], ...a.splice(1,
|
|
3309
|
+
if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((i) => i.indexOf(")") > -1)) {
|
|
3310
|
+
const i = a.findIndex((l) => l.indexOf(")") > -1);
|
|
3311
|
+
a[0] = [a[0], ...a.splice(1, i)].join(this.formatSeparator);
|
|
3312
3312
|
}
|
|
3313
|
-
return a.reduce((
|
|
3313
|
+
return a.reduce((i, l) => {
|
|
3314
3314
|
const {
|
|
3315
3315
|
formatName: c,
|
|
3316
3316
|
formatOptions: d
|
|
3317
3317
|
} = Zn(l);
|
|
3318
3318
|
if (this.formats[c]) {
|
|
3319
|
-
let u =
|
|
3319
|
+
let u = i;
|
|
3320
3320
|
try {
|
|
3321
3321
|
const p = s?.formatParams?.[s.interpolationkey] || {}, y = p.locale || p.lng || s.locale || s.lng || n;
|
|
3322
|
-
u = this.formats[c](
|
|
3322
|
+
u = this.formats[c](i, y, {
|
|
3323
3323
|
...d,
|
|
3324
3324
|
...s,
|
|
3325
3325
|
...p
|
|
@@ -3330,7 +3330,7 @@ class ts {
|
|
|
3330
3330
|
return u;
|
|
3331
3331
|
} else
|
|
3332
3332
|
this.logger.warn(`there was no format function for ${c}`);
|
|
3333
|
-
return
|
|
3333
|
+
return i;
|
|
3334
3334
|
}, e);
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
@@ -3342,44 +3342,44 @@ class ns extends vt {
|
|
|
3342
3342
|
super(), this.backend = e, this.store = r, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = Se.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?.(n, s.backend, s);
|
|
3343
3343
|
}
|
|
3344
3344
|
queueLoad(e, r, n, s) {
|
|
3345
|
-
const a = {},
|
|
3345
|
+
const a = {}, o = {}, i = {}, l = {};
|
|
3346
3346
|
return e.forEach((c) => {
|
|
3347
3347
|
let d = !0;
|
|
3348
3348
|
r.forEach((u) => {
|
|
3349
3349
|
const p = `${c}|${u}`;
|
|
3350
|
-
!n.reload && this.store.hasResourceBundle(c, u) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ?
|
|
3351
|
-
}), d || (
|
|
3352
|
-
}), (Object.keys(a).length || Object.keys(
|
|
3353
|
-
pending:
|
|
3354
|
-
pendingCount: Object.keys(
|
|
3350
|
+
!n.reload && this.store.hasResourceBundle(c, u) ? this.state[p] = 2 : this.state[p] < 0 || (this.state[p] === 1 ? o[p] === void 0 && (o[p] = !0) : (this.state[p] = 1, d = !1, o[p] === void 0 && (o[p] = !0), a[p] === void 0 && (a[p] = !0), l[u] === void 0 && (l[u] = !0)));
|
|
3351
|
+
}), d || (i[c] = !0);
|
|
3352
|
+
}), (Object.keys(a).length || Object.keys(o).length) && this.queue.push({
|
|
3353
|
+
pending: o,
|
|
3354
|
+
pendingCount: Object.keys(o).length,
|
|
3355
3355
|
loaded: {},
|
|
3356
3356
|
errors: [],
|
|
3357
3357
|
callback: s
|
|
3358
3358
|
}), {
|
|
3359
3359
|
toLoad: Object.keys(a),
|
|
3360
|
-
pending: Object.keys(
|
|
3361
|
-
toLoadLanguages: Object.keys(
|
|
3360
|
+
pending: Object.keys(o),
|
|
3361
|
+
toLoadLanguages: Object.keys(i),
|
|
3362
3362
|
toLoadNamespaces: Object.keys(l)
|
|
3363
3363
|
};
|
|
3364
3364
|
}
|
|
3365
3365
|
loaded(e, r, n) {
|
|
3366
|
-
const s = e.split("|"), a = s[0],
|
|
3367
|
-
r && this.emit("failedLoading", a,
|
|
3366
|
+
const s = e.split("|"), a = s[0], o = s[1];
|
|
3367
|
+
r && this.emit("failedLoading", a, o, r), !r && n && this.store.addResourceBundle(a, o, n, void 0, void 0, {
|
|
3368
3368
|
skipCopy: !0
|
|
3369
3369
|
}), this.state[e] = r ? -1 : 2, r && n && (this.state[e] = 0);
|
|
3370
|
-
const
|
|
3370
|
+
const i = {};
|
|
3371
3371
|
this.queue.forEach((l) => {
|
|
3372
|
-
Bn(l.loaded, [a],
|
|
3373
|
-
|
|
3372
|
+
Bn(l.loaded, [a], o), rs(l, e), r && l.errors.push(r), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((c) => {
|
|
3373
|
+
i[c] || (i[c] = {});
|
|
3374
3374
|
const d = l.loaded[c];
|
|
3375
3375
|
d.length && d.forEach((u) => {
|
|
3376
|
-
|
|
3376
|
+
i[c][u] === void 0 && (i[c][u] = !0);
|
|
3377
3377
|
});
|
|
3378
3378
|
}), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
|
|
3379
|
-
}), this.emit("loaded",
|
|
3379
|
+
}), this.emit("loaded", i), this.queue = this.queue.filter((l) => !l.done);
|
|
3380
3380
|
}
|
|
3381
|
-
read(e, r, n, s = 0, a = this.retryTimeout,
|
|
3382
|
-
if (!e.length) return
|
|
3381
|
+
read(e, r, n, s = 0, a = this.retryTimeout, o) {
|
|
3382
|
+
if (!e.length) return o(null, {});
|
|
3383
3383
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
3384
3384
|
this.waitingReads.push({
|
|
3385
3385
|
lng: e,
|
|
@@ -3387,34 +3387,34 @@ class ns extends vt {
|
|
|
3387
3387
|
fcName: n,
|
|
3388
3388
|
tried: s,
|
|
3389
3389
|
wait: a,
|
|
3390
|
-
callback:
|
|
3390
|
+
callback: o
|
|
3391
3391
|
});
|
|
3392
3392
|
return;
|
|
3393
3393
|
}
|
|
3394
3394
|
this.readingCalls++;
|
|
3395
|
-
const
|
|
3395
|
+
const i = (c, d) => {
|
|
3396
3396
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
3397
3397
|
const u = this.waitingReads.shift();
|
|
3398
3398
|
this.read(u.lng, u.ns, u.fcName, u.tried, u.wait, u.callback);
|
|
3399
3399
|
}
|
|
3400
3400
|
if (c && d && s < this.maxRetries) {
|
|
3401
3401
|
setTimeout(() => {
|
|
3402
|
-
this.read.call(this, e, r, n, s + 1, a * 2,
|
|
3402
|
+
this.read.call(this, e, r, n, s + 1, a * 2, o);
|
|
3403
3403
|
}, a);
|
|
3404
3404
|
return;
|
|
3405
3405
|
}
|
|
3406
|
-
|
|
3406
|
+
o(c, d);
|
|
3407
3407
|
}, l = this.backend[n].bind(this.backend);
|
|
3408
3408
|
if (l.length === 2) {
|
|
3409
3409
|
try {
|
|
3410
3410
|
const c = l(e, r);
|
|
3411
|
-
c && typeof c.then == "function" ? c.then((d) =>
|
|
3411
|
+
c && typeof c.then == "function" ? c.then((d) => i(null, d)).catch(i) : i(null, c);
|
|
3412
3412
|
} catch (c) {
|
|
3413
|
-
|
|
3413
|
+
i(c);
|
|
3414
3414
|
}
|
|
3415
3415
|
return;
|
|
3416
3416
|
}
|
|
3417
|
-
return l(e, r,
|
|
3417
|
+
return l(e, r, i);
|
|
3418
3418
|
}
|
|
3419
3419
|
prepareLoading(e, r, n = {}, s) {
|
|
3420
3420
|
if (!this.backend)
|
|
@@ -3423,8 +3423,8 @@ class ns extends vt {
|
|
|
3423
3423
|
const a = this.queueLoad(e, r, n, s);
|
|
3424
3424
|
if (!a.toLoad.length)
|
|
3425
3425
|
return a.pending.length || s(), null;
|
|
3426
|
-
a.toLoad.forEach((
|
|
3427
|
-
this.loadOne(
|
|
3426
|
+
a.toLoad.forEach((o) => {
|
|
3427
|
+
this.loadOne(o);
|
|
3428
3428
|
});
|
|
3429
3429
|
}
|
|
3430
3430
|
load(e, r, n) {
|
|
@@ -3437,11 +3437,11 @@ class ns extends vt {
|
|
|
3437
3437
|
}
|
|
3438
3438
|
loadOne(e, r = "") {
|
|
3439
3439
|
const n = e.split("|"), s = n[0], a = n[1];
|
|
3440
|
-
this.read(s, a, "read", void 0, void 0, (
|
|
3441
|
-
|
|
3440
|
+
this.read(s, a, "read", void 0, void 0, (o, i) => {
|
|
3441
|
+
o && this.logger.warn(`${r}loading namespace ${a} for language ${s} failed`, o), !o && i && this.logger.log(`${r}loaded namespace ${a} for language ${s}`, i), this.loaded(e, o, i);
|
|
3442
3442
|
});
|
|
3443
3443
|
}
|
|
3444
|
-
saveMissing(e, r, n, s, a,
|
|
3444
|
+
saveMissing(e, r, n, s, a, o = {}, i = () => {
|
|
3445
3445
|
}) {
|
|
3446
3446
|
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(r)) {
|
|
3447
3447
|
this.logger.warn(`did not save key "${n}" as the namespace "${r}" 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!!!");
|
|
@@ -3450,18 +3450,18 @@ class ns extends vt {
|
|
|
3450
3450
|
if (!(n == null || n === "")) {
|
|
3451
3451
|
if (this.backend?.create) {
|
|
3452
3452
|
const l = {
|
|
3453
|
-
...
|
|
3453
|
+
...o,
|
|
3454
3454
|
isUpdate: a
|
|
3455
3455
|
}, c = this.backend.create.bind(this.backend);
|
|
3456
3456
|
if (c.length < 6)
|
|
3457
3457
|
try {
|
|
3458
3458
|
let d;
|
|
3459
|
-
c.length === 5 ? d = c(e, r, n, s, l) : d = c(e, r, n, s), d && typeof d.then == "function" ? d.then((u) =>
|
|
3459
|
+
c.length === 5 ? d = c(e, r, n, s, l) : d = c(e, r, n, s), d && typeof d.then == "function" ? d.then((u) => i(null, u)).catch(i) : i(null, d);
|
|
3460
3460
|
} catch (d) {
|
|
3461
|
-
|
|
3461
|
+
i(d);
|
|
3462
3462
|
}
|
|
3463
3463
|
else
|
|
3464
|
-
c(e, r, n, s,
|
|
3464
|
+
c(e, r, n, s, i, l);
|
|
3465
3465
|
}
|
|
3466
3466
|
!e || !e[0] || this.store.addResource(e[0], r, n, s);
|
|
3467
3467
|
}
|
|
@@ -3583,28 +3583,28 @@ class Ke extends vt {
|
|
|
3583
3583
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
3584
3584
|
this[c] = (...d) => (this.store[c](...d), this);
|
|
3585
3585
|
});
|
|
3586
|
-
const
|
|
3586
|
+
const i = qe(), l = () => {
|
|
3587
3587
|
const c = (d, u) => {
|
|
3588
|
-
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),
|
|
3588
|
+
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), r(d, u);
|
|
3589
3589
|
};
|
|
3590
3590
|
if (this.languages && !this.isInitialized) return c(null, this.t.bind(this));
|
|
3591
3591
|
this.changeLanguage(this.options.lng, c);
|
|
3592
3592
|
};
|
|
3593
|
-
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0),
|
|
3593
|
+
return this.options.resources || !this.options.initAsync ? l() : setTimeout(l, 0), i;
|
|
3594
3594
|
}
|
|
3595
3595
|
loadResources(e, r = ot) {
|
|
3596
3596
|
let n = r;
|
|
3597
3597
|
const s = K(e) ? e : this.language;
|
|
3598
3598
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
3599
3599
|
if (s?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
3600
|
-
const a = [],
|
|
3601
|
-
if (!
|
|
3602
|
-
this.services.languageUtils.toResolveHierarchy(
|
|
3600
|
+
const a = [], o = (i) => {
|
|
3601
|
+
if (!i || i === "cimode") return;
|
|
3602
|
+
this.services.languageUtils.toResolveHierarchy(i).forEach((c) => {
|
|
3603
3603
|
c !== "cimode" && a.indexOf(c) < 0 && a.push(c);
|
|
3604
3604
|
});
|
|
3605
3605
|
};
|
|
3606
|
-
s ?
|
|
3607
|
-
!
|
|
3606
|
+
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) => {
|
|
3607
|
+
!i && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(i);
|
|
3608
3608
|
});
|
|
3609
3609
|
} else
|
|
3610
3610
|
n(null);
|
|
@@ -3636,24 +3636,24 @@ class Ke extends vt {
|
|
|
3636
3636
|
this.isLanguageChangingTo = e;
|
|
3637
3637
|
const n = qe();
|
|
3638
3638
|
this.emit("languageChanging", e);
|
|
3639
|
-
const s = (
|
|
3640
|
-
this.language =
|
|
3641
|
-
}, a = (
|
|
3642
|
-
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, n.resolve((...c) => this.t(...c)), r && r(
|
|
3643
|
-
},
|
|
3644
|
-
!e && !
|
|
3645
|
-
const l = K(
|
|
3639
|
+
const s = (i) => {
|
|
3640
|
+
this.language = i, this.languages = this.services.languageUtils.toResolveHierarchy(i), this.resolvedLanguage = void 0, this.setResolvedLanguage(i);
|
|
3641
|
+
}, a = (i, l) => {
|
|
3642
|
+
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, n.resolve((...c) => this.t(...c)), r && r(i, (...c) => this.t(...c));
|
|
3643
|
+
}, o = (i) => {
|
|
3644
|
+
!e && !i && this.services.languageDetector && (i = []);
|
|
3645
|
+
const l = K(i) ? i : i && i[0], c = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes(K(i) ? [i] : i);
|
|
3646
3646
|
c && (this.language || s(c), this.translator.language || this.translator.changeLanguage(c), this.services.languageDetector?.cacheUserLanguage?.(c)), this.loadResources(c, (d) => {
|
|
3647
3647
|
a(d, c);
|
|
3648
3648
|
});
|
|
3649
3649
|
};
|
|
3650
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
3650
|
+
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), n;
|
|
3651
3651
|
}
|
|
3652
3652
|
getFixedT(e, r, n) {
|
|
3653
|
-
const s = (a,
|
|
3653
|
+
const s = (a, o, ...i) => {
|
|
3654
3654
|
let l;
|
|
3655
|
-
typeof
|
|
3656
|
-
...
|
|
3655
|
+
typeof o != "object" ? l = this.options.overloadTranslationOptionHandler([a, o].concat(i)) : l = {
|
|
3656
|
+
...o
|
|
3657
3657
|
}, l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || n || s.keyPrefix);
|
|
3658
3658
|
const c = this.options.keySeparator || ".";
|
|
3659
3659
|
let d;
|
|
@@ -3677,15 +3677,15 @@ class Ke extends vt {
|
|
|
3677
3677
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
3678
3678
|
const n = r.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
|
|
3679
3679
|
if (n.toLowerCase() === "cimode") return !0;
|
|
3680
|
-
const
|
|
3681
|
-
const c = this.services.backendConnector.state[`${
|
|
3680
|
+
const o = (i, l) => {
|
|
3681
|
+
const c = this.services.backendConnector.state[`${i}|${l}`];
|
|
3682
3682
|
return c === -1 || c === 0 || c === 2;
|
|
3683
3683
|
};
|
|
3684
3684
|
if (r.precheck) {
|
|
3685
|
-
const
|
|
3686
|
-
if (
|
|
3685
|
+
const i = r.precheck(this, o);
|
|
3686
|
+
if (i !== void 0) return i;
|
|
3687
3687
|
}
|
|
3688
|
-
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages ||
|
|
3688
|
+
return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(n, e) && (!s || o(a, e)));
|
|
3689
3689
|
}
|
|
3690
3690
|
loadNamespaces(e, r) {
|
|
3691
3691
|
const n = qe();
|
|
@@ -3698,9 +3698,9 @@ class Ke extends vt {
|
|
|
3698
3698
|
loadLanguages(e, r) {
|
|
3699
3699
|
const n = qe();
|
|
3700
3700
|
K(e) && (e = [e]);
|
|
3701
|
-
const s = this.options.preload || [], a = e.filter((
|
|
3702
|
-
return a.length ? (this.options.preload = s.concat(a), this.loadResources((
|
|
3703
|
-
n.resolve(), r && r(
|
|
3701
|
+
const s = this.options.preload || [], a = e.filter((o) => s.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o));
|
|
3702
|
+
return a.length ? (this.options.preload = s.concat(a), this.loadResources((o) => {
|
|
3703
|
+
n.resolve(), r && r(o);
|
|
3704
3704
|
}), n) : (r && r(), Promise.resolve());
|
|
3705
3705
|
}
|
|
3706
3706
|
dir(e) {
|
|
@@ -3726,22 +3726,22 @@ class Ke extends vt {
|
|
|
3726
3726
|
...e,
|
|
3727
3727
|
isClone: !0
|
|
3728
3728
|
}, a = new Ke(s);
|
|
3729
|
-
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((
|
|
3730
|
-
a[
|
|
3729
|
+
if ((e.debug !== void 0 || e.prefix !== void 0) && (a.logger = a.logger.clone(e)), ["store", "services", "language"].forEach((i) => {
|
|
3730
|
+
a[i] = this[i];
|
|
3731
3731
|
}), a.services = {
|
|
3732
3732
|
...this.services
|
|
3733
3733
|
}, a.services.utils = {
|
|
3734
3734
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3735
3735
|
}, n) {
|
|
3736
|
-
const
|
|
3736
|
+
const i = Object.keys(this.store.data).reduce((l, c) => (l[c] = {
|
|
3737
3737
|
...this.store.data[c]
|
|
3738
3738
|
}, l[c] = Object.keys(l[c]).reduce((d, u) => (d[u] = {
|
|
3739
3739
|
...l[c][u]
|
|
3740
3740
|
}, d), l[c]), l), {});
|
|
3741
|
-
a.store = new vr(
|
|
3741
|
+
a.store = new vr(i, s), a.services.resourceStore = a.store;
|
|
3742
3742
|
}
|
|
3743
|
-
return a.translator = new gt(a.services, s), a.translator.on("*", (
|
|
3744
|
-
a.emit(
|
|
3743
|
+
return a.translator = new gt(a.services, s), a.translator.on("*", (i, ...l) => {
|
|
3744
|
+
a.emit(i, ...l);
|
|
3745
3745
|
}), a.init(s, r), a.translator.options = s, a.translator.backendConnector.services.utils = {
|
|
3746
3746
|
hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
|
|
3747
3747
|
}, a;
|
|
@@ -3795,18 +3795,18 @@ const gs = (t, e, r) => {
|
|
|
3795
3795
|
let n = t;
|
|
3796
3796
|
return isNaN(n) || (e != null && (n = Math.max(n, e)), r != null && (n = Math.min(n, r))), n;
|
|
3797
3797
|
}, ys = (t, e) => {
|
|
3798
|
-
const n = Intl.NumberFormat(t).formatToParts(1000.1), s = n.find((
|
|
3798
|
+
const n = Intl.NumberFormat(t).formatToParts(1000.1), s = n.find((o) => o.type === "group")?.value ?? ",", a = e ?? n.find((o) => o.type === "decimal")?.value ?? ".";
|
|
3799
3799
|
return { groupingChar: s, decimalChar: a };
|
|
3800
3800
|
};
|
|
3801
3801
|
function bs(t, e, r, n) {
|
|
3802
3802
|
let s = e;
|
|
3803
3803
|
const a = ws(t, r);
|
|
3804
3804
|
if (!s) {
|
|
3805
|
-
const
|
|
3806
|
-
|
|
3805
|
+
const i = Math.abs(a);
|
|
3806
|
+
i - Math.floor(i) ? s = "0,0.00" : s = "0,0";
|
|
3807
3807
|
}
|
|
3808
|
-
const
|
|
3809
|
-
return new Intl.NumberFormat(n,
|
|
3808
|
+
const o = Ss(s);
|
|
3809
|
+
return new Intl.NumberFormat(n, o).format(a);
|
|
3810
3810
|
}
|
|
3811
3811
|
const vs = (t, e, r) => {
|
|
3812
3812
|
const n = t.lastIndexOf(r);
|
|
@@ -3816,26 +3816,26 @@ const vs = (t, e, r) => {
|
|
|
3816
3816
|
}, xs = (t, e, r) => {
|
|
3817
3817
|
if (!t) return NaN;
|
|
3818
3818
|
let n = t.replace(/\s/g, ""), s = r;
|
|
3819
|
-
const a = (n.match(/\./g) || []).length,
|
|
3820
|
-
if (a &&
|
|
3819
|
+
const a = (n.match(/\./g) || []).length, o = (n.match(/,/g) || []).length;
|
|
3820
|
+
if (a && o)
|
|
3821
3821
|
s = n.lastIndexOf(".") > n.lastIndexOf(",") ? "." : ",";
|
|
3822
3822
|
else if (!n.includes(r)) {
|
|
3823
|
-
const l = n.includes(".") ? "." : ",", c = l === "." ? a :
|
|
3823
|
+
const l = n.includes(".") ? "." : ",", c = l === "." ? a : o;
|
|
3824
3824
|
c > 1 || c === 1 && l === e && n.length - n.lastIndexOf(l) - 1 === 3 || (s = l);
|
|
3825
3825
|
}
|
|
3826
|
-
const
|
|
3827
|
-
return n = n.replace(new RegExp(`\\${
|
|
3826
|
+
const i = s === "." ? "," : ".";
|
|
3827
|
+
return n = n.replace(new RegExp(`\\${i}`, "g"), ""), s !== "." && (n = n.replace(new RegExp(`\\${s}`, "g"), ".")), parseFloat(n);
|
|
3828
3828
|
};
|
|
3829
3829
|
function ws(t, e, r, n, s) {
|
|
3830
3830
|
let a = t;
|
|
3831
3831
|
if (typeof a != "number") {
|
|
3832
|
-
let
|
|
3833
|
-
e && n === void 0 ?
|
|
3834
|
-
const l =
|
|
3835
|
-
a = a.replace(Dr(l, "g"), ""), a = a.replace(Dr(
|
|
3832
|
+
let i;
|
|
3833
|
+
e && n === void 0 ? i = "," : i = ".";
|
|
3834
|
+
const l = i == "." ? "," : ".";
|
|
3835
|
+
a = a.replace(Dr(l, "g"), ""), a = a.replace(Dr(i, "g"), "."), a = Number(a);
|
|
3836
3836
|
}
|
|
3837
|
-
const
|
|
3838
|
-
return isNaN(
|
|
3837
|
+
const o = Number(a);
|
|
3838
|
+
return isNaN(o) ? NaN : o;
|
|
3839
3839
|
}
|
|
3840
3840
|
function Ss(t) {
|
|
3841
3841
|
const e = {};
|
|
@@ -3887,7 +3887,7 @@ ie.init({
|
|
|
3887
3887
|
const Es = (t, e, r, n) => ie.format(t, e, r || ie.language, n), Cs = (t, e) => ie.t(t, e);
|
|
3888
3888
|
function Ee() {
|
|
3889
3889
|
const t = oe(
|
|
3890
|
-
(n, s, a,
|
|
3890
|
+
(n, s, a, o) => Es(n, s, a || void 0, o),
|
|
3891
3891
|
[]
|
|
3892
3892
|
), e = oe(() => ie.languages[0], []), r = oe(
|
|
3893
3893
|
(n, s) => Cs(n, s),
|
|
@@ -3903,8 +3903,8 @@ const Gr = ({
|
|
|
3903
3903
|
displayMode: n,
|
|
3904
3904
|
listDisplayMode: s = "Both",
|
|
3905
3905
|
isClearable: a = !1,
|
|
3906
|
-
minimumChars:
|
|
3907
|
-
isEditable:
|
|
3906
|
+
minimumChars: o = 3,
|
|
3907
|
+
isEditable: i = !0,
|
|
3908
3908
|
fun: l,
|
|
3909
3909
|
_changeOnEnter: c = !1,
|
|
3910
3910
|
onChange: d,
|
|
@@ -3913,7 +3913,7 @@ const Gr = ({
|
|
|
3913
3913
|
_multiActiveIndex: y,
|
|
3914
3914
|
...f
|
|
3915
3915
|
}) => {
|
|
3916
|
-
const x = ue(null), [E, w] = Y(t), [b, C] = Y(e), { translate: S } = Ee(), [g, N] = Y(!1), [F, R] = Y(r || []), [
|
|
3916
|
+
const x = ue(null), [E, w] = Y(t), [b, C] = Y(e), { translate: S } = Ee(), [g, N] = Y(!1), [F, R] = Y(r || []), [L, D] = Y(0), [j, O] = Y([t]), { anchorRef: A, targetRef: M, anchorWidth: z } = Be({
|
|
3917
3917
|
position: "bottom",
|
|
3918
3918
|
enabled: g
|
|
3919
3919
|
}), q = oe(() => {
|
|
@@ -3921,7 +3921,7 @@ const Gr = ({
|
|
|
3921
3921
|
}, []);
|
|
3922
3922
|
bt([M], g, () => q());
|
|
3923
3923
|
const J = Mn(400), Q = (_) => {
|
|
3924
|
-
_.length >=
|
|
3924
|
+
_.length >= o ? V(_) : q(), w(_), C(e), c || d?.(_, e);
|
|
3925
3925
|
}, V = (_) => {
|
|
3926
3926
|
J(async () => {
|
|
3927
3927
|
if (l && u) {
|
|
@@ -3937,14 +3937,14 @@ const Gr = ({
|
|
|
3937
3937
|
D(I), O([_.id]), q();
|
|
3938
3938
|
}, $ = (_) => {
|
|
3939
3939
|
_.key === "Escape" && (q(), D(-1));
|
|
3940
|
-
},
|
|
3940
|
+
}, k = (_) => {
|
|
3941
3941
|
if ((_.key === "ArrowDown" || _.key === "ArrowUp") && (_.preventDefault(), g)) {
|
|
3942
|
-
const I = _.key === "ArrowDown" ? (
|
|
3942
|
+
const I = _.key === "ArrowDown" ? (L + 1) % F.length : (L - 1 + F.length) % F.length;
|
|
3943
3943
|
D(I);
|
|
3944
3944
|
}
|
|
3945
3945
|
switch (_.key) {
|
|
3946
3946
|
case "Enter":
|
|
3947
|
-
|
|
3947
|
+
L >= 0 && L < F.length ? v(F[L]) : c && (d?.(E, ""), q(), w(""), C(""));
|
|
3948
3948
|
break;
|
|
3949
3949
|
case "Escape":
|
|
3950
3950
|
q(), D(-1);
|
|
@@ -3959,7 +3959,7 @@ const Gr = ({
|
|
|
3959
3959
|
bindValue: E,
|
|
3960
3960
|
optionalDisplayValue: b,
|
|
3961
3961
|
displayMode: n,
|
|
3962
|
-
isEditable:
|
|
3962
|
+
isEditable: i,
|
|
3963
3963
|
shapeIcon: "magnify",
|
|
3964
3964
|
placeholder: S(
|
|
3965
3965
|
Re.AUTOCOMPLETE_DEFAULT_PLACEHOLDER
|
|
@@ -3968,7 +3968,7 @@ const Gr = ({
|
|
|
3968
3968
|
isClearable: a,
|
|
3969
3969
|
inputRef: x,
|
|
3970
3970
|
onChange: Q,
|
|
3971
|
-
onKeyDown:
|
|
3971
|
+
onKeyDown: k,
|
|
3972
3972
|
onBlur: m,
|
|
3973
3973
|
onShapeIconClick: () => V(E),
|
|
3974
3974
|
"aria-autocomplete": "list"
|
|
@@ -3981,7 +3981,7 @@ const Gr = ({
|
|
|
3981
3981
|
displayMode: s,
|
|
3982
3982
|
onClick: v,
|
|
3983
3983
|
ref: M,
|
|
3984
|
-
selectedIndex:
|
|
3984
|
+
selectedIndex: L,
|
|
3985
3985
|
activeIndex: y || j,
|
|
3986
3986
|
width: z,
|
|
3987
3987
|
showFilter: !1,
|
|
@@ -3997,8 +3997,8 @@ const Gr = ({
|
|
|
3997
3997
|
disposition: n = "start",
|
|
3998
3998
|
sizing: s,
|
|
3999
3999
|
variant: a,
|
|
4000
|
-
appearance:
|
|
4001
|
-
showText:
|
|
4000
|
+
appearance: o,
|
|
4001
|
+
showText: i,
|
|
4002
4002
|
showIcon: l,
|
|
4003
4003
|
fullWidth: c,
|
|
4004
4004
|
disabled: d,
|
|
@@ -4025,8 +4025,8 @@ const Gr = ({
|
|
|
4025
4025
|
fun: C.fun,
|
|
4026
4026
|
icon: C.icon,
|
|
4027
4027
|
variant: a,
|
|
4028
|
-
appearance:
|
|
4029
|
-
showText:
|
|
4028
|
+
appearance: o,
|
|
4029
|
+
showText: i,
|
|
4030
4030
|
showIcon: l,
|
|
4031
4031
|
fullWidth: c,
|
|
4032
4032
|
disabled: d,
|
|
@@ -4049,8 +4049,8 @@ const Gr = ({
|
|
|
4049
4049
|
label: n,
|
|
4050
4050
|
isEditable: s = !0,
|
|
4051
4051
|
onChange: a,
|
|
4052
|
-
onBlur:
|
|
4053
|
-
variant:
|
|
4052
|
+
onBlur: o,
|
|
4053
|
+
variant: i = "checkbox"
|
|
4054
4054
|
}) => {
|
|
4055
4055
|
const l = De(), c = (u) => {
|
|
4056
4056
|
s && a && a(u.target.checked);
|
|
@@ -4066,8 +4066,8 @@ const Gr = ({
|
|
|
4066
4066
|
type: "checkbox",
|
|
4067
4067
|
checked: t,
|
|
4068
4068
|
onChange: c,
|
|
4069
|
-
onBlur:
|
|
4070
|
-
role:
|
|
4069
|
+
onBlur: o,
|
|
4070
|
+
role: i === "switch" ? "switch" : "checkbox",
|
|
4071
4071
|
id: l
|
|
4072
4072
|
}
|
|
4073
4073
|
)
|
|
@@ -4079,9 +4079,9 @@ const Gr = ({
|
|
|
4079
4079
|
onChange: n,
|
|
4080
4080
|
color: s,
|
|
4081
4081
|
backgroundColor: a,
|
|
4082
|
-
isDraggable:
|
|
4082
|
+
isDraggable: o = !1
|
|
4083
4083
|
}) => {
|
|
4084
|
-
const [
|
|
4084
|
+
const [i, l] = Y(null), c = {
|
|
4085
4085
|
container: `${["smp-chips-container"]}`,
|
|
4086
4086
|
element: "smp-chips-element"
|
|
4087
4087
|
}, d = (y) => {
|
|
@@ -4089,8 +4089,8 @@ const Gr = ({
|
|
|
4089
4089
|
}, u = (y) => {
|
|
4090
4090
|
l(y);
|
|
4091
4091
|
}, p = (y) => {
|
|
4092
|
-
if (
|
|
4093
|
-
const f = [...t], [x] = f.splice(
|
|
4092
|
+
if (i === null || i === y) return;
|
|
4093
|
+
const f = [...t], [x] = f.splice(i, 1);
|
|
4094
4094
|
f.splice(y, 0, x), n?.(f), l(null);
|
|
4095
4095
|
};
|
|
4096
4096
|
return /* @__PURE__ */ h.jsx("div", { className: c.container, role: "list", "data-component": "chip", children: t.flatMap((y, f) => {
|
|
@@ -4103,16 +4103,16 @@ const Gr = ({
|
|
|
4103
4103
|
{
|
|
4104
4104
|
className: c.element,
|
|
4105
4105
|
role: "listitem",
|
|
4106
|
-
draggable:
|
|
4106
|
+
draggable: o,
|
|
4107
4107
|
onDragStart: () => u(f),
|
|
4108
|
-
onDragOver: (b) =>
|
|
4109
|
-
onDrop: () =>
|
|
4108
|
+
onDragOver: (b) => o && b.preventDefault(),
|
|
4109
|
+
onDrop: () => o && p(f),
|
|
4110
4110
|
style: {
|
|
4111
4111
|
"--smp-chips-backgroundColor-base": a
|
|
4112
4112
|
},
|
|
4113
4113
|
children: [
|
|
4114
|
-
|
|
4115
|
-
/* @__PURE__ */ h.jsx(
|
|
4114
|
+
o && /* @__PURE__ */ h.jsx(ce, { icon: "drag_indicator_horizontal", isInteractable: !0 }),
|
|
4115
|
+
/* @__PURE__ */ h.jsx(ke, { variant: "label", bindValue: x, color: s }),
|
|
4116
4116
|
e && /* @__PURE__ */ h.jsx(
|
|
4117
4117
|
ce,
|
|
4118
4118
|
{
|
|
@@ -4125,7 +4125,7 @@ const Gr = ({
|
|
|
4125
4125
|
]
|
|
4126
4126
|
},
|
|
4127
4127
|
`chip-${f}`
|
|
4128
|
-
), w =
|
|
4128
|
+
), w = o && f < t.length - 1 ? /* @__PURE__ */ h.jsx(
|
|
4129
4129
|
ce,
|
|
4130
4130
|
{
|
|
4131
4131
|
icon: "chevron-right",
|
|
@@ -4152,23 +4152,23 @@ function Yt(t, e) {
|
|
|
4152
4152
|
const c = s();
|
|
4153
4153
|
c.length > 0 && requestAnimationFrame(() => c[0].focus());
|
|
4154
4154
|
})();
|
|
4155
|
-
const
|
|
4155
|
+
const o = (c) => {
|
|
4156
4156
|
if (c.key === "Escape" || c.key !== "Tab") return;
|
|
4157
4157
|
const d = s();
|
|
4158
4158
|
if (d.length === 0) return;
|
|
4159
4159
|
const u = d[0], p = d[d.length - 1];
|
|
4160
4160
|
c.shiftKey && document.activeElement === u ? (c.preventDefault(), p.focus()) : !c.shiftKey && document.activeElement === p && (c.preventDefault(), u.focus());
|
|
4161
|
-
},
|
|
4161
|
+
}, i = (c) => {
|
|
4162
4162
|
if (n && !n.contains(c.target)) {
|
|
4163
4163
|
c.preventDefault();
|
|
4164
4164
|
const d = s();
|
|
4165
4165
|
d.length > 0 && d[0].focus();
|
|
4166
4166
|
}
|
|
4167
4167
|
};
|
|
4168
|
-
document.addEventListener("keydown",
|
|
4168
|
+
document.addEventListener("keydown", o), document.addEventListener("mousedown", i);
|
|
4169
4169
|
const l = document.body.style.overflow;
|
|
4170
4170
|
return document.body.style.overflow = "hidden", () => {
|
|
4171
|
-
document.removeEventListener("keydown",
|
|
4171
|
+
document.removeEventListener("keydown", o), document.removeEventListener("mousedown", i), document.body.style.overflow = l, r.current && requestAnimationFrame(() => {
|
|
4172
4172
|
r.current?.focus();
|
|
4173
4173
|
});
|
|
4174
4174
|
};
|
|
@@ -4181,8 +4181,8 @@ const It = ({
|
|
|
4181
4181
|
optionalDisplayValue: n,
|
|
4182
4182
|
isEditable: s,
|
|
4183
4183
|
displayMode: a,
|
|
4184
|
-
listDisplayMode:
|
|
4185
|
-
fun:
|
|
4184
|
+
listDisplayMode: o = "Both",
|
|
4185
|
+
fun: i,
|
|
4186
4186
|
onOptionsRequest: l,
|
|
4187
4187
|
multiActiveIndex: c,
|
|
4188
4188
|
...d
|
|
@@ -4194,7 +4194,7 @@ const It = ({
|
|
|
4194
4194
|
y(!1), u?.current?.focus();
|
|
4195
4195
|
}, []);
|
|
4196
4196
|
bt([N, g], p, () => R()), Yt(p, N);
|
|
4197
|
-
const
|
|
4197
|
+
const L = (A) => {
|
|
4198
4198
|
e?.(A.id, A.label);
|
|
4199
4199
|
const M = f.findIndex((z) => z.id === A.id);
|
|
4200
4200
|
w(M), C([A.id]), R();
|
|
@@ -4203,7 +4203,7 @@ const It = ({
|
|
|
4203
4203
|
}, j = (A) => {
|
|
4204
4204
|
(A.key === "ArrowDown" || A.key === "ArrowUp") && (A.preventDefault(), O());
|
|
4205
4205
|
}, O = () => {
|
|
4206
|
-
s && (
|
|
4206
|
+
s && (i && l ? p ? y(!1) : l(i, void 0).then((A) => {
|
|
4207
4207
|
x(A), w(A.length > 0 ? 0 : -1), y(!0);
|
|
4208
4208
|
}) : y((A) => !A));
|
|
4209
4209
|
};
|
|
@@ -4240,13 +4240,13 @@ const It = ({
|
|
|
4240
4240
|
{
|
|
4241
4241
|
id: S,
|
|
4242
4242
|
options: f,
|
|
4243
|
-
displayMode:
|
|
4243
|
+
displayMode: o,
|
|
4244
4244
|
ref: N,
|
|
4245
4245
|
isOpen: p,
|
|
4246
4246
|
selectedIndex: E,
|
|
4247
4247
|
activeIndex: c || b,
|
|
4248
4248
|
width: F,
|
|
4249
|
-
onClick:
|
|
4249
|
+
onClick: L,
|
|
4250
4250
|
onKeyDown: D
|
|
4251
4251
|
}
|
|
4252
4252
|
) })
|
|
@@ -4263,12 +4263,12 @@ function Rs({
|
|
|
4263
4263
|
initialValue: n,
|
|
4264
4264
|
targetRef: s
|
|
4265
4265
|
}) {
|
|
4266
|
-
const { translate: a } = Ee(),
|
|
4266
|
+
const { translate: a } = Ee(), o = () => {
|
|
4267
4267
|
if (!n) return;
|
|
4268
4268
|
const V = new Date(n);
|
|
4269
4269
|
return isNaN(V.getTime()) ? void 0 : V;
|
|
4270
|
-
}, [
|
|
4271
|
-
t ||
|
|
4270
|
+
}, [i] = Y(/* @__PURE__ */ new Date()), [l, c] = Y(
|
|
4271
|
+
t || o() || /* @__PURE__ */ new Date()
|
|
4272
4272
|
), [d, u] = Y(
|
|
4273
4273
|
l ? l.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
4274
4274
|
), [p, y] = Y(
|
|
@@ -4318,15 +4318,15 @@ function Rs({
|
|
|
4318
4318
|
full: a(pe.SATURDAY)
|
|
4319
4319
|
}
|
|
4320
4320
|
], S = (V) => r.some((m) => {
|
|
4321
|
-
const v = m.start.getTime(), $ = m.end.getTime(),
|
|
4322
|
-
return
|
|
4321
|
+
const v = m.start.getTime(), $ = m.end.getTime(), k = V.getTime();
|
|
4322
|
+
return k >= v && k <= $;
|
|
4323
4323
|
}), g = (V) => {
|
|
4324
4324
|
S(V) || (c(V), x(V.getDate()), e && e(In(V)));
|
|
4325
4325
|
}, N = () => {
|
|
4326
4326
|
d === 0 ? (u(11), y(p - 1)) : u(d - 1), x(1);
|
|
4327
4327
|
}, F = () => {
|
|
4328
4328
|
d === 11 ? (u(0), y(p + 1)) : u(d + 1), x(1);
|
|
4329
|
-
}, R = (V, m) => new Date(V, m + 1, 0).getDate(),
|
|
4329
|
+
}, R = (V, m) => new Date(V, m + 1, 0).getDate(), L = (V, m) => new Date(V, m, 1).getDay(), D = (V) => {
|
|
4330
4330
|
const m = M.findIndex(
|
|
4331
4331
|
(v) => v !== null && v.getDate() === V
|
|
4332
4332
|
);
|
|
@@ -4334,12 +4334,12 @@ function Rs({
|
|
|
4334
4334
|
}, j = (V, m) => {
|
|
4335
4335
|
const v = M[m];
|
|
4336
4336
|
if (!v) return;
|
|
4337
|
-
const $ = R(p, d),
|
|
4337
|
+
const $ = R(p, d), k = v.getDate();
|
|
4338
4338
|
switch (V.key) {
|
|
4339
4339
|
case "ArrowRight":
|
|
4340
4340
|
V.preventDefault();
|
|
4341
4341
|
{
|
|
4342
|
-
let _ =
|
|
4342
|
+
let _ = k + 1, I = new Date(p, d, _);
|
|
4343
4343
|
if (_ > $) {
|
|
4344
4344
|
const U = d === 11 ? p + 1 : p, B = d === 11 ? 0 : d + 1;
|
|
4345
4345
|
_ = 1, I = new Date(U, B, _), F(), setTimeout(() => {
|
|
@@ -4355,7 +4355,7 @@ function Rs({
|
|
|
4355
4355
|
case "ArrowLeft":
|
|
4356
4356
|
V.preventDefault();
|
|
4357
4357
|
{
|
|
4358
|
-
let _ =
|
|
4358
|
+
let _ = k - 1, I = new Date(p, d, _);
|
|
4359
4359
|
if (_ < 1) {
|
|
4360
4360
|
const U = d === 0 ? p - 1 : p, B = d === 0 ? 11 : d - 1, W = R(U, B);
|
|
4361
4361
|
_ = W, I = new Date(U, B, _), N(), setTimeout(() => {
|
|
@@ -4369,7 +4369,7 @@ function Rs({
|
|
|
4369
4369
|
case "ArrowUp":
|
|
4370
4370
|
V.preventDefault();
|
|
4371
4371
|
{
|
|
4372
|
-
let _ =
|
|
4372
|
+
let _ = k - 7, I = new Date(p, d, _);
|
|
4373
4373
|
if (_ < 1) {
|
|
4374
4374
|
const U = d === 0 ? p - 1 : p, B = d === 0 ? 11 : d - 1;
|
|
4375
4375
|
_ = R(U, B) + _, I = new Date(U, B, _), N(), setTimeout(() => {
|
|
@@ -4383,7 +4383,7 @@ function Rs({
|
|
|
4383
4383
|
case "ArrowDown":
|
|
4384
4384
|
V.preventDefault();
|
|
4385
4385
|
{
|
|
4386
|
-
let _ =
|
|
4386
|
+
let _ = k + 7, I = new Date(p, d, _);
|
|
4387
4387
|
if (_ > $) {
|
|
4388
4388
|
const U = d === 11 ? p + 1 : p, B = d === 11 ? 0 : d + 1;
|
|
4389
4389
|
_ = _ - $, I = new Date(U, B, _), F(), setTimeout(() => {
|
|
@@ -4405,7 +4405,7 @@ function Rs({
|
|
|
4405
4405
|
const _ = R(
|
|
4406
4406
|
d === 0 ? p - 1 : p,
|
|
4407
4407
|
d === 0 ? 11 : d - 1
|
|
4408
|
-
), I = Math.min(
|
|
4408
|
+
), I = Math.min(k, _);
|
|
4409
4409
|
O(I, "forward");
|
|
4410
4410
|
}, 0);
|
|
4411
4411
|
break;
|
|
@@ -4414,7 +4414,7 @@ function Rs({
|
|
|
4414
4414
|
const _ = R(
|
|
4415
4415
|
d === 11 ? p + 1 : p,
|
|
4416
4416
|
d === 11 ? 0 : d + 1
|
|
4417
|
-
), I = Math.min(
|
|
4417
|
+
), I = Math.min(k, _);
|
|
4418
4418
|
O(I, "forward");
|
|
4419
4419
|
}, 0);
|
|
4420
4420
|
break;
|
|
@@ -4431,8 +4431,8 @@ function Rs({
|
|
|
4431
4431
|
const v = R(p, d);
|
|
4432
4432
|
if (m === "forward") {
|
|
4433
4433
|
for (let $ = V; $ <= v; $++) {
|
|
4434
|
-
const
|
|
4435
|
-
if (!S(
|
|
4434
|
+
const k = new Date(p, d, $);
|
|
4435
|
+
if (!S(k)) {
|
|
4436
4436
|
D($);
|
|
4437
4437
|
return;
|
|
4438
4438
|
}
|
|
@@ -4448,18 +4448,18 @@ function Rs({
|
|
|
4448
4448
|
return;
|
|
4449
4449
|
}
|
|
4450
4450
|
}
|
|
4451
|
-
const $ = d === 0 ? p - 1 : p,
|
|
4451
|
+
const $ = d === 0 ? p - 1 : p, k = d === 0 ? 11 : d - 1, _ = R($, k);
|
|
4452
4452
|
N(), setTimeout(() => {
|
|
4453
4453
|
O(_, "backward");
|
|
4454
4454
|
}, 0);
|
|
4455
4455
|
}
|
|
4456
4456
|
}, M = (() => {
|
|
4457
|
-
const V = R(p, d), m =
|
|
4457
|
+
const V = R(p, d), m = L(p, d), v = [];
|
|
4458
4458
|
for (let $ = 0; $ < m; $++)
|
|
4459
4459
|
v.push(null);
|
|
4460
4460
|
for (let $ = 1; $ <= V; $++) {
|
|
4461
|
-
const
|
|
4462
|
-
v.push(
|
|
4461
|
+
const k = new Date(p, d, $);
|
|
4462
|
+
v.push(k);
|
|
4463
4463
|
}
|
|
4464
4464
|
return v;
|
|
4465
4465
|
})(), z = [];
|
|
@@ -4562,7 +4562,7 @@ function Rs({
|
|
|
4562
4562
|
V.value
|
|
4563
4563
|
)) }) }),
|
|
4564
4564
|
/* @__PURE__ */ h.jsx("tbody", { children: z.map((V, m) => /* @__PURE__ */ h.jsx("tr", { children: V.map((v, $) => {
|
|
4565
|
-
const
|
|
4565
|
+
const k = m * 7 + $;
|
|
4566
4566
|
if (v === null)
|
|
4567
4567
|
return /* @__PURE__ */ h.jsx(
|
|
4568
4568
|
"td",
|
|
@@ -4576,7 +4576,7 @@ function Rs({
|
|
|
4576
4576
|
},
|
|
4577
4577
|
`empty-${$}`
|
|
4578
4578
|
);
|
|
4579
|
-
const _ = v.getDate() ===
|
|
4579
|
+
const _ = v.getDate() === i.getDate() && v.getMonth() === i.getMonth() && v.getFullYear() === i.getFullYear(), I = l && v.getDate() === l.getDate() && v.getMonth() === l.getMonth() && v.getFullYear() === l.getFullYear(), U = f === v.getDate(), B = S(v);
|
|
4580
4580
|
return /* @__PURE__ */ h.jsx(
|
|
4581
4581
|
"td",
|
|
4582
4582
|
{
|
|
@@ -4584,12 +4584,12 @@ function Rs({
|
|
|
4584
4584
|
"aria-selected": I,
|
|
4585
4585
|
tabIndex: U ? 0 : -1,
|
|
4586
4586
|
onClick: () => g(v),
|
|
4587
|
-
onKeyDown: (W) => j(W,
|
|
4587
|
+
onKeyDown: (W) => j(W, k),
|
|
4588
4588
|
"aria-label": `${v.getDate()} ${b[v.getMonth()]} ${v.getFullYear()}`,
|
|
4589
4589
|
"data-selected": I,
|
|
4590
4590
|
"aria-disabled": B,
|
|
4591
4591
|
ref: (W) => {
|
|
4592
|
-
w.current[
|
|
4592
|
+
w.current[k] = W;
|
|
4593
4593
|
},
|
|
4594
4594
|
className: J.td(
|
|
4595
4595
|
_,
|
|
@@ -4617,18 +4617,18 @@ const qr = ({
|
|
|
4617
4617
|
isEditable: s = !0,
|
|
4618
4618
|
...a
|
|
4619
4619
|
}) => {
|
|
4620
|
-
const
|
|
4620
|
+
const o = ue(null), [i, l] = Y(!1), [c, d] = Y(t || ""), [u, p] = Y(""), { anchorRef: y, targetRef: f } = Be({
|
|
4621
4621
|
position: "bottom",
|
|
4622
|
-
enabled:
|
|
4622
|
+
enabled: i
|
|
4623
4623
|
}), x = oe(() => {
|
|
4624
|
-
l(!1),
|
|
4624
|
+
l(!1), o?.current?.focus();
|
|
4625
4625
|
}, []);
|
|
4626
|
-
bt([f, y],
|
|
4626
|
+
bt([f, y], i, () => {
|
|
4627
4627
|
x();
|
|
4628
|
-
}), Yt(
|
|
4628
|
+
}), Yt(i, f);
|
|
4629
4629
|
const { format: E, getCurrentLanguage: w } = Ee(), b = oe(
|
|
4630
|
-
(
|
|
4631
|
-
const D =
|
|
4630
|
+
(L) => {
|
|
4631
|
+
const D = L.length > 5 && Ln(L, w()) || L, j = E(D, void 0, void 0, {
|
|
4632
4632
|
type: "date"
|
|
4633
4633
|
}), O = typeof D != "string", A = O && D.toISOString().substring(0, 10) || "";
|
|
4634
4634
|
return {
|
|
@@ -4641,20 +4641,20 @@ const qr = ({
|
|
|
4641
4641
|
[w, E]
|
|
4642
4642
|
);
|
|
4643
4643
|
ae(() => {
|
|
4644
|
-
const { formattedDate:
|
|
4645
|
-
d(j && D || t), p(j &&
|
|
4644
|
+
const { formattedDate: L, isoDate: D, isValid: j } = b(t);
|
|
4645
|
+
d(j && D || t), p(j && L || t);
|
|
4646
4646
|
}, [t, E, b]);
|
|
4647
|
-
const C = () => l((
|
|
4647
|
+
const C = () => l((L) => !L), S = () => {
|
|
4648
4648
|
N(u);
|
|
4649
|
-
}, g = (
|
|
4650
|
-
N(
|
|
4651
|
-
}, N = (
|
|
4652
|
-
const { isoDate: D, isValid: j } = b(
|
|
4653
|
-
r && r(j && D ||
|
|
4654
|
-
}, F = (
|
|
4655
|
-
p(
|
|
4656
|
-
}, R = (
|
|
4657
|
-
|
|
4649
|
+
}, g = (L) => {
|
|
4650
|
+
N(L), x();
|
|
4651
|
+
}, N = (L) => {
|
|
4652
|
+
const { isoDate: D, isValid: j } = b(L);
|
|
4653
|
+
r && r(j && D || L);
|
|
4654
|
+
}, F = (L) => {
|
|
4655
|
+
p(L);
|
|
4656
|
+
}, R = (L) => {
|
|
4657
|
+
L.key === "Enter" && (L.preventDefault(), N(u));
|
|
4658
4658
|
};
|
|
4659
4659
|
return /* @__PURE__ */ h.jsxs("div", { "data-component": "date-picker", children: [
|
|
4660
4660
|
/* @__PURE__ */ h.jsx(
|
|
@@ -4669,13 +4669,13 @@ const qr = ({
|
|
|
4669
4669
|
shapeIcon: "calendar",
|
|
4670
4670
|
onShapeIconClick: C,
|
|
4671
4671
|
ref: y,
|
|
4672
|
-
inputRef:
|
|
4672
|
+
inputRef: o,
|
|
4673
4673
|
isEditable: s,
|
|
4674
4674
|
size: 10,
|
|
4675
4675
|
maxLength: a.maxLength ? a.maxLength : 10
|
|
4676
4676
|
}
|
|
4677
4677
|
),
|
|
4678
|
-
|
|
4678
|
+
i && /* @__PURE__ */ h.jsx(We, { children: /* @__PURE__ */ h.jsx(
|
|
4679
4679
|
Rs,
|
|
4680
4680
|
{
|
|
4681
4681
|
disabledDateRanges: n,
|
|
@@ -4692,8 +4692,8 @@ const qr = ({
|
|
|
4692
4692
|
listDisplayMode: n,
|
|
4693
4693
|
isEditable: s = !0,
|
|
4694
4694
|
placeholder: a,
|
|
4695
|
-
label:
|
|
4696
|
-
disabled:
|
|
4695
|
+
label: o,
|
|
4696
|
+
disabled: i,
|
|
4697
4697
|
fun: l,
|
|
4698
4698
|
error: c,
|
|
4699
4699
|
onOptionsRequest: d,
|
|
@@ -4724,7 +4724,7 @@ const qr = ({
|
|
|
4724
4724
|
className: E.container,
|
|
4725
4725
|
"data-component": "multiple-autocomplete",
|
|
4726
4726
|
children: [
|
|
4727
|
-
|
|
4727
|
+
o && /* @__PURE__ */ h.jsx(je, { label: o, disabled: i }),
|
|
4728
4728
|
/* @__PURE__ */ h.jsx(
|
|
4729
4729
|
Wt,
|
|
4730
4730
|
{
|
|
@@ -4799,14 +4799,14 @@ const qr = ({
|
|
|
4799
4799
|
return r ? /* @__PURE__ */ h.jsxs("div", { className: n.wrapper, children: [
|
|
4800
4800
|
/* @__PURE__ */ h.jsx(je, { label: r }),
|
|
4801
4801
|
/* @__PURE__ */ h.jsx(
|
|
4802
|
-
|
|
4802
|
+
ke,
|
|
4803
4803
|
{
|
|
4804
4804
|
variant: "body",
|
|
4805
4805
|
bindValue: e || t
|
|
4806
4806
|
}
|
|
4807
4807
|
)
|
|
4808
4808
|
] }) : /* @__PURE__ */ h.jsx(
|
|
4809
|
-
|
|
4809
|
+
ke,
|
|
4810
4810
|
{
|
|
4811
4811
|
variant: "body",
|
|
4812
4812
|
bindValue: e || t
|
|
@@ -4853,7 +4853,7 @@ const Ve = (t, e, r) => ({
|
|
|
4853
4853
|
bindValue: n,
|
|
4854
4854
|
optionalDisplayValue: r.length >= s ? r[s] : ""
|
|
4855
4855
|
}));
|
|
4856
|
-
},
|
|
4856
|
+
}, Ls = (t, e) => {
|
|
4857
4857
|
const r = new Ie(
|
|
4858
4858
|
t.obj,
|
|
4859
4859
|
e.map((s) => s.bindValue)
|
|
@@ -4862,7 +4862,7 @@ const Ve = (t, e, r) => ({
|
|
|
4862
4862
|
e.map((s) => s.optionalDisplayValue ? s.optionalDisplayValue : "")
|
|
4863
4863
|
).getLegacyValue();
|
|
4864
4864
|
return Ve(t, r, n);
|
|
4865
|
-
},
|
|
4865
|
+
}, ks = (t) => {
|
|
4866
4866
|
switch (t) {
|
|
4867
4867
|
case "CodeOnly":
|
|
4868
4868
|
return 15;
|
|
@@ -4881,8 +4881,8 @@ const Ve = (t, e, r) => ({
|
|
|
4881
4881
|
inputMode: n = "decimal",
|
|
4882
4882
|
dSep: s,
|
|
4883
4883
|
bindValue: a,
|
|
4884
|
-
onChange:
|
|
4885
|
-
onEnter:
|
|
4884
|
+
onChange: o,
|
|
4885
|
+
onEnter: i,
|
|
4886
4886
|
...l
|
|
4887
4887
|
}) => {
|
|
4888
4888
|
const { getCurrentLanguage: c } = Ee(), d = ue(null), u = c(), { groupingChar: p, decimalChar: y } = it(
|
|
@@ -4909,7 +4909,7 @@ const Ve = (t, e, r) => ({
|
|
|
4909
4909
|
const F = oe(
|
|
4910
4910
|
(O, A = !1) => {
|
|
4911
4911
|
if (O.trim() === "") {
|
|
4912
|
-
g(""), N.current = null,
|
|
4912
|
+
g(""), N.current = null, o?.(void 0, ""), A && i?.(void 0);
|
|
4913
4913
|
return;
|
|
4914
4914
|
}
|
|
4915
4915
|
const M = x(O, p, y);
|
|
@@ -4927,7 +4927,7 @@ const Ve = (t, e, r) => ({
|
|
|
4927
4927
|
);
|
|
4928
4928
|
C(q);
|
|
4929
4929
|
const J = f(z, q);
|
|
4930
|
-
g(J), N.current = z,
|
|
4930
|
+
g(J), N.current = z, o?.(z, J), A && i?.(z);
|
|
4931
4931
|
}
|
|
4932
4932
|
},
|
|
4933
4933
|
[
|
|
@@ -4938,11 +4938,11 @@ const Ve = (t, e, r) => ({
|
|
|
4938
4938
|
t,
|
|
4939
4939
|
e,
|
|
4940
4940
|
f,
|
|
4941
|
-
i,
|
|
4942
4941
|
o,
|
|
4942
|
+
i,
|
|
4943
4943
|
b
|
|
4944
4944
|
]
|
|
4945
|
-
), R = (O) => g(O),
|
|
4945
|
+
), R = (O) => g(O), L = () => F(S), D = (O) => {
|
|
4946
4946
|
if (O.key === "Enter") {
|
|
4947
4947
|
O.preventDefault(), F(S, !0);
|
|
4948
4948
|
return;
|
|
@@ -4972,7 +4972,7 @@ const Ve = (t, e, r) => ({
|
|
|
4972
4972
|
max: e,
|
|
4973
4973
|
step: r,
|
|
4974
4974
|
onChange: R,
|
|
4975
|
-
onBlur:
|
|
4975
|
+
onBlur: L,
|
|
4976
4976
|
onKeyDown: D
|
|
4977
4977
|
}
|
|
4978
4978
|
) });
|
|
@@ -5027,8 +5027,8 @@ const As = ({
|
|
|
5027
5027
|
placeholder: n,
|
|
5028
5028
|
state: s,
|
|
5029
5029
|
appearance: a,
|
|
5030
|
-
isEditable:
|
|
5031
|
-
label:
|
|
5030
|
+
isEditable: o,
|
|
5031
|
+
label: i,
|
|
5032
5032
|
ariaLabel: l,
|
|
5033
5033
|
helperText: c,
|
|
5034
5034
|
error: d,
|
|
@@ -5041,10 +5041,10 @@ const As = ({
|
|
|
5041
5041
|
r?.(g.target.value);
|
|
5042
5042
|
}, S = {
|
|
5043
5043
|
wrapper: "smp-textarea-wrapper",
|
|
5044
|
-
container: `smp-textarea ${t ? "smp-textarea-disabled" : ""} ${n ? "smp-textarea-placeholder" : ""} ${w ? `smp-textarea-${w}` : ""} ${a ? `smp-textarea-${a}` : ""} ${
|
|
5044
|
+
container: `smp-textarea ${t ? "smp-textarea-disabled" : ""} ${n ? "smp-textarea-placeholder" : ""} ${w ? `smp-textarea-${w}` : ""} ${a ? `smp-textarea-${a}` : ""} ${o ? "" : "smp-textarea-readOnly"}`
|
|
5045
5045
|
};
|
|
5046
5046
|
return /* @__PURE__ */ h.jsxs("div", { className: S.wrapper, "data-component": "textarea", children: [
|
|
5047
|
-
|
|
5047
|
+
i && /* @__PURE__ */ h.jsx(je, { htmlFor: x, label: i, disabled: t }),
|
|
5048
5048
|
/* @__PURE__ */ h.jsx(
|
|
5049
5049
|
"textarea",
|
|
5050
5050
|
{
|
|
@@ -5055,10 +5055,10 @@ const As = ({
|
|
|
5055
5055
|
onBlur: u,
|
|
5056
5056
|
className: S.container,
|
|
5057
5057
|
disabled: t,
|
|
5058
|
-
readOnly: !
|
|
5058
|
+
readOnly: !o,
|
|
5059
5059
|
onKeyDown: p,
|
|
5060
|
-
"aria-label":
|
|
5061
|
-
"aria-labelledby":
|
|
5060
|
+
"aria-label": i ? void 0 : l,
|
|
5061
|
+
"aria-labelledby": i ? x : void 0,
|
|
5062
5062
|
"aria-describedby": b ? E : void 0,
|
|
5063
5063
|
rows: y,
|
|
5064
5064
|
cols: f
|
|
@@ -5090,16 +5090,16 @@ const Fe = {
|
|
|
5090
5090
|
RadCol: n,
|
|
5091
5091
|
options: s,
|
|
5092
5092
|
onOptionsRequest: a,
|
|
5093
|
-
fun:
|
|
5094
|
-
label:
|
|
5093
|
+
fun: o,
|
|
5094
|
+
label: i,
|
|
5095
5095
|
...l
|
|
5096
5096
|
}) => {
|
|
5097
5097
|
const [c, d] = Y(s), u = De();
|
|
5098
5098
|
ae(() => {
|
|
5099
|
-
!c && a &&
|
|
5099
|
+
!c && a && o && a(o, void 0).then((g) => d(g)).catch((g) => {
|
|
5100
5100
|
console.error("Error during loading options (radio)", g);
|
|
5101
5101
|
});
|
|
5102
|
-
}, [c, a,
|
|
5102
|
+
}, [c, a, o]);
|
|
5103
5103
|
const p = parseInt(n ?? "", 10), y = r === Pt.LINE_DIRECTION, f = y && !isNaN(p), x = f ? Fe["smp-radio-horizontal-grid"] : y ? Fe["smp-radio-horizontal"] : "", E = f ? { gridTemplateColumns: `repeat(${p}, 1fr)` } : void 0, w = {
|
|
5104
5104
|
container: Fe["smp-radio"],
|
|
5105
5105
|
optionsContainer: `${Fe["smp-radio-options-container"]} ${x}`,
|
|
@@ -5110,7 +5110,7 @@ const Fe = {
|
|
|
5110
5110
|
t || l.onChange?.(g.id, g.label);
|
|
5111
5111
|
}, S = De();
|
|
5112
5112
|
return /* @__PURE__ */ h.jsxs("div", { "smp-id": "radio-container", className: w.container, id: u, children: [
|
|
5113
|
-
|
|
5113
|
+
i && /* @__PURE__ */ h.jsx(je, { label: i, disabled: t, htmlFor: u }),
|
|
5114
5114
|
/* @__PURE__ */ h.jsx("div", { className: w.optionsContainer, style: E, children: c?.map((g, N) => /* @__PURE__ */ h.jsxs("label", { className: w.option, children: [
|
|
5115
5115
|
/* @__PURE__ */ h.jsx(
|
|
5116
5116
|
"input",
|
|
@@ -5125,7 +5125,7 @@ const Fe = {
|
|
|
5125
5125
|
}
|
|
5126
5126
|
),
|
|
5127
5127
|
/* @__PURE__ */ h.jsx(
|
|
5128
|
-
|
|
5128
|
+
ke,
|
|
5129
5129
|
{
|
|
5130
5130
|
variant: "body",
|
|
5131
5131
|
bindValue: Ae(
|
|
@@ -5147,7 +5147,7 @@ const Fe = {
|
|
|
5147
5147
|
ae(() => {
|
|
5148
5148
|
n && s?.current && s.current.focus();
|
|
5149
5149
|
}, [n, s]);
|
|
5150
|
-
const [a,
|
|
5150
|
+
const [a, o, i] = t, l = (c) => Array.from({ length: c }, (d, u) => /* @__PURE__ */ h.jsx("option", { value: u, children: u.toString().padStart(2, "0") }, u));
|
|
5151
5151
|
return /* @__PURE__ */ h.jsxs(
|
|
5152
5152
|
"div",
|
|
5153
5153
|
{
|
|
@@ -5159,7 +5159,7 @@ const Fe = {
|
|
|
5159
5159
|
{
|
|
5160
5160
|
value: a,
|
|
5161
5161
|
ref: s,
|
|
5162
|
-
onChange: (c) => e(+c.target.value,
|
|
5162
|
+
onChange: (c) => e(+c.target.value, o, i),
|
|
5163
5163
|
id: "time-picker-hours",
|
|
5164
5164
|
children: l(24)
|
|
5165
5165
|
}
|
|
@@ -5168,8 +5168,8 @@ const Fe = {
|
|
|
5168
5168
|
/* @__PURE__ */ h.jsx(
|
|
5169
5169
|
"select",
|
|
5170
5170
|
{
|
|
5171
|
-
value:
|
|
5172
|
-
onChange: (c) => e(a, +c.target.value,
|
|
5171
|
+
value: o,
|
|
5172
|
+
onChange: (c) => e(a, +c.target.value, i),
|
|
5173
5173
|
id: "time-picker-minutes",
|
|
5174
5174
|
children: l(60)
|
|
5175
5175
|
}
|
|
@@ -5178,8 +5178,8 @@ const Fe = {
|
|
|
5178
5178
|
/* @__PURE__ */ h.jsx(
|
|
5179
5179
|
"select",
|
|
5180
5180
|
{
|
|
5181
|
-
value:
|
|
5182
|
-
onChange: (c) => e(a,
|
|
5181
|
+
value: i || 0,
|
|
5182
|
+
onChange: (c) => e(a, o, +c.target.value),
|
|
5183
5183
|
id: "time-picker-seconds",
|
|
5184
5184
|
children: l(60)
|
|
5185
5185
|
}
|
|
@@ -5190,8 +5190,8 @@ const Fe = {
|
|
|
5190
5190
|
}, $r = (t) => {
|
|
5191
5191
|
const e = t.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);
|
|
5192
5192
|
if (!e) return !1;
|
|
5193
|
-
const [, r, n, s] = e, a = parseInt(r, 10),
|
|
5194
|
-
return a >= 0 && a <= 23 &&
|
|
5193
|
+
const [, r, n, s] = e, a = parseInt(r, 10), o = parseInt(n, 10), i = s ? parseInt(s, 10) : 0;
|
|
5194
|
+
return a >= 0 && a <= 23 && o >= 0 && o <= 59 && (s === void 0 || i >= 0 && i <= 59);
|
|
5195
5195
|
}, Fs = (t) => {
|
|
5196
5196
|
const e = t.split(":").map((r) => parseInt(r, 10));
|
|
5197
5197
|
return [e[0] || 0, e[1] || 0, e[2] || 0];
|
|
@@ -5205,25 +5205,25 @@ const Fe = {
|
|
|
5205
5205
|
isEditable: n = !0,
|
|
5206
5206
|
...s
|
|
5207
5207
|
}) => {
|
|
5208
|
-
const a = ue(null), [
|
|
5208
|
+
const a = ue(null), [o, i] = Y(!1), [l, c] = Y(t || ""), [d, u] = Y(""), { anchorRef: p, targetRef: y } = Be({
|
|
5209
5209
|
position: "bottom",
|
|
5210
|
-
enabled:
|
|
5210
|
+
enabled: o
|
|
5211
5211
|
}), f = oe(() => {
|
|
5212
|
-
|
|
5212
|
+
i(!1), a?.current?.focus();
|
|
5213
5213
|
}, []);
|
|
5214
|
-
bt([y, p],
|
|
5214
|
+
bt([y, p], o, () => i(!1)), Yt(o, y), ae(() => {
|
|
5215
5215
|
const g = t || "", N = $r(g) ? g : t || "";
|
|
5216
5216
|
c(g), u(N);
|
|
5217
5217
|
}, [t]), ae(() => {
|
|
5218
5218
|
const g = (N) => {
|
|
5219
|
-
N.key === "Escape" &&
|
|
5219
|
+
N.key === "Escape" && i(!1);
|
|
5220
5220
|
};
|
|
5221
|
-
return
|
|
5221
|
+
return o && document.addEventListener("keydown", g), () => {
|
|
5222
5222
|
document.removeEventListener("keydown", g);
|
|
5223
5223
|
};
|
|
5224
|
-
}, [
|
|
5224
|
+
}, [o]);
|
|
5225
5225
|
const x = () => {
|
|
5226
|
-
n &&
|
|
5226
|
+
n && i((g) => !g);
|
|
5227
5227
|
}, E = (g) => {
|
|
5228
5228
|
u(g);
|
|
5229
5229
|
}, w = (g, N, F) => {
|
|
@@ -5257,13 +5257,13 @@ const Fe = {
|
|
|
5257
5257
|
inputRef: a
|
|
5258
5258
|
}
|
|
5259
5259
|
),
|
|
5260
|
-
|
|
5260
|
+
o && /* @__PURE__ */ h.jsx(We, { children: /* @__PURE__ */ h.jsx(
|
|
5261
5261
|
Ps,
|
|
5262
5262
|
{
|
|
5263
5263
|
value: Fs(l),
|
|
5264
5264
|
onChange: w,
|
|
5265
5265
|
targetRef: y,
|
|
5266
|
-
isOpen:
|
|
5266
|
+
isOpen: o
|
|
5267
5267
|
}
|
|
5268
5268
|
) })
|
|
5269
5269
|
] });
|
|
@@ -5316,18 +5316,18 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5316
5316
|
displayMode: n = "DescOnly",
|
|
5317
5317
|
BtoVer: s = "false",
|
|
5318
5318
|
options: a,
|
|
5319
|
-
onOptionsRequest:
|
|
5320
|
-
fun:
|
|
5319
|
+
onOptionsRequest: o,
|
|
5320
|
+
fun: i,
|
|
5321
5321
|
...l
|
|
5322
5322
|
}) => {
|
|
5323
5323
|
const [c, d] = Y(a), u = De(), p = (f) => {
|
|
5324
5324
|
e || l.onChange?.(f.id, f.label);
|
|
5325
5325
|
};
|
|
5326
5326
|
ae(() => {
|
|
5327
|
-
!c &&
|
|
5327
|
+
!c && o && i && o(i, void 0).then((f) => d(f)).catch((f) => {
|
|
5328
5328
|
console.error("Error during loading options (button group)", f);
|
|
5329
5329
|
});
|
|
5330
|
-
}, [c,
|
|
5330
|
+
}, [c, o, i]);
|
|
5331
5331
|
const y = {
|
|
5332
5332
|
container: `smp-button-group-container ${de(s) ? "smp-button-group-vertical" : ""}`,
|
|
5333
5333
|
optionsContainer: `smp-button-group-options-container ${de(s) ? "smp-button-group-vertical" : ""}`
|
|
@@ -5363,15 +5363,15 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5363
5363
|
]
|
|
5364
5364
|
}
|
|
5365
5365
|
);
|
|
5366
|
-
},
|
|
5366
|
+
}, Le = ({
|
|
5367
5367
|
decode: t,
|
|
5368
5368
|
shape: e,
|
|
5369
5369
|
obj: r,
|
|
5370
5370
|
data: n,
|
|
5371
5371
|
icon: s,
|
|
5372
5372
|
fun: a,
|
|
5373
|
-
placeholderIcon:
|
|
5374
|
-
label:
|
|
5373
|
+
placeholderIcon: o,
|
|
5374
|
+
label: i,
|
|
5375
5375
|
tooltip: l,
|
|
5376
5376
|
options: c,
|
|
5377
5377
|
onChange: d,
|
|
@@ -5395,16 +5395,16 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5395
5395
|
onOptionsRequest: f,
|
|
5396
5396
|
fun: a,
|
|
5397
5397
|
icon: s,
|
|
5398
|
-
placeholderIcon:
|
|
5398
|
+
placeholderIcon: o,
|
|
5399
5399
|
tooltip: l,
|
|
5400
|
-
label:
|
|
5400
|
+
label: i,
|
|
5401
5401
|
isEditable: E,
|
|
5402
|
-
size: b.data && b.data.size ? b.data.size : b.data?.displayMode &&
|
|
5402
|
+
size: b.data && b.data.size ? b.data.size : b.data?.displayMode && ks(b.data.displayMode || "CodeOnly"),
|
|
5403
5403
|
...n
|
|
5404
5404
|
}, g = (j, O, A) => jn(r) ? Ve(j, new pt(r, O).getLegacyValue()) : $n(r) ? Ve(j, new yt(r, O).getLegacyValue()) : Ve(j, O, A), N = (j, O) => Ve(
|
|
5405
5405
|
j,
|
|
5406
5406
|
new Je(r, O, w).getLegacyValue()
|
|
5407
|
-
), F = (j) => Ve(b, new ft(r, j).getLegacyValue()), R = (j) =>
|
|
5407
|
+
), F = (j) => Ve(b, new ft(r, j).getLegacyValue()), R = (j) => Ls(b, j), L = () => {
|
|
5408
5408
|
switch (C) {
|
|
5409
5409
|
case ee.AUTOCOMPLETE: {
|
|
5410
5410
|
const j = {
|
|
@@ -5432,8 +5432,8 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5432
5432
|
case ee.MULTI_CONFIG: {
|
|
5433
5433
|
const j = {
|
|
5434
5434
|
...S,
|
|
5435
|
-
bindValue:
|
|
5436
|
-
showText: !!
|
|
5435
|
+
bindValue: i || "",
|
|
5436
|
+
showText: !!i,
|
|
5437
5437
|
title: t,
|
|
5438
5438
|
icon: s ?? "list",
|
|
5439
5439
|
onClick: () => {
|
|
@@ -5618,7 +5618,7 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5618
5618
|
onContextMenu: (j) => {
|
|
5619
5619
|
x && l && (j.preventDefault(), x(b, j.currentTarget));
|
|
5620
5620
|
},
|
|
5621
|
-
children:
|
|
5621
|
+
children: L()
|
|
5622
5622
|
}
|
|
5623
5623
|
);
|
|
5624
5624
|
}, va = ({
|
|
@@ -5627,12 +5627,12 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5627
5627
|
onEnter: r,
|
|
5628
5628
|
onContextMenu: n
|
|
5629
5629
|
}) => {
|
|
5630
|
-
const [s, a] = Y(),
|
|
5631
|
-
(
|
|
5632
|
-
if (!
|
|
5630
|
+
const [s, a] = Y(), o = oe(
|
|
5631
|
+
(i) => {
|
|
5632
|
+
if (!i.rows?.length || !i.columns?.length)
|
|
5633
5633
|
return {};
|
|
5634
|
-
const l =
|
|
5635
|
-
return
|
|
5634
|
+
const l = i.rows[0];
|
|
5635
|
+
return i.columns.filter((c) => c.visible).reduce((c, d) => {
|
|
5636
5636
|
const u = l.cells[d.name], p = {
|
|
5637
5637
|
...u,
|
|
5638
5638
|
id: d.name,
|
|
@@ -5669,8 +5669,8 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5669
5669
|
[e, r, n]
|
|
5670
5670
|
);
|
|
5671
5671
|
return ae(() => {
|
|
5672
|
-
t && a(
|
|
5673
|
-
}, [t,
|
|
5672
|
+
t && a(o(t));
|
|
5673
|
+
}, [t, o]), !t?.rows?.length || !t.columns?.length ? null : s && /* @__PURE__ */ h.jsx("header", { className: "smp-appbar", "aria-label": "App Bar", children: /* @__PURE__ */ h.jsx(dt, { layout: t.rows[0].layout, children: Object.values(s).map((i) => /* @__PURE__ */ h.jsx(Le, { ...i })) }) });
|
|
5674
5674
|
}, Ws = (t) => t.children?.length ? t.children.map((e) => ({
|
|
5675
5675
|
id: e.obj?.k ?? "",
|
|
5676
5676
|
label: e.decode ?? e.value ?? e.obj?.k ?? "",
|
|
@@ -5683,8 +5683,8 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5683
5683
|
minifiedOnClose: n = !0,
|
|
5684
5684
|
customHeight: s = "100vh",
|
|
5685
5685
|
onClick: a,
|
|
5686
|
-
onEnter:
|
|
5687
|
-
onClose:
|
|
5686
|
+
onEnter: o,
|
|
5687
|
+
onClose: i,
|
|
5688
5688
|
loadOptions: l,
|
|
5689
5689
|
onContextMenu: c
|
|
5690
5690
|
}) => {
|
|
@@ -5697,7 +5697,7 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5697
5697
|
const R = g.cells[F.name];
|
|
5698
5698
|
if (!R || !p && de(n) && R.shape !== ee.BUTTON && R.shape !== ee.BUTTON_LIST)
|
|
5699
5699
|
return N;
|
|
5700
|
-
const
|
|
5700
|
+
const L = {
|
|
5701
5701
|
...R,
|
|
5702
5702
|
id: F.name,
|
|
5703
5703
|
onChange: (D) => {
|
|
@@ -5710,30 +5710,30 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5710
5710
|
D.fun && a && a(D);
|
|
5711
5711
|
},
|
|
5712
5712
|
onEnter: (D) => {
|
|
5713
|
-
|
|
5713
|
+
o && o(D);
|
|
5714
5714
|
},
|
|
5715
5715
|
onContextMenu: (D, j) => {
|
|
5716
5716
|
c && c(D, j);
|
|
5717
5717
|
}
|
|
5718
5718
|
};
|
|
5719
|
-
return l && R.shape == ee.BUTTON_LIST && (
|
|
5719
|
+
return l && R.shape == ee.BUTTON_LIST && (L.onOptionsRequest = (D, j) => l(D, j).then(
|
|
5720
5720
|
(O) => Ws(O)
|
|
5721
|
-
)), !p && de(n) && (
|
|
5722
|
-
...
|
|
5721
|
+
)), !p && de(n) && (L.data = {
|
|
5722
|
+
...L.data,
|
|
5723
5723
|
showText: !1,
|
|
5724
5724
|
justify: "center",
|
|
5725
5725
|
squared: !0
|
|
5726
5726
|
}), {
|
|
5727
5727
|
...N,
|
|
5728
|
-
[F.name]:
|
|
5728
|
+
[F.name]: L
|
|
5729
5729
|
};
|
|
5730
5730
|
}, {});
|
|
5731
5731
|
},
|
|
5732
|
-
[p, n, a,
|
|
5732
|
+
[p, n, a, o, l, c]
|
|
5733
5733
|
), w = oe(() => {
|
|
5734
|
-
|
|
5735
|
-
}, [
|
|
5736
|
-
de(n) ? y((S) => !S) : (y(!1),
|
|
5734
|
+
i?.();
|
|
5735
|
+
}, [i]), b = () => {
|
|
5736
|
+
de(n) ? y((S) => !S) : (y(!1), i?.());
|
|
5737
5737
|
};
|
|
5738
5738
|
if (ae(() => {
|
|
5739
5739
|
u(E(t));
|
|
@@ -5806,7 +5806,7 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5806
5806
|
}
|
|
5807
5807
|
) })
|
|
5808
5808
|
] }),
|
|
5809
|
-
/* @__PURE__ */ h.jsx("div", { className: C.containerLayout, children: /* @__PURE__ */ h.jsx(dt, { layout: t.rows[0].layout, children: Object.values(d).map((S) => /* @__PURE__ */ h.jsx(
|
|
5809
|
+
/* @__PURE__ */ h.jsx("div", { className: C.containerLayout, children: /* @__PURE__ */ h.jsx(dt, { layout: t.rows[0].layout, children: Object.values(d).map((S) => /* @__PURE__ */ h.jsx(Le, { ...S })) }) })
|
|
5810
5810
|
] })
|
|
5811
5811
|
}
|
|
5812
5812
|
)
|
|
@@ -5818,8 +5818,8 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5818
5818
|
TextColName: n,
|
|
5819
5819
|
TextColor: s = "var(--smp-dashList-color-base)",
|
|
5820
5820
|
Fillspace: a,
|
|
5821
|
-
FontSize:
|
|
5822
|
-
Horizontal:
|
|
5821
|
+
FontSize: o,
|
|
5822
|
+
Horizontal: i,
|
|
5823
5823
|
ForceIcon: l,
|
|
5824
5824
|
IconColName: c,
|
|
5825
5825
|
IconColor: d = "var(--smp-dashList-color-base)",
|
|
@@ -5833,7 +5833,7 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5833
5833
|
SelectLayout: b = "1",
|
|
5834
5834
|
onClick: C
|
|
5835
5835
|
}) => {
|
|
5836
|
-
const S = "N/A", g = e?.columns || [], N = e?.rows || [], F = N.length > 0, R = "--smp-dashList-color",
|
|
5836
|
+
const S = "N/A", g = e?.columns || [], N = e?.rows || [], F = N.length > 0, R = "--smp-dashList-color", L = "smp-layout", D = "descr", j = "icon", O = "um", A = "value", M = o || "1em", z = "18px", q = "--smp-dashList-columns", J = "--smp-dashList-fontSize", Q = {
|
|
5837
5837
|
dash: (P = "1") => {
|
|
5838
5838
|
const G = m(P), Z = G, re = v(G, D), be = v(G, j), Ne = v(G, O), he = v(G, A);
|
|
5839
5839
|
return {
|
|
@@ -5845,8 +5845,8 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5845
5845
|
};
|
|
5846
5846
|
},
|
|
5847
5847
|
dashList: `smp-dash-list ${de(a) ? "smp-dash-list-fill-space" : ""}
|
|
5848
|
-
${de(
|
|
5849
|
-
}, { format: V } = Ee(), m = (P) => `${
|
|
5848
|
+
${de(i) ? "smp-dash-list-horizontal" : ""}`
|
|
5849
|
+
}, { format: V } = Ee(), m = (P) => `${L}-${P}`, v = (P, G) => `${P}__${G}`, $ = (P) => `${R}-${P}`, k = (P) => {
|
|
5850
5850
|
const G = /R(\d{1,3})G(\d{1,3})B(\d{1,3})/;
|
|
5851
5851
|
if (G.test(P)) {
|
|
5852
5852
|
const re = P.match(G) || [];
|
|
@@ -5899,9 +5899,9 @@ const Nr = /* @__PURE__ */ new Map([
|
|
|
5899
5899
|
};
|
|
5900
5900
|
})(b), te = (P) => {
|
|
5901
5901
|
const { descr: G, icon: Z, um: re, value: be } = U(P), Ne = {
|
|
5902
|
-
[$(D)]:
|
|
5903
|
-
[$(O)]:
|
|
5904
|
-
[$(A)]:
|
|
5902
|
+
[$(D)]: k(s),
|
|
5903
|
+
[$(O)]: k(f),
|
|
5904
|
+
[$(A)]: k(w)
|
|
5905
5905
|
}, he = [], Ce = _(be);
|
|
5906
5906
|
switch (b) {
|
|
5907
5907
|
case "2":
|
|
@@ -5971,18 +5971,18 @@ const Kr = ({
|
|
|
5971
5971
|
rowHeight: n = 26,
|
|
5972
5972
|
offsetTop: s,
|
|
5973
5973
|
enableSelection: a,
|
|
5974
|
-
isSelected:
|
|
5975
|
-
onToggleSelect:
|
|
5974
|
+
isSelected: o = !1,
|
|
5975
|
+
onToggleSelect: i
|
|
5976
5976
|
}) => {
|
|
5977
5977
|
const [l, c] = Y(!1), d = lt(t) && !!t.children?.length, u = t.cells && Object.keys(t.cells).length > 0, p = d, y = r * 20, f = () => {
|
|
5978
5978
|
d && c(!l);
|
|
5979
5979
|
}, x = {
|
|
5980
|
-
content: `${Te["smp-row"]} ${d ? Te["smp-row-clickable"] : ""} ${
|
|
5980
|
+
content: `${Te["smp-row"]} ${d ? Te["smp-row-clickable"] : ""} ${o ? Te["smp-row-selected"] : ""}`,
|
|
5981
5981
|
toggle: `${Te["smp-row-toggle"]}`,
|
|
5982
5982
|
indent: `${Te["smp-row-indent"]}`,
|
|
5983
5983
|
cell: `${Te["smp-row-wrapperCell"]}`,
|
|
5984
5984
|
leftSection: `${Te["smp-row-leftSection"]}`
|
|
5985
|
-
}, E = (N) => /* @__PURE__ */ h.jsx(
|
|
5985
|
+
}, E = (N) => /* @__PURE__ */ h.jsx(Le, { ...N }), w = () => /* @__PURE__ */ h.jsx("span", { className: x.toggle, children: p && /* @__PURE__ */ h.jsx(
|
|
5986
5986
|
ce,
|
|
5987
5987
|
{
|
|
5988
5988
|
icon: l ? "arrow_drop_right" : "arrow_drop_down",
|
|
@@ -5996,13 +5996,13 @@ const Kr = ({
|
|
|
5996
5996
|
"aria-hidden": "true"
|
|
5997
5997
|
}
|
|
5998
5998
|
), C = () => {
|
|
5999
|
-
if (
|
|
5999
|
+
if (i)
|
|
6000
6000
|
return /* @__PURE__ */ h.jsx(
|
|
6001
6001
|
Bt,
|
|
6002
6002
|
{
|
|
6003
|
-
bindValue:
|
|
6003
|
+
bindValue: o,
|
|
6004
6004
|
onChange: () => {
|
|
6005
|
-
|
|
6005
|
+
i();
|
|
6006
6006
|
}
|
|
6007
6007
|
}
|
|
6008
6008
|
);
|
|
@@ -6045,7 +6045,7 @@ const Kr = ({
|
|
|
6045
6045
|
]
|
|
6046
6046
|
}
|
|
6047
6047
|
),
|
|
6048
|
-
t.cells && Object.keys(t.cells).length > 0 && Object.entries(t.cells).map(([R,
|
|
6048
|
+
t.cells && Object.keys(t.cells).length > 0 && Object.entries(t.cells).map(([R, L]) => /* @__PURE__ */ h.jsx(
|
|
6049
6049
|
"td",
|
|
6050
6050
|
{
|
|
6051
6051
|
className: x.cell,
|
|
@@ -6055,11 +6055,11 @@ const Kr = ({
|
|
|
6055
6055
|
height: `${n}px`
|
|
6056
6056
|
},
|
|
6057
6057
|
children: E({
|
|
6058
|
-
...
|
|
6058
|
+
...L,
|
|
6059
6059
|
id: R
|
|
6060
6060
|
})
|
|
6061
6061
|
},
|
|
6062
|
-
Gs(
|
|
6062
|
+
Gs(L) || R
|
|
6063
6063
|
))
|
|
6064
6064
|
]
|
|
6065
6065
|
}
|
|
@@ -6077,14 +6077,14 @@ const Kr = ({
|
|
|
6077
6077
|
onClick: s,
|
|
6078
6078
|
isExpanded: a
|
|
6079
6079
|
}) => {
|
|
6080
|
-
const
|
|
6080
|
+
const o = {
|
|
6081
6081
|
tr: "smp-groupRow-tr",
|
|
6082
6082
|
td: "smp-groupRow-td"
|
|
6083
6083
|
};
|
|
6084
6084
|
return /* @__PURE__ */ h.jsx(
|
|
6085
6085
|
"tr",
|
|
6086
6086
|
{
|
|
6087
|
-
className:
|
|
6087
|
+
className: o.tr,
|
|
6088
6088
|
style: {
|
|
6089
6089
|
height: e,
|
|
6090
6090
|
top: r,
|
|
@@ -6094,7 +6094,7 @@ const Kr = ({
|
|
|
6094
6094
|
children: /* @__PURE__ */ h.jsxs(
|
|
6095
6095
|
"td",
|
|
6096
6096
|
{
|
|
6097
|
-
className:
|
|
6097
|
+
className: o.td,
|
|
6098
6098
|
style: {
|
|
6099
6099
|
paddingLeft: 10 + n * 20
|
|
6100
6100
|
},
|
|
@@ -6106,7 +6106,7 @@ const Kr = ({
|
|
|
6106
6106
|
width: 16
|
|
6107
6107
|
}
|
|
6108
6108
|
),
|
|
6109
|
-
/* @__PURE__ */ h.jsx(
|
|
6109
|
+
/* @__PURE__ */ h.jsx(ke, { variant: "title", bindValue: t })
|
|
6110
6110
|
]
|
|
6111
6111
|
}
|
|
6112
6112
|
)
|
|
@@ -6129,19 +6129,19 @@ function zs(t, e) {
|
|
|
6129
6129
|
function Ks(t, e, r, n) {
|
|
6130
6130
|
const s = [];
|
|
6131
6131
|
let a = 0;
|
|
6132
|
-
return
|
|
6133
|
-
function
|
|
6132
|
+
return o(t, 0, []), { flatRows: s, offset: a };
|
|
6133
|
+
function o(u, p, y) {
|
|
6134
6134
|
if (p >= e.length) {
|
|
6135
6135
|
d(u);
|
|
6136
6136
|
return;
|
|
6137
6137
|
}
|
|
6138
|
-
const f = e[p].column, x =
|
|
6138
|
+
const f = e[p].column, x = i(u, f);
|
|
6139
6139
|
for (const [E, w] of x) {
|
|
6140
6140
|
const b = [...y, E], C = l(b, p), S = n.has(C);
|
|
6141
|
-
s.push(c(E, C, p, S)), a += r, S &&
|
|
6141
|
+
s.push(c(E, C, p, S)), a += r, S && o(w, p + 1, b);
|
|
6142
6142
|
}
|
|
6143
6143
|
}
|
|
6144
|
-
function
|
|
6144
|
+
function i(u, p) {
|
|
6145
6145
|
const y = /* @__PURE__ */ new Map();
|
|
6146
6146
|
for (const f of u) {
|
|
6147
6147
|
const x = f.cells[p]?.decode ?? "N/D";
|
|
@@ -6175,9 +6175,9 @@ const Js = ({
|
|
|
6175
6175
|
onDrop: s,
|
|
6176
6176
|
onDragOver: a
|
|
6177
6177
|
}) => {
|
|
6178
|
-
const
|
|
6179
|
-
(
|
|
6180
|
-
bindValue:
|
|
6178
|
+
const o = t.map(
|
|
6179
|
+
(i) => ({
|
|
6180
|
+
bindValue: i.column
|
|
6181
6181
|
})
|
|
6182
6182
|
);
|
|
6183
6183
|
return /* @__PURE__ */ h.jsxs(
|
|
@@ -6191,7 +6191,7 @@ const Js = ({
|
|
|
6191
6191
|
/* @__PURE__ */ h.jsx(
|
|
6192
6192
|
Wt,
|
|
6193
6193
|
{
|
|
6194
|
-
elements:
|
|
6194
|
+
elements: o,
|
|
6195
6195
|
isEditable: r,
|
|
6196
6196
|
isDraggable: e,
|
|
6197
6197
|
displayMode: "CodeOnly",
|
|
@@ -6224,26 +6224,26 @@ const Js = ({
|
|
|
6224
6224
|
return ae(() => {
|
|
6225
6225
|
if (!(!t || t.length === 0)) {
|
|
6226
6226
|
if (n === "fixed") {
|
|
6227
|
-
const
|
|
6227
|
+
const i = Object.fromEntries(
|
|
6228
6228
|
t.map((l) => [l.name, 120])
|
|
6229
6229
|
);
|
|
6230
|
-
a(
|
|
6230
|
+
a(i);
|
|
6231
6231
|
} else if (n === "fit-grid") {
|
|
6232
|
-
const
|
|
6233
|
-
|
|
6232
|
+
const o = r.current?.offsetWidth || 800, i = t.filter((d) => d.visible !== !1), l = o / i.length, c = Object.fromEntries(
|
|
6233
|
+
i.map((d) => [d.name, l])
|
|
6234
6234
|
);
|
|
6235
6235
|
a(c);
|
|
6236
6236
|
} else if (n === "fit-content") {
|
|
6237
|
-
const
|
|
6238
|
-
for (const
|
|
6239
|
-
if (!
|
|
6240
|
-
const l =
|
|
6241
|
-
...e.map((d) => `${d.cells?.[
|
|
6237
|
+
const o = {};
|
|
6238
|
+
for (const i of t) {
|
|
6239
|
+
if (!i.visible) continue;
|
|
6240
|
+
const l = i.title?.length || 0, c = Math.max(
|
|
6241
|
+
...e.map((d) => `${d.cells?.[i.name]?.decode || d.cells?.[i.name]?.value || ""}`.length),
|
|
6242
6242
|
l
|
|
6243
6243
|
);
|
|
6244
|
-
i
|
|
6244
|
+
o[i.name] = c * 8 + 24;
|
|
6245
6245
|
}
|
|
6246
|
-
a(
|
|
6246
|
+
a(o);
|
|
6247
6247
|
}
|
|
6248
6248
|
}
|
|
6249
6249
|
}, [t, e, r, n]), [s, a];
|
|
@@ -6255,7 +6255,7 @@ const Js = ({
|
|
|
6255
6255
|
"smp-filter-toolbar": "_smp-filter-toolbar_1dest_31",
|
|
6256
6256
|
"smp-filter-actionButtons": "_smp-filter-actionButtons_1dest_41"
|
|
6257
6257
|
}, Zs = ({ filter: t, onChange: e, onDelete: r, fieldOptions: n, hasCurrentColumn: s }) => {
|
|
6258
|
-
const { translate: a } = Ee(),
|
|
6258
|
+
const { translate: a } = Ee(), o = {
|
|
6259
6259
|
string: [
|
|
6260
6260
|
{ id: "st", label: a(ve.STRING_STARTS) },
|
|
6261
6261
|
{
|
|
@@ -6282,10 +6282,10 @@ const Js = ({
|
|
|
6282
6282
|
{ id: "after", label: "Dopo il" },
|
|
6283
6283
|
{ id: "on", label: "Il giorno" }
|
|
6284
6284
|
]
|
|
6285
|
-
},
|
|
6285
|
+
}, i = (p) => {
|
|
6286
6286
|
const y = n.find((x) => x.id === p);
|
|
6287
6287
|
if (!y) return;
|
|
6288
|
-
const f =
|
|
6288
|
+
const f = o[y.type]?.[0] || {
|
|
6289
6289
|
id: "",
|
|
6290
6290
|
label: ""
|
|
6291
6291
|
};
|
|
@@ -6299,7 +6299,7 @@ const Js = ({
|
|
|
6299
6299
|
// reset value
|
|
6300
6300
|
});
|
|
6301
6301
|
}, l = (p) => {
|
|
6302
|
-
const y =
|
|
6302
|
+
const y = o[t.columnsType]?.find(
|
|
6303
6303
|
(f) => f.id === p
|
|
6304
6304
|
);
|
|
6305
6305
|
y && e({ ...t, operator: y });
|
|
@@ -6342,7 +6342,7 @@ const Js = ({
|
|
|
6342
6342
|
bindValue: t.field.id,
|
|
6343
6343
|
optionalDisplayValue: t.field.label,
|
|
6344
6344
|
options: n.map((p) => ({ id: p.id, label: p.label })),
|
|
6345
|
-
onChange:
|
|
6345
|
+
onChange: i,
|
|
6346
6346
|
listDisplayMode: nt.BOTH,
|
|
6347
6347
|
displayMode: nt.DESC_ONLY,
|
|
6348
6348
|
isEditable: !0
|
|
@@ -6353,7 +6353,7 @@ const Js = ({
|
|
|
6353
6353
|
{
|
|
6354
6354
|
bindValue: t.operator.id,
|
|
6355
6355
|
optionalDisplayValue: t.operator.label,
|
|
6356
|
-
options:
|
|
6356
|
+
options: o[t.columnsType],
|
|
6357
6357
|
onChange: l,
|
|
6358
6358
|
listDisplayMode: nt.DESC_ONLY,
|
|
6359
6359
|
displayMode: nt.DESC_ONLY,
|
|
@@ -6381,8 +6381,8 @@ const Js = ({
|
|
|
6381
6381
|
onClose: n,
|
|
6382
6382
|
level: s = 0,
|
|
6383
6383
|
fieldOptions: a,
|
|
6384
|
-
hasSubGroups:
|
|
6385
|
-
hasSubFilters:
|
|
6384
|
+
hasSubGroups: o = !0,
|
|
6385
|
+
hasSubFilters: i = !0,
|
|
6386
6386
|
currentColumnName: l,
|
|
6387
6387
|
hasButtonGroup: c = !0
|
|
6388
6388
|
}) => {
|
|
@@ -6452,7 +6452,7 @@ const Js = ({
|
|
|
6452
6452
|
}
|
|
6453
6453
|
),
|
|
6454
6454
|
/* @__PURE__ */ h.jsxs("div", { className: E.actionButtons, children: [
|
|
6455
|
-
|
|
6455
|
+
i && /* @__PURE__ */ h.jsx(
|
|
6456
6456
|
fe,
|
|
6457
6457
|
{
|
|
6458
6458
|
onClick: y,
|
|
@@ -6462,7 +6462,7 @@ const Js = ({
|
|
|
6462
6462
|
variant: "base"
|
|
6463
6463
|
}
|
|
6464
6464
|
),
|
|
6465
|
-
|
|
6465
|
+
o && /* @__PURE__ */ h.jsx(
|
|
6466
6466
|
fe,
|
|
6467
6467
|
{
|
|
6468
6468
|
onClick: f,
|
|
@@ -6528,15 +6528,15 @@ const Js = ({
|
|
|
6528
6528
|
]
|
|
6529
6529
|
}
|
|
6530
6530
|
);
|
|
6531
|
-
},
|
|
6531
|
+
}, Lr = ({
|
|
6532
6532
|
filters: t,
|
|
6533
6533
|
onChange: e,
|
|
6534
6534
|
fieldOptions: r,
|
|
6535
6535
|
hasSubGroups: n,
|
|
6536
6536
|
hasSubFilters: s,
|
|
6537
6537
|
ref: a,
|
|
6538
|
-
currentColumnName:
|
|
6539
|
-
hasButtonGroup:
|
|
6538
|
+
currentColumnName: o,
|
|
6539
|
+
hasButtonGroup: i,
|
|
6540
6540
|
onClose: l
|
|
6541
6541
|
}) => {
|
|
6542
6542
|
const c = {
|
|
@@ -6550,8 +6550,8 @@ const Js = ({
|
|
|
6550
6550
|
fieldOptions: r,
|
|
6551
6551
|
hasSubFilters: s,
|
|
6552
6552
|
hasSubGroups: n,
|
|
6553
|
-
currentColumnName:
|
|
6554
|
-
hasButtonGroup:
|
|
6553
|
+
currentColumnName: o,
|
|
6554
|
+
hasButtonGroup: i,
|
|
6555
6555
|
onClose: l
|
|
6556
6556
|
}
|
|
6557
6557
|
) });
|
|
@@ -6563,7 +6563,7 @@ function ea(t, e) {
|
|
|
6563
6563
|
type: "string"
|
|
6564
6564
|
}));
|
|
6565
6565
|
}
|
|
6566
|
-
function
|
|
6566
|
+
function kr(t, e) {
|
|
6567
6567
|
return t ? typeof t == "object" && "logic" in t && "filters" in t ? t : typeof t == "string" ? ta(t, e) : { logic: "and", filters: [] } : { logic: "and", filters: [] };
|
|
6568
6568
|
}
|
|
6569
6569
|
function ta(t, e) {
|
|
@@ -6581,12 +6581,12 @@ function ra(t, e) {
|
|
|
6581
6581
|
if (n.length === 0) return null;
|
|
6582
6582
|
const s = jt(n[0], e);
|
|
6583
6583
|
if (!s) return null;
|
|
6584
|
-
const a = s.field,
|
|
6585
|
-
(l) => jt(l, e, a.id,
|
|
6584
|
+
const a = s.field, o = s.columnsType, i = n.slice(1).map(
|
|
6585
|
+
(l) => jt(l, e, a.id, o)
|
|
6586
6586
|
).filter((l) => l !== null);
|
|
6587
6587
|
return {
|
|
6588
6588
|
logic: "or",
|
|
6589
|
-
filters: [s, ...
|
|
6589
|
+
filters: [s, ...i]
|
|
6590
6590
|
};
|
|
6591
6591
|
} else {
|
|
6592
6592
|
const n = jt(t, e);
|
|
@@ -6598,17 +6598,17 @@ function ra(t, e) {
|
|
|
6598
6598
|
}
|
|
6599
6599
|
function jt(t, e, r, n) {
|
|
6600
6600
|
const s = t.split(";").map((u) => u.trim());
|
|
6601
|
-
let a,
|
|
6601
|
+
let a, o, i;
|
|
6602
6602
|
if (s.length === 3)
|
|
6603
|
-
[a,
|
|
6603
|
+
[a, o, i] = s;
|
|
6604
6604
|
else if (s.length === 2 && r && n)
|
|
6605
|
-
[
|
|
6605
|
+
[o, i] = s, a = r;
|
|
6606
6606
|
else
|
|
6607
6607
|
return null;
|
|
6608
6608
|
const l = e.find((u) => u.id === a) ?? (r && n ? { id: r, label: r, type: n } : void 0);
|
|
6609
6609
|
if (!l)
|
|
6610
6610
|
throw new Error(`Campo '${a}' non trovato nei FieldOption.`);
|
|
6611
|
-
const c = { id:
|
|
6611
|
+
const c = { id: o, label: "" }, d = na(i, l.type);
|
|
6612
6612
|
return {
|
|
6613
6613
|
field: l,
|
|
6614
6614
|
columnsType: l.type,
|
|
@@ -6639,15 +6639,15 @@ function Xr(t, e) {
|
|
|
6639
6639
|
return aa(t, e);
|
|
6640
6640
|
}
|
|
6641
6641
|
function aa(t, e) {
|
|
6642
|
-
const { field: r, operator: n, value: s, columnsType: a } = t,
|
|
6643
|
-
if (
|
|
6642
|
+
const { field: r, operator: n, value: s, columnsType: a } = t, o = e.cells?.[r.id], i = oa(o);
|
|
6643
|
+
if (i == null) return !1;
|
|
6644
6644
|
switch (a) {
|
|
6645
6645
|
case "string":
|
|
6646
|
-
return ia(
|
|
6646
|
+
return ia(i, n.id, s);
|
|
6647
6647
|
case "number":
|
|
6648
|
-
return la(
|
|
6648
|
+
return la(i, n.id, s);
|
|
6649
6649
|
case "date":
|
|
6650
|
-
return ca(
|
|
6650
|
+
return ca(i, n.id, s);
|
|
6651
6651
|
default:
|
|
6652
6652
|
return !1;
|
|
6653
6653
|
}
|
|
@@ -6726,12 +6726,12 @@ const ua = (t, e) => {
|
|
|
6726
6726
|
groups: n,
|
|
6727
6727
|
columnSizingMode: s = "fixed",
|
|
6728
6728
|
showGroupBar: a = !0,
|
|
6729
|
-
Filter:
|
|
6730
|
-
enableSelection:
|
|
6729
|
+
Filter: o,
|
|
6730
|
+
enableSelection: i = !1
|
|
6731
6731
|
}) => {
|
|
6732
6732
|
const [l, c] = Y(
|
|
6733
6733
|
t ?? { columns: [], rows: [] }
|
|
6734
|
-
), [d, u] = Y(n || []), [p, y] = Y(/* @__PURE__ */ new Set()), [f, x] = Y(!1), [E, w] = Y(/* @__PURE__ */ new Set()), [b, C] = Y(null), S = it(() => ea(t?.columns || []), [t?.columns]), [g, N] = Y(() =>
|
|
6734
|
+
), [d, u] = Y(n || []), [p, y] = Y(/* @__PURE__ */ new Set()), [f, x] = Y(!1), [E, w] = Y(/* @__PURE__ */ new Set()), [b, C] = Y(null), S = it(() => ea(t?.columns || []), [t?.columns]), [g, N] = Y(() => kr(o, S)), F = ue({}), R = ue(null), { anchorRef: L, targetRef: D } = Be({
|
|
6735
6735
|
position: "bottom",
|
|
6736
6736
|
enabled: f
|
|
6737
6737
|
}), { anchorRef: j, targetRef: O } = Be({
|
|
@@ -6773,8 +6773,8 @@ const ua = (t, e) => {
|
|
|
6773
6773
|
const v = oe((T) => {
|
|
6774
6774
|
N(T);
|
|
6775
6775
|
}, []), $ = oe(() => {
|
|
6776
|
-
N(
|
|
6777
|
-
}, [
|
|
6776
|
+
N(kr(o, S));
|
|
6777
|
+
}, [o, S]), k = oe(() => {
|
|
6778
6778
|
x((T) => !T);
|
|
6779
6779
|
}, []), _ = oe((T) => {
|
|
6780
6780
|
C((P) => P === T ? null : T);
|
|
@@ -6825,18 +6825,18 @@ const ua = (t, e) => {
|
|
|
6825
6825
|
children: /* @__PURE__ */ h.jsxs("table", { children: [
|
|
6826
6826
|
/* @__PURE__ */ h.jsxs("thead", { children: [
|
|
6827
6827
|
/* @__PURE__ */ h.jsxs("tr", { className: te.datatableToolbar, children: [
|
|
6828
|
-
/* @__PURE__ */ h.jsx("th", { children: /* @__PURE__ */ h.jsxs("div", { ref:
|
|
6828
|
+
/* @__PURE__ */ h.jsx("th", { children: /* @__PURE__ */ h.jsxs("div", { ref: L, className: te.datatableFilter, children: [
|
|
6829
6829
|
/* @__PURE__ */ h.jsx(
|
|
6830
6830
|
fe,
|
|
6831
6831
|
{
|
|
6832
|
-
onClick:
|
|
6832
|
+
onClick: k,
|
|
6833
6833
|
bindValue: `${J}`,
|
|
6834
6834
|
label: f ? "Nascondi filtri" : "Mostra filtri",
|
|
6835
6835
|
icon: "filter_list",
|
|
6836
6836
|
variant: "base"
|
|
6837
6837
|
}
|
|
6838
6838
|
),
|
|
6839
|
-
(
|
|
6839
|
+
(o || J > 0) && /* @__PURE__ */ h.jsx(h.Fragment, { children: /* @__PURE__ */ h.jsx(
|
|
6840
6840
|
fe,
|
|
6841
6841
|
{
|
|
6842
6842
|
onClick: $,
|
|
@@ -6859,7 +6859,7 @@ const ua = (t, e) => {
|
|
|
6859
6859
|
)
|
|
6860
6860
|
] }),
|
|
6861
6861
|
f && /* @__PURE__ */ h.jsx(We, { children: /* @__PURE__ */ h.jsx(
|
|
6862
|
-
|
|
6862
|
+
Lr,
|
|
6863
6863
|
{
|
|
6864
6864
|
filters: g,
|
|
6865
6865
|
fieldOptions: S,
|
|
@@ -6867,11 +6867,11 @@ const ua = (t, e) => {
|
|
|
6867
6867
|
hasSubGroups: !0,
|
|
6868
6868
|
ref: D,
|
|
6869
6869
|
hasSubFilters: !1,
|
|
6870
|
-
onClose:
|
|
6870
|
+
onClose: k
|
|
6871
6871
|
}
|
|
6872
6872
|
) }),
|
|
6873
6873
|
/* @__PURE__ */ h.jsxs("tr", { children: [
|
|
6874
|
-
|
|
6874
|
+
i && /* @__PURE__ */ h.jsx("th", { className: te.headerCell, children: /* @__PURE__ */ h.jsx(
|
|
6875
6875
|
Bt,
|
|
6876
6876
|
{
|
|
6877
6877
|
bindValue: z,
|
|
@@ -6901,7 +6901,7 @@ const ua = (t, e) => {
|
|
|
6901
6901
|
},
|
|
6902
6902
|
children: [
|
|
6903
6903
|
/* @__PURE__ */ h.jsx(
|
|
6904
|
-
|
|
6904
|
+
ke,
|
|
6905
6905
|
{
|
|
6906
6906
|
variant: "title",
|
|
6907
6907
|
bindValue: T.title
|
|
@@ -6922,7 +6922,7 @@ const ua = (t, e) => {
|
|
|
6922
6922
|
}
|
|
6923
6923
|
),
|
|
6924
6924
|
b === T.name && /* @__PURE__ */ h.jsx(We, { children: /* @__PURE__ */ h.jsx(
|
|
6925
|
-
|
|
6925
|
+
Lr,
|
|
6926
6926
|
{
|
|
6927
6927
|
filters: g,
|
|
6928
6928
|
fieldOptions: S.filter(
|
|
@@ -6978,7 +6978,7 @@ const ua = (t, e) => {
|
|
|
6978
6978
|
rowHeight: e,
|
|
6979
6979
|
offsetTop: G,
|
|
6980
6980
|
isGroup: !1,
|
|
6981
|
-
enableSelection:
|
|
6981
|
+
enableSelection: i,
|
|
6982
6982
|
isSelected: E.has(P),
|
|
6983
6983
|
onToggleSelect: () => {
|
|
6984
6984
|
X(P);
|
|
@@ -6998,8 +6998,8 @@ const ua = (t, e) => {
|
|
|
6998
6998
|
SubmitPosition: n = "Right",
|
|
6999
6999
|
DefaultValue: s,
|
|
7000
7000
|
Label: a,
|
|
7001
|
-
LabelPosition:
|
|
7002
|
-
onBlur:
|
|
7001
|
+
LabelPosition: o = "Left",
|
|
7002
|
+
onBlur: i,
|
|
7003
7003
|
onClick: l,
|
|
7004
7004
|
onOptionsRequest: c
|
|
7005
7005
|
}) => {
|
|
@@ -7015,7 +7015,7 @@ const ua = (t, e) => {
|
|
|
7015
7015
|
const y = {
|
|
7016
7016
|
container: `smp-field-container ${de(r) ? `smp-field-position-${n}` : ""}`
|
|
7017
7017
|
}, f = () => {
|
|
7018
|
-
de(r) ||
|
|
7018
|
+
de(r) || i?.(d);
|
|
7019
7019
|
};
|
|
7020
7020
|
if (d)
|
|
7021
7021
|
return /* @__PURE__ */ h.jsxs("div", { className: y.container, children: [
|
|
@@ -7029,7 +7029,7 @@ const ua = (t, e) => {
|
|
|
7029
7029
|
font: "var(--smp-fontLabel-base)"
|
|
7030
7030
|
},
|
|
7031
7031
|
children: /* @__PURE__ */ h.jsx(
|
|
7032
|
-
|
|
7032
|
+
Le,
|
|
7033
7033
|
{
|
|
7034
7034
|
...d,
|
|
7035
7035
|
id: "FLD",
|
|
@@ -7038,7 +7038,7 @@ const ua = (t, e) => {
|
|
|
7038
7038
|
fun: t?.fun,
|
|
7039
7039
|
onBlur: f,
|
|
7040
7040
|
label: a,
|
|
7041
|
-
labelPosition:
|
|
7041
|
+
labelPosition: o
|
|
7042
7042
|
}
|
|
7043
7043
|
)
|
|
7044
7044
|
}
|
|
@@ -7053,18 +7053,26 @@ const ua = (t, e) => {
|
|
|
7053
7053
|
}
|
|
7054
7054
|
)
|
|
7055
7055
|
] });
|
|
7056
|
-
}, fa = (t) => t?.type === "SmeupDataTree", pa = (t) => t?.type === "SmeupDataTable", ha = (t) =>
|
|
7057
|
-
(
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7056
|
+
}, fa = (t) => t?.type === "SmeupDataTree", pa = (t) => t?.type === "SmeupDataTable", ha = (t) => {
|
|
7057
|
+
if (fa(t))
|
|
7058
|
+
return t.children ? t.children.map(
|
|
7059
|
+
(e) => ({
|
|
7060
|
+
id: e.obj.k,
|
|
7061
|
+
label: e.value ?? ""
|
|
7062
|
+
})
|
|
7063
|
+
) : [];
|
|
7064
|
+
if (pa(t)) {
|
|
7065
|
+
const e = t.columns.filter((r) => r.visible !== !1).map((r) => r.name);
|
|
7066
|
+
return t.rows.map((r) => {
|
|
7067
|
+
const n = Object.entries(r.cells).filter(([o]) => e.includes(o)), [s, a] = n;
|
|
7068
|
+
return {
|
|
7069
|
+
id: s?.[1].obj.k,
|
|
7070
|
+
label: a?.[1].value || a?.[1].obj.k
|
|
7071
|
+
};
|
|
7072
|
+
});
|
|
7073
|
+
}
|
|
7074
|
+
return [];
|
|
7075
|
+
}, ma = {
|
|
7068
7076
|
"smp-form": "_smp-form_9ox03_1"
|
|
7069
7077
|
}, Ca = ({
|
|
7070
7078
|
data: t,
|
|
@@ -7073,8 +7081,8 @@ const ua = (t, e) => {
|
|
|
7073
7081
|
hiddenSubmitButton: n = !1,
|
|
7074
7082
|
updateOnClick: s = !1,
|
|
7075
7083
|
decimalSeparator: a = ".",
|
|
7076
|
-
optionsHandler:
|
|
7077
|
-
onSubmit:
|
|
7084
|
+
optionsHandler: o,
|
|
7085
|
+
onSubmit: i,
|
|
7078
7086
|
onCheck: l,
|
|
7079
7087
|
onCheckObj: c,
|
|
7080
7088
|
onContextMenu: d,
|
|
@@ -7084,37 +7092,37 @@ const ua = (t, e) => {
|
|
|
7084
7092
|
ae(() => {
|
|
7085
7093
|
y(S(t));
|
|
7086
7094
|
}, [t]);
|
|
7087
|
-
const E = (R,
|
|
7095
|
+
const E = (R, L) => {
|
|
7088
7096
|
if (y((D) => ({
|
|
7089
7097
|
...D,
|
|
7090
7098
|
[R]: {
|
|
7091
7099
|
...D[R],
|
|
7092
7100
|
obj: {
|
|
7093
7101
|
...D[R].obj,
|
|
7094
|
-
k:
|
|
7102
|
+
k: L.obj.k
|
|
7095
7103
|
},
|
|
7096
|
-
decode:
|
|
7104
|
+
decode: L.decode,
|
|
7097
7105
|
data: {
|
|
7098
7106
|
...D[R].data,
|
|
7099
7107
|
error: void 0
|
|
7100
7108
|
},
|
|
7101
7109
|
// FIXME: remove this when webup.js will not use value
|
|
7102
|
-
value:
|
|
7110
|
+
value: L.obj.k
|
|
7103
7111
|
}
|
|
7104
|
-
})), s && (
|
|
7112
|
+
})), s && (L.shape == ee.CHECKBOX || L.shape == ee.SWITCH)) {
|
|
7105
7113
|
const D = structuredClone(p);
|
|
7106
|
-
D[R].obj.k =
|
|
7114
|
+
D[R].obj.k = L.obj.k, D[R].value = L.obj.k, i({
|
|
7107
7115
|
value: g(D),
|
|
7108
7116
|
cell: R
|
|
7109
7117
|
});
|
|
7110
7118
|
}
|
|
7111
7119
|
}, w = (R) => {
|
|
7112
|
-
const
|
|
7113
|
-
|
|
7114
|
-
value:
|
|
7120
|
+
const L = g(p);
|
|
7121
|
+
i({
|
|
7122
|
+
value: L,
|
|
7115
7123
|
cell: R
|
|
7116
7124
|
});
|
|
7117
|
-
}, b = (R,
|
|
7125
|
+
}, b = (R, L) => {
|
|
7118
7126
|
u?.({
|
|
7119
7127
|
cellId: R,
|
|
7120
7128
|
currentState: {
|
|
@@ -7126,7 +7134,7 @@ const ua = (t, e) => {
|
|
|
7126
7134
|
}
|
|
7127
7135
|
]
|
|
7128
7136
|
},
|
|
7129
|
-
fun:
|
|
7137
|
+
fun: L || ""
|
|
7130
7138
|
});
|
|
7131
7139
|
}, C = async (R) => {
|
|
7132
7140
|
if (p[R].obj.k != t.rows[0].cells[R].obj.k && (p[R].inputSettings?.checkObject && c && ((await c({
|
|
@@ -7143,24 +7151,24 @@ const ua = (t, e) => {
|
|
|
7143
7151
|
}
|
|
7144
7152
|
}
|
|
7145
7153
|
}))), p[R].inputSettings?.checkValueOnExit)) {
|
|
7146
|
-
const
|
|
7154
|
+
const L = g(p);
|
|
7147
7155
|
l?.({
|
|
7148
|
-
value:
|
|
7156
|
+
value: L,
|
|
7149
7157
|
cell: R
|
|
7150
7158
|
});
|
|
7151
7159
|
}
|
|
7152
7160
|
}, S = (R) => {
|
|
7153
7161
|
if (!R.rows?.length || !R.columns?.length)
|
|
7154
7162
|
return {};
|
|
7155
|
-
const
|
|
7163
|
+
const L = R.rows?.[0];
|
|
7156
7164
|
return R.columns.filter((D) => D.visible ?? !0).reduce((D, j) => {
|
|
7157
7165
|
const O = {
|
|
7158
|
-
...
|
|
7166
|
+
...L.cells[j.name],
|
|
7159
7167
|
id: j.name,
|
|
7160
7168
|
label: j.title,
|
|
7161
7169
|
dSep: a,
|
|
7162
7170
|
data: {
|
|
7163
|
-
...
|
|
7171
|
+
...L.cells[j.name].data,
|
|
7164
7172
|
dSep: a
|
|
7165
7173
|
}
|
|
7166
7174
|
};
|
|
@@ -7180,23 +7188,23 @@ const ua = (t, e) => {
|
|
|
7180
7188
|
}
|
|
7181
7189
|
]
|
|
7182
7190
|
}
|
|
7183
|
-
}), N = t.setup?.commands?.map((R,
|
|
7184
|
-
|
|
7191
|
+
}), N = t.setup?.commands?.map((R, L) => /* @__PURE__ */ Zr(
|
|
7192
|
+
Le,
|
|
7185
7193
|
{
|
|
7186
7194
|
...R,
|
|
7187
7195
|
decode: R.value,
|
|
7188
7196
|
data: {
|
|
7189
7197
|
label: R.value
|
|
7190
7198
|
},
|
|
7191
|
-
id: `command-${
|
|
7192
|
-
key: `command-${
|
|
7199
|
+
id: `command-${L}`,
|
|
7200
|
+
key: `command-${L}`,
|
|
7193
7201
|
shape: ee.BUTTON,
|
|
7194
7202
|
onClick: () => w(R.obj.k)
|
|
7195
7203
|
}
|
|
7196
7204
|
)) || [];
|
|
7197
7205
|
n || N.unshift(
|
|
7198
7206
|
/* @__PURE__ */ h.jsx(
|
|
7199
|
-
|
|
7207
|
+
Le,
|
|
7200
7208
|
{
|
|
7201
7209
|
decode: f(Re.CONFIRM_BUTTON),
|
|
7202
7210
|
shape: ee.BUTTON,
|
|
@@ -7228,13 +7236,13 @@ const ua = (t, e) => {
|
|
|
7228
7236
|
},
|
|
7229
7237
|
children: [
|
|
7230
7238
|
/* @__PURE__ */ h.jsx(dt, { layout: t.rows[0].layout, children: Object.values(p).map((R) => /* @__PURE__ */ h.jsx(
|
|
7231
|
-
|
|
7239
|
+
Le,
|
|
7232
7240
|
{
|
|
7233
7241
|
...R,
|
|
7234
|
-
onOptionsRequest: R.fun ? async (
|
|
7235
|
-
await
|
|
7242
|
+
onOptionsRequest: R.fun ? async (L, D) => ha(
|
|
7243
|
+
await o(L, D, t, R.id)
|
|
7236
7244
|
) : void 0,
|
|
7237
|
-
onChange: (
|
|
7245
|
+
onChange: (L) => E(R.id, L),
|
|
7238
7246
|
onBlur: () => C(R.id),
|
|
7239
7247
|
onContextMenu: d,
|
|
7240
7248
|
onClick: () => {
|