@mrreality255/turbo-react 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +37 -20
- package/dist/index.es.js +1307 -1035
- package/dist/index.umd.js +19 -3
- package/package.json +56 -56
package/dist/index.es.js
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import lr, { createContext as qe, useContext as
|
|
2
|
-
|
|
1
|
+
import lr, { createContext as qe, useContext as B, useId as Ge, useRef as J, useEffect as L, useState as V, useMemo as Ze, createElement as ur } from "react";
|
|
2
|
+
import { createPortal as ps } from "react-dom";
|
|
3
|
+
var tt = { exports: {} }, Ve = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-runtime.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
3
13
|
var Sn;
|
|
4
|
-
function
|
|
14
|
+
function Os() {
|
|
5
15
|
if (Sn) return Ve;
|
|
6
16
|
Sn = 1;
|
|
7
|
-
var t =
|
|
17
|
+
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
8
18
|
function n(r, s, i) {
|
|
9
19
|
var a = null;
|
|
10
20
|
if (i !== void 0 && (a = "" + i), s.key !== void 0 && (a = "" + s.key), "key" in s) {
|
|
@@ -23,8 +33,17 @@ function Ss() {
|
|
|
23
33
|
return Ve.Fragment = e, Ve.jsx = n, Ve.jsxs = n, Ve;
|
|
24
34
|
}
|
|
25
35
|
var Re = {};
|
|
36
|
+
/**
|
|
37
|
+
* @license React
|
|
38
|
+
* react-jsx-runtime.development.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
26
45
|
var pn;
|
|
27
|
-
function
|
|
46
|
+
function Ns() {
|
|
28
47
|
return pn || (pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
48
|
function t(f) {
|
|
30
49
|
if (f == null) return null;
|
|
@@ -36,7 +55,7 @@ function ps() {
|
|
|
36
55
|
return "Fragment";
|
|
37
56
|
case K:
|
|
38
57
|
return "Profiler";
|
|
39
|
-
case
|
|
58
|
+
case G:
|
|
40
59
|
return "StrictMode";
|
|
41
60
|
case St:
|
|
42
61
|
return "Suspense";
|
|
@@ -55,7 +74,7 @@ function ps() {
|
|
|
55
74
|
return f.displayName || "Context";
|
|
56
75
|
case ce:
|
|
57
76
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
58
|
-
case
|
|
77
|
+
case Qe:
|
|
59
78
|
var b = f.render;
|
|
60
79
|
return f = f.displayName, f || (f = b.displayName || b.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
61
80
|
case Ot:
|
|
@@ -132,15 +151,15 @@ function ps() {
|
|
|
132
151
|
"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."
|
|
133
152
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
134
153
|
}
|
|
135
|
-
function
|
|
136
|
-
var
|
|
154
|
+
function d(f, b, p, D, et, Ct) {
|
|
155
|
+
var I = p.ref;
|
|
137
156
|
return f = {
|
|
138
157
|
$$typeof: S,
|
|
139
158
|
type: f,
|
|
140
159
|
key: b,
|
|
141
160
|
props: p,
|
|
142
161
|
_owner: D
|
|
143
|
-
}, (
|
|
162
|
+
}, (I !== void 0 ? I : null) !== null ? Object.defineProperty(f, "ref", {
|
|
144
163
|
enumerable: !1,
|
|
145
164
|
get: l
|
|
146
165
|
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
@@ -157,7 +176,7 @@ function ps() {
|
|
|
157
176
|
configurable: !1,
|
|
158
177
|
enumerable: !1,
|
|
159
178
|
writable: !0,
|
|
160
|
-
value:
|
|
179
|
+
value: et
|
|
161
180
|
}), Object.defineProperty(f, "_debugTask", {
|
|
162
181
|
configurable: !1,
|
|
163
182
|
enumerable: !1,
|
|
@@ -165,25 +184,25 @@ function ps() {
|
|
|
165
184
|
value: Ct
|
|
166
185
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
167
186
|
}
|
|
168
|
-
function
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
187
|
+
function c(f, b, p, D, et, Ct) {
|
|
188
|
+
var I = b.children;
|
|
189
|
+
if (I !== void 0)
|
|
171
190
|
if (D)
|
|
172
|
-
if (
|
|
173
|
-
for (D = 0; D <
|
|
174
|
-
m(
|
|
175
|
-
Object.freeze && Object.freeze(
|
|
191
|
+
if (Ts(I)) {
|
|
192
|
+
for (D = 0; D < I.length; D++)
|
|
193
|
+
m(I[D]);
|
|
194
|
+
Object.freeze && Object.freeze(I);
|
|
176
195
|
} else
|
|
177
196
|
console.error(
|
|
178
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
198
|
);
|
|
180
|
-
else m(
|
|
199
|
+
else m(I);
|
|
181
200
|
if (vn.call(b, "key")) {
|
|
182
|
-
|
|
183
|
-
var ke = Object.keys(b).filter(function(
|
|
184
|
-
return
|
|
201
|
+
I = t(f);
|
|
202
|
+
var ke = Object.keys(b).filter(function(Ss) {
|
|
203
|
+
return Ss !== "key";
|
|
185
204
|
});
|
|
186
|
-
D = 0 < ke.length ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}", Tn[
|
|
205
|
+
D = 0 < ke.length ? "{key: someKey, " + ke.join(": ..., ") + ": ...}" : "{key: someKey}", Tn[I + D] || (ke = 0 < ke.length ? "{" + ke.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
188
207
|
let props = %s;
|
|
189
208
|
<%s {...props} />
|
|
@@ -191,25 +210,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
191
210
|
let props = %s;
|
|
192
211
|
<%s key={someKey} {...props} />`,
|
|
193
212
|
D,
|
|
194
|
-
|
|
213
|
+
I,
|
|
195
214
|
ke,
|
|
196
|
-
|
|
197
|
-
), Tn[
|
|
215
|
+
I
|
|
216
|
+
), Tn[I + D] = !0);
|
|
198
217
|
}
|
|
199
|
-
if (
|
|
218
|
+
if (I = null, p !== void 0 && (n(p), I = "" + p), a(b) && (n(b.key), I = "" + b.key), "key" in b) {
|
|
200
219
|
p = {};
|
|
201
220
|
for (var Dt in b)
|
|
202
221
|
Dt !== "key" && (p[Dt] = b[Dt]);
|
|
203
222
|
} else p = b;
|
|
204
|
-
return
|
|
223
|
+
return I && o(
|
|
205
224
|
p,
|
|
206
225
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
207
|
-
),
|
|
226
|
+
), d(
|
|
208
227
|
f,
|
|
209
|
-
|
|
228
|
+
I,
|
|
210
229
|
p,
|
|
211
230
|
s(),
|
|
212
|
-
|
|
231
|
+
et,
|
|
213
232
|
Ct
|
|
214
233
|
);
|
|
215
234
|
}
|
|
@@ -219,7 +238,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
219
238
|
function g(f) {
|
|
220
239
|
return typeof f == "object" && f !== null && f.$$typeof === S;
|
|
221
240
|
}
|
|
222
|
-
var y = lr, S =
|
|
241
|
+
var y = lr, S = Symbol.for("react.transitional.element"), R = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), G = Symbol.for("react.strict_mode"), K = Symbol.for("react.profiler"), ce = Symbol.for("react.consumer"), be = Symbol.for("react.context"), Qe = Symbol.for("react.forward_ref"), St = Symbol.for("react.suspense"), pt = Symbol.for("react.suspense_list"), Ot = Symbol.for("react.memo"), X = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), Nt = Symbol.for("react.client.reference"), Et = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, vn = Object.prototype.hasOwnProperty, Ts = Array.isArray, Mt = console.createTask ? console.createTask : function() {
|
|
223
242
|
return null;
|
|
224
243
|
};
|
|
225
244
|
y = {
|
|
@@ -233,7 +252,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
252
|
)(), _n = Mt(r(i)), Tn = {};
|
|
234
253
|
Re.Fragment = C, Re.jsx = function(f, b, p) {
|
|
235
254
|
var D = 1e4 > Et.recentlyCreatedOwnerStacks++;
|
|
236
|
-
return
|
|
255
|
+
return c(
|
|
237
256
|
f,
|
|
238
257
|
b,
|
|
239
258
|
p,
|
|
@@ -243,7 +262,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
243
262
|
);
|
|
244
263
|
}, Re.jsxs = function(f, b, p) {
|
|
245
264
|
var D = 1e4 > Et.recentlyCreatedOwnerStacks++;
|
|
246
|
-
return
|
|
265
|
+
return c(
|
|
247
266
|
f,
|
|
248
267
|
b,
|
|
249
268
|
p,
|
|
@@ -255,51 +274,51 @@ React keys must be passed directly to JSX without using spread:
|
|
|
255
274
|
})()), Re;
|
|
256
275
|
}
|
|
257
276
|
var On;
|
|
258
|
-
function
|
|
259
|
-
return On || (On = 1, process.env.NODE_ENV === "production" ?
|
|
260
|
-
}
|
|
261
|
-
var u =
|
|
262
|
-
const
|
|
263
|
-
text:
|
|
264
|
-
fill:
|
|
265
|
-
btn:
|
|
266
|
-
default: "
|
|
267
|
-
down:
|
|
268
|
-
plain:
|
|
277
|
+
function Es() {
|
|
278
|
+
return On || (On = 1, process.env.NODE_ENV === "production" ? tt.exports = Os() : tt.exports = Ns()), tt.exports;
|
|
279
|
+
}
|
|
280
|
+
var u = Es();
|
|
281
|
+
const Ms = "_text_153u7_13", Cs = "_fill_153u7_21", Ds = "_btn_153u7_28", Is = "_down_153u7_59", Fs = "_plain_153u7_77", js = "_link_153u7_115", Vs = "_green_153u7_139", Rs = "_blue_153u7_163", Ws = "_cyan_153u7_193", $s = "_dark_153u7_225", Ls = "_grey_153u7_254", As = "_dialog_153u7_271", Ps = "_red_153u7_281", zs = "_mono_153u7_322", Q = {
|
|
282
|
+
text: Ms,
|
|
283
|
+
fill: Cs,
|
|
284
|
+
btn: Ds,
|
|
285
|
+
default: "_default_153u7_39",
|
|
286
|
+
down: Is,
|
|
287
|
+
plain: Fs,
|
|
269
288
|
link: js,
|
|
270
|
-
green:
|
|
271
|
-
blue:
|
|
272
|
-
cyan:
|
|
273
|
-
dark:
|
|
274
|
-
grey:
|
|
275
|
-
dialog:
|
|
276
|
-
red:
|
|
277
|
-
mono:
|
|
289
|
+
green: Vs,
|
|
290
|
+
blue: Rs,
|
|
291
|
+
cyan: Ws,
|
|
292
|
+
dark: $s,
|
|
293
|
+
grey: Ls,
|
|
294
|
+
dialog: As,
|
|
295
|
+
red: Ps,
|
|
296
|
+
mono: zs
|
|
278
297
|
}, cr = qe("blue");
|
|
279
298
|
function re(t) {
|
|
280
299
|
return /* @__PURE__ */ u.jsx(cr.Provider, { value: t.palette, children: t.children });
|
|
281
300
|
}
|
|
282
301
|
function E(t, e) {
|
|
283
|
-
const n =
|
|
302
|
+
const n = B(cr), r = (e?.palette ?? n) || "mono";
|
|
284
303
|
return {
|
|
285
304
|
palette: r,
|
|
286
305
|
styles: function(...s) {
|
|
287
306
|
if (!t)
|
|
288
307
|
return s.map((a) => a).join(" ");
|
|
289
308
|
const i = t[r];
|
|
290
|
-
return i && (s = [...s, i]), s.map((a) => typeof a == "string" ? t[a] ?? a :
|
|
309
|
+
return i && (s = [...s, i]), s.map((a) => typeof a == "string" ? t[a] ?? a : Us(a, t)).join(" ");
|
|
291
310
|
}
|
|
292
311
|
};
|
|
293
312
|
}
|
|
294
|
-
function
|
|
313
|
+
function Us(t, e) {
|
|
295
314
|
return Object.keys(t).filter((n) => t[n]).map((n) => e[n] ?? n).join(" ");
|
|
296
315
|
}
|
|
297
316
|
const Ce = qe(null);
|
|
298
317
|
function dr() {
|
|
299
|
-
return
|
|
318
|
+
return B(Ce);
|
|
300
319
|
}
|
|
301
320
|
function an(t) {
|
|
302
|
-
const e = dr(), n = E(Q, t), r =
|
|
321
|
+
const e = dr(), n = E(Q, t), r = Ge(), s = J(null);
|
|
303
322
|
return L(() => {
|
|
304
323
|
e && !e.submitRef?.ref && t.default && !t.disabled && s?.current && e.setDefaultSubmit({
|
|
305
324
|
id: r,
|
|
@@ -321,12 +340,12 @@ function an(t) {
|
|
|
321
340
|
[Q.link]: t.variant == "link" || t.variant == "text",
|
|
322
341
|
[Q.text]: t.variant == "text"
|
|
323
342
|
}),
|
|
324
|
-
style: { width: t.width ??
|
|
343
|
+
style: { width: t.width ?? Zs(t) },
|
|
325
344
|
children: t.children
|
|
326
345
|
}
|
|
327
346
|
);
|
|
328
347
|
}
|
|
329
|
-
function
|
|
348
|
+
function Zs(t) {
|
|
330
349
|
switch (!0) {
|
|
331
350
|
case t.w0:
|
|
332
351
|
return "80px";
|
|
@@ -334,12 +353,13 @@ function zs(t) {
|
|
|
334
353
|
return "120px";
|
|
335
354
|
}
|
|
336
355
|
}
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
356
|
+
const Hs = "_cbWrapper_vu1th_1", Ys = "_cb_vu1th_1", qs = "_disabled_vu1th_33", Gs = "_mono_vu1th_45", Bs = "_dialog_vu1th_53", Js = "_green_vu1th_61", We = {
|
|
357
|
+
cbWrapper: Hs,
|
|
358
|
+
cb: Ys,
|
|
359
|
+
disabled: qs,
|
|
360
|
+
mono: Gs,
|
|
361
|
+
dialog: Bs,
|
|
362
|
+
green: Js
|
|
343
363
|
}, ue = {
|
|
344
364
|
handleChange: function(t, e) {
|
|
345
365
|
return t = e.onChanging ? e.onChanging(t) : t, e.onChange?.(t), t;
|
|
@@ -354,91 +374,91 @@ const Us = "_cb_1yqjk_1", Zs = "_disabled_1yqjk_51", qs = "_mono_1yqjk_75", Hs =
|
|
|
354
374
|
submitRef: { ref: void 0, id: void 0 }
|
|
355
375
|
};
|
|
356
376
|
},
|
|
357
|
-
newFormContext: function(t, e) {
|
|
377
|
+
newFormContext: function(t, e, n) {
|
|
358
378
|
return {
|
|
359
379
|
...t,
|
|
360
380
|
updateDataContext: e,
|
|
361
|
-
setDefaultSubmit: function(
|
|
362
|
-
e(function(
|
|
381
|
+
setDefaultSubmit: function(s) {
|
|
382
|
+
e(function(i) {
|
|
363
383
|
return {
|
|
364
|
-
...
|
|
384
|
+
...i,
|
|
365
385
|
submitRef: {
|
|
366
|
-
ref:
|
|
367
|
-
id:
|
|
386
|
+
ref: s ? s.ref : void 0,
|
|
387
|
+
id: s ? s.id : void 0
|
|
368
388
|
}
|
|
369
389
|
};
|
|
370
390
|
});
|
|
371
391
|
},
|
|
372
|
-
initializeField: function(
|
|
373
|
-
e((
|
|
374
|
-
...
|
|
392
|
+
initializeField: function(s, i, a) {
|
|
393
|
+
e((o) => o.data[s] ? o : {
|
|
394
|
+
...o,
|
|
375
395
|
submitRef: {
|
|
376
396
|
callback: void 0,
|
|
377
397
|
id: void 0
|
|
378
398
|
},
|
|
379
|
-
isValid:
|
|
399
|
+
isValid: o.isValid && a,
|
|
380
400
|
data: {
|
|
381
|
-
...
|
|
382
|
-
[
|
|
383
|
-
isValid:
|
|
384
|
-
value:
|
|
401
|
+
...o.data,
|
|
402
|
+
[s]: {
|
|
403
|
+
isValid: a,
|
|
404
|
+
value: i,
|
|
385
405
|
origValue: null
|
|
386
406
|
}
|
|
387
407
|
}
|
|
388
408
|
});
|
|
389
409
|
},
|
|
390
|
-
checked: function(
|
|
391
|
-
return
|
|
410
|
+
checked: function(s) {
|
|
411
|
+
return r(s) === "true";
|
|
392
412
|
},
|
|
393
|
-
get:
|
|
413
|
+
get: r,
|
|
394
414
|
getContent: () => ue.getDataContent(t),
|
|
395
|
-
setDisabled: function(
|
|
396
|
-
e((
|
|
397
|
-
...
|
|
398
|
-
isDisabled:
|
|
415
|
+
setDisabled: function(s) {
|
|
416
|
+
e((i) => ({
|
|
417
|
+
...i,
|
|
418
|
+
isDisabled: s
|
|
399
419
|
}));
|
|
400
420
|
},
|
|
401
|
-
setError: function(
|
|
402
|
-
e((
|
|
421
|
+
setError: function(s) {
|
|
422
|
+
e((i) => ({ ...i, error: s }));
|
|
403
423
|
},
|
|
404
|
-
setLoading: function(
|
|
405
|
-
e((
|
|
406
|
-
...
|
|
407
|
-
isDisabled:
|
|
408
|
-
isLoading:
|
|
424
|
+
setLoading: function(s) {
|
|
425
|
+
e((i) => ({
|
|
426
|
+
...i,
|
|
427
|
+
isDisabled: s,
|
|
428
|
+
isLoading: s
|
|
409
429
|
}));
|
|
410
430
|
},
|
|
411
|
-
update: function(
|
|
412
|
-
e((
|
|
413
|
-
const
|
|
414
|
-
return
|
|
431
|
+
update: function(s, i, a) {
|
|
432
|
+
e((o) => {
|
|
433
|
+
const l = o.data[s];
|
|
434
|
+
return Xs(
|
|
415
435
|
{
|
|
416
|
-
...
|
|
436
|
+
...o,
|
|
417
437
|
isValidated: !1,
|
|
418
438
|
error: void 0,
|
|
419
439
|
data: {
|
|
420
|
-
...
|
|
421
|
-
[
|
|
422
|
-
origValue:
|
|
423
|
-
isValid:
|
|
424
|
-
value:
|
|
440
|
+
...o.data,
|
|
441
|
+
[s]: {
|
|
442
|
+
origValue: l?.origValue === null || typeof l?.value == "object" ? null : l?.origValue ?? (l?.value || ""),
|
|
443
|
+
isValid: a,
|
|
444
|
+
value: i
|
|
425
445
|
}
|
|
426
446
|
}
|
|
427
447
|
},
|
|
428
|
-
|
|
448
|
+
a
|
|
429
449
|
);
|
|
430
|
-
});
|
|
450
|
+
}), n && n({ id: s, newValue: i });
|
|
431
451
|
},
|
|
432
452
|
validate: function() {
|
|
433
|
-
return e((
|
|
453
|
+
return e((s) => Yt(s)), t.isValid ?? !1;
|
|
434
454
|
}
|
|
435
455
|
};
|
|
436
|
-
function
|
|
437
|
-
return t.data[
|
|
456
|
+
function r(s) {
|
|
457
|
+
return t.data[s]?.value;
|
|
438
458
|
}
|
|
439
459
|
},
|
|
440
460
|
getDataContent: Zt,
|
|
441
|
-
getInitialState:
|
|
461
|
+
getInitialState: Ht
|
|
442
462
|
};
|
|
443
463
|
function Zt(t) {
|
|
444
464
|
const e = {};
|
|
@@ -457,18 +477,18 @@ function Zt(t) {
|
|
|
457
477
|
}
|
|
458
478
|
}), e;
|
|
459
479
|
}
|
|
460
|
-
function
|
|
480
|
+
function Ht(t) {
|
|
461
481
|
if (t !== void 0)
|
|
462
482
|
return {
|
|
463
483
|
isLoading: !1,
|
|
464
484
|
isValidated: !1,
|
|
465
485
|
isDisabled: !1,
|
|
466
486
|
isValid: !1,
|
|
467
|
-
data:
|
|
487
|
+
data: Ks(t),
|
|
468
488
|
submitRef: { ref: void 0, id: void 0 }
|
|
469
489
|
};
|
|
470
490
|
}
|
|
471
|
-
function
|
|
491
|
+
function Ks(t) {
|
|
472
492
|
const e = {};
|
|
473
493
|
return Object.keys(t).forEach((n) => {
|
|
474
494
|
const r = t[n];
|
|
@@ -482,7 +502,7 @@ function Bs(t) {
|
|
|
482
502
|
origValue: null,
|
|
483
503
|
value: {
|
|
484
504
|
mode: "list",
|
|
485
|
-
items: r.map((s) =>
|
|
505
|
+
items: r.map((s) => Ht(s))
|
|
486
506
|
}
|
|
487
507
|
};
|
|
488
508
|
return;
|
|
@@ -491,34 +511,34 @@ function Bs(t) {
|
|
|
491
511
|
isValid: void 0,
|
|
492
512
|
origValue: null,
|
|
493
513
|
value: {
|
|
494
|
-
...
|
|
514
|
+
...Ht(r),
|
|
495
515
|
mode: "datacontext"
|
|
496
516
|
}
|
|
497
517
|
};
|
|
498
518
|
}), e;
|
|
499
519
|
}
|
|
500
|
-
function
|
|
520
|
+
function Yt(t) {
|
|
501
521
|
return t = { ...t, isValidated: !0, data: { ...t.data } }, Object.keys(t.data).forEach((e) => {
|
|
502
522
|
const n = t.data[e].value;
|
|
503
523
|
if (typeof n != "string")
|
|
504
524
|
switch (n.mode) {
|
|
505
525
|
case "datacontext":
|
|
506
526
|
t.data[e].value = {
|
|
507
|
-
...
|
|
527
|
+
...Yt(n),
|
|
508
528
|
mode: "datacontext"
|
|
509
529
|
};
|
|
510
530
|
break;
|
|
511
531
|
case "list":
|
|
512
532
|
const s = {
|
|
513
533
|
mode: "list",
|
|
514
|
-
items: t.data[e].value.items.map((i) =>
|
|
534
|
+
items: t.data[e].value.items.map((i) => Yt(i))
|
|
515
535
|
};
|
|
516
536
|
t.data[e].value = s;
|
|
517
537
|
break;
|
|
518
538
|
}
|
|
519
539
|
}), t;
|
|
520
540
|
}
|
|
521
|
-
function
|
|
541
|
+
function Xs(t, e) {
|
|
522
542
|
if (!e)
|
|
523
543
|
return { ...t, isValid: !1 };
|
|
524
544
|
const n = !Object.keys(t.data).find((r) => !t.data[r].isValid);
|
|
@@ -538,15 +558,15 @@ function wt(t, e) {
|
|
|
538
558
|
t.autoFocus && e && e.current?.focus();
|
|
539
559
|
}, [e]);
|
|
540
560
|
}
|
|
541
|
-
function
|
|
542
|
-
const e =
|
|
543
|
-
return wt(t, s), /* @__PURE__ */ u.jsxs(
|
|
561
|
+
function Qs(t) {
|
|
562
|
+
const e = Ge(), n = E(We, t), r = gt(t), s = J(null);
|
|
563
|
+
return wt(t, s), /* @__PURE__ */ u.jsxs("div", { className: n.styles(We.cbWrapper), children: [
|
|
544
564
|
/* @__PURE__ */ u.jsx(
|
|
545
565
|
"input",
|
|
546
566
|
{
|
|
547
567
|
ref: s,
|
|
548
568
|
checked: r.value == "true",
|
|
549
|
-
className: n.styles(
|
|
569
|
+
className: n.styles(We.cb),
|
|
550
570
|
id: e,
|
|
551
571
|
type: "checkbox",
|
|
552
572
|
disabled: t.disabled,
|
|
@@ -555,17 +575,26 @@ function Js(t) {
|
|
|
555
575
|
}
|
|
556
576
|
}
|
|
557
577
|
),
|
|
558
|
-
t.caption && /* @__PURE__ */ u.jsx(
|
|
578
|
+
t.caption && /* @__PURE__ */ u.jsx(
|
|
579
|
+
"label",
|
|
580
|
+
{
|
|
581
|
+
className: n.styles(We.cb, {
|
|
582
|
+
[We.disabled]: !!t.disabled
|
|
583
|
+
}),
|
|
584
|
+
htmlFor: e,
|
|
585
|
+
children: t.caption
|
|
586
|
+
}
|
|
587
|
+
)
|
|
559
588
|
] });
|
|
560
589
|
}
|
|
561
|
-
const
|
|
590
|
+
const ei = 100;
|
|
562
591
|
function fr(t, e) {
|
|
563
|
-
t = t || "resize", e = e ??
|
|
564
|
-
const n =
|
|
592
|
+
t = t || "resize", e = e ?? ei;
|
|
593
|
+
const n = ti(t, e), r = Ze(() => ({
|
|
565
594
|
transition: n,
|
|
566
595
|
transform: t == "resize" ? "scale(0.1)" : void 0,
|
|
567
596
|
opacity: t == "opacity" ? 0 : void 0
|
|
568
|
-
}), []), s =
|
|
597
|
+
}), []), s = B(ve), [i, a] = V(r);
|
|
569
598
|
return L(() => {
|
|
570
599
|
a({
|
|
571
600
|
transition: n,
|
|
@@ -587,7 +616,7 @@ function fr(t, e) {
|
|
|
587
616
|
}
|
|
588
617
|
};
|
|
589
618
|
}
|
|
590
|
-
function
|
|
619
|
+
function ti(t, e) {
|
|
591
620
|
switch (e = e / 1e3, t) {
|
|
592
621
|
case "resize":
|
|
593
622
|
return `transform ${e}s ease`;
|
|
@@ -599,27 +628,29 @@ function hr(t) {
|
|
|
599
628
|
const e = fr(t.effect, t.animationDuration), n = e.get();
|
|
600
629
|
return t.emptyMode ? t.onRender(() => e.close(t.onClose), n) : /* @__PURE__ */ u.jsx("div", { style: n, children: t.onRender(() => e.close(t.onClose), n) });
|
|
601
630
|
}
|
|
602
|
-
const
|
|
603
|
-
tb:
|
|
604
|
-
prefix:
|
|
605
|
-
empty:
|
|
606
|
-
tbWrapper:
|
|
607
|
-
green:
|
|
608
|
-
dialog:
|
|
609
|
-
blue:
|
|
610
|
-
grey:
|
|
611
|
-
mono:
|
|
612
|
-
red:
|
|
631
|
+
const ni = "_tb_2zn0x_1", ri = "_prefix_2zn0x_37", si = "_empty_2zn0x_43", ii = "_tbWrapper_2zn0x_49", ai = "_green_2zn0x_52", oi = "_dialog_2zn0x_56", li = "_blue_2zn0x_65", ui = "_grey_2zn0x_73", ci = "_mono_2zn0x_77", di = "_red_2zn0x_82", fe = {
|
|
632
|
+
tb: ni,
|
|
633
|
+
prefix: ri,
|
|
634
|
+
empty: si,
|
|
635
|
+
tbWrapper: ii,
|
|
636
|
+
green: ai,
|
|
637
|
+
dialog: oi,
|
|
638
|
+
blue: li,
|
|
639
|
+
grey: ui,
|
|
640
|
+
mono: ci,
|
|
641
|
+
red: di
|
|
613
642
|
};
|
|
614
643
|
function on(t) {
|
|
615
|
-
const e = E(fe, t), n =
|
|
644
|
+
const e = E(fe, t), n = Ge(), r = J(null), s = t.inputRef ?? r, i = gt(t), a = dr();
|
|
616
645
|
return wt(t, r), /* @__PURE__ */ u.jsxs("div", { className: e.styles("tbWrapper"), children: [
|
|
617
646
|
t.caption && /* @__PURE__ */ u.jsx("label", { htmlFor: n, children: t.caption }),
|
|
618
647
|
/* @__PURE__ */ u.jsxs("div", { ref: t.wrapperRef, className: e.styles(fe.tb), children: [
|
|
619
648
|
/* @__PURE__ */ u.jsx(
|
|
620
649
|
"div",
|
|
621
650
|
{
|
|
622
|
-
className: e.styles(fe.prefix, {
|
|
651
|
+
className: e.styles(fe.prefix, {
|
|
652
|
+
[fe.empty]: !t.prefix
|
|
653
|
+
}),
|
|
623
654
|
style: { color: t.prefixColor, ...t.prefixStyle },
|
|
624
655
|
children: t.prefix
|
|
625
656
|
}
|
|
@@ -650,7 +681,9 @@ function on(t) {
|
|
|
650
681
|
"div",
|
|
651
682
|
{
|
|
652
683
|
onClick: () => s.current?.focus(),
|
|
653
|
-
className: e.styles(fe.prefix, {
|
|
684
|
+
className: e.styles(fe.prefix, {
|
|
685
|
+
[fe.empty]: !t.suffix
|
|
686
|
+
}),
|
|
654
687
|
style: { color: t.suffixColor, ...t.suffixStyle },
|
|
655
688
|
children: t.suffix
|
|
656
689
|
}
|
|
@@ -658,11 +691,11 @@ function on(t) {
|
|
|
658
691
|
] })
|
|
659
692
|
] });
|
|
660
693
|
}
|
|
661
|
-
const
|
|
662
|
-
glass:
|
|
663
|
-
backdrop:
|
|
694
|
+
const fi = "_glass_13zv8_5", hi = "_backdrop_13zv8_14", Nn = {
|
|
695
|
+
glass: fi,
|
|
696
|
+
backdrop: hi
|
|
664
697
|
};
|
|
665
|
-
function
|
|
698
|
+
function He(t) {
|
|
666
699
|
const [e, n] = V(null);
|
|
667
700
|
return t.visible ? /* @__PURE__ */ u.jsx(
|
|
668
701
|
"div",
|
|
@@ -703,7 +736,7 @@ const mr = {
|
|
|
703
736
|
return t !== void 0 ? e(t) : n;
|
|
704
737
|
}
|
|
705
738
|
};
|
|
706
|
-
function
|
|
739
|
+
function H(t) {
|
|
707
740
|
const e = (t.center || t.centerV) && "50%" || t.rect?.y, n = (t.center || t.centerH) && "50%" || t.rect?.x, r = t.center || t.centerH || t.centerV ? mr.orUndefined(t.style?.transform, (s) => s + " ", "") + `translate(${t.center || t.centerH ? "-50%" : "0"},${t.center || t.centerV ? "-50%" : "0"})` : t.style?.transform;
|
|
708
741
|
return /* @__PURE__ */ u.jsx(
|
|
709
742
|
"div",
|
|
@@ -731,44 +764,44 @@ function q(t) {
|
|
|
731
764
|
}
|
|
732
765
|
);
|
|
733
766
|
}
|
|
734
|
-
const
|
|
735
|
-
clickable:
|
|
736
|
-
fullSize:
|
|
737
|
-
main:
|
|
738
|
-
shadow:
|
|
739
|
-
frameStd:
|
|
740
|
-
single:
|
|
741
|
-
borderless:
|
|
742
|
-
contentWithTitle:
|
|
743
|
-
close:
|
|
744
|
-
titleWrapper:
|
|
745
|
-
title:
|
|
746
|
-
btn:
|
|
747
|
-
contentInsideWrapper:
|
|
748
|
-
outerBox:
|
|
749
|
-
wrapper:
|
|
750
|
-
frame:
|
|
751
|
-
padding:
|
|
752
|
-
content:
|
|
753
|
-
contentPadding:
|
|
754
|
-
contentPaddingSpace:
|
|
755
|
-
outerMargin:
|
|
756
|
-
autoSize:
|
|
757
|
-
space:
|
|
758
|
-
blue:
|
|
759
|
-
frameBck:
|
|
760
|
-
cyan:
|
|
761
|
-
dark:
|
|
762
|
-
green:
|
|
763
|
-
grey:
|
|
764
|
-
dialog:
|
|
765
|
-
mono:
|
|
766
|
-
red:
|
|
767
|
+
const mi = "_clickable_23vp6_2", yi = "_fullSize_23vp6_6", gi = "_main_23vp6_11", wi = "_shadow_23vp6_15", vi = "_frameStd_23vp6_19", xi = "_single_23vp6_25", bi = "_borderless_23vp6_30", ki = "_contentWithTitle_23vp6_35", _i = "_close_23vp6_39", Ti = "_titleWrapper_23vp6_43", Si = "_title_23vp6_43", pi = "_btn_23vp6_59", Oi = "_contentInsideWrapper_23vp6_75", Ni = "_outerBox_23vp6_82", Ei = "_wrapper_23vp6_102", Mi = "_frame_23vp6_19", Ci = "_padding_23vp6_107", Di = "_content_23vp6_35", Ii = "_contentPadding_23vp6_126", Fi = "_contentPaddingSpace_23vp6_131", ji = "_outerMargin_23vp6_146", Vi = "_autoSize_23vp6_150", Ri = "_space_23vp6_150", Wi = "_blue_23vp6_203", $i = "_frameBck_23vp6_203", Li = "_cyan_23vp6_230", Ai = "_dark_23vp6_257", Pi = "_green_23vp6_284", zi = "_grey_23vp6_316", Ui = "_dialog_23vp6_362", Zi = "_mono_23vp6_404", Hi = "_red_23vp6_431", x = {
|
|
768
|
+
clickable: mi,
|
|
769
|
+
fullSize: yi,
|
|
770
|
+
main: gi,
|
|
771
|
+
shadow: wi,
|
|
772
|
+
frameStd: vi,
|
|
773
|
+
single: xi,
|
|
774
|
+
borderless: bi,
|
|
775
|
+
contentWithTitle: ki,
|
|
776
|
+
close: _i,
|
|
777
|
+
titleWrapper: Ti,
|
|
778
|
+
title: Si,
|
|
779
|
+
btn: pi,
|
|
780
|
+
contentInsideWrapper: Oi,
|
|
781
|
+
outerBox: Ni,
|
|
782
|
+
wrapper: Ei,
|
|
783
|
+
frame: Mi,
|
|
784
|
+
padding: Ci,
|
|
785
|
+
content: Di,
|
|
786
|
+
contentPadding: Ii,
|
|
787
|
+
contentPaddingSpace: Fi,
|
|
788
|
+
outerMargin: ji,
|
|
789
|
+
autoSize: Vi,
|
|
790
|
+
space: Ri,
|
|
791
|
+
blue: Wi,
|
|
792
|
+
frameBck: $i,
|
|
793
|
+
cyan: Li,
|
|
794
|
+
dark: Ai,
|
|
795
|
+
green: Pi,
|
|
796
|
+
grey: zi,
|
|
797
|
+
dialog: Ui,
|
|
798
|
+
mono: Zi,
|
|
799
|
+
red: Hi
|
|
767
800
|
};
|
|
768
801
|
function vt(t) {
|
|
769
|
-
return t.fill ? /* @__PURE__ */ u.jsx(
|
|
802
|
+
return t.fill ? /* @__PURE__ */ u.jsx(qi, { ...t }) : /* @__PURE__ */ u.jsx(Yi, { ...t });
|
|
770
803
|
}
|
|
771
|
-
function
|
|
804
|
+
function Yi(t) {
|
|
772
805
|
const e = E(x, t);
|
|
773
806
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(
|
|
774
807
|
"div",
|
|
@@ -785,26 +818,40 @@ function Ui(t) {
|
|
|
785
818
|
className: e.styles(x.frameBck, {
|
|
786
819
|
[x.shadow]: !t.noShadow
|
|
787
820
|
}),
|
|
788
|
-
children: /* @__PURE__ */ u.jsx("div", { className: x.outerMargin, children: /* @__PURE__ */ u.jsx(
|
|
821
|
+
children: /* @__PURE__ */ u.jsx("div", { className: x.outerMargin, children: /* @__PURE__ */ u.jsx(
|
|
789
822
|
"div",
|
|
790
823
|
{
|
|
791
|
-
className: e.styles(
|
|
792
|
-
[x.
|
|
793
|
-
[x.borderless]: t.border == "none"
|
|
824
|
+
className: e.styles({
|
|
825
|
+
[x.padding]: !!t.outerPadding
|
|
794
826
|
}),
|
|
795
|
-
children:
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
827
|
+
children: /* @__PURE__ */ u.jsxs(
|
|
828
|
+
"div",
|
|
829
|
+
{
|
|
830
|
+
className: e.styles(x.frameStd, {
|
|
831
|
+
[x.single]: t.border == "single",
|
|
832
|
+
[x.borderless]: t.border == "none"
|
|
833
|
+
}),
|
|
834
|
+
children: [
|
|
835
|
+
/* @__PURE__ */ u.jsx(yr, { ...t }),
|
|
836
|
+
t.caption && /* @__PURE__ */ u.jsx(
|
|
837
|
+
wr,
|
|
838
|
+
{
|
|
839
|
+
...t,
|
|
840
|
+
isFill: !1
|
|
841
|
+
}
|
|
842
|
+
),
|
|
843
|
+
/* @__PURE__ */ u.jsx(gr, { ...t })
|
|
844
|
+
]
|
|
845
|
+
}
|
|
846
|
+
)
|
|
800
847
|
}
|
|
801
|
-
) })
|
|
848
|
+
) })
|
|
802
849
|
}
|
|
803
850
|
)
|
|
804
851
|
}
|
|
805
852
|
) });
|
|
806
853
|
}
|
|
807
|
-
function
|
|
854
|
+
function qi(t) {
|
|
808
855
|
const e = E(x, t);
|
|
809
856
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(
|
|
810
857
|
"div",
|
|
@@ -820,33 +867,45 @@ function Zi(t) {
|
|
|
820
867
|
className: e.styles(x.outerBox, {
|
|
821
868
|
[x.shadow]: !t.noShadow
|
|
822
869
|
}),
|
|
823
|
-
children: /* @__PURE__ */ u.jsx(
|
|
870
|
+
children: /* @__PURE__ */ u.jsx(
|
|
824
871
|
"div",
|
|
825
872
|
{
|
|
826
|
-
className: e.styles(x.
|
|
827
|
-
|
|
828
|
-
}),
|
|
829
|
-
children: /* @__PURE__ */ u.jsxs(
|
|
873
|
+
className: e.styles(x.fullSize, x.frameBck),
|
|
874
|
+
children: /* @__PURE__ */ u.jsx(
|
|
830
875
|
"div",
|
|
831
876
|
{
|
|
832
|
-
className: e.styles(
|
|
833
|
-
x.
|
|
834
|
-
|
|
835
|
-
|
|
877
|
+
className: e.styles(x.wrapper, {
|
|
878
|
+
[x.padding]: !!t.outerPadding
|
|
879
|
+
}),
|
|
880
|
+
children: /* @__PURE__ */ u.jsxs(
|
|
881
|
+
"div",
|
|
836
882
|
{
|
|
837
|
-
|
|
838
|
-
|
|
883
|
+
className: e.styles(
|
|
884
|
+
x.frame,
|
|
885
|
+
x.frameStd,
|
|
886
|
+
x.frameBck,
|
|
887
|
+
{
|
|
888
|
+
[x.single]: t.border == "single",
|
|
889
|
+
[x.borderless]: t.border == "none"
|
|
890
|
+
}
|
|
891
|
+
),
|
|
892
|
+
children: [
|
|
893
|
+
/* @__PURE__ */ u.jsx(yr, { ...t }),
|
|
894
|
+
t.caption && /* @__PURE__ */ u.jsx(
|
|
895
|
+
wr,
|
|
896
|
+
{
|
|
897
|
+
...t,
|
|
898
|
+
isFill: !0
|
|
899
|
+
}
|
|
900
|
+
),
|
|
901
|
+
/* @__PURE__ */ u.jsx(gr, { ...t })
|
|
902
|
+
]
|
|
839
903
|
}
|
|
840
|
-
)
|
|
841
|
-
children: [
|
|
842
|
-
/* @__PURE__ */ u.jsx(yr, { ...t }),
|
|
843
|
-
t.caption && /* @__PURE__ */ u.jsx(wr, { ...t, isFill: !0 }),
|
|
844
|
-
/* @__PURE__ */ u.jsx(gr, { ...t })
|
|
845
|
-
]
|
|
904
|
+
)
|
|
846
905
|
}
|
|
847
906
|
)
|
|
848
907
|
}
|
|
849
|
-
)
|
|
908
|
+
)
|
|
850
909
|
}
|
|
851
910
|
)
|
|
852
911
|
}
|
|
@@ -856,7 +915,14 @@ function yr(t) {
|
|
|
856
915
|
const e = E(x, t);
|
|
857
916
|
return t.onClose ? /* @__PURE__ */ u.jsxs("div", { className: e.styles(x.close, x.frameBck), children: [
|
|
858
917
|
"[",
|
|
859
|
-
/* @__PURE__ */ u.jsx(
|
|
918
|
+
/* @__PURE__ */ u.jsx(
|
|
919
|
+
"button",
|
|
920
|
+
{
|
|
921
|
+
onClick: () => t.onClose?.(),
|
|
922
|
+
className: e.styles(x.btn),
|
|
923
|
+
children: "■"
|
|
924
|
+
}
|
|
925
|
+
),
|
|
860
926
|
"]"
|
|
861
927
|
] }) : /* @__PURE__ */ u.jsx(u.Fragment, {});
|
|
862
928
|
}
|
|
@@ -886,9 +952,6 @@ function wr(t) {
|
|
|
886
952
|
return /* @__PURE__ */ u.jsx("div", { className: sn.classes(x.titleWrapper), children: /* @__PURE__ */ u.jsx(
|
|
887
953
|
"div",
|
|
888
954
|
{
|
|
889
|
-
onKeyDown: () => {
|
|
890
|
-
alert("ddD");
|
|
891
|
-
},
|
|
892
955
|
className: sn.classes(x.title, {
|
|
893
956
|
[x.frameBck]: !t.isFill
|
|
894
957
|
}),
|
|
@@ -896,39 +959,39 @@ function wr(t) {
|
|
|
896
959
|
}
|
|
897
960
|
) });
|
|
898
961
|
}
|
|
899
|
-
const
|
|
900
|
-
menu:
|
|
901
|
-
selected:
|
|
902
|
-
disabled:
|
|
903
|
-
separator:
|
|
904
|
-
secondary:
|
|
905
|
-
prefix:
|
|
906
|
-
cyan:
|
|
907
|
-
grey:
|
|
908
|
-
mono:
|
|
909
|
-
dark:
|
|
910
|
-
green:
|
|
911
|
-
red:
|
|
912
|
-
blue:
|
|
962
|
+
const Gi = "_menu_278a8_1", Bi = "_selected_278a8_26", Ji = "_disabled_278a8_30", Ki = "_separator_278a8_35", Xi = "_secondary_278a8_40", Qi = "_prefix_278a8_44", ea = "_cyan_278a8_51", ta = "_grey_278a8_61", na = "_mono_278a8_66", ra = "_dark_278a8_71", sa = "_green_278a8_81", ia = "_red_278a8_101", aa = "_blue_278a8_111", he = {
|
|
963
|
+
menu: Gi,
|
|
964
|
+
selected: Bi,
|
|
965
|
+
disabled: Ji,
|
|
966
|
+
separator: Ki,
|
|
967
|
+
secondary: Xi,
|
|
968
|
+
prefix: Qi,
|
|
969
|
+
cyan: ea,
|
|
970
|
+
grey: ta,
|
|
971
|
+
mono: na,
|
|
972
|
+
dark: ra,
|
|
973
|
+
green: sa,
|
|
974
|
+
red: ia,
|
|
975
|
+
blue: aa
|
|
913
976
|
}, Ee = {
|
|
914
977
|
clamp: function(t, e, n) {
|
|
915
978
|
return Math.min(Math.max(t, e), n);
|
|
916
979
|
}
|
|
917
980
|
};
|
|
918
|
-
function
|
|
919
|
-
const e = E(he, t), n = J(null), r = t.items.findIndex((
|
|
981
|
+
function oa(t) {
|
|
982
|
+
const e = E(he, t), n = J(null), r = t.items.findIndex((c) => c.selected), s = Ee.clamp(r, 0, t.items.length), i = t.selectedRef ?? n;
|
|
920
983
|
return t.menuEventHandlerRef && (t.menuEventHandlerRef.current = a), L(() => {
|
|
921
984
|
i.current && i.current.parentElement?.scrollIntoView({ behavior: "smooth" });
|
|
922
|
-
}, [t.items[r]?.id]), /* @__PURE__ */ u.jsx("div", { className: e.styles(he.menu), children: /* @__PURE__ */ u.jsx("ul", { children: t.items.map((
|
|
985
|
+
}, [t.items[r]?.id]), /* @__PURE__ */ u.jsx("div", { className: e.styles(he.menu), children: /* @__PURE__ */ u.jsx("ul", { children: t.items.map((c, m) => /* @__PURE__ */ u.jsx(
|
|
923
986
|
"li",
|
|
924
987
|
{
|
|
925
988
|
onClick: (g) => {
|
|
926
|
-
g.preventDefault(), g.stopPropagation(), t.onClick?.(
|
|
989
|
+
g.preventDefault(), g.stopPropagation(), t.onClick?.(c.id);
|
|
927
990
|
},
|
|
928
991
|
className: e.styles({
|
|
929
|
-
[he.separator]: !!
|
|
930
|
-
[he.selected]: !!
|
|
931
|
-
[he.disabled]: !!
|
|
992
|
+
[he.separator]: !!c.withSeparator,
|
|
993
|
+
[he.selected]: !!c.selected,
|
|
994
|
+
[he.disabled]: !!c.disabled
|
|
932
995
|
}),
|
|
933
996
|
children: /* @__PURE__ */ u.jsxs(
|
|
934
997
|
"a",
|
|
@@ -937,20 +1000,37 @@ function sa(t) {
|
|
|
937
1000
|
onKeyDown: (g) => o(g),
|
|
938
1001
|
href: "#",
|
|
939
1002
|
onClick: (g) => {
|
|
940
|
-
g.preventDefault(), g.stopPropagation(), t.onClick?.(
|
|
1003
|
+
g.preventDefault(), g.stopPropagation(), t.onClick?.(c.id);
|
|
941
1004
|
},
|
|
942
1005
|
children: [
|
|
943
|
-
/* @__PURE__ */ u.jsx(
|
|
944
|
-
|
|
945
|
-
|
|
1006
|
+
/* @__PURE__ */ u.jsx(
|
|
1007
|
+
"span",
|
|
1008
|
+
{
|
|
1009
|
+
className: he.prefix,
|
|
1010
|
+
style: {
|
|
1011
|
+
color: c.prefixColor,
|
|
1012
|
+
width: c.prefixWidth
|
|
1013
|
+
},
|
|
1014
|
+
children: c.prefix
|
|
1015
|
+
}
|
|
1016
|
+
),
|
|
1017
|
+
c.caption || c.id,
|
|
1018
|
+
/* @__PURE__ */ u.jsx(
|
|
1019
|
+
"span",
|
|
1020
|
+
{
|
|
1021
|
+
className: he.secondary,
|
|
1022
|
+
style: { color: c.secondaryColor },
|
|
1023
|
+
children: c.secondary
|
|
1024
|
+
}
|
|
1025
|
+
)
|
|
946
1026
|
]
|
|
947
1027
|
}
|
|
948
1028
|
)
|
|
949
1029
|
},
|
|
950
|
-
|
|
1030
|
+
c.id
|
|
951
1031
|
)) }) });
|
|
952
|
-
function a(
|
|
953
|
-
switch (
|
|
1032
|
+
function a(c) {
|
|
1033
|
+
switch (c) {
|
|
954
1034
|
case "ArrowDown":
|
|
955
1035
|
return t.onSelect?.(l(1, !0)), !0;
|
|
956
1036
|
case "End":
|
|
@@ -969,39 +1049,39 @@ function sa(t) {
|
|
|
969
1049
|
}
|
|
970
1050
|
return !1;
|
|
971
1051
|
}
|
|
972
|
-
function o(
|
|
973
|
-
a(
|
|
1052
|
+
function o(c) {
|
|
1053
|
+
a(c.code) && (c.stopPropagation(), c.preventDefault());
|
|
974
1054
|
}
|
|
975
|
-
function l(
|
|
976
|
-
return t.items[c
|
|
1055
|
+
function l(c, m) {
|
|
1056
|
+
return t.items[d(c, m)].id;
|
|
977
1057
|
}
|
|
978
|
-
function c
|
|
979
|
-
const g =
|
|
980
|
-
for (
|
|
981
|
-
m ? s +
|
|
1058
|
+
function d(c, m) {
|
|
1059
|
+
const g = c >= 0 ? 1 : -1;
|
|
1060
|
+
for (c = Ee.clamp(
|
|
1061
|
+
m ? s + c : c == -1 ? t.items.length - 1 : c,
|
|
982
1062
|
0,
|
|
983
1063
|
t.items.length - 1
|
|
984
|
-
);
|
|
985
|
-
if (t.items[
|
|
986
|
-
return
|
|
987
|
-
|
|
1064
|
+
); c >= 0 && c < t.items.length; ) {
|
|
1065
|
+
if (t.items[c] && !t.items[c].disabled)
|
|
1066
|
+
return c;
|
|
1067
|
+
c += g;
|
|
988
1068
|
}
|
|
989
|
-
return
|
|
1069
|
+
return c;
|
|
990
1070
|
}
|
|
991
1071
|
}
|
|
992
|
-
function
|
|
993
|
-
const e = t.items.map((
|
|
994
|
-
...
|
|
995
|
-
selected:
|
|
996
|
-
id: t.mode == "combo" ?
|
|
997
|
-
})).filter((
|
|
1072
|
+
function la(t) {
|
|
1073
|
+
const e = t.items.map((d) => ({
|
|
1074
|
+
...d,
|
|
1075
|
+
selected: d.id == t.value,
|
|
1076
|
+
id: t.mode == "combo" ? d.caption || "" : d.id
|
|
1077
|
+
})).filter((d) => d.id), n = ua(t);
|
|
998
1078
|
return /* @__PURE__ */ u.jsx(
|
|
999
|
-
|
|
1079
|
+
da,
|
|
1000
1080
|
{
|
|
1001
1081
|
...t,
|
|
1002
1082
|
dl: n,
|
|
1003
1083
|
popup: /* @__PURE__ */ u.jsx(
|
|
1004
|
-
|
|
1084
|
+
fa,
|
|
1005
1085
|
{
|
|
1006
1086
|
filterCaption: t.filterCaption ?? "Filter",
|
|
1007
1087
|
autoFocus: !0,
|
|
@@ -1012,7 +1092,7 @@ function ia(t) {
|
|
|
1012
1092
|
onClose: () => {
|
|
1013
1093
|
n.setShowOpen(!1), n.flagDisableFocus.disabled = !0, n.inputRef.current?.focus(), n.flagDisableFocus.disabled = !1;
|
|
1014
1094
|
},
|
|
1015
|
-
onMatchFilter: (
|
|
1095
|
+
onMatchFilter: (d, c) => t.onMatchFilter ? t.onMatchFilter(d, c) : (c = c.toLowerCase(), (d.id + "," + d.caption).toLowerCase().includes(c)),
|
|
1016
1096
|
windowPalette: n.windowPalette
|
|
1017
1097
|
}
|
|
1018
1098
|
),
|
|
@@ -1024,14 +1104,24 @@ function ia(t) {
|
|
|
1024
1104
|
inputRef: n.inputRef,
|
|
1025
1105
|
value: r(),
|
|
1026
1106
|
wrapperRef: n.wrapperRef,
|
|
1027
|
-
suffix: /* @__PURE__ */ u.jsx(
|
|
1107
|
+
suffix: /* @__PURE__ */ u.jsx(
|
|
1108
|
+
an,
|
|
1109
|
+
{
|
|
1110
|
+
variant: "link",
|
|
1111
|
+
disabled: t.disabled,
|
|
1112
|
+
onClick: () => l(),
|
|
1113
|
+
children: "▼"
|
|
1114
|
+
}
|
|
1115
|
+
),
|
|
1028
1116
|
suffixStyle: { opacity: t.items.length == 0 ? 0.3 : void 0 },
|
|
1029
1117
|
readOnly: n.mode == "select",
|
|
1030
|
-
inputStyle: {
|
|
1118
|
+
inputStyle: {
|
|
1119
|
+
cursor: t.items.length > 0 ? "pointer" : void 0
|
|
1120
|
+
},
|
|
1031
1121
|
onClick: () => s(),
|
|
1032
1122
|
onFocus: () => a(),
|
|
1033
|
-
onChange: (
|
|
1034
|
-
onKeyDown: (
|
|
1123
|
+
onChange: (d) => i(d),
|
|
1124
|
+
onKeyDown: (d, c) => o(d, c)
|
|
1035
1125
|
}
|
|
1036
1126
|
)
|
|
1037
1127
|
}
|
|
@@ -1039,7 +1129,7 @@ function ia(t) {
|
|
|
1039
1129
|
function r() {
|
|
1040
1130
|
switch (n.mode) {
|
|
1041
1131
|
case "select":
|
|
1042
|
-
return t.items.find((
|
|
1132
|
+
return t.items.find((d) => d.id == n.v.value)?.caption || "";
|
|
1043
1133
|
case "combo":
|
|
1044
1134
|
return t.value;
|
|
1045
1135
|
}
|
|
@@ -1047,32 +1137,36 @@ function ia(t) {
|
|
|
1047
1137
|
function s() {
|
|
1048
1138
|
n.mode == "select" && l(), n.mode == "combo" && !t.value && l();
|
|
1049
1139
|
}
|
|
1050
|
-
function i(
|
|
1051
|
-
n.mode
|
|
1140
|
+
function i(d) {
|
|
1141
|
+
switch (n.mode) {
|
|
1142
|
+
case "combo":
|
|
1143
|
+
n.v.set(d);
|
|
1144
|
+
break;
|
|
1145
|
+
}
|
|
1052
1146
|
}
|
|
1053
1147
|
function a() {
|
|
1054
1148
|
!n.flagDisableFocus.disabled && n.mode == "select" && n.setShowOpen(t.items.length > 0);
|
|
1055
1149
|
}
|
|
1056
|
-
function o(
|
|
1057
|
-
(
|
|
1150
|
+
function o(d, c) {
|
|
1151
|
+
(d == "ArrowUp" || d == "ArrowDown" || d == "F3") && (l(), c.stopPropagation());
|
|
1058
1152
|
}
|
|
1059
1153
|
function l() {
|
|
1060
1154
|
n.setShowOpen(t.items.length > 0);
|
|
1061
1155
|
}
|
|
1062
1156
|
}
|
|
1063
|
-
function
|
|
1064
|
-
const e = gt(t), n = E(void 0, t), r = J(null), s = J(null), [i, a] = V(!1), o = t.windowPalette ?? (n.palette == "dialog" ? "blue" : n.palette), l = t.hasFilter === void 0 ? t.items.length > 8 : t.hasFilter,
|
|
1157
|
+
function ua(t) {
|
|
1158
|
+
const e = gt(t), n = E(void 0, t), r = J(null), s = J(null), [i, a] = V(!1), o = t.windowPalette ?? (n.palette == "dialog" ? "blue" : n.palette), l = t.hasFilter === void 0 ? t.items.length > 8 : t.hasFilter, d = l ? 4 : 0, c = Ee.clamp(t.items.length * 2.3 + 2.7 + d, 3, 21), m = J(null);
|
|
1065
1159
|
L(() => {
|
|
1066
1160
|
if (!m.current || !C)
|
|
1067
1161
|
return;
|
|
1068
1162
|
const K = m.current.getBoundingClientRect(), ce = C.y + C.height, be = ce + K.height - (window.visualViewport?.height || 0);
|
|
1069
1163
|
y(ce - (be > 0 ? be : 0));
|
|
1070
1164
|
}, [m.current, i]);
|
|
1071
|
-
const [g, y] = V(0), S = t.wrapperRef ?? r, R = t.inputRef ?? s, C = S.current && S.current.getBoundingClientRect(),
|
|
1165
|
+
const [g, y] = V(0), S = t.wrapperRef ?? r, R = t.inputRef ?? s, C = S.current && S.current.getBoundingClientRect(), G = Ze(() => ({ disabled: !1 }), []);
|
|
1072
1166
|
return wt(t, s), {
|
|
1073
|
-
flagDisableFocus:
|
|
1167
|
+
flagDisableFocus: G,
|
|
1074
1168
|
hasFilter: l,
|
|
1075
|
-
height:
|
|
1169
|
+
height: c,
|
|
1076
1170
|
mode: t.mode || "select",
|
|
1077
1171
|
palette: n,
|
|
1078
1172
|
rect: C,
|
|
@@ -1086,42 +1180,51 @@ function aa(t) {
|
|
|
1086
1180
|
wrapperRef: S
|
|
1087
1181
|
};
|
|
1088
1182
|
}
|
|
1089
|
-
function
|
|
1183
|
+
function ca(t) {
|
|
1184
|
+
const e = t.dl;
|
|
1185
|
+
return ps(
|
|
1186
|
+
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1187
|
+
/* @__PURE__ */ u.jsx(He, { visible: e.showOpen, backdrop: !0 }),
|
|
1188
|
+
/* @__PURE__ */ u.jsx(
|
|
1189
|
+
He,
|
|
1190
|
+
{
|
|
1191
|
+
visible: e.showOpen,
|
|
1192
|
+
onClick: () => {
|
|
1193
|
+
e.setShowOpen(!1);
|
|
1194
|
+
},
|
|
1195
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1196
|
+
H,
|
|
1197
|
+
{
|
|
1198
|
+
onClick: (n) => {
|
|
1199
|
+
n.stopPropagation();
|
|
1200
|
+
},
|
|
1201
|
+
divRef: e.viewportRef,
|
|
1202
|
+
rect: {
|
|
1203
|
+
x: e.rect?.x,
|
|
1204
|
+
y: e.windowY
|
|
1205
|
+
},
|
|
1206
|
+
width: e.rect?.width,
|
|
1207
|
+
height: `${e.height}em`,
|
|
1208
|
+
children: t.popup
|
|
1209
|
+
}
|
|
1210
|
+
)
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
] }),
|
|
1214
|
+
document.body
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
function da(t) {
|
|
1090
1218
|
const e = t.dl;
|
|
1091
1219
|
return /* @__PURE__ */ u.jsxs(re, { ...e.palette, children: [
|
|
1092
|
-
/* @__PURE__ */ u.jsx(
|
|
1093
|
-
/* @__PURE__ */ u.jsx(
|
|
1094
|
-
Ue,
|
|
1095
|
-
{
|
|
1096
|
-
visible: e.showOpen,
|
|
1097
|
-
onClick: () => {
|
|
1098
|
-
e.setShowOpen(!1);
|
|
1099
|
-
},
|
|
1100
|
-
children: /* @__PURE__ */ u.jsx(
|
|
1101
|
-
q,
|
|
1102
|
-
{
|
|
1103
|
-
onClick: (n) => {
|
|
1104
|
-
n.stopPropagation();
|
|
1105
|
-
},
|
|
1106
|
-
divRef: e.viewportRef,
|
|
1107
|
-
rect: {
|
|
1108
|
-
x: e.rect?.x,
|
|
1109
|
-
y: e.windowY
|
|
1110
|
-
},
|
|
1111
|
-
width: e.rect?.width,
|
|
1112
|
-
height: `${e.height}em`,
|
|
1113
|
-
children: t.popup
|
|
1114
|
-
}
|
|
1115
|
-
)
|
|
1116
|
-
}
|
|
1117
|
-
),
|
|
1220
|
+
/* @__PURE__ */ u.jsx(ca, { ...t }),
|
|
1118
1221
|
t.children
|
|
1119
1222
|
] });
|
|
1120
1223
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const [e, n] = V(""), r = J(null), [s, i] = V(t.v.value), a = t.menu.filter((
|
|
1123
|
-
...
|
|
1124
|
-
selected:
|
|
1224
|
+
function fa(t) {
|
|
1225
|
+
const [e, n] = V(""), r = J(null), [s, i] = V(t.v.value), a = t.menu.filter((c) => t.onMatchFilter(c, e)).map((c) => ({
|
|
1226
|
+
...c,
|
|
1227
|
+
selected: c.id == s
|
|
1125
1228
|
}));
|
|
1126
1229
|
L(() => {
|
|
1127
1230
|
r.current && t.autoFocus && !t.hasFilter && r.current.focus();
|
|
@@ -1134,110 +1237,138 @@ function la(t) {
|
|
|
1134
1237
|
onClose: () => {
|
|
1135
1238
|
t.onClose();
|
|
1136
1239
|
},
|
|
1137
|
-
onRender: (
|
|
1240
|
+
onRender: (c, m) => /* @__PURE__ */ u.jsxs(
|
|
1138
1241
|
vt,
|
|
1139
1242
|
{
|
|
1140
|
-
onHotKey: (g, y) =>
|
|
1243
|
+
onHotKey: (g, y) => d(g, y, c),
|
|
1141
1244
|
style: m,
|
|
1142
1245
|
caption: t.caption,
|
|
1143
1246
|
onClose: () => {
|
|
1144
|
-
|
|
1247
|
+
c();
|
|
1145
1248
|
},
|
|
1146
1249
|
fill: !0,
|
|
1147
1250
|
palette: t.windowPalette,
|
|
1148
1251
|
children: [
|
|
1149
|
-
t.hasFilter && /* @__PURE__ */ u.jsx(
|
|
1150
|
-
|
|
1252
|
+
t.hasFilter && /* @__PURE__ */ u.jsx(
|
|
1253
|
+
H,
|
|
1151
1254
|
{
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1255
|
+
rect: { y2: "4em", y: 0, x: 0, x2: 0 },
|
|
1256
|
+
width: "100%",
|
|
1257
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1258
|
+
on,
|
|
1259
|
+
{
|
|
1260
|
+
autoFocus: !0,
|
|
1261
|
+
value: e,
|
|
1262
|
+
onChange: (g) => n(g),
|
|
1263
|
+
caption: t.filterCaption,
|
|
1264
|
+
onKeyDown: (g, y) => l(g, y)
|
|
1265
|
+
}
|
|
1266
|
+
)
|
|
1157
1267
|
}
|
|
1158
|
-
)
|
|
1159
|
-
/* @__PURE__ */ u.jsx(
|
|
1160
|
-
|
|
1268
|
+
),
|
|
1269
|
+
/* @__PURE__ */ u.jsx(
|
|
1270
|
+
H,
|
|
1161
1271
|
{
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1272
|
+
rect: {
|
|
1273
|
+
y: t.hasFilter ? "4.5em" : 0,
|
|
1274
|
+
y2: 0,
|
|
1275
|
+
x: 0,
|
|
1276
|
+
x2: 0
|
|
1167
1277
|
},
|
|
1168
|
-
|
|
1278
|
+
width: "100%",
|
|
1279
|
+
scrollbar: !0,
|
|
1280
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1281
|
+
oa,
|
|
1282
|
+
{
|
|
1283
|
+
menuEventHandlerRef: o,
|
|
1284
|
+
selectedRef: r,
|
|
1285
|
+
items: a,
|
|
1286
|
+
onClick: (g) => {
|
|
1287
|
+
t.v.set(g), c();
|
|
1288
|
+
},
|
|
1289
|
+
onSelect: (g) => i(g)
|
|
1290
|
+
}
|
|
1291
|
+
)
|
|
1169
1292
|
}
|
|
1170
|
-
)
|
|
1293
|
+
)
|
|
1171
1294
|
]
|
|
1172
1295
|
}
|
|
1173
1296
|
)
|
|
1174
1297
|
}
|
|
1175
1298
|
);
|
|
1176
|
-
function l(
|
|
1177
|
-
o?.current && o.current(
|
|
1299
|
+
function l(c, m) {
|
|
1300
|
+
o?.current && o.current(c) && m.stopPropagation();
|
|
1178
1301
|
}
|
|
1179
|
-
function c
|
|
1180
|
-
if (!t.hasFilter &&
|
|
1181
|
-
const y = parseInt(
|
|
1302
|
+
function d(c, m, g) {
|
|
1303
|
+
if (!t.hasFilter && c >= "1" && c <= "9") {
|
|
1304
|
+
const y = parseInt(c) - 1;
|
|
1182
1305
|
y < t.menu.length && (t.v.set(t.menu[y].id), g());
|
|
1183
1306
|
}
|
|
1184
1307
|
}
|
|
1185
1308
|
}
|
|
1186
|
-
function
|
|
1309
|
+
function ha(t) {
|
|
1187
1310
|
const e = E(void 0, t);
|
|
1188
|
-
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(vt, { palette: "red", border: "none", innerPadding: "none", noShadow: !0, children: /* @__PURE__ */ u.jsx("div", { style: { marginTop: "0.
|
|
1189
|
-
}
|
|
1190
|
-
const
|
|
1191
|
-
gb:
|
|
1192
|
-
green:
|
|
1193
|
-
dialog:
|
|
1194
|
-
cyan:
|
|
1195
|
-
grey:
|
|
1196
|
-
red:
|
|
1197
|
-
dark:
|
|
1198
|
-
mono:
|
|
1311
|
+
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsx(vt, { palette: "red", border: "none", innerPadding: "none", noShadow: !0, children: /* @__PURE__ */ u.jsx("div", { style: { marginTop: "0.0em", marginBottom: "0.0em" }, children: t.children }) }) });
|
|
1312
|
+
}
|
|
1313
|
+
const ma = "_gb_11c0s_1", ya = "_green_11c0s_12", ga = "_dialog_11c0s_16", wa = "_cyan_11c0s_20", va = "_grey_11c0s_24", xa = "_red_11c0s_28", ba = "_dark_11c0s_36", ka = "_mono_11c0s_40", It = {
|
|
1314
|
+
gb: ma,
|
|
1315
|
+
green: ya,
|
|
1316
|
+
dialog: ga,
|
|
1317
|
+
cyan: wa,
|
|
1318
|
+
grey: va,
|
|
1319
|
+
red: xa,
|
|
1320
|
+
dark: ba,
|
|
1321
|
+
mono: ka
|
|
1199
1322
|
};
|
|
1200
|
-
function
|
|
1201
|
-
const e = E(
|
|
1323
|
+
function _a(t) {
|
|
1324
|
+
const e = E(It, t), n = Ge(), r = B(Ce);
|
|
1202
1325
|
return /* @__PURE__ */ u.jsxs("div", { children: [
|
|
1203
|
-
/* @__PURE__ */ u.jsx("label", { htmlFor: n, className: e.styles(
|
|
1326
|
+
/* @__PURE__ */ u.jsx("label", { htmlFor: n, className: e.styles(It.gb), children: t.caption }),
|
|
1204
1327
|
/* @__PURE__ */ u.jsx(we, { context: r || void 0, disabled: t.disabled, children: /* @__PURE__ */ u.jsx(
|
|
1205
1328
|
"div",
|
|
1206
1329
|
{
|
|
1207
1330
|
id: n,
|
|
1208
|
-
className: e.styles(
|
|
1331
|
+
className: e.styles(It.gb),
|
|
1209
1332
|
style: { width: t.width, height: t.height },
|
|
1210
1333
|
children: t.children
|
|
1211
1334
|
}
|
|
1212
1335
|
) })
|
|
1213
1336
|
] });
|
|
1214
1337
|
}
|
|
1215
|
-
const
|
|
1216
|
-
heading:
|
|
1217
|
-
blue:
|
|
1338
|
+
const Ta = "_heading_91071_1", Sa = "_blue_91071_14", En = {
|
|
1339
|
+
heading: Ta,
|
|
1340
|
+
blue: Sa
|
|
1218
1341
|
};
|
|
1219
|
-
function
|
|
1342
|
+
function Uu(t) {
|
|
1220
1343
|
const e = E(En, t);
|
|
1221
1344
|
return /* @__PURE__ */ u.jsx("h1", { className: e.styles(En.heading), children: t.children });
|
|
1222
1345
|
}
|
|
1223
|
-
const
|
|
1224
|
-
editable:
|
|
1225
|
-
pb:
|
|
1226
|
-
wrapper:
|
|
1227
|
-
value:
|
|
1228
|
-
editSpace:
|
|
1229
|
-
cursor:
|
|
1230
|
-
dialog:
|
|
1231
|
-
green:
|
|
1232
|
-
grey:
|
|
1233
|
-
mono:
|
|
1346
|
+
const pa = "_editable_r4hjn_1", Oa = "_pb_r4hjn_5", Na = "_wrapper_r4hjn_5", Ea = "_value_r4hjn_16", Ma = "_editSpace_r4hjn_21", Ca = "_cursor_r4hjn_28", Da = "_dialog_r4hjn_39", Ia = "_green_r4hjn_47", Fa = "_grey_r4hjn_55", ja = "_mono_r4hjn_63", se = {
|
|
1347
|
+
editable: pa,
|
|
1348
|
+
pb: Oa,
|
|
1349
|
+
wrapper: Na,
|
|
1350
|
+
value: Ea,
|
|
1351
|
+
editSpace: Ma,
|
|
1352
|
+
cursor: Ca,
|
|
1353
|
+
dialog: Da,
|
|
1354
|
+
green: Ia,
|
|
1355
|
+
grey: Fa,
|
|
1356
|
+
mono: ja
|
|
1234
1357
|
};
|
|
1235
|
-
function
|
|
1236
|
-
const [n, r] = V(null), s = t.current && t.current.getBoundingClientRect(), i =
|
|
1358
|
+
function Va(t, e) {
|
|
1359
|
+
const [n, r] = V(null), s = t.current && t.current.getBoundingClientRect(), i = Ze(() => s && n && {
|
|
1237
1360
|
...n,
|
|
1238
|
-
x: Ee.clamp(
|
|
1239
|
-
|
|
1240
|
-
|
|
1361
|
+
x: Ee.clamp(
|
|
1362
|
+
Math.round(n.x - s.x),
|
|
1363
|
+
0,
|
|
1364
|
+
s.width
|
|
1365
|
+
),
|
|
1366
|
+
y: Ee.clamp(
|
|
1367
|
+
Math.round(n.y - s.y),
|
|
1368
|
+
0,
|
|
1369
|
+
s.height
|
|
1370
|
+
)
|
|
1371
|
+
} || null, [s?.x, s?.y, s?.width, s?.height, n?.x, n?.y]), a = Ze(() => i && s && {
|
|
1241
1372
|
...i,
|
|
1242
1373
|
x: Math.round(1e4 * i?.x / s?.width) / 100,
|
|
1243
1374
|
y: Math.round(1e4 * i?.y / s?.height) / 100
|
|
@@ -1255,7 +1386,7 @@ function Ca(t, e) {
|
|
|
1255
1386
|
};
|
|
1256
1387
|
}
|
|
1257
1388
|
function vr(t) {
|
|
1258
|
-
const e = E(se, t), n = J(null), r =
|
|
1389
|
+
const e = E(se, t), n = J(null), r = Va(n, a), s = gt(t), i = s.value || "0";
|
|
1259
1390
|
return L(() => {
|
|
1260
1391
|
isNaN(Number(s.value)) && s.set("0");
|
|
1261
1392
|
}, [s.value]), /* @__PURE__ */ u.jsxs(
|
|
@@ -1275,7 +1406,7 @@ function vr(t) {
|
|
|
1275
1406
|
} : void 0,
|
|
1276
1407
|
children: [
|
|
1277
1408
|
/* @__PURE__ */ u.jsx(
|
|
1278
|
-
|
|
1409
|
+
He,
|
|
1279
1410
|
{
|
|
1280
1411
|
visible: r.mousePos !== null,
|
|
1281
1412
|
onMouseMove: (o) => r.setPos(o),
|
|
@@ -1283,15 +1414,22 @@ function vr(t) {
|
|
|
1283
1414
|
}
|
|
1284
1415
|
),
|
|
1285
1416
|
t.caption && /* @__PURE__ */ u.jsx("label", { children: t.caption }),
|
|
1286
|
-
/* @__PURE__ */ u.jsx(
|
|
1417
|
+
/* @__PURE__ */ u.jsx(
|
|
1287
1418
|
"div",
|
|
1288
1419
|
{
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1420
|
+
tabIndex: 0,
|
|
1421
|
+
className: e.styles(se.wrapper, se.editable),
|
|
1422
|
+
children: /* @__PURE__ */ u.jsx(
|
|
1423
|
+
"div",
|
|
1424
|
+
{
|
|
1425
|
+
style: {
|
|
1426
|
+
marginLeft: t.left !== void 0 ? t.left + "%" : void 0,
|
|
1427
|
+
width: (t.left !== void 0 ? parseFloat(i) - t.left : i) + "%"
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
)
|
|
1293
1431
|
}
|
|
1294
|
-
)
|
|
1432
|
+
),
|
|
1295
1433
|
t.onChange !== void 0 && !t.readOnly && /* @__PURE__ */ u.jsx("div", { className: se.editSpace, children: /* @__PURE__ */ u.jsx(
|
|
1296
1434
|
"div",
|
|
1297
1435
|
{
|
|
@@ -1307,7 +1445,7 @@ function vr(t) {
|
|
|
1307
1445
|
t.disabled || s.set("" + Math.round(l.x));
|
|
1308
1446
|
}
|
|
1309
1447
|
}
|
|
1310
|
-
function
|
|
1448
|
+
function Ra() {
|
|
1311
1449
|
const [e, n] = V({ v: 90, dir: 1 });
|
|
1312
1450
|
return L(() => {
|
|
1313
1451
|
let s = !0;
|
|
@@ -1330,23 +1468,23 @@ function Da() {
|
|
|
1330
1468
|
}, 5);
|
|
1331
1469
|
}
|
|
1332
1470
|
}
|
|
1333
|
-
const
|
|
1334
|
-
nv:
|
|
1335
|
-
label:
|
|
1336
|
-
value:
|
|
1337
|
-
blue:
|
|
1338
|
-
green:
|
|
1339
|
-
grey:
|
|
1340
|
-
dialog:
|
|
1341
|
-
},
|
|
1471
|
+
const Wa = "_nv_1r7hs_1", $a = "_label_1r7hs_5", La = "_value_1r7hs_9", Aa = "_blue_1r7hs_13", Pa = "_green_1r7hs_17", za = "_grey_1r7hs_21", Ua = "_dialog_1r7hs_25", nt = {
|
|
1472
|
+
nv: Wa,
|
|
1473
|
+
label: $a,
|
|
1474
|
+
value: La,
|
|
1475
|
+
blue: Aa,
|
|
1476
|
+
green: Pa,
|
|
1477
|
+
grey: za,
|
|
1478
|
+
dialog: Ua
|
|
1479
|
+
}, Za = {
|
|
1342
1480
|
wrapper: function(t, e, n) {
|
|
1343
1481
|
return e && (n === void 0 || n) ? e(t) : t;
|
|
1344
1482
|
}
|
|
1345
1483
|
};
|
|
1346
|
-
function
|
|
1484
|
+
function Zu(t) {
|
|
1347
1485
|
return t.items ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1348
1486
|
t.items.map((e, n) => /* @__PURE__ */ ur(
|
|
1349
|
-
|
|
1487
|
+
Ft,
|
|
1350
1488
|
{
|
|
1351
1489
|
...t,
|
|
1352
1490
|
name: e.name,
|
|
@@ -1355,33 +1493,49 @@ function $u(t) {
|
|
|
1355
1493
|
key: n
|
|
1356
1494
|
}
|
|
1357
1495
|
)),
|
|
1358
|
-
t.children && /* @__PURE__ */ u.jsx(
|
|
1359
|
-
] }) : /* @__PURE__ */ u.jsx(
|
|
1496
|
+
t.children && /* @__PURE__ */ u.jsx(Ft, { ...t })
|
|
1497
|
+
] }) : /* @__PURE__ */ u.jsx(Ft, { ...t });
|
|
1360
1498
|
}
|
|
1361
|
-
function
|
|
1362
|
-
const e = E(
|
|
1499
|
+
function Ft(t) {
|
|
1500
|
+
const e = E(nt, t);
|
|
1363
1501
|
return /* @__PURE__ */ u.jsxs(
|
|
1364
1502
|
"div",
|
|
1365
1503
|
{
|
|
1366
|
-
className: e.styles(
|
|
1504
|
+
className: e.styles(nt.nv),
|
|
1367
1505
|
style: {
|
|
1368
1506
|
display: t.labelWidth === void 0 ? void 0 : "flex"
|
|
1369
1507
|
},
|
|
1370
1508
|
children: [
|
|
1371
|
-
/* @__PURE__ */ u.jsx("div", { className: e.styles(tt.label), style: { width: t.labelWidth }, children: t.name }),
|
|
1372
1509
|
/* @__PURE__ */ u.jsx(
|
|
1373
1510
|
"div",
|
|
1374
1511
|
{
|
|
1375
|
-
className: e.styles(
|
|
1512
|
+
className: e.styles(nt.label),
|
|
1513
|
+
style: { width: t.labelWidth },
|
|
1514
|
+
children: t.name
|
|
1515
|
+
}
|
|
1516
|
+
),
|
|
1517
|
+
/* @__PURE__ */ u.jsx(
|
|
1518
|
+
"div",
|
|
1519
|
+
{
|
|
1520
|
+
className: e.styles(nt.value),
|
|
1376
1521
|
style: {
|
|
1377
1522
|
display: t.action ? "flex" : void 0,
|
|
1378
1523
|
gap: t.action ? "1em" : void 0
|
|
1379
1524
|
},
|
|
1380
|
-
children:
|
|
1525
|
+
children: Za.wrapper(
|
|
1381
1526
|
t.children,
|
|
1382
1527
|
(n) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
1383
1528
|
/* @__PURE__ */ u.jsx("div", { style: { flexGrow: 1 }, children: n }),
|
|
1384
|
-
/* @__PURE__ */ u.jsx(
|
|
1529
|
+
/* @__PURE__ */ u.jsx(
|
|
1530
|
+
"div",
|
|
1531
|
+
{
|
|
1532
|
+
style: {
|
|
1533
|
+
width: t.actionWidth,
|
|
1534
|
+
minWidth: t.actionWidth
|
|
1535
|
+
},
|
|
1536
|
+
children: t.action
|
|
1537
|
+
}
|
|
1538
|
+
)
|
|
1385
1539
|
] }),
|
|
1386
1540
|
!!t.action
|
|
1387
1541
|
)
|
|
@@ -1391,7 +1545,7 @@ function It(t) {
|
|
|
1391
1545
|
}
|
|
1392
1546
|
);
|
|
1393
1547
|
}
|
|
1394
|
-
function
|
|
1548
|
+
function Ha(t) {
|
|
1395
1549
|
const e = E(void 0, t), n = fr("opacity", 300), r = t.timeout ?? 2e3;
|
|
1396
1550
|
return L(() => {
|
|
1397
1551
|
let s = !0;
|
|
@@ -1411,7 +1565,7 @@ function Aa(t) {
|
|
|
1411
1565
|
transform: "translate(-50%, 0)"
|
|
1412
1566
|
},
|
|
1413
1567
|
children: /* @__PURE__ */ u.jsx(
|
|
1414
|
-
|
|
1568
|
+
H,
|
|
1415
1569
|
{
|
|
1416
1570
|
style: {
|
|
1417
1571
|
...n.get(),
|
|
@@ -1434,45 +1588,68 @@ function Aa(t) {
|
|
|
1434
1588
|
}
|
|
1435
1589
|
) });
|
|
1436
1590
|
}
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1591
|
+
const Ya = "_rbWrapper_1mldh_1", qa = "_rb_1mldh_1", Ga = "_disabled_1mldh_33", Ba = "_mono_1mldh_45", Ja = "_dialog_1mldh_53", Ka = "_green_1mldh_61", $e = {
|
|
1592
|
+
rbWrapper: Ya,
|
|
1593
|
+
rb: qa,
|
|
1594
|
+
disabled: Ga,
|
|
1595
|
+
mono: Ba,
|
|
1596
|
+
dialog: Ja,
|
|
1597
|
+
green: Ka
|
|
1443
1598
|
};
|
|
1444
|
-
function
|
|
1445
|
-
const e =
|
|
1446
|
-
return wt(t, r), /* @__PURE__ */ u.jsxs(
|
|
1447
|
-
/* @__PURE__ */ u.jsx(
|
|
1448
|
-
|
|
1599
|
+
function Xa(t) {
|
|
1600
|
+
const e = Ge(), n = E($e, t), r = J(null);
|
|
1601
|
+
return wt(t, r), /* @__PURE__ */ u.jsxs("div", { className: n.styles($e.rbWrapper), children: [
|
|
1602
|
+
/* @__PURE__ */ u.jsx(
|
|
1603
|
+
"input",
|
|
1604
|
+
{
|
|
1605
|
+
ref: r,
|
|
1606
|
+
className: $e.rb,
|
|
1607
|
+
id: e,
|
|
1608
|
+
type: "radio",
|
|
1609
|
+
disabled: t.disabled,
|
|
1610
|
+
checked: t.value !== void 0 ? t.value == "true" : void 0,
|
|
1611
|
+
onChange: (s) => {
|
|
1612
|
+
t.onChange?.(s.target.checked ? "true" : "");
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
),
|
|
1616
|
+
t.caption && /* @__PURE__ */ u.jsx(
|
|
1617
|
+
"label",
|
|
1618
|
+
{
|
|
1619
|
+
className: n.styles($e.rb, {
|
|
1620
|
+
[$e.disabled]: !!t.disabled
|
|
1621
|
+
}),
|
|
1622
|
+
htmlFor: e,
|
|
1623
|
+
children: t.caption
|
|
1624
|
+
}
|
|
1625
|
+
)
|
|
1449
1626
|
] });
|
|
1450
1627
|
}
|
|
1451
|
-
const
|
|
1452
|
-
tb:
|
|
1453
|
-
hdr:
|
|
1454
|
-
ptr:
|
|
1455
|
-
alt:
|
|
1456
|
-
icon:
|
|
1457
|
-
iconR:
|
|
1458
|
-
blue:
|
|
1459
|
-
red:
|
|
1460
|
-
green:
|
|
1461
|
-
dialog:
|
|
1628
|
+
const Qa = "_tb_h5mf5_1", eo = "_hdr_h5mf5_11", to = "_ptr_h5mf5_26", no = "_alt_h5mf5_34", ro = "_icon_h5mf5_42", so = "_iconR_h5mf5_47", io = "_blue_h5mf5_54", ao = "_red_h5mf5_58", oo = "_green_h5mf5_63", lo = "_dialog_h5mf5_68", te = {
|
|
1629
|
+
tb: Qa,
|
|
1630
|
+
hdr: eo,
|
|
1631
|
+
ptr: to,
|
|
1632
|
+
alt: no,
|
|
1633
|
+
icon: ro,
|
|
1634
|
+
iconR: so,
|
|
1635
|
+
blue: io,
|
|
1636
|
+
red: ao,
|
|
1637
|
+
green: oo,
|
|
1638
|
+
dialog: lo
|
|
1462
1639
|
};
|
|
1463
1640
|
class xe extends Error {
|
|
1464
1641
|
}
|
|
1465
|
-
class
|
|
1642
|
+
class uo extends xe {
|
|
1466
1643
|
constructor(e) {
|
|
1467
1644
|
super(`Invalid DateTime: ${e.toMessage()}`);
|
|
1468
1645
|
}
|
|
1469
1646
|
}
|
|
1470
|
-
class
|
|
1647
|
+
class co extends xe {
|
|
1471
1648
|
constructor(e) {
|
|
1472
1649
|
super(`Invalid Interval: ${e.toMessage()}`);
|
|
1473
1650
|
}
|
|
1474
1651
|
}
|
|
1475
|
-
class
|
|
1652
|
+
class fo extends xe {
|
|
1476
1653
|
constructor(e) {
|
|
1477
1654
|
super(`Invalid Duration: ${e.toMessage()}`);
|
|
1478
1655
|
}
|
|
@@ -1484,26 +1661,26 @@ class xr extends xe {
|
|
|
1484
1661
|
super(`Invalid unit ${e}`);
|
|
1485
1662
|
}
|
|
1486
1663
|
}
|
|
1487
|
-
class
|
|
1664
|
+
class F extends xe {
|
|
1488
1665
|
}
|
|
1489
1666
|
class ie extends xe {
|
|
1490
1667
|
constructor() {
|
|
1491
1668
|
super("Zone is an abstract class");
|
|
1492
1669
|
}
|
|
1493
1670
|
}
|
|
1494
|
-
const h = "numeric",
|
|
1671
|
+
const h = "numeric", q = "short", $ = "long", ft = {
|
|
1495
1672
|
year: h,
|
|
1496
1673
|
month: h,
|
|
1497
1674
|
day: h
|
|
1498
1675
|
}, br = {
|
|
1499
1676
|
year: h,
|
|
1500
|
-
month:
|
|
1677
|
+
month: q,
|
|
1501
1678
|
day: h
|
|
1502
|
-
},
|
|
1679
|
+
}, ho = {
|
|
1503
1680
|
year: h,
|
|
1504
|
-
month:
|
|
1681
|
+
month: q,
|
|
1505
1682
|
day: h,
|
|
1506
|
-
weekday:
|
|
1683
|
+
weekday: q
|
|
1507
1684
|
}, kr = {
|
|
1508
1685
|
year: h,
|
|
1509
1686
|
month: $,
|
|
@@ -1524,7 +1701,7 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1524
1701
|
hour: h,
|
|
1525
1702
|
minute: h,
|
|
1526
1703
|
second: h,
|
|
1527
|
-
timeZoneName:
|
|
1704
|
+
timeZoneName: q
|
|
1528
1705
|
}, Or = {
|
|
1529
1706
|
hour: h,
|
|
1530
1707
|
minute: h,
|
|
@@ -1544,7 +1721,7 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1544
1721
|
minute: h,
|
|
1545
1722
|
second: h,
|
|
1546
1723
|
hourCycle: "h23",
|
|
1547
|
-
timeZoneName:
|
|
1724
|
+
timeZoneName: q
|
|
1548
1725
|
}, Cr = {
|
|
1549
1726
|
hour: h,
|
|
1550
1727
|
minute: h,
|
|
@@ -1557,31 +1734,31 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1557
1734
|
day: h,
|
|
1558
1735
|
hour: h,
|
|
1559
1736
|
minute: h
|
|
1560
|
-
},
|
|
1737
|
+
}, Ir = {
|
|
1561
1738
|
year: h,
|
|
1562
1739
|
month: h,
|
|
1563
1740
|
day: h,
|
|
1564
1741
|
hour: h,
|
|
1565
1742
|
minute: h,
|
|
1566
1743
|
second: h
|
|
1567
|
-
},
|
|
1744
|
+
}, Fr = {
|
|
1568
1745
|
year: h,
|
|
1569
|
-
month:
|
|
1746
|
+
month: q,
|
|
1570
1747
|
day: h,
|
|
1571
1748
|
hour: h,
|
|
1572
1749
|
minute: h
|
|
1573
|
-
},
|
|
1750
|
+
}, jr = {
|
|
1574
1751
|
year: h,
|
|
1575
|
-
month:
|
|
1752
|
+
month: q,
|
|
1576
1753
|
day: h,
|
|
1577
1754
|
hour: h,
|
|
1578
1755
|
minute: h,
|
|
1579
1756
|
second: h
|
|
1580
|
-
},
|
|
1757
|
+
}, mo = {
|
|
1581
1758
|
year: h,
|
|
1582
|
-
month:
|
|
1759
|
+
month: q,
|
|
1583
1760
|
day: h,
|
|
1584
|
-
weekday:
|
|
1761
|
+
weekday: q,
|
|
1585
1762
|
hour: h,
|
|
1586
1763
|
minute: h
|
|
1587
1764
|
}, Vr = {
|
|
@@ -1590,7 +1767,7 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1590
1767
|
day: h,
|
|
1591
1768
|
hour: h,
|
|
1592
1769
|
minute: h,
|
|
1593
|
-
timeZoneName:
|
|
1770
|
+
timeZoneName: q
|
|
1594
1771
|
}, Rr = {
|
|
1595
1772
|
year: h,
|
|
1596
1773
|
month: $,
|
|
@@ -1598,7 +1775,7 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1598
1775
|
hour: h,
|
|
1599
1776
|
minute: h,
|
|
1600
1777
|
second: h,
|
|
1601
|
-
timeZoneName:
|
|
1778
|
+
timeZoneName: q
|
|
1602
1779
|
}, Wr = {
|
|
1603
1780
|
year: h,
|
|
1604
1781
|
month: $,
|
|
@@ -1617,7 +1794,7 @@ const h = "numeric", Y = "short", $ = "long", ft = {
|
|
|
1617
1794
|
second: h,
|
|
1618
1795
|
timeZoneName: $
|
|
1619
1796
|
};
|
|
1620
|
-
class
|
|
1797
|
+
class Be {
|
|
1621
1798
|
/**
|
|
1622
1799
|
* The type of zone
|
|
1623
1800
|
* @abstract
|
|
@@ -1701,14 +1878,14 @@ class Ye {
|
|
|
1701
1878
|
throw new ie();
|
|
1702
1879
|
}
|
|
1703
1880
|
}
|
|
1704
|
-
let
|
|
1705
|
-
class xt extends
|
|
1881
|
+
let jt = null;
|
|
1882
|
+
class xt extends Be {
|
|
1706
1883
|
/**
|
|
1707
1884
|
* Get a singleton instance of the local zone
|
|
1708
1885
|
* @return {SystemZone}
|
|
1709
1886
|
*/
|
|
1710
1887
|
static get instance() {
|
|
1711
|
-
return
|
|
1888
|
+
return jt === null && (jt = new xt()), jt;
|
|
1712
1889
|
}
|
|
1713
1890
|
/** @override **/
|
|
1714
1891
|
get type() {
|
|
@@ -1724,11 +1901,11 @@ class xt extends Ye {
|
|
|
1724
1901
|
}
|
|
1725
1902
|
/** @override **/
|
|
1726
1903
|
offsetName(e, { format: n, locale: r }) {
|
|
1727
|
-
return
|
|
1904
|
+
return Br(e, n, r);
|
|
1728
1905
|
}
|
|
1729
1906
|
/** @override **/
|
|
1730
1907
|
formatOffset(e, n) {
|
|
1731
|
-
return
|
|
1908
|
+
return Ue(this.offset(e), n);
|
|
1732
1909
|
}
|
|
1733
1910
|
/** @override **/
|
|
1734
1911
|
offset(e) {
|
|
@@ -1743,9 +1920,9 @@ class xt extends Ye {
|
|
|
1743
1920
|
return !0;
|
|
1744
1921
|
}
|
|
1745
1922
|
}
|
|
1746
|
-
const
|
|
1747
|
-
function
|
|
1748
|
-
let e =
|
|
1923
|
+
const qt = /* @__PURE__ */ new Map();
|
|
1924
|
+
function yo(t) {
|
|
1925
|
+
let e = qt.get(t);
|
|
1749
1926
|
return e === void 0 && (e = new Intl.DateTimeFormat("en-US", {
|
|
1750
1927
|
hour12: !1,
|
|
1751
1928
|
timeZone: t,
|
|
@@ -1756,9 +1933,9 @@ function oo(t) {
|
|
|
1756
1933
|
minute: "2-digit",
|
|
1757
1934
|
second: "2-digit",
|
|
1758
1935
|
era: "short"
|
|
1759
|
-
}),
|
|
1936
|
+
}), qt.set(t, e)), e;
|
|
1760
1937
|
}
|
|
1761
|
-
const
|
|
1938
|
+
const go = {
|
|
1762
1939
|
year: 0,
|
|
1763
1940
|
month: 1,
|
|
1764
1941
|
day: 2,
|
|
@@ -1767,20 +1944,20 @@ const lo = {
|
|
|
1767
1944
|
minute: 5,
|
|
1768
1945
|
second: 6
|
|
1769
1946
|
};
|
|
1770
|
-
function
|
|
1771
|
-
const n = t.format(e).replace(/\u200E/g, ""), r = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, s, i, a, o, l,
|
|
1772
|
-
return [a, s, i, o, l,
|
|
1947
|
+
function wo(t, e) {
|
|
1948
|
+
const n = t.format(e).replace(/\u200E/g, ""), r = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, s, i, a, o, l, d, c] = r;
|
|
1949
|
+
return [a, s, i, o, l, d, c];
|
|
1773
1950
|
}
|
|
1774
|
-
function
|
|
1951
|
+
function vo(t, e) {
|
|
1775
1952
|
const n = t.formatToParts(e), r = [];
|
|
1776
1953
|
for (let s = 0; s < n.length; s++) {
|
|
1777
|
-
const { type: i, value: a } = n[s], o =
|
|
1954
|
+
const { type: i, value: a } = n[s], o = go[i];
|
|
1778
1955
|
i === "era" ? r[o] = a : v(o) || (r[o] = parseInt(a, 10));
|
|
1779
1956
|
}
|
|
1780
1957
|
return r;
|
|
1781
1958
|
}
|
|
1782
1959
|
const Vt = /* @__PURE__ */ new Map();
|
|
1783
|
-
class ne extends
|
|
1960
|
+
class ne extends Be {
|
|
1784
1961
|
/**
|
|
1785
1962
|
* @param {string} name - Zone name
|
|
1786
1963
|
* @return {IANAZone}
|
|
@@ -1794,7 +1971,7 @@ class ne extends Ye {
|
|
|
1794
1971
|
* @return {void}
|
|
1795
1972
|
*/
|
|
1796
1973
|
static resetCache() {
|
|
1797
|
-
Vt.clear(),
|
|
1974
|
+
Vt.clear(), qt.clear();
|
|
1798
1975
|
}
|
|
1799
1976
|
/**
|
|
1800
1977
|
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
|
|
@@ -1862,7 +2039,7 @@ class ne extends Ye {
|
|
|
1862
2039
|
* @return {string}
|
|
1863
2040
|
*/
|
|
1864
2041
|
offsetName(e, { format: n, locale: r }) {
|
|
1865
|
-
return
|
|
2042
|
+
return Br(e, n, r, this.name);
|
|
1866
2043
|
}
|
|
1867
2044
|
/**
|
|
1868
2045
|
* Returns the offset's value as a string
|
|
@@ -1873,7 +2050,7 @@ class ne extends Ye {
|
|
|
1873
2050
|
* @return {string}
|
|
1874
2051
|
*/
|
|
1875
2052
|
formatOffset(e, n) {
|
|
1876
|
-
return
|
|
2053
|
+
return Ue(this.offset(e), n);
|
|
1877
2054
|
}
|
|
1878
2055
|
/**
|
|
1879
2056
|
* Return the offset in minutes for this zone at the specified timestamp.
|
|
@@ -1885,16 +2062,16 @@ class ne extends Ye {
|
|
|
1885
2062
|
if (!this.valid) return NaN;
|
|
1886
2063
|
const n = new Date(e);
|
|
1887
2064
|
if (isNaN(n)) return NaN;
|
|
1888
|
-
const r =
|
|
1889
|
-
let [s, i, a, o, l,
|
|
2065
|
+
const r = yo(this.name);
|
|
2066
|
+
let [s, i, a, o, l, d, c] = r.formatToParts ? vo(r, n) : wo(r, n);
|
|
1890
2067
|
o === "BC" && (s = -Math.abs(s) + 1);
|
|
1891
2068
|
const g = kt({
|
|
1892
2069
|
year: s,
|
|
1893
2070
|
month: i,
|
|
1894
2071
|
day: a,
|
|
1895
2072
|
hour: l === 24 ? 0 : l,
|
|
1896
|
-
minute:
|
|
1897
|
-
second:
|
|
2073
|
+
minute: d,
|
|
2074
|
+
second: c,
|
|
1898
2075
|
millisecond: 0
|
|
1899
2076
|
});
|
|
1900
2077
|
let y = +n;
|
|
@@ -1920,32 +2097,32 @@ class ne extends Ye {
|
|
|
1920
2097
|
}
|
|
1921
2098
|
}
|
|
1922
2099
|
let Mn = {};
|
|
1923
|
-
function
|
|
2100
|
+
function xo(t, e = {}) {
|
|
1924
2101
|
const n = JSON.stringify([t, e]);
|
|
1925
2102
|
let r = Mn[n];
|
|
1926
2103
|
return r || (r = new Intl.ListFormat(t, e), Mn[n] = r), r;
|
|
1927
2104
|
}
|
|
1928
|
-
const
|
|
1929
|
-
function
|
|
2105
|
+
const Gt = /* @__PURE__ */ new Map();
|
|
2106
|
+
function Bt(t, e = {}) {
|
|
1930
2107
|
const n = JSON.stringify([t, e]);
|
|
1931
|
-
let r =
|
|
1932
|
-
return r === void 0 && (r = new Intl.DateTimeFormat(t, e),
|
|
2108
|
+
let r = Gt.get(n);
|
|
2109
|
+
return r === void 0 && (r = new Intl.DateTimeFormat(t, e), Gt.set(n, r)), r;
|
|
1933
2110
|
}
|
|
1934
2111
|
const Jt = /* @__PURE__ */ new Map();
|
|
1935
|
-
function
|
|
2112
|
+
function bo(t, e = {}) {
|
|
1936
2113
|
const n = JSON.stringify([t, e]);
|
|
1937
2114
|
let r = Jt.get(n);
|
|
1938
2115
|
return r === void 0 && (r = new Intl.NumberFormat(t, e), Jt.set(n, r)), r;
|
|
1939
2116
|
}
|
|
1940
2117
|
const Kt = /* @__PURE__ */ new Map();
|
|
1941
|
-
function
|
|
2118
|
+
function ko(t, e = {}) {
|
|
1942
2119
|
const { base: n, ...r } = e, s = JSON.stringify([t, r]);
|
|
1943
2120
|
let i = Kt.get(s);
|
|
1944
2121
|
return i === void 0 && (i = new Intl.RelativeTimeFormat(t, e), Kt.set(s, i)), i;
|
|
1945
2122
|
}
|
|
1946
|
-
let
|
|
1947
|
-
function
|
|
1948
|
-
return
|
|
2123
|
+
let Ae = null;
|
|
2124
|
+
function _o() {
|
|
2125
|
+
return Ae || (Ae = new Intl.DateTimeFormat().resolvedOptions().locale, Ae);
|
|
1949
2126
|
}
|
|
1950
2127
|
const Xt = /* @__PURE__ */ new Map();
|
|
1951
2128
|
function Lr(t) {
|
|
@@ -1953,7 +2130,7 @@ function Lr(t) {
|
|
|
1953
2130
|
return e === void 0 && (e = new Intl.DateTimeFormat(t).resolvedOptions(), Xt.set(t, e)), e;
|
|
1954
2131
|
}
|
|
1955
2132
|
const Qt = /* @__PURE__ */ new Map();
|
|
1956
|
-
function
|
|
2133
|
+
function To(t) {
|
|
1957
2134
|
let e = Qt.get(t);
|
|
1958
2135
|
if (!e) {
|
|
1959
2136
|
const n = new Intl.Locale(t);
|
|
@@ -1961,7 +2138,7 @@ function go(t) {
|
|
|
1961
2138
|
}
|
|
1962
2139
|
return e;
|
|
1963
2140
|
}
|
|
1964
|
-
function
|
|
2141
|
+
function So(t) {
|
|
1965
2142
|
const e = t.indexOf("-x-");
|
|
1966
2143
|
e !== -1 && (t = t.substring(0, e));
|
|
1967
2144
|
const n = t.indexOf("-u-");
|
|
@@ -1970,19 +2147,19 @@ function wo(t) {
|
|
|
1970
2147
|
{
|
|
1971
2148
|
let r, s;
|
|
1972
2149
|
try {
|
|
1973
|
-
r =
|
|
2150
|
+
r = Bt(t).resolvedOptions(), s = t;
|
|
1974
2151
|
} catch {
|
|
1975
2152
|
const l = t.substring(0, n);
|
|
1976
|
-
r =
|
|
2153
|
+
r = Bt(l).resolvedOptions(), s = l;
|
|
1977
2154
|
}
|
|
1978
2155
|
const { numberingSystem: i, calendar: a } = r;
|
|
1979
2156
|
return [s, i, a];
|
|
1980
2157
|
}
|
|
1981
2158
|
}
|
|
1982
|
-
function
|
|
2159
|
+
function po(t, e, n) {
|
|
1983
2160
|
return (n || e) && (t.includes("-u-") || (t += "-u"), n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t;
|
|
1984
2161
|
}
|
|
1985
|
-
function
|
|
2162
|
+
function Oo(t) {
|
|
1986
2163
|
const e = [];
|
|
1987
2164
|
for (let n = 1; n <= 12; n++) {
|
|
1988
2165
|
const r = w.utc(2009, n, 1);
|
|
@@ -1990,7 +2167,7 @@ function xo(t) {
|
|
|
1990
2167
|
}
|
|
1991
2168
|
return e;
|
|
1992
2169
|
}
|
|
1993
|
-
function
|
|
2170
|
+
function No(t) {
|
|
1994
2171
|
const e = [];
|
|
1995
2172
|
for (let n = 1; n <= 7; n++) {
|
|
1996
2173
|
const r = w.utc(2016, 11, 13 + n);
|
|
@@ -2002,16 +2179,16 @@ function rt(t, e, n, r) {
|
|
|
2002
2179
|
const s = t.listingMode();
|
|
2003
2180
|
return s === "error" ? null : s === "en" ? n(e) : r(e);
|
|
2004
2181
|
}
|
|
2005
|
-
function
|
|
2182
|
+
function Eo(t) {
|
|
2006
2183
|
return t.numberingSystem && t.numberingSystem !== "latn" ? !1 : t.numberingSystem === "latn" || !t.locale || t.locale.startsWith("en") || Lr(t.locale).numberingSystem === "latn";
|
|
2007
2184
|
}
|
|
2008
|
-
class
|
|
2185
|
+
class Mo {
|
|
2009
2186
|
constructor(e, n, r) {
|
|
2010
2187
|
this.padTo = r.padTo || 0, this.floor = r.floor || !1;
|
|
2011
2188
|
const { padTo: s, floor: i, ...a } = r;
|
|
2012
2189
|
if (!n || Object.keys(a).length > 0) {
|
|
2013
2190
|
const o = { useGrouping: !1, ...r };
|
|
2014
|
-
r.padTo > 0 && (o.minimumIntegerDigits = r.padTo), this.inf =
|
|
2191
|
+
r.padTo > 0 && (o.minimumIntegerDigits = r.padTo), this.inf = bo(e, o);
|
|
2015
2192
|
}
|
|
2016
2193
|
}
|
|
2017
2194
|
format(e) {
|
|
@@ -2024,7 +2201,7 @@ class _o {
|
|
|
2024
2201
|
}
|
|
2025
2202
|
}
|
|
2026
2203
|
}
|
|
2027
|
-
class
|
|
2204
|
+
class Co {
|
|
2028
2205
|
constructor(e, n, r) {
|
|
2029
2206
|
this.opts = r, this.originalZone = void 0;
|
|
2030
2207
|
let s;
|
|
@@ -2035,7 +2212,7 @@ class To {
|
|
|
2035
2212
|
e.offset !== 0 && ne.create(o).valid ? (s = o, this.dt = e) : (s = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
2036
2213
|
} else e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, s = e.zone.name) : (s = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
|
|
2037
2214
|
const i = { ...this.opts };
|
|
2038
|
-
i.timeZone = i.timeZone || s, this.dtf =
|
|
2215
|
+
i.timeZone = i.timeZone || s, this.dtf = Bt(n, i);
|
|
2039
2216
|
}
|
|
2040
2217
|
format() {
|
|
2041
2218
|
return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
|
|
@@ -2060,12 +2237,12 @@ class To {
|
|
|
2060
2237
|
return this.dtf.resolvedOptions();
|
|
2061
2238
|
}
|
|
2062
2239
|
}
|
|
2063
|
-
class
|
|
2240
|
+
class Do {
|
|
2064
2241
|
constructor(e, n, r) {
|
|
2065
|
-
this.opts = { style: "long", ...r }, !n &&
|
|
2242
|
+
this.opts = { style: "long", ...r }, !n && qr() && (this.rtf = ko(e, r));
|
|
2066
2243
|
}
|
|
2067
2244
|
format(e, n) {
|
|
2068
|
-
return this.rtf ? this.rtf.format(e, n) :
|
|
2245
|
+
return this.rtf ? this.rtf.format(e, n) : Qo(n, e, this.opts.numeric, this.opts.style !== "long");
|
|
2069
2246
|
}
|
|
2070
2247
|
formatToParts(e, n) {
|
|
2071
2248
|
return this.rtf ? this.rtf.formatToParts(e, n) : [];
|
|
@@ -2087,21 +2264,21 @@ class T {
|
|
|
2087
2264
|
);
|
|
2088
2265
|
}
|
|
2089
2266
|
static create(e, n, r, s, i = !1) {
|
|
2090
|
-
const a = e || N.defaultLocale, o = a || (i ? "en-US" :
|
|
2091
|
-
return new T(o, l,
|
|
2267
|
+
const a = e || N.defaultLocale, o = a || (i ? "en-US" : _o()), l = n || N.defaultNumberingSystem, d = r || N.defaultOutputCalendar, c = tn(s) || N.defaultWeekSettings;
|
|
2268
|
+
return new T(o, l, d, c, a);
|
|
2092
2269
|
}
|
|
2093
2270
|
static resetCache() {
|
|
2094
|
-
|
|
2271
|
+
Ae = null, Gt.clear(), Jt.clear(), Kt.clear(), Xt.clear(), Qt.clear();
|
|
2095
2272
|
}
|
|
2096
2273
|
static fromObject({ locale: e, numberingSystem: n, outputCalendar: r, weekSettings: s } = {}) {
|
|
2097
2274
|
return T.create(e, n, r, s);
|
|
2098
2275
|
}
|
|
2099
2276
|
constructor(e, n, r, s, i) {
|
|
2100
|
-
const [a, o, l] =
|
|
2101
|
-
this.locale = a, this.numberingSystem = n || o || null, this.outputCalendar = r || l || null, this.weekSettings = s, this.intl =
|
|
2277
|
+
const [a, o, l] = So(e);
|
|
2278
|
+
this.locale = a, this.numberingSystem = n || o || null, this.outputCalendar = r || l || null, this.weekSettings = s, this.intl = po(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = i, this.fastNumbersCached = null;
|
|
2102
2279
|
}
|
|
2103
2280
|
get fastNumbers() {
|
|
2104
|
-
return this.fastNumbersCached == null && (this.fastNumbersCached =
|
|
2281
|
+
return this.fastNumbersCached == null && (this.fastNumbersCached = Eo(this)), this.fastNumbersCached;
|
|
2105
2282
|
}
|
|
2106
2283
|
listingMode() {
|
|
2107
2284
|
const e = this.isEnglish(), n = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
|
|
@@ -2129,7 +2306,7 @@ class T {
|
|
|
2129
2306
|
const s = n ? { month: e, day: "numeric" } : { month: e }, i = n ? "format" : "standalone";
|
|
2130
2307
|
if (!this.monthsCache[i][e]) {
|
|
2131
2308
|
const a = r ? (o) => this.dtFormatter(o, s).format() : (o) => this.extract(o, s, "month");
|
|
2132
|
-
this.monthsCache[i][e] =
|
|
2309
|
+
this.monthsCache[i][e] = Oo(a);
|
|
2133
2310
|
}
|
|
2134
2311
|
return this.monthsCache[i][e];
|
|
2135
2312
|
});
|
|
@@ -2137,7 +2314,7 @@ class T {
|
|
|
2137
2314
|
weekdays(e, n = !1) {
|
|
2138
2315
|
return rt(this, e, ts, () => {
|
|
2139
2316
|
const r = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, s = n ? "format" : "standalone";
|
|
2140
|
-
return this.weekdaysCache[s][e] || (this.weekdaysCache[s][e] =
|
|
2317
|
+
return this.weekdaysCache[s][e] || (this.weekdaysCache[s][e] = No(
|
|
2141
2318
|
(i) => this.extract(i, r, "weekday")
|
|
2142
2319
|
)), this.weekdaysCache[s][e];
|
|
2143
2320
|
});
|
|
@@ -2171,22 +2348,22 @@ class T {
|
|
|
2171
2348
|
return a ? a.value : null;
|
|
2172
2349
|
}
|
|
2173
2350
|
numberFormatter(e = {}) {
|
|
2174
|
-
return new
|
|
2351
|
+
return new Mo(this.intl, e.forceSimple || this.fastNumbers, e);
|
|
2175
2352
|
}
|
|
2176
2353
|
dtFormatter(e, n = {}) {
|
|
2177
|
-
return new
|
|
2354
|
+
return new Co(e, this.intl, n);
|
|
2178
2355
|
}
|
|
2179
2356
|
relFormatter(e = {}) {
|
|
2180
|
-
return new
|
|
2357
|
+
return new Do(this.intl, this.isEnglish(), e);
|
|
2181
2358
|
}
|
|
2182
2359
|
listFormatter(e = {}) {
|
|
2183
|
-
return
|
|
2360
|
+
return xo(this.intl, e);
|
|
2184
2361
|
}
|
|
2185
2362
|
isEnglish() {
|
|
2186
2363
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || Lr(this.intl).locale.startsWith("en-us");
|
|
2187
2364
|
}
|
|
2188
2365
|
getWeekSettings() {
|
|
2189
|
-
return this.weekSettings ? this.weekSettings :
|
|
2366
|
+
return this.weekSettings ? this.weekSettings : Gr() ? To(this.locale) : Ar;
|
|
2190
2367
|
}
|
|
2191
2368
|
getStartOfWeek() {
|
|
2192
2369
|
return this.getWeekSettings().firstDay;
|
|
@@ -2205,7 +2382,7 @@ class T {
|
|
|
2205
2382
|
}
|
|
2206
2383
|
}
|
|
2207
2384
|
let Rt = null;
|
|
2208
|
-
class W extends
|
|
2385
|
+
class W extends Be {
|
|
2209
2386
|
/**
|
|
2210
2387
|
* Get a singleton instance of UTC
|
|
2211
2388
|
* @return {FixedOffsetZone}
|
|
@@ -2255,7 +2432,7 @@ class W extends Ye {
|
|
|
2255
2432
|
* @type {string}
|
|
2256
2433
|
*/
|
|
2257
2434
|
get name() {
|
|
2258
|
-
return this.fixed === 0 ? "UTC" : `UTC${
|
|
2435
|
+
return this.fixed === 0 ? "UTC" : `UTC${Ue(this.fixed, "narrow")}`;
|
|
2259
2436
|
}
|
|
2260
2437
|
/**
|
|
2261
2438
|
* The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
|
|
@@ -2264,7 +2441,7 @@ class W extends Ye {
|
|
|
2264
2441
|
* @type {string}
|
|
2265
2442
|
*/
|
|
2266
2443
|
get ianaName() {
|
|
2267
|
-
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${
|
|
2444
|
+
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Ue(-this.fixed, "narrow")}`;
|
|
2268
2445
|
}
|
|
2269
2446
|
/**
|
|
2270
2447
|
* Returns the offset's common name at the specified timestamp.
|
|
@@ -2284,7 +2461,7 @@ class W extends Ye {
|
|
|
2284
2461
|
* @return {string}
|
|
2285
2462
|
*/
|
|
2286
2463
|
formatOffset(e, n) {
|
|
2287
|
-
return
|
|
2464
|
+
return Ue(this.fixed, n);
|
|
2288
2465
|
}
|
|
2289
2466
|
/**
|
|
2290
2467
|
* Returns whether the offset is known to be fixed for the whole year:
|
|
@@ -2324,7 +2501,7 @@ class W extends Ye {
|
|
|
2324
2501
|
return !0;
|
|
2325
2502
|
}
|
|
2326
2503
|
}
|
|
2327
|
-
class
|
|
2504
|
+
class Io extends Be {
|
|
2328
2505
|
constructor(e) {
|
|
2329
2506
|
super(), this.zoneName = e;
|
|
2330
2507
|
}
|
|
@@ -2364,12 +2541,12 @@ class po extends Ye {
|
|
|
2364
2541
|
function oe(t, e) {
|
|
2365
2542
|
if (v(t) || t === null)
|
|
2366
2543
|
return e;
|
|
2367
|
-
if (t instanceof
|
|
2544
|
+
if (t instanceof Be)
|
|
2368
2545
|
return t;
|
|
2369
|
-
if (
|
|
2546
|
+
if ($o(t)) {
|
|
2370
2547
|
const n = t.toLowerCase();
|
|
2371
2548
|
return n === "default" ? e : n === "local" || n === "system" ? xt.instance : n === "utc" || n === "gmt" ? W.utcInstance : W.parseSpecifier(n) || ne.create(t);
|
|
2372
|
-
} else return le(t) ? W.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new
|
|
2549
|
+
} else return le(t) ? W.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new Io(t);
|
|
2373
2550
|
}
|
|
2374
2551
|
const ln = {
|
|
2375
2552
|
arab: "[٠-٩]",
|
|
@@ -2413,15 +2590,15 @@ const ln = {
|
|
|
2413
2590
|
telu: [3174, 3183],
|
|
2414
2591
|
thai: [3664, 3673],
|
|
2415
2592
|
tibt: [3872, 3881]
|
|
2416
|
-
},
|
|
2417
|
-
function
|
|
2593
|
+
}, Fo = ln.hanidec.replace(/[\[|\]]/g, "").split("");
|
|
2594
|
+
function jo(t) {
|
|
2418
2595
|
let e = parseInt(t, 10);
|
|
2419
2596
|
if (isNaN(e)) {
|
|
2420
2597
|
e = "";
|
|
2421
2598
|
for (let n = 0; n < t.length; n++) {
|
|
2422
2599
|
const r = t.charCodeAt(n);
|
|
2423
2600
|
if (t[n].search(ln.hanidec) !== -1)
|
|
2424
|
-
e +=
|
|
2601
|
+
e += Fo.indexOf(t[n]);
|
|
2425
2602
|
else
|
|
2426
2603
|
for (const s in Cn) {
|
|
2427
2604
|
const [i, a] = Cn[s];
|
|
@@ -2433,7 +2610,7 @@ function No(t) {
|
|
|
2433
2610
|
return e;
|
|
2434
2611
|
}
|
|
2435
2612
|
const en = /* @__PURE__ */ new Map();
|
|
2436
|
-
function
|
|
2613
|
+
function Vo() {
|
|
2437
2614
|
en.clear();
|
|
2438
2615
|
}
|
|
2439
2616
|
function U({ numberingSystem: t }, e = "") {
|
|
@@ -2443,7 +2620,7 @@ function U({ numberingSystem: t }, e = "") {
|
|
|
2443
2620
|
let s = r.get(e);
|
|
2444
2621
|
return s === void 0 && (s = new RegExp(`${ln[n]}${e}`), r.set(e, s)), s;
|
|
2445
2622
|
}
|
|
2446
|
-
let Dn = () => Date.now(),
|
|
2623
|
+
let Dn = () => Date.now(), In = "system", Fn = null, jn = null, Vn = null, Rn = 60, Wn, $n = null;
|
|
2447
2624
|
class N {
|
|
2448
2625
|
/**
|
|
2449
2626
|
* Get the callback for returning the current timestamp.
|
|
@@ -2468,7 +2645,7 @@ class N {
|
|
|
2468
2645
|
* @type {string}
|
|
2469
2646
|
*/
|
|
2470
2647
|
static set defaultZone(e) {
|
|
2471
|
-
|
|
2648
|
+
In = e;
|
|
2472
2649
|
}
|
|
2473
2650
|
/**
|
|
2474
2651
|
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
|
|
@@ -2476,35 +2653,35 @@ class N {
|
|
|
2476
2653
|
* @type {Zone}
|
|
2477
2654
|
*/
|
|
2478
2655
|
static get defaultZone() {
|
|
2479
|
-
return oe(
|
|
2656
|
+
return oe(In, xt.instance);
|
|
2480
2657
|
}
|
|
2481
2658
|
/**
|
|
2482
2659
|
* Get the default locale to create DateTimes with. Does not affect existing instances.
|
|
2483
2660
|
* @type {string}
|
|
2484
2661
|
*/
|
|
2485
2662
|
static get defaultLocale() {
|
|
2486
|
-
return
|
|
2663
|
+
return Fn;
|
|
2487
2664
|
}
|
|
2488
2665
|
/**
|
|
2489
2666
|
* Set the default locale to create DateTimes with. Does not affect existing instances.
|
|
2490
2667
|
* @type {string}
|
|
2491
2668
|
*/
|
|
2492
2669
|
static set defaultLocale(e) {
|
|
2493
|
-
|
|
2670
|
+
Fn = e;
|
|
2494
2671
|
}
|
|
2495
2672
|
/**
|
|
2496
2673
|
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
|
|
2497
2674
|
* @type {string}
|
|
2498
2675
|
*/
|
|
2499
2676
|
static get defaultNumberingSystem() {
|
|
2500
|
-
return
|
|
2677
|
+
return jn;
|
|
2501
2678
|
}
|
|
2502
2679
|
/**
|
|
2503
2680
|
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
|
|
2504
2681
|
* @type {string}
|
|
2505
2682
|
*/
|
|
2506
2683
|
static set defaultNumberingSystem(e) {
|
|
2507
|
-
|
|
2684
|
+
jn = e;
|
|
2508
2685
|
}
|
|
2509
2686
|
/**
|
|
2510
2687
|
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
|
|
@@ -2580,10 +2757,10 @@ class N {
|
|
|
2580
2757
|
* @return {void}
|
|
2581
2758
|
*/
|
|
2582
2759
|
static resetCaches() {
|
|
2583
|
-
T.resetCache(), ne.resetCache(), w.resetCache(),
|
|
2760
|
+
T.resetCache(), ne.resetCache(), w.resetCache(), Vo();
|
|
2584
2761
|
}
|
|
2585
2762
|
}
|
|
2586
|
-
class
|
|
2763
|
+
class Y {
|
|
2587
2764
|
constructor(e, n) {
|
|
2588
2765
|
this.reason = e, this.explanation = n;
|
|
2589
2766
|
}
|
|
@@ -2593,7 +2770,7 @@ class H {
|
|
|
2593
2770
|
}
|
|
2594
2771
|
const Pr = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], zr = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
|
2595
2772
|
function P(t, e) {
|
|
2596
|
-
return new
|
|
2773
|
+
return new Y(
|
|
2597
2774
|
"unit out of range",
|
|
2598
2775
|
`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
|
|
2599
2776
|
);
|
|
@@ -2605,10 +2782,10 @@ function un(t, e, n) {
|
|
|
2605
2782
|
return s === 0 ? 7 : s;
|
|
2606
2783
|
}
|
|
2607
2784
|
function Ur(t, e, n) {
|
|
2608
|
-
return n + (
|
|
2785
|
+
return n + (Je(t) ? zr : Pr)[e - 1];
|
|
2609
2786
|
}
|
|
2610
2787
|
function Zr(t, e) {
|
|
2611
|
-
const n =
|
|
2788
|
+
const n = Je(t) ? zr : Pr, r = n.findIndex((i) => i < e), s = e - n[r];
|
|
2612
2789
|
return { month: r + 1, day: s };
|
|
2613
2790
|
}
|
|
2614
2791
|
function cn(t, e) {
|
|
@@ -2616,15 +2793,15 @@ function cn(t, e) {
|
|
|
2616
2793
|
}
|
|
2617
2794
|
function ht(t, e = 4, n = 1) {
|
|
2618
2795
|
const { year: r, month: s, day: i } = t, a = Ur(r, s, i), o = cn(un(r, s, i), n);
|
|
2619
|
-
let l = Math.floor((a - o + 14 - e) / 7),
|
|
2620
|
-
return l < 1 ? (
|
|
2796
|
+
let l = Math.floor((a - o + 14 - e) / 7), d;
|
|
2797
|
+
return l < 1 ? (d = r - 1, l = Ye(d, e, n)) : l > Ye(r, e, n) ? (d = r + 1, l = 1) : d = r, { weekYear: d, weekNumber: l, weekday: o, ...Tt(t) };
|
|
2621
2798
|
}
|
|
2622
2799
|
function Ln(t, e = 4, n = 1) {
|
|
2623
2800
|
const { weekYear: r, weekNumber: s, weekday: i } = t, a = cn(un(r, 1, e), n), o = Oe(r);
|
|
2624
|
-
let l = s * 7 + i - a - 7 + e,
|
|
2625
|
-
l < 1 ? (
|
|
2626
|
-
const { month:
|
|
2627
|
-
return { year:
|
|
2801
|
+
let l = s * 7 + i - a - 7 + e, d;
|
|
2802
|
+
l < 1 ? (d = r - 1, l += Oe(d)) : l > o ? (d = r + 1, l -= Oe(r)) : d = r;
|
|
2803
|
+
const { month: c, day: m } = Zr(d, l);
|
|
2804
|
+
return { year: d, month: c, day: m, ...Tt(t) };
|
|
2628
2805
|
}
|
|
2629
2806
|
function Wt(t) {
|
|
2630
2807
|
const { year: e, month: n, day: r } = t, s = Ur(e, n, r);
|
|
@@ -2647,23 +2824,23 @@ function Pn(t, e) {
|
|
|
2647
2824
|
} else
|
|
2648
2825
|
return { minDaysInFirstWeek: 4, startOfWeek: 1 };
|
|
2649
2826
|
}
|
|
2650
|
-
function
|
|
2827
|
+
function Ro(t, e = 4, n = 1) {
|
|
2651
2828
|
const r = bt(t.weekYear), s = z(
|
|
2652
2829
|
t.weekNumber,
|
|
2653
2830
|
1,
|
|
2654
|
-
|
|
2831
|
+
Ye(t.weekYear, e, n)
|
|
2655
2832
|
), i = z(t.weekday, 1, 7);
|
|
2656
2833
|
return r ? s ? i ? !1 : P("weekday", t.weekday) : P("week", t.weekNumber) : P("weekYear", t.weekYear);
|
|
2657
2834
|
}
|
|
2658
|
-
function
|
|
2835
|
+
function Wo(t) {
|
|
2659
2836
|
const e = bt(t.year), n = z(t.ordinal, 1, Oe(t.year));
|
|
2660
2837
|
return e ? n ? !1 : P("ordinal", t.ordinal) : P("year", t.year);
|
|
2661
2838
|
}
|
|
2662
|
-
function
|
|
2839
|
+
function Hr(t) {
|
|
2663
2840
|
const e = bt(t.year), n = z(t.month, 1, 12), r = z(t.day, 1, mt(t.year, t.month));
|
|
2664
2841
|
return e ? n ? r ? !1 : P("day", t.day) : P("month", t.month) : P("year", t.year);
|
|
2665
2842
|
}
|
|
2666
|
-
function
|
|
2843
|
+
function Yr(t) {
|
|
2667
2844
|
const { hour: e, minute: n, second: r, millisecond: s } = t, i = z(e, 0, 23) || e === 24 && n === 0 && r === 0 && s === 0, a = z(n, 0, 59), o = z(r, 0, 59), l = z(s, 0, 999);
|
|
2668
2845
|
return i ? a ? o ? l ? !1 : P("millisecond", s) : P("second", r) : P("minute", n) : P("hour", e);
|
|
2669
2846
|
}
|
|
@@ -2676,27 +2853,27 @@ function le(t) {
|
|
|
2676
2853
|
function bt(t) {
|
|
2677
2854
|
return typeof t == "number" && t % 1 === 0;
|
|
2678
2855
|
}
|
|
2679
|
-
function
|
|
2856
|
+
function $o(t) {
|
|
2680
2857
|
return typeof t == "string";
|
|
2681
2858
|
}
|
|
2682
|
-
function
|
|
2859
|
+
function Lo(t) {
|
|
2683
2860
|
return Object.prototype.toString.call(t) === "[object Date]";
|
|
2684
2861
|
}
|
|
2685
|
-
function
|
|
2862
|
+
function qr() {
|
|
2686
2863
|
try {
|
|
2687
2864
|
return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
|
|
2688
2865
|
} catch {
|
|
2689
2866
|
return !1;
|
|
2690
2867
|
}
|
|
2691
2868
|
}
|
|
2692
|
-
function
|
|
2869
|
+
function Gr() {
|
|
2693
2870
|
try {
|
|
2694
2871
|
return typeof Intl < "u" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
|
|
2695
2872
|
} catch {
|
|
2696
2873
|
return !1;
|
|
2697
2874
|
}
|
|
2698
2875
|
}
|
|
2699
|
-
function
|
|
2876
|
+
function Ao(t) {
|
|
2700
2877
|
return Array.isArray(t) ? t : [t];
|
|
2701
2878
|
}
|
|
2702
2879
|
function zn(t, e, n) {
|
|
@@ -2706,7 +2883,7 @@ function zn(t, e, n) {
|
|
|
2706
2883
|
return r && n(r[0], i[0]) === r[0] ? r : i;
|
|
2707
2884
|
}, null)[1];
|
|
2708
2885
|
}
|
|
2709
|
-
function
|
|
2886
|
+
function Po(t, e) {
|
|
2710
2887
|
return e.reduce((n, r) => (n[r] = t[r], n), {});
|
|
2711
2888
|
}
|
|
2712
2889
|
function Me(t, e) {
|
|
@@ -2716,9 +2893,9 @@ function tn(t) {
|
|
|
2716
2893
|
if (t == null)
|
|
2717
2894
|
return null;
|
|
2718
2895
|
if (typeof t != "object")
|
|
2719
|
-
throw new
|
|
2896
|
+
throw new F("Week settings must be an object");
|
|
2720
2897
|
if (!z(t.firstDay, 1, 7) || !z(t.minimalDays, 1, 7) || !Array.isArray(t.weekend) || t.weekend.some((e) => !z(e, 1, 7)))
|
|
2721
|
-
throw new
|
|
2898
|
+
throw new F("Invalid week settings");
|
|
2722
2899
|
return {
|
|
2723
2900
|
firstDay: t.firstDay,
|
|
2724
2901
|
minimalDays: t.minimalDays,
|
|
@@ -2728,7 +2905,7 @@ function tn(t) {
|
|
|
2728
2905
|
function z(t, e, n) {
|
|
2729
2906
|
return bt(t) && t >= e && t <= n;
|
|
2730
2907
|
}
|
|
2731
|
-
function
|
|
2908
|
+
function zo(t, e) {
|
|
2732
2909
|
return t - e * Math.floor(t / e);
|
|
2733
2910
|
}
|
|
2734
2911
|
function M(t, e = 2) {
|
|
@@ -2767,15 +2944,15 @@ function fn(t, e, n = "round") {
|
|
|
2767
2944
|
throw new RangeError(`Value rounding ${n} is out of range`);
|
|
2768
2945
|
}
|
|
2769
2946
|
}
|
|
2770
|
-
function
|
|
2947
|
+
function Je(t) {
|
|
2771
2948
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
2772
2949
|
}
|
|
2773
2950
|
function Oe(t) {
|
|
2774
|
-
return
|
|
2951
|
+
return Je(t) ? 366 : 365;
|
|
2775
2952
|
}
|
|
2776
2953
|
function mt(t, e) {
|
|
2777
|
-
const n =
|
|
2778
|
-
return n === 2 ?
|
|
2954
|
+
const n = zo(e - 1, 12) + 1, r = t + (e - n) / 12;
|
|
2955
|
+
return n === 2 ? Je(r) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
|
2779
2956
|
}
|
|
2780
2957
|
function kt(t) {
|
|
2781
2958
|
let e = Date.UTC(
|
|
@@ -2792,14 +2969,14 @@ function kt(t) {
|
|
|
2792
2969
|
function Un(t, e, n) {
|
|
2793
2970
|
return -cn(un(t, 1, e), n) + e - 1;
|
|
2794
2971
|
}
|
|
2795
|
-
function
|
|
2972
|
+
function Ye(t, e = 4, n = 1) {
|
|
2796
2973
|
const r = Un(t, e, n), s = Un(t + 1, e, n);
|
|
2797
2974
|
return (Oe(t) - r + s) / 7;
|
|
2798
2975
|
}
|
|
2799
2976
|
function nn(t) {
|
|
2800
2977
|
return t > 99 ? t : t > N.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
|
2801
2978
|
}
|
|
2802
|
-
function
|
|
2979
|
+
function Br(t, e, n, r = null) {
|
|
2803
2980
|
const s = new Date(t), i = {
|
|
2804
2981
|
hourCycle: "h23",
|
|
2805
2982
|
year: "numeric",
|
|
@@ -2821,7 +2998,7 @@ function _t(t, e) {
|
|
|
2821
2998
|
function Jr(t) {
|
|
2822
2999
|
const e = Number(t);
|
|
2823
3000
|
if (typeof t == "boolean" || t === "" || !Number.isFinite(e))
|
|
2824
|
-
throw new
|
|
3001
|
+
throw new F(`Invalid unit value ${t}`);
|
|
2825
3002
|
return e;
|
|
2826
3003
|
}
|
|
2827
3004
|
function yt(t, e) {
|
|
@@ -2834,7 +3011,7 @@ function yt(t, e) {
|
|
|
2834
3011
|
}
|
|
2835
3012
|
return n;
|
|
2836
3013
|
}
|
|
2837
|
-
function
|
|
3014
|
+
function Ue(t, e) {
|
|
2838
3015
|
const n = Math.trunc(Math.abs(t / 60)), r = Math.trunc(Math.abs(t % 60)), s = t >= 0 ? "+" : "-";
|
|
2839
3016
|
switch (e) {
|
|
2840
3017
|
case "short":
|
|
@@ -2848,9 +3025,9 @@ function Pe(t, e) {
|
|
|
2848
3025
|
}
|
|
2849
3026
|
}
|
|
2850
3027
|
function Tt(t) {
|
|
2851
|
-
return
|
|
3028
|
+
return Po(t, ["hour", "minute", "second", "millisecond"]);
|
|
2852
3029
|
}
|
|
2853
|
-
const
|
|
3030
|
+
const Uo = [
|
|
2854
3031
|
"January",
|
|
2855
3032
|
"February",
|
|
2856
3033
|
"March",
|
|
@@ -2876,15 +3053,15 @@ const Ro = [
|
|
|
2876
3053
|
"Oct",
|
|
2877
3054
|
"Nov",
|
|
2878
3055
|
"Dec"
|
|
2879
|
-
],
|
|
3056
|
+
], Zo = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
|
|
2880
3057
|
function Xr(t) {
|
|
2881
3058
|
switch (t) {
|
|
2882
3059
|
case "narrow":
|
|
2883
|
-
return [...
|
|
3060
|
+
return [...Zo];
|
|
2884
3061
|
case "short":
|
|
2885
3062
|
return [...Kr];
|
|
2886
3063
|
case "long":
|
|
2887
|
-
return [...
|
|
3064
|
+
return [...Uo];
|
|
2888
3065
|
case "numeric":
|
|
2889
3066
|
return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
|
|
2890
3067
|
case "2-digit":
|
|
@@ -2901,11 +3078,11 @@ const Qr = [
|
|
|
2901
3078
|
"Friday",
|
|
2902
3079
|
"Saturday",
|
|
2903
3080
|
"Sunday"
|
|
2904
|
-
], es = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
3081
|
+
], es = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Ho = ["M", "T", "W", "T", "F", "S", "S"];
|
|
2905
3082
|
function ts(t) {
|
|
2906
3083
|
switch (t) {
|
|
2907
3084
|
case "narrow":
|
|
2908
|
-
return [
|
|
3085
|
+
return [...Ho];
|
|
2909
3086
|
case "short":
|
|
2910
3087
|
return [...es];
|
|
2911
3088
|
case "long":
|
|
@@ -2916,32 +3093,32 @@ function ts(t) {
|
|
|
2916
3093
|
return null;
|
|
2917
3094
|
}
|
|
2918
3095
|
}
|
|
2919
|
-
const ns = ["AM", "PM"],
|
|
3096
|
+
const ns = ["AM", "PM"], Yo = ["Before Christ", "Anno Domini"], qo = ["BC", "AD"], Go = ["B", "A"];
|
|
2920
3097
|
function rs(t) {
|
|
2921
3098
|
switch (t) {
|
|
2922
3099
|
case "narrow":
|
|
2923
|
-
return [...
|
|
3100
|
+
return [...Go];
|
|
2924
3101
|
case "short":
|
|
2925
|
-
return [...
|
|
3102
|
+
return [...qo];
|
|
2926
3103
|
case "long":
|
|
2927
|
-
return [...
|
|
3104
|
+
return [...Yo];
|
|
2928
3105
|
default:
|
|
2929
3106
|
return null;
|
|
2930
3107
|
}
|
|
2931
3108
|
}
|
|
2932
|
-
function
|
|
3109
|
+
function Bo(t) {
|
|
2933
3110
|
return ns[t.hour < 12 ? 0 : 1];
|
|
2934
3111
|
}
|
|
2935
|
-
function
|
|
3112
|
+
function Jo(t, e) {
|
|
2936
3113
|
return ts(e)[t.weekday - 1];
|
|
2937
3114
|
}
|
|
2938
|
-
function
|
|
3115
|
+
function Ko(t, e) {
|
|
2939
3116
|
return Xr(e)[t.month - 1];
|
|
2940
3117
|
}
|
|
2941
|
-
function
|
|
3118
|
+
function Xo(t, e) {
|
|
2942
3119
|
return rs(e)[t.year < 0 ? 0 : 1];
|
|
2943
3120
|
}
|
|
2944
|
-
function
|
|
3121
|
+
function Qo(t, e, n = "always", r = !1) {
|
|
2945
3122
|
const s = {
|
|
2946
3123
|
years: ["year", "yr."],
|
|
2947
3124
|
quarters: ["quarter", "qtr."],
|
|
@@ -2963,8 +3140,8 @@ function Ho(t, e, n = "always", r = !1) {
|
|
|
2963
3140
|
return m ? "today" : `this ${s[t][0]}`;
|
|
2964
3141
|
}
|
|
2965
3142
|
}
|
|
2966
|
-
const a = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1,
|
|
2967
|
-
return a ? `${o} ${
|
|
3143
|
+
const a = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1, d = s[t], c = r ? l ? d[1] : d[2] || d[1] : l ? s[t][0] : t;
|
|
3144
|
+
return a ? `${o} ${c} ago` : `in ${o} ${c}`;
|
|
2968
3145
|
}
|
|
2969
3146
|
function Zn(t, e) {
|
|
2970
3147
|
let n = "";
|
|
@@ -2972,7 +3149,7 @@ function Zn(t, e) {
|
|
|
2972
3149
|
r.literal ? n += r.val : n += e(r.val);
|
|
2973
3150
|
return n;
|
|
2974
3151
|
}
|
|
2975
|
-
const
|
|
3152
|
+
const el = {
|
|
2976
3153
|
D: ft,
|
|
2977
3154
|
DD: br,
|
|
2978
3155
|
DDD: kr,
|
|
@@ -2986,17 +3163,17 @@ const Yo = {
|
|
|
2986
3163
|
TTT: Mr,
|
|
2987
3164
|
TTTT: Cr,
|
|
2988
3165
|
f: Dr,
|
|
2989
|
-
ff:
|
|
3166
|
+
ff: Fr,
|
|
2990
3167
|
fff: Vr,
|
|
2991
3168
|
ffff: Wr,
|
|
2992
|
-
F:
|
|
2993
|
-
FF:
|
|
3169
|
+
F: Ir,
|
|
3170
|
+
FF: jr,
|
|
2994
3171
|
FFF: Rr,
|
|
2995
3172
|
FFFF: $r
|
|
2996
3173
|
};
|
|
2997
|
-
class
|
|
3174
|
+
class j {
|
|
2998
3175
|
static create(e, n = {}) {
|
|
2999
|
-
return new
|
|
3176
|
+
return new j(e, n);
|
|
3000
3177
|
}
|
|
3001
3178
|
static parseFormat(e) {
|
|
3002
3179
|
let n = null, r = "", s = !1;
|
|
@@ -3011,7 +3188,7 @@ class F {
|
|
|
3011
3188
|
return r.length > 0 && i.push({ literal: s || /^\s+$/.test(r), val: r }), i;
|
|
3012
3189
|
}
|
|
3013
3190
|
static macroTokenToFormatOpts(e) {
|
|
3014
|
-
return
|
|
3191
|
+
return el[e];
|
|
3015
3192
|
}
|
|
3016
3193
|
constructor(e, n) {
|
|
3017
3194
|
this.opts = n, this.loc = e, this.systemLoc = null;
|
|
@@ -3041,13 +3218,13 @@ class F {
|
|
|
3041
3218
|
return n > 0 && (s.padTo = n), r && (s.signDisplay = r), this.loc.numberFormatter(s).format(e);
|
|
3042
3219
|
}
|
|
3043
3220
|
formatDateTimeFromString(e, n) {
|
|
3044
|
-
const r = this.loc.listingMode() === "en", s = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (y, S) => this.loc.extract(e, y, S), a = (y) => e.isOffsetFixed && e.offset === 0 && y.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, y.format) : "", o = () => r ?
|
|
3221
|
+
const r = this.loc.listingMode() === "en", s = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (y, S) => this.loc.extract(e, y, S), a = (y) => e.isOffsetFixed && e.offset === 0 && y.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, y.format) : "", o = () => r ? Bo(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (y, S) => r ? Ko(e, y) : i(S ? { month: y } : { month: y, day: "numeric" }, "month"), d = (y, S) => r ? Jo(e, y) : i(
|
|
3045
3222
|
S ? { weekday: y } : { weekday: y, month: "long", day: "numeric" },
|
|
3046
3223
|
"weekday"
|
|
3047
|
-
),
|
|
3048
|
-
const S =
|
|
3224
|
+
), c = (y) => {
|
|
3225
|
+
const S = j.macroTokenToFormatOpts(y);
|
|
3049
3226
|
return S ? this.formatWithSystemDefault(e, S) : y;
|
|
3050
|
-
}, m = (y) => r ?
|
|
3227
|
+
}, m = (y) => r ? Xo(e, y) : i({ era: y }, "era"), g = (y) => {
|
|
3051
3228
|
switch (y) {
|
|
3052
3229
|
// ms
|
|
3053
3230
|
case "S":
|
|
@@ -3106,20 +3283,20 @@ class F {
|
|
|
3106
3283
|
case "c":
|
|
3107
3284
|
return this.num(e.weekday);
|
|
3108
3285
|
case "ccc":
|
|
3109
|
-
return
|
|
3286
|
+
return d("short", !0);
|
|
3110
3287
|
case "cccc":
|
|
3111
|
-
return
|
|
3288
|
+
return d("long", !0);
|
|
3112
3289
|
case "ccccc":
|
|
3113
|
-
return
|
|
3290
|
+
return d("narrow", !0);
|
|
3114
3291
|
// weekdays - format
|
|
3115
3292
|
case "E":
|
|
3116
3293
|
return this.num(e.weekday);
|
|
3117
3294
|
case "EEE":
|
|
3118
|
-
return
|
|
3295
|
+
return d("short", !1);
|
|
3119
3296
|
case "EEEE":
|
|
3120
|
-
return
|
|
3297
|
+
return d("long", !1);
|
|
3121
3298
|
case "EEEEE":
|
|
3122
|
-
return
|
|
3299
|
+
return d("narrow", !1);
|
|
3123
3300
|
// months - standalone
|
|
3124
3301
|
case "L":
|
|
3125
3302
|
return s ? i({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
|
|
@@ -3187,14 +3364,14 @@ class F {
|
|
|
3187
3364
|
case "x":
|
|
3188
3365
|
return this.num(e.ts);
|
|
3189
3366
|
default:
|
|
3190
|
-
return
|
|
3367
|
+
return c(y);
|
|
3191
3368
|
}
|
|
3192
3369
|
};
|
|
3193
|
-
return Zn(
|
|
3370
|
+
return Zn(j.parseFormat(n), g);
|
|
3194
3371
|
}
|
|
3195
3372
|
formatDurationFromString(e, n) {
|
|
3196
|
-
const r = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, s = (
|
|
3197
|
-
switch (
|
|
3373
|
+
const r = this.opts.signMode === "negativeLargestOnly" ? -1 : 1, s = (c) => {
|
|
3374
|
+
switch (c[0]) {
|
|
3198
3375
|
case "S":
|
|
3199
3376
|
return "milliseconds";
|
|
3200
3377
|
case "s":
|
|
@@ -3214,24 +3391,24 @@ class F {
|
|
|
3214
3391
|
default:
|
|
3215
3392
|
return null;
|
|
3216
3393
|
}
|
|
3217
|
-
}, i = (
|
|
3394
|
+
}, i = (c, m) => (g) => {
|
|
3218
3395
|
const y = s(g);
|
|
3219
3396
|
if (y) {
|
|
3220
3397
|
const S = m.isNegativeDuration && y !== m.largestUnit ? r : 1;
|
|
3221
3398
|
let R;
|
|
3222
|
-
return this.opts.signMode === "negativeLargestOnly" && y !== m.largestUnit ? R = "never" : this.opts.signMode === "all" ? R = "always" : R = "auto", this.num(
|
|
3399
|
+
return this.opts.signMode === "negativeLargestOnly" && y !== m.largestUnit ? R = "never" : this.opts.signMode === "all" ? R = "always" : R = "auto", this.num(c.get(y) * S, g.length, R);
|
|
3223
3400
|
} else
|
|
3224
3401
|
return g;
|
|
3225
|
-
}, a =
|
|
3226
|
-
(
|
|
3402
|
+
}, a = j.parseFormat(n), o = a.reduce(
|
|
3403
|
+
(c, { literal: m, val: g }) => m ? c : c.concat(g),
|
|
3227
3404
|
[]
|
|
3228
|
-
), l = e.shiftTo(...o.map(s).filter((
|
|
3405
|
+
), l = e.shiftTo(...o.map(s).filter((c) => c)), d = {
|
|
3229
3406
|
isNegativeDuration: l < 0,
|
|
3230
3407
|
// this relies on "collapsed" being based on "shiftTo", which builds up the object
|
|
3231
3408
|
// in order
|
|
3232
3409
|
largestUnit: Object.keys(l.values)[0]
|
|
3233
3410
|
};
|
|
3234
|
-
return Zn(a, i(l,
|
|
3411
|
+
return Zn(a, i(l, d));
|
|
3235
3412
|
}
|
|
3236
3413
|
}
|
|
3237
3414
|
const ss = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
|
|
@@ -3239,7 +3416,7 @@ function De(...t) {
|
|
|
3239
3416
|
const e = t.reduce((n, r) => n + r.source, "");
|
|
3240
3417
|
return RegExp(`^${e}$`);
|
|
3241
3418
|
}
|
|
3242
|
-
function
|
|
3419
|
+
function Ie(...t) {
|
|
3243
3420
|
return (e) => t.reduce(
|
|
3244
3421
|
([n, r, s], i) => {
|
|
3245
3422
|
const [a, o, l] = i(e, s);
|
|
@@ -3248,7 +3425,7 @@ function je(...t) {
|
|
|
3248
3425
|
[{}, null, 1]
|
|
3249
3426
|
).slice(0, 2);
|
|
3250
3427
|
}
|
|
3251
|
-
function
|
|
3428
|
+
function Fe(t, ...e) {
|
|
3252
3429
|
if (t == null)
|
|
3253
3430
|
return [null, null];
|
|
3254
3431
|
for (const [n, r] of e) {
|
|
@@ -3267,21 +3444,21 @@ function is(...t) {
|
|
|
3267
3444
|
return [r, null, n + s];
|
|
3268
3445
|
};
|
|
3269
3446
|
}
|
|
3270
|
-
const as = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,
|
|
3447
|
+
const as = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/, tl = `(?:${as.source}?(?:\\[(${ss.source})\\])?)?`, hn = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, os = RegExp(`${hn.source}${tl}`), mn = RegExp(`(?:[Tt]${os.source})?`), nl = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, rl = /(\d{4})-?W(\d\d)(?:-?(\d))?/, sl = /(\d{4})-?(\d{3})/, il = is("weekYear", "weekNumber", "weekDay"), al = is("year", "ordinal"), ol = /(\d{4})-(\d\d)-(\d\d)/, ls = RegExp(
|
|
3271
3448
|
`${hn.source} ?(?:${as.source}|(${ss.source}))?`
|
|
3272
|
-
),
|
|
3449
|
+
), ll = RegExp(`(?: ${ls.source})?`);
|
|
3273
3450
|
function Ne(t, e, n) {
|
|
3274
3451
|
const r = t[e];
|
|
3275
3452
|
return v(r) ? n : ae(r);
|
|
3276
3453
|
}
|
|
3277
|
-
function
|
|
3454
|
+
function ul(t, e) {
|
|
3278
3455
|
return [{
|
|
3279
3456
|
year: Ne(t, e),
|
|
3280
3457
|
month: Ne(t, e + 1, 1),
|
|
3281
3458
|
day: Ne(t, e + 2, 1)
|
|
3282
3459
|
}, null, e + 3];
|
|
3283
3460
|
}
|
|
3284
|
-
function
|
|
3461
|
+
function je(t, e) {
|
|
3285
3462
|
return [{
|
|
3286
3463
|
hours: Ne(t, e, 0),
|
|
3287
3464
|
minutes: Ne(t, e + 1, 0),
|
|
@@ -3289,17 +3466,17 @@ function Fe(t, e) {
|
|
|
3289
3466
|
milliseconds: dn(t[e + 3])
|
|
3290
3467
|
}, null, e + 4];
|
|
3291
3468
|
}
|
|
3292
|
-
function
|
|
3469
|
+
function Ke(t, e) {
|
|
3293
3470
|
const n = !t[e] && !t[e + 1], r = _t(t[e + 1], t[e + 2]), s = n ? null : W.instance(r);
|
|
3294
3471
|
return [{}, s, e + 3];
|
|
3295
3472
|
}
|
|
3296
|
-
function
|
|
3473
|
+
function Xe(t, e) {
|
|
3297
3474
|
const n = t[e] ? ne.create(t[e]) : null;
|
|
3298
3475
|
return [{}, n, e + 1];
|
|
3299
3476
|
}
|
|
3300
|
-
const
|
|
3301
|
-
function
|
|
3302
|
-
const [e, n, r, s, i, a, o, l,
|
|
3477
|
+
const cl = RegExp(`^T?${hn.source}$`), dl = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
|
3478
|
+
function fl(t) {
|
|
3479
|
+
const [e, n, r, s, i, a, o, l, d] = t, c = e[0] === "-", m = l && l[0] === "-", g = (y, S = !1) => y !== void 0 && (S || y && c) ? -y : y;
|
|
3303
3480
|
return [
|
|
3304
3481
|
{
|
|
3305
3482
|
years: g(me(n)),
|
|
@@ -3309,11 +3486,11 @@ function il(t) {
|
|
|
3309
3486
|
hours: g(me(a)),
|
|
3310
3487
|
minutes: g(me(o)),
|
|
3311
3488
|
seconds: g(me(l), l === "-0"),
|
|
3312
|
-
milliseconds: g(dn(
|
|
3489
|
+
milliseconds: g(dn(d), m)
|
|
3313
3490
|
}
|
|
3314
3491
|
];
|
|
3315
3492
|
}
|
|
3316
|
-
const
|
|
3493
|
+
const hl = {
|
|
3317
3494
|
GMT: 0,
|
|
3318
3495
|
EDT: -240,
|
|
3319
3496
|
EST: -300,
|
|
@@ -3334,8 +3511,8 @@ function yn(t, e, n, r, s, i, a) {
|
|
|
3334
3511
|
};
|
|
3335
3512
|
return a && (o.second = ae(a)), t && (o.weekday = t.length > 3 ? Qr.indexOf(t) + 1 : es.indexOf(t) + 1), o;
|
|
3336
3513
|
}
|
|
3337
|
-
const
|
|
3338
|
-
function
|
|
3514
|
+
const ml = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
|
|
3515
|
+
function yl(t) {
|
|
3339
3516
|
const [
|
|
3340
3517
|
,
|
|
3341
3518
|
e,
|
|
@@ -3346,85 +3523,85 @@ function ll(t) {
|
|
|
3346
3523
|
a,
|
|
3347
3524
|
o,
|
|
3348
3525
|
l,
|
|
3349
|
-
c,
|
|
3350
3526
|
d,
|
|
3527
|
+
c,
|
|
3351
3528
|
m
|
|
3352
3529
|
] = t, g = yn(e, s, r, n, i, a, o);
|
|
3353
3530
|
let y;
|
|
3354
|
-
return l ? y =
|
|
3531
|
+
return l ? y = hl[l] : d ? y = 0 : y = _t(c, m), [g, new W(y)];
|
|
3355
3532
|
}
|
|
3356
|
-
function
|
|
3533
|
+
function gl(t) {
|
|
3357
3534
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
|
3358
3535
|
}
|
|
3359
|
-
const
|
|
3360
|
-
function
|
|
3536
|
+
const wl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, vl = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, xl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
|
|
3537
|
+
function Hn(t) {
|
|
3361
3538
|
const [, e, n, r, s, i, a, o] = t;
|
|
3362
3539
|
return [yn(e, s, r, n, i, a, o), W.utcInstance];
|
|
3363
3540
|
}
|
|
3364
|
-
function
|
|
3541
|
+
function bl(t) {
|
|
3365
3542
|
const [, e, n, r, s, i, a, o] = t;
|
|
3366
3543
|
return [yn(e, o, n, r, s, i, a), W.utcInstance];
|
|
3367
3544
|
}
|
|
3368
|
-
const
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
),
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
),
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
),
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3545
|
+
const kl = De(nl, mn), _l = De(rl, mn), Tl = De(sl, mn), Sl = De(os), us = Ie(
|
|
3546
|
+
ul,
|
|
3547
|
+
je,
|
|
3548
|
+
Ke,
|
|
3549
|
+
Xe
|
|
3550
|
+
), pl = Ie(
|
|
3551
|
+
il,
|
|
3552
|
+
je,
|
|
3553
|
+
Ke,
|
|
3554
|
+
Xe
|
|
3555
|
+
), Ol = Ie(
|
|
3556
|
+
al,
|
|
3557
|
+
je,
|
|
3558
|
+
Ke,
|
|
3559
|
+
Xe
|
|
3560
|
+
), Nl = Ie(
|
|
3561
|
+
je,
|
|
3562
|
+
Ke,
|
|
3563
|
+
Xe
|
|
3387
3564
|
);
|
|
3388
|
-
function
|
|
3389
|
-
return
|
|
3565
|
+
function El(t) {
|
|
3566
|
+
return Fe(
|
|
3390
3567
|
t,
|
|
3391
|
-
[
|
|
3392
|
-
[
|
|
3393
|
-
[
|
|
3394
|
-
[
|
|
3568
|
+
[kl, us],
|
|
3569
|
+
[_l, pl],
|
|
3570
|
+
[Tl, Ol],
|
|
3571
|
+
[Sl, Nl]
|
|
3395
3572
|
);
|
|
3396
3573
|
}
|
|
3397
|
-
function
|
|
3398
|
-
return
|
|
3574
|
+
function Ml(t) {
|
|
3575
|
+
return Fe(gl(t), [ml, yl]);
|
|
3399
3576
|
}
|
|
3400
|
-
function
|
|
3401
|
-
return
|
|
3577
|
+
function Cl(t) {
|
|
3578
|
+
return Fe(
|
|
3402
3579
|
t,
|
|
3403
|
-
[
|
|
3404
|
-
[
|
|
3405
|
-
[
|
|
3580
|
+
[wl, Hn],
|
|
3581
|
+
[vl, Hn],
|
|
3582
|
+
[xl, bl]
|
|
3406
3583
|
);
|
|
3407
3584
|
}
|
|
3408
|
-
function
|
|
3409
|
-
return
|
|
3585
|
+
function Dl(t) {
|
|
3586
|
+
return Fe(t, [dl, fl]);
|
|
3410
3587
|
}
|
|
3411
|
-
const
|
|
3412
|
-
function
|
|
3413
|
-
return
|
|
3588
|
+
const Il = Ie(je);
|
|
3589
|
+
function Fl(t) {
|
|
3590
|
+
return Fe(t, [cl, Il]);
|
|
3414
3591
|
}
|
|
3415
|
-
const
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3592
|
+
const jl = De(ol, ll), Vl = De(ls), Rl = Ie(
|
|
3593
|
+
je,
|
|
3594
|
+
Ke,
|
|
3595
|
+
Xe
|
|
3419
3596
|
);
|
|
3420
|
-
function
|
|
3421
|
-
return
|
|
3597
|
+
function Wl(t) {
|
|
3598
|
+
return Fe(
|
|
3422
3599
|
t,
|
|
3423
|
-
[
|
|
3424
|
-
[
|
|
3600
|
+
[jl, us],
|
|
3601
|
+
[Vl, Rl]
|
|
3425
3602
|
);
|
|
3426
3603
|
}
|
|
3427
|
-
const
|
|
3604
|
+
const Yn = "Invalid Duration", cs = {
|
|
3428
3605
|
weeks: {
|
|
3429
3606
|
days: 7,
|
|
3430
3607
|
hours: 168,
|
|
@@ -3441,7 +3618,7 @@ const Hn = "Invalid Duration", cs = {
|
|
|
3441
3618
|
hours: { minutes: 60, seconds: 3600, milliseconds: 3600 * 1e3 },
|
|
3442
3619
|
minutes: { seconds: 60, milliseconds: 60 * 1e3 },
|
|
3443
3620
|
seconds: { milliseconds: 1e3 }
|
|
3444
|
-
},
|
|
3621
|
+
}, $l = {
|
|
3445
3622
|
years: {
|
|
3446
3623
|
quarters: 4,
|
|
3447
3624
|
months: 12,
|
|
@@ -3470,7 +3647,7 @@ const Hn = "Invalid Duration", cs = {
|
|
|
3470
3647
|
milliseconds: 720 * 60 * 60 * 1e3
|
|
3471
3648
|
},
|
|
3472
3649
|
...cs
|
|
3473
|
-
}, A = 146097 / 400, _e = 146097 / 4800,
|
|
3650
|
+
}, A = 146097 / 400, _e = 146097 / 4800, Ll = {
|
|
3474
3651
|
years: {
|
|
3475
3652
|
quarters: 4,
|
|
3476
3653
|
months: 12,
|
|
@@ -3509,7 +3686,7 @@ const Hn = "Invalid Duration", cs = {
|
|
|
3509
3686
|
"minutes",
|
|
3510
3687
|
"seconds",
|
|
3511
3688
|
"milliseconds"
|
|
3512
|
-
],
|
|
3689
|
+
], Al = ge.slice(0).reverse();
|
|
3513
3690
|
function ee(t, e, n = !1) {
|
|
3514
3691
|
const r = {
|
|
3515
3692
|
values: n ? e.values : { ...t.values, ...e.values || {} },
|
|
@@ -3521,11 +3698,11 @@ function ee(t, e, n = !1) {
|
|
|
3521
3698
|
}
|
|
3522
3699
|
function ds(t, e) {
|
|
3523
3700
|
let n = e.milliseconds ?? 0;
|
|
3524
|
-
for (const r of
|
|
3701
|
+
for (const r of Al.slice(1))
|
|
3525
3702
|
e[r] && (n += e[r] * t[r].milliseconds);
|
|
3526
3703
|
return n;
|
|
3527
3704
|
}
|
|
3528
|
-
function
|
|
3705
|
+
function qn(t, e) {
|
|
3529
3706
|
const n = ds(t, e) < 0 ? -1 : 1;
|
|
3530
3707
|
ge.reduceRight((r, s) => {
|
|
3531
3708
|
if (v(e[s]))
|
|
@@ -3545,7 +3722,7 @@ function Yn(t, e) {
|
|
|
3545
3722
|
return s;
|
|
3546
3723
|
}, null);
|
|
3547
3724
|
}
|
|
3548
|
-
function
|
|
3725
|
+
function Gn(t) {
|
|
3549
3726
|
const e = {};
|
|
3550
3727
|
for (const [n, r] of Object.entries(t))
|
|
3551
3728
|
r !== 0 && (e[n] = r);
|
|
@@ -3557,7 +3734,7 @@ class k {
|
|
|
3557
3734
|
*/
|
|
3558
3735
|
constructor(e) {
|
|
3559
3736
|
const n = e.conversionAccuracy === "longterm" || !1;
|
|
3560
|
-
let r = n ?
|
|
3737
|
+
let r = n ? Ll : $l;
|
|
3561
3738
|
e.matrix && (r = e.matrix), this.values = e.values, this.loc = e.loc || T.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = r, this.isLuxonDuration = !0;
|
|
3562
3739
|
}
|
|
3563
3740
|
/**
|
|
@@ -3594,7 +3771,7 @@ class k {
|
|
|
3594
3771
|
*/
|
|
3595
3772
|
static fromObject(e, n = {}) {
|
|
3596
3773
|
if (e == null || typeof e != "object")
|
|
3597
|
-
throw new
|
|
3774
|
+
throw new F(
|
|
3598
3775
|
`Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
|
|
3599
3776
|
);
|
|
3600
3777
|
return new k({
|
|
@@ -3621,7 +3798,7 @@ class k {
|
|
|
3621
3798
|
return e;
|
|
3622
3799
|
if (typeof e == "object")
|
|
3623
3800
|
return k.fromObject(e);
|
|
3624
|
-
throw new
|
|
3801
|
+
throw new F(
|
|
3625
3802
|
`Unknown duration argument ${e} of type ${typeof e}`
|
|
3626
3803
|
);
|
|
3627
3804
|
}
|
|
@@ -3640,7 +3817,7 @@ class k {
|
|
|
3640
3817
|
* @return {Duration}
|
|
3641
3818
|
*/
|
|
3642
3819
|
static fromISO(e, n) {
|
|
3643
|
-
const [r] =
|
|
3820
|
+
const [r] = Dl(e);
|
|
3644
3821
|
return r ? k.fromObject(r, n) : k.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
3645
3822
|
}
|
|
3646
3823
|
/**
|
|
@@ -3660,7 +3837,7 @@ class k {
|
|
|
3660
3837
|
* @return {Duration}
|
|
3661
3838
|
*/
|
|
3662
3839
|
static fromISOTime(e, n) {
|
|
3663
|
-
const [r] =
|
|
3840
|
+
const [r] = Fl(e);
|
|
3664
3841
|
return r ? k.fromObject(r, n) : k.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
3665
3842
|
}
|
|
3666
3843
|
/**
|
|
@@ -3671,10 +3848,10 @@ class k {
|
|
|
3671
3848
|
*/
|
|
3672
3849
|
static invalid(e, n = null) {
|
|
3673
3850
|
if (!e)
|
|
3674
|
-
throw new
|
|
3675
|
-
const r = e instanceof
|
|
3851
|
+
throw new F("need to specify a reason the Duration is invalid");
|
|
3852
|
+
const r = e instanceof Y ? e : new Y(e, n);
|
|
3676
3853
|
if (N.throwOnInvalid)
|
|
3677
|
-
throw new
|
|
3854
|
+
throw new fo(r);
|
|
3678
3855
|
return new k({ invalid: r });
|
|
3679
3856
|
}
|
|
3680
3857
|
/**
|
|
@@ -3758,7 +3935,7 @@ class k {
|
|
|
3758
3935
|
...n,
|
|
3759
3936
|
floor: n.round !== !1 && n.floor !== !1
|
|
3760
3937
|
};
|
|
3761
|
-
return this.isValid ?
|
|
3938
|
+
return this.isValid ? j.create(this.loc, r).formatDurationFromString(this, e) : Yn;
|
|
3762
3939
|
}
|
|
3763
3940
|
/**
|
|
3764
3941
|
* Returns a string representation of a Duration with all units included.
|
|
@@ -3777,7 +3954,7 @@ class k {
|
|
|
3777
3954
|
* ```
|
|
3778
3955
|
*/
|
|
3779
3956
|
toHuman(e = {}) {
|
|
3780
|
-
if (!this.isValid) return
|
|
3957
|
+
if (!this.isValid) return Yn;
|
|
3781
3958
|
const n = e.showZeros !== !1, r = ge.map((s) => {
|
|
3782
3959
|
const i = this.values[s];
|
|
3783
3960
|
return v(i) || i === 0 && !n ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(i);
|
|
@@ -3853,7 +4030,7 @@ class k {
|
|
|
3853
4030
|
* Returns a string representation of this Duration appropriate for the REPL.
|
|
3854
4031
|
* @return {string}
|
|
3855
4032
|
*/
|
|
3856
|
-
[
|
|
4033
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
3857
4034
|
return this.isValid ? `Duration { values: ${JSON.stringify(this.values)} }` : `Duration { Invalid, reason: ${this.invalidReason} }`;
|
|
3858
4035
|
}
|
|
3859
4036
|
/**
|
|
@@ -3967,7 +4144,7 @@ class k {
|
|
|
3967
4144
|
normalize() {
|
|
3968
4145
|
if (!this.isValid) return this;
|
|
3969
4146
|
const e = this.toObject();
|
|
3970
|
-
return
|
|
4147
|
+
return qn(this.matrix, e), ee(this, { values: e }, !0);
|
|
3971
4148
|
}
|
|
3972
4149
|
/**
|
|
3973
4150
|
* Rescale units to its largest representation
|
|
@@ -3976,7 +4153,7 @@ class k {
|
|
|
3976
4153
|
*/
|
|
3977
4154
|
rescale() {
|
|
3978
4155
|
if (!this.isValid) return this;
|
|
3979
|
-
const e =
|
|
4156
|
+
const e = Gn(this.normalize().shiftToAll().toObject());
|
|
3980
4157
|
return ee(this, { values: e }, !0);
|
|
3981
4158
|
}
|
|
3982
4159
|
/**
|
|
@@ -3995,15 +4172,15 @@ class k {
|
|
|
3995
4172
|
if (e.indexOf(a) >= 0) {
|
|
3996
4173
|
i = a;
|
|
3997
4174
|
let o = 0;
|
|
3998
|
-
for (const
|
|
3999
|
-
o += this.matrix[
|
|
4175
|
+
for (const d in r)
|
|
4176
|
+
o += this.matrix[d][a] * r[d], r[d] = 0;
|
|
4000
4177
|
le(s[a]) && (o += s[a]);
|
|
4001
4178
|
const l = Math.trunc(o);
|
|
4002
4179
|
n[a] = l, r[a] = (o * 1e3 - l * 1e3) / 1e3;
|
|
4003
4180
|
} else le(s[a]) && (r[a] = s[a]);
|
|
4004
4181
|
for (const a in r)
|
|
4005
4182
|
r[a] !== 0 && (n[i] += a === i ? r[a] : r[a] / this.matrix[i][a]);
|
|
4006
|
-
return
|
|
4183
|
+
return qn(this.matrix, n), ee(this, { values: n }, !0);
|
|
4007
4184
|
}
|
|
4008
4185
|
/**
|
|
4009
4186
|
* Shift this Duration to all available units.
|
|
@@ -4041,7 +4218,7 @@ class k {
|
|
|
4041
4218
|
*/
|
|
4042
4219
|
removeZeros() {
|
|
4043
4220
|
if (!this.isValid) return this;
|
|
4044
|
-
const e =
|
|
4221
|
+
const e = Gn(this.values);
|
|
4045
4222
|
return ee(this, { values: e }, !0);
|
|
4046
4223
|
}
|
|
4047
4224
|
/**
|
|
@@ -4148,7 +4325,7 @@ class k {
|
|
|
4148
4325
|
}
|
|
4149
4326
|
}
|
|
4150
4327
|
const Te = "Invalid Interval";
|
|
4151
|
-
function
|
|
4328
|
+
function Pl(t, e) {
|
|
4152
4329
|
return !t || !t.isValid ? O.invalid("missing or invalid start") : !e || !e.isValid ? O.invalid("missing or invalid end") : e < t ? O.invalid(
|
|
4153
4330
|
"end before start",
|
|
4154
4331
|
`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`
|
|
@@ -4169,10 +4346,10 @@ class O {
|
|
|
4169
4346
|
*/
|
|
4170
4347
|
static invalid(e, n = null) {
|
|
4171
4348
|
if (!e)
|
|
4172
|
-
throw new
|
|
4173
|
-
const r = e instanceof
|
|
4349
|
+
throw new F("need to specify a reason the Interval is invalid");
|
|
4350
|
+
const r = e instanceof Y ? e : new Y(e, n);
|
|
4174
4351
|
if (N.throwOnInvalid)
|
|
4175
|
-
throw new
|
|
4352
|
+
throw new co(r);
|
|
4176
4353
|
return new O({ invalid: r });
|
|
4177
4354
|
}
|
|
4178
4355
|
/**
|
|
@@ -4182,7 +4359,7 @@ class O {
|
|
|
4182
4359
|
* @return {Interval}
|
|
4183
4360
|
*/
|
|
4184
4361
|
static fromDateTimes(e, n) {
|
|
4185
|
-
const r =
|
|
4362
|
+
const r = Le(e), s = Le(n), i = Pl(r, s);
|
|
4186
4363
|
return i ?? new O({
|
|
4187
4364
|
start: r,
|
|
4188
4365
|
end: s
|
|
@@ -4195,7 +4372,7 @@ class O {
|
|
|
4195
4372
|
* @return {Interval}
|
|
4196
4373
|
*/
|
|
4197
4374
|
static after(e, n) {
|
|
4198
|
-
const r = k.fromDurationLike(n), s =
|
|
4375
|
+
const r = k.fromDurationLike(n), s = Le(e);
|
|
4199
4376
|
return O.fromDateTimes(s, s.plus(r));
|
|
4200
4377
|
}
|
|
4201
4378
|
/**
|
|
@@ -4205,7 +4382,7 @@ class O {
|
|
|
4205
4382
|
* @return {Interval}
|
|
4206
4383
|
*/
|
|
4207
4384
|
static before(e, n) {
|
|
4208
|
-
const r = k.fromDurationLike(n), s =
|
|
4385
|
+
const r = k.fromDurationLike(n), s = Le(e);
|
|
4209
4386
|
return O.fromDateTimes(s.minus(r), s);
|
|
4210
4387
|
}
|
|
4211
4388
|
/**
|
|
@@ -4234,13 +4411,13 @@ class O {
|
|
|
4234
4411
|
if (a && l)
|
|
4235
4412
|
return O.fromDateTimes(i, o);
|
|
4236
4413
|
if (a) {
|
|
4237
|
-
const
|
|
4238
|
-
if (
|
|
4239
|
-
return O.after(i,
|
|
4414
|
+
const d = k.fromISO(s, n);
|
|
4415
|
+
if (d.isValid)
|
|
4416
|
+
return O.after(i, d);
|
|
4240
4417
|
} else if (l) {
|
|
4241
|
-
const
|
|
4242
|
-
if (
|
|
4243
|
-
return O.before(o,
|
|
4418
|
+
const d = k.fromISO(r, n);
|
|
4419
|
+
if (d.isValid)
|
|
4420
|
+
return O.before(o, d);
|
|
4244
4421
|
}
|
|
4245
4422
|
}
|
|
4246
4423
|
return O.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
|
@@ -4375,7 +4552,7 @@ class O {
|
|
|
4375
4552
|
*/
|
|
4376
4553
|
splitAt(...e) {
|
|
4377
4554
|
if (!this.isValid) return [];
|
|
4378
|
-
const n = e.map(
|
|
4555
|
+
const n = e.map(Le).filter((a) => this.contains(a)).sort((a, o) => a.toMillis() - o.toMillis()), r = [];
|
|
4379
4556
|
let { s } = this, i = 0;
|
|
4380
4557
|
for (; s < this.e; ) {
|
|
4381
4558
|
const a = n[i] || this.e, o = +a > +this.e ? this.e : a;
|
|
@@ -4498,7 +4675,7 @@ class O {
|
|
|
4498
4675
|
const s = [], i = e.map((l) => [
|
|
4499
4676
|
{ time: l.s, type: "s" },
|
|
4500
4677
|
{ time: l.e, type: "e" }
|
|
4501
|
-
]), a = Array.prototype.concat(...i), o = a.sort((l,
|
|
4678
|
+
]), a = Array.prototype.concat(...i), o = a.sort((l, d) => l.time - d.time);
|
|
4502
4679
|
for (const l of o)
|
|
4503
4680
|
r += l.type === "s" ? 1 : -1, r === 1 ? n = l.time : (n && +n != +l.time && s.push(O.fromDateTimes(n, l.time)), n = null);
|
|
4504
4681
|
return O.merge(s);
|
|
@@ -4522,7 +4699,7 @@ class O {
|
|
|
4522
4699
|
* Returns a string representation of this Interval appropriate for the REPL.
|
|
4523
4700
|
* @return {string}
|
|
4524
4701
|
*/
|
|
4525
|
-
[
|
|
4702
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
4526
4703
|
return this.isValid ? `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }` : `Interval { Invalid, reason: ${this.invalidReason} }`;
|
|
4527
4704
|
}
|
|
4528
4705
|
/**
|
|
@@ -4544,7 +4721,7 @@ class O {
|
|
|
4544
4721
|
* @return {string}
|
|
4545
4722
|
*/
|
|
4546
4723
|
toLocaleString(e = ft, n = {}) {
|
|
4547
|
-
return this.isValid ?
|
|
4724
|
+
return this.isValid ? j.create(this.s.loc.clone(n), e).formatInterval(this) : Te;
|
|
4548
4725
|
}
|
|
4549
4726
|
/**
|
|
4550
4727
|
* Returns an ISO 8601-compliant string representation of this Interval.
|
|
@@ -4782,47 +4959,47 @@ class st {
|
|
|
4782
4959
|
* @return {Object}
|
|
4783
4960
|
*/
|
|
4784
4961
|
static features() {
|
|
4785
|
-
return { relative:
|
|
4962
|
+
return { relative: qr(), localeWeek: Gr() };
|
|
4786
4963
|
}
|
|
4787
4964
|
}
|
|
4788
|
-
function
|
|
4965
|
+
function Bn(t, e) {
|
|
4789
4966
|
const n = (s) => s.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), r = n(e) - n(t);
|
|
4790
4967
|
return Math.floor(k.fromMillis(r).as("days"));
|
|
4791
4968
|
}
|
|
4792
|
-
function
|
|
4969
|
+
function zl(t, e, n) {
|
|
4793
4970
|
const r = [
|
|
4794
|
-
["years", (l,
|
|
4795
|
-
["quarters", (l,
|
|
4796
|
-
["months", (l,
|
|
4971
|
+
["years", (l, d) => d.year - l.year],
|
|
4972
|
+
["quarters", (l, d) => d.quarter - l.quarter + (d.year - l.year) * 4],
|
|
4973
|
+
["months", (l, d) => d.month - l.month + (d.year - l.year) * 12],
|
|
4797
4974
|
[
|
|
4798
4975
|
"weeks",
|
|
4799
|
-
(l,
|
|
4800
|
-
const
|
|
4801
|
-
return (
|
|
4976
|
+
(l, d) => {
|
|
4977
|
+
const c = Bn(l, d);
|
|
4978
|
+
return (c - c % 7) / 7;
|
|
4802
4979
|
}
|
|
4803
4980
|
],
|
|
4804
|
-
["days",
|
|
4981
|
+
["days", Bn]
|
|
4805
4982
|
], s = {}, i = t;
|
|
4806
4983
|
let a, o;
|
|
4807
|
-
for (const [l,
|
|
4808
|
-
n.indexOf(l) >= 0 && (a = l, s[l] =
|
|
4984
|
+
for (const [l, d] of r)
|
|
4985
|
+
n.indexOf(l) >= 0 && (a = l, s[l] = d(t, e), o = i.plus(s), o > e ? (s[l]--, t = i.plus(s), t > e && (o = t, s[l]--, t = i.plus(s))) : t = o);
|
|
4809
4986
|
return [t, s, o, a];
|
|
4810
4987
|
}
|
|
4811
|
-
function
|
|
4812
|
-
let [s, i, a, o] =
|
|
4813
|
-
const l = e - s,
|
|
4988
|
+
function Ul(t, e, n, r) {
|
|
4989
|
+
let [s, i, a, o] = zl(t, e, n);
|
|
4990
|
+
const l = e - s, d = n.filter(
|
|
4814
4991
|
(m) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(m) >= 0
|
|
4815
4992
|
);
|
|
4816
|
-
|
|
4817
|
-
const
|
|
4818
|
-
return
|
|
4993
|
+
d.length === 0 && (a < e && (a = s.plus({ [o]: 1 })), a !== s && (i[o] = (i[o] || 0) + l / (a - s)));
|
|
4994
|
+
const c = k.fromObject(i, r);
|
|
4995
|
+
return d.length > 0 ? k.fromMillis(l, r).shiftTo(...d).plus(c) : c;
|
|
4819
4996
|
}
|
|
4820
|
-
const
|
|
4997
|
+
const Zl = "missing Intl.DateTimeFormat.formatToParts support";
|
|
4821
4998
|
function _(t, e = (n) => n) {
|
|
4822
|
-
return { regex: t, deser: ([n]) => e(
|
|
4999
|
+
return { regex: t, deser: ([n]) => e(jo(n)) };
|
|
4823
5000
|
}
|
|
4824
|
-
const
|
|
4825
|
-
function
|
|
5001
|
+
const Hl = " ", fs = `[ ${Hl}]`, hs = new RegExp(fs, "g");
|
|
5002
|
+
function Yl(t) {
|
|
4826
5003
|
return t.replace(/\./g, "\\.?").replace(hs, fs);
|
|
4827
5004
|
}
|
|
4828
5005
|
function Jn(t) {
|
|
@@ -4830,7 +5007,7 @@ function Jn(t) {
|
|
|
4830
5007
|
}
|
|
4831
5008
|
function Z(t, e) {
|
|
4832
5009
|
return t === null ? null : {
|
|
4833
|
-
regex: RegExp(t.map(
|
|
5010
|
+
regex: RegExp(t.map(Yl).join("|")),
|
|
4834
5011
|
deser: ([n]) => t.findIndex((r) => Jn(n) === Jn(r)) + e
|
|
4835
5012
|
};
|
|
4836
5013
|
}
|
|
@@ -4840,11 +5017,11 @@ function Kn(t, e) {
|
|
|
4840
5017
|
function it(t) {
|
|
4841
5018
|
return { regex: t, deser: ([e]) => e };
|
|
4842
5019
|
}
|
|
4843
|
-
function
|
|
5020
|
+
function ql(t) {
|
|
4844
5021
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
4845
5022
|
}
|
|
4846
|
-
function
|
|
4847
|
-
const n = U(e), r = U(e, "{2}"), s = U(e, "{3}"), i = U(e, "{4}"), a = U(e, "{6}"), o = U(e, "{1,2}"), l = U(e, "{1,3}"),
|
|
5023
|
+
function Gl(t, e) {
|
|
5024
|
+
const n = U(e), r = U(e, "{2}"), s = U(e, "{3}"), i = U(e, "{4}"), a = U(e, "{6}"), o = U(e, "{1,2}"), l = U(e, "{1,3}"), d = U(e, "{1,6}"), c = U(e, "{1,9}"), m = U(e, "{2,4}"), g = U(e, "{4,6}"), y = (C) => ({ regex: RegExp(ql(C.val)), deser: ([G]) => G, literal: !0 }), R = ((C) => {
|
|
4848
5025
|
if (t.literal)
|
|
4849
5026
|
return y(C);
|
|
4850
5027
|
switch (C.val) {
|
|
@@ -4855,7 +5032,7 @@ function Pl(t, e) {
|
|
|
4855
5032
|
return Z(e.eras("long"), 0);
|
|
4856
5033
|
// years
|
|
4857
5034
|
case "y":
|
|
4858
|
-
return _(
|
|
5035
|
+
return _(d);
|
|
4859
5036
|
case "yy":
|
|
4860
5037
|
return _(m, nn);
|
|
4861
5038
|
case "yyyy":
|
|
@@ -4917,7 +5094,7 @@ function Pl(t, e) {
|
|
|
4917
5094
|
case "SSS":
|
|
4918
5095
|
return _(s);
|
|
4919
5096
|
case "u":
|
|
4920
|
-
return it(
|
|
5097
|
+
return it(c);
|
|
4921
5098
|
case "uu":
|
|
4922
5099
|
return it(o);
|
|
4923
5100
|
case "uuu":
|
|
@@ -4965,11 +5142,11 @@ function Pl(t, e) {
|
|
|
4965
5142
|
return y(C);
|
|
4966
5143
|
}
|
|
4967
5144
|
})(t) || {
|
|
4968
|
-
invalidReason:
|
|
5145
|
+
invalidReason: Zl
|
|
4969
5146
|
};
|
|
4970
5147
|
return R.token = t, R;
|
|
4971
5148
|
}
|
|
4972
|
-
const
|
|
5149
|
+
const Bl = {
|
|
4973
5150
|
year: {
|
|
4974
5151
|
"2-digit": "yy",
|
|
4975
5152
|
numeric: "yyyyy"
|
|
@@ -5011,7 +5188,7 @@ const zl = {
|
|
|
5011
5188
|
short: "ZZZ"
|
|
5012
5189
|
}
|
|
5013
5190
|
};
|
|
5014
|
-
function
|
|
5191
|
+
function Jl(t, e, n) {
|
|
5015
5192
|
const { type: r, value: s } = t;
|
|
5016
5193
|
if (r === "literal") {
|
|
5017
5194
|
const l = /^\s+$/.test(s);
|
|
@@ -5023,17 +5200,17 @@ function Ul(t, e, n) {
|
|
|
5023
5200
|
const i = e[r];
|
|
5024
5201
|
let a = r;
|
|
5025
5202
|
r === "hour" && (e.hour12 != null ? a = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? a = "hour12" : a = "hour24" : a = n.hour12 ? "hour12" : "hour24");
|
|
5026
|
-
let o =
|
|
5203
|
+
let o = Bl[a];
|
|
5027
5204
|
if (typeof o == "object" && (o = o[i]), o)
|
|
5028
5205
|
return {
|
|
5029
5206
|
literal: !1,
|
|
5030
5207
|
val: o
|
|
5031
5208
|
};
|
|
5032
5209
|
}
|
|
5033
|
-
function
|
|
5210
|
+
function Kl(t) {
|
|
5034
5211
|
return [`^${t.map((n) => n.regex).reduce((n, r) => `${n}(${r.source})`, "")}$`, t];
|
|
5035
5212
|
}
|
|
5036
|
-
function
|
|
5213
|
+
function Xl(t, e, n) {
|
|
5037
5214
|
const r = t.match(e);
|
|
5038
5215
|
if (r) {
|
|
5039
5216
|
const s = {};
|
|
@@ -5047,7 +5224,7 @@ function ql(t, e, n) {
|
|
|
5047
5224
|
} else
|
|
5048
5225
|
return [r, {}];
|
|
5049
5226
|
}
|
|
5050
|
-
function
|
|
5227
|
+
function Ql(t) {
|
|
5051
5228
|
const e = (i) => {
|
|
5052
5229
|
switch (i) {
|
|
5053
5230
|
case "S":
|
|
@@ -5088,28 +5265,28 @@ function Hl(t) {
|
|
|
5088
5265
|
}, {}), n, r];
|
|
5089
5266
|
}
|
|
5090
5267
|
let $t = null;
|
|
5091
|
-
function
|
|
5268
|
+
function eu() {
|
|
5092
5269
|
return $t || ($t = w.fromMillis(1555555555555)), $t;
|
|
5093
5270
|
}
|
|
5094
|
-
function
|
|
5271
|
+
function tu(t, e) {
|
|
5095
5272
|
if (t.literal)
|
|
5096
5273
|
return t;
|
|
5097
|
-
const n =
|
|
5274
|
+
const n = j.macroTokenToFormatOpts(t.val), r = ws(n, e);
|
|
5098
5275
|
return r == null || r.includes(void 0) ? t : r;
|
|
5099
5276
|
}
|
|
5100
5277
|
function ms(t, e) {
|
|
5101
|
-
return Array.prototype.concat(...t.map((n) =>
|
|
5278
|
+
return Array.prototype.concat(...t.map((n) => tu(n, e)));
|
|
5102
5279
|
}
|
|
5103
5280
|
class ys {
|
|
5104
5281
|
constructor(e, n) {
|
|
5105
|
-
if (this.locale = e, this.format = n, this.tokens = ms(
|
|
5106
|
-
const [r, s] =
|
|
5282
|
+
if (this.locale = e, this.format = n, this.tokens = ms(j.parseFormat(n), e), this.units = this.tokens.map((r) => Gl(r, e)), this.disqualifyingUnit = this.units.find((r) => r.invalidReason), !this.disqualifyingUnit) {
|
|
5283
|
+
const [r, s] = Kl(this.units);
|
|
5107
5284
|
this.regex = RegExp(r, "i"), this.handlers = s;
|
|
5108
5285
|
}
|
|
5109
5286
|
}
|
|
5110
5287
|
explainFromTokens(e) {
|
|
5111
5288
|
if (this.isValid) {
|
|
5112
|
-
const [n, r] =
|
|
5289
|
+
const [n, r] = Xl(e, this.regex, this.handlers), [s, i, a] = r ? Ql(r) : [null, null, void 0];
|
|
5113
5290
|
if (Me(r, "a") && Me(r, "H"))
|
|
5114
5291
|
throw new pe(
|
|
5115
5292
|
"Can't include meridiem when specifying 24-hour format"
|
|
@@ -5137,19 +5314,19 @@ class ys {
|
|
|
5137
5314
|
function gs(t, e, n) {
|
|
5138
5315
|
return new ys(t, n).explainFromTokens(e);
|
|
5139
5316
|
}
|
|
5140
|
-
function
|
|
5317
|
+
function nu(t, e, n) {
|
|
5141
5318
|
const { result: r, zone: s, specificOffset: i, invalidReason: a } = gs(t, e, n);
|
|
5142
5319
|
return [r, s, i, a];
|
|
5143
5320
|
}
|
|
5144
5321
|
function ws(t, e) {
|
|
5145
5322
|
if (!t)
|
|
5146
5323
|
return null;
|
|
5147
|
-
const r =
|
|
5148
|
-
return s.map((a) =>
|
|
5324
|
+
const r = j.create(e, t).dtFormatter(eu()), s = r.formatToParts(), i = r.resolvedOptions();
|
|
5325
|
+
return s.map((a) => Jl(a, t, i));
|
|
5149
5326
|
}
|
|
5150
5327
|
const Lt = "Invalid DateTime", Xn = 864e13;
|
|
5151
|
-
function
|
|
5152
|
-
return new
|
|
5328
|
+
function Pe(t) {
|
|
5329
|
+
return new Y("unsupported zone", `the zone "${t.name}" is not supported`);
|
|
5153
5330
|
}
|
|
5154
5331
|
function At(t) {
|
|
5155
5332
|
return t.weekData === null && (t.weekData = ht(t.c)), t.weekData;
|
|
@@ -5214,25 +5391,25 @@ function Qn(t, e) {
|
|
|
5214
5391
|
seconds: e.seconds,
|
|
5215
5392
|
milliseconds: e.milliseconds
|
|
5216
5393
|
}).as("milliseconds"), o = kt(i);
|
|
5217
|
-
let [l,
|
|
5218
|
-
return a !== 0 && (l += a,
|
|
5394
|
+
let [l, d] = vs(o, n, t.zone);
|
|
5395
|
+
return a !== 0 && (l += a, d = t.zone.offset(l)), { ts: l, o: d };
|
|
5219
5396
|
}
|
|
5220
5397
|
function Se(t, e, n, r, s, i) {
|
|
5221
5398
|
const { setZone: a, zone: o } = n;
|
|
5222
5399
|
if (t && Object.keys(t).length !== 0 || e) {
|
|
5223
|
-
const l = e || o,
|
|
5400
|
+
const l = e || o, d = w.fromObject(t, {
|
|
5224
5401
|
...n,
|
|
5225
5402
|
zone: l,
|
|
5226
5403
|
specificOffset: i
|
|
5227
5404
|
});
|
|
5228
|
-
return a ?
|
|
5405
|
+
return a ? d : d.setZone(o);
|
|
5229
5406
|
} else
|
|
5230
5407
|
return w.invalid(
|
|
5231
|
-
new
|
|
5408
|
+
new Y("unparsable", `the input "${s}" can't be parsed as ${r}`)
|
|
5232
5409
|
);
|
|
5233
5410
|
}
|
|
5234
5411
|
function ot(t, e, n = !0) {
|
|
5235
|
-
return t.isValid ?
|
|
5412
|
+
return t.isValid ? j.create(T.create("en-US"), {
|
|
5236
5413
|
allowZ: n,
|
|
5237
5414
|
forceSimple: !0
|
|
5238
5415
|
}).formatDateTimeFromString(t, e) : null;
|
|
@@ -5275,20 +5452,20 @@ const xs = {
|
|
|
5275
5452
|
minute: 0,
|
|
5276
5453
|
second: 0,
|
|
5277
5454
|
millisecond: 0
|
|
5278
|
-
},
|
|
5455
|
+
}, ru = {
|
|
5279
5456
|
weekNumber: 1,
|
|
5280
5457
|
weekday: 1,
|
|
5281
5458
|
hour: 0,
|
|
5282
5459
|
minute: 0,
|
|
5283
5460
|
second: 0,
|
|
5284
5461
|
millisecond: 0
|
|
5285
|
-
},
|
|
5462
|
+
}, su = {
|
|
5286
5463
|
ordinal: 1,
|
|
5287
5464
|
hour: 0,
|
|
5288
5465
|
minute: 0,
|
|
5289
5466
|
second: 0,
|
|
5290
5467
|
millisecond: 0
|
|
5291
|
-
}, ut = ["year", "month", "day", "hour", "minute", "second", "millisecond"],
|
|
5468
|
+
}, ut = ["year", "month", "day", "hour", "minute", "second", "millisecond"], iu = [
|
|
5292
5469
|
"weekYear",
|
|
5293
5470
|
"weekNumber",
|
|
5294
5471
|
"weekday",
|
|
@@ -5296,7 +5473,7 @@ const xs = {
|
|
|
5296
5473
|
"minute",
|
|
5297
5474
|
"second",
|
|
5298
5475
|
"millisecond"
|
|
5299
|
-
],
|
|
5476
|
+
], au = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
|
|
5300
5477
|
function ct(t) {
|
|
5301
5478
|
const e = {
|
|
5302
5479
|
year: "year",
|
|
@@ -5342,17 +5519,17 @@ function tr(t) {
|
|
|
5342
5519
|
return ct(t);
|
|
5343
5520
|
}
|
|
5344
5521
|
}
|
|
5345
|
-
function
|
|
5346
|
-
if (
|
|
5347
|
-
return t.offset(
|
|
5522
|
+
function ou(t) {
|
|
5523
|
+
if (ze === void 0 && (ze = N.now()), t.type !== "iana")
|
|
5524
|
+
return t.offset(ze);
|
|
5348
5525
|
const e = t.name;
|
|
5349
5526
|
let n = rn.get(e);
|
|
5350
|
-
return n === void 0 && (n = t.offset(
|
|
5527
|
+
return n === void 0 && (n = t.offset(ze), rn.set(e, n)), n;
|
|
5351
5528
|
}
|
|
5352
5529
|
function nr(t, e) {
|
|
5353
5530
|
const n = oe(e.zone, N.defaultZone);
|
|
5354
5531
|
if (!n.isValid)
|
|
5355
|
-
return w.invalid(
|
|
5532
|
+
return w.invalid(Pe(n));
|
|
5356
5533
|
const r = T.fromObject(e);
|
|
5357
5534
|
let s, i;
|
|
5358
5535
|
if (v(t.year))
|
|
@@ -5360,10 +5537,10 @@ function nr(t, e) {
|
|
|
5360
5537
|
else {
|
|
5361
5538
|
for (const l of ut)
|
|
5362
5539
|
v(t[l]) && (t[l] = xs[l]);
|
|
5363
|
-
const a =
|
|
5540
|
+
const a = Hr(t) || Yr(t);
|
|
5364
5541
|
if (a)
|
|
5365
5542
|
return w.invalid(a);
|
|
5366
|
-
const o =
|
|
5543
|
+
const o = ou(n);
|
|
5367
5544
|
[s, i] = lt(t, o, n);
|
|
5368
5545
|
}
|
|
5369
5546
|
return new w({ ts: s, zone: n, loc: r, o: i });
|
|
@@ -5383,7 +5560,7 @@ function sr(t) {
|
|
|
5383
5560
|
let e = {}, n;
|
|
5384
5561
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
|
5385
5562
|
}
|
|
5386
|
-
let
|
|
5563
|
+
let ze;
|
|
5387
5564
|
const rn = /* @__PURE__ */ new Map();
|
|
5388
5565
|
class w {
|
|
5389
5566
|
/**
|
|
@@ -5391,7 +5568,7 @@ class w {
|
|
|
5391
5568
|
*/
|
|
5392
5569
|
constructor(e) {
|
|
5393
5570
|
const n = e.zone || N.defaultZone;
|
|
5394
|
-
let r = e.invalid || (Number.isNaN(e.ts) ? new
|
|
5571
|
+
let r = e.invalid || (Number.isNaN(e.ts) ? new Y("invalid input") : null) || (n.isValid ? null : Pe(n));
|
|
5395
5572
|
this.ts = v(e.ts) ? N.now() : e.ts;
|
|
5396
5573
|
let s = null, i = null;
|
|
5397
5574
|
if (!r)
|
|
@@ -5399,7 +5576,7 @@ class w {
|
|
|
5399
5576
|
[s, i] = [e.old.c, e.old.o];
|
|
5400
5577
|
else {
|
|
5401
5578
|
const o = le(e.o) && !e.old ? e.o : n.offset(this.ts);
|
|
5402
|
-
s = at(this.ts, o), r = Number.isNaN(s.year) ? new
|
|
5579
|
+
s = at(this.ts, o), r = Number.isNaN(s.year) ? new Y("invalid input") : null, s = r ? null : s, i = r ? null : o;
|
|
5403
5580
|
}
|
|
5404
5581
|
this._zone = n, this.loc = e.loc || T.create(), this.invalid = r, this.weekData = null, this.localWeekData = null, this.c = s, this.o = i, this.isLuxonDateTime = !0;
|
|
5405
5582
|
}
|
|
@@ -5436,8 +5613,8 @@ class w {
|
|
|
5436
5613
|
* @return {DateTime}
|
|
5437
5614
|
*/
|
|
5438
5615
|
static local() {
|
|
5439
|
-
const [e, n] = sr(arguments), [r, s, i, a, o, l,
|
|
5440
|
-
return nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond:
|
|
5616
|
+
const [e, n] = sr(arguments), [r, s, i, a, o, l, d] = n;
|
|
5617
|
+
return nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond: d }, e);
|
|
5441
5618
|
}
|
|
5442
5619
|
/**
|
|
5443
5620
|
* Create a DateTime in UTC
|
|
@@ -5465,8 +5642,8 @@ class w {
|
|
|
5465
5642
|
* @return {DateTime}
|
|
5466
5643
|
*/
|
|
5467
5644
|
static utc() {
|
|
5468
|
-
const [e, n] = sr(arguments), [r, s, i, a, o, l,
|
|
5469
|
-
return e.zone = W.utcInstance, nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond:
|
|
5645
|
+
const [e, n] = sr(arguments), [r, s, i, a, o, l, d] = n;
|
|
5646
|
+
return e.zone = W.utcInstance, nr({ year: r, month: s, day: i, hour: a, minute: o, second: l, millisecond: d }, e);
|
|
5470
5647
|
}
|
|
5471
5648
|
/**
|
|
5472
5649
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
|
@@ -5476,7 +5653,7 @@ class w {
|
|
|
5476
5653
|
* @return {DateTime}
|
|
5477
5654
|
*/
|
|
5478
5655
|
static fromJSDate(e, n = {}) {
|
|
5479
|
-
const r =
|
|
5656
|
+
const r = Lo(e) ? e.valueOf() : NaN;
|
|
5480
5657
|
if (Number.isNaN(r))
|
|
5481
5658
|
return w.invalid("invalid input");
|
|
5482
5659
|
const s = oe(n.zone, N.defaultZone);
|
|
@@ -5484,7 +5661,7 @@ class w {
|
|
|
5484
5661
|
ts: r,
|
|
5485
5662
|
zone: s,
|
|
5486
5663
|
loc: T.fromObject(n)
|
|
5487
|
-
}) : w.invalid(
|
|
5664
|
+
}) : w.invalid(Pe(s));
|
|
5488
5665
|
}
|
|
5489
5666
|
/**
|
|
5490
5667
|
* Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
|
|
@@ -5504,7 +5681,7 @@ class w {
|
|
|
5504
5681
|
zone: oe(n.zone, N.defaultZone),
|
|
5505
5682
|
loc: T.fromObject(n)
|
|
5506
5683
|
});
|
|
5507
|
-
throw new
|
|
5684
|
+
throw new F(
|
|
5508
5685
|
`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
|
|
5509
5686
|
);
|
|
5510
5687
|
}
|
|
@@ -5526,7 +5703,7 @@ class w {
|
|
|
5526
5703
|
zone: oe(n.zone, N.defaultZone),
|
|
5527
5704
|
loc: T.fromObject(n)
|
|
5528
5705
|
});
|
|
5529
|
-
throw new
|
|
5706
|
+
throw new F("fromSeconds requires a numerical input");
|
|
5530
5707
|
}
|
|
5531
5708
|
/**
|
|
5532
5709
|
* Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
|
|
@@ -5565,26 +5742,26 @@ class w {
|
|
|
5565
5742
|
e = e || {};
|
|
5566
5743
|
const r = oe(n.zone, N.defaultZone);
|
|
5567
5744
|
if (!r.isValid)
|
|
5568
|
-
return w.invalid(
|
|
5569
|
-
const s = T.fromObject(n), i = yt(e, tr), { minDaysInFirstWeek: a, startOfWeek: o } = Pn(i, s), l = N.now(),
|
|
5570
|
-
if ((y ||
|
|
5745
|
+
return w.invalid(Pe(r));
|
|
5746
|
+
const s = T.fromObject(n), i = yt(e, tr), { minDaysInFirstWeek: a, startOfWeek: o } = Pn(i, s), l = N.now(), d = v(n.specificOffset) ? r.offset(l) : n.specificOffset, c = !v(i.ordinal), m = !v(i.year), g = !v(i.month) || !v(i.day), y = m || g, S = i.weekYear || i.weekNumber;
|
|
5747
|
+
if ((y || c) && S)
|
|
5571
5748
|
throw new pe(
|
|
5572
5749
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
5573
5750
|
);
|
|
5574
|
-
if (g &&
|
|
5751
|
+
if (g && c)
|
|
5575
5752
|
throw new pe("Can't mix ordinal dates with month/day");
|
|
5576
5753
|
const R = S || i.weekday && !y;
|
|
5577
|
-
let C,
|
|
5578
|
-
R ? (C =
|
|
5754
|
+
let C, G, K = at(l, d);
|
|
5755
|
+
R ? (C = iu, G = ru, K = ht(K, a, o)) : c ? (C = au, G = su, K = Wt(K)) : (C = ut, G = xs);
|
|
5579
5756
|
let ce = !1;
|
|
5580
5757
|
for (const de of C) {
|
|
5581
5758
|
const Nt = i[de];
|
|
5582
|
-
v(Nt) ? ce ? i[de] =
|
|
5759
|
+
v(Nt) ? ce ? i[de] = G[de] : i[de] = K[de] : ce = !0;
|
|
5583
5760
|
}
|
|
5584
|
-
const be = R ?
|
|
5585
|
-
if (
|
|
5586
|
-
return w.invalid(
|
|
5587
|
-
const St = R ? Ln(i, a, o) :
|
|
5761
|
+
const be = R ? Ro(i, a, o) : c ? Wo(i) : Hr(i), Qe = be || Yr(i);
|
|
5762
|
+
if (Qe)
|
|
5763
|
+
return w.invalid(Qe);
|
|
5764
|
+
const St = R ? Ln(i, a, o) : c ? An(i) : i, [pt, Ot] = lt(St, d, r), X = new w({
|
|
5588
5765
|
ts: pt,
|
|
5589
5766
|
zone: r,
|
|
5590
5767
|
o: Ot,
|
|
@@ -5613,7 +5790,7 @@ class w {
|
|
|
5613
5790
|
* @return {DateTime}
|
|
5614
5791
|
*/
|
|
5615
5792
|
static fromISO(e, n = {}) {
|
|
5616
|
-
const [r, s] =
|
|
5793
|
+
const [r, s] = El(e);
|
|
5617
5794
|
return Se(r, s, n, "ISO 8601", e);
|
|
5618
5795
|
}
|
|
5619
5796
|
/**
|
|
@@ -5632,7 +5809,7 @@ class w {
|
|
|
5632
5809
|
* @return {DateTime}
|
|
5633
5810
|
*/
|
|
5634
5811
|
static fromRFC2822(e, n = {}) {
|
|
5635
|
-
const [r, s] =
|
|
5812
|
+
const [r, s] = Ml(e);
|
|
5636
5813
|
return Se(r, s, n, "RFC 2822", e);
|
|
5637
5814
|
}
|
|
5638
5815
|
/**
|
|
@@ -5652,7 +5829,7 @@ class w {
|
|
|
5652
5829
|
* @return {DateTime}
|
|
5653
5830
|
*/
|
|
5654
5831
|
static fromHTTP(e, n = {}) {
|
|
5655
|
-
const [r, s] =
|
|
5832
|
+
const [r, s] = Cl(e);
|
|
5656
5833
|
return Se(r, s, n, "HTTP", n);
|
|
5657
5834
|
}
|
|
5658
5835
|
/**
|
|
@@ -5671,13 +5848,13 @@ class w {
|
|
|
5671
5848
|
*/
|
|
5672
5849
|
static fromFormat(e, n, r = {}) {
|
|
5673
5850
|
if (v(e) || v(n))
|
|
5674
|
-
throw new
|
|
5851
|
+
throw new F("fromFormat requires an input string and a format");
|
|
5675
5852
|
const { locale: s = null, numberingSystem: i = null } = r, a = T.fromOpts({
|
|
5676
5853
|
locale: s,
|
|
5677
5854
|
numberingSystem: i,
|
|
5678
5855
|
defaultToEN: !0
|
|
5679
|
-
}), [o, l,
|
|
5680
|
-
return
|
|
5856
|
+
}), [o, l, d, c] = nu(a, e, n);
|
|
5857
|
+
return c ? w.invalid(c) : Se(o, l, r, `format ${n}`, e, d);
|
|
5681
5858
|
}
|
|
5682
5859
|
/**
|
|
5683
5860
|
* @deprecated use fromFormat instead
|
|
@@ -5707,7 +5884,7 @@ class w {
|
|
|
5707
5884
|
* @return {DateTime}
|
|
5708
5885
|
*/
|
|
5709
5886
|
static fromSQL(e, n = {}) {
|
|
5710
|
-
const [r, s] =
|
|
5887
|
+
const [r, s] = Wl(e);
|
|
5711
5888
|
return Se(r, s, n, "SQL", e);
|
|
5712
5889
|
}
|
|
5713
5890
|
/**
|
|
@@ -5718,10 +5895,10 @@ class w {
|
|
|
5718
5895
|
*/
|
|
5719
5896
|
static invalid(e, n = null) {
|
|
5720
5897
|
if (!e)
|
|
5721
|
-
throw new
|
|
5722
|
-
const r = e instanceof
|
|
5898
|
+
throw new F("need to specify a reason the DateTime is invalid");
|
|
5899
|
+
const r = e instanceof Y ? e : new Y(e, n);
|
|
5723
5900
|
if (N.throwOnInvalid)
|
|
5724
|
-
throw new
|
|
5901
|
+
throw new uo(r);
|
|
5725
5902
|
return new w({ invalid: r });
|
|
5726
5903
|
}
|
|
5727
5904
|
/**
|
|
@@ -5750,10 +5927,10 @@ class w {
|
|
|
5750
5927
|
* @returns {string}
|
|
5751
5928
|
*/
|
|
5752
5929
|
static expandFormat(e, n = {}) {
|
|
5753
|
-
return ms(
|
|
5930
|
+
return ms(j.parseFormat(e), T.fromObject(n)).map((s) => s.val).join("");
|
|
5754
5931
|
}
|
|
5755
5932
|
static resetCache() {
|
|
5756
|
-
|
|
5933
|
+
ze = void 0, rn.clear();
|
|
5757
5934
|
}
|
|
5758
5935
|
// INFO
|
|
5759
5936
|
/**
|
|
@@ -6054,8 +6231,8 @@ class w {
|
|
|
6054
6231
|
const e = 864e5, n = 6e4, r = kt(this.c), s = this.zone.offset(r - e), i = this.zone.offset(r + e), a = this.zone.offset(r - s * n), o = this.zone.offset(r - i * n);
|
|
6055
6232
|
if (a === o)
|
|
6056
6233
|
return [this];
|
|
6057
|
-
const l = r - a * n,
|
|
6058
|
-
return
|
|
6234
|
+
const l = r - a * n, d = r - o * n, c = at(l, a), m = at(d, o);
|
|
6235
|
+
return c.hour === m.hour && c.minute === m.minute && c.second === m.second && c.millisecond === m.millisecond ? [ye(this, { ts: l }), ye(this, { ts: d })] : [this];
|
|
6059
6236
|
}
|
|
6060
6237
|
/**
|
|
6061
6238
|
* Returns true if this DateTime is in a leap year, false otherwise
|
|
@@ -6064,7 +6241,7 @@ class w {
|
|
|
6064
6241
|
* @type {boolean}
|
|
6065
6242
|
*/
|
|
6066
6243
|
get isInLeapYear() {
|
|
6067
|
-
return
|
|
6244
|
+
return Je(this.year);
|
|
6068
6245
|
}
|
|
6069
6246
|
/**
|
|
6070
6247
|
* Returns the number of days in this DateTime's month
|
|
@@ -6092,7 +6269,7 @@ class w {
|
|
|
6092
6269
|
* @type {number}
|
|
6093
6270
|
*/
|
|
6094
6271
|
get weeksInWeekYear() {
|
|
6095
|
-
return this.isValid ?
|
|
6272
|
+
return this.isValid ? Ye(this.weekYear) : NaN;
|
|
6096
6273
|
}
|
|
6097
6274
|
/**
|
|
6098
6275
|
* Returns the number of weeks in this DateTime's local week year
|
|
@@ -6101,7 +6278,7 @@ class w {
|
|
|
6101
6278
|
* @type {number}
|
|
6102
6279
|
*/
|
|
6103
6280
|
get weeksInLocalWeekYear() {
|
|
6104
|
-
return this.isValid ?
|
|
6281
|
+
return this.isValid ? Ye(
|
|
6105
6282
|
this.localWeekYear,
|
|
6106
6283
|
this.loc.getMinDaysInFirstWeek(),
|
|
6107
6284
|
this.loc.getStartOfWeek()
|
|
@@ -6114,7 +6291,7 @@ class w {
|
|
|
6114
6291
|
* @return {Object}
|
|
6115
6292
|
*/
|
|
6116
6293
|
resolvedLocaleOptions(e = {}) {
|
|
6117
|
-
const { locale: n, numberingSystem: r, calendar: s } =
|
|
6294
|
+
const { locale: n, numberingSystem: r, calendar: s } = j.create(
|
|
6118
6295
|
this.loc.clone(e),
|
|
6119
6296
|
e
|
|
6120
6297
|
).resolvedOptions(this);
|
|
@@ -6161,7 +6338,7 @@ class w {
|
|
|
6161
6338
|
}
|
|
6162
6339
|
return ye(this, { ts: s, zone: e });
|
|
6163
6340
|
} else
|
|
6164
|
-
return w.invalid(
|
|
6341
|
+
return w.invalid(Pe(e));
|
|
6165
6342
|
}
|
|
6166
6343
|
/**
|
|
6167
6344
|
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
|
|
@@ -6197,8 +6374,8 @@ class w {
|
|
|
6197
6374
|
*/
|
|
6198
6375
|
set(e) {
|
|
6199
6376
|
if (!this.isValid) return this;
|
|
6200
|
-
const n = yt(e, tr), { minDaysInFirstWeek: r, startOfWeek: s } = Pn(n, this.loc), i = !v(n.weekYear) || !v(n.weekNumber) || !v(n.weekday), a = !v(n.ordinal), o = !v(n.year), l = !v(n.month) || !v(n.day),
|
|
6201
|
-
if ((
|
|
6377
|
+
const n = yt(e, tr), { minDaysInFirstWeek: r, startOfWeek: s } = Pn(n, this.loc), i = !v(n.weekYear) || !v(n.weekNumber) || !v(n.weekday), a = !v(n.ordinal), o = !v(n.year), l = !v(n.month) || !v(n.day), d = o || l, c = n.weekYear || n.weekNumber;
|
|
6378
|
+
if ((d || a) && c)
|
|
6202
6379
|
throw new pe(
|
|
6203
6380
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
|
6204
6381
|
);
|
|
@@ -6320,7 +6497,7 @@ class w {
|
|
|
6320
6497
|
* @return {string}
|
|
6321
6498
|
*/
|
|
6322
6499
|
toFormat(e, n = {}) {
|
|
6323
|
-
return this.isValid ?
|
|
6500
|
+
return this.isValid ? j.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : Lt;
|
|
6324
6501
|
}
|
|
6325
6502
|
/**
|
|
6326
6503
|
* Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
|
|
@@ -6342,7 +6519,7 @@ class w {
|
|
|
6342
6519
|
* @return {string}
|
|
6343
6520
|
*/
|
|
6344
6521
|
toLocaleString(e = ft, n = {}) {
|
|
6345
|
-
return this.isValid ?
|
|
6522
|
+
return this.isValid ? j.create(this.loc.clone(n), e).formatDateTime(this) : Lt;
|
|
6346
6523
|
}
|
|
6347
6524
|
/**
|
|
6348
6525
|
* Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
|
|
@@ -6358,7 +6535,7 @@ class w {
|
|
|
6358
6535
|
* //=> ]
|
|
6359
6536
|
*/
|
|
6360
6537
|
toLocaleParts(e = {}) {
|
|
6361
|
-
return this.isValid ?
|
|
6538
|
+
return this.isValid ? j.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
|
|
6362
6539
|
}
|
|
6363
6540
|
/**
|
|
6364
6541
|
* Returns an ISO 8601-compliant string representation of this DateTime
|
|
@@ -6527,7 +6704,7 @@ class w {
|
|
|
6527
6704
|
* Returns a string representation of this DateTime appropriate for the REPL.
|
|
6528
6705
|
* @return {string}
|
|
6529
6706
|
*/
|
|
6530
|
-
[
|
|
6707
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
6531
6708
|
return this.isValid ? `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }` : `DateTime { Invalid, reason: ${this.invalidReason} }`;
|
|
6532
6709
|
}
|
|
6533
6710
|
/**
|
|
@@ -6610,8 +6787,8 @@ class w {
|
|
|
6610
6787
|
diff(e, n = "milliseconds", r = {}) {
|
|
6611
6788
|
if (!this.isValid || !e.isValid)
|
|
6612
6789
|
return k.invalid("created by diffing an invalid DateTime");
|
|
6613
|
-
const s = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, i =
|
|
6614
|
-
return a ?
|
|
6790
|
+
const s = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, i = Ao(n).map(k.normalizeUnit), a = e.valueOf() > this.valueOf(), o = a ? this : e, l = a ? e : this, d = Ul(o, l, i, s);
|
|
6791
|
+
return a ? d.negate() : d;
|
|
6615
6792
|
}
|
|
6616
6793
|
/**
|
|
6617
6794
|
* Return the difference between this DateTime and right now.
|
|
@@ -6716,7 +6893,7 @@ class w {
|
|
|
6716
6893
|
*/
|
|
6717
6894
|
static min(...e) {
|
|
6718
6895
|
if (!e.every(w.isDateTime))
|
|
6719
|
-
throw new
|
|
6896
|
+
throw new F("min requires all arguments be DateTimes");
|
|
6720
6897
|
return zn(e, (n) => n.valueOf(), Math.min);
|
|
6721
6898
|
}
|
|
6722
6899
|
/**
|
|
@@ -6726,7 +6903,7 @@ class w {
|
|
|
6726
6903
|
*/
|
|
6727
6904
|
static max(...e) {
|
|
6728
6905
|
if (!e.every(w.isDateTime))
|
|
6729
|
-
throw new
|
|
6906
|
+
throw new F("max requires all arguments be DateTimes");
|
|
6730
6907
|
return zn(e, (n) => n.valueOf(), Math.max);
|
|
6731
6908
|
}
|
|
6732
6909
|
// MISC
|
|
@@ -6783,7 +6960,7 @@ class w {
|
|
|
6783
6960
|
*/
|
|
6784
6961
|
static fromFormatParser(e, n, r = {}) {
|
|
6785
6962
|
if (v(e) || v(n))
|
|
6786
|
-
throw new
|
|
6963
|
+
throw new F(
|
|
6787
6964
|
"fromFormatParser requires an input string and a format parser"
|
|
6788
6965
|
);
|
|
6789
6966
|
const { locale: s = null, numberingSystem: i = null } = r, a = T.fromOpts({
|
|
@@ -6792,17 +6969,17 @@ class w {
|
|
|
6792
6969
|
defaultToEN: !0
|
|
6793
6970
|
});
|
|
6794
6971
|
if (!a.equals(n.locale))
|
|
6795
|
-
throw new
|
|
6972
|
+
throw new F(
|
|
6796
6973
|
`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`
|
|
6797
6974
|
);
|
|
6798
|
-
const { result: o, zone: l, specificOffset:
|
|
6799
|
-
return
|
|
6975
|
+
const { result: o, zone: l, specificOffset: d, invalidReason: c } = n.explainFromTokens(e);
|
|
6976
|
+
return c ? w.invalid(c) : Se(
|
|
6800
6977
|
o,
|
|
6801
6978
|
l,
|
|
6802
6979
|
r,
|
|
6803
6980
|
`format ${n.format}`,
|
|
6804
6981
|
e,
|
|
6805
|
-
|
|
6982
|
+
d
|
|
6806
6983
|
);
|
|
6807
6984
|
}
|
|
6808
6985
|
// FORMAT PRESETS
|
|
@@ -6825,7 +7002,7 @@ class w {
|
|
|
6825
7002
|
* @type {Object}
|
|
6826
7003
|
*/
|
|
6827
7004
|
static get DATE_MED_WITH_WEEKDAY() {
|
|
6828
|
-
return
|
|
7005
|
+
return ho;
|
|
6829
7006
|
}
|
|
6830
7007
|
/**
|
|
6831
7008
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983'
|
|
@@ -6909,28 +7086,28 @@ class w {
|
|
|
6909
7086
|
* @type {Object}
|
|
6910
7087
|
*/
|
|
6911
7088
|
static get DATETIME_SHORT_WITH_SECONDS() {
|
|
6912
|
-
return
|
|
7089
|
+
return Ir;
|
|
6913
7090
|
}
|
|
6914
7091
|
/**
|
|
6915
7092
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
6916
7093
|
* @type {Object}
|
|
6917
7094
|
*/
|
|
6918
7095
|
static get DATETIME_MED() {
|
|
6919
|
-
return
|
|
7096
|
+
return Fr;
|
|
6920
7097
|
}
|
|
6921
7098
|
/**
|
|
6922
7099
|
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
|
|
6923
7100
|
* @type {Object}
|
|
6924
7101
|
*/
|
|
6925
7102
|
static get DATETIME_MED_WITH_SECONDS() {
|
|
6926
|
-
return
|
|
7103
|
+
return jr;
|
|
6927
7104
|
}
|
|
6928
7105
|
/**
|
|
6929
7106
|
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
|
6930
7107
|
* @type {Object}
|
|
6931
7108
|
*/
|
|
6932
7109
|
static get DATETIME_MED_WITH_WEEKDAY() {
|
|
6933
|
-
return
|
|
7110
|
+
return mo;
|
|
6934
7111
|
}
|
|
6935
7112
|
/**
|
|
6936
7113
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
|
|
@@ -6961,22 +7138,22 @@ class w {
|
|
|
6961
7138
|
return $r;
|
|
6962
7139
|
}
|
|
6963
7140
|
}
|
|
6964
|
-
function
|
|
7141
|
+
function Le(t) {
|
|
6965
7142
|
if (w.isDateTime(t))
|
|
6966
7143
|
return t;
|
|
6967
7144
|
if (t && t.valueOf && le(t.valueOf()))
|
|
6968
7145
|
return w.fromJSDate(t);
|
|
6969
7146
|
if (t && typeof t == "object")
|
|
6970
7147
|
return w.fromObject(t);
|
|
6971
|
-
throw new
|
|
7148
|
+
throw new F(
|
|
6972
7149
|
`Unknown datetime argument: ${t}, of type ${typeof t}`
|
|
6973
7150
|
);
|
|
6974
7151
|
}
|
|
6975
|
-
function
|
|
7152
|
+
function Hu(t) {
|
|
6976
7153
|
const e = E(te, t);
|
|
6977
7154
|
return /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsxs("table", { className: e.styles(te.tb), children: [
|
|
6978
7155
|
/* @__PURE__ */ u.jsx("thead", { children: /* @__PURE__ */ u.jsx("tr", { className: te.hdr, children: t.columns.map((n, r) => /* @__PURE__ */ u.jsx(
|
|
6979
|
-
|
|
7156
|
+
lu,
|
|
6980
7157
|
{
|
|
6981
7158
|
...n,
|
|
6982
7159
|
palette: e.palette,
|
|
@@ -6992,17 +7169,30 @@ function Au(t) {
|
|
|
6992
7169
|
[te.alt]: r % 2 == 1,
|
|
6993
7170
|
[te.ptr]: !!t.onRowClick
|
|
6994
7171
|
}),
|
|
6995
|
-
children: t.columns.map((s, i) => /* @__PURE__ */ u.jsx(
|
|
7172
|
+
children: t.columns.map((s, i) => /* @__PURE__ */ u.jsx(
|
|
7173
|
+
"td",
|
|
7174
|
+
{
|
|
7175
|
+
style: { textAlign: s.align },
|
|
7176
|
+
children: /* @__PURE__ */ u.jsx(
|
|
7177
|
+
uu,
|
|
7178
|
+
{
|
|
7179
|
+
d: s.data,
|
|
7180
|
+
row: n
|
|
7181
|
+
}
|
|
7182
|
+
)
|
|
7183
|
+
},
|
|
7184
|
+
i
|
|
7185
|
+
))
|
|
6996
7186
|
},
|
|
6997
7187
|
r
|
|
6998
7188
|
)) })
|
|
6999
7189
|
] }) });
|
|
7000
7190
|
}
|
|
7001
|
-
function
|
|
7191
|
+
function lu(t) {
|
|
7002
7192
|
const [e, n] = V(!1), r = E(te, t);
|
|
7003
7193
|
let s = t.caption ?? t.id;
|
|
7004
7194
|
s || (s = /* @__PURE__ */ u.jsx(u.Fragment, { children: " " }));
|
|
7005
|
-
const i = t.icon ??
|
|
7195
|
+
const i = t.icon ?? du(t);
|
|
7006
7196
|
return /* @__PURE__ */ u.jsxs(
|
|
7007
7197
|
"th",
|
|
7008
7198
|
{
|
|
@@ -7030,16 +7220,16 @@ function tu(t) {
|
|
|
7030
7220
|
}
|
|
7031
7221
|
);
|
|
7032
7222
|
}
|
|
7033
|
-
function
|
|
7223
|
+
function uu(t) {
|
|
7034
7224
|
if (typeof t.d == "function")
|
|
7035
7225
|
return t.d(t.row);
|
|
7036
7226
|
const e = t.d;
|
|
7037
|
-
return typeof e == "string" ?
|
|
7227
|
+
return typeof e == "string" ? cu(t.row[e]) : t.d;
|
|
7038
7228
|
}
|
|
7039
|
-
function
|
|
7229
|
+
function cu(t) {
|
|
7040
7230
|
return typeof t == "object" && t instanceof w ? t.toLocaleString({ dateStyle: "medium", timeStyle: "medium" }) : "" + t;
|
|
7041
7231
|
}
|
|
7042
|
-
function
|
|
7232
|
+
function du(t) {
|
|
7043
7233
|
switch (t.sortIcon) {
|
|
7044
7234
|
case "down":
|
|
7045
7235
|
return "↓";
|
|
@@ -7047,26 +7237,32 @@ function su(t) {
|
|
|
7047
7237
|
return "↑";
|
|
7048
7238
|
}
|
|
7049
7239
|
}
|
|
7050
|
-
const
|
|
7051
|
-
field:
|
|
7052
|
-
err:
|
|
7240
|
+
const fu = "_field_w8oiv_1", hu = "_err_w8oiv_9", Ut = {
|
|
7241
|
+
field: fu,
|
|
7242
|
+
err: hu
|
|
7053
7243
|
};
|
|
7054
|
-
function
|
|
7055
|
-
const e =
|
|
7244
|
+
function mu(t) {
|
|
7245
|
+
const e = B(Ce), n = E(void 0, t), r = t.wrapperFct ?? ((s) => s);
|
|
7056
7246
|
return /* @__PURE__ */ u.jsx(re, { palette: n.palette, children: r(
|
|
7057
7247
|
/* @__PURE__ */ u.jsx(u.Fragment, { children: t.items.map((s, i) => {
|
|
7058
|
-
const a = t.itemFct(
|
|
7248
|
+
const a = t.itemFct(
|
|
7249
|
+
s,
|
|
7250
|
+
yu(t, i)
|
|
7251
|
+
), o = Array.isArray(a) ? a : void 0, l = o ? void 0 : a;
|
|
7059
7252
|
return /* @__PURE__ */ u.jsx(
|
|
7060
7253
|
we,
|
|
7061
7254
|
{
|
|
7062
7255
|
children: l,
|
|
7063
7256
|
items: o,
|
|
7064
|
-
context: ue.newFormContext(
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7257
|
+
context: ue.newFormContext(
|
|
7258
|
+
s,
|
|
7259
|
+
(d) => {
|
|
7260
|
+
const c = d(s), m = t.items.map(
|
|
7261
|
+
(g, y) => y == i ? c : g
|
|
7262
|
+
);
|
|
7263
|
+
t.onUpdateItems?.(m);
|
|
7264
|
+
}
|
|
7265
|
+
)
|
|
7070
7266
|
},
|
|
7071
7267
|
i
|
|
7072
7268
|
);
|
|
@@ -7090,16 +7286,16 @@ function ou(t) {
|
|
|
7090
7286
|
}
|
|
7091
7287
|
) });
|
|
7092
7288
|
}
|
|
7093
|
-
function
|
|
7289
|
+
function yu(t, e) {
|
|
7094
7290
|
return () => {
|
|
7095
7291
|
const n = t.items.filter((r, s) => s != e);
|
|
7096
7292
|
t.onUpdateItems?.(n);
|
|
7097
7293
|
};
|
|
7098
7294
|
}
|
|
7099
|
-
function
|
|
7295
|
+
function Yu(t) {
|
|
7100
7296
|
const e = lr.Children.toArray(t.children), n = Math.ceil(e.length / t.cols), r = [...Array(n)].map((s, i) => {
|
|
7101
7297
|
const a = e.slice(i * t.cols, (i + 1) * t.cols), o = [...Array(t.cols)].map(
|
|
7102
|
-
(l,
|
|
7298
|
+
(l, d) => d < a.length ? a[d] : ""
|
|
7103
7299
|
);
|
|
7104
7300
|
return /* @__PURE__ */ u.jsx(
|
|
7105
7301
|
"div",
|
|
@@ -7110,7 +7306,7 @@ function Pu(t) {
|
|
|
7110
7306
|
gap: t.gap,
|
|
7111
7307
|
minWidth: t.minWidth
|
|
7112
7308
|
},
|
|
7113
|
-
children: o.map((l,
|
|
7309
|
+
children: o.map((l, d) => /* @__PURE__ */ u.jsx("div", { style: { flex: 1, width: "100%" }, children: l }, d))
|
|
7114
7310
|
},
|
|
7115
7311
|
i
|
|
7116
7312
|
);
|
|
@@ -7142,7 +7338,7 @@ function bs(t) {
|
|
|
7142
7338
|
)
|
|
7143
7339
|
] });
|
|
7144
7340
|
}
|
|
7145
|
-
function
|
|
7341
|
+
function ks(t) {
|
|
7146
7342
|
return /* @__PURE__ */ u.jsx(
|
|
7147
7343
|
"div",
|
|
7148
7344
|
{
|
|
@@ -7156,7 +7352,7 @@ function uu(t) {
|
|
|
7156
7352
|
}
|
|
7157
7353
|
);
|
|
7158
7354
|
}
|
|
7159
|
-
function
|
|
7355
|
+
function gu(t) {
|
|
7160
7356
|
return /* @__PURE__ */ u.jsxs(
|
|
7161
7357
|
"div",
|
|
7162
7358
|
{
|
|
@@ -7169,24 +7365,34 @@ function cu(t) {
|
|
|
7169
7365
|
},
|
|
7170
7366
|
children: [
|
|
7171
7367
|
t.header && /* @__PURE__ */ u.jsx("div", { children: t.header }),
|
|
7172
|
-
/* @__PURE__ */ u.jsx(
|
|
7368
|
+
/* @__PURE__ */ u.jsx(
|
|
7369
|
+
"div",
|
|
7370
|
+
{
|
|
7371
|
+
style: { overflow: "auto", flexGrow: 1, position: "relative" },
|
|
7372
|
+
children: t.children
|
|
7373
|
+
}
|
|
7374
|
+
),
|
|
7173
7375
|
t.footer && /* @__PURE__ */ u.jsx("div", { children: t.footer })
|
|
7174
7376
|
]
|
|
7175
7377
|
}
|
|
7176
7378
|
);
|
|
7177
7379
|
}
|
|
7178
|
-
const
|
|
7179
|
-
function
|
|
7180
|
-
const e =
|
|
7380
|
+
const wu = /* @__PURE__ */ new Set(["checkbox", "progress", "toggle"]);
|
|
7381
|
+
function vu(t) {
|
|
7382
|
+
const e = B(Ce), n = e?.data[t.id], r = E(Ut, t), s = e?.isDisabled || t.disabled || !1, i = e?.data[t.id]?.isValid;
|
|
7181
7383
|
L(() => {
|
|
7182
|
-
const l =
|
|
7183
|
-
e?.initializeField(
|
|
7384
|
+
const l = _u(t);
|
|
7385
|
+
e?.initializeField(
|
|
7386
|
+
t.id,
|
|
7387
|
+
l,
|
|
7388
|
+
Tu(t) ?? dt(t, l)
|
|
7389
|
+
);
|
|
7184
7390
|
}, []);
|
|
7185
|
-
const a = (l,
|
|
7391
|
+
const a = (l, d, c, m) => l, o = t.wrapperFct ?? a;
|
|
7186
7392
|
return /* @__PURE__ */ u.jsx(re, { palette: r.palette, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
|
7187
7393
|
/* @__PURE__ */ u.jsx("div", { className: r.styles(Ut.field), children: /* @__PURE__ */ u.jsx("div", { children: o(
|
|
7188
7394
|
/* @__PURE__ */ u.jsx(
|
|
7189
|
-
|
|
7395
|
+
xu,
|
|
7190
7396
|
{
|
|
7191
7397
|
...t,
|
|
7192
7398
|
ctx: e,
|
|
@@ -7197,36 +7403,47 @@ function fu(t) {
|
|
|
7197
7403
|
),
|
|
7198
7404
|
n,
|
|
7199
7405
|
t,
|
|
7200
|
-
t.onAction ? (l,
|
|
7201
|
-
t.onAction?.(l,
|
|
7406
|
+
t.onAction ? (l, d) => {
|
|
7407
|
+
t.onAction?.(l, d);
|
|
7202
7408
|
} : void 0
|
|
7203
7409
|
) }) }),
|
|
7204
7410
|
e?.isValidated && !n?.isValid && /* @__PURE__ */ u.jsx("div", { className: r.styles(Ut.err), children: "x" })
|
|
7205
7411
|
] }) });
|
|
7206
7412
|
}
|
|
7207
|
-
function
|
|
7208
|
-
const e = (typeof t.item?.value == "object" ? void 0 : t.item?.value) || "", n = typeof t.item?.value == "object" && t.item.value.mode == "datacontext" ? t.item.value : void 0, r = typeof t.item?.value == "object" && t.item.value.mode == "list" ? t.item.value.items : [], s =
|
|
7413
|
+
function xu(t) {
|
|
7414
|
+
const e = (typeof t.item?.value == "object" ? void 0 : t.item?.value) || "", n = typeof t.item?.value == "object" && t.item.value.mode == "datacontext" ? t.item.value : void 0, r = typeof t.item?.value == "object" && t.item.value.mode == "list" ? t.item.value.items : [], s = Ze(() => {
|
|
7209
7415
|
if (t.type != "form")
|
|
7210
7416
|
return;
|
|
7211
|
-
const
|
|
7212
|
-
return ue.newFormContext(
|
|
7213
|
-
const c = l
|
|
7214
|
-
|
|
7417
|
+
const l = n ?? ue.newDataContext();
|
|
7418
|
+
return ue.newFormContext(l, (d) => {
|
|
7419
|
+
const c = d(l);
|
|
7420
|
+
o({ ...c, mode: "datacontext" }, !1, void 0);
|
|
7215
7421
|
});
|
|
7216
7422
|
}, [t.item?.value, t.type]);
|
|
7217
7423
|
L(() => {
|
|
7218
7424
|
if (t.item === void 0) {
|
|
7219
|
-
const
|
|
7220
|
-
|
|
7425
|
+
const l = ku(t), d = dt(t, l);
|
|
7426
|
+
o(l, !1, d);
|
|
7221
7427
|
}
|
|
7222
7428
|
}, [t.item]), L(() => {
|
|
7223
7429
|
if (t.item) {
|
|
7224
|
-
const
|
|
7225
|
-
|
|
7430
|
+
const l = dt(t, t.item.value);
|
|
7431
|
+
l !== t.item.isValid && o(t.item.value, !1, l);
|
|
7226
7432
|
}
|
|
7227
7433
|
}, [t.isOptional, t.disabled, t.validator?.signature]);
|
|
7228
|
-
const i = !!(t.value ?? e);
|
|
7434
|
+
const i = !!(t.value ?? e), a = t.value ?? e;
|
|
7229
7435
|
switch (t.type) {
|
|
7436
|
+
case "radiogroup":
|
|
7437
|
+
return /* @__PURE__ */ u.jsx(_a, { caption: t.caption, children: /* @__PURE__ */ u.jsx(ks, { gap: "0.5em", children: t.radioGroupProps?.items.map((l) => /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx(
|
|
7438
|
+
Xa,
|
|
7439
|
+
{
|
|
7440
|
+
caption: l.caption,
|
|
7441
|
+
value: a == l.id ? "true" : "",
|
|
7442
|
+
onChange: () => {
|
|
7443
|
+
o(l.id, !0, !0);
|
|
7444
|
+
}
|
|
7445
|
+
}
|
|
7446
|
+
) }, l.id)) }) });
|
|
7230
7447
|
case "toggle":
|
|
7231
7448
|
return /* @__PURE__ */ u.jsxs(bs, { children: [
|
|
7232
7449
|
/* @__PURE__ */ u.jsx(
|
|
@@ -7235,9 +7452,9 @@ function hu(t) {
|
|
|
7235
7452
|
autoFocus: t.autoFocus,
|
|
7236
7453
|
disabled: t.disabled,
|
|
7237
7454
|
variant: "plain",
|
|
7238
|
-
down: !!
|
|
7455
|
+
down: !!a,
|
|
7239
7456
|
onClick: () => {
|
|
7240
|
-
|
|
7457
|
+
o(i ? "" : "true", !0, !0);
|
|
7241
7458
|
},
|
|
7242
7459
|
...t.buttonProps,
|
|
7243
7460
|
children: i ? t.buttonProps?.textOn ?? "ON" : t.buttonProps?.textOff ?? "OFF"
|
|
@@ -7256,28 +7473,28 @@ function hu(t) {
|
|
|
7256
7473
|
] });
|
|
7257
7474
|
case "checkbox":
|
|
7258
7475
|
return /* @__PURE__ */ u.jsx(
|
|
7259
|
-
|
|
7476
|
+
Qs,
|
|
7260
7477
|
{
|
|
7261
7478
|
autoFocus: t.autoFocus,
|
|
7262
7479
|
caption: t.caption,
|
|
7263
|
-
value:
|
|
7480
|
+
value: a,
|
|
7264
7481
|
defaultValue: t.defaultValue,
|
|
7265
|
-
onChange: (
|
|
7482
|
+
onChange: (l) => o(l, !0, !0),
|
|
7266
7483
|
disabled: t.disabled,
|
|
7267
7484
|
...t.checkBoxProps
|
|
7268
7485
|
}
|
|
7269
7486
|
);
|
|
7270
7487
|
case "dropdown":
|
|
7271
7488
|
return /* @__PURE__ */ u.jsx(
|
|
7272
|
-
|
|
7489
|
+
la,
|
|
7273
7490
|
{
|
|
7274
7491
|
autoFocus: t.autoFocus,
|
|
7275
7492
|
items: t.dropDownProps?.items || [],
|
|
7276
7493
|
caption: t.caption,
|
|
7277
|
-
value:
|
|
7494
|
+
value: a,
|
|
7278
7495
|
defaultValue: t.defaultValue,
|
|
7279
7496
|
disabled: t.disabled,
|
|
7280
|
-
onChange: (
|
|
7497
|
+
onChange: (l) => o(l, !0, void 0),
|
|
7281
7498
|
...t.dropDownProps
|
|
7282
7499
|
}
|
|
7283
7500
|
);
|
|
@@ -7287,8 +7504,12 @@ function hu(t) {
|
|
|
7287
7504
|
{
|
|
7288
7505
|
...t.formProps,
|
|
7289
7506
|
context: s,
|
|
7290
|
-
onAction: t.onAction ? (
|
|
7291
|
-
t.onAction?.(
|
|
7507
|
+
onAction: t.onAction ? (l, d, c) => {
|
|
7508
|
+
t.onAction?.(l, {
|
|
7509
|
+
id: t.id,
|
|
7510
|
+
idx: void 0,
|
|
7511
|
+
data: c
|
|
7512
|
+
});
|
|
7292
7513
|
} : void 0,
|
|
7293
7514
|
children: t.children
|
|
7294
7515
|
}
|
|
@@ -7299,19 +7520,23 @@ function hu(t) {
|
|
|
7299
7520
|
{
|
|
7300
7521
|
...t.progressBarProps,
|
|
7301
7522
|
caption: t.caption,
|
|
7302
|
-
value:
|
|
7523
|
+
value: a,
|
|
7303
7524
|
defaultValue: t.defaultValue,
|
|
7304
7525
|
disabled: t.disabled,
|
|
7305
|
-
onChange: (
|
|
7526
|
+
onChange: (l) => o(l, !0, !0)
|
|
7306
7527
|
}
|
|
7307
7528
|
);
|
|
7308
7529
|
case "template":
|
|
7309
7530
|
return t.templateProps ? /* @__PURE__ */ u.jsx(
|
|
7310
|
-
|
|
7531
|
+
mu,
|
|
7311
7532
|
{
|
|
7312
7533
|
...t.templateProps,
|
|
7313
7534
|
items: r,
|
|
7314
|
-
onUpdateItems: (
|
|
7535
|
+
onUpdateItems: (l) => o(
|
|
7536
|
+
{ mode: "list", items: l },
|
|
7537
|
+
!0,
|
|
7538
|
+
void 0
|
|
7539
|
+
)
|
|
7315
7540
|
}
|
|
7316
7541
|
) : /* @__PURE__ */ u.jsx("div", {});
|
|
7317
7542
|
case "textbox":
|
|
@@ -7320,23 +7545,23 @@ function hu(t) {
|
|
|
7320
7545
|
{
|
|
7321
7546
|
autoFocus: t.autoFocus,
|
|
7322
7547
|
caption: t.caption,
|
|
7323
|
-
value:
|
|
7548
|
+
value: a,
|
|
7324
7549
|
defaultValue: t.defaultValue,
|
|
7325
|
-
onChange: (
|
|
7550
|
+
onChange: (l) => o(l, !0, void 0),
|
|
7326
7551
|
disabled: t.disabled,
|
|
7327
7552
|
...t.textBoxProps
|
|
7328
7553
|
}
|
|
7329
7554
|
);
|
|
7330
7555
|
}
|
|
7331
|
-
return /* @__PURE__ */ u.jsx(
|
|
7332
|
-
function
|
|
7333
|
-
t.readOnly || t.ctx?.update(t.id,
|
|
7556
|
+
return /* @__PURE__ */ u.jsx(bu, {});
|
|
7557
|
+
function o(l, d, c) {
|
|
7558
|
+
t.readOnly && d || (t.onChanging && typeof l == "string" && (l = t.onChanging(l, t.id)), t.ctx?.update(t.id, l, c ?? dt(t, l) ?? !1), t.onChange && typeof l == "string" && t.onChange(l, t.id));
|
|
7334
7559
|
}
|
|
7335
7560
|
}
|
|
7336
|
-
function
|
|
7561
|
+
function bu() {
|
|
7337
7562
|
return /* @__PURE__ */ u.jsx("div", { children: "Invalid control" });
|
|
7338
7563
|
}
|
|
7339
|
-
function
|
|
7564
|
+
function ku(t) {
|
|
7340
7565
|
switch (t.type) {
|
|
7341
7566
|
case "form":
|
|
7342
7567
|
return {
|
|
@@ -7357,7 +7582,7 @@ function yu(t) {
|
|
|
7357
7582
|
return "";
|
|
7358
7583
|
}
|
|
7359
7584
|
}
|
|
7360
|
-
function
|
|
7585
|
+
function _u(t) {
|
|
7361
7586
|
switch (t.type) {
|
|
7362
7587
|
case "form":
|
|
7363
7588
|
return {
|
|
@@ -7382,12 +7607,12 @@ function gu(t) {
|
|
|
7382
7607
|
}
|
|
7383
7608
|
}
|
|
7384
7609
|
function dt(t, e) {
|
|
7385
|
-
if (t.disabled)
|
|
7610
|
+
if (t.disabled || t.readOnly)
|
|
7386
7611
|
return !0;
|
|
7387
7612
|
if (e === void 0)
|
|
7388
7613
|
return !!t.isOptional;
|
|
7389
7614
|
if (typeof e == "string")
|
|
7390
|
-
return
|
|
7615
|
+
return wu.has(t.type) || t.isOptional && !e ? !0 : t.validator?.onValidate ? t.validator.onValidate(e) : !!e;
|
|
7391
7616
|
switch (e.mode) {
|
|
7392
7617
|
case "datacontext":
|
|
7393
7618
|
return e.isValid ?? !1;
|
|
@@ -7396,8 +7621,8 @@ function dt(t, e) {
|
|
|
7396
7621
|
}
|
|
7397
7622
|
return !1;
|
|
7398
7623
|
}
|
|
7399
|
-
function
|
|
7400
|
-
if (t.type === "progress")
|
|
7624
|
+
function Tu(t) {
|
|
7625
|
+
if (t.type === "progress" || t.readOnly)
|
|
7401
7626
|
return !0;
|
|
7402
7627
|
}
|
|
7403
7628
|
function we(t) {
|
|
@@ -7414,17 +7639,17 @@ function we(t) {
|
|
|
7414
7639
|
isValidated: t.isValidated ?? r.isValidated
|
|
7415
7640
|
};
|
|
7416
7641
|
return /* @__PURE__ */ u.jsxs(Ce.Provider, { value: s, children: [
|
|
7417
|
-
/* @__PURE__ */ u.jsx(
|
|
7418
|
-
t.items?.map((i) => /* @__PURE__ */ ur(
|
|
7642
|
+
/* @__PURE__ */ u.jsx(Su, { ctx: s }),
|
|
7643
|
+
t.items?.map((i) => /* @__PURE__ */ ur(vu, { ...i, key: i.id })),
|
|
7419
7644
|
t.children
|
|
7420
7645
|
] });
|
|
7421
7646
|
}
|
|
7422
|
-
function
|
|
7647
|
+
function Su(t) {
|
|
7423
7648
|
return /* @__PURE__ */ u.jsx(u.Fragment, {});
|
|
7424
7649
|
}
|
|
7425
|
-
const
|
|
7650
|
+
const _s = qe(null);
|
|
7426
7651
|
function ir(t) {
|
|
7427
|
-
const e =
|
|
7652
|
+
const e = B(Ce), n = B(ve), r = B(_s);
|
|
7428
7653
|
return /* @__PURE__ */ u.jsx(
|
|
7429
7654
|
an,
|
|
7430
7655
|
{
|
|
@@ -7436,7 +7661,7 @@ function ir(t) {
|
|
|
7436
7661
|
}
|
|
7437
7662
|
);
|
|
7438
7663
|
}
|
|
7439
|
-
const
|
|
7664
|
+
const pu = {
|
|
7440
7665
|
data: {},
|
|
7441
7666
|
submitRef: {
|
|
7442
7667
|
id: void 0,
|
|
@@ -7447,35 +7672,35 @@ const xu = {
|
|
|
7447
7672
|
isValid: !0,
|
|
7448
7673
|
isLoading: !1
|
|
7449
7674
|
};
|
|
7450
|
-
function
|
|
7675
|
+
function Ou(t) {
|
|
7451
7676
|
const [e, n] = V(
|
|
7452
|
-
t ??
|
|
7677
|
+
t ?? pu
|
|
7453
7678
|
);
|
|
7454
7679
|
return { ctx: e, setCtx: n };
|
|
7455
7680
|
}
|
|
7456
|
-
function
|
|
7457
|
-
const e =
|
|
7458
|
-
beforeClose: (
|
|
7681
|
+
function Nu(t) {
|
|
7682
|
+
const e = Cu(t.initialState), n = {
|
|
7683
|
+
beforeClose: (c) => {
|
|
7459
7684
|
}
|
|
7460
7685
|
}, r = {
|
|
7461
7686
|
ctx: t.ctx,
|
|
7462
7687
|
frm: e,
|
|
7463
|
-
close: () =>
|
|
7464
|
-
submit: (
|
|
7688
|
+
close: () => d(),
|
|
7689
|
+
submit: (c) => a(c)
|
|
7465
7690
|
}, s = t.fct(r);
|
|
7466
7691
|
n.beforeClose = s.onBeforeClose ?? n.beforeClose;
|
|
7467
7692
|
const i = E(void 0, { palette: s.palette ?? "dialog" });
|
|
7468
7693
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
7469
|
-
/* @__PURE__ */ u.jsx(
|
|
7470
|
-
/* @__PURE__ */ u.jsx(
|
|
7471
|
-
|
|
7694
|
+
/* @__PURE__ */ u.jsx(He, { backdrop: !0, visible: !0 }),
|
|
7695
|
+
/* @__PURE__ */ u.jsx(He, { visible: !0, children: /* @__PURE__ */ u.jsx(
|
|
7696
|
+
_s.Provider,
|
|
7472
7697
|
{
|
|
7473
7698
|
value: {
|
|
7474
|
-
cancel: () =>
|
|
7475
|
-
submit: (
|
|
7699
|
+
cancel: () => d(),
|
|
7700
|
+
submit: (c, m) => l(c, m)
|
|
7476
7701
|
},
|
|
7477
7702
|
children: /* @__PURE__ */ u.jsx(
|
|
7478
|
-
|
|
7703
|
+
H,
|
|
7479
7704
|
{
|
|
7480
7705
|
...s.pos,
|
|
7481
7706
|
center: !0,
|
|
@@ -7488,7 +7713,7 @@ function ku(t) {
|
|
|
7488
7713
|
palette: i.palette,
|
|
7489
7714
|
fill: !0,
|
|
7490
7715
|
caption: s.caption,
|
|
7491
|
-
onClose: () =>
|
|
7716
|
+
onClose: () => d(),
|
|
7492
7717
|
...s.windowProps,
|
|
7493
7718
|
children: /* @__PURE__ */ u.jsx(
|
|
7494
7719
|
"div",
|
|
@@ -7498,14 +7723,19 @@ function ku(t) {
|
|
|
7498
7723
|
position: "relative"
|
|
7499
7724
|
},
|
|
7500
7725
|
children: /* @__PURE__ */ u.jsxs(
|
|
7501
|
-
|
|
7726
|
+
gu,
|
|
7502
7727
|
{
|
|
7503
7728
|
header: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
7504
|
-
e.error
|
|
7729
|
+
e.error ? /* @__PURE__ */ u.jsx(ha, { children: e.error }) : /* @__PURE__ */ u.jsx(
|
|
7730
|
+
"div",
|
|
7731
|
+
{
|
|
7732
|
+
style: { height: "2em" }
|
|
7733
|
+
}
|
|
7734
|
+
),
|
|
7505
7735
|
s.header && /* @__PURE__ */ u.jsx(we, { context: e, children: s.header })
|
|
7506
7736
|
] }),
|
|
7507
7737
|
footer: /* @__PURE__ */ u.jsx(u.Fragment, { children: s.footer ? /* @__PURE__ */ u.jsx(we, { context: e, children: s.footer }) : s.buttons ? /* @__PURE__ */ u.jsx(
|
|
7508
|
-
|
|
7738
|
+
Mu,
|
|
7509
7739
|
{
|
|
7510
7740
|
...s.buttons,
|
|
7511
7741
|
ctx: e
|
|
@@ -7533,7 +7763,7 @@ function ku(t) {
|
|
|
7533
7763
|
width: "100%",
|
|
7534
7764
|
height: "1.5em"
|
|
7535
7765
|
},
|
|
7536
|
-
children: /* @__PURE__ */ u.jsx(
|
|
7766
|
+
children: /* @__PURE__ */ u.jsx(Ra, {})
|
|
7537
7767
|
}
|
|
7538
7768
|
)
|
|
7539
7769
|
}
|
|
@@ -7560,30 +7790,30 @@ function ku(t) {
|
|
|
7560
7790
|
}
|
|
7561
7791
|
) })
|
|
7562
7792
|
] });
|
|
7563
|
-
function a(
|
|
7564
|
-
if (
|
|
7565
|
-
o(
|
|
7793
|
+
function a(c) {
|
|
7794
|
+
if (c instanceof Promise) {
|
|
7795
|
+
o(c);
|
|
7566
7796
|
return;
|
|
7567
7797
|
}
|
|
7568
|
-
if (
|
|
7569
|
-
l(
|
|
7798
|
+
if (c.result) {
|
|
7799
|
+
l(c.result, c.data);
|
|
7570
7800
|
return;
|
|
7571
7801
|
}
|
|
7572
|
-
|
|
7802
|
+
c.error && e.setError(c.error);
|
|
7573
7803
|
}
|
|
7574
|
-
function o(
|
|
7575
|
-
e.setLoading(!0), e.setError(void 0),
|
|
7804
|
+
function o(c) {
|
|
7805
|
+
e.setLoading(!0), e.setError(void 0), c.then((m) => {
|
|
7576
7806
|
e.setLoading(!1), a(m);
|
|
7577
7807
|
});
|
|
7578
7808
|
}
|
|
7579
|
-
function l(
|
|
7580
|
-
n.beforeClose(
|
|
7809
|
+
function l(c, m) {
|
|
7810
|
+
n.beforeClose(c), t.onSubmit?.(c, m, e);
|
|
7581
7811
|
}
|
|
7582
|
-
function
|
|
7812
|
+
function d() {
|
|
7583
7813
|
n.beforeClose(null), t.onCancel();
|
|
7584
7814
|
}
|
|
7585
7815
|
}
|
|
7586
|
-
function
|
|
7816
|
+
function Eu(t) {
|
|
7587
7817
|
const e = gn();
|
|
7588
7818
|
return /* @__PURE__ */ u.jsx(
|
|
7589
7819
|
hr,
|
|
@@ -7591,25 +7821,31 @@ function _u(t) {
|
|
|
7591
7821
|
animationDuration: 100,
|
|
7592
7822
|
onClose: () => e.hide(),
|
|
7593
7823
|
emptyMode: !0,
|
|
7594
|
-
onRender: (n, r) => /* @__PURE__ */ u.jsx(
|
|
7595
|
-
|
|
7824
|
+
onRender: (n, r) => /* @__PURE__ */ u.jsx(
|
|
7825
|
+
ve.Provider,
|
|
7596
7826
|
{
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7827
|
+
value: { ...e, hide: () => n() },
|
|
7828
|
+
children: /* @__PURE__ */ u.jsx(
|
|
7829
|
+
Nu,
|
|
7830
|
+
{
|
|
7831
|
+
ctx: t.ctx,
|
|
7832
|
+
fct: t.fct,
|
|
7833
|
+
initialState: t.initialState,
|
|
7834
|
+
onSubmit: (s, i, a) => {
|
|
7835
|
+
t.onSubmit(s, i, a), n();
|
|
7836
|
+
},
|
|
7837
|
+
onCancel: () => {
|
|
7838
|
+
n(), t.onCancel();
|
|
7839
|
+
},
|
|
7840
|
+
style: r
|
|
7841
|
+
}
|
|
7842
|
+
)
|
|
7607
7843
|
}
|
|
7608
|
-
)
|
|
7844
|
+
)
|
|
7609
7845
|
}
|
|
7610
7846
|
);
|
|
7611
7847
|
}
|
|
7612
|
-
function
|
|
7848
|
+
function Mu(t) {
|
|
7613
7849
|
if (t.ctx)
|
|
7614
7850
|
return /* @__PURE__ */ u.jsx(we, { context: t.ctx, children: /* @__PURE__ */ u.jsxs(bs, { alignMode: "right", children: [
|
|
7615
7851
|
(t.submit || t.onSubmit) && /* @__PURE__ */ u.jsx(
|
|
@@ -7628,17 +7864,17 @@ function Tu(t) {
|
|
|
7628
7864
|
] }) });
|
|
7629
7865
|
}
|
|
7630
7866
|
function gn() {
|
|
7631
|
-
const t =
|
|
7867
|
+
const t = B(ve);
|
|
7632
7868
|
if (!t)
|
|
7633
7869
|
throw "Missing CtxLayerRenderContext";
|
|
7634
7870
|
return t;
|
|
7635
7871
|
}
|
|
7636
|
-
function
|
|
7872
|
+
function qu(t) {
|
|
7637
7873
|
const e = gn();
|
|
7638
7874
|
return {
|
|
7639
7875
|
show: (n, r) => new Promise((s) => {
|
|
7640
7876
|
e.show(() => /* @__PURE__ */ u.jsx(
|
|
7641
|
-
|
|
7877
|
+
Eu,
|
|
7642
7878
|
{
|
|
7643
7879
|
ctx: r,
|
|
7644
7880
|
initialState: ue.getInitialState(n),
|
|
@@ -7658,11 +7894,14 @@ function zu(t) {
|
|
|
7658
7894
|
})
|
|
7659
7895
|
};
|
|
7660
7896
|
}
|
|
7661
|
-
function
|
|
7662
|
-
const
|
|
7663
|
-
return ue.newFormContext(
|
|
7897
|
+
function Cu(t, e) {
|
|
7898
|
+
const n = Ou(t);
|
|
7899
|
+
return e = e ?? ((r) => r), ue.newFormContext(
|
|
7900
|
+
n.ctx,
|
|
7901
|
+
(r) => n.setCtx((s) => e(r(s)))
|
|
7902
|
+
);
|
|
7664
7903
|
}
|
|
7665
|
-
function
|
|
7904
|
+
function Du() {
|
|
7666
7905
|
const t = window.matchMedia("(max-width: 768px)");
|
|
7667
7906
|
t.addEventListener("change", function(r) {
|
|
7668
7907
|
n(r.matches);
|
|
@@ -7670,23 +7909,23 @@ function pu() {
|
|
|
7670
7909
|
const [e, n] = V(t.matches);
|
|
7671
7910
|
return e;
|
|
7672
7911
|
}
|
|
7673
|
-
function
|
|
7912
|
+
function Gu() {
|
|
7674
7913
|
const t = gn();
|
|
7675
7914
|
return {
|
|
7676
7915
|
show: function(e, n) {
|
|
7677
|
-
t.showRow(() => /* @__PURE__ */ u.jsx(
|
|
7916
|
+
t.showRow(() => /* @__PURE__ */ u.jsx(Ha, { ...n, children: e }));
|
|
7678
7917
|
}
|
|
7679
7918
|
};
|
|
7680
7919
|
}
|
|
7681
|
-
const
|
|
7920
|
+
const Iu = {
|
|
7682
7921
|
xs: 0,
|
|
7683
7922
|
sm: 640,
|
|
7684
7923
|
md: 768,
|
|
7685
7924
|
lg: 1024,
|
|
7686
7925
|
xl: 1280
|
|
7687
7926
|
};
|
|
7688
|
-
function
|
|
7689
|
-
const e = "(min-width: " + (typeof t == "string" ?
|
|
7927
|
+
function Bu(t) {
|
|
7928
|
+
const e = "(min-width: " + (typeof t == "string" ? Iu[t] : t) + "px)", n = window.matchMedia(e);
|
|
7690
7929
|
n.addEventListener("change", function(i) {
|
|
7691
7930
|
s(i.matches);
|
|
7692
7931
|
});
|
|
@@ -7709,32 +7948,35 @@ const ar = [
|
|
|
7709
7948
|
return mr.distint(e).join(" ");
|
|
7710
7949
|
},
|
|
7711
7950
|
formatDateTime: function(t, e) {
|
|
7712
|
-
return typeof t != "object" && (t = sn.parseDateTime(t)),
|
|
7951
|
+
return typeof t != "object" && (t = sn.parseDateTime(t)), Fu(t, e);
|
|
7713
7952
|
},
|
|
7714
7953
|
parseDateTime: function(t) {
|
|
7715
7954
|
switch (typeof t) {
|
|
7716
7955
|
case "undefined":
|
|
7717
7956
|
return;
|
|
7718
7957
|
case "number":
|
|
7719
|
-
return
|
|
7958
|
+
return ju(t);
|
|
7720
7959
|
case "string":
|
|
7721
|
-
return
|
|
7960
|
+
return Vu(t);
|
|
7722
7961
|
}
|
|
7723
7962
|
}
|
|
7724
7963
|
};
|
|
7725
|
-
function
|
|
7964
|
+
function Fu(t, e) {
|
|
7726
7965
|
if (!t || t.toUnixInteger() == 0)
|
|
7727
7966
|
return "--";
|
|
7728
7967
|
switch (e) {
|
|
7729
7968
|
case "datetime":
|
|
7730
|
-
return t.toLocaleString({
|
|
7969
|
+
return t.toLocaleString({
|
|
7970
|
+
dateStyle: "short",
|
|
7971
|
+
timeStyle: "medium"
|
|
7972
|
+
});
|
|
7731
7973
|
case "date":
|
|
7732
7974
|
return t.toLocaleString({ dateStyle: "short" });
|
|
7733
7975
|
case "time":
|
|
7734
7976
|
return t.toLocaleString({ timeStyle: "medium" });
|
|
7735
7977
|
}
|
|
7736
7978
|
}
|
|
7737
|
-
function
|
|
7979
|
+
function ju(t) {
|
|
7738
7980
|
switch (!0) {
|
|
7739
7981
|
case t < 0:
|
|
7740
7982
|
return;
|
|
@@ -7744,7 +7986,7 @@ function Eu(t) {
|
|
|
7744
7986
|
return w.fromMillis(t);
|
|
7745
7987
|
}
|
|
7746
7988
|
}
|
|
7747
|
-
function
|
|
7989
|
+
function Vu(t) {
|
|
7748
7990
|
const e = [
|
|
7749
7991
|
w.fromISO,
|
|
7750
7992
|
function(n) {
|
|
@@ -7761,16 +8003,16 @@ function Mu(t) {
|
|
|
7761
8003
|
return r;
|
|
7762
8004
|
}
|
|
7763
8005
|
}
|
|
7764
|
-
const
|
|
8006
|
+
const Ru = qe(
|
|
7765
8007
|
null
|
|
7766
8008
|
), ve = qe(null);
|
|
7767
|
-
function
|
|
8009
|
+
function Wu(t) {
|
|
7768
8010
|
const [e, n] = V({
|
|
7769
8011
|
layers: [],
|
|
7770
8012
|
rows: []
|
|
7771
8013
|
});
|
|
7772
8014
|
return /* @__PURE__ */ u.jsxs(
|
|
7773
|
-
|
|
8015
|
+
Ru.Provider,
|
|
7774
8016
|
{
|
|
7775
8017
|
value: {
|
|
7776
8018
|
layers: e.layers,
|
|
@@ -7781,29 +8023,45 @@ function Du(t) {
|
|
|
7781
8023
|
/* @__PURE__ */ u.jsx(
|
|
7782
8024
|
ve.Provider,
|
|
7783
8025
|
{
|
|
7784
|
-
value:
|
|
8026
|
+
value: Lu(e, n),
|
|
7785
8027
|
children: t.children
|
|
7786
8028
|
}
|
|
7787
8029
|
),
|
|
7788
8030
|
e.layers.map((r, s) => {
|
|
7789
|
-
const i = wn(
|
|
8031
|
+
const i = wn(
|
|
8032
|
+
s,
|
|
8033
|
+
e,
|
|
8034
|
+
n,
|
|
8035
|
+
!1
|
|
8036
|
+
);
|
|
7790
8037
|
return /* @__PURE__ */ u.jsx(ve.Provider, { value: i, children: r(() => i.hide()) }, s);
|
|
7791
8038
|
}),
|
|
7792
|
-
/* @__PURE__ */ u.jsx(
|
|
8039
|
+
/* @__PURE__ */ u.jsx(
|
|
8040
|
+
$u,
|
|
8041
|
+
{
|
|
8042
|
+
container: e,
|
|
8043
|
+
updateContainer: n
|
|
8044
|
+
}
|
|
8045
|
+
)
|
|
7793
8046
|
]
|
|
7794
8047
|
}
|
|
7795
8048
|
);
|
|
7796
8049
|
}
|
|
7797
|
-
function
|
|
8050
|
+
function $u({
|
|
7798
8051
|
container: t,
|
|
7799
8052
|
updateContainer: e
|
|
7800
8053
|
}) {
|
|
7801
|
-
return /* @__PURE__ */ u.jsx(
|
|
7802
|
-
const s = wn(
|
|
8054
|
+
return /* @__PURE__ */ u.jsx(ks, { children: t.rows.map((n, r) => {
|
|
8055
|
+
const s = wn(
|
|
8056
|
+
r,
|
|
8057
|
+
t,
|
|
8058
|
+
e,
|
|
8059
|
+
!0
|
|
8060
|
+
);
|
|
7803
8061
|
return /* @__PURE__ */ u.jsx(ve.Provider, { value: s, children: n(() => s.hide()) }, r);
|
|
7804
8062
|
}) });
|
|
7805
8063
|
}
|
|
7806
|
-
function
|
|
8064
|
+
function Lu(t, e) {
|
|
7807
8065
|
return wn(-1, t, e, !1);
|
|
7808
8066
|
}
|
|
7809
8067
|
function wn(t, e, n, r) {
|
|
@@ -7815,7 +8073,7 @@ function wn(t, e, n, r) {
|
|
|
7815
8073
|
}, a = i.layers.length - 1;
|
|
7816
8074
|
return n(() => i), function() {
|
|
7817
8075
|
n((o) => ({
|
|
7818
|
-
layers: o.layers.filter((l,
|
|
8076
|
+
layers: o.layers.filter((l, d) => d < a),
|
|
7819
8077
|
rows: o.rows
|
|
7820
8078
|
}));
|
|
7821
8079
|
};
|
|
@@ -7827,7 +8085,7 @@ function wn(t, e, n, r) {
|
|
|
7827
8085
|
}, a = i.rows.length - 1;
|
|
7828
8086
|
return n(() => i), function() {
|
|
7829
8087
|
n((o) => ({
|
|
7830
|
-
rows: o.rows.filter((l,
|
|
8088
|
+
rows: o.rows.filter((l, d) => d < a),
|
|
7831
8089
|
layers: o.layers
|
|
7832
8090
|
}));
|
|
7833
8091
|
};
|
|
@@ -7843,14 +8101,14 @@ function wn(t, e, n, r) {
|
|
|
7843
8101
|
}
|
|
7844
8102
|
};
|
|
7845
8103
|
}
|
|
7846
|
-
function
|
|
7847
|
-
return /* @__PURE__ */ u.jsx(
|
|
8104
|
+
function Ju(t) {
|
|
8105
|
+
return /* @__PURE__ */ u.jsx(Wu, { children: t.children });
|
|
7848
8106
|
}
|
|
7849
|
-
const
|
|
7850
|
-
appLayout:
|
|
8107
|
+
const Au = "_appLayout_1o6tz_10", or = {
|
|
8108
|
+
appLayout: Au
|
|
7851
8109
|
};
|
|
7852
|
-
function
|
|
7853
|
-
const e = E(or, t), n =
|
|
8110
|
+
function Ku(t) {
|
|
8111
|
+
const e = E(or, t), n = Du(), r = {
|
|
7854
8112
|
...t,
|
|
7855
8113
|
...n ? t.mobile : void 0,
|
|
7856
8114
|
sizes: {
|
|
@@ -7868,10 +8126,17 @@ function Hu(t) {
|
|
|
7868
8126
|
left: s.left ? a(r.sizes?.left, r.sizes?.leftSpace) : 0,
|
|
7869
8127
|
right: s.right ? a(r.sizes?.right, r.sizes?.rightSpace) : 0
|
|
7870
8128
|
};
|
|
7871
|
-
return /* @__PURE__ */ u.jsx("div", { className: e.styles(or.appLayout), children: /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsxs(
|
|
7872
|
-
s.header && /* @__PURE__ */ u.jsx(
|
|
8129
|
+
return /* @__PURE__ */ u.jsx("div", { className: e.styles(or.appLayout), children: /* @__PURE__ */ u.jsx(re, { palette: e.palette, children: /* @__PURE__ */ u.jsxs(H, { rect: { x: 0, y: 0, x2: 0, y2: 0 }, children: [
|
|
8130
|
+
s.header && /* @__PURE__ */ u.jsx(
|
|
8131
|
+
H,
|
|
8132
|
+
{
|
|
8133
|
+
rect: { x: 0, y: 0, x2: 0 },
|
|
8134
|
+
height: i.header,
|
|
8135
|
+
children: r.header
|
|
8136
|
+
}
|
|
8137
|
+
),
|
|
7873
8138
|
s.left && /* @__PURE__ */ u.jsx(
|
|
7874
|
-
|
|
8139
|
+
H,
|
|
7875
8140
|
{
|
|
7876
8141
|
rect: { x: 0, y: i.header, y2: i.footer },
|
|
7877
8142
|
width: a(r.sizes?.left),
|
|
@@ -7879,7 +8144,7 @@ function Hu(t) {
|
|
|
7879
8144
|
}
|
|
7880
8145
|
),
|
|
7881
8146
|
/* @__PURE__ */ u.jsx(
|
|
7882
|
-
|
|
8147
|
+
H,
|
|
7883
8148
|
{
|
|
7884
8149
|
rect: {
|
|
7885
8150
|
x: i.left,
|
|
@@ -7892,18 +8157,25 @@ function Hu(t) {
|
|
|
7892
8157
|
}
|
|
7893
8158
|
),
|
|
7894
8159
|
s.right && /* @__PURE__ */ u.jsx(
|
|
7895
|
-
|
|
8160
|
+
H,
|
|
7896
8161
|
{
|
|
7897
8162
|
rect: { x2: 0, y: i.header, y2: i.footer },
|
|
7898
8163
|
width: a(r.sizes?.right),
|
|
7899
8164
|
children: r.right
|
|
7900
8165
|
}
|
|
7901
8166
|
),
|
|
7902
|
-
s.footer && /* @__PURE__ */ u.jsx(
|
|
8167
|
+
s.footer && /* @__PURE__ */ u.jsx(
|
|
8168
|
+
H,
|
|
8169
|
+
{
|
|
8170
|
+
rect: { x: 0, x2: 0, y2: 0 },
|
|
8171
|
+
height: i.footer,
|
|
8172
|
+
children: r.footer
|
|
8173
|
+
}
|
|
8174
|
+
)
|
|
7903
8175
|
] }) }) });
|
|
7904
8176
|
function a(...o) {
|
|
7905
|
-
const l = o.filter((
|
|
7906
|
-
if (o.find((
|
|
8177
|
+
const l = o.filter((c) => c !== void 0).reduce((c, m) => c + m, 0);
|
|
8178
|
+
if (o.find((c) => c !== void 0))
|
|
7907
8179
|
return t.sizeUnit ? l + t.sizeUnit : l;
|
|
7908
8180
|
}
|
|
7909
8181
|
}
|
|
@@ -7913,44 +8185,44 @@ export {
|
|
|
7913
8185
|
Ee as MathUtils,
|
|
7914
8186
|
mr as MiscUtils,
|
|
7915
8187
|
sn as StrUtils,
|
|
7916
|
-
|
|
7917
|
-
|
|
8188
|
+
Ju as TAppContainer,
|
|
8189
|
+
Ku as TAppLayout,
|
|
7918
8190
|
an as TButton,
|
|
7919
|
-
|
|
8191
|
+
Qs as TCheckbox,
|
|
7920
8192
|
hr as TClosingEffectProvider,
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
8193
|
+
Yu as TColLayout,
|
|
8194
|
+
la as TDropDown,
|
|
8195
|
+
ha as TErrorPanel,
|
|
7924
8196
|
we as TForm,
|
|
7925
8197
|
ir as TFormButton,
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
8198
|
+
vu as TFormField,
|
|
8199
|
+
He as TGlass,
|
|
8200
|
+
_a as TGroupBox,
|
|
8201
|
+
Uu as THeading,
|
|
7930
8202
|
bs as THorizLayout,
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
8203
|
+
Ra as TLoadingBar,
|
|
8204
|
+
oa as TMenu,
|
|
8205
|
+
Zu as TNameValue,
|
|
8206
|
+
Ha as TNotification,
|
|
7935
8207
|
re as TPaletteProvider,
|
|
7936
8208
|
vr as TProgressBar,
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
8209
|
+
Xa as TRadioButton,
|
|
8210
|
+
ks as TRowLayout,
|
|
8211
|
+
Hu as TTable,
|
|
7940
8212
|
on as TTextBox,
|
|
7941
|
-
|
|
7942
|
-
|
|
8213
|
+
gu as TVertLayout,
|
|
8214
|
+
H as TViewport,
|
|
7943
8215
|
vt as TWindow,
|
|
7944
|
-
|
|
8216
|
+
Za as ViewUtils,
|
|
7945
8217
|
fr as useClosingEffect,
|
|
7946
|
-
|
|
7947
|
-
|
|
8218
|
+
Ou as useDataContext,
|
|
8219
|
+
qu as useDialog,
|
|
7948
8220
|
dr as useFormContext,
|
|
7949
8221
|
gn as useLayer,
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
8222
|
+
Du as useMobile,
|
|
8223
|
+
Va as useMouseValue,
|
|
8224
|
+
Cu as useNewFormContext,
|
|
8225
|
+
Gu as useNotifications,
|
|
7954
8226
|
gt as useValue,
|
|
7955
|
-
|
|
8227
|
+
Bu as useWidth
|
|
7956
8228
|
};
|