@getodk/xpath 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/interface/XPathNodeKindAdapter.d.ts +1 -0
- package/dist/adapter/interface/XPathTraversalAdapter.d.ts +2 -2
- package/dist/evaluator/Evaluator.d.ts +1 -0
- package/dist/evaluator/NamespaceResolver.d.ts +1 -0
- package/dist/functions/xforms/geo.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +187 -4161
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -1,4046 +1,23 @@
|
|
|
1
|
+
import { Temporal } from 'temporal-polyfill';
|
|
1
2
|
import { U as UpsertableMap, e as expressionParser, g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs } from './expressionParser-DjyNe4Lw.js';
|
|
2
3
|
|
|
3
4
|
function _mergeNamespaces(n, m) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function clampProp(e, n, t, o, r) {
|
|
22
|
-
return clampEntity(n, ((e, n) => {
|
|
23
|
-
const t = e[n];
|
|
24
|
-
if (void 0 === t) {
|
|
25
|
-
throw new TypeError(missingField(n));
|
|
26
|
-
}
|
|
27
|
-
return t;
|
|
28
|
-
})(e, n), t, o, r);
|
|
29
|
-
}
|
|
30
|
-
function clampEntity(e, n, t, o, r, i) {
|
|
31
|
-
const a = clampNumber(n, t, o);
|
|
32
|
-
if (r && n !== a) {
|
|
33
|
-
throw new RangeError(numberOutOfRange(e, n, t, o, i));
|
|
34
|
-
}
|
|
35
|
-
return a;
|
|
36
|
-
}
|
|
37
|
-
function s(e) {
|
|
38
|
-
return null !== e && /object|function/.test(typeof e);
|
|
39
|
-
}
|
|
40
|
-
function on(e, n = Map) {
|
|
41
|
-
const t = new n();
|
|
42
|
-
return (n, ...o) => {
|
|
43
|
-
if (t.has(n)) {
|
|
44
|
-
return t.get(n);
|
|
45
|
-
}
|
|
46
|
-
const r = e(n, ...o);
|
|
47
|
-
return t.set(n, r), r;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function r(e) {
|
|
51
|
-
return n({
|
|
52
|
-
name: e
|
|
53
|
-
}, 1);
|
|
54
|
-
}
|
|
55
|
-
function n(n, t) {
|
|
56
|
-
return e(e => ({
|
|
57
|
-
value: e,
|
|
58
|
-
configurable: 1,
|
|
59
|
-
writable: !t
|
|
60
|
-
}), n);
|
|
61
|
-
}
|
|
62
|
-
function t(n) {
|
|
63
|
-
return e(e => ({
|
|
64
|
-
get: e,
|
|
65
|
-
configurable: 1
|
|
66
|
-
}), n);
|
|
67
|
-
}
|
|
68
|
-
function o(e) {
|
|
69
|
-
return {
|
|
70
|
-
[Symbol.toStringTag]: {
|
|
71
|
-
value: e,
|
|
72
|
-
configurable: 1
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function zipProps(e, n) {
|
|
77
|
-
const t = {};
|
|
78
|
-
let o = e.length;
|
|
79
|
-
for (const r of n) {
|
|
80
|
-
t[e[--o]] = r;
|
|
81
|
-
}
|
|
82
|
-
return t;
|
|
83
|
-
}
|
|
84
|
-
function e(e, n, t) {
|
|
85
|
-
const o = {};
|
|
86
|
-
for (const r in n) {
|
|
87
|
-
o[r] = e(n[r], r, t);
|
|
88
|
-
}
|
|
89
|
-
return o;
|
|
90
|
-
}
|
|
91
|
-
function g(e, n, t) {
|
|
92
|
-
const o = {};
|
|
93
|
-
for (let r = 0; r < n.length; r++) {
|
|
94
|
-
const i = n[r];
|
|
95
|
-
o[i] = e(i, r, t);
|
|
96
|
-
}
|
|
97
|
-
return o;
|
|
98
|
-
}
|
|
99
|
-
function remapProps(e, n, t) {
|
|
100
|
-
const o = {};
|
|
101
|
-
for (let r = 0; r < e.length; r++) {
|
|
102
|
-
o[n[r]] = t[e[r]];
|
|
103
|
-
}
|
|
104
|
-
return o;
|
|
105
|
-
}
|
|
106
|
-
function nn(e, n) {
|
|
107
|
-
const t = Object.create(null);
|
|
108
|
-
for (const o of e) {
|
|
109
|
-
t[o] = n[o];
|
|
110
|
-
}
|
|
111
|
-
return t;
|
|
112
|
-
}
|
|
113
|
-
function hasAnyPropsByName(e, n) {
|
|
114
|
-
for (const t of n) {
|
|
115
|
-
if (t in e) {
|
|
116
|
-
return 1;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return 0;
|
|
120
|
-
}
|
|
121
|
-
function allPropsEqual(e, n, t) {
|
|
122
|
-
for (const o of e) {
|
|
123
|
-
if (n[o] !== t[o]) {
|
|
124
|
-
return 0;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return 1;
|
|
128
|
-
}
|
|
129
|
-
function zeroOutProps(e, n, t) {
|
|
130
|
-
const o = {
|
|
131
|
-
...t
|
|
132
|
-
};
|
|
133
|
-
for (let t = 0; t < n; t++) {
|
|
134
|
-
o[e[t]] = 0;
|
|
135
|
-
}
|
|
136
|
-
return o;
|
|
137
|
-
}
|
|
138
|
-
function Pt(e, ...n) {
|
|
139
|
-
return (...t) => e(...n, ...t);
|
|
140
|
-
}
|
|
141
|
-
function capitalize(e) {
|
|
142
|
-
return e[0].toUpperCase() + e.substring(1);
|
|
143
|
-
}
|
|
144
|
-
function sortStrings(e) {
|
|
145
|
-
return e.slice().sort();
|
|
146
|
-
}
|
|
147
|
-
function padNumber(e, n) {
|
|
148
|
-
return String(n).padStart(e, "0");
|
|
149
|
-
}
|
|
150
|
-
function compareNumbers(e, n) {
|
|
151
|
-
return Math.sign(e - n);
|
|
152
|
-
}
|
|
153
|
-
function clampNumber(e, n, t) {
|
|
154
|
-
return Math.min(Math.max(e, n), t);
|
|
155
|
-
}
|
|
156
|
-
function divModFloor(e, n) {
|
|
157
|
-
return [Math.floor(e / n), modFloor(e, n)];
|
|
158
|
-
}
|
|
159
|
-
function modFloor(e, n) {
|
|
160
|
-
return (e % n + n) % n;
|
|
161
|
-
}
|
|
162
|
-
function divModTrunc(e, n) {
|
|
163
|
-
return [divTrunc(e, n), modTrunc(e, n)];
|
|
164
|
-
}
|
|
165
|
-
function divTrunc(e, n) {
|
|
166
|
-
return Math.trunc(e / n) || 0;
|
|
167
|
-
}
|
|
168
|
-
function modTrunc(e, n) {
|
|
169
|
-
return e % n || 0;
|
|
170
|
-
}
|
|
171
|
-
function hasHalf(e) {
|
|
172
|
-
return .5 === Math.abs(e % 1);
|
|
173
|
-
}
|
|
174
|
-
function givenFieldsToBigNano(e, n, t) {
|
|
175
|
-
let o = 0,
|
|
176
|
-
r = 0;
|
|
177
|
-
for (let i = 0; i <= n; i++) {
|
|
178
|
-
const n = e[t[i]],
|
|
179
|
-
a = Ao[i],
|
|
180
|
-
s = Uo / a,
|
|
181
|
-
[c, u] = divModTrunc(n, s);
|
|
182
|
-
o += u * a, r += c;
|
|
183
|
-
}
|
|
184
|
-
const [i, a] = divModTrunc(o, Uo);
|
|
185
|
-
return [r + i, a];
|
|
186
|
-
}
|
|
187
|
-
function nanoToGivenFields(e, n, t) {
|
|
188
|
-
const o = {};
|
|
189
|
-
for (let r = n; r >= 0; r--) {
|
|
190
|
-
const n = Ao[r];
|
|
191
|
-
o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);
|
|
192
|
-
}
|
|
193
|
-
return o;
|
|
194
|
-
}
|
|
195
|
-
function d(e) {
|
|
196
|
-
if (void 0 !== e) {
|
|
197
|
-
return m(e);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function P(e) {
|
|
201
|
-
if (void 0 !== e) {
|
|
202
|
-
return h(e);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
function S(e) {
|
|
206
|
-
if (void 0 !== e) {
|
|
207
|
-
return T(e);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
function h(e) {
|
|
211
|
-
return requireNumberIsPositive(T(e));
|
|
212
|
-
}
|
|
213
|
-
function T(e) {
|
|
214
|
-
return ze(cr(e));
|
|
215
|
-
}
|
|
216
|
-
function requirePropDefined(e, n) {
|
|
217
|
-
if (null == n) {
|
|
218
|
-
throw new RangeError(missingField(e));
|
|
219
|
-
}
|
|
220
|
-
return n;
|
|
221
|
-
}
|
|
222
|
-
function requireObjectLike(e) {
|
|
223
|
-
if (!s(e)) {
|
|
224
|
-
throw new TypeError(oo);
|
|
225
|
-
}
|
|
226
|
-
return e;
|
|
227
|
-
}
|
|
228
|
-
function requireType(e, n, t = e) {
|
|
229
|
-
if (typeof n !== e) {
|
|
230
|
-
throw new TypeError(invalidEntity(t, n));
|
|
231
|
-
}
|
|
232
|
-
return n;
|
|
233
|
-
}
|
|
234
|
-
function ze(e, n = "number") {
|
|
235
|
-
if (!Number.isInteger(e)) {
|
|
236
|
-
throw new RangeError(expectedInteger(n, e));
|
|
237
|
-
}
|
|
238
|
-
return e || 0;
|
|
239
|
-
}
|
|
240
|
-
function requireNumberIsPositive(e, n = "number") {
|
|
241
|
-
if (e <= 0) {
|
|
242
|
-
throw new RangeError(expectedPositive(n, e));
|
|
243
|
-
}
|
|
244
|
-
return e;
|
|
245
|
-
}
|
|
246
|
-
function toString(e) {
|
|
247
|
-
if ("symbol" == typeof e) {
|
|
248
|
-
throw new TypeError(no);
|
|
249
|
-
}
|
|
250
|
-
return String(e);
|
|
251
|
-
}
|
|
252
|
-
function toStringViaPrimitive(e, n) {
|
|
253
|
-
return s(e) ? String(e) : m(e, n);
|
|
254
|
-
}
|
|
255
|
-
function toBigInt(e) {
|
|
256
|
-
if ("string" == typeof e) {
|
|
257
|
-
return BigInt(e);
|
|
258
|
-
}
|
|
259
|
-
if ("bigint" != typeof e) {
|
|
260
|
-
throw new TypeError(invalidBigInt(e));
|
|
261
|
-
}
|
|
262
|
-
return e;
|
|
263
|
-
}
|
|
264
|
-
function toNumber(e, n = "number") {
|
|
265
|
-
if ("bigint" == typeof e) {
|
|
266
|
-
throw new TypeError(forbiddenBigIntToNumber(n));
|
|
267
|
-
}
|
|
268
|
-
if (e = Number(e), !Number.isFinite(e)) {
|
|
269
|
-
throw new RangeError(expectedFinite(n, e));
|
|
270
|
-
}
|
|
271
|
-
return e;
|
|
272
|
-
}
|
|
273
|
-
function toInteger(e, n) {
|
|
274
|
-
return Math.trunc(toNumber(e, n)) || 0;
|
|
275
|
-
}
|
|
276
|
-
function toStrictInteger(e, n) {
|
|
277
|
-
return ze(toNumber(e, n), n);
|
|
278
|
-
}
|
|
279
|
-
function toPositiveInteger(e, n) {
|
|
280
|
-
return requireNumberIsPositive(toInteger(e, n), n);
|
|
281
|
-
}
|
|
282
|
-
function createBigNano(e, n) {
|
|
283
|
-
let [t, o] = divModTrunc(n, Uo),
|
|
284
|
-
r = e + t;
|
|
285
|
-
const i = Math.sign(r);
|
|
286
|
-
return i && i === -Math.sign(o) && (r -= i, o += i * Uo), [r, o];
|
|
287
|
-
}
|
|
288
|
-
function addBigNanos(e, n, t = 1) {
|
|
289
|
-
return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);
|
|
290
|
-
}
|
|
291
|
-
function moveBigNano(e, n) {
|
|
292
|
-
return createBigNano(e[0], e[1] + n);
|
|
293
|
-
}
|
|
294
|
-
function diffBigNanos(e, n) {
|
|
295
|
-
return addBigNanos(n, e, -1);
|
|
296
|
-
}
|
|
297
|
-
function compareBigNanos(e, n) {
|
|
298
|
-
return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);
|
|
299
|
-
}
|
|
300
|
-
function bigNanoOutside(e, n, t) {
|
|
301
|
-
return -1 === compareBigNanos(e, n) || 1 === compareBigNanos(e, t);
|
|
302
|
-
}
|
|
303
|
-
function bigIntToBigNano(e, n = 1) {
|
|
304
|
-
const t = BigInt(Uo / n);
|
|
305
|
-
return [Number(e / t), Number(e % t) * n];
|
|
306
|
-
}
|
|
307
|
-
function Ge(e, n = 1) {
|
|
308
|
-
const t = Uo / n,
|
|
309
|
-
[o, r] = divModTrunc(e, t);
|
|
310
|
-
return [o, r * n];
|
|
311
|
-
}
|
|
312
|
-
function bigNanoToNumber(e, n = 1, t) {
|
|
313
|
-
const [o, r] = e,
|
|
314
|
-
[i, a] = divModTrunc(r, n);
|
|
315
|
-
return o * (Uo / n) + (i + (t ? a / n : 0));
|
|
316
|
-
}
|
|
317
|
-
function divModBigNano(e, n, t = divModFloor) {
|
|
318
|
-
const [o, r] = e,
|
|
319
|
-
[i, a] = t(r, n);
|
|
320
|
-
return [o * (Uo / n) + i, a];
|
|
321
|
-
}
|
|
322
|
-
function checkIsoYearMonthInBounds(e) {
|
|
323
|
-
return clampProp(e, "isoYear", wr, Fr, 1), e.isoYear === wr ? clampProp(e, "isoMonth", 4, 12, 1) : e.isoYear === Fr && clampProp(e, "isoMonth", 1, 9, 1), e;
|
|
324
|
-
}
|
|
325
|
-
function checkIsoDateInBounds(e) {
|
|
326
|
-
return checkIsoDateTimeInBounds({
|
|
327
|
-
...e,
|
|
328
|
-
...Nt,
|
|
329
|
-
isoHour: 12
|
|
330
|
-
}), e;
|
|
331
|
-
}
|
|
332
|
-
function checkIsoDateTimeInBounds(e) {
|
|
333
|
-
const n = clampProp(e, "isoYear", wr, Fr, 1),
|
|
334
|
-
t = n === wr ? 1 : n === Fr ? -1 : 0;
|
|
335
|
-
return t && checkEpochNanoInBounds(isoToEpochNano({
|
|
336
|
-
...e,
|
|
337
|
-
isoDay: e.isoDay + t,
|
|
338
|
-
isoNanosecond: e.isoNanosecond - t
|
|
339
|
-
})), e;
|
|
340
|
-
}
|
|
341
|
-
function checkEpochNanoInBounds(e) {
|
|
342
|
-
if (!e || bigNanoOutside(e, Sr, Er)) {
|
|
343
|
-
throw new RangeError(Io);
|
|
344
|
-
}
|
|
345
|
-
return e;
|
|
346
|
-
}
|
|
347
|
-
function isoTimeFieldsToNano(e) {
|
|
348
|
-
return givenFieldsToBigNano(e, 5, w)[1];
|
|
349
|
-
}
|
|
350
|
-
function nanoToIsoTimeAndDay(e) {
|
|
351
|
-
const [n, t] = divModFloor(e, Uo);
|
|
352
|
-
return [nanoToGivenFields(t, 5, w), n];
|
|
353
|
-
}
|
|
354
|
-
function epochNanoToSecMod(e) {
|
|
355
|
-
return divModBigNano(e, Ro);
|
|
356
|
-
}
|
|
357
|
-
function isoToEpochMilli(e) {
|
|
358
|
-
return isoArgsToEpochMilli(e.isoYear, e.isoMonth, e.isoDay, e.isoHour, e.isoMinute, e.isoSecond, e.isoMillisecond);
|
|
359
|
-
}
|
|
360
|
-
function isoToEpochNano(e) {
|
|
361
|
-
const n = isoToEpochMilli(e);
|
|
362
|
-
if (void 0 !== n) {
|
|
363
|
-
const [t, o] = divModTrunc(n, ko);
|
|
364
|
-
return [t, o * Qe + (e.isoMicrosecond || 0) * Yo + (e.isoNanosecond || 0)];
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
function isoToEpochNanoWithOffset(e, n) {
|
|
368
|
-
const [t, o] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) - n);
|
|
369
|
-
return checkEpochNanoInBounds(isoToEpochNano({
|
|
370
|
-
...e,
|
|
371
|
-
isoDay: e.isoDay + o,
|
|
372
|
-
...t
|
|
373
|
-
}));
|
|
374
|
-
}
|
|
375
|
-
function isoArgsToEpochSec(...e) {
|
|
376
|
-
return isoArgsToEpochMilli(...e) / Co;
|
|
377
|
-
}
|
|
378
|
-
function isoArgsToEpochMilli(...e) {
|
|
379
|
-
const [n, t] = isoToLegacyDate(...e),
|
|
380
|
-
o = n.valueOf();
|
|
381
|
-
if (!isNaN(o)) {
|
|
382
|
-
return o - t * ko;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
function isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {
|
|
386
|
-
const s = e === wr ? 1 : e === Fr ? -1 : 0,
|
|
387
|
-
c = new Date();
|
|
388
|
-
return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [c, s];
|
|
389
|
-
}
|
|
390
|
-
function epochNanoToIso(e, n) {
|
|
391
|
-
let [t, o] = moveBigNano(e, n);
|
|
392
|
-
o < 0 && (o += Uo, t -= 1);
|
|
393
|
-
const [r, i] = divModFloor(o, Qe),
|
|
394
|
-
[a, s] = divModFloor(i, Yo);
|
|
395
|
-
return epochMilliToIso(t * ko + r, a, s);
|
|
396
|
-
}
|
|
397
|
-
function epochMilliToIso(e, n = 0, t = 0) {
|
|
398
|
-
const o = Math.ceil(Math.max(0, Math.abs(e) - Pr) / ko) * Math.sign(e),
|
|
399
|
-
r = new Date(e - o * ko);
|
|
400
|
-
return zipProps(Tr, [r.getUTCFullYear(), r.getUTCMonth() + 1, r.getUTCDate() + o, r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds(), r.getUTCMilliseconds(), n, t]);
|
|
401
|
-
}
|
|
402
|
-
function hashIntlFormatParts(e, n) {
|
|
403
|
-
if (n < -Pr) {
|
|
404
|
-
throw new RangeError(Io);
|
|
405
|
-
}
|
|
406
|
-
const t = e.formatToParts(n),
|
|
407
|
-
o = {};
|
|
408
|
-
for (const e of t) {
|
|
409
|
-
o[e.type] = e.value;
|
|
410
|
-
}
|
|
411
|
-
return o;
|
|
412
|
-
}
|
|
413
|
-
function computeIsoDateParts(e) {
|
|
414
|
-
return [e.isoYear, e.isoMonth, e.isoDay];
|
|
415
|
-
}
|
|
416
|
-
function computeIsoMonthCodeParts(e, n) {
|
|
417
|
-
return [n, 0];
|
|
418
|
-
}
|
|
419
|
-
function computeIsoMonthsInYear() {
|
|
420
|
-
return kr;
|
|
421
|
-
}
|
|
422
|
-
function computeIsoDaysInMonth(e, n) {
|
|
423
|
-
switch (n) {
|
|
424
|
-
case 2:
|
|
425
|
-
return computeIsoInLeapYear(e) ? 29 : 28;
|
|
426
|
-
case 4:
|
|
427
|
-
case 6:
|
|
428
|
-
case 9:
|
|
429
|
-
case 11:
|
|
430
|
-
return 30;
|
|
431
|
-
}
|
|
432
|
-
return 31;
|
|
433
|
-
}
|
|
434
|
-
function computeIsoDaysInYear(e) {
|
|
435
|
-
return computeIsoInLeapYear(e) ? 366 : 365;
|
|
436
|
-
}
|
|
437
|
-
function computeIsoInLeapYear(e) {
|
|
438
|
-
return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
|
|
439
|
-
}
|
|
440
|
-
function computeIsoDayOfWeek(e) {
|
|
441
|
-
const [n, t] = isoToLegacyDate(e.isoYear, e.isoMonth, e.isoDay);
|
|
442
|
-
return modFloor(n.getUTCDay() - t, 7) || 7;
|
|
443
|
-
}
|
|
444
|
-
function computeIsoEraParts(e) {
|
|
445
|
-
return this.id === or ? (({
|
|
446
|
-
isoYear: e
|
|
447
|
-
}) => e < 1 ? ["gregory-inverse", 1 - e] : ["gregory", e])(e) : this.id === rr ? Yr(e) : [];
|
|
448
|
-
}
|
|
449
|
-
function computeJapaneseEraParts(e) {
|
|
450
|
-
const n = isoToEpochMilli(e);
|
|
451
|
-
if (n < Cr) {
|
|
452
|
-
const {
|
|
453
|
-
isoYear: n
|
|
454
|
-
} = e;
|
|
455
|
-
return n < 1 ? ["japanese-inverse", 1 - n] : ["japanese", n];
|
|
456
|
-
}
|
|
457
|
-
const t = hashIntlFormatParts(Ci(rr), n),
|
|
458
|
-
{
|
|
459
|
-
era: o,
|
|
460
|
-
eraYear: r
|
|
461
|
-
} = parseIntlYear(t, rr);
|
|
462
|
-
return [o, r];
|
|
463
|
-
}
|
|
464
|
-
function checkIsoDateTimeFields(e) {
|
|
465
|
-
return checkIsoDateFields(e), constrainIsoTimeFields(e, 1), e;
|
|
466
|
-
}
|
|
467
|
-
function checkIsoDateFields(e) {
|
|
468
|
-
return constrainIsoDateFields(e, 1), e;
|
|
469
|
-
}
|
|
470
|
-
function isIsoDateFieldsValid(e) {
|
|
471
|
-
return allPropsEqual(Dr, e, constrainIsoDateFields(e));
|
|
472
|
-
}
|
|
473
|
-
function constrainIsoDateFields(e, n) {
|
|
474
|
-
const {
|
|
475
|
-
isoYear: t
|
|
476
|
-
} = e,
|
|
477
|
-
o = clampProp(e, "isoMonth", 1, computeIsoMonthsInYear(), n);
|
|
478
|
-
return {
|
|
479
|
-
isoYear: t,
|
|
480
|
-
isoMonth: o,
|
|
481
|
-
isoDay: clampProp(e, "isoDay", 1, computeIsoDaysInMonth(t, o), n)
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
function constrainIsoTimeFields(e, n) {
|
|
485
|
-
return zipProps(w, [clampProp(e, "isoHour", 0, 23, n), clampProp(e, "isoMinute", 0, 59, n), clampProp(e, "isoSecond", 0, 59, n), clampProp(e, "isoMillisecond", 0, 999, n), clampProp(e, "isoMicrosecond", 0, 999, n), clampProp(e, "isoNanosecond", 0, 999, n)]);
|
|
486
|
-
}
|
|
487
|
-
function mt(e) {
|
|
488
|
-
return void 0 === e ? 0 : Xr(requireObjectLike(e));
|
|
489
|
-
}
|
|
490
|
-
function je(e, n = 0) {
|
|
491
|
-
e = normalizeOptions(e);
|
|
492
|
-
const t = ei(e),
|
|
493
|
-
o = ni(e, n);
|
|
494
|
-
return [Xr(e), o, t];
|
|
495
|
-
}
|
|
496
|
-
function refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {
|
|
497
|
-
n = normalizeOptions(n);
|
|
498
|
-
let a = Kr(n, o, r),
|
|
499
|
-
s = parseRoundingIncInteger(n),
|
|
500
|
-
c = ii(n, i);
|
|
501
|
-
const u = Jr(n, o, r, 1);
|
|
502
|
-
return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1), e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [a, u, s, c];
|
|
503
|
-
}
|
|
504
|
-
function refineRoundingOptions(e, n = 6, t) {
|
|
505
|
-
let o = parseRoundingIncInteger(e = normalizeOptionsOrString(e, Rr));
|
|
506
|
-
const r = ii(e, 7);
|
|
507
|
-
let i = Jr(e, n);
|
|
508
|
-
return i = requirePropDefined(Rr, i), o = refineRoundingInc(o, i, void 0, t), [i, o, r];
|
|
509
|
-
}
|
|
510
|
-
function refineDateDisplayOptions(e) {
|
|
511
|
-
return ti(normalizeOptions(e));
|
|
512
|
-
}
|
|
513
|
-
function refineTimeDisplayOptions(e, n) {
|
|
514
|
-
return refineTimeDisplayTuple(normalizeOptions(e), n);
|
|
515
|
-
}
|
|
516
|
-
function Me(e) {
|
|
517
|
-
const n = normalizeOptionsOrString(e, qr),
|
|
518
|
-
t = refineChoiceOption(qr, _r, n, 0);
|
|
519
|
-
if (!t) {
|
|
520
|
-
throw new RangeError(invalidEntity(qr, t));
|
|
521
|
-
}
|
|
522
|
-
return t;
|
|
523
|
-
}
|
|
524
|
-
function refineTimeDisplayTuple(e, n = 4) {
|
|
525
|
-
const t = refineSubsecDigits(e);
|
|
526
|
-
return [ii(e, 4), ...refineSmallestUnitAndSubsecDigits(Jr(e, n), t)];
|
|
527
|
-
}
|
|
528
|
-
function refineSmallestUnitAndSubsecDigits(e, n) {
|
|
529
|
-
return null != e ? [Ao[e], e < 4 ? 9 - 3 * e : -1] : [void 0 === n ? 1 : 10 ** (9 - n), n];
|
|
530
|
-
}
|
|
531
|
-
function parseRoundingIncInteger(e) {
|
|
532
|
-
const n = e[zr];
|
|
533
|
-
return void 0 === n ? 1 : toInteger(n, zr);
|
|
534
|
-
}
|
|
535
|
-
function refineRoundingInc(e, n, t, o) {
|
|
536
|
-
const r = o ? Uo : Ao[n + 1];
|
|
537
|
-
if (r) {
|
|
538
|
-
const t = Ao[n];
|
|
539
|
-
if (r % ((e = clampEntity(zr, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {
|
|
540
|
-
throw new RangeError(invalidEntity(zr, e));
|
|
541
|
-
}
|
|
542
|
-
} else {
|
|
543
|
-
e = clampEntity(zr, e, 1, t ? 10 ** 9 : 1, 1);
|
|
544
|
-
}
|
|
545
|
-
return e;
|
|
546
|
-
}
|
|
547
|
-
function refineSubsecDigits(e) {
|
|
548
|
-
let n = e[Ur];
|
|
549
|
-
if (void 0 !== n) {
|
|
550
|
-
if ("number" != typeof n) {
|
|
551
|
-
if ("auto" === toString(n)) {
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
throw new RangeError(invalidEntity(Ur, n));
|
|
555
|
-
}
|
|
556
|
-
n = clampEntity(Ur, Math.floor(n), 0, 9, 1);
|
|
557
|
-
}
|
|
558
|
-
return n;
|
|
559
|
-
}
|
|
560
|
-
function normalizeOptions(e) {
|
|
561
|
-
return void 0 === e ? {} : requireObjectLike(e);
|
|
562
|
-
}
|
|
563
|
-
function normalizeOptionsOrString(e, n) {
|
|
564
|
-
return "string" == typeof e ? {
|
|
565
|
-
[n]: e
|
|
566
|
-
} : requireObjectLike(e);
|
|
567
|
-
}
|
|
568
|
-
function fabricateOverflowOptions(e) {
|
|
569
|
-
return {
|
|
570
|
-
overflow: jr$1[e]
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
function refineUnitOption(e, n, t = 9, o = 0, r) {
|
|
574
|
-
let i = n[e];
|
|
575
|
-
if (void 0 === i) {
|
|
576
|
-
return r ? o : void 0;
|
|
577
|
-
}
|
|
578
|
-
if (i = toString(i), "auto" === i) {
|
|
579
|
-
return r ? o : null;
|
|
580
|
-
}
|
|
581
|
-
let a = Oo[i];
|
|
582
|
-
if (void 0 === a && (a = mr[i]), void 0 === a) {
|
|
583
|
-
throw new RangeError(invalidChoice(e, i, Oo));
|
|
584
|
-
}
|
|
585
|
-
return clampEntity(e, a, o, t, 1, Bo), a;
|
|
586
|
-
}
|
|
587
|
-
function refineChoiceOption(e, n, t, o = 0) {
|
|
588
|
-
const r = t[e];
|
|
589
|
-
if (void 0 === r) {
|
|
590
|
-
return o;
|
|
591
|
-
}
|
|
592
|
-
const i = toString(r),
|
|
593
|
-
a = n[i];
|
|
594
|
-
if (void 0 === a) {
|
|
595
|
-
throw new RangeError(invalidChoice(e, i, n));
|
|
596
|
-
}
|
|
597
|
-
return a;
|
|
598
|
-
}
|
|
599
|
-
function checkLargestSmallestUnit(e, n) {
|
|
600
|
-
if (n > e) {
|
|
601
|
-
throw new RangeError(Eo);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
function xe(e) {
|
|
605
|
-
return {
|
|
606
|
-
branding: Re,
|
|
607
|
-
epochNanoseconds: e
|
|
608
|
-
};
|
|
609
|
-
}
|
|
610
|
-
function _e(e, n, t) {
|
|
611
|
-
return {
|
|
612
|
-
branding: z,
|
|
613
|
-
calendar: t,
|
|
614
|
-
timeZone: n,
|
|
615
|
-
epochNanoseconds: e
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
function jt(e, n = e.calendar) {
|
|
619
|
-
return {
|
|
620
|
-
branding: x,
|
|
621
|
-
calendar: n,
|
|
622
|
-
...nn(Nr, e)
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
function W(e, n = e.calendar) {
|
|
626
|
-
return {
|
|
627
|
-
branding: G,
|
|
628
|
-
calendar: n,
|
|
629
|
-
...nn(Ir, e)
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
function createPlainYearMonthSlots(e, n = e.calendar) {
|
|
633
|
-
return {
|
|
634
|
-
branding: Ut,
|
|
635
|
-
calendar: n,
|
|
636
|
-
...nn(Ir, e)
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
function createPlainMonthDaySlots(e, n = e.calendar) {
|
|
640
|
-
return {
|
|
641
|
-
branding: qt,
|
|
642
|
-
calendar: n,
|
|
643
|
-
...nn(Ir, e)
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
function St(e) {
|
|
647
|
-
return {
|
|
648
|
-
branding: ft,
|
|
649
|
-
...nn(Mr, e)
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
function Oe(e) {
|
|
653
|
-
return {
|
|
654
|
-
branding: N,
|
|
655
|
-
sign: computeDurationSign(e),
|
|
656
|
-
...nn(ur, e)
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
function I(e) {
|
|
660
|
-
return divModBigNano(e.epochNanoseconds, Qe)[0];
|
|
661
|
-
}
|
|
662
|
-
function v(e) {
|
|
663
|
-
return ((e, n = 1) => {
|
|
664
|
-
const [t, o] = e,
|
|
665
|
-
r = Math.floor(o / n),
|
|
666
|
-
i = Uo / n;
|
|
667
|
-
return BigInt(t) * BigInt(i) + BigInt(r);
|
|
668
|
-
})(e.epochNanoseconds);
|
|
669
|
-
}
|
|
670
|
-
function extractEpochNano(e) {
|
|
671
|
-
return e.epochNanoseconds;
|
|
672
|
-
}
|
|
673
|
-
function J(e, n, t, o, r) {
|
|
674
|
-
const i = getMaxDurationUnit(o),
|
|
675
|
-
[a, s] = ((e, n) => {
|
|
676
|
-
const t = n((e = normalizeOptionsOrString(e, Zr))[Ar]);
|
|
677
|
-
let o = Qr(e);
|
|
678
|
-
return o = requirePropDefined(Zr, o), [o, t];
|
|
679
|
-
})(r, e),
|
|
680
|
-
c = Math.max(a, i);
|
|
681
|
-
if (!s && isUniformUnit(c, s)) {
|
|
682
|
-
return totalDayTimeDuration(o, a);
|
|
683
|
-
}
|
|
684
|
-
if (!s) {
|
|
685
|
-
throw new RangeError(yo);
|
|
686
|
-
}
|
|
687
|
-
if (!o.sign) {
|
|
688
|
-
return 0;
|
|
689
|
-
}
|
|
690
|
-
const [u, f, l] = createMarkerSystem(n, t, s),
|
|
691
|
-
d = createMarkerToEpochNano(l),
|
|
692
|
-
m = createMoveMarker(l),
|
|
693
|
-
h = createDiffMarkers(l),
|
|
694
|
-
g = m(f, u, o);
|
|
695
|
-
isZonedEpochSlots(s) || (checkIsoDateTimeInBounds(u), checkIsoDateTimeInBounds(g));
|
|
696
|
-
const D = h(f, u, g, a);
|
|
697
|
-
return isUniformUnit(a, s) ? totalDayTimeDuration(D, a) : ((e, n, t, o, r, i, a) => {
|
|
698
|
-
const s = computeDurationSign(e),
|
|
699
|
-
[c, u] = clampRelativeDuration(o, gr(t, e), t, s, r, i, a),
|
|
700
|
-
f = computeEpochNanoFrac(n, c, u);
|
|
701
|
-
return e[p[t]] + f * s;
|
|
702
|
-
})(D, d(g), a, f, u, d, m);
|
|
703
|
-
}
|
|
704
|
-
function totalDayTimeDuration(e, n) {
|
|
705
|
-
return bigNanoToNumber(durationFieldsToBigNano(e), Ao[n], 1);
|
|
706
|
-
}
|
|
707
|
-
function clampRelativeDuration(e, n, t, o, r, i, a) {
|
|
708
|
-
const s = p[t],
|
|
709
|
-
c = {
|
|
710
|
-
...n,
|
|
711
|
-
[s]: n[s] + o
|
|
712
|
-
},
|
|
713
|
-
u = a(e, r, n),
|
|
714
|
-
f = a(e, r, c);
|
|
715
|
-
return [i(u), i(f)];
|
|
716
|
-
}
|
|
717
|
-
function computeEpochNanoFrac(e, n, t) {
|
|
718
|
-
const o = bigNanoToNumber(diffBigNanos(n, t));
|
|
719
|
-
if (!o) {
|
|
720
|
-
throw new RangeError(fo);
|
|
721
|
-
}
|
|
722
|
-
return bigNanoToNumber(diffBigNanos(n, e)) / o;
|
|
723
|
-
}
|
|
724
|
-
function Le(e, n) {
|
|
725
|
-
const [t, o, r] = refineRoundingOptions(n, 5, 1);
|
|
726
|
-
return xe(roundBigNano(e.epochNanoseconds, t, o, r, 1));
|
|
727
|
-
}
|
|
728
|
-
function Ie(e, n, t) {
|
|
729
|
-
let {
|
|
730
|
-
epochNanoseconds: o,
|
|
731
|
-
timeZone: r,
|
|
732
|
-
calendar: i
|
|
733
|
-
} = n;
|
|
734
|
-
const [a, s, c] = refineRoundingOptions(t);
|
|
735
|
-
if (0 === a && 1 === s) {
|
|
736
|
-
return n;
|
|
737
|
-
}
|
|
738
|
-
const u = e(r);
|
|
739
|
-
if (6 === a) {
|
|
740
|
-
o = ((e, n, t, o) => {
|
|
741
|
-
const r = he(t, n),
|
|
742
|
-
[i, a] = e(r),
|
|
743
|
-
s = t.epochNanoseconds,
|
|
744
|
-
c = getStartOfDayInstantFor(n, i),
|
|
745
|
-
u = getStartOfDayInstantFor(n, a);
|
|
746
|
-
if (bigNanoOutside(s, c, u)) {
|
|
747
|
-
throw new RangeError(fo);
|
|
748
|
-
}
|
|
749
|
-
return roundWithMode(computeEpochNanoFrac(s, c, u), o) ? u : c;
|
|
750
|
-
})(computeDayInterval, u, n, c);
|
|
751
|
-
} else {
|
|
752
|
-
const e = u.R(o);
|
|
753
|
-
o = getMatchingInstantFor(u, roundDateTime(epochNanoToIso(o, e), a, s, c), e, 2, 0, 1);
|
|
754
|
-
}
|
|
755
|
-
return _e(o, r, i);
|
|
756
|
-
}
|
|
757
|
-
function vt(e, n) {
|
|
758
|
-
return jt(roundDateTime(e, ...refineRoundingOptions(n)), e.calendar);
|
|
759
|
-
}
|
|
760
|
-
function lt(e, n) {
|
|
761
|
-
const [t, o, r] = refineRoundingOptions(n, 5);
|
|
762
|
-
var i;
|
|
763
|
-
return St((i = r, roundTimeToNano(e, computeNanoInc(t, o), i)[0]));
|
|
764
|
-
}
|
|
765
|
-
function Te(e, n) {
|
|
766
|
-
const t = e(n.timeZone),
|
|
767
|
-
o = he(n, t),
|
|
768
|
-
[r, i] = computeDayInterval(o),
|
|
769
|
-
a = bigNanoToNumber(diffBigNanos(getStartOfDayInstantFor(t, r), getStartOfDayInstantFor(t, i)), zo, 1);
|
|
770
|
-
if (a <= 0) {
|
|
771
|
-
throw new RangeError(fo);
|
|
772
|
-
}
|
|
773
|
-
return a;
|
|
774
|
-
}
|
|
775
|
-
function ve(e, n) {
|
|
776
|
-
const {
|
|
777
|
-
timeZone: t,
|
|
778
|
-
calendar: o
|
|
779
|
-
} = n,
|
|
780
|
-
r = ((e, n, t) => getStartOfDayInstantFor(n, e(he(t, n))))(computeDayFloor, e(t), n);
|
|
781
|
-
return _e(r, t, o);
|
|
782
|
-
}
|
|
783
|
-
function roundDateTime(e, n, t, o) {
|
|
784
|
-
return roundDateTimeToNano(e, computeNanoInc(n, t), o);
|
|
785
|
-
}
|
|
786
|
-
function roundDateTimeToNano(e, n, t) {
|
|
787
|
-
const [o, r] = roundTimeToNano(e, n, t);
|
|
788
|
-
return checkIsoDateTimeInBounds({
|
|
789
|
-
...moveByDays(e, r),
|
|
790
|
-
...o
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
function roundTimeToNano(e, n, t) {
|
|
794
|
-
return nanoToIsoTimeAndDay(roundByInc(isoTimeFieldsToNano(e), n, t));
|
|
795
|
-
}
|
|
796
|
-
function roundToMinute(e) {
|
|
797
|
-
return roundByInc(e, Zo, 7);
|
|
798
|
-
}
|
|
799
|
-
function computeNanoInc(e, n) {
|
|
800
|
-
return Ao[e] * n;
|
|
801
|
-
}
|
|
802
|
-
function computeDayInterval(e) {
|
|
803
|
-
const n = computeDayFloor(e);
|
|
804
|
-
return [n, moveByDays(n, 1)];
|
|
805
|
-
}
|
|
806
|
-
function computeDayFloor(e) {
|
|
807
|
-
return yr(6, e);
|
|
808
|
-
}
|
|
809
|
-
function roundDayTimeDurationByInc(e, n, t) {
|
|
810
|
-
const o = Math.min(getMaxDurationUnit(e), 6);
|
|
811
|
-
return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, o), n, t), o);
|
|
812
|
-
}
|
|
813
|
-
function roundRelativeDuration(e, n, t, o, r, i, a, s, c, u) {
|
|
814
|
-
if (0 === o && 1 === r) {
|
|
815
|
-
return e;
|
|
816
|
-
}
|
|
817
|
-
const f = isUniformUnit(o, s) ? isZonedEpochSlots(s) && o < 6 && t >= 6 ? nudgeZonedTimeDuration : nudgeDayTimeDuration : nudgeRelativeDuration;
|
|
818
|
-
let [l, d, m] = f(e, n, t, o, r, i, a, s, c, u);
|
|
819
|
-
return m && 7 !== o && (l = ((e, n, t, o, r, i, a, s) => {
|
|
820
|
-
const c = computeDurationSign(e);
|
|
821
|
-
for (let u = o + 1; u <= t; u++) {
|
|
822
|
-
if (7 === u && 7 !== t) {
|
|
823
|
-
continue;
|
|
824
|
-
}
|
|
825
|
-
const o = gr(u, e);
|
|
826
|
-
o[p[u]] += c;
|
|
827
|
-
const f = bigNanoToNumber(diffBigNanos(a(s(r, i, o)), n));
|
|
828
|
-
if (f && Math.sign(f) !== c) {
|
|
829
|
-
break;
|
|
830
|
-
}
|
|
831
|
-
e = o;
|
|
832
|
-
}
|
|
833
|
-
return e;
|
|
834
|
-
})(l, d, t, Math.max(6, o), a, s, c, u)), l;
|
|
835
|
-
}
|
|
836
|
-
function roundBigNano(e, n, t, o, r) {
|
|
837
|
-
if (6 === n) {
|
|
838
|
-
const n = (e => e[0] + e[1] / Uo)(e);
|
|
839
|
-
return [roundByInc(n, t, o), 0];
|
|
840
|
-
}
|
|
841
|
-
return roundBigNanoByInc(e, computeNanoInc(n, t), o, r);
|
|
842
|
-
}
|
|
843
|
-
function roundBigNanoByInc(e, n, t, o) {
|
|
844
|
-
let [r, i] = e;
|
|
845
|
-
o && i < 0 && (i += Uo, r -= 1);
|
|
846
|
-
const [a, s] = divModFloor(roundByInc(i, n, t), Uo);
|
|
847
|
-
return createBigNano(r + a, s);
|
|
848
|
-
}
|
|
849
|
-
function roundByInc(e, n, t) {
|
|
850
|
-
return roundWithMode(e / n, t) * n;
|
|
851
|
-
}
|
|
852
|
-
function roundWithMode(e, n) {
|
|
853
|
-
return ai[n](e);
|
|
854
|
-
}
|
|
855
|
-
function nudgeDayTimeDuration(e, n, t, o, r, i) {
|
|
856
|
-
const a = computeDurationSign(e),
|
|
857
|
-
s = durationFieldsToBigNano(e),
|
|
858
|
-
c = roundBigNano(s, o, r, i),
|
|
859
|
-
u = diffBigNanos(s, c),
|
|
860
|
-
f = Math.sign(c[0] - s[0]) === a,
|
|
861
|
-
l = nanoToDurationDayTimeFields(c, Math.min(t, 6));
|
|
862
|
-
return [{
|
|
863
|
-
...e,
|
|
864
|
-
...l
|
|
865
|
-
}, addBigNanos(n, u), f];
|
|
866
|
-
}
|
|
867
|
-
function nudgeZonedTimeDuration(e, n, t, o, r, i, a, s, c, u) {
|
|
868
|
-
const f = computeDurationSign(e) || 1,
|
|
869
|
-
l = bigNanoToNumber(durationFieldsToBigNano(e, 5)),
|
|
870
|
-
d = computeNanoInc(o, r);
|
|
871
|
-
let m = roundByInc(l, d, i);
|
|
872
|
-
const [p, h] = clampRelativeDuration(a, {
|
|
873
|
-
...e,
|
|
874
|
-
...hr
|
|
875
|
-
}, 6, f, s, c, u),
|
|
876
|
-
g = m - bigNanoToNumber(diffBigNanos(p, h));
|
|
877
|
-
let D = 0;
|
|
878
|
-
g && Math.sign(g) !== f ? n = moveBigNano(p, m) : (D += f, m = roundByInc(g, d, i), n = moveBigNano(h, m));
|
|
879
|
-
const T = nanoToDurationTimeFields(m);
|
|
880
|
-
return [{
|
|
881
|
-
...e,
|
|
882
|
-
...T,
|
|
883
|
-
days: e.days + D
|
|
884
|
-
}, n, Boolean(D)];
|
|
885
|
-
}
|
|
886
|
-
function nudgeRelativeDuration(e, n, t, o, r, i, a, s, c, u) {
|
|
887
|
-
const f = computeDurationSign(e),
|
|
888
|
-
l = p[o],
|
|
889
|
-
d = gr(o, e);
|
|
890
|
-
7 === o && (e = {
|
|
891
|
-
...e,
|
|
892
|
-
weeks: e.weeks + Math.trunc(e.days / 7)
|
|
893
|
-
});
|
|
894
|
-
const m = divTrunc(e[l], r) * r;
|
|
895
|
-
d[l] = m;
|
|
896
|
-
const [h, g] = clampRelativeDuration(a, d, o, r * f, s, c, u),
|
|
897
|
-
D = m + computeEpochNanoFrac(n, h, g) * f * r,
|
|
898
|
-
T = roundByInc(D, r, i),
|
|
899
|
-
I = Math.sign(T - D) === f;
|
|
900
|
-
return d[l] = T, [d, I ? g : h, I];
|
|
901
|
-
}
|
|
902
|
-
function ke(e, n, t, o) {
|
|
903
|
-
const [r, i, a, s] = (e => {
|
|
904
|
-
const n = refineTimeDisplayTuple(e = normalizeOptions(e));
|
|
905
|
-
return [e.timeZone, ...n];
|
|
906
|
-
})(o),
|
|
907
|
-
c = void 0 !== r;
|
|
908
|
-
return ((e, n, t, o, r, i) => {
|
|
909
|
-
t = roundBigNanoByInc(t, r, o, 1);
|
|
910
|
-
const a = n.R(t);
|
|
911
|
-
return formatIsoDateTimeFields(epochNanoToIso(t, a), i) + (e ? Se(roundToMinute(a)) : "Z");
|
|
912
|
-
})(c, n(c ? e(r) : si), t.epochNanoseconds, i, a, s);
|
|
913
|
-
}
|
|
914
|
-
function Fe(e, n, t) {
|
|
915
|
-
const [o, r, i, a, s, c] = (e => {
|
|
916
|
-
e = normalizeOptions(e);
|
|
917
|
-
const n = ti(e),
|
|
918
|
-
t = refineSubsecDigits(e),
|
|
919
|
-
o = ri(e),
|
|
920
|
-
r = ii(e, 4),
|
|
921
|
-
i = Jr(e, 4);
|
|
922
|
-
return [n, oi(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t)];
|
|
923
|
-
})(t);
|
|
924
|
-
return ((e, n, t, o, r, i, a, s, c, u) => {
|
|
925
|
-
o = roundBigNanoByInc(o, c, s, 1);
|
|
926
|
-
const f = e(t).R(o);
|
|
927
|
-
return formatIsoDateTimeFields(epochNanoToIso(o, f), u) + Se(roundToMinute(f), a) + ((e, n) => 1 !== n ? "[" + (2 === n ? "!" : "") + e + "]" : "")(t, i) + formatCalendar(n, r);
|
|
928
|
-
})(e, n.calendar, n.timeZone, n.epochNanoseconds, o, r, i, a, s, c);
|
|
929
|
-
}
|
|
930
|
-
function Ft(e, n) {
|
|
931
|
-
const [t, o, r, i] = (e => (e = normalizeOptions(e), [ti(e), ...refineTimeDisplayTuple(e)]))(n);
|
|
932
|
-
return a = e.calendar, s = t, c = i, formatIsoDateTimeFields(roundDateTimeToNano(e, r, o), c) + formatCalendar(a, s);
|
|
933
|
-
var a, s, c;
|
|
934
|
-
}
|
|
935
|
-
function ce(e, n) {
|
|
936
|
-
return t = e.calendar, o = e, r = refineDateDisplayOptions(n), formatIsoDateFields(o) + formatCalendar(t, r);
|
|
937
|
-
var t, o, r;
|
|
938
|
-
}
|
|
939
|
-
function Kt(e, n) {
|
|
940
|
-
return formatDateLikeIso(e.calendar, formatIsoYearMonthFields, e, refineDateDisplayOptions(n));
|
|
941
|
-
}
|
|
942
|
-
function Jt(e, n) {
|
|
943
|
-
return formatDateLikeIso(e.calendar, formatIsoMonthDayFields, e, refineDateDisplayOptions(n));
|
|
944
|
-
}
|
|
945
|
-
function ct(e, n) {
|
|
946
|
-
const [t, o, r] = refineTimeDisplayOptions(n);
|
|
947
|
-
return i = r, formatIsoTimeFields(roundTimeToNano(e, o, t)[0], i);
|
|
948
|
-
var i;
|
|
949
|
-
}
|
|
950
|
-
function k(e, n) {
|
|
951
|
-
const [t, o, r] = refineTimeDisplayOptions(n, 3);
|
|
952
|
-
return o > 1 && checkDurationUnits(e = {
|
|
953
|
-
...e,
|
|
954
|
-
...roundDayTimeDurationByInc(e, o, t)
|
|
955
|
-
}), ((e, n) => {
|
|
956
|
-
const {
|
|
957
|
-
sign: t
|
|
958
|
-
} = e,
|
|
959
|
-
o = -1 === t ? negateDurationFields(e) : e,
|
|
960
|
-
{
|
|
961
|
-
hours: r,
|
|
962
|
-
minutes: i
|
|
963
|
-
} = o,
|
|
964
|
-
[a, s] = divModBigNano(durationFieldsToBigNano(o, 3), Ro, divModTrunc);
|
|
965
|
-
checkDurationTimeUnit(a);
|
|
966
|
-
const c = formatSubsecNano(s, n),
|
|
967
|
-
u = n >= 0 || !t || c;
|
|
968
|
-
return (t < 0 ? "-" : "") + "P" + formatDurationFragments({
|
|
969
|
-
Y: formatDurationNumber(o.years),
|
|
970
|
-
M: formatDurationNumber(o.months),
|
|
971
|
-
W: formatDurationNumber(o.weeks),
|
|
972
|
-
D: formatDurationNumber(o.days)
|
|
973
|
-
}) + (r || i || a || u ? "T" + formatDurationFragments({
|
|
974
|
-
H: formatDurationNumber(r),
|
|
975
|
-
M: formatDurationNumber(i),
|
|
976
|
-
S: formatDurationNumber(a, u) + c
|
|
977
|
-
}) : "");
|
|
978
|
-
})(e, r);
|
|
979
|
-
}
|
|
980
|
-
function formatDateLikeIso(e, n, t, o) {
|
|
981
|
-
const r = o > 1 || 0 === o && e !== l;
|
|
982
|
-
return 1 === o ? e === l ? n(t) : formatIsoDateFields(t) : r ? formatIsoDateFields(t) + formatCalendarId(e, 2 === o) : n(t);
|
|
983
|
-
}
|
|
984
|
-
function formatDurationFragments(e) {
|
|
985
|
-
const n = [];
|
|
986
|
-
for (const t in e) {
|
|
987
|
-
const o = e[t];
|
|
988
|
-
o && n.push(o, t);
|
|
989
|
-
}
|
|
990
|
-
return n.join("");
|
|
991
|
-
}
|
|
992
|
-
function formatIsoDateTimeFields(e, n) {
|
|
993
|
-
return formatIsoDateFields(e) + "T" + formatIsoTimeFields(e, n);
|
|
994
|
-
}
|
|
995
|
-
function formatIsoDateFields(e) {
|
|
996
|
-
return formatIsoYearMonthFields(e) + "-" + bo(e.isoDay);
|
|
997
|
-
}
|
|
998
|
-
function formatIsoYearMonthFields(e) {
|
|
999
|
-
const {
|
|
1000
|
-
isoYear: n
|
|
1001
|
-
} = e;
|
|
1002
|
-
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" + bo(e.isoMonth);
|
|
1003
|
-
}
|
|
1004
|
-
function formatIsoMonthDayFields(e) {
|
|
1005
|
-
return bo(e.isoMonth) + "-" + bo(e.isoDay);
|
|
1006
|
-
}
|
|
1007
|
-
function formatIsoTimeFields(e, n) {
|
|
1008
|
-
const t = [bo(e.isoHour), bo(e.isoMinute)];
|
|
1009
|
-
return -1 !== n && t.push(bo(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * Qe + n * Yo + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)), t.join(":");
|
|
1010
|
-
}
|
|
1011
|
-
function Se(e, n = 0) {
|
|
1012
|
-
if (1 === n) {
|
|
1013
|
-
return "";
|
|
1014
|
-
}
|
|
1015
|
-
const [t, o] = divModFloor(Math.abs(e), zo),
|
|
1016
|
-
[r, i] = divModFloor(o, Zo),
|
|
1017
|
-
[a, s] = divModFloor(i, Ro);
|
|
1018
|
-
return getSignStr(e) + bo(t) + ":" + bo(r) + (a || s ? ":" + bo(a) + formatSubsecNano(s) : "");
|
|
1019
|
-
}
|
|
1020
|
-
function formatCalendar(e, n) {
|
|
1021
|
-
return 1 !== n && (n > 1 || 0 === n && e !== l) ? formatCalendarId(e, 2 === n) : "";
|
|
1022
|
-
}
|
|
1023
|
-
function formatCalendarId(e, n) {
|
|
1024
|
-
return "[" + (n ? "!" : "") + "u-ca=" + e + "]";
|
|
1025
|
-
}
|
|
1026
|
-
function formatSubsecNano(e, n) {
|
|
1027
|
-
let t = padNumber(9, e);
|
|
1028
|
-
return t = void 0 === n ? t.replace(li, "") : t.slice(0, n), t ? "." + t : "";
|
|
1029
|
-
}
|
|
1030
|
-
function getSignStr(e) {
|
|
1031
|
-
return e < 0 ? "-" : "+";
|
|
1032
|
-
}
|
|
1033
|
-
function formatDurationNumber(e, n) {
|
|
1034
|
-
return e || n ? e.toLocaleString("fullwide", {
|
|
1035
|
-
useGrouping: 0
|
|
1036
|
-
}) : "";
|
|
1037
|
-
}
|
|
1038
|
-
function _zonedEpochSlotsToIso(e, n) {
|
|
1039
|
-
const {
|
|
1040
|
-
epochNanoseconds: t
|
|
1041
|
-
} = e,
|
|
1042
|
-
o = (n.R ? n : n(e.timeZone)).R(t),
|
|
1043
|
-
r = epochNanoToIso(t, o);
|
|
1044
|
-
return {
|
|
1045
|
-
calendar: e.calendar,
|
|
1046
|
-
...r,
|
|
1047
|
-
offsetNanoseconds: o
|
|
1048
|
-
};
|
|
1049
|
-
}
|
|
1050
|
-
function getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {
|
|
1051
|
-
if (void 0 !== t && 1 === o && (1 === o || a)) {
|
|
1052
|
-
return isoToEpochNanoWithOffset(n, t);
|
|
1053
|
-
}
|
|
1054
|
-
const s = e.I(n);
|
|
1055
|
-
if (void 0 !== t && 3 !== o) {
|
|
1056
|
-
const e = ((e, n, t, o) => {
|
|
1057
|
-
const r = isoToEpochNano(n);
|
|
1058
|
-
o && (t = roundToMinute(t));
|
|
1059
|
-
for (const n of e) {
|
|
1060
|
-
let e = bigNanoToNumber(diffBigNanos(n, r));
|
|
1061
|
-
if (o && (e = roundToMinute(e)), e === t) {
|
|
1062
|
-
return n;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
})(s, n, t, i);
|
|
1066
|
-
if (void 0 !== e) {
|
|
1067
|
-
return e;
|
|
1068
|
-
}
|
|
1069
|
-
if (0 === o) {
|
|
1070
|
-
throw new RangeError(Do);
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
return a ? isoToEpochNano(n) : getSingleInstantFor(e, n, r, s);
|
|
1074
|
-
}
|
|
1075
|
-
function getSingleInstantFor(e, n, t = 0, o = e.I(n)) {
|
|
1076
|
-
if (1 === o.length) {
|
|
1077
|
-
return o[0];
|
|
1078
|
-
}
|
|
1079
|
-
if (1 === t) {
|
|
1080
|
-
throw new RangeError(To);
|
|
1081
|
-
}
|
|
1082
|
-
if (o.length) {
|
|
1083
|
-
return o[3 === t ? 1 : 0];
|
|
1084
|
-
}
|
|
1085
|
-
const r = isoToEpochNano(n),
|
|
1086
|
-
i = ((e, n) => {
|
|
1087
|
-
const t = e.R(moveBigNano(n, -Uo));
|
|
1088
|
-
return (e => {
|
|
1089
|
-
if (e > Uo) {
|
|
1090
|
-
throw new RangeError(go);
|
|
1091
|
-
}
|
|
1092
|
-
return e;
|
|
1093
|
-
})(e.R(moveBigNano(n, Uo)) - t);
|
|
1094
|
-
})(e, r),
|
|
1095
|
-
a = i * (2 === t ? -1 : 1);
|
|
1096
|
-
return (o = e.I(epochNanoToIso(r, a)))[2 === t ? 0 : o.length - 1];
|
|
1097
|
-
}
|
|
1098
|
-
function getStartOfDayInstantFor(e, n) {
|
|
1099
|
-
const t = e.I(n);
|
|
1100
|
-
if (t.length) {
|
|
1101
|
-
return t[0];
|
|
1102
|
-
}
|
|
1103
|
-
const o = moveBigNano(isoToEpochNano(n), -Uo);
|
|
1104
|
-
return e.O(o, 1);
|
|
1105
|
-
}
|
|
1106
|
-
function Ye(e, n, t) {
|
|
1107
|
-
return xe(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {
|
|
1108
|
-
if (durationHasDateParts(e)) {
|
|
1109
|
-
throw new RangeError(vo);
|
|
1110
|
-
}
|
|
1111
|
-
return durationFieldsToBigNano(e, 5);
|
|
1112
|
-
})(e ? negateDurationFields(t) : t))));
|
|
1113
|
-
}
|
|
1114
|
-
function pe(e, n, t, o, r, i = Object.create(null)) {
|
|
1115
|
-
const a = n(o.timeZone),
|
|
1116
|
-
s = e(o.calendar);
|
|
1117
|
-
return {
|
|
1118
|
-
...o,
|
|
1119
|
-
...moveZonedEpochs(a, s, o, t ? negateDurationFields(r) : r, i)
|
|
1120
|
-
};
|
|
1121
|
-
}
|
|
1122
|
-
function wt(e, n, t, o, r = Object.create(null)) {
|
|
1123
|
-
const {
|
|
1124
|
-
calendar: i
|
|
1125
|
-
} = t;
|
|
1126
|
-
return jt(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
1127
|
-
}
|
|
1128
|
-
function ne(e, n, t, o, r) {
|
|
1129
|
-
const {
|
|
1130
|
-
calendar: i
|
|
1131
|
-
} = t;
|
|
1132
|
-
return W(moveDate(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
1133
|
-
}
|
|
1134
|
-
function Gt(e, n, t, o, r) {
|
|
1135
|
-
const i = t.calendar,
|
|
1136
|
-
a = e(i);
|
|
1137
|
-
let s = checkIsoDateInBounds(moveToDayOfMonthUnsafe(a, t));
|
|
1138
|
-
n && (o = B(o)), o.sign < 0 && (s = a.P(s, {
|
|
1139
|
-
...pr,
|
|
1140
|
-
months: 1
|
|
1141
|
-
}), s = moveByDays(s, -1));
|
|
1142
|
-
const c = a.P(s, o, r);
|
|
1143
|
-
return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(a, c), i);
|
|
1144
|
-
}
|
|
1145
|
-
function at(e, n, t) {
|
|
1146
|
-
return St(moveTime(n, e ? negateDurationFields(t) : t)[0]);
|
|
1147
|
-
}
|
|
1148
|
-
function moveZonedEpochs(e, n, t, o, r) {
|
|
1149
|
-
const i = durationFieldsToBigNano(o, 5);
|
|
1150
|
-
let a = t.epochNanoseconds;
|
|
1151
|
-
if (durationHasDateParts(o)) {
|
|
1152
|
-
const s = he(t, e);
|
|
1153
|
-
a = addBigNanos(getSingleInstantFor(e, {
|
|
1154
|
-
...moveDate(n, s, {
|
|
1155
|
-
...o,
|
|
1156
|
-
...hr
|
|
1157
|
-
}, r),
|
|
1158
|
-
...nn(w, s)
|
|
1159
|
-
}), i);
|
|
1160
|
-
} else {
|
|
1161
|
-
a = addBigNanos(a, i), mt(r);
|
|
1162
|
-
}
|
|
1163
|
-
return {
|
|
1164
|
-
epochNanoseconds: checkEpochNanoInBounds(a)
|
|
1165
|
-
};
|
|
1166
|
-
}
|
|
1167
|
-
function moveDateTime(e, n, t, o) {
|
|
1168
|
-
const [r, i] = moveTime(n, t);
|
|
1169
|
-
return checkIsoDateTimeInBounds({
|
|
1170
|
-
...moveDate(e, n, {
|
|
1171
|
-
...t,
|
|
1172
|
-
...hr,
|
|
1173
|
-
days: t.days + i
|
|
1174
|
-
}, o),
|
|
1175
|
-
...r
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
function moveDate(e, n, t, o) {
|
|
1179
|
-
if (t.years || t.months || t.weeks) {
|
|
1180
|
-
return e.P(n, t, o);
|
|
1181
|
-
}
|
|
1182
|
-
mt(o);
|
|
1183
|
-
const r = t.days + durationFieldsToBigNano(t, 5)[0];
|
|
1184
|
-
return r ? checkIsoDateInBounds(moveByDays(n, r)) : n;
|
|
1185
|
-
}
|
|
1186
|
-
function moveToDayOfMonthUnsafe(e, n, t = 1) {
|
|
1187
|
-
return moveByDays(n, t - e.day(n));
|
|
1188
|
-
}
|
|
1189
|
-
function moveTime(e, n) {
|
|
1190
|
-
const [t, o] = durationFieldsToBigNano(n, 5),
|
|
1191
|
-
[r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);
|
|
1192
|
-
return [r, t + i];
|
|
1193
|
-
}
|
|
1194
|
-
function moveByDays(e, n) {
|
|
1195
|
-
return n ? {
|
|
1196
|
-
...e,
|
|
1197
|
-
...epochMilliToIso(isoToEpochMilli(e) + n * ko)
|
|
1198
|
-
} : e;
|
|
1199
|
-
}
|
|
1200
|
-
function createMarkerSystem(e, n, t) {
|
|
1201
|
-
const o = e(t.calendar);
|
|
1202
|
-
return isZonedEpochSlots(t) ? [t, o, n(t.timeZone)] : [{
|
|
1203
|
-
...t,
|
|
1204
|
-
...Nt
|
|
1205
|
-
}, o];
|
|
1206
|
-
}
|
|
1207
|
-
function createMarkerToEpochNano(e) {
|
|
1208
|
-
return e ? extractEpochNano : isoToEpochNano;
|
|
1209
|
-
}
|
|
1210
|
-
function createMoveMarker(e) {
|
|
1211
|
-
return e ? Pt(moveZonedEpochs, e) : moveDateTime;
|
|
1212
|
-
}
|
|
1213
|
-
function createDiffMarkers(e) {
|
|
1214
|
-
return e ? Pt(diffZonedEpochsExact, e) : diffDateTimesExact;
|
|
1215
|
-
}
|
|
1216
|
-
function isZonedEpochSlots(e) {
|
|
1217
|
-
return e && e.epochNanoseconds;
|
|
1218
|
-
}
|
|
1219
|
-
function isUniformUnit(e, n) {
|
|
1220
|
-
return e <= 6 - (isZonedEpochSlots(n) ? 1 : 0);
|
|
1221
|
-
}
|
|
1222
|
-
function E(e, n, t, o, r, i, a) {
|
|
1223
|
-
const s = e(normalizeOptions(a).relativeTo),
|
|
1224
|
-
c = Math.max(getMaxDurationUnit(r), getMaxDurationUnit(i));
|
|
1225
|
-
if (isUniformUnit(c, s)) {
|
|
1226
|
-
return Oe(checkDurationUnits(((e, n, t, o) => {
|
|
1227
|
-
const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);
|
|
1228
|
-
if (!Number.isFinite(r[0])) {
|
|
1229
|
-
throw new RangeError(Io);
|
|
1230
|
-
}
|
|
1231
|
-
return {
|
|
1232
|
-
...pr,
|
|
1233
|
-
...nanoToDurationDayTimeFields(r, t)
|
|
1234
|
-
};
|
|
1235
|
-
})(r, i, c, o)));
|
|
1236
|
-
}
|
|
1237
|
-
if (!s) {
|
|
1238
|
-
throw new RangeError(yo);
|
|
1239
|
-
}
|
|
1240
|
-
o && (i = negateDurationFields(i));
|
|
1241
|
-
const [u, f, l] = createMarkerSystem(n, t, s),
|
|
1242
|
-
d = createMoveMarker(l),
|
|
1243
|
-
m = createDiffMarkers(l),
|
|
1244
|
-
p = d(f, u, r);
|
|
1245
|
-
return Oe(m(f, u, d(f, p, i), c));
|
|
1246
|
-
}
|
|
1247
|
-
function V(e, n, t, o, r) {
|
|
1248
|
-
const i = getMaxDurationUnit(o),
|
|
1249
|
-
[a, s, c, u, f] = ((e, n, t) => {
|
|
1250
|
-
e = normalizeOptionsOrString(e, Rr);
|
|
1251
|
-
let o = Kr(e);
|
|
1252
|
-
const r = t(e[Ar]);
|
|
1253
|
-
let i = parseRoundingIncInteger(e);
|
|
1254
|
-
const a = ii(e, 7);
|
|
1255
|
-
let s = Jr(e);
|
|
1256
|
-
if (void 0 === o && void 0 === s) {
|
|
1257
|
-
throw new RangeError(Po);
|
|
1258
|
-
}
|
|
1259
|
-
if (null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s), i = refineRoundingInc(i, s, 1), i > 1 && s > 5 && o !== s) {
|
|
1260
|
-
throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");
|
|
1261
|
-
}
|
|
1262
|
-
return [o, s, i, a, r];
|
|
1263
|
-
})(r, i, e),
|
|
1264
|
-
l = Math.max(i, a);
|
|
1265
|
-
if (!f && l <= 6) {
|
|
1266
|
-
return Oe(checkDurationUnits(((e, n, t, o, r) => {
|
|
1267
|
-
const i = roundBigNano(durationFieldsToBigNano(e), t, o, r);
|
|
1268
|
-
return {
|
|
1269
|
-
...pr,
|
|
1270
|
-
...nanoToDurationDayTimeFields(i, n)
|
|
1271
|
-
};
|
|
1272
|
-
})(o, a, s, c, u)));
|
|
1273
|
-
}
|
|
1274
|
-
if (!isZonedEpochSlots(f) && !o.sign) {
|
|
1275
|
-
return o;
|
|
1276
|
-
}
|
|
1277
|
-
if (!f) {
|
|
1278
|
-
throw new RangeError(yo);
|
|
1279
|
-
}
|
|
1280
|
-
const [d, m, p] = createMarkerSystem(n, t, f),
|
|
1281
|
-
h = createMarkerToEpochNano(p),
|
|
1282
|
-
g = createMoveMarker(p),
|
|
1283
|
-
D = createDiffMarkers(p),
|
|
1284
|
-
T = g(m, d, o);
|
|
1285
|
-
isZonedEpochSlots(f) || (checkIsoDateTimeInBounds(d), checkIsoDateTimeInBounds(T));
|
|
1286
|
-
let I = D(m, d, T, a);
|
|
1287
|
-
const M = o.sign,
|
|
1288
|
-
N = computeDurationSign(I);
|
|
1289
|
-
if (M && N && M !== N) {
|
|
1290
|
-
throw new RangeError(fo);
|
|
1291
|
-
}
|
|
1292
|
-
return I = roundRelativeDuration(I, h(T), a, s, c, u, m, d, h, g), Oe(I);
|
|
1293
|
-
}
|
|
1294
|
-
function Y(e) {
|
|
1295
|
-
return -1 === e.sign ? B(e) : e;
|
|
1296
|
-
}
|
|
1297
|
-
function B(e) {
|
|
1298
|
-
return Oe(negateDurationFields(e));
|
|
1299
|
-
}
|
|
1300
|
-
function negateDurationFields(e) {
|
|
1301
|
-
const n = {};
|
|
1302
|
-
for (const t of p) {
|
|
1303
|
-
n[t] = -1 * e[t] || 0;
|
|
1304
|
-
}
|
|
1305
|
-
return n;
|
|
1306
|
-
}
|
|
1307
|
-
function y(e) {
|
|
1308
|
-
return !e.sign;
|
|
1309
|
-
}
|
|
1310
|
-
function computeDurationSign(e, n = p) {
|
|
1311
|
-
let t = 0;
|
|
1312
|
-
for (const o of n) {
|
|
1313
|
-
const n = Math.sign(e[o]);
|
|
1314
|
-
if (n) {
|
|
1315
|
-
if (t && t !== n) {
|
|
1316
|
-
throw new RangeError(No);
|
|
1317
|
-
}
|
|
1318
|
-
t = n;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
return t;
|
|
1322
|
-
}
|
|
1323
|
-
function checkDurationUnits(e) {
|
|
1324
|
-
for (const n of dr) {
|
|
1325
|
-
clampEntity(n, e[n], -di, di, 1);
|
|
1326
|
-
}
|
|
1327
|
-
return checkDurationTimeUnit(bigNanoToNumber(durationFieldsToBigNano(e), Ro)), e;
|
|
1328
|
-
}
|
|
1329
|
-
function checkDurationTimeUnit(e) {
|
|
1330
|
-
if (!Number.isSafeInteger(e)) {
|
|
1331
|
-
throw new RangeError(Mo);
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
function durationFieldsToBigNano(e, n = 6) {
|
|
1335
|
-
return givenFieldsToBigNano(e, n, p);
|
|
1336
|
-
}
|
|
1337
|
-
function nanoToDurationDayTimeFields(e, n = 6) {
|
|
1338
|
-
const [t, o] = e,
|
|
1339
|
-
r = nanoToGivenFields(o, n, p);
|
|
1340
|
-
if (r[p[n]] += t * (Uo / Ao[n]), !Number.isFinite(r[p[n]])) {
|
|
1341
|
-
throw new RangeError(Io);
|
|
1342
|
-
}
|
|
1343
|
-
return r;
|
|
1344
|
-
}
|
|
1345
|
-
function nanoToDurationTimeFields(e, n = 5) {
|
|
1346
|
-
return nanoToGivenFields(e, n, p);
|
|
1347
|
-
}
|
|
1348
|
-
function durationHasDateParts(e) {
|
|
1349
|
-
return Boolean(computeDurationSign(e, lr));
|
|
1350
|
-
}
|
|
1351
|
-
function getMaxDurationUnit(e) {
|
|
1352
|
-
let n = 9;
|
|
1353
|
-
for (; n > 0 && !e[p[n]]; n--) {}
|
|
1354
|
-
return n;
|
|
1355
|
-
}
|
|
1356
|
-
function createSplitTuple(e, n) {
|
|
1357
|
-
return [e, n];
|
|
1358
|
-
}
|
|
1359
|
-
function computePeriod(e) {
|
|
1360
|
-
const n = Math.floor(e / ci) * ci;
|
|
1361
|
-
return [n, n + ci];
|
|
1362
|
-
}
|
|
1363
|
-
function We(e) {
|
|
1364
|
-
const n = parseDateTimeLike(e = toStringViaPrimitive(e));
|
|
1365
|
-
if (!n) {
|
|
1366
|
-
throw new RangeError(failedParse(e));
|
|
1367
|
-
}
|
|
1368
|
-
let t;
|
|
1369
|
-
if (n.j) {
|
|
1370
|
-
t = 0;
|
|
1371
|
-
} else {
|
|
1372
|
-
if (!n.offset) {
|
|
1373
|
-
throw new RangeError(failedParse(e));
|
|
1374
|
-
}
|
|
1375
|
-
t = parseOffsetNano(n.offset);
|
|
1376
|
-
}
|
|
1377
|
-
return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), xe(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));
|
|
1378
|
-
}
|
|
1379
|
-
function H(e) {
|
|
1380
|
-
const n = parseDateTimeLike(m(e));
|
|
1381
|
-
if (!n) {
|
|
1382
|
-
throw new RangeError(failedParse(e));
|
|
1383
|
-
}
|
|
1384
|
-
if (n.timeZone) {
|
|
1385
|
-
return finalizeZonedDateTime(n, n.offset ? parseOffsetNano(n.offset) : void 0);
|
|
1386
|
-
}
|
|
1387
|
-
if (n.j) {
|
|
1388
|
-
throw new RangeError(failedParse(e));
|
|
1389
|
-
}
|
|
1390
|
-
return finalizeDate(n);
|
|
1391
|
-
}
|
|
1392
|
-
function Ae(e, n) {
|
|
1393
|
-
const t = parseDateTimeLike(m(e));
|
|
1394
|
-
if (!t || !t.timeZone) {
|
|
1395
|
-
throw new RangeError(failedParse(e));
|
|
1396
|
-
}
|
|
1397
|
-
const {
|
|
1398
|
-
offset: o
|
|
1399
|
-
} = t,
|
|
1400
|
-
r = o ? parseOffsetNano(o) : void 0,
|
|
1401
|
-
[, i, a] = je(n);
|
|
1402
|
-
return finalizeZonedDateTime(t, r, i, a);
|
|
1403
|
-
}
|
|
1404
|
-
function parseOffsetNano(e) {
|
|
1405
|
-
const n = parseOffsetNanoMaybe(e);
|
|
1406
|
-
if (void 0 === n) {
|
|
1407
|
-
throw new RangeError(failedParse(e));
|
|
1408
|
-
}
|
|
1409
|
-
return n;
|
|
1410
|
-
}
|
|
1411
|
-
function Bt(e) {
|
|
1412
|
-
const n = parseDateTimeLike(m(e));
|
|
1413
|
-
if (!n || n.j) {
|
|
1414
|
-
throw new RangeError(failedParse(e));
|
|
1415
|
-
}
|
|
1416
|
-
return jt(finalizeDateTime(n));
|
|
1417
|
-
}
|
|
1418
|
-
function de(e, n, t) {
|
|
1419
|
-
let o = parseDateTimeLike(m(e));
|
|
1420
|
-
if (!o || o.j) {
|
|
1421
|
-
throw new RangeError(failedParse(e));
|
|
1422
|
-
}
|
|
1423
|
-
return n ? o.calendar === l && (o = -271821 === o.isoYear && 4 === o.isoMonth ? {
|
|
1424
|
-
...o,
|
|
1425
|
-
isoDay: 20,
|
|
1426
|
-
...Nt
|
|
1427
|
-
} : {
|
|
1428
|
-
...o,
|
|
1429
|
-
isoDay: 1,
|
|
1430
|
-
...Nt
|
|
1431
|
-
}) : t && o.calendar === l && (o = {
|
|
1432
|
-
...o,
|
|
1433
|
-
isoYear: Br
|
|
1434
|
-
}), W(o.C ? finalizeDateTime(o) : finalizeDate(o));
|
|
1435
|
-
}
|
|
1436
|
-
function _t(e, n) {
|
|
1437
|
-
const t = parseYearMonthOnly(m(n));
|
|
1438
|
-
if (t) {
|
|
1439
|
-
return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));
|
|
1440
|
-
}
|
|
1441
|
-
const o = de(n, 1);
|
|
1442
|
-
return createPlainYearMonthSlots(moveToDayOfMonthUnsafe(e(o.calendar), o));
|
|
1443
|
-
}
|
|
1444
|
-
function requireIsoCalendar(e) {
|
|
1445
|
-
if (e.calendar !== l) {
|
|
1446
|
-
throw new RangeError(invalidSubstring(e.calendar));
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
function xt(e, n) {
|
|
1450
|
-
const t = parseMonthDayOnly(m(n));
|
|
1451
|
-
if (t) {
|
|
1452
|
-
return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));
|
|
1453
|
-
}
|
|
1454
|
-
const o = de(n, 0, 1),
|
|
1455
|
-
{
|
|
1456
|
-
calendar: r
|
|
1457
|
-
} = o,
|
|
1458
|
-
i = e(r),
|
|
1459
|
-
[a, s, c] = i.v(o),
|
|
1460
|
-
[u, f] = i.q(a, s),
|
|
1461
|
-
[l, d] = i.G(u, f, c);
|
|
1462
|
-
return createPlainMonthDaySlots(checkIsoDateInBounds(i.V(l, d, c)), r);
|
|
1463
|
-
}
|
|
1464
|
-
function ht(e) {
|
|
1465
|
-
let n,
|
|
1466
|
-
t = (e => {
|
|
1467
|
-
const n = Pi.exec(e);
|
|
1468
|
-
return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;
|
|
1469
|
-
})(m(e));
|
|
1470
|
-
if (!t) {
|
|
1471
|
-
if (t = parseDateTimeLike(e), !t) {
|
|
1472
|
-
throw new RangeError(failedParse(e));
|
|
1473
|
-
}
|
|
1474
|
-
if (!t.C) {
|
|
1475
|
-
throw new RangeError(failedParse(e));
|
|
1476
|
-
}
|
|
1477
|
-
if (t.j) {
|
|
1478
|
-
throw new RangeError(invalidSubstring("Z"));
|
|
1479
|
-
}
|
|
1480
|
-
requireIsoCalendar(t);
|
|
1481
|
-
}
|
|
1482
|
-
if ((n = parseYearMonthOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
1483
|
-
throw new RangeError(failedParse(e));
|
|
1484
|
-
}
|
|
1485
|
-
if ((n = parseMonthDayOnly(e)) && isIsoDateFieldsValid(n)) {
|
|
1486
|
-
throw new RangeError(failedParse(e));
|
|
1487
|
-
}
|
|
1488
|
-
return St(constrainIsoTimeFields(t, 1));
|
|
1489
|
-
}
|
|
1490
|
-
function R(e) {
|
|
1491
|
-
const n = (e => {
|
|
1492
|
-
const n = Fi.exec(e);
|
|
1493
|
-
return n ? (e => {
|
|
1494
|
-
function parseUnit(e, r, i) {
|
|
1495
|
-
let a = 0,
|
|
1496
|
-
s = 0;
|
|
1497
|
-
if (i && ([a, o] = divModFloor(o, Ao[i])), void 0 !== e) {
|
|
1498
|
-
if (t) {
|
|
1499
|
-
throw new RangeError(invalidSubstring(e));
|
|
1500
|
-
}
|
|
1501
|
-
s = (e => {
|
|
1502
|
-
const n = parseInt(e);
|
|
1503
|
-
if (!Number.isFinite(n)) {
|
|
1504
|
-
throw new RangeError(invalidSubstring(e));
|
|
1505
|
-
}
|
|
1506
|
-
return n;
|
|
1507
|
-
})(e), n = 1, r && (o = parseSubsecNano(r) * (Ao[i] / Ro), t = 1);
|
|
1508
|
-
}
|
|
1509
|
-
return a + s;
|
|
1510
|
-
}
|
|
1511
|
-
let n = 0,
|
|
1512
|
-
t = 0,
|
|
1513
|
-
o = 0,
|
|
1514
|
-
r = {
|
|
1515
|
-
...zipProps(p, [parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3)]),
|
|
1516
|
-
...nanoToGivenFields(o, 2, p)
|
|
1517
|
-
};
|
|
1518
|
-
if (!n) {
|
|
1519
|
-
throw new RangeError(noValidFields(p));
|
|
1520
|
-
}
|
|
1521
|
-
return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;
|
|
1522
|
-
})(n) : void 0;
|
|
1523
|
-
})(m(e));
|
|
1524
|
-
if (!n) {
|
|
1525
|
-
throw new RangeError(failedParse(e));
|
|
1526
|
-
}
|
|
1527
|
-
return Oe(checkDurationUnits(n));
|
|
1528
|
-
}
|
|
1529
|
-
function f(e) {
|
|
1530
|
-
const n = parseDateTimeLike(e) || parseYearMonthOnly(e) || parseMonthDayOnly(e);
|
|
1531
|
-
return n ? n.calendar : e;
|
|
1532
|
-
}
|
|
1533
|
-
function Z(e) {
|
|
1534
|
-
const n = parseDateTimeLike(e);
|
|
1535
|
-
return n && (n.timeZone || n.j && si || n.offset) || e;
|
|
1536
|
-
}
|
|
1537
|
-
function finalizeZonedDateTime(e, n, t = 0, o = 0) {
|
|
1538
|
-
const r = M(e.timeZone),
|
|
1539
|
-
i = L(r);
|
|
1540
|
-
let a;
|
|
1541
|
-
return checkIsoDateTimeFields(e), a = e.C ? getMatchingInstantFor(i, e, n, t, o, !i.$, e.j) : getStartOfDayInstantFor(i, e), _e(a, r, u(e.calendar));
|
|
1542
|
-
}
|
|
1543
|
-
function finalizeDateTime(e) {
|
|
1544
|
-
return resolveSlotsCalendar(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e)));
|
|
1545
|
-
}
|
|
1546
|
-
function finalizeDate(e) {
|
|
1547
|
-
return resolveSlotsCalendar(checkIsoDateInBounds(checkIsoDateFields(e)));
|
|
1548
|
-
}
|
|
1549
|
-
function resolveSlotsCalendar(e) {
|
|
1550
|
-
return {
|
|
1551
|
-
...e,
|
|
1552
|
-
calendar: u(e.calendar)
|
|
1553
|
-
};
|
|
1554
|
-
}
|
|
1555
|
-
function parseDateTimeLike(e) {
|
|
1556
|
-
const n = vi.exec(e);
|
|
1557
|
-
return n ? (e => {
|
|
1558
|
-
const n = e[10],
|
|
1559
|
-
t = "Z" === (n || "").toUpperCase();
|
|
1560
|
-
return {
|
|
1561
|
-
isoYear: organizeIsoYearParts(e),
|
|
1562
|
-
isoMonth: parseInt(e[4]),
|
|
1563
|
-
isoDay: parseInt(e[5]),
|
|
1564
|
-
...organizeTimeParts(e.slice(5)),
|
|
1565
|
-
...organizeAnnotationParts(e[16]),
|
|
1566
|
-
C: Boolean(e[6]),
|
|
1567
|
-
j: t,
|
|
1568
|
-
offset: t ? void 0 : n
|
|
1569
|
-
};
|
|
1570
|
-
})(n) : void 0;
|
|
1571
|
-
}
|
|
1572
|
-
function parseYearMonthOnly(e) {
|
|
1573
|
-
const n = Ni.exec(e);
|
|
1574
|
-
return n ? (e => ({
|
|
1575
|
-
isoYear: organizeIsoYearParts(e),
|
|
1576
|
-
isoMonth: parseInt(e[4]),
|
|
1577
|
-
isoDay: 1,
|
|
1578
|
-
...organizeAnnotationParts(e[5])
|
|
1579
|
-
}))(n) : void 0;
|
|
1580
|
-
}
|
|
1581
|
-
function parseMonthDayOnly(e) {
|
|
1582
|
-
const n = yi.exec(e);
|
|
1583
|
-
return n ? (e => ({
|
|
1584
|
-
isoYear: Br,
|
|
1585
|
-
isoMonth: parseInt(e[1]),
|
|
1586
|
-
isoDay: parseInt(e[2]),
|
|
1587
|
-
...organizeAnnotationParts(e[3])
|
|
1588
|
-
}))(n) : void 0;
|
|
1589
|
-
}
|
|
1590
|
-
function parseOffsetNanoMaybe(e, n) {
|
|
1591
|
-
const t = Ei.exec(e);
|
|
1592
|
-
return t ? ((e, n) => {
|
|
1593
|
-
const t = e[4] || e[5];
|
|
1594
|
-
if (n && t) {
|
|
1595
|
-
throw new RangeError(invalidSubstring(t));
|
|
1596
|
-
}
|
|
1597
|
-
return (e => {
|
|
1598
|
-
if (Math.abs(e) >= Uo) {
|
|
1599
|
-
throw new RangeError(ho);
|
|
1600
|
-
}
|
|
1601
|
-
return e;
|
|
1602
|
-
})((parseInt0(e[2]) * zo + parseInt0(e[3]) * Zo + parseInt0(e[4]) * Ro + parseSubsecNano(e[5] || "")) * parseSign(e[1]));
|
|
1603
|
-
})(t, n) : void 0;
|
|
1604
|
-
}
|
|
1605
|
-
function organizeIsoYearParts(e) {
|
|
1606
|
-
const n = parseSign(e[1]),
|
|
1607
|
-
t = parseInt(e[2] || e[3]);
|
|
1608
|
-
if (n < 0 && !t) {
|
|
1609
|
-
throw new RangeError(invalidSubstring(-0));
|
|
1610
|
-
}
|
|
1611
|
-
return n * t;
|
|
1612
|
-
}
|
|
1613
|
-
function organizeTimeParts(e) {
|
|
1614
|
-
const n = parseInt0(e[3]);
|
|
1615
|
-
return {
|
|
1616
|
-
...nanoToIsoTimeAndDay(parseSubsecNano(e[4] || ""))[0],
|
|
1617
|
-
isoHour: parseInt0(e[1]),
|
|
1618
|
-
isoMinute: parseInt0(e[2]),
|
|
1619
|
-
isoSecond: 60 === n ? 59 : n
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
function organizeAnnotationParts(e) {
|
|
1623
|
-
let n, t;
|
|
1624
|
-
const o = [];
|
|
1625
|
-
if (e.replace(Si, (e, r, i) => {
|
|
1626
|
-
const a = Boolean(r),
|
|
1627
|
-
[s, c] = i.split("=").reverse();
|
|
1628
|
-
if (c) {
|
|
1629
|
-
if ("u-ca" === c) {
|
|
1630
|
-
o.push(s), n || (n = a);
|
|
1631
|
-
} else if (a || /[A-Z]/.test(c)) {
|
|
1632
|
-
throw new RangeError(invalidSubstring(e));
|
|
1633
|
-
}
|
|
1634
|
-
} else {
|
|
1635
|
-
if (t) {
|
|
1636
|
-
throw new RangeError(invalidSubstring(e));
|
|
1637
|
-
}
|
|
1638
|
-
t = s;
|
|
1639
|
-
}
|
|
1640
|
-
return "";
|
|
1641
|
-
}), o.length > 1 && n) {
|
|
1642
|
-
throw new RangeError(invalidSubstring(e));
|
|
1643
|
-
}
|
|
1644
|
-
return {
|
|
1645
|
-
timeZone: t,
|
|
1646
|
-
calendar: o[0] || l
|
|
1647
|
-
};
|
|
1648
|
-
}
|
|
1649
|
-
function parseSubsecNano(e) {
|
|
1650
|
-
return parseInt(e.padEnd(9, "0"));
|
|
1651
|
-
}
|
|
1652
|
-
function createRegExp(e) {
|
|
1653
|
-
return new RegExp(`^${e}$`, "i");
|
|
1654
|
-
}
|
|
1655
|
-
function parseSign(e) {
|
|
1656
|
-
return e && "+" !== e ? -1 : 1;
|
|
1657
|
-
}
|
|
1658
|
-
function parseInt0(e) {
|
|
1659
|
-
return void 0 === e ? 0 : parseInt(e);
|
|
1660
|
-
}
|
|
1661
|
-
function Ze(e) {
|
|
1662
|
-
return M(m(e));
|
|
1663
|
-
}
|
|
1664
|
-
function M(e) {
|
|
1665
|
-
const n = getTimeZoneEssence(e);
|
|
1666
|
-
return "number" == typeof n ? Se(n) : n ? (e => {
|
|
1667
|
-
if (Oi.test(e)) {
|
|
1668
|
-
throw new RangeError(F(e));
|
|
1669
|
-
}
|
|
1670
|
-
if (bi.test(e)) {
|
|
1671
|
-
throw new RangeError(po);
|
|
1672
|
-
}
|
|
1673
|
-
return e.toLowerCase().split("/").map((e, n) => (e.length <= 3 || /\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, (e, t) => e.length <= 2 && !n || "in" === e || "chat" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)).join("/");
|
|
1674
|
-
})(e) : si;
|
|
1675
|
-
}
|
|
1676
|
-
function getTimeZoneAtomic(e) {
|
|
1677
|
-
const n = getTimeZoneEssence(e);
|
|
1678
|
-
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone : si;
|
|
1679
|
-
}
|
|
1680
|
-
function getTimeZoneEssence(e) {
|
|
1681
|
-
const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);
|
|
1682
|
-
return void 0 !== n ? n : e !== si ? wi(e) : void 0;
|
|
1683
|
-
}
|
|
1684
|
-
function Ke(e, n) {
|
|
1685
|
-
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
1686
|
-
}
|
|
1687
|
-
function Be(e, n) {
|
|
1688
|
-
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
1689
|
-
}
|
|
1690
|
-
function K(e, n, t, o, r, i) {
|
|
1691
|
-
const a = e(normalizeOptions(i).relativeTo),
|
|
1692
|
-
s = Math.max(getMaxDurationUnit(o), getMaxDurationUnit(r));
|
|
1693
|
-
if (allPropsEqual(p, o, r)) {
|
|
1694
|
-
return 0;
|
|
1695
|
-
}
|
|
1696
|
-
if (isUniformUnit(s, a)) {
|
|
1697
|
-
return compareBigNanos(durationFieldsToBigNano(o), durationFieldsToBigNano(r));
|
|
1698
|
-
}
|
|
1699
|
-
if (!a) {
|
|
1700
|
-
throw new RangeError(yo);
|
|
1701
|
-
}
|
|
1702
|
-
const [c, u, f] = createMarkerSystem(n, t, a),
|
|
1703
|
-
l = createMarkerToEpochNano(f),
|
|
1704
|
-
d = createMoveMarker(f);
|
|
1705
|
-
return compareBigNanos(l(d(u, c, o)), l(d(u, c, r)));
|
|
1706
|
-
}
|
|
1707
|
-
function Yt(e, n) {
|
|
1708
|
-
return te(e, n) || Dt(e, n);
|
|
1709
|
-
}
|
|
1710
|
-
function te(e, n) {
|
|
1711
|
-
return compareNumbers(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
1712
|
-
}
|
|
1713
|
-
function Dt(e, n) {
|
|
1714
|
-
return compareNumbers(isoTimeFieldsToNano(e), isoTimeFieldsToNano(n));
|
|
1715
|
-
}
|
|
1716
|
-
function Ve(e, n) {
|
|
1717
|
-
return !Ke(e, n);
|
|
1718
|
-
}
|
|
1719
|
-
function Ce(e, n) {
|
|
1720
|
-
return !Be(e, n) && !!isTimeZoneIdsEqual(e.timeZone, n.timeZone) && e.calendar === n.calendar;
|
|
1721
|
-
}
|
|
1722
|
-
function Ct(e, n) {
|
|
1723
|
-
return !Yt(e, n) && e.calendar === n.calendar;
|
|
1724
|
-
}
|
|
1725
|
-
function re(e, n) {
|
|
1726
|
-
return !te(e, n) && e.calendar === n.calendar;
|
|
1727
|
-
}
|
|
1728
|
-
function $t(e, n) {
|
|
1729
|
-
return !te(e, n) && e.calendar === n.calendar;
|
|
1730
|
-
}
|
|
1731
|
-
function Lt(e, n) {
|
|
1732
|
-
return !te(e, n) && e.calendar === n.calendar;
|
|
1733
|
-
}
|
|
1734
|
-
function st(e, n) {
|
|
1735
|
-
return !Dt(e, n);
|
|
1736
|
-
}
|
|
1737
|
-
function isTimeZoneIdsEqual(e, n) {
|
|
1738
|
-
if (e === n) {
|
|
1739
|
-
return 1;
|
|
1740
|
-
}
|
|
1741
|
-
try {
|
|
1742
|
-
return getTimeZoneAtomic(e) === getTimeZoneAtomic(n);
|
|
1743
|
-
} catch (e) {}
|
|
1744
|
-
}
|
|
1745
|
-
function Ee(e, n, t, o) {
|
|
1746
|
-
const r = refineDiffOptions(e, o, 3, 5),
|
|
1747
|
-
i = diffEpochNanos(n.epochNanoseconds, t.epochNanoseconds, ...r);
|
|
1748
|
-
return Oe(e ? negateDurationFields(i) : i);
|
|
1749
|
-
}
|
|
1750
|
-
function we(e, n, t, o, r, i) {
|
|
1751
|
-
const a = getCommonCalendarId(o.calendar, r.calendar),
|
|
1752
|
-
[s, c, u, f] = refineDiffOptions(t, i, 5),
|
|
1753
|
-
l = o.epochNanoseconds,
|
|
1754
|
-
d = r.epochNanoseconds,
|
|
1755
|
-
m = compareBigNanos(d, l);
|
|
1756
|
-
let p;
|
|
1757
|
-
if (m) {
|
|
1758
|
-
if (s < 6) {
|
|
1759
|
-
p = diffEpochNanos(l, d, s, c, u, f);
|
|
1760
|
-
} else {
|
|
1761
|
-
const t = n(((e, n) => {
|
|
1762
|
-
if (!isTimeZoneIdsEqual(e, n)) {
|
|
1763
|
-
throw new RangeError(mo);
|
|
1764
|
-
}
|
|
1765
|
-
return e;
|
|
1766
|
-
})(o.timeZone, r.timeZone)),
|
|
1767
|
-
l = e(a);
|
|
1768
|
-
p = diffZonedEpochsBig(l, t, o, r, m, s, i), p = roundRelativeDuration(p, d, s, c, u, f, l, o, extractEpochNano, Pt(moveZonedEpochs, t));
|
|
1769
|
-
}
|
|
1770
|
-
} else {
|
|
1771
|
-
p = pr;
|
|
1772
|
-
}
|
|
1773
|
-
return Oe(t ? negateDurationFields(p) : p);
|
|
1774
|
-
}
|
|
1775
|
-
function It(e, n, t, o, r) {
|
|
1776
|
-
const i = getCommonCalendarId(t.calendar, o.calendar),
|
|
1777
|
-
[a, s, c, u] = refineDiffOptions(n, r, 6),
|
|
1778
|
-
f = isoToEpochNano(t),
|
|
1779
|
-
l = isoToEpochNano(o),
|
|
1780
|
-
d = compareBigNanos(l, f);
|
|
1781
|
-
let m;
|
|
1782
|
-
if (d) {
|
|
1783
|
-
if (a <= 6) {
|
|
1784
|
-
m = diffEpochNanos(f, l, a, s, c, u);
|
|
1785
|
-
} else {
|
|
1786
|
-
const n = e(i);
|
|
1787
|
-
m = diffDateTimesBig(n, t, o, d, a, r), m = roundRelativeDuration(m, l, a, s, c, u, n, t, isoToEpochNano, moveDateTime);
|
|
1788
|
-
}
|
|
1789
|
-
} else {
|
|
1790
|
-
m = pr;
|
|
1791
|
-
}
|
|
1792
|
-
return Oe(n ? negateDurationFields(m) : m);
|
|
1793
|
-
}
|
|
1794
|
-
function oe(e, n, t, o, r) {
|
|
1795
|
-
const i = getCommonCalendarId(t.calendar, o.calendar);
|
|
1796
|
-
return diffDateLike(n, () => e(i), t, o, ...refineDiffOptions(n, r, 6, 9, 6));
|
|
1797
|
-
}
|
|
1798
|
-
function zt(e, n, t, o, r) {
|
|
1799
|
-
const i = getCommonCalendarId(t.calendar, o.calendar),
|
|
1800
|
-
a = refineDiffOptions(n, r, 9, 9, 8),
|
|
1801
|
-
s = e(i),
|
|
1802
|
-
c = moveToDayOfMonthUnsafe(s, t),
|
|
1803
|
-
u = moveToDayOfMonthUnsafe(s, o);
|
|
1804
|
-
return c.isoYear === u.isoYear && c.isoMonth === u.isoMonth && c.isoDay === u.isoDay ? Oe(pr) : diffDateLike(n, () => s, checkIsoDateInBounds(c), checkIsoDateInBounds(u), ...a, 8);
|
|
1805
|
-
}
|
|
1806
|
-
function diffDateLike(e, n, t, o, r, i, a, s, c = 6) {
|
|
1807
|
-
const u = isoToEpochNano(t),
|
|
1808
|
-
f = isoToEpochNano(o);
|
|
1809
|
-
if (void 0 === u || void 0 === f) {
|
|
1810
|
-
throw new RangeError(Io);
|
|
1811
|
-
}
|
|
1812
|
-
let l;
|
|
1813
|
-
if (compareBigNanos(f, u)) {
|
|
1814
|
-
if (6 === r) {
|
|
1815
|
-
l = diffEpochNanos(u, f, r, i, a, s);
|
|
1816
|
-
} else {
|
|
1817
|
-
const e = n();
|
|
1818
|
-
l = e.N(t, o, r), i === c && 1 === a || (l = roundRelativeDuration(l, f, r, i, a, s, e, t, isoToEpochNano, moveDate));
|
|
1819
|
-
}
|
|
1820
|
-
} else {
|
|
1821
|
-
l = pr;
|
|
1822
|
-
}
|
|
1823
|
-
return Oe(e ? negateDurationFields(l) : l);
|
|
1824
|
-
}
|
|
1825
|
-
function it(e, n, t, o) {
|
|
1826
|
-
const [r, i, a, s] = refineDiffOptions(e, o, 5, 5),
|
|
1827
|
-
c = roundByInc(diffTimes(n, t), computeNanoInc(i, a), s),
|
|
1828
|
-
u = {
|
|
1829
|
-
...pr,
|
|
1830
|
-
...nanoToDurationTimeFields(c, r)
|
|
1831
|
-
};
|
|
1832
|
-
return Oe(e ? negateDurationFields(u) : u);
|
|
1833
|
-
}
|
|
1834
|
-
function diffZonedEpochsExact(e, n, t, o, r, i) {
|
|
1835
|
-
const a = compareBigNanos(o.epochNanoseconds, t.epochNanoseconds);
|
|
1836
|
-
return a ? r < 6 ? diffEpochNanosExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochsBig(n, e, t, o, a, r, i) : pr;
|
|
1837
|
-
}
|
|
1838
|
-
function diffDateTimesExact(e, n, t, o, r) {
|
|
1839
|
-
const i = isoToEpochNano(n),
|
|
1840
|
-
a = isoToEpochNano(t),
|
|
1841
|
-
s = compareBigNanos(a, i);
|
|
1842
|
-
return s ? o <= 6 ? diffEpochNanosExact(i, a, o) : diffDateTimesBig(e, n, t, s, o, r) : pr;
|
|
1843
|
-
}
|
|
1844
|
-
function diffZonedEpochsBig(e, n, t, o, r, i, a) {
|
|
1845
|
-
const [s, c, u] = ((e, n, t, o) => {
|
|
1846
|
-
function updateMid() {
|
|
1847
|
-
return f = {
|
|
1848
|
-
...moveByDays(a, c++ * -o),
|
|
1849
|
-
...i
|
|
1850
|
-
}, l = getSingleInstantFor(e, f), compareBigNanos(s, l) === -o;
|
|
1851
|
-
}
|
|
1852
|
-
const r = he(n, e),
|
|
1853
|
-
i = nn(w, r),
|
|
1854
|
-
a = he(t, e),
|
|
1855
|
-
s = t.epochNanoseconds;
|
|
1856
|
-
let c = 0;
|
|
1857
|
-
const u = diffTimes(r, a);
|
|
1858
|
-
let f, l;
|
|
1859
|
-
if (Math.sign(u) === -o && c++, updateMid() && (-1 === o || updateMid())) {
|
|
1860
|
-
throw new RangeError(fo);
|
|
1861
|
-
}
|
|
1862
|
-
const d = bigNanoToNumber(diffBigNanos(l, s));
|
|
1863
|
-
return [r, f, d];
|
|
1864
|
-
})(n, t, o, r);
|
|
1865
|
-
var f, l;
|
|
1866
|
-
return {
|
|
1867
|
-
...(6 === i ? (f = s, l = c, {
|
|
1868
|
-
...pr,
|
|
1869
|
-
days: diffDays(f, l)
|
|
1870
|
-
}) : e.N(s, c, i, a)),
|
|
1871
|
-
...nanoToDurationTimeFields(u)
|
|
1872
|
-
};
|
|
1873
|
-
}
|
|
1874
|
-
function diffDateTimesBig(e, n, t, o, r, i) {
|
|
1875
|
-
const [a, s, c] = ((e, n, t) => {
|
|
1876
|
-
let o = n,
|
|
1877
|
-
r = diffTimes(e, n);
|
|
1878
|
-
return Math.sign(r) === -t && (o = moveByDays(n, -t), r += Uo * t), [e, o, r];
|
|
1879
|
-
})(n, t, o);
|
|
1880
|
-
return {
|
|
1881
|
-
...e.N(a, s, r, i),
|
|
1882
|
-
...nanoToDurationTimeFields(c)
|
|
1883
|
-
};
|
|
1884
|
-
}
|
|
1885
|
-
function diffEpochNanos(e, n, t, o, r, i) {
|
|
1886
|
-
return {
|
|
1887
|
-
...pr,
|
|
1888
|
-
...nanoToDurationDayTimeFields(roundBigNano(diffBigNanos(e, n), o, r, i), t)
|
|
1889
|
-
};
|
|
1890
|
-
}
|
|
1891
|
-
function diffEpochNanosExact(e, n, t) {
|
|
1892
|
-
return {
|
|
1893
|
-
...pr,
|
|
1894
|
-
...nanoToDurationDayTimeFields(diffBigNanos(e, n), t)
|
|
1895
|
-
};
|
|
1896
|
-
}
|
|
1897
|
-
function diffDays(e, n) {
|
|
1898
|
-
return diffEpochMilliByDay(isoToEpochMilli(e), isoToEpochMilli(n));
|
|
1899
|
-
}
|
|
1900
|
-
function diffEpochMilliByDay(e, n) {
|
|
1901
|
-
return Math.trunc((n - e) / ko);
|
|
1902
|
-
}
|
|
1903
|
-
function diffTimes(e, n) {
|
|
1904
|
-
return isoTimeFieldsToNano(n) - isoTimeFieldsToNano(e);
|
|
1905
|
-
}
|
|
1906
|
-
function getCommonCalendarId(e, n) {
|
|
1907
|
-
if (e !== n) {
|
|
1908
|
-
throw new RangeError(lo);
|
|
1909
|
-
}
|
|
1910
|
-
return e;
|
|
1911
|
-
}
|
|
1912
|
-
function computeNativeWeekOfYear(e) {
|
|
1913
|
-
return this.m(e)[0];
|
|
1914
|
-
}
|
|
1915
|
-
function computeNativeYearOfWeek(e) {
|
|
1916
|
-
return this.m(e)[1];
|
|
1917
|
-
}
|
|
1918
|
-
function computeNativeDayOfYear(e) {
|
|
1919
|
-
const [n] = this.v(e);
|
|
1920
|
-
return diffEpochMilliByDay(this.p(n), isoToEpochMilli(e)) + 1;
|
|
1921
|
-
}
|
|
1922
|
-
function parseMonthCode(e) {
|
|
1923
|
-
const n = Bi.exec(e);
|
|
1924
|
-
if (!n) {
|
|
1925
|
-
throw new RangeError(invalidMonthCode(e));
|
|
1926
|
-
}
|
|
1927
|
-
return [parseInt(n[1]), Boolean(n[2])];
|
|
1928
|
-
}
|
|
1929
|
-
function formatMonthCode(e, n) {
|
|
1930
|
-
return "M" + bo(e) + (n ? "L" : "");
|
|
1931
|
-
}
|
|
1932
|
-
function monthCodeNumberToMonth(e, n, t) {
|
|
1933
|
-
return e + (n || t && e >= t ? 1 : 0);
|
|
1934
|
-
}
|
|
1935
|
-
function monthToMonthCodeNumber(e, n) {
|
|
1936
|
-
return e - (n && e >= n ? 1 : 0);
|
|
1937
|
-
}
|
|
1938
|
-
function eraYearToYear(e, n) {
|
|
1939
|
-
return (n + e) * (Math.sign(n) || 1) || 0;
|
|
1940
|
-
}
|
|
1941
|
-
function getCalendarEraOrigins(e) {
|
|
1942
|
-
return ir[getCalendarIdBase(e)];
|
|
1943
|
-
}
|
|
1944
|
-
function getCalendarLeapMonthMeta(e) {
|
|
1945
|
-
return sr[getCalendarIdBase(e)];
|
|
1946
|
-
}
|
|
1947
|
-
function getCalendarIdBase(e) {
|
|
1948
|
-
return computeCalendarIdBase(e.id || l);
|
|
1949
|
-
}
|
|
1950
|
-
function createIntlCalendar(e) {
|
|
1951
|
-
function epochMilliToIntlFields(e) {
|
|
1952
|
-
return ((e, n) => ({
|
|
1953
|
-
...parseIntlYear(e, n),
|
|
1954
|
-
o: e.month,
|
|
1955
|
-
day: parseInt(e.day)
|
|
1956
|
-
}))(hashIntlFormatParts(n, e), t);
|
|
1957
|
-
}
|
|
1958
|
-
const n = Ci(e),
|
|
1959
|
-
t = computeCalendarIdBase(e);
|
|
1960
|
-
return {
|
|
1961
|
-
id: e,
|
|
1962
|
-
h: createIntlFieldCache(epochMilliToIntlFields),
|
|
1963
|
-
l: createIntlYearDataCache(epochMilliToIntlFields)
|
|
1964
|
-
};
|
|
1965
|
-
}
|
|
1966
|
-
function createIntlFieldCache(e) {
|
|
1967
|
-
return on(n => {
|
|
1968
|
-
const t = isoToEpochMilli(n);
|
|
1969
|
-
return e(t);
|
|
1970
|
-
}, WeakMap);
|
|
1971
|
-
}
|
|
1972
|
-
function createIntlYearDataCache(e) {
|
|
1973
|
-
const n = e(0).year - Or;
|
|
1974
|
-
return on(t => {
|
|
1975
|
-
let o,
|
|
1976
|
-
r = isoArgsToEpochMilli(t - n),
|
|
1977
|
-
i = 0;
|
|
1978
|
-
const a = [],
|
|
1979
|
-
s = [];
|
|
1980
|
-
do {
|
|
1981
|
-
r += 400 * ko;
|
|
1982
|
-
} while ((o = e(r)).year <= t);
|
|
1983
|
-
do {
|
|
1984
|
-
if (r += (1 - o.day) * ko, o.year === t && (a.push(r), s.push(o.o)), r -= ko, ++i > 100 || r < -Pr) {
|
|
1985
|
-
throw new RangeError(fo);
|
|
1986
|
-
}
|
|
1987
|
-
} while ((o = e(r)).year >= t);
|
|
1988
|
-
return {
|
|
1989
|
-
i: a.reverse(),
|
|
1990
|
-
u: Fo(s.reverse())
|
|
1991
|
-
};
|
|
1992
|
-
});
|
|
1993
|
-
}
|
|
1994
|
-
function parseIntlYear(e, n) {
|
|
1995
|
-
let t,
|
|
1996
|
-
o,
|
|
1997
|
-
r = parseIntlPartsYear(e);
|
|
1998
|
-
if (e.era) {
|
|
1999
|
-
const i = ir[n],
|
|
2000
|
-
a = ar[n] || {};
|
|
2001
|
-
void 0 !== i && (t = "islamic" === n ? "ah" : e.era.normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, ""), "bc" === t || "b" === t ? t = "bce" : "ad" === t || "a" === t ? t = "ce" : "beforeroc" === t && (t = "broc"), t = a[t] || t, o = r, r = eraYearToYear(o, i[t] || 0));
|
|
2002
|
-
}
|
|
2003
|
-
return {
|
|
2004
|
-
era: t,
|
|
2005
|
-
eraYear: o,
|
|
2006
|
-
year: r
|
|
2007
|
-
};
|
|
2008
|
-
}
|
|
2009
|
-
function parseIntlPartsYear(e) {
|
|
2010
|
-
return parseInt(e.relatedYear || e.year);
|
|
2011
|
-
}
|
|
2012
|
-
function computeIntlDateParts(e) {
|
|
2013
|
-
const {
|
|
2014
|
-
year: n,
|
|
2015
|
-
o: t,
|
|
2016
|
-
day: o
|
|
2017
|
-
} = this.h(e),
|
|
2018
|
-
{
|
|
2019
|
-
u: r
|
|
2020
|
-
} = this.l(n);
|
|
2021
|
-
return [n, r[t] + 1, o];
|
|
2022
|
-
}
|
|
2023
|
-
function computeIntlEpochMilli(e, n = 1, t = 1) {
|
|
2024
|
-
return this.l(e).i[n - 1] + (t - 1) * ko;
|
|
2025
|
-
}
|
|
2026
|
-
function computeIntlMonthCodeParts(e, n) {
|
|
2027
|
-
const t = computeIntlLeapMonth.call(this, e);
|
|
2028
|
-
return [monthToMonthCodeNumber(n, t), t === n];
|
|
2029
|
-
}
|
|
2030
|
-
function computeIntlLeapMonth(e) {
|
|
2031
|
-
const n = queryMonthStrings(this, e),
|
|
2032
|
-
t = queryMonthStrings(this, e - 1),
|
|
2033
|
-
o = n.length;
|
|
2034
|
-
if (o > t.length) {
|
|
2035
|
-
const e = getCalendarLeapMonthMeta(this);
|
|
2036
|
-
if (e < 0) {
|
|
2037
|
-
return -e;
|
|
2038
|
-
}
|
|
2039
|
-
for (let e = 0; e < o; e++) {
|
|
2040
|
-
if (n[e] !== t[e]) {
|
|
2041
|
-
return e + 1;
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
function computeIntlDaysInYear(e) {
|
|
2047
|
-
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, e), computeIntlEpochMilli.call(this, e + 1));
|
|
2048
|
-
}
|
|
2049
|
-
function computeIntlDaysInMonth(e, n) {
|
|
2050
|
-
const {
|
|
2051
|
-
i: t
|
|
2052
|
-
} = this.l(e);
|
|
2053
|
-
let o = n + 1,
|
|
2054
|
-
r = t;
|
|
2055
|
-
return o > t.length && (o = 1, r = this.l(e + 1).i), diffEpochMilliByDay(t[n - 1], r[o - 1]);
|
|
2056
|
-
}
|
|
2057
|
-
function computeIntlMonthsInYear(e) {
|
|
2058
|
-
return this.l(e).i.length;
|
|
2059
|
-
}
|
|
2060
|
-
function computeIntlEraParts(e) {
|
|
2061
|
-
const n = this.h(e);
|
|
2062
|
-
return [n.era, n.eraYear];
|
|
2063
|
-
}
|
|
2064
|
-
function queryMonthStrings(e, n) {
|
|
2065
|
-
return Object.keys(e.l(n).u);
|
|
2066
|
-
}
|
|
2067
|
-
function Mt(e) {
|
|
2068
|
-
return u(m(e));
|
|
2069
|
-
}
|
|
2070
|
-
function u(e) {
|
|
2071
|
-
if ((e = e.toLowerCase()) !== l && e !== or) {
|
|
2072
|
-
const n = Ci(e).resolvedOptions().calendar;
|
|
2073
|
-
if (computeCalendarIdBase(e) !== computeCalendarIdBase(n)) {
|
|
2074
|
-
throw new RangeError(c(e));
|
|
2075
|
-
}
|
|
2076
|
-
return n;
|
|
2077
|
-
}
|
|
2078
|
-
return e;
|
|
2079
|
-
}
|
|
2080
|
-
function computeCalendarIdBase(e) {
|
|
2081
|
-
return "islamicc" === e && (e = "islamic"), e.split("-")[0];
|
|
2082
|
-
}
|
|
2083
|
-
function createNativeOpsCreator(e, n) {
|
|
2084
|
-
return t => t === l ? e : t === or || t === rr ? Object.assign(Object.create(e), {
|
|
2085
|
-
id: t
|
|
2086
|
-
}) : Object.assign(Object.create(n), ki(t));
|
|
2087
|
-
}
|
|
2088
|
-
function $(e, n, t, o) {
|
|
2089
|
-
const r = refineCalendarFields(t, o, Xo, [], xo);
|
|
2090
|
-
if (void 0 !== r.timeZone) {
|
|
2091
|
-
const o = t.F(r),
|
|
2092
|
-
i = refineTimeBag(r),
|
|
2093
|
-
a = e(r.timeZone);
|
|
2094
|
-
return {
|
|
2095
|
-
epochNanoseconds: getMatchingInstantFor(n(a), {
|
|
2096
|
-
...o,
|
|
2097
|
-
...i
|
|
2098
|
-
}, void 0 !== r.offset ? parseOffsetNano(r.offset) : void 0),
|
|
2099
|
-
timeZone: a
|
|
2100
|
-
};
|
|
2101
|
-
}
|
|
2102
|
-
return {
|
|
2103
|
-
...t.F(r),
|
|
2104
|
-
...Nt
|
|
2105
|
-
};
|
|
2106
|
-
}
|
|
2107
|
-
function Ne(e, n, t, o, r, i) {
|
|
2108
|
-
const a = refineCalendarFields(t, r, Xo, jo, xo),
|
|
2109
|
-
s = e(a.timeZone),
|
|
2110
|
-
[c, u, f] = je(i),
|
|
2111
|
-
l = t.F(a, fabricateOverflowOptions(c)),
|
|
2112
|
-
d = refineTimeBag(a, c);
|
|
2113
|
-
return _e(getMatchingInstantFor(n(s), {
|
|
2114
|
-
...l,
|
|
2115
|
-
...d
|
|
2116
|
-
}, void 0 !== a.offset ? parseOffsetNano(a.offset) : void 0, u, f), s, o);
|
|
2117
|
-
}
|
|
2118
|
-
function At(e, n, t) {
|
|
2119
|
-
const o = refineCalendarFields(e, n, Xo, [], O),
|
|
2120
|
-
r = mt(t);
|
|
2121
|
-
return jt(checkIsoDateTimeInBounds({
|
|
2122
|
-
...e.F(o, fabricateOverflowOptions(r)),
|
|
2123
|
-
...refineTimeBag(o, r)
|
|
2124
|
-
}));
|
|
2125
|
-
}
|
|
2126
|
-
function me(e, n, t, o = []) {
|
|
2127
|
-
const r = refineCalendarFields(e, n, Xo, o);
|
|
2128
|
-
return e.F(r, t);
|
|
2129
|
-
}
|
|
2130
|
-
function Xt(e, n, t, o) {
|
|
2131
|
-
const r = refineCalendarFields(e, n, Ko, o);
|
|
2132
|
-
return e.K(r, t);
|
|
2133
|
-
}
|
|
2134
|
-
function Rt(e, n, t, o) {
|
|
2135
|
-
const r = refineCalendarFields(e, t, Xo, Jo);
|
|
2136
|
-
return n && void 0 !== r.month && void 0 === r.monthCode && void 0 === r.year && (r.year = Br), e._(r, o);
|
|
2137
|
-
}
|
|
2138
|
-
function Tt(e, n) {
|
|
2139
|
-
return St(refineTimeBag(refineFields(e, qo, [], 1), mt(n)));
|
|
2140
|
-
}
|
|
2141
|
-
function q(e) {
|
|
2142
|
-
const n = refineFields(e, ur);
|
|
2143
|
-
return Oe(checkDurationUnits({
|
|
2144
|
-
...pr,
|
|
2145
|
-
...n
|
|
2146
|
-
}));
|
|
2147
|
-
}
|
|
2148
|
-
function refineCalendarFields(e, n, t, o = [], r = []) {
|
|
2149
|
-
return refineFields(n, [...e.fields(t), ...r].sort(), o);
|
|
2150
|
-
}
|
|
2151
|
-
function refineFields(e, n, t, o = !t) {
|
|
2152
|
-
const r = {};
|
|
2153
|
-
let i,
|
|
2154
|
-
a = 0;
|
|
2155
|
-
for (const o of n) {
|
|
2156
|
-
if (o === i) {
|
|
2157
|
-
throw new RangeError(duplicateFields(o));
|
|
2158
|
-
}
|
|
2159
|
-
if ("constructor" === o || "__proto__" === o) {
|
|
2160
|
-
throw new RangeError(forbiddenField(o));
|
|
2161
|
-
}
|
|
2162
|
-
let n = e[o];
|
|
2163
|
-
if (void 0 !== n) {
|
|
2164
|
-
a = 1, Li[o] && (n = Li[o](n, o)), r[o] = n;
|
|
2165
|
-
} else if (t) {
|
|
2166
|
-
if (t.includes(o)) {
|
|
2167
|
-
throw new TypeError(missingField(o));
|
|
2168
|
-
}
|
|
2169
|
-
r[o] = tr[o];
|
|
2170
|
-
}
|
|
2171
|
-
i = o;
|
|
2172
|
-
}
|
|
2173
|
-
if (o && !a) {
|
|
2174
|
-
throw new TypeError(noValidFields(n));
|
|
2175
|
-
}
|
|
2176
|
-
return r;
|
|
2177
|
-
}
|
|
2178
|
-
function refineTimeBag(e, n) {
|
|
2179
|
-
return constrainIsoTimeFields(xi({
|
|
2180
|
-
...tr,
|
|
2181
|
-
...e
|
|
2182
|
-
}), n);
|
|
2183
|
-
}
|
|
2184
|
-
function De(e, n, t, o, r) {
|
|
2185
|
-
const {
|
|
2186
|
-
calendar: i,
|
|
2187
|
-
timeZone: a
|
|
2188
|
-
} = t,
|
|
2189
|
-
s = e(i),
|
|
2190
|
-
c = n(a),
|
|
2191
|
-
u = [...s.fields(Xo), ...Lo].sort(),
|
|
2192
|
-
f = (e => {
|
|
2193
|
-
const n = he(e, L),
|
|
2194
|
-
t = Se(n.offsetNanoseconds),
|
|
2195
|
-
o = ji(e.calendar),
|
|
2196
|
-
[r, i, a] = o.v(n),
|
|
2197
|
-
[s, c] = o.q(r, i),
|
|
2198
|
-
u = formatMonthCode(s, c);
|
|
2199
|
-
return {
|
|
2200
|
-
...$i(n),
|
|
2201
|
-
year: r,
|
|
2202
|
-
monthCode: u,
|
|
2203
|
-
day: a,
|
|
2204
|
-
offset: t
|
|
2205
|
-
};
|
|
2206
|
-
})(t),
|
|
2207
|
-
l = refineFields(o, u),
|
|
2208
|
-
d = s.k(f, l),
|
|
2209
|
-
m = {
|
|
2210
|
-
...f,
|
|
2211
|
-
...l
|
|
2212
|
-
},
|
|
2213
|
-
[p, h, g] = je(r, 2);
|
|
2214
|
-
return _e(getMatchingInstantFor(c, {
|
|
2215
|
-
...s.F(d, fabricateOverflowOptions(p)),
|
|
2216
|
-
...constrainIsoTimeFields(xi(m), p)
|
|
2217
|
-
}, parseOffsetNano(m.offset), h, g), a, i);
|
|
2218
|
-
}
|
|
2219
|
-
function gt(e, n, t, o) {
|
|
2220
|
-
const r = e(n.calendar),
|
|
2221
|
-
i = [...r.fields(Xo), ...O].sort(),
|
|
2222
|
-
a = {
|
|
2223
|
-
...computeDateEssentials(s = n),
|
|
2224
|
-
hour: s.isoHour,
|
|
2225
|
-
minute: s.isoMinute,
|
|
2226
|
-
second: s.isoSecond,
|
|
2227
|
-
millisecond: s.isoMillisecond,
|
|
2228
|
-
microsecond: s.isoMicrosecond,
|
|
2229
|
-
nanosecond: s.isoNanosecond
|
|
2230
|
-
};
|
|
2231
|
-
var s;
|
|
2232
|
-
const c = refineFields(t, i),
|
|
2233
|
-
u = mt(o),
|
|
2234
|
-
f = r.k(a, c),
|
|
2235
|
-
l = {
|
|
2236
|
-
...a,
|
|
2237
|
-
...c
|
|
2238
|
-
};
|
|
2239
|
-
return jt(checkIsoDateTimeInBounds({
|
|
2240
|
-
...r.F(f, fabricateOverflowOptions(u)),
|
|
2241
|
-
...constrainIsoTimeFields(xi(l), u)
|
|
2242
|
-
}));
|
|
2243
|
-
}
|
|
2244
|
-
function ee(e, n, t, o) {
|
|
2245
|
-
const r = e(n.calendar),
|
|
2246
|
-
i = r.fields(Xo).sort(),
|
|
2247
|
-
a = computeDateEssentials(n),
|
|
2248
|
-
s = refineFields(t, i),
|
|
2249
|
-
c = r.k(a, s);
|
|
2250
|
-
return r.F(c, o);
|
|
2251
|
-
}
|
|
2252
|
-
function Wt(e, n, t, o) {
|
|
2253
|
-
const r = e(n.calendar),
|
|
2254
|
-
i = r.fields(Ko).sort(),
|
|
2255
|
-
a = (e => {
|
|
2256
|
-
const n = ji(e.calendar),
|
|
2257
|
-
[t, o] = n.v(e),
|
|
2258
|
-
[r, i] = n.q(t, o);
|
|
2259
|
-
return {
|
|
2260
|
-
year: t,
|
|
2261
|
-
monthCode: formatMonthCode(r, i)
|
|
2262
|
-
};
|
|
2263
|
-
})(n),
|
|
2264
|
-
s = refineFields(t, i),
|
|
2265
|
-
c = r.k(a, s);
|
|
2266
|
-
return r.K(c, o);
|
|
2267
|
-
}
|
|
2268
|
-
function Et(e, n, t, o) {
|
|
2269
|
-
const r = e(n.calendar),
|
|
2270
|
-
i = r.fields(Xo).sort(),
|
|
2271
|
-
a = (e => {
|
|
2272
|
-
const n = ji(e.calendar),
|
|
2273
|
-
[t, o, r] = n.v(e),
|
|
2274
|
-
[i, a] = n.q(t, o);
|
|
2275
|
-
return {
|
|
2276
|
-
monthCode: formatMonthCode(i, a),
|
|
2277
|
-
day: r
|
|
2278
|
-
};
|
|
2279
|
-
})(n),
|
|
2280
|
-
s = refineFields(t, i),
|
|
2281
|
-
c = r.k(a, s);
|
|
2282
|
-
return r._(c, o);
|
|
2283
|
-
}
|
|
2284
|
-
function rt(e, n, t) {
|
|
2285
|
-
return St(((e, n, t) => refineTimeBag({
|
|
2286
|
-
...nn(qo, e),
|
|
2287
|
-
...refineFields(n, qo)
|
|
2288
|
-
}, mt(t)))(e, n, t));
|
|
2289
|
-
}
|
|
2290
|
-
function A(e, n) {
|
|
2291
|
-
return Oe((t = e, o = n, checkDurationUnits({
|
|
2292
|
-
...t,
|
|
2293
|
-
...refineFields(o, ur)
|
|
2294
|
-
})));
|
|
2295
|
-
var t, o;
|
|
2296
|
-
}
|
|
2297
|
-
function convertToIso(e, n, t, o, r) {
|
|
2298
|
-
n = nn(t = e.fields(t), n), o = refineFields(o, r = e.fields(r), []);
|
|
2299
|
-
let i = e.k(n, o);
|
|
2300
|
-
return i = refineFields(i, [...t, ...r].sort(), []), e.F(i);
|
|
2301
|
-
}
|
|
2302
|
-
function refineYear(e, n) {
|
|
2303
|
-
const t = getCalendarEraOrigins(e),
|
|
2304
|
-
o = ar[e.id || ""] || {};
|
|
2305
|
-
let {
|
|
2306
|
-
era: r,
|
|
2307
|
-
eraYear: i,
|
|
2308
|
-
year: a
|
|
2309
|
-
} = n;
|
|
2310
|
-
if (void 0 !== r || void 0 !== i) {
|
|
2311
|
-
if (void 0 === r || void 0 === i) {
|
|
2312
|
-
throw new TypeError(io);
|
|
2313
|
-
}
|
|
2314
|
-
if (!t) {
|
|
2315
|
-
throw new RangeError(ro);
|
|
2316
|
-
}
|
|
2317
|
-
const e = t[o[r] || r];
|
|
2318
|
-
if (void 0 === e) {
|
|
2319
|
-
throw new RangeError(invalidEra(r));
|
|
2320
|
-
}
|
|
2321
|
-
const n = eraYearToYear(i, e);
|
|
2322
|
-
if (void 0 !== a && a !== n) {
|
|
2323
|
-
throw new RangeError(ao);
|
|
2324
|
-
}
|
|
2325
|
-
a = n;
|
|
2326
|
-
} else if (void 0 === a) {
|
|
2327
|
-
throw new TypeError(missingYear(t));
|
|
2328
|
-
}
|
|
2329
|
-
return a;
|
|
2330
|
-
}
|
|
2331
|
-
function refineMonth(e, n, t, o) {
|
|
2332
|
-
let {
|
|
2333
|
-
month: r,
|
|
2334
|
-
monthCode: i
|
|
2335
|
-
} = n;
|
|
2336
|
-
if (void 0 !== i) {
|
|
2337
|
-
const n = ((e, n, t, o) => {
|
|
2338
|
-
const r = e.L(t),
|
|
2339
|
-
[i, a] = parseMonthCode(n);
|
|
2340
|
-
let s = monthCodeNumberToMonth(i, a, r);
|
|
2341
|
-
if (a) {
|
|
2342
|
-
const n = getCalendarLeapMonthMeta(e);
|
|
2343
|
-
if (void 0 === n) {
|
|
2344
|
-
throw new RangeError(uo);
|
|
2345
|
-
}
|
|
2346
|
-
if (n > 0) {
|
|
2347
|
-
if (s > n) {
|
|
2348
|
-
throw new RangeError(uo);
|
|
2349
|
-
}
|
|
2350
|
-
if (void 0 === r) {
|
|
2351
|
-
if (1 === o) {
|
|
2352
|
-
throw new RangeError(uo);
|
|
2353
|
-
}
|
|
2354
|
-
s--;
|
|
2355
|
-
}
|
|
2356
|
-
} else {
|
|
2357
|
-
if (s !== -n) {
|
|
2358
|
-
throw new RangeError(uo);
|
|
2359
|
-
}
|
|
2360
|
-
if (void 0 === r && 1 === o) {
|
|
2361
|
-
throw new RangeError(uo);
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
return s;
|
|
2366
|
-
})(e, i, t, o);
|
|
2367
|
-
if (void 0 !== r && r !== n) {
|
|
2368
|
-
throw new RangeError(so);
|
|
2369
|
-
}
|
|
2370
|
-
r = n, o = 1;
|
|
2371
|
-
} else if (void 0 === r) {
|
|
2372
|
-
throw new TypeError(co);
|
|
2373
|
-
}
|
|
2374
|
-
return clampEntity("month", r, 1, e.B(t), o);
|
|
2375
|
-
}
|
|
2376
|
-
function refineDay(e, n, t, o, r) {
|
|
2377
|
-
return clampProp(n, "day", 1, e.U(o, t), r);
|
|
2378
|
-
}
|
|
2379
|
-
function spliceFields(e, n, t, o) {
|
|
2380
|
-
let r = 0;
|
|
2381
|
-
const i = [];
|
|
2382
|
-
for (const e of t) {
|
|
2383
|
-
void 0 !== n[e] ? r = 1 : i.push(e);
|
|
2384
|
-
}
|
|
2385
|
-
if (Object.assign(e, n), r) {
|
|
2386
|
-
for (const n of o || i) {
|
|
2387
|
-
delete e[n];
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2391
|
-
function computeDateEssentials(e) {
|
|
2392
|
-
const n = ji(e.calendar),
|
|
2393
|
-
[t, o, r] = n.v(e),
|
|
2394
|
-
[i, a] = n.q(t, o);
|
|
2395
|
-
return {
|
|
2396
|
-
year: t,
|
|
2397
|
-
monthCode: formatMonthCode(i, a),
|
|
2398
|
-
day: r
|
|
2399
|
-
};
|
|
2400
|
-
}
|
|
2401
|
-
function qe(e) {
|
|
2402
|
-
return xe(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
2403
|
-
}
|
|
2404
|
-
function ye(e, n, t, o, r = l) {
|
|
2405
|
-
return _e(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));
|
|
2406
|
-
}
|
|
2407
|
-
function Zt(n, t, o, r, i = 0, a = 0, s = 0, c = 0, u = 0, f = 0, d = l) {
|
|
2408
|
-
return jt(checkIsoDateTimeInBounds(checkIsoDateTimeFields(e(toInteger, zipProps(Tr, [t, o, r, i, a, s, c, u, f])))), n(d));
|
|
2409
|
-
}
|
|
2410
|
-
function ue(n, t, o, r, i = l) {
|
|
2411
|
-
return W(checkIsoDateInBounds(checkIsoDateFields(e(toInteger, {
|
|
2412
|
-
isoYear: t,
|
|
2413
|
-
isoMonth: o,
|
|
2414
|
-
isoDay: r
|
|
2415
|
-
}))), n(i));
|
|
2416
|
-
}
|
|
2417
|
-
function Qt(e, n, t, o = l, r = 1) {
|
|
2418
|
-
const i = toInteger(n),
|
|
2419
|
-
a = toInteger(t),
|
|
2420
|
-
s = e(o);
|
|
2421
|
-
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({
|
|
2422
|
-
isoYear: i,
|
|
2423
|
-
isoMonth: a,
|
|
2424
|
-
isoDay: toInteger(r)
|
|
2425
|
-
})), s);
|
|
2426
|
-
}
|
|
2427
|
-
function kt(e, n, t, o = l, r = Br) {
|
|
2428
|
-
const i = toInteger(n),
|
|
2429
|
-
a = toInteger(t),
|
|
2430
|
-
s = e(o);
|
|
2431
|
-
return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({
|
|
2432
|
-
isoYear: toInteger(r),
|
|
2433
|
-
isoMonth: i,
|
|
2434
|
-
isoDay: a
|
|
2435
|
-
})), s);
|
|
2436
|
-
}
|
|
2437
|
-
function ut(n = 0, t = 0, o = 0, r = 0, i = 0, a = 0) {
|
|
2438
|
-
return St(constrainIsoTimeFields(e(toInteger, zipProps(w, [n, t, o, r, i, a])), 1));
|
|
2439
|
-
}
|
|
2440
|
-
function j(n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, f = 0) {
|
|
2441
|
-
return Oe(checkDurationUnits(e(toStrictInteger, zipProps(p, [n, t, o, r, i, a, s, c, u, f]))));
|
|
2442
|
-
}
|
|
2443
|
-
function Je(e, n, t = l) {
|
|
2444
|
-
return _e(e.epochNanoseconds, n, t);
|
|
2445
|
-
}
|
|
2446
|
-
function be(e) {
|
|
2447
|
-
return xe(e.epochNanoseconds);
|
|
2448
|
-
}
|
|
2449
|
-
function yt(e, n) {
|
|
2450
|
-
return jt(he(n, e));
|
|
2451
|
-
}
|
|
2452
|
-
function fe(e, n) {
|
|
2453
|
-
return W(he(n, e));
|
|
2454
|
-
}
|
|
2455
|
-
function dt(e, n) {
|
|
2456
|
-
return St(he(n, e));
|
|
2457
|
-
}
|
|
2458
|
-
function bt(e, n, t, o) {
|
|
2459
|
-
const r = ((e, n, t, o) => {
|
|
2460
|
-
const r = (e => ei(normalizeOptions(e)))(o);
|
|
2461
|
-
return getSingleInstantFor(e(n), t, r);
|
|
2462
|
-
})(e, t, n, o);
|
|
2463
|
-
return _e(checkEpochNanoInBounds(r), t, n.calendar);
|
|
2464
|
-
}
|
|
2465
|
-
function ae(e, n, t, o, r) {
|
|
2466
|
-
const i = e(r.timeZone),
|
|
2467
|
-
a = r.plainTime,
|
|
2468
|
-
s = void 0 !== a ? n(a) : void 0,
|
|
2469
|
-
c = t(i);
|
|
2470
|
-
let u;
|
|
2471
|
-
return u = s ? getSingleInstantFor(c, {
|
|
2472
|
-
...o,
|
|
2473
|
-
...s
|
|
2474
|
-
}) : getStartOfDayInstantFor(c, {
|
|
2475
|
-
...o,
|
|
2476
|
-
...Nt
|
|
2477
|
-
}), _e(u, i, o.calendar);
|
|
2478
|
-
}
|
|
2479
|
-
function ie(e, n = Nt) {
|
|
2480
|
-
return jt(checkIsoDateTimeInBounds({
|
|
2481
|
-
...e,
|
|
2482
|
-
...n
|
|
2483
|
-
}));
|
|
2484
|
-
}
|
|
2485
|
-
function le(e, n, t) {
|
|
2486
|
-
return ((e, n) => {
|
|
2487
|
-
const t = refineCalendarFields(e, n, Qo);
|
|
2488
|
-
return e.K(t, void 0);
|
|
2489
|
-
})(e(n.calendar), t);
|
|
2490
|
-
}
|
|
2491
|
-
function se(e, n, t) {
|
|
2492
|
-
return ((e, n) => {
|
|
2493
|
-
const t = refineCalendarFields(e, n, nr);
|
|
2494
|
-
return e._(t);
|
|
2495
|
-
})(e(n.calendar), t);
|
|
2496
|
-
}
|
|
2497
|
-
function Ht(e, n, t, o) {
|
|
2498
|
-
return ((e, n, t) => convertToIso(e, n, Qo, requireObjectLike(t), Jo))(e(n.calendar), t, o);
|
|
2499
|
-
}
|
|
2500
|
-
function Vt(e, n, t, o) {
|
|
2501
|
-
return ((e, n, t) => convertToIso(e, n, nr, requireObjectLike(t), Go))(e(n.calendar), t, o);
|
|
2502
|
-
}
|
|
2503
|
-
function $e(e) {
|
|
2504
|
-
return xe(checkEpochNanoInBounds(Ge(toStrictInteger(e), Qe)));
|
|
2505
|
-
}
|
|
2506
|
-
function He(e) {
|
|
2507
|
-
return xe(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
2508
|
-
}
|
|
2509
|
-
function createOptionsTransformer(e, n, t) {
|
|
2510
|
-
const o = new Set(t);
|
|
2511
|
-
return (r, i) => {
|
|
2512
|
-
const a = t && hasAnyPropsByName(r, t);
|
|
2513
|
-
if (!hasAnyPropsByName(r = ((e, n) => {
|
|
2514
|
-
const t = {};
|
|
2515
|
-
for (const o in n) {
|
|
2516
|
-
e.has(o) || (t[o] = n[o]);
|
|
2517
|
-
}
|
|
2518
|
-
return t;
|
|
2519
|
-
})(o, r), e)) {
|
|
2520
|
-
if (i && a) {
|
|
2521
|
-
throw new TypeError("Invalid formatting options");
|
|
2522
|
-
}
|
|
2523
|
-
r = {
|
|
2524
|
-
...n,
|
|
2525
|
-
...r
|
|
2526
|
-
};
|
|
2527
|
-
}
|
|
2528
|
-
return t && (r.timeZone = si, ["full", "long"].includes(r.J) && (r.J = "medium")), r;
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
function Q(e, n = an, t = 0) {
|
|
2532
|
-
const [o,,, r] = e;
|
|
2533
|
-
return (i, a = Na, ...s) => {
|
|
2534
|
-
const c = n(r && r(...s), i, a, o, t),
|
|
2535
|
-
u = c.resolvedOptions();
|
|
2536
|
-
return [c, ...toEpochMillis(e, u, s)];
|
|
2537
|
-
};
|
|
2538
|
-
}
|
|
2539
|
-
function an(e, n, t, o, r) {
|
|
2540
|
-
if (t = o(t, r), e) {
|
|
2541
|
-
if (void 0 !== t.timeZone) {
|
|
2542
|
-
throw new TypeError(So);
|
|
2543
|
-
}
|
|
2544
|
-
t.timeZone = e;
|
|
2545
|
-
}
|
|
2546
|
-
return new en(n, t);
|
|
2547
|
-
}
|
|
2548
|
-
function toEpochMillis(e, n, t) {
|
|
2549
|
-
const [, o, r] = e;
|
|
2550
|
-
return t.map(e => (e.calendar && ((e, n, t) => {
|
|
2551
|
-
if ((t || e !== l) && e !== n) {
|
|
2552
|
-
throw new RangeError(lo);
|
|
2553
|
-
}
|
|
2554
|
-
})(e.calendar, n.calendar, r), o(e, n)));
|
|
2555
|
-
}
|
|
2556
|
-
function ge(e, n, t) {
|
|
2557
|
-
const o = n.timeZone,
|
|
2558
|
-
r = e(o),
|
|
2559
|
-
i = {
|
|
2560
|
-
...he(n, r),
|
|
2561
|
-
...(t || Nt)
|
|
2562
|
-
};
|
|
2563
|
-
let a;
|
|
2564
|
-
return a = t ? getMatchingInstantFor(r, i, i.offsetNanoseconds, 2) : getStartOfDayInstantFor(r, i), _e(a, o, n.calendar);
|
|
2565
|
-
}
|
|
2566
|
-
function Ot(e, n = Nt) {
|
|
2567
|
-
return jt(checkIsoDateTimeInBounds({
|
|
2568
|
-
...e,
|
|
2569
|
-
...n
|
|
2570
|
-
}));
|
|
2571
|
-
}
|
|
2572
|
-
function pt(e, n) {
|
|
2573
|
-
return {
|
|
2574
|
-
...e,
|
|
2575
|
-
calendar: n
|
|
2576
|
-
};
|
|
2577
|
-
}
|
|
2578
|
-
function Pe(e, n) {
|
|
2579
|
-
return {
|
|
2580
|
-
...e,
|
|
2581
|
-
timeZone: n
|
|
2582
|
-
};
|
|
2583
|
-
}
|
|
2584
|
-
function tn(e) {
|
|
2585
|
-
const n = Xe();
|
|
2586
|
-
return epochNanoToIso(n, e.R(n));
|
|
2587
|
-
}
|
|
2588
|
-
function Xe() {
|
|
2589
|
-
return Ge(Date.now(), Qe);
|
|
2590
|
-
}
|
|
2591
|
-
function Ue() {
|
|
2592
|
-
return va || (va = new en().resolvedOptions().timeZone);
|
|
2593
|
-
}
|
|
2594
|
-
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`,
|
|
2595
|
-
expectedPositive = (e, n) => `Non-positive ${e}: ${n}`,
|
|
2596
|
-
expectedFinite = (e, n) => `Non-finite ${e}: ${n}`,
|
|
2597
|
-
forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`,
|
|
2598
|
-
invalidBigInt = e => `Invalid bigint: ${e}`,
|
|
2599
|
-
no = "Cannot convert Symbol to string",
|
|
2600
|
-
oo = "Invalid object",
|
|
2601
|
-
numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`,
|
|
2602
|
-
invalidEntity = (e, n) => `Invalid ${e}: ${n}`,
|
|
2603
|
-
missingField = e => `Missing ${e}`,
|
|
2604
|
-
forbiddenField = e => `Invalid field ${e}`,
|
|
2605
|
-
duplicateFields = e => `Duplicate field ${e}`,
|
|
2606
|
-
noValidFields = e => "No valid fields: " + e.join(),
|
|
2607
|
-
i = "Invalid bag",
|
|
2608
|
-
invalidChoice = (e, n, t) => invalidEntity(e, n) + "; must be " + Object.keys(t).join(),
|
|
2609
|
-
b = "Cannot use valueOf",
|
|
2610
|
-
a = "Invalid calling context",
|
|
2611
|
-
ro = "Forbidden era/eraYear",
|
|
2612
|
-
io = "Mismatching era/eraYear",
|
|
2613
|
-
ao = "Mismatching year/eraYear",
|
|
2614
|
-
invalidEra = e => `Invalid era: ${e}`,
|
|
2615
|
-
missingYear = e => "Missing year" + (e ? "/era/eraYear" : ""),
|
|
2616
|
-
invalidMonthCode = e => `Invalid monthCode: ${e}`,
|
|
2617
|
-
so = "Mismatching month/monthCode",
|
|
2618
|
-
co = "Missing month/monthCode",
|
|
2619
|
-
uo = "Invalid leap month",
|
|
2620
|
-
fo = "Invalid protocol results",
|
|
2621
|
-
c = e => invalidEntity("Calendar", e),
|
|
2622
|
-
lo = "Mismatching Calendars",
|
|
2623
|
-
F = e => invalidEntity("TimeZone", e),
|
|
2624
|
-
mo = "Mismatching TimeZones",
|
|
2625
|
-
po = "Forbidden ICU TimeZone",
|
|
2626
|
-
ho = "Out-of-bounds offset",
|
|
2627
|
-
go = "Out-of-bounds TimeZone gap",
|
|
2628
|
-
Do = "Invalid TimeZone offset",
|
|
2629
|
-
To = "Ambiguous offset",
|
|
2630
|
-
Io = "Out-of-bounds date",
|
|
2631
|
-
Mo = "Out-of-bounds duration",
|
|
2632
|
-
No = "Cannot mix duration signs",
|
|
2633
|
-
yo = "Missing relativeTo",
|
|
2634
|
-
vo = "Cannot use large units",
|
|
2635
|
-
Po = "Required smallestUnit or largestUnit",
|
|
2636
|
-
Eo = "smallestUnit > largestUnit",
|
|
2637
|
-
failedParse = e => `Cannot parse: ${e}`,
|
|
2638
|
-
invalidSubstring = e => `Invalid substring: ${e}`,
|
|
2639
|
-
rn = e => `Cannot format ${e}`,
|
|
2640
|
-
ln = "Mismatching types for formatting",
|
|
2641
|
-
So = "Cannot specify TimeZone",
|
|
2642
|
-
Fo = /*@__PURE__*/Pt(g, (e, n) => n),
|
|
2643
|
-
wo = /*@__PURE__*/Pt(g, (e, n, t) => t),
|
|
2644
|
-
bo = /*@__PURE__*/Pt(padNumber, 2),
|
|
2645
|
-
Oo = {
|
|
2646
|
-
nanosecond: 0,
|
|
2647
|
-
microsecond: 1,
|
|
2648
|
-
millisecond: 2,
|
|
2649
|
-
second: 3,
|
|
2650
|
-
minute: 4,
|
|
2651
|
-
hour: 5,
|
|
2652
|
-
day: 6,
|
|
2653
|
-
week: 7,
|
|
2654
|
-
month: 8,
|
|
2655
|
-
year: 9
|
|
2656
|
-
},
|
|
2657
|
-
Bo = /*@__PURE__*/Object.keys(Oo),
|
|
2658
|
-
ko = 864e5,
|
|
2659
|
-
Co = 1e3,
|
|
2660
|
-
Yo = 1e3,
|
|
2661
|
-
Qe = 1e6,
|
|
2662
|
-
Ro = 1e9,
|
|
2663
|
-
Zo = 6e10,
|
|
2664
|
-
zo = 36e11,
|
|
2665
|
-
Uo = 864e11,
|
|
2666
|
-
Ao = [1, Yo, Qe, Ro, Zo, zo, Uo],
|
|
2667
|
-
O = /*@__PURE__*/Bo.slice(0, 6),
|
|
2668
|
-
qo = /*@__PURE__*/sortStrings(O),
|
|
2669
|
-
Wo = ["offset"],
|
|
2670
|
-
jo = ["timeZone"],
|
|
2671
|
-
Lo = /*@__PURE__*/O.concat(Wo),
|
|
2672
|
-
xo = /*@__PURE__*/Lo.concat(jo),
|
|
2673
|
-
$o = ["era", "eraYear"],
|
|
2674
|
-
Ho = /*@__PURE__*/$o.concat(["year"]),
|
|
2675
|
-
Go = ["year"],
|
|
2676
|
-
Vo = ["monthCode"],
|
|
2677
|
-
_o = /*@__PURE__*/["month"].concat(Vo),
|
|
2678
|
-
Jo = ["day"],
|
|
2679
|
-
Ko = /*@__PURE__*/_o.concat(Go),
|
|
2680
|
-
Qo = /*@__PURE__*/Vo.concat(Go),
|
|
2681
|
-
Xo = /*@__PURE__*/Jo.concat(Ko),
|
|
2682
|
-
er = /*@__PURE__*/Jo.concat(_o),
|
|
2683
|
-
nr = /*@__PURE__*/Jo.concat(Vo),
|
|
2684
|
-
tr = /*@__PURE__*/wo(O, 0),
|
|
2685
|
-
l = "iso8601",
|
|
2686
|
-
or = "gregory",
|
|
2687
|
-
rr = "japanese",
|
|
2688
|
-
ir = {
|
|
2689
|
-
[or]: {
|
|
2690
|
-
"gregory-inverse": -1,
|
|
2691
|
-
gregory: 0
|
|
2692
|
-
},
|
|
2693
|
-
[rr]: {
|
|
2694
|
-
"japanese-inverse": -1,
|
|
2695
|
-
japanese: 0,
|
|
2696
|
-
meiji: 1867,
|
|
2697
|
-
taisho: 1911,
|
|
2698
|
-
showa: 1925,
|
|
2699
|
-
heisei: 1988,
|
|
2700
|
-
reiwa: 2018
|
|
2701
|
-
},
|
|
2702
|
-
ethiopic: {
|
|
2703
|
-
ethioaa: 0,
|
|
2704
|
-
ethiopic: 5500
|
|
2705
|
-
},
|
|
2706
|
-
coptic: {
|
|
2707
|
-
"coptic-inverse": -1,
|
|
2708
|
-
coptic: 0
|
|
2709
|
-
},
|
|
2710
|
-
roc: {
|
|
2711
|
-
"roc-inverse": -1,
|
|
2712
|
-
roc: 0
|
|
2713
|
-
},
|
|
2714
|
-
buddhist: {
|
|
2715
|
-
be: 0
|
|
2716
|
-
},
|
|
2717
|
-
islamic: {
|
|
2718
|
-
ah: 0
|
|
2719
|
-
},
|
|
2720
|
-
indian: {
|
|
2721
|
-
saka: 0
|
|
2722
|
-
},
|
|
2723
|
-
persian: {
|
|
2724
|
-
ap: 0
|
|
2725
|
-
}
|
|
2726
|
-
},
|
|
2727
|
-
ar = {
|
|
2728
|
-
[or]: {
|
|
2729
|
-
bce: "gregory-inverse",
|
|
2730
|
-
ce: "gregory"
|
|
2731
|
-
},
|
|
2732
|
-
[rr]: {
|
|
2733
|
-
bce: "japanese-inverse",
|
|
2734
|
-
ce: "japanese"
|
|
2735
|
-
},
|
|
2736
|
-
ethiopic: {
|
|
2737
|
-
era0: "ethioaa",
|
|
2738
|
-
era1: "ethiopic"
|
|
2739
|
-
},
|
|
2740
|
-
coptic: {
|
|
2741
|
-
era0: "coptic-inverse",
|
|
2742
|
-
era1: "coptic"
|
|
2743
|
-
},
|
|
2744
|
-
roc: {
|
|
2745
|
-
broc: "roc-inverse",
|
|
2746
|
-
minguo: "roc"
|
|
2747
|
-
}
|
|
2748
|
-
},
|
|
2749
|
-
sr = {
|
|
2750
|
-
chinese: 13,
|
|
2751
|
-
dangi: 13,
|
|
2752
|
-
hebrew: -6
|
|
2753
|
-
},
|
|
2754
|
-
m = /*@__PURE__*/Pt(requireType, "string"),
|
|
2755
|
-
D = /*@__PURE__*/Pt(requireType, "boolean"),
|
|
2756
|
-
cr = /*@__PURE__*/Pt(requireType, "number"),
|
|
2757
|
-
p = /*@__PURE__*/Bo.map(e => e + "s"),
|
|
2758
|
-
ur = /*@__PURE__*/sortStrings(p),
|
|
2759
|
-
fr = /*@__PURE__*/p.slice(0, 6),
|
|
2760
|
-
lr = /*@__PURE__*/p.slice(6),
|
|
2761
|
-
dr = /*@__PURE__*/lr.slice(1),
|
|
2762
|
-
mr = /*@__PURE__*/Fo(p),
|
|
2763
|
-
pr = /*@__PURE__*/wo(p, 0),
|
|
2764
|
-
hr = /*@__PURE__*/wo(fr, 0),
|
|
2765
|
-
gr = /*@__PURE__*/Pt(zeroOutProps, p),
|
|
2766
|
-
w = ["isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour"],
|
|
2767
|
-
Dr = ["isoDay", "isoMonth", "isoYear"],
|
|
2768
|
-
Tr = /*@__PURE__*/w.concat(Dr),
|
|
2769
|
-
Ir = /*@__PURE__*/sortStrings(Dr),
|
|
2770
|
-
Mr = /*@__PURE__*/sortStrings(w),
|
|
2771
|
-
Nr = /*@__PURE__*/sortStrings(Tr),
|
|
2772
|
-
Nt = /*@__PURE__*/wo(Mr, 0),
|
|
2773
|
-
yr = /*@__PURE__*/Pt(zeroOutProps, Tr),
|
|
2774
|
-
vr = 1e8,
|
|
2775
|
-
Pr = vr * ko,
|
|
2776
|
-
Er = [vr, 0],
|
|
2777
|
-
Sr = [-vr, 0],
|
|
2778
|
-
Fr = 275760,
|
|
2779
|
-
wr = -271821,
|
|
2780
|
-
en = Intl.DateTimeFormat,
|
|
2781
|
-
br = "en-GB",
|
|
2782
|
-
Or = 1970,
|
|
2783
|
-
Br = 1972,
|
|
2784
|
-
kr = 12,
|
|
2785
|
-
Cr = /*@__PURE__*/isoArgsToEpochMilli(1868, 9, 8),
|
|
2786
|
-
Yr = /*@__PURE__*/on(computeJapaneseEraParts, WeakMap),
|
|
2787
|
-
Rr = "smallestUnit",
|
|
2788
|
-
Zr = "unit",
|
|
2789
|
-
zr = "roundingIncrement",
|
|
2790
|
-
Ur = "fractionalSecondDigits",
|
|
2791
|
-
Ar = "relativeTo",
|
|
2792
|
-
qr = "direction",
|
|
2793
|
-
Wr = {
|
|
2794
|
-
constrain: 0,
|
|
2795
|
-
reject: 1
|
|
2796
|
-
},
|
|
2797
|
-
jr$1 = /*@__PURE__*/Object.keys(Wr),
|
|
2798
|
-
Lr = {
|
|
2799
|
-
compatible: 0,
|
|
2800
|
-
reject: 1,
|
|
2801
|
-
earlier: 2,
|
|
2802
|
-
later: 3
|
|
2803
|
-
},
|
|
2804
|
-
xr = {
|
|
2805
|
-
reject: 0,
|
|
2806
|
-
use: 1,
|
|
2807
|
-
prefer: 2,
|
|
2808
|
-
ignore: 3
|
|
2809
|
-
},
|
|
2810
|
-
$r = {
|
|
2811
|
-
auto: 0,
|
|
2812
|
-
never: 1,
|
|
2813
|
-
critical: 2,
|
|
2814
|
-
always: 3
|
|
2815
|
-
},
|
|
2816
|
-
Hr = {
|
|
2817
|
-
auto: 0,
|
|
2818
|
-
never: 1,
|
|
2819
|
-
critical: 2
|
|
2820
|
-
},
|
|
2821
|
-
Gr = {
|
|
2822
|
-
auto: 0,
|
|
2823
|
-
never: 1
|
|
2824
|
-
},
|
|
2825
|
-
Vr = {
|
|
2826
|
-
floor: 0,
|
|
2827
|
-
halfFloor: 1,
|
|
2828
|
-
ceil: 2,
|
|
2829
|
-
halfCeil: 3,
|
|
2830
|
-
trunc: 4,
|
|
2831
|
-
halfTrunc: 5,
|
|
2832
|
-
expand: 6,
|
|
2833
|
-
halfExpand: 7,
|
|
2834
|
-
halfEven: 8
|
|
2835
|
-
},
|
|
2836
|
-
_r = {
|
|
2837
|
-
previous: -1,
|
|
2838
|
-
next: 1
|
|
2839
|
-
},
|
|
2840
|
-
Jr = /*@__PURE__*/Pt(refineUnitOption, Rr),
|
|
2841
|
-
Kr = /*@__PURE__*/Pt(refineUnitOption, "largestUnit"),
|
|
2842
|
-
Qr = /*@__PURE__*/Pt(refineUnitOption, Zr),
|
|
2843
|
-
Xr = /*@__PURE__*/Pt(refineChoiceOption, "overflow", Wr),
|
|
2844
|
-
ei = /*@__PURE__*/Pt(refineChoiceOption, "disambiguation", Lr),
|
|
2845
|
-
ni = /*@__PURE__*/Pt(refineChoiceOption, "offset", xr),
|
|
2846
|
-
ti = /*@__PURE__*/Pt(refineChoiceOption, "calendarName", $r),
|
|
2847
|
-
oi = /*@__PURE__*/Pt(refineChoiceOption, "timeZoneName", Hr),
|
|
2848
|
-
ri = /*@__PURE__*/Pt(refineChoiceOption, "offset", Gr),
|
|
2849
|
-
ii = /*@__PURE__*/Pt(refineChoiceOption, "roundingMode", Vr),
|
|
2850
|
-
Ut = "PlainYearMonth",
|
|
2851
|
-
qt = "PlainMonthDay",
|
|
2852
|
-
G = "PlainDate",
|
|
2853
|
-
x = "PlainDateTime",
|
|
2854
|
-
ft = "PlainTime",
|
|
2855
|
-
z = "ZonedDateTime",
|
|
2856
|
-
Re = "Instant",
|
|
2857
|
-
N = "Duration",
|
|
2858
|
-
ai = [Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e)],
|
|
2859
|
-
si = "UTC",
|
|
2860
|
-
ci = 5184e3,
|
|
2861
|
-
ui = /*@__PURE__*/isoArgsToEpochSec(1847),
|
|
2862
|
-
fi = /*@__PURE__*/isoArgsToEpochSec(/*@__PURE__*/(/*@__PURE__*/new Date()).getUTCFullYear() + 10),
|
|
2863
|
-
li = /0+$/,
|
|
2864
|
-
he = /*@__PURE__*/on(_zonedEpochSlotsToIso, WeakMap),
|
|
2865
|
-
di = 2 ** 32 - 1,
|
|
2866
|
-
L = /*@__PURE__*/on(e => {
|
|
2867
|
-
const n = getTimeZoneEssence(e);
|
|
2868
|
-
return "object" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);
|
|
2869
|
-
});
|
|
2870
|
-
class FixedTimeZone {
|
|
2871
|
-
constructor(e) {
|
|
2872
|
-
this.$ = e;
|
|
2873
|
-
}
|
|
2874
|
-
R() {
|
|
2875
|
-
return this.$;
|
|
2876
|
-
}
|
|
2877
|
-
I(e) {
|
|
2878
|
-
return (e => {
|
|
2879
|
-
const n = isoToEpochNano({
|
|
2880
|
-
...e,
|
|
2881
|
-
...Nt
|
|
2882
|
-
});
|
|
2883
|
-
if (!n || Math.abs(n[0]) > 1e8) {
|
|
2884
|
-
throw new RangeError(Io);
|
|
2885
|
-
}
|
|
2886
|
-
})(e), [isoToEpochNanoWithOffset(e, this.$)];
|
|
2887
|
-
}
|
|
2888
|
-
O() {}
|
|
2889
|
-
}
|
|
2890
|
-
class IntlTimeZone {
|
|
2891
|
-
constructor(e) {
|
|
2892
|
-
this.nn = (e => {
|
|
2893
|
-
function getOffsetSec(e) {
|
|
2894
|
-
const i = clampNumber(e, o, r),
|
|
2895
|
-
[a, s] = computePeriod(i),
|
|
2896
|
-
c = n(a),
|
|
2897
|
-
u = n(s);
|
|
2898
|
-
return c === u ? c : pinch(t(a, s), c, u, e);
|
|
2899
|
-
}
|
|
2900
|
-
function pinch(n, t, o, r) {
|
|
2901
|
-
let i, a;
|
|
2902
|
-
for (; (void 0 === r || void 0 === (i = r < n[0] ? t : r >= n[1] ? o : void 0)) && (a = n[1] - n[0]);) {
|
|
2903
|
-
const t = n[0] + Math.floor(a / 2);
|
|
2904
|
-
e(t) === o ? n[1] = t : n[0] = t + 1;
|
|
2905
|
-
}
|
|
2906
|
-
return i;
|
|
2907
|
-
}
|
|
2908
|
-
const n = on(e),
|
|
2909
|
-
t = on(createSplitTuple);
|
|
2910
|
-
let o = ui,
|
|
2911
|
-
r = fi;
|
|
2912
|
-
return {
|
|
2913
|
-
tn(e) {
|
|
2914
|
-
const n = getOffsetSec(e - 86400),
|
|
2915
|
-
t = getOffsetSec(e + 86400),
|
|
2916
|
-
o = e - n,
|
|
2917
|
-
r = e - t;
|
|
2918
|
-
if (n === t) {
|
|
2919
|
-
return [o];
|
|
2920
|
-
}
|
|
2921
|
-
const i = getOffsetSec(o);
|
|
2922
|
-
return i === getOffsetSec(r) ? [e - i] : n > t ? [o, r] : [];
|
|
2923
|
-
},
|
|
2924
|
-
rn: getOffsetSec,
|
|
2925
|
-
O(e, i) {
|
|
2926
|
-
const a = clampNumber(e, o, r);
|
|
2927
|
-
let [s, c] = computePeriod(a);
|
|
2928
|
-
const u = ci * i,
|
|
2929
|
-
f = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a, 0);
|
|
2930
|
-
for (; f();) {
|
|
2931
|
-
const o = n(s),
|
|
2932
|
-
r = n(c);
|
|
2933
|
-
if (o !== r) {
|
|
2934
|
-
const n = t(s, c);
|
|
2935
|
-
pinch(n, o, r);
|
|
2936
|
-
const a = n[0];
|
|
2937
|
-
if ((compareNumbers(a, e) || 1) === i) {
|
|
2938
|
-
return a;
|
|
2939
|
-
}
|
|
2940
|
-
}
|
|
2941
|
-
s += u, c += u;
|
|
2942
|
-
}
|
|
2943
|
-
}
|
|
2944
|
-
};
|
|
2945
|
-
})((e => n => {
|
|
2946
|
-
const t = hashIntlFormatParts(e, n * Co);
|
|
2947
|
-
return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;
|
|
2948
|
-
})(e));
|
|
2949
|
-
}
|
|
2950
|
-
R(e) {
|
|
2951
|
-
return this.nn.rn((e => epochNanoToSecMod(e)[0])(e)) * Ro;
|
|
2952
|
-
}
|
|
2953
|
-
I(e) {
|
|
2954
|
-
const [n, t] = [isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * Qe + o.isoMicrosecond * Yo + o.isoNanosecond];
|
|
2955
|
-
var o;
|
|
2956
|
-
return this.nn.tn(n).map(e => checkEpochNanoInBounds(moveBigNano(Ge(e, Ro), t)));
|
|
2957
|
-
}
|
|
2958
|
-
O(e, n) {
|
|
2959
|
-
const [t, o] = epochNanoToSecMod(e),
|
|
2960
|
-
r = this.nn.O(t + (n > 0 || o ? 1 : 0), n);
|
|
2961
|
-
if (void 0 !== r) {
|
|
2962
|
-
return Ge(r, Ro);
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
}
|
|
2966
|
-
const mi = "([+-])",
|
|
2967
|
-
pi$1 = "(?:[.,](\\d{1,9}))?",
|
|
2968
|
-
hi = `(?:(?:${mi}(\\d{6}))|(\\d{4}))-?(\\d{2})`,
|
|
2969
|
-
gi = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + pi$1 + ")?)?",
|
|
2970
|
-
Di = mi + gi,
|
|
2971
|
-
Ti = hi + "-?(\\d{2})(?:[T ]" + gi + "(Z|" + Di + ")?)?",
|
|
2972
|
-
Ii = "\\[(!?)([^\\]]*)\\]",
|
|
2973
|
-
Mi = `((?:${Ii}){0,9})`,
|
|
2974
|
-
Ni = /*@__PURE__*/createRegExp(hi + Mi),
|
|
2975
|
-
yi = /*@__PURE__*/createRegExp("(?:--)?(\\d{2})-?(\\d{2})" + Mi),
|
|
2976
|
-
vi = /*@__PURE__*/createRegExp(Ti + Mi),
|
|
2977
|
-
Pi = /*@__PURE__*/createRegExp("T?" + gi + "(?:" + Di + ")?" + Mi),
|
|
2978
|
-
Ei = /*@__PURE__*/createRegExp(Di),
|
|
2979
|
-
Si = /*@__PURE__*/new RegExp(Ii, "g"),
|
|
2980
|
-
Fi = /*@__PURE__*/createRegExp(`${mi}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${pi$1}H)?(?:(\\d+)${pi$1}M)?(?:(\\d+)${pi$1}S)?)?`),
|
|
2981
|
-
wi = /*@__PURE__*/on(e => new en(br, {
|
|
2982
|
-
timeZone: e,
|
|
2983
|
-
era: "short",
|
|
2984
|
-
year: "numeric",
|
|
2985
|
-
month: "numeric",
|
|
2986
|
-
day: "numeric",
|
|
2987
|
-
hour: "numeric",
|
|
2988
|
-
minute: "numeric",
|
|
2989
|
-
second: "numeric"
|
|
2990
|
-
})),
|
|
2991
|
-
bi = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/,
|
|
2992
|
-
Oi = /[^\w\/:+-]+/,
|
|
2993
|
-
Bi = /^M(\d{2})(L?)$/,
|
|
2994
|
-
ki = /*@__PURE__*/on(createIntlCalendar),
|
|
2995
|
-
Ci = /*@__PURE__*/on(e => new en(br, {
|
|
2996
|
-
calendar: e,
|
|
2997
|
-
timeZone: si,
|
|
2998
|
-
era: "short",
|
|
2999
|
-
year: "numeric",
|
|
3000
|
-
month: "short",
|
|
3001
|
-
day: "numeric"
|
|
3002
|
-
})),
|
|
3003
|
-
Yi = {
|
|
3004
|
-
P(e, n, t) {
|
|
3005
|
-
const o = mt(t);
|
|
3006
|
-
let r,
|
|
3007
|
-
{
|
|
3008
|
-
years: i,
|
|
3009
|
-
months: a,
|
|
3010
|
-
weeks: s,
|
|
3011
|
-
days: c
|
|
3012
|
-
} = n;
|
|
3013
|
-
if (c += durationFieldsToBigNano(n, 5)[0], i || a) {
|
|
3014
|
-
r = ((e, n, t, o, r) => {
|
|
3015
|
-
let [i, a, s] = e.v(n);
|
|
3016
|
-
if (t) {
|
|
3017
|
-
const [n, o] = e.q(i, a);
|
|
3018
|
-
i += t, a = monthCodeNumberToMonth(n, o, e.L(i)), a = clampEntity("month", a, 1, e.B(i), r);
|
|
3019
|
-
}
|
|
3020
|
-
return o && ([i, a] = e.un(i, a, o)), s = clampEntity("day", s, 1, e.U(i, a), r), e.p(i, a, s);
|
|
3021
|
-
})(this, e, i, a, o);
|
|
3022
|
-
} else {
|
|
3023
|
-
if (!s && !c) {
|
|
3024
|
-
return e;
|
|
3025
|
-
}
|
|
3026
|
-
r = isoToEpochMilli(e);
|
|
3027
|
-
}
|
|
3028
|
-
if (void 0 === r) {
|
|
3029
|
-
throw new RangeError(Io);
|
|
3030
|
-
}
|
|
3031
|
-
return r += (7 * s + c) * ko, checkIsoDateInBounds(epochMilliToIso(r));
|
|
3032
|
-
},
|
|
3033
|
-
N(e, n, t) {
|
|
3034
|
-
if (t <= 7) {
|
|
3035
|
-
let o = 0,
|
|
3036
|
-
r = diffDays({
|
|
3037
|
-
...e,
|
|
3038
|
-
...Nt
|
|
3039
|
-
}, {
|
|
3040
|
-
...n,
|
|
3041
|
-
...Nt
|
|
3042
|
-
});
|
|
3043
|
-
return 7 === t && ([o, r] = divModTrunc(r, 7)), {
|
|
3044
|
-
...pr,
|
|
3045
|
-
weeks: o,
|
|
3046
|
-
days: r
|
|
3047
|
-
};
|
|
3048
|
-
}
|
|
3049
|
-
const o = this.v(e),
|
|
3050
|
-
r = this.v(n);
|
|
3051
|
-
let [i, a, s] = ((e, n, t, o, r, i, a) => {
|
|
3052
|
-
let s = r - n,
|
|
3053
|
-
c = i - t,
|
|
3054
|
-
u = a - o;
|
|
3055
|
-
if (s || c) {
|
|
3056
|
-
const f = Math.sign(s || c);
|
|
3057
|
-
let l = e.U(r, i),
|
|
3058
|
-
d = 0;
|
|
3059
|
-
if (Math.sign(u) === -f) {
|
|
3060
|
-
const o = l;
|
|
3061
|
-
[r, i] = e.un(r, i, -f), s = r - n, c = i - t, l = e.U(r, i), d = f < 0 ? -o : l;
|
|
3062
|
-
}
|
|
3063
|
-
if (u = a - Math.min(o, l) + d, s) {
|
|
3064
|
-
const [o, a] = e.q(n, t),
|
|
3065
|
-
[u, l] = e.q(r, i);
|
|
3066
|
-
if (c = u - o || Number(l) - Number(a), Math.sign(c) === -f) {
|
|
3067
|
-
const t = f < 0 && -e.B(r);
|
|
3068
|
-
s = (r -= f) - n, c = i - monthCodeNumberToMonth(o, a, e.L(r)) + (t || e.B(r));
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
}
|
|
3072
|
-
return [s, c, u];
|
|
3073
|
-
})(this, ...o, ...r);
|
|
3074
|
-
return 8 === t && (a += this.cn(i, o[0]), i = 0), {
|
|
3075
|
-
...pr,
|
|
3076
|
-
years: i,
|
|
3077
|
-
months: a,
|
|
3078
|
-
days: s
|
|
3079
|
-
};
|
|
3080
|
-
},
|
|
3081
|
-
F(e, n) {
|
|
3082
|
-
const t = mt(n),
|
|
3083
|
-
o = refineYear(this, e),
|
|
3084
|
-
r = refineMonth(this, e, o, t),
|
|
3085
|
-
i = refineDay(this, e, r, o, t);
|
|
3086
|
-
return W(checkIsoDateInBounds(this.V(o, r, i)), this.id || l);
|
|
3087
|
-
},
|
|
3088
|
-
K(e, n) {
|
|
3089
|
-
const t = mt(n),
|
|
3090
|
-
o = refineYear(this, e),
|
|
3091
|
-
r = refineMonth(this, e, o, t);
|
|
3092
|
-
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.V(o, r, 1)), this.id || l);
|
|
3093
|
-
},
|
|
3094
|
-
_(e, n) {
|
|
3095
|
-
const t = mt(n);
|
|
3096
|
-
let o,
|
|
3097
|
-
r,
|
|
3098
|
-
i,
|
|
3099
|
-
a = void 0 !== e.eraYear || void 0 !== e.year ? refineYear(this, e) : void 0;
|
|
3100
|
-
const s = !this.id;
|
|
3101
|
-
if (void 0 === a && s && (a = Br), void 0 !== a) {
|
|
3102
|
-
const n = refineMonth(this, e, a, t);
|
|
3103
|
-
o = refineDay(this, e, n, a, t);
|
|
3104
|
-
const s = this.L(a);
|
|
3105
|
-
r = monthToMonthCodeNumber(n, s), i = n === s;
|
|
3106
|
-
} else {
|
|
3107
|
-
if (void 0 === e.monthCode) {
|
|
3108
|
-
throw new TypeError(co);
|
|
3109
|
-
}
|
|
3110
|
-
if ([r, i] = parseMonthCode(e.monthCode), this.id && this.id !== or && this.id !== rr) {
|
|
3111
|
-
if (this.id && "coptic" === computeCalendarIdBase(this.id) && 0 === t) {
|
|
3112
|
-
const n = i || 13 !== r ? 30 : 6;
|
|
3113
|
-
o = e.day, o = clampNumber(o, 1, n);
|
|
3114
|
-
} else if (this.id && "chinese" === computeCalendarIdBase(this.id) && 0 === t) {
|
|
3115
|
-
const n = !i || 1 !== r && 9 !== r && 10 !== r && 11 !== r && 12 !== r ? 30 : 29;
|
|
3116
|
-
o = e.day, o = clampNumber(o, 1, n);
|
|
3117
|
-
} else {
|
|
3118
|
-
o = e.day;
|
|
3119
|
-
}
|
|
3120
|
-
} else {
|
|
3121
|
-
o = refineDay(this, e, refineMonth(this, e, Br, t), Br, t);
|
|
3122
|
-
}
|
|
3123
|
-
}
|
|
3124
|
-
const c = this.G(r, i, o);
|
|
3125
|
-
if (!c) {
|
|
3126
|
-
throw new RangeError("Cannot guess year");
|
|
3127
|
-
}
|
|
3128
|
-
const [u, f] = c;
|
|
3129
|
-
return createPlainMonthDaySlots(checkIsoDateInBounds(this.V(u, f, o)), this.id || l);
|
|
3130
|
-
},
|
|
3131
|
-
fields(e) {
|
|
3132
|
-
return getCalendarEraOrigins(this) && e.includes("year") ? [...e, ...$o] : e;
|
|
3133
|
-
},
|
|
3134
|
-
k(e, n) {
|
|
3135
|
-
const t = Object.assign(Object.create(null), e);
|
|
3136
|
-
return spliceFields(t, n, _o), getCalendarEraOrigins(this) && (spliceFields(t, n, Ho), this.id === rr && spliceFields(t, n, er, $o)), t;
|
|
3137
|
-
},
|
|
3138
|
-
inLeapYear(e) {
|
|
3139
|
-
const [n] = this.v(e);
|
|
3140
|
-
return this.sn(n);
|
|
3141
|
-
},
|
|
3142
|
-
monthsInYear(e) {
|
|
3143
|
-
const [n] = this.v(e);
|
|
3144
|
-
return this.B(n);
|
|
3145
|
-
},
|
|
3146
|
-
daysInMonth(e) {
|
|
3147
|
-
const [n, t] = this.v(e);
|
|
3148
|
-
return this.U(n, t);
|
|
3149
|
-
},
|
|
3150
|
-
daysInYear(e) {
|
|
3151
|
-
const [n] = this.v(e);
|
|
3152
|
-
return this.fn(n);
|
|
3153
|
-
},
|
|
3154
|
-
dayOfYear: computeNativeDayOfYear,
|
|
3155
|
-
era(e) {
|
|
3156
|
-
return this.hn(e)[0];
|
|
3157
|
-
},
|
|
3158
|
-
eraYear(e) {
|
|
3159
|
-
return this.hn(e)[1];
|
|
3160
|
-
},
|
|
3161
|
-
monthCode(e) {
|
|
3162
|
-
const [n, t] = this.v(e),
|
|
3163
|
-
[o, r] = this.q(n, t);
|
|
3164
|
-
return formatMonthCode(o, r);
|
|
3165
|
-
},
|
|
3166
|
-
dayOfWeek: computeIsoDayOfWeek,
|
|
3167
|
-
daysInWeek() {
|
|
3168
|
-
return 7;
|
|
3169
|
-
}
|
|
3170
|
-
},
|
|
3171
|
-
Ri = {
|
|
3172
|
-
v: computeIsoDateParts,
|
|
3173
|
-
hn: computeIsoEraParts,
|
|
3174
|
-
q: computeIsoMonthCodeParts
|
|
3175
|
-
},
|
|
3176
|
-
Zi = {
|
|
3177
|
-
dayOfYear: computeNativeDayOfYear,
|
|
3178
|
-
v: computeIsoDateParts,
|
|
3179
|
-
p: isoArgsToEpochMilli
|
|
3180
|
-
},
|
|
3181
|
-
zi = /*@__PURE__*/Object.assign({}, Zi, {
|
|
3182
|
-
weekOfYear: computeNativeWeekOfYear,
|
|
3183
|
-
yearOfWeek: computeNativeYearOfWeek,
|
|
3184
|
-
m(e) {
|
|
3185
|
-
function computeWeekShift(e) {
|
|
3186
|
-
return (7 - e < n ? 7 : 0) - e;
|
|
3187
|
-
}
|
|
3188
|
-
function computeWeeksInYear(e) {
|
|
3189
|
-
const n = computeIsoDaysInYear(f + e),
|
|
3190
|
-
t = e || 1,
|
|
3191
|
-
o = computeWeekShift(modFloor(a + n * t, 7));
|
|
3192
|
-
return c = (n + (o - s) * t) / 7;
|
|
3193
|
-
}
|
|
3194
|
-
const n = this.id ? 1 : 4,
|
|
3195
|
-
t = computeIsoDayOfWeek(e),
|
|
3196
|
-
o = this.dayOfYear(e),
|
|
3197
|
-
r = modFloor(t - 1, 7),
|
|
3198
|
-
i = o - 1,
|
|
3199
|
-
a = modFloor(r - i, 7),
|
|
3200
|
-
s = computeWeekShift(a);
|
|
3201
|
-
let c,
|
|
3202
|
-
u = Math.floor((i - s) / 7) + 1,
|
|
3203
|
-
f = e.isoYear;
|
|
3204
|
-
return u ? u > computeWeeksInYear(0) && (u = 1, f++) : (u = computeWeeksInYear(-1), f--), [u, f, c];
|
|
3205
|
-
}
|
|
3206
|
-
}),
|
|
3207
|
-
Ui = /*@__PURE__*/Object.assign({}, Yi, zi, {
|
|
3208
|
-
v: computeIsoDateParts,
|
|
3209
|
-
hn: computeIsoEraParts,
|
|
3210
|
-
q: computeIsoMonthCodeParts,
|
|
3211
|
-
G(e, n) {
|
|
3212
|
-
if (!n) {
|
|
3213
|
-
return [Br, e];
|
|
3214
|
-
}
|
|
3215
|
-
},
|
|
3216
|
-
sn: computeIsoInLeapYear,
|
|
3217
|
-
L() {},
|
|
3218
|
-
B: computeIsoMonthsInYear,
|
|
3219
|
-
cn: e => e * kr,
|
|
3220
|
-
U: computeIsoDaysInMonth,
|
|
3221
|
-
fn: computeIsoDaysInYear,
|
|
3222
|
-
V: (e, n, t) => ({
|
|
3223
|
-
isoYear: e,
|
|
3224
|
-
isoMonth: n,
|
|
3225
|
-
isoDay: t
|
|
3226
|
-
}),
|
|
3227
|
-
p: isoArgsToEpochMilli,
|
|
3228
|
-
un: (e, n, t) => (e += divTrunc(t, kr), (n += modTrunc(t, kr)) < 1 ? (e--, n += kr) : n > kr && (e++, n -= kr), [e, n]),
|
|
3229
|
-
year(e) {
|
|
3230
|
-
return e.isoYear;
|
|
3231
|
-
},
|
|
3232
|
-
month(e) {
|
|
3233
|
-
return e.isoMonth;
|
|
3234
|
-
},
|
|
3235
|
-
day: e => e.isoDay
|
|
3236
|
-
}),
|
|
3237
|
-
Ai = {
|
|
3238
|
-
v: computeIntlDateParts,
|
|
3239
|
-
hn: computeIntlEraParts,
|
|
3240
|
-
q: computeIntlMonthCodeParts
|
|
3241
|
-
},
|
|
3242
|
-
qi = {
|
|
3243
|
-
dayOfYear: computeNativeDayOfYear,
|
|
3244
|
-
v: computeIntlDateParts,
|
|
3245
|
-
p: computeIntlEpochMilli,
|
|
3246
|
-
weekOfYear: computeNativeWeekOfYear,
|
|
3247
|
-
yearOfWeek: computeNativeYearOfWeek,
|
|
3248
|
-
m() {
|
|
3249
|
-
return [];
|
|
3250
|
-
}
|
|
3251
|
-
},
|
|
3252
|
-
Wi = /*@__PURE__*/Object.assign({}, Yi, qi, {
|
|
3253
|
-
v: computeIntlDateParts,
|
|
3254
|
-
hn: computeIntlEraParts,
|
|
3255
|
-
q: computeIntlMonthCodeParts,
|
|
3256
|
-
G(e, n, t) {
|
|
3257
|
-
const o = this.id && "chinese" === computeCalendarIdBase(this.id) ? ((e, n, t) => {
|
|
3258
|
-
if (n) {
|
|
3259
|
-
switch (e) {
|
|
3260
|
-
case 1:
|
|
3261
|
-
return 1651;
|
|
3262
|
-
case 2:
|
|
3263
|
-
return t < 30 ? 1947 : 1765;
|
|
3264
|
-
case 3:
|
|
3265
|
-
return t < 30 ? 1966 : 1955;
|
|
3266
|
-
case 4:
|
|
3267
|
-
return t < 30 ? 1963 : 1944;
|
|
3268
|
-
case 5:
|
|
3269
|
-
return t < 30 ? 1971 : 1952;
|
|
3270
|
-
case 6:
|
|
3271
|
-
return t < 30 ? 1960 : 1941;
|
|
3272
|
-
case 7:
|
|
3273
|
-
return t < 30 ? 1968 : 1938;
|
|
3274
|
-
case 8:
|
|
3275
|
-
return t < 30 ? 1957 : 1718;
|
|
3276
|
-
case 9:
|
|
3277
|
-
return 1832;
|
|
3278
|
-
case 10:
|
|
3279
|
-
return 1870;
|
|
3280
|
-
case 11:
|
|
3281
|
-
return 1814;
|
|
3282
|
-
case 12:
|
|
3283
|
-
return 1890;
|
|
3284
|
-
}
|
|
3285
|
-
}
|
|
3286
|
-
return 1972;
|
|
3287
|
-
})(e, n, t) : Br;
|
|
3288
|
-
let [r, i, a] = computeIntlDateParts.call(this, {
|
|
3289
|
-
isoYear: o,
|
|
3290
|
-
isoMonth: kr,
|
|
3291
|
-
isoDay: 31
|
|
3292
|
-
});
|
|
3293
|
-
const s = computeIntlLeapMonth.call(this, r),
|
|
3294
|
-
c = i === s;
|
|
3295
|
-
1 === (compareNumbers(e, monthToMonthCodeNumber(i, s)) || compareNumbers(Number(n), Number(c)) || compareNumbers(t, a)) && r--;
|
|
3296
|
-
for (let o = 0; o < 100; o++) {
|
|
3297
|
-
const i = r - o,
|
|
3298
|
-
a = computeIntlLeapMonth.call(this, i),
|
|
3299
|
-
s = monthCodeNumberToMonth(e, n, a);
|
|
3300
|
-
if (n === (s === a) && t <= computeIntlDaysInMonth.call(this, i, s)) {
|
|
3301
|
-
return [i, s];
|
|
3302
|
-
}
|
|
3303
|
-
}
|
|
3304
|
-
},
|
|
3305
|
-
sn(e) {
|
|
3306
|
-
const n = computeIntlDaysInYear.call(this, e);
|
|
3307
|
-
return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);
|
|
3308
|
-
},
|
|
3309
|
-
L: computeIntlLeapMonth,
|
|
3310
|
-
B: computeIntlMonthsInYear,
|
|
3311
|
-
cn(e, n) {
|
|
3312
|
-
const t = n + e,
|
|
3313
|
-
o = Math.sign(e),
|
|
3314
|
-
r = o < 0 ? -1 : 0;
|
|
3315
|
-
let i = 0;
|
|
3316
|
-
for (let e = n; e !== t; e += o) {
|
|
3317
|
-
i += computeIntlMonthsInYear.call(this, e + r);
|
|
3318
|
-
}
|
|
3319
|
-
return i;
|
|
3320
|
-
},
|
|
3321
|
-
U: computeIntlDaysInMonth,
|
|
3322
|
-
fn: computeIntlDaysInYear,
|
|
3323
|
-
V(e, n, t) {
|
|
3324
|
-
return epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t));
|
|
3325
|
-
},
|
|
3326
|
-
p: computeIntlEpochMilli,
|
|
3327
|
-
un(e, n, t) {
|
|
3328
|
-
if (t) {
|
|
3329
|
-
if (n += t, !Number.isSafeInteger(n)) {
|
|
3330
|
-
throw new RangeError(Io);
|
|
3331
|
-
}
|
|
3332
|
-
if (t < 0) {
|
|
3333
|
-
for (; n < 1;) {
|
|
3334
|
-
n += computeIntlMonthsInYear.call(this, --e);
|
|
3335
|
-
}
|
|
3336
|
-
} else {
|
|
3337
|
-
let t;
|
|
3338
|
-
for (; n > (t = computeIntlMonthsInYear.call(this, e));) {
|
|
3339
|
-
n -= t, e++;
|
|
3340
|
-
}
|
|
3341
|
-
}
|
|
3342
|
-
}
|
|
3343
|
-
return [e, n];
|
|
3344
|
-
},
|
|
3345
|
-
year(e) {
|
|
3346
|
-
return this.h(e).year;
|
|
3347
|
-
},
|
|
3348
|
-
month(e) {
|
|
3349
|
-
const {
|
|
3350
|
-
year: n,
|
|
3351
|
-
o: t
|
|
3352
|
-
} = this.h(e),
|
|
3353
|
-
{
|
|
3354
|
-
u: o
|
|
3355
|
-
} = this.l(n);
|
|
3356
|
-
return o[t] + 1;
|
|
3357
|
-
},
|
|
3358
|
-
day(e) {
|
|
3359
|
-
return this.h(e).day;
|
|
3360
|
-
}
|
|
3361
|
-
}),
|
|
3362
|
-
ji = /*@__PURE__*/createNativeOpsCreator(Ri, Ai),
|
|
3363
|
-
C = /*@__PURE__*/createNativeOpsCreator(Ui, Wi),
|
|
3364
|
-
Li = {
|
|
3365
|
-
...{
|
|
3366
|
-
era: toStringViaPrimitive,
|
|
3367
|
-
eraYear: toInteger,
|
|
3368
|
-
year: toInteger,
|
|
3369
|
-
month: toPositiveInteger,
|
|
3370
|
-
monthCode(e) {
|
|
3371
|
-
const n = toStringViaPrimitive(e);
|
|
3372
|
-
return parseMonthCode(n), n;
|
|
3373
|
-
},
|
|
3374
|
-
day: toPositiveInteger
|
|
3375
|
-
},
|
|
3376
|
-
... /*@__PURE__*/wo(O, toInteger),
|
|
3377
|
-
... /*@__PURE__*/wo(p, toStrictInteger),
|
|
3378
|
-
offset(e) {
|
|
3379
|
-
const n = toStringViaPrimitive(e);
|
|
3380
|
-
return parseOffsetNano(n), n;
|
|
3381
|
-
}
|
|
3382
|
-
},
|
|
3383
|
-
xi = /*@__PURE__*/Pt(remapProps, O, w),
|
|
3384
|
-
$i = /*@__PURE__*/Pt(remapProps, w, O),
|
|
3385
|
-
Hi = "numeric",
|
|
3386
|
-
Gi = ["timeZoneName"],
|
|
3387
|
-
Vi = {
|
|
3388
|
-
month: Hi,
|
|
3389
|
-
day: Hi
|
|
3390
|
-
},
|
|
3391
|
-
_i = {
|
|
3392
|
-
year: Hi,
|
|
3393
|
-
month: Hi
|
|
3394
|
-
},
|
|
3395
|
-
Ji = /*@__PURE__*/Object.assign({}, _i, {
|
|
3396
|
-
day: Hi
|
|
3397
|
-
}),
|
|
3398
|
-
Ki = {
|
|
3399
|
-
hour: Hi,
|
|
3400
|
-
minute: Hi,
|
|
3401
|
-
second: Hi
|
|
3402
|
-
},
|
|
3403
|
-
Qi = /*@__PURE__*/Object.assign({}, Ji, Ki),
|
|
3404
|
-
Xi = /*@__PURE__*/Object.assign({}, Qi, {
|
|
3405
|
-
timeZoneName: "short"
|
|
3406
|
-
}),
|
|
3407
|
-
ea = /*@__PURE__*/Object.keys(_i),
|
|
3408
|
-
na = /*@__PURE__*/Object.keys(Vi),
|
|
3409
|
-
ta = /*@__PURE__*/Object.keys(Ji),
|
|
3410
|
-
oa = /*@__PURE__*/Object.keys(Ki),
|
|
3411
|
-
ra = ["dateStyle"],
|
|
3412
|
-
ia = /*@__PURE__*/ea.concat(ra),
|
|
3413
|
-
aa = /*@__PURE__*/na.concat(ra),
|
|
3414
|
-
sa = /*@__PURE__*/ta.concat(ra, ["weekday"]),
|
|
3415
|
-
ca = /*@__PURE__*/oa.concat(["dayPeriod", "timeStyle", "fractionalSecondDigits"]),
|
|
3416
|
-
ua = /*@__PURE__*/sa.concat(ca),
|
|
3417
|
-
fa = /*@__PURE__*/Gi.concat(ca),
|
|
3418
|
-
la = /*@__PURE__*/Gi.concat(sa),
|
|
3419
|
-
da = /*@__PURE__*/Gi.concat(["day", "weekday"], ca),
|
|
3420
|
-
ma = /*@__PURE__*/Gi.concat(["year", "weekday"], ca),
|
|
3421
|
-
pa = /*@__PURE__*/createOptionsTransformer(ua, Qi),
|
|
3422
|
-
ha = /*@__PURE__*/createOptionsTransformer(ua, Xi),
|
|
3423
|
-
ga = /*@__PURE__*/createOptionsTransformer(ua, Qi, Gi),
|
|
3424
|
-
Da = /*@__PURE__*/createOptionsTransformer(sa, Ji, fa),
|
|
3425
|
-
Ta = /*@__PURE__*/createOptionsTransformer(ca, Ki, la),
|
|
3426
|
-
Ia = /*@__PURE__*/createOptionsTransformer(ia, _i, da),
|
|
3427
|
-
Ma = /*@__PURE__*/createOptionsTransformer(aa, Vi, ma),
|
|
3428
|
-
Na = {},
|
|
3429
|
-
ya = /*@__PURE__*/new en(void 0, {
|
|
3430
|
-
calendar: l
|
|
3431
|
-
}).resolvedOptions().calendar === l,
|
|
3432
|
-
U = [pa, I],
|
|
3433
|
-
ot = [ha, I, 0, (e, n) => {
|
|
3434
|
-
const t = e.timeZone;
|
|
3435
|
-
if (n && n.timeZone !== t) {
|
|
3436
|
-
throw new RangeError(mo);
|
|
3437
|
-
}
|
|
3438
|
-
return t;
|
|
3439
|
-
}],
|
|
3440
|
-
X = [ga, isoToEpochMilli],
|
|
3441
|
-
_ = [Da, isoToEpochMilli],
|
|
3442
|
-
tt = [Ta, e => isoTimeFieldsToNano(e) / Qe],
|
|
3443
|
-
et = [Ia, isoToEpochMilli, ya],
|
|
3444
|
-
nt = [Ma, isoToEpochMilli, ya];
|
|
3445
|
-
let va;
|
|
3446
|
-
|
|
3447
|
-
function createSlotClass(i, l, s, c, u) {
|
|
3448
|
-
function Class(...t) {
|
|
3449
|
-
if (!(this instanceof Class)) {
|
|
3450
|
-
throw new TypeError(a);
|
|
3451
|
-
}
|
|
3452
|
-
un(this, l(...t));
|
|
3453
|
-
}
|
|
3454
|
-
function bindMethod(t, e) {
|
|
3455
|
-
return Object.defineProperties(function (...e) {
|
|
3456
|
-
return t.call(this, getSpecificSlots(this), ...e);
|
|
3457
|
-
}, r(e));
|
|
3458
|
-
}
|
|
3459
|
-
function getSpecificSlots(t) {
|
|
3460
|
-
const e = cn(t);
|
|
3461
|
-
if (!e || e.branding !== i) {
|
|
3462
|
-
throw new TypeError(a);
|
|
3463
|
-
}
|
|
3464
|
-
return e;
|
|
3465
|
-
}
|
|
3466
|
-
return Object.defineProperties(Class.prototype, {
|
|
3467
|
-
...t(e(bindMethod, s)),
|
|
3468
|
-
...n(e(bindMethod, c)),
|
|
3469
|
-
...o("Temporal." + i)
|
|
3470
|
-
}), Object.defineProperties(Class, {
|
|
3471
|
-
...n(u),
|
|
3472
|
-
...r(i)
|
|
3473
|
-
}), [Class, t => {
|
|
3474
|
-
const e = Object.create(Class.prototype);
|
|
3475
|
-
return un(e, t), e;
|
|
3476
|
-
}, getSpecificSlots];
|
|
3477
|
-
}
|
|
3478
|
-
function rejectInvalidBag(t) {
|
|
3479
|
-
if (cn(t) || void 0 !== t.calendar || void 0 !== t.timeZone) {
|
|
3480
|
-
throw new TypeError(i);
|
|
3481
|
-
}
|
|
3482
|
-
return t;
|
|
3483
|
-
}
|
|
3484
|
-
function getCalendarIdFromBag(t) {
|
|
3485
|
-
return extractCalendarIdFromBag(t) || l;
|
|
3486
|
-
}
|
|
3487
|
-
function extractCalendarIdFromBag(t) {
|
|
3488
|
-
const {
|
|
3489
|
-
calendar: e
|
|
3490
|
-
} = t;
|
|
3491
|
-
if (void 0 !== e) {
|
|
3492
|
-
return refineCalendarArg(e);
|
|
3493
|
-
}
|
|
3494
|
-
}
|
|
3495
|
-
function refineCalendarArg(t) {
|
|
3496
|
-
if (s(t)) {
|
|
3497
|
-
const {
|
|
3498
|
-
calendar: e
|
|
3499
|
-
} = cn(t) || {};
|
|
3500
|
-
if (!e) {
|
|
3501
|
-
throw new TypeError(c(t));
|
|
3502
|
-
}
|
|
3503
|
-
return e;
|
|
3504
|
-
}
|
|
3505
|
-
return (t => u(f(m(t))))(t);
|
|
3506
|
-
}
|
|
3507
|
-
function createCalendarGetters(t) {
|
|
3508
|
-
const e = {};
|
|
3509
|
-
for (const n in t) {
|
|
3510
|
-
e[n] = t => {
|
|
3511
|
-
const {
|
|
3512
|
-
calendar: e
|
|
3513
|
-
} = t;
|
|
3514
|
-
return C(e)[n](t);
|
|
3515
|
-
};
|
|
3516
|
-
}
|
|
3517
|
-
return e;
|
|
3518
|
-
}
|
|
3519
|
-
function neverValueOf() {
|
|
3520
|
-
throw new TypeError(b);
|
|
3521
|
-
}
|
|
3522
|
-
function refineTimeZoneArg(t) {
|
|
3523
|
-
if (s(t)) {
|
|
3524
|
-
const {
|
|
3525
|
-
timeZone: e
|
|
3526
|
-
} = cn(t) || {};
|
|
3527
|
-
if (!e) {
|
|
3528
|
-
throw new TypeError(F(t));
|
|
3529
|
-
}
|
|
3530
|
-
return e;
|
|
3531
|
-
}
|
|
3532
|
-
return (t => M(Z(m(t))))(t);
|
|
3533
|
-
}
|
|
3534
|
-
function toDurationSlots(t) {
|
|
3535
|
-
if (s(t)) {
|
|
3536
|
-
const e = cn(t);
|
|
3537
|
-
return e && e.branding === N ? e : q(t);
|
|
3538
|
-
}
|
|
3539
|
-
return R(t);
|
|
3540
|
-
}
|
|
3541
|
-
function refinePublicRelativeTo(t) {
|
|
3542
|
-
if (void 0 !== t) {
|
|
3543
|
-
if (s(t)) {
|
|
3544
|
-
const e = cn(t) || {};
|
|
3545
|
-
switch (e.branding) {
|
|
3546
|
-
case z:
|
|
3547
|
-
case G:
|
|
3548
|
-
return e;
|
|
3549
|
-
case x:
|
|
3550
|
-
return W(e);
|
|
3551
|
-
}
|
|
3552
|
-
const n = getCalendarIdFromBag(t);
|
|
3553
|
-
return {
|
|
3554
|
-
...$(refineTimeZoneArg, L, C(n), t),
|
|
3555
|
-
calendar: n
|
|
3556
|
-
};
|
|
3557
|
-
}
|
|
3558
|
-
return H(t);
|
|
3559
|
-
}
|
|
3560
|
-
}
|
|
3561
|
-
function toPlainTimeSlots(t, e) {
|
|
3562
|
-
if (s(t)) {
|
|
3563
|
-
const n = cn(t) || {};
|
|
3564
|
-
switch (n.branding) {
|
|
3565
|
-
case ft:
|
|
3566
|
-
return mt(e), n;
|
|
3567
|
-
case x:
|
|
3568
|
-
return mt(e), St(n);
|
|
3569
|
-
case z:
|
|
3570
|
-
return mt(e), dt(L, n);
|
|
3571
|
-
}
|
|
3572
|
-
return Tt(t, e);
|
|
3573
|
-
}
|
|
3574
|
-
const n = ht(t);
|
|
3575
|
-
return mt(e), n;
|
|
3576
|
-
}
|
|
3577
|
-
function optionalToPlainTimeFields(t) {
|
|
3578
|
-
return void 0 === t ? void 0 : toPlainTimeSlots(t);
|
|
3579
|
-
}
|
|
3580
|
-
function toPlainDateTimeSlots(t, e) {
|
|
3581
|
-
if (s(t)) {
|
|
3582
|
-
const n = cn(t) || {};
|
|
3583
|
-
switch (n.branding) {
|
|
3584
|
-
case x:
|
|
3585
|
-
return mt(e), n;
|
|
3586
|
-
case G:
|
|
3587
|
-
return mt(e), jt({
|
|
3588
|
-
...n,
|
|
3589
|
-
...Nt
|
|
3590
|
-
});
|
|
3591
|
-
case z:
|
|
3592
|
-
return mt(e), yt(L, n);
|
|
3593
|
-
}
|
|
3594
|
-
return At(C(getCalendarIdFromBag(t)), t, e);
|
|
3595
|
-
}
|
|
3596
|
-
const n = Bt(t);
|
|
3597
|
-
return mt(e), n;
|
|
3598
|
-
}
|
|
3599
|
-
function toPlainMonthDaySlots(t, e) {
|
|
3600
|
-
if (s(t)) {
|
|
3601
|
-
const n = cn(t);
|
|
3602
|
-
if (n && n.branding === qt) {
|
|
3603
|
-
return mt(e), n;
|
|
3604
|
-
}
|
|
3605
|
-
const o = extractCalendarIdFromBag(t);
|
|
3606
|
-
return Rt(C(o || l), !o, t, e);
|
|
3607
|
-
}
|
|
3608
|
-
const n = xt(C, t);
|
|
3609
|
-
return mt(e), n;
|
|
3610
|
-
}
|
|
3611
|
-
function toPlainYearMonthSlots(t, e) {
|
|
3612
|
-
if (s(t)) {
|
|
3613
|
-
const n = cn(t);
|
|
3614
|
-
return n && n.branding === Ut ? (mt(e), n) : Xt(C(getCalendarIdFromBag(t)), t, e);
|
|
3615
|
-
}
|
|
3616
|
-
const n = _t(C, t);
|
|
3617
|
-
return mt(e), n;
|
|
3618
|
-
}
|
|
3619
|
-
function toPlainDateSlots(t, e) {
|
|
3620
|
-
if (s(t)) {
|
|
3621
|
-
const n = cn(t) || {};
|
|
3622
|
-
switch (n.branding) {
|
|
3623
|
-
case G:
|
|
3624
|
-
return mt(e), n;
|
|
3625
|
-
case x:
|
|
3626
|
-
return mt(e), W(n);
|
|
3627
|
-
case z:
|
|
3628
|
-
return mt(e), fe(L, n);
|
|
3629
|
-
}
|
|
3630
|
-
return me(C(getCalendarIdFromBag(t)), t, e);
|
|
3631
|
-
}
|
|
3632
|
-
const n = de(t);
|
|
3633
|
-
return mt(e), n;
|
|
3634
|
-
}
|
|
3635
|
-
function toZonedDateTimeSlots(t, e) {
|
|
3636
|
-
if (s(t)) {
|
|
3637
|
-
const n = cn(t);
|
|
3638
|
-
if (n && n.branding === z) {
|
|
3639
|
-
return je(e), n;
|
|
3640
|
-
}
|
|
3641
|
-
const o = getCalendarIdFromBag(t);
|
|
3642
|
-
return Ne(refineTimeZoneArg, L, C(o), o, t, e);
|
|
3643
|
-
}
|
|
3644
|
-
return Ae(t, e);
|
|
3645
|
-
}
|
|
3646
|
-
function adaptDateMethods(t) {
|
|
3647
|
-
return e(t => e => t(slotsToIso(e)), t);
|
|
3648
|
-
}
|
|
3649
|
-
function slotsToIso(t) {
|
|
3650
|
-
return he(t, L);
|
|
3651
|
-
}
|
|
3652
|
-
function toInstantSlots(t) {
|
|
3653
|
-
if (s(t)) {
|
|
3654
|
-
const e = cn(t);
|
|
3655
|
-
if (e) {
|
|
3656
|
-
switch (e.branding) {
|
|
3657
|
-
case Re:
|
|
3658
|
-
return e;
|
|
3659
|
-
case z:
|
|
3660
|
-
return xe(e.epochNanoseconds);
|
|
3661
|
-
}
|
|
3662
|
-
}
|
|
3663
|
-
}
|
|
3664
|
-
return We(t);
|
|
3665
|
-
}
|
|
3666
|
-
function createDateTimeFormatClass() {
|
|
3667
|
-
function DateTimeFormatFunc(t, e) {
|
|
3668
|
-
return new DateTimeFormatNew(t, e);
|
|
3669
|
-
}
|
|
3670
|
-
function DateTimeFormatNew(t, e = Object.create(null)) {
|
|
3671
|
-
to.set(this, ((t, e) => {
|
|
3672
|
-
const n = new en(t, e),
|
|
3673
|
-
o = n.resolvedOptions(),
|
|
3674
|
-
r = o.locale,
|
|
3675
|
-
a = nn(Object.keys(e), o),
|
|
3676
|
-
i = on(createFormatPrepperForBranding),
|
|
3677
|
-
prepFormat = (t, ...e) => {
|
|
3678
|
-
if (t) {
|
|
3679
|
-
if (2 !== e.length) {
|
|
3680
|
-
throw new TypeError(ln);
|
|
3681
|
-
}
|
|
3682
|
-
for (const t of e) {
|
|
3683
|
-
if (void 0 === t) {
|
|
3684
|
-
throw new TypeError(ln);
|
|
3685
|
-
}
|
|
3686
|
-
}
|
|
3687
|
-
}
|
|
3688
|
-
t || void 0 !== e[0] || (e = []);
|
|
3689
|
-
const o = e.map(t => cn(t) || Number(t));
|
|
3690
|
-
let l,
|
|
3691
|
-
s = 0;
|
|
3692
|
-
for (const t of o) {
|
|
3693
|
-
const e = "object" == typeof t ? t.branding : void 0;
|
|
3694
|
-
if (s++ && e !== l) {
|
|
3695
|
-
throw new TypeError(ln);
|
|
3696
|
-
}
|
|
3697
|
-
l = e;
|
|
3698
|
-
}
|
|
3699
|
-
return l ? i(l)(r, a, ...o) : [n, ...o];
|
|
3700
|
-
};
|
|
3701
|
-
return prepFormat.X = n, prepFormat;
|
|
3702
|
-
})(t, e));
|
|
3703
|
-
}
|
|
3704
|
-
const t = en.prototype,
|
|
3705
|
-
e = Object.getOwnPropertyDescriptors(t),
|
|
3706
|
-
n = Object.getOwnPropertyDescriptors(en);
|
|
3707
|
-
for (const t in e) {
|
|
3708
|
-
const n = e[t],
|
|
3709
|
-
o = t.startsWith("format") && createFormatMethod(t);
|
|
3710
|
-
"function" == typeof n.value ? n.value = "constructor" === t ? DateTimeFormatFunc : o || createProxiedMethod(t) : o && (n.get = function () {
|
|
3711
|
-
if (!to.has(this)) {
|
|
3712
|
-
throw new TypeError(a);
|
|
3713
|
-
}
|
|
3714
|
-
return (...t) => o.apply(this, t);
|
|
3715
|
-
}, Object.defineProperties(n.get, r(`get ${t}`)));
|
|
3716
|
-
}
|
|
3717
|
-
return n.prototype.value = DateTimeFormatNew.prototype = Object.create({}, e), Object.defineProperties(DateTimeFormatFunc, n), DateTimeFormatFunc;
|
|
3718
|
-
}
|
|
3719
|
-
function createFormatMethod(t) {
|
|
3720
|
-
return Object.defineProperties(function (...e) {
|
|
3721
|
-
const n = to.get(this),
|
|
3722
|
-
[o, ...r] = n(t.includes("Range"), ...e);
|
|
3723
|
-
return o[t](...r);
|
|
3724
|
-
}, r(t));
|
|
3725
|
-
}
|
|
3726
|
-
function createProxiedMethod(t) {
|
|
3727
|
-
return Object.defineProperties(function (...e) {
|
|
3728
|
-
return to.get(this).X[t](...e);
|
|
3729
|
-
}, r(t));
|
|
3730
|
-
}
|
|
3731
|
-
function createFormatPrepperForBranding(t) {
|
|
3732
|
-
const e = Cn[t];
|
|
3733
|
-
if (!e) {
|
|
3734
|
-
throw new TypeError(rn(t));
|
|
3735
|
-
}
|
|
3736
|
-
return Q(e, on(an), 1);
|
|
5
|
+
for (var i = 0; i < m.length; i++) {
|
|
6
|
+
const e = m[i];
|
|
7
|
+
if (typeof e !== 'string' && !Array.isArray(e)) { for (const k in e) {
|
|
8
|
+
if (k !== 'default' && !(k in n)) {
|
|
9
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
if (d) {
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
} }
|
|
18
|
+
}
|
|
19
|
+
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' }));
|
|
3737
20
|
}
|
|
3738
|
-
const sn = /*@__PURE__*/new WeakMap(),
|
|
3739
|
-
cn = /*@__PURE__*/sn.get.bind(sn),
|
|
3740
|
-
un = /*@__PURE__*/sn.set.bind(sn),
|
|
3741
|
-
fn$1 = {
|
|
3742
|
-
era: d,
|
|
3743
|
-
eraYear: S,
|
|
3744
|
-
year: T,
|
|
3745
|
-
month: h,
|
|
3746
|
-
daysInMonth: h,
|
|
3747
|
-
daysInYear: h,
|
|
3748
|
-
inLeapYear: D,
|
|
3749
|
-
monthsInYear: h
|
|
3750
|
-
},
|
|
3751
|
-
mn = {
|
|
3752
|
-
monthCode: m
|
|
3753
|
-
},
|
|
3754
|
-
dn = {
|
|
3755
|
-
day: h
|
|
3756
|
-
},
|
|
3757
|
-
Sn = {
|
|
3758
|
-
dayOfWeek: h,
|
|
3759
|
-
dayOfYear: h,
|
|
3760
|
-
weekOfYear: P,
|
|
3761
|
-
yearOfWeek: S,
|
|
3762
|
-
daysInWeek: h
|
|
3763
|
-
},
|
|
3764
|
-
Tn = /*@__PURE__*/createCalendarGetters(/*@__PURE__*/Object.assign({}, fn$1, mn, dn, Sn)),
|
|
3765
|
-
hn = /*@__PURE__*/createCalendarGetters({
|
|
3766
|
-
...fn$1,
|
|
3767
|
-
...mn
|
|
3768
|
-
}),
|
|
3769
|
-
Dn = /*@__PURE__*/createCalendarGetters({
|
|
3770
|
-
...mn,
|
|
3771
|
-
...dn
|
|
3772
|
-
}),
|
|
3773
|
-
Pn = {
|
|
3774
|
-
calendarId: t => t.calendar
|
|
3775
|
-
},
|
|
3776
|
-
gn = /*@__PURE__*/g(t => e => e[t], p.concat("sign")),
|
|
3777
|
-
pn = /*@__PURE__*/g((t, e) => t => t[w[e]], O),
|
|
3778
|
-
On = {
|
|
3779
|
-
epochMilliseconds: I,
|
|
3780
|
-
epochNanoseconds: v
|
|
3781
|
-
},
|
|
3782
|
-
[wn, In] = createSlotClass(N, j, {
|
|
3783
|
-
...gn,
|
|
3784
|
-
blank: y
|
|
3785
|
-
}, {
|
|
3786
|
-
with: (t, e) => In(A(t, e)),
|
|
3787
|
-
negated: t => In(B(t)),
|
|
3788
|
-
abs: t => In(Y(t)),
|
|
3789
|
-
add: (t, e, n) => In(E(refinePublicRelativeTo, C, L, 0, t, toDurationSlots(e), n)),
|
|
3790
|
-
subtract: (t, e, n) => In(E(refinePublicRelativeTo, C, L, 1, t, toDurationSlots(e), n)),
|
|
3791
|
-
round: (t, e) => In(V(refinePublicRelativeTo, C, L, t, e)),
|
|
3792
|
-
total: (t, e) => J(refinePublicRelativeTo, C, L, t, e),
|
|
3793
|
-
toLocaleString(t, e, n) {
|
|
3794
|
-
return Intl.DurationFormat ? new Intl.DurationFormat(e, n).format(this) : k(t);
|
|
3795
|
-
},
|
|
3796
|
-
toString: k,
|
|
3797
|
-
toJSON: t => k(t),
|
|
3798
|
-
valueOf: neverValueOf
|
|
3799
|
-
}, {
|
|
3800
|
-
from: t => In(toDurationSlots(t)),
|
|
3801
|
-
compare: (t, e, n) => K(refinePublicRelativeTo, C, L, toDurationSlots(t), toDurationSlots(e), n)
|
|
3802
|
-
}),
|
|
3803
|
-
Cn = {
|
|
3804
|
-
Instant: U,
|
|
3805
|
-
PlainDateTime: X,
|
|
3806
|
-
PlainDate: _,
|
|
3807
|
-
PlainTime: tt,
|
|
3808
|
-
PlainYearMonth: et,
|
|
3809
|
-
PlainMonthDay: nt
|
|
3810
|
-
},
|
|
3811
|
-
bn = /*@__PURE__*/Q(U),
|
|
3812
|
-
Fn = /*@__PURE__*/Q(ot),
|
|
3813
|
-
Mn = /*@__PURE__*/Q(X),
|
|
3814
|
-
Zn = /*@__PURE__*/Q(_),
|
|
3815
|
-
yn = /*@__PURE__*/Q(tt),
|
|
3816
|
-
jn = /*@__PURE__*/Q(et),
|
|
3817
|
-
Nn = /*@__PURE__*/Q(nt),
|
|
3818
|
-
[An, Bn] = createSlotClass(ft, ut, pn, {
|
|
3819
|
-
with(t, e, n) {
|
|
3820
|
-
return Bn(rt(this, rejectInvalidBag(e), n));
|
|
3821
|
-
},
|
|
3822
|
-
add: (t, e) => Bn(at(0, t, toDurationSlots(e))),
|
|
3823
|
-
subtract: (t, e) => Bn(at(1, t, toDurationSlots(e))),
|
|
3824
|
-
until: (t, e, n) => In(it(0, t, toPlainTimeSlots(e), n)),
|
|
3825
|
-
since: (t, e, n) => In(it(1, t, toPlainTimeSlots(e), n)),
|
|
3826
|
-
round: (t, e) => Bn(lt(t, e)),
|
|
3827
|
-
equals: (t, e) => st(t, toPlainTimeSlots(e)),
|
|
3828
|
-
toLocaleString(t, e, n) {
|
|
3829
|
-
const [o, r] = yn(e, n, t);
|
|
3830
|
-
return o.format(r);
|
|
3831
|
-
},
|
|
3832
|
-
toString: ct,
|
|
3833
|
-
toJSON: t => ct(t),
|
|
3834
|
-
valueOf: neverValueOf
|
|
3835
|
-
}, {
|
|
3836
|
-
from: (t, e) => Bn(toPlainTimeSlots(t, e)),
|
|
3837
|
-
compare: (t, e) => Dt(toPlainTimeSlots(t), toPlainTimeSlots(e))
|
|
3838
|
-
}),
|
|
3839
|
-
[Yn, En] = createSlotClass(x, Pt(Zt, Mt), {
|
|
3840
|
-
...Pn,
|
|
3841
|
-
...Tn,
|
|
3842
|
-
...pn
|
|
3843
|
-
}, {
|
|
3844
|
-
with: (t, e, n) => En(gt(C, t, rejectInvalidBag(e), n)),
|
|
3845
|
-
withCalendar: (t, e) => En(pt(t, refineCalendarArg(e))),
|
|
3846
|
-
withPlainTime: (t, e) => En(Ot(t, optionalToPlainTimeFields(e))),
|
|
3847
|
-
add: (t, e, n) => En(wt(C, 0, t, toDurationSlots(e), n)),
|
|
3848
|
-
subtract: (t, e, n) => En(wt(C, 1, t, toDurationSlots(e), n)),
|
|
3849
|
-
until: (t, e, n) => In(It(C, 0, t, toPlainDateTimeSlots(e), n)),
|
|
3850
|
-
since: (t, e, n) => In(It(C, 1, t, toPlainDateTimeSlots(e), n)),
|
|
3851
|
-
round: (t, e) => En(vt(t, e)),
|
|
3852
|
-
equals: (t, e) => Ct(t, toPlainDateTimeSlots(e)),
|
|
3853
|
-
toZonedDateTime: (t, e, n) => $n(bt(L, t, refineTimeZoneArg(e), n)),
|
|
3854
|
-
toPlainDate: t => Wn(W(t)),
|
|
3855
|
-
toPlainTime: t => Bn(St(t)),
|
|
3856
|
-
toLocaleString(t, e, n) {
|
|
3857
|
-
const [o, r] = Mn(e, n, t);
|
|
3858
|
-
return o.format(r);
|
|
3859
|
-
},
|
|
3860
|
-
toString: Ft,
|
|
3861
|
-
toJSON: t => Ft(t),
|
|
3862
|
-
valueOf: neverValueOf
|
|
3863
|
-
}, {
|
|
3864
|
-
from: (t, e) => En(toPlainDateTimeSlots(t, e)),
|
|
3865
|
-
compare: (t, e) => Yt(toPlainDateTimeSlots(t), toPlainDateTimeSlots(e))
|
|
3866
|
-
}),
|
|
3867
|
-
[Ln, Vn] = createSlotClass(qt, Pt(kt, Mt), {
|
|
3868
|
-
...Pn,
|
|
3869
|
-
...Dn
|
|
3870
|
-
}, {
|
|
3871
|
-
with: (t, e, n) => Vn(Et(C, t, rejectInvalidBag(e), n)),
|
|
3872
|
-
equals: (t, e) => Lt(t, toPlainMonthDaySlots(e)),
|
|
3873
|
-
toPlainDate(t, e) {
|
|
3874
|
-
return Wn(Vt(C, t, this, e));
|
|
3875
|
-
},
|
|
3876
|
-
toLocaleString(t, e, n) {
|
|
3877
|
-
const [o, r] = Nn(e, n, t);
|
|
3878
|
-
return o.format(r);
|
|
3879
|
-
},
|
|
3880
|
-
toString: Jt,
|
|
3881
|
-
toJSON: t => Jt(t),
|
|
3882
|
-
valueOf: neverValueOf
|
|
3883
|
-
}, {
|
|
3884
|
-
from: (t, e) => Vn(toPlainMonthDaySlots(t, e))
|
|
3885
|
-
}),
|
|
3886
|
-
[kn, qn] = createSlotClass(Ut, Pt(Qt, Mt), {
|
|
3887
|
-
...Pn,
|
|
3888
|
-
...hn
|
|
3889
|
-
}, {
|
|
3890
|
-
with: (t, e, n) => qn(Wt(C, t, rejectInvalidBag(e), n)),
|
|
3891
|
-
add: (t, e, n) => qn(Gt(C, 0, t, toDurationSlots(e), n)),
|
|
3892
|
-
subtract: (t, e, n) => qn(Gt(C, 1, t, toDurationSlots(e), n)),
|
|
3893
|
-
until: (t, e, n) => In(zt(C, 0, t, toPlainYearMonthSlots(e), n)),
|
|
3894
|
-
since: (t, e, n) => In(zt(C, 1, t, toPlainYearMonthSlots(e), n)),
|
|
3895
|
-
equals: (t, e) => $t(t, toPlainYearMonthSlots(e)),
|
|
3896
|
-
toPlainDate(t, e) {
|
|
3897
|
-
return Wn(Ht(C, t, this, e));
|
|
3898
|
-
},
|
|
3899
|
-
toLocaleString(t, e, n) {
|
|
3900
|
-
const [o, r] = jn(e, n, t);
|
|
3901
|
-
return o.format(r);
|
|
3902
|
-
},
|
|
3903
|
-
toString: Kt,
|
|
3904
|
-
toJSON: t => Kt(t),
|
|
3905
|
-
valueOf: neverValueOf
|
|
3906
|
-
}, {
|
|
3907
|
-
from: (t, e) => qn(toPlainYearMonthSlots(t, e)),
|
|
3908
|
-
compare: (t, e) => te(toPlainYearMonthSlots(t), toPlainYearMonthSlots(e))
|
|
3909
|
-
}),
|
|
3910
|
-
[xn, Wn] = createSlotClass(G, Pt(ue, Mt), {
|
|
3911
|
-
...Pn,
|
|
3912
|
-
...Tn
|
|
3913
|
-
}, {
|
|
3914
|
-
with: (t, e, n) => Wn(ee(C, t, rejectInvalidBag(e), n)),
|
|
3915
|
-
withCalendar: (t, e) => Wn(pt(t, refineCalendarArg(e))),
|
|
3916
|
-
add: (t, e, n) => Wn(ne(C, 0, t, toDurationSlots(e), n)),
|
|
3917
|
-
subtract: (t, e, n) => Wn(ne(C, 1, t, toDurationSlots(e), n)),
|
|
3918
|
-
until: (t, e, n) => In(oe(C, 0, t, toPlainDateSlots(e), n)),
|
|
3919
|
-
since: (t, e, n) => In(oe(C, 1, t, toPlainDateSlots(e), n)),
|
|
3920
|
-
equals: (t, e) => re(t, toPlainDateSlots(e)),
|
|
3921
|
-
toZonedDateTime(t, e) {
|
|
3922
|
-
const n = s(e) ? e : {
|
|
3923
|
-
timeZone: e
|
|
3924
|
-
};
|
|
3925
|
-
return $n(ae(refineTimeZoneArg, toPlainTimeSlots, L, t, n));
|
|
3926
|
-
},
|
|
3927
|
-
toPlainDateTime: (t, e) => En(ie(t, optionalToPlainTimeFields(e))),
|
|
3928
|
-
toPlainYearMonth(t) {
|
|
3929
|
-
return qn(le(C, t, this));
|
|
3930
|
-
},
|
|
3931
|
-
toPlainMonthDay(t) {
|
|
3932
|
-
return Vn(se(C, t, this));
|
|
3933
|
-
},
|
|
3934
|
-
toLocaleString(t, e, n) {
|
|
3935
|
-
const [o, r] = Zn(e, n, t);
|
|
3936
|
-
return o.format(r);
|
|
3937
|
-
},
|
|
3938
|
-
toString: ce,
|
|
3939
|
-
toJSON: t => ce(t),
|
|
3940
|
-
valueOf: neverValueOf
|
|
3941
|
-
}, {
|
|
3942
|
-
from: (t, e) => Wn(toPlainDateSlots(t, e)),
|
|
3943
|
-
compare: (t, e) => te(toPlainDateSlots(t), toPlainDateSlots(e))
|
|
3944
|
-
}),
|
|
3945
|
-
[zn, $n] = createSlotClass(z, Pt(ye, Mt, Ze), {
|
|
3946
|
-
...On,
|
|
3947
|
-
...Pn,
|
|
3948
|
-
...adaptDateMethods(Tn),
|
|
3949
|
-
...adaptDateMethods(pn),
|
|
3950
|
-
offset: t => Se(slotsToIso(t).offsetNanoseconds),
|
|
3951
|
-
offsetNanoseconds: t => slotsToIso(t).offsetNanoseconds,
|
|
3952
|
-
timeZoneId: t => t.timeZone,
|
|
3953
|
-
hoursInDay: t => Te(L, t)
|
|
3954
|
-
}, {
|
|
3955
|
-
with: (t, e, n) => $n(De(C, L, t, rejectInvalidBag(e), n)),
|
|
3956
|
-
withCalendar: (t, e) => $n(pt(t, refineCalendarArg(e))),
|
|
3957
|
-
withTimeZone: (t, e) => $n(Pe(t, refineTimeZoneArg(e))),
|
|
3958
|
-
withPlainTime: (t, e) => $n(ge(L, t, optionalToPlainTimeFields(e))),
|
|
3959
|
-
add: (t, e, n) => $n(pe(C, L, 0, t, toDurationSlots(e), n)),
|
|
3960
|
-
subtract: (t, e, n) => $n(pe(C, L, 1, t, toDurationSlots(e), n)),
|
|
3961
|
-
until: (t, e, n) => In(Oe(we(C, L, 0, t, toZonedDateTimeSlots(e), n))),
|
|
3962
|
-
since: (t, e, n) => In(Oe(we(C, L, 1, t, toZonedDateTimeSlots(e), n))),
|
|
3963
|
-
round: (t, e) => $n(Ie(L, t, e)),
|
|
3964
|
-
startOfDay: t => $n(ve(L, t)),
|
|
3965
|
-
equals: (t, e) => Ce(t, toZonedDateTimeSlots(e)),
|
|
3966
|
-
toInstant: t => Kn(be(t)),
|
|
3967
|
-
toPlainDateTime: t => En(yt(L, t)),
|
|
3968
|
-
toPlainDate: t => Wn(fe(L, t)),
|
|
3969
|
-
toPlainTime: t => Bn(dt(L, t)),
|
|
3970
|
-
toLocaleString(t, e, n = {}) {
|
|
3971
|
-
const [o, r] = Fn(e, n, t);
|
|
3972
|
-
return o.format(r);
|
|
3973
|
-
},
|
|
3974
|
-
toString: (t, e) => Fe(L, t, e),
|
|
3975
|
-
toJSON: t => Fe(L, t),
|
|
3976
|
-
valueOf: neverValueOf,
|
|
3977
|
-
getTimeZoneTransition(t, e) {
|
|
3978
|
-
const {
|
|
3979
|
-
timeZone: n,
|
|
3980
|
-
epochNanoseconds: o
|
|
3981
|
-
} = t,
|
|
3982
|
-
r = Me(e),
|
|
3983
|
-
a = L(n).O(o, r);
|
|
3984
|
-
return a ? $n({
|
|
3985
|
-
...t,
|
|
3986
|
-
epochNanoseconds: a
|
|
3987
|
-
}) : null;
|
|
3988
|
-
}
|
|
3989
|
-
}, {
|
|
3990
|
-
from: (t, e) => $n(toZonedDateTimeSlots(t, e)),
|
|
3991
|
-
compare: (t, e) => Be(toZonedDateTimeSlots(t), toZonedDateTimeSlots(e))
|
|
3992
|
-
}),
|
|
3993
|
-
[Hn, Kn] = createSlotClass(Re, qe, On, {
|
|
3994
|
-
add: (t, e) => Kn(Ye(0, t, toDurationSlots(e))),
|
|
3995
|
-
subtract: (t, e) => Kn(Ye(1, t, toDurationSlots(e))),
|
|
3996
|
-
until: (t, e, n) => In(Ee(0, t, toInstantSlots(e), n)),
|
|
3997
|
-
since: (t, e, n) => In(Ee(1, t, toInstantSlots(e), n)),
|
|
3998
|
-
round: (t, e) => Kn(Le(t, e)),
|
|
3999
|
-
equals: (t, e) => Ve(t, toInstantSlots(e)),
|
|
4000
|
-
toZonedDateTimeISO: (t, e) => $n(Je(t, refineTimeZoneArg(e))),
|
|
4001
|
-
toLocaleString(t, e, n) {
|
|
4002
|
-
const [o, r] = bn(e, n, t);
|
|
4003
|
-
return o.format(r);
|
|
4004
|
-
},
|
|
4005
|
-
toString: (t, e) => ke(refineTimeZoneArg, L, t, e),
|
|
4006
|
-
toJSON: t => ke(refineTimeZoneArg, L, t),
|
|
4007
|
-
valueOf: neverValueOf
|
|
4008
|
-
}, {
|
|
4009
|
-
from: t => Kn(toInstantSlots(t)),
|
|
4010
|
-
fromEpochMilliseconds: t => Kn($e(t)),
|
|
4011
|
-
fromEpochNanoseconds: t => Kn(He(t)),
|
|
4012
|
-
compare: (t, e) => Ke(toInstantSlots(t), toInstantSlots(e))
|
|
4013
|
-
}),
|
|
4014
|
-
Un = /*@__PURE__*/Object.defineProperties({}, {
|
|
4015
|
-
...o("Temporal.Now"),
|
|
4016
|
-
...n({
|
|
4017
|
-
timeZoneId: () => Ue(),
|
|
4018
|
-
instant: () => Kn(xe(Xe())),
|
|
4019
|
-
zonedDateTimeISO: (t = Ue()) => $n(_e(Xe(), refineTimeZoneArg(t), l)),
|
|
4020
|
-
plainDateTimeISO: (t = Ue()) => En(jt(tn(L(refineTimeZoneArg(t))), l)),
|
|
4021
|
-
plainDateISO: (t = Ue()) => Wn(W(tn(L(refineTimeZoneArg(t))), l)),
|
|
4022
|
-
plainTimeISO: (t = Ue()) => Bn(St(tn(L(refineTimeZoneArg(t)))))
|
|
4023
|
-
})
|
|
4024
|
-
}),
|
|
4025
|
-
Xn = /*@__PURE__*/Object.defineProperties({}, {
|
|
4026
|
-
...o("Temporal"),
|
|
4027
|
-
...n({
|
|
4028
|
-
PlainYearMonth: kn,
|
|
4029
|
-
PlainMonthDay: Ln,
|
|
4030
|
-
PlainDate: xn,
|
|
4031
|
-
PlainTime: An,
|
|
4032
|
-
PlainDateTime: Yn,
|
|
4033
|
-
ZonedDateTime: zn,
|
|
4034
|
-
Instant: Hn,
|
|
4035
|
-
Duration: wn,
|
|
4036
|
-
Now: Un
|
|
4037
|
-
})
|
|
4038
|
-
}),
|
|
4039
|
-
_n = /*@__PURE__*/createDateTimeFormatClass(),
|
|
4040
|
-
to = /*@__PURE__*/new WeakMap();
|
|
4041
|
-
/*@__PURE__*/Object.defineProperties(Object.create(Intl), n({
|
|
4042
|
-
DateTimeFormat: _n
|
|
4043
|
-
}));
|
|
4044
21
|
|
|
4045
22
|
const extendNodeKindGuards = (base) => {
|
|
4046
23
|
const assertXPathNode = (value, message = "Invalid context node") => {
|
|
@@ -4935,6 +912,9 @@ const staticNamespaces = new StaticNamespaces("xf", XFORMS_NAMESPACE_URI, {
|
|
|
4935
912
|
[XMLNS_PREFIX]: XMLNS_NAMESPACE_URI
|
|
4936
913
|
});
|
|
4937
914
|
const namespaceURIs = new UpsertableMap();
|
|
915
|
+
const clearCache$1 = () => {
|
|
916
|
+
namespaceURIs.clear();
|
|
917
|
+
};
|
|
4938
918
|
class NamespaceResolver {
|
|
4939
919
|
constructor(domProvider, rootNode, referenceNode, contextResolver) {
|
|
4940
920
|
this.domProvider = domProvider;
|
|
@@ -5222,12 +1202,12 @@ const not = new BooleanFunction(
|
|
|
5222
1202
|
);
|
|
5223
1203
|
|
|
5224
1204
|
const boolean$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
1205
|
+
__proto__: null,
|
|
1206
|
+
boolean: boolean$1,
|
|
1207
|
+
false: falseFn,
|
|
1208
|
+
lang,
|
|
1209
|
+
not,
|
|
1210
|
+
true: trueFn
|
|
5231
1211
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
5232
1212
|
|
|
5233
1213
|
class NodeSetFunction extends FunctionImplementation {
|
|
@@ -5385,15 +1365,15 @@ const position$1 = new NumberFunction(
|
|
|
5385
1365
|
);
|
|
5386
1366
|
|
|
5387
1367
|
const nodeset$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
1368
|
+
__proto__: null,
|
|
1369
|
+
count,
|
|
1370
|
+
current,
|
|
1371
|
+
id,
|
|
1372
|
+
last,
|
|
1373
|
+
localName,
|
|
1374
|
+
name,
|
|
1375
|
+
namespaceURI,
|
|
1376
|
+
position: position$1
|
|
5397
1377
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
5398
1378
|
|
|
5399
1379
|
class FunctionAlias extends FunctionImplementation {
|
|
@@ -5492,12 +1472,12 @@ const sum$1 = new NumberFunction(
|
|
|
5492
1472
|
);
|
|
5493
1473
|
|
|
5494
1474
|
const number$3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
1475
|
+
__proto__: null,
|
|
1476
|
+
ceiling,
|
|
1477
|
+
floor,
|
|
1478
|
+
number: number$2,
|
|
1479
|
+
round: round$1,
|
|
1480
|
+
sum: sum$1
|
|
5501
1481
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
5502
1482
|
|
|
5503
1483
|
const escapeRegExp = (value) => value.replace(/[\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
@@ -5643,17 +1623,17 @@ const translate = new StringFunction(
|
|
|
5643
1623
|
);
|
|
5644
1624
|
|
|
5645
1625
|
const string$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
1626
|
+
__proto__: null,
|
|
1627
|
+
concat: concat$1,
|
|
1628
|
+
contains,
|
|
1629
|
+
normalizeSpace,
|
|
1630
|
+
startsWith,
|
|
1631
|
+
string: string$1,
|
|
1632
|
+
stringLength,
|
|
1633
|
+
substring,
|
|
1634
|
+
substringAfter,
|
|
1635
|
+
substringBefore,
|
|
1636
|
+
translate
|
|
5657
1637
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
5658
1638
|
|
|
5659
1639
|
const fn = new FunctionLibrary(FN_NAMESPACE_URI, [
|
|
@@ -6663,6 +2643,9 @@ const toXPathEvaluationResult = (domProvider, resultType, evaluation) => {
|
|
|
6663
2643
|
};
|
|
6664
2644
|
|
|
6665
2645
|
const functions$1 = new FunctionLibraryCollection([fn]);
|
|
2646
|
+
const clearCache = () => {
|
|
2647
|
+
clearCache$1();
|
|
2648
|
+
};
|
|
6666
2649
|
class Evaluator {
|
|
6667
2650
|
domProvider;
|
|
6668
2651
|
// TODO: see notes on cache in `ExpressionParser.ts`, update or remove those
|
|
@@ -6684,7 +2667,7 @@ class Evaluator {
|
|
|
6684
2667
|
this.functions = options.functions ?? functions$1;
|
|
6685
2668
|
this.parseOptions = parseOptions;
|
|
6686
2669
|
this.parser = expressionParser;
|
|
6687
|
-
this.timeZone = timeZoneId ??
|
|
2670
|
+
this.timeZone = timeZoneId ?? Temporal.Now.timeZoneId();
|
|
6688
2671
|
}
|
|
6689
2672
|
/**
|
|
6690
2673
|
* @package - exposed for testing
|
|
@@ -7083,7 +3066,7 @@ const localDateTimeOrDateString = (dateTime) => {
|
|
|
7083
3066
|
const dateTimeString = localDateTimeString(dateTime);
|
|
7084
3067
|
return dateTimeString.replace(/T00:00:00(\.0+)?(Z|[-+]\d{2}:\d{2})?/, "");
|
|
7085
3068
|
};
|
|
7086
|
-
const now = (timeZone) =>
|
|
3069
|
+
const now = (timeZone) => Temporal.Now.zonedDateTimeISO(timeZone);
|
|
7087
3070
|
|
|
7088
3071
|
const INVALID_DATE_TIME_STRING = "Invalid Date";
|
|
7089
3072
|
class DateTimeLikeEvaluation extends ValueEvaluation {
|
|
@@ -7126,7 +3109,7 @@ class DateTimeLikeEvaluation extends ValueEvaluation {
|
|
|
7126
3109
|
const isISODateOrDateTimeLike = (value) => ISO_DATE_OR_DATE_TIME_LIKE_PATTERN.test(value);
|
|
7127
3110
|
const isValidTimeString = (value) => {
|
|
7128
3111
|
try {
|
|
7129
|
-
return
|
|
3112
|
+
return Temporal.PlainTime.from(value) != null;
|
|
7130
3113
|
} catch {
|
|
7131
3114
|
return false;
|
|
7132
3115
|
}
|
|
@@ -7148,7 +3131,7 @@ const dateTimeFromString = (timeZone, value) => {
|
|
|
7148
3131
|
return null;
|
|
7149
3132
|
}
|
|
7150
3133
|
if (value.endsWith("Z")) {
|
|
7151
|
-
return
|
|
3134
|
+
return Temporal.ZonedDateTime.from(value.replace(/Z$/, "[UTC]")).withTimeZone(timeZone);
|
|
7152
3135
|
}
|
|
7153
3136
|
const offsetMatch = TIMEZONE_OFFSET_PATTERN.exec(value);
|
|
7154
3137
|
if (offsetMatch != null && !VALID_OFFSET_VALUE.test(offsetMatch[0])) {
|
|
@@ -7160,9 +3143,9 @@ const dateTimeFromString = (timeZone, value) => {
|
|
|
7160
3143
|
return null;
|
|
7161
3144
|
}
|
|
7162
3145
|
const dateTimeString = `${date.toISOString()}[UTC]`;
|
|
7163
|
-
return
|
|
3146
|
+
return Temporal.ZonedDateTime.from(dateTimeString).withTimeZone(timeZone);
|
|
7164
3147
|
}
|
|
7165
|
-
return
|
|
3148
|
+
return Temporal.PlainDateTime.from(value).toZonedDateTime(timeZone);
|
|
7166
3149
|
};
|
|
7167
3150
|
const toNanoseconds = (milliseconds) => {
|
|
7168
3151
|
return BigInt(Math.round(milliseconds)) * MILLISECOND_NANOSECONDS;
|
|
@@ -7171,7 +3154,7 @@ const dateTimeFromNumber = (timeZone, milliseconds) => {
|
|
|
7171
3154
|
if (Number.isNaN(milliseconds)) {
|
|
7172
3155
|
return null;
|
|
7173
3156
|
}
|
|
7174
|
-
return new
|
|
3157
|
+
return new Temporal.ZonedDateTime(toNanoseconds(milliseconds), timeZone.toString());
|
|
7175
3158
|
};
|
|
7176
3159
|
|
|
7177
3160
|
const today = new FunctionImplementation("today", [], (context) => {
|
|
@@ -7430,14 +3413,14 @@ const decimalTime = new NumberFunction(
|
|
|
7430
3413
|
);
|
|
7431
3414
|
|
|
7432
3415
|
const datetime = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
3416
|
+
__proto__: null,
|
|
3417
|
+
date,
|
|
3418
|
+
decimalDateTime,
|
|
3419
|
+
decimalTime,
|
|
3420
|
+
formatDate,
|
|
3421
|
+
formatDateTime,
|
|
3422
|
+
today,
|
|
3423
|
+
xfNow
|
|
7441
3424
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7442
3425
|
|
|
7443
3426
|
const enk = new FunctionLibrary(ENKETO_NAMESPACE_URI, [
|
|
@@ -7455,8 +3438,8 @@ const itext = new NodeSetFunction(
|
|
|
7455
3438
|
);
|
|
7456
3439
|
|
|
7457
3440
|
const nodeSet = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7458
|
-
|
|
7459
|
-
|
|
3441
|
+
__proto__: null,
|
|
3442
|
+
itext
|
|
7460
3443
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7461
3444
|
|
|
7462
3445
|
const choiceName = new StringFunction(
|
|
@@ -7490,8 +3473,8 @@ const choiceName = new StringFunction(
|
|
|
7490
3473
|
);
|
|
7491
3474
|
|
|
7492
3475
|
const select$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7493
|
-
|
|
7494
|
-
|
|
3476
|
+
__proto__: null,
|
|
3477
|
+
choiceName
|
|
7495
3478
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7496
3479
|
|
|
7497
3480
|
const jr = new FunctionLibrary(JAVAROSA_NAMESPACE_URI, [
|
|
@@ -7601,11 +3584,11 @@ const xfIf = new FunctionImplementation(
|
|
|
7601
3584
|
);
|
|
7602
3585
|
|
|
7603
3586
|
const boolean = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
3587
|
+
__proto__: null,
|
|
3588
|
+
booleanFromString,
|
|
3589
|
+
checklist,
|
|
3590
|
+
weightedChecklist,
|
|
3591
|
+
xfIf
|
|
7609
3592
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7610
3593
|
|
|
7611
3594
|
class JRCompatibleError extends Error {
|
|
@@ -7617,18 +3600,6 @@ class JRCompatibleGeoValueError extends JRCompatibleError {
|
|
|
7617
3600
|
}
|
|
7618
3601
|
}
|
|
7619
3602
|
|
|
7620
|
-
class EncodeGeoValueStubError extends Error {
|
|
7621
|
-
constructor(valueType) {
|
|
7622
|
-
super(`Encoding "${valueType}" values is not implemented here.`);
|
|
7623
|
-
}
|
|
7624
|
-
}
|
|
7625
|
-
|
|
7626
|
-
const encodeValueStubFactory = (valueType) => {
|
|
7627
|
-
return (_) => {
|
|
7628
|
-
throw new EncodeGeoValueStubError(valueType);
|
|
7629
|
-
};
|
|
7630
|
-
};
|
|
7631
|
-
|
|
7632
3603
|
const isGeopointEncodedSubstringValues = (values) => {
|
|
7633
3604
|
const { length } = values;
|
|
7634
3605
|
return length >= 2 && length <= 4 && values.every((value) => {
|
|
@@ -7680,6 +3651,18 @@ class Geopoint {
|
|
|
7680
3651
|
}
|
|
7681
3652
|
}
|
|
7682
3653
|
|
|
3654
|
+
class EncodeGeoValueStubError extends Error {
|
|
3655
|
+
constructor(valueType) {
|
|
3656
|
+
super(`Encoding "${valueType}" values is not implemented here.`);
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
const encodeValueStubFactory = (valueType) => {
|
|
3661
|
+
return (_) => {
|
|
3662
|
+
throw new EncodeGeoValueStubError(valueType);
|
|
3663
|
+
};
|
|
3664
|
+
};
|
|
3665
|
+
|
|
7683
3666
|
const geopointCodec = {
|
|
7684
3667
|
valueType: "geopoint",
|
|
7685
3668
|
encodeValue: encodeValueStubFactory("geopoint"),
|
|
@@ -7825,11 +3808,54 @@ const distance = new NumberFunction(
|
|
|
7825
3808
|
return toAbsolutePrecision(sum(distances), PRECISION);
|
|
7826
3809
|
}
|
|
7827
3810
|
);
|
|
3811
|
+
const calculateIsPointInGPSPolygon = (point, polygon) => {
|
|
3812
|
+
const testx = point.longitude;
|
|
3813
|
+
const testy = point.latitude;
|
|
3814
|
+
let result = false;
|
|
3815
|
+
for (let i = 1; i < polygon.geopoints.length; i++) {
|
|
3816
|
+
const p1 = polygon.geopoints[i - 1];
|
|
3817
|
+
const p2 = polygon.geopoints[i];
|
|
3818
|
+
if (!p1 || !p2) {
|
|
3819
|
+
return false;
|
|
3820
|
+
}
|
|
3821
|
+
const { latitude: p1Lat, longitude: p1long } = p1;
|
|
3822
|
+
const { latitude: p2Lat, longitude: p2long } = p2;
|
|
3823
|
+
if (p2Lat > testy != p1Lat > testy && testx < (p1long - p2long) * (testy - p2Lat) / (p1Lat - p2Lat) + p2long) {
|
|
3824
|
+
result = !result;
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
return result;
|
|
3828
|
+
};
|
|
3829
|
+
const validateGeoshape = (shape) => {
|
|
3830
|
+
if (shape.geopoints.length < 2) {
|
|
3831
|
+
return false;
|
|
3832
|
+
}
|
|
3833
|
+
const first = shape.geopoints[0];
|
|
3834
|
+
const last = shape.geopoints[shape.geopoints.length - 1];
|
|
3835
|
+
return first.latitude === last.latitude && first.longitude === last.longitude;
|
|
3836
|
+
};
|
|
3837
|
+
const geofence = new BooleanFunction(
|
|
3838
|
+
"geofence",
|
|
3839
|
+
[{ arityType: "required" }, { arityType: "required" }],
|
|
3840
|
+
(context, args) => {
|
|
3841
|
+
const [point, shape] = evaluateArgumentValues(context, args);
|
|
3842
|
+
if (!point || !shape) {
|
|
3843
|
+
return false;
|
|
3844
|
+
}
|
|
3845
|
+
const geopoint = Geopoint.fromNodeValue(point);
|
|
3846
|
+
const geoshape = Geotrace.fromEncodedGeotrace(shape);
|
|
3847
|
+
if (!geopoint || !geoshape || !validateGeoshape(geoshape)) {
|
|
3848
|
+
return false;
|
|
3849
|
+
}
|
|
3850
|
+
return calculateIsPointInGPSPolygon(geopoint, geoshape);
|
|
3851
|
+
}
|
|
3852
|
+
);
|
|
7828
3853
|
|
|
7829
3854
|
const geo = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
3855
|
+
__proto__: null,
|
|
3856
|
+
area,
|
|
3857
|
+
distance,
|
|
3858
|
+
geofence
|
|
7833
3859
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7834
3860
|
|
|
7835
3861
|
var cryptoJs$1 = {exports: {}};
|
|
@@ -7843,8 +3869,8 @@ var core$1 = {exports: {}};
|
|
|
7843
3869
|
const __viteBrowserExternal = {};
|
|
7844
3870
|
|
|
7845
3871
|
const __viteBrowserExternal$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7846
|
-
|
|
7847
|
-
|
|
3872
|
+
__proto__: null,
|
|
3873
|
+
default: __viteBrowserExternal
|
|
7848
3874
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7849
3875
|
|
|
7850
3876
|
const require$$0 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1);
|
|
@@ -14735,13 +10761,13 @@ const toBigIntHash = (text) => {
|
|
|
14735
10761
|
};
|
|
14736
10762
|
|
|
14737
10763
|
const nodeset = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
10764
|
+
__proto__: null,
|
|
10765
|
+
countNonEmpty,
|
|
10766
|
+
indexedRepeat,
|
|
10767
|
+
instance,
|
|
10768
|
+
once,
|
|
10769
|
+
position,
|
|
10770
|
+
randomize
|
|
14745
10771
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
14746
10772
|
|
|
14747
10773
|
const abs = mathAlias("abs");
|
|
@@ -14826,28 +10852,28 @@ const sqrt = mathAlias("sqrt");
|
|
|
14826
10852
|
const tan = mathAlias("tan");
|
|
14827
10853
|
|
|
14828
10854
|
const number$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
14829
|
-
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
10855
|
+
__proto__: null,
|
|
10856
|
+
abs,
|
|
10857
|
+
acos,
|
|
10858
|
+
asin,
|
|
10859
|
+
atan,
|
|
10860
|
+
atan2,
|
|
10861
|
+
cos,
|
|
10862
|
+
exp,
|
|
10863
|
+
exp10,
|
|
10864
|
+
int,
|
|
10865
|
+
log,
|
|
10866
|
+
log10,
|
|
10867
|
+
max,
|
|
10868
|
+
min,
|
|
10869
|
+
number,
|
|
10870
|
+
pi,
|
|
10871
|
+
pow,
|
|
10872
|
+
random,
|
|
10873
|
+
round,
|
|
10874
|
+
sin,
|
|
10875
|
+
sqrt,
|
|
10876
|
+
tan
|
|
14851
10877
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
14852
10878
|
|
|
14853
10879
|
const countSelected = new NumberFunction(
|
|
@@ -14884,18 +10910,18 @@ const selectedAt = new StringFunction(
|
|
|
14884
10910
|
);
|
|
14885
10911
|
|
|
14886
10912
|
const select = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
10913
|
+
__proto__: null,
|
|
10914
|
+
countSelected,
|
|
10915
|
+
selected,
|
|
10916
|
+
selectedAt
|
|
14891
10917
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
14892
10918
|
|
|
14893
10919
|
var encBase64Exports = requireEncBase64();
|
|
14894
10920
|
const encBase64 = /*@__PURE__*/getDefaultExportFromCjs(encBase64Exports);
|
|
14895
10921
|
|
|
14896
10922
|
const base64 = /*#__PURE__*/_mergeNamespaces({
|
|
14897
|
-
|
|
14898
|
-
|
|
10923
|
+
__proto__: null,
|
|
10924
|
+
default: encBase64
|
|
14899
10925
|
}, [encBase64Exports]);
|
|
14900
10926
|
|
|
14901
10927
|
var encHex$2 = {exports: {}};
|
|
@@ -14924,8 +10950,8 @@ var encHexExports = requireEncHex();
|
|
|
14924
10950
|
const encHex = /*@__PURE__*/getDefaultExportFromCjs(encHexExports);
|
|
14925
10951
|
|
|
14926
10952
|
const hex = /*#__PURE__*/_mergeNamespaces({
|
|
14927
|
-
|
|
14928
|
-
|
|
10953
|
+
__proto__: null,
|
|
10954
|
+
default: encHex
|
|
14929
10955
|
}, [encHexExports]);
|
|
14930
10956
|
|
|
14931
10957
|
const base64Decode$1 = (base64Input) => {
|
|
@@ -15137,17 +11163,17 @@ const uuid = new StringFunction(
|
|
|
15137
11163
|
);
|
|
15138
11164
|
|
|
15139
11165
|
const string = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
15140
|
-
|
|
15141
|
-
|
|
15142
|
-
|
|
15143
|
-
|
|
15144
|
-
|
|
15145
|
-
|
|
15146
|
-
|
|
15147
|
-
|
|
15148
|
-
|
|
15149
|
-
|
|
15150
|
-
|
|
11166
|
+
__proto__: null,
|
|
11167
|
+
base64Decode,
|
|
11168
|
+
coalesce,
|
|
11169
|
+
concat,
|
|
11170
|
+
digest,
|
|
11171
|
+
endsWith,
|
|
11172
|
+
join,
|
|
11173
|
+
pulldata,
|
|
11174
|
+
regex,
|
|
11175
|
+
substr,
|
|
11176
|
+
uuid
|
|
15151
11177
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
15152
11178
|
|
|
15153
11179
|
const xf = new FunctionLibrary(XFORMS_NAMESPACE_URI, [
|
|
@@ -15344,5 +11370,5 @@ class XFormsXPathEvaluator extends Evaluator {
|
|
|
15344
11370
|
}
|
|
15345
11371
|
}
|
|
15346
11372
|
|
|
15347
|
-
export { DEFAULT_DOM_ADAPTER, DEFAULT_DOM_PROVIDER, DefaultEvaluator, Evaluator, XFORMS_KNOWN_ATTRIBUTE, XFORMS_LOCAL_NAME, XFormsXPathEvaluator, XPathNodeKindKey };
|
|
11373
|
+
export { DEFAULT_DOM_ADAPTER, DEFAULT_DOM_PROVIDER, DefaultEvaluator, Evaluator, XFORMS_KNOWN_ATTRIBUTE, XFORMS_LOCAL_NAME, XFormsXPathEvaluator, XPathNodeKindKey, clearCache };
|
|
15348
11374
|
//# sourceMappingURL=index.js.map
|