@learncard/learn-card-plugin 1.1.11 → 1.1.14
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/learn-card-plugin.cjs.development.js +1070 -1024
- package/dist/learn-card-plugin.cjs.development.js.map +4 -4
- package/dist/learn-card-plugin.cjs.production.min.js +1 -1
- package/dist/learn-card-plugin.cjs.production.min.js.map +4 -4
- package/dist/learn-card-plugin.esm.js +1069 -1024
- package/dist/learn-card-plugin.esm.js.map +4 -4
- package/dist/verify.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -22,16 +22,16 @@ var util;
|
|
|
22
22
|
return obj;
|
|
23
23
|
};
|
|
24
24
|
util2.getValidEnumValues = (obj) => {
|
|
25
|
-
const validKeys = util2.objectKeys(obj).filter((
|
|
25
|
+
const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
|
|
26
26
|
const filtered = {};
|
|
27
|
-
for (const
|
|
28
|
-
filtered[
|
|
27
|
+
for (const k2 of validKeys) {
|
|
28
|
+
filtered[k2] = obj[k2];
|
|
29
29
|
}
|
|
30
30
|
return util2.objectValues(filtered);
|
|
31
31
|
};
|
|
32
32
|
util2.objectValues = (obj) => {
|
|
33
|
-
return util2.objectKeys(obj).map(function(
|
|
34
|
-
return obj[
|
|
33
|
+
return util2.objectKeys(obj).map(function(e2) {
|
|
34
|
+
return obj[e2];
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
37
|
util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
@@ -86,8 +86,8 @@ var ZodParsedType = util.arrayToEnum([
|
|
|
86
86
|
"set"
|
|
87
87
|
]);
|
|
88
88
|
var getParsedType = /* @__PURE__ */ __name((data) => {
|
|
89
|
-
const
|
|
90
|
-
switch (
|
|
89
|
+
const t2 = typeof data;
|
|
90
|
+
switch (t2) {
|
|
91
91
|
case "undefined":
|
|
92
92
|
return ZodParsedType.undefined;
|
|
93
93
|
case "string":
|
|
@@ -187,10 +187,10 @@ var ZodError = class extends Error {
|
|
|
187
187
|
fieldErrors._errors.push(mapper(issue));
|
|
188
188
|
} else {
|
|
189
189
|
let curr = fieldErrors;
|
|
190
|
-
let
|
|
191
|
-
while (
|
|
192
|
-
const el = issue.path[
|
|
193
|
-
const terminal =
|
|
190
|
+
let i2 = 0;
|
|
191
|
+
while (i2 < issue.path.length) {
|
|
192
|
+
const el = issue.path[i2];
|
|
193
|
+
const terminal = i2 === issue.path.length - 1;
|
|
194
194
|
if (!terminal) {
|
|
195
195
|
curr[el] = curr[el] || { _errors: [] };
|
|
196
196
|
} else {
|
|
@@ -198,7 +198,7 @@ var ZodError = class extends Error {
|
|
|
198
198
|
curr[el]._errors.push(mapper(issue));
|
|
199
199
|
}
|
|
200
200
|
curr = curr[el];
|
|
201
|
-
|
|
201
|
+
i2++;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -345,7 +345,7 @@ var makeIssue = /* @__PURE__ */ __name((params) => {
|
|
|
345
345
|
path: fullPath
|
|
346
346
|
};
|
|
347
347
|
let errorMessage = "";
|
|
348
|
-
const maps = errorMaps.filter((
|
|
348
|
+
const maps = errorMaps.filter((m3) => !!m3).slice().reverse();
|
|
349
349
|
for (const map of maps) {
|
|
350
350
|
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
351
351
|
}
|
|
@@ -366,7 +366,7 @@ function addIssueToContext(ctx, issueData) {
|
|
|
366
366
|
ctx.schemaErrorMap,
|
|
367
367
|
getErrorMap(),
|
|
368
368
|
errorMap
|
|
369
|
-
].filter((
|
|
369
|
+
].filter((x2) => !!x2)
|
|
370
370
|
});
|
|
371
371
|
ctx.common.issues.push(issue);
|
|
372
372
|
}
|
|
@@ -385,12 +385,12 @@ var ParseStatus = class {
|
|
|
385
385
|
}
|
|
386
386
|
static mergeArray(status, results) {
|
|
387
387
|
const arrayValue = [];
|
|
388
|
-
for (const
|
|
389
|
-
if (
|
|
388
|
+
for (const s3 of results) {
|
|
389
|
+
if (s3.status === "aborted")
|
|
390
390
|
return INVALID;
|
|
391
|
-
if (
|
|
391
|
+
if (s3.status === "dirty")
|
|
392
392
|
status.dirty();
|
|
393
|
-
arrayValue.push(
|
|
393
|
+
arrayValue.push(s3.value);
|
|
394
394
|
}
|
|
395
395
|
return { status: status.value, value: arrayValue };
|
|
396
396
|
}
|
|
@@ -429,10 +429,10 @@ var INVALID = Object.freeze({
|
|
|
429
429
|
});
|
|
430
430
|
var DIRTY = /* @__PURE__ */ __name((value) => ({ status: "dirty", value }), "DIRTY");
|
|
431
431
|
var OK = /* @__PURE__ */ __name((value) => ({ status: "valid", value }), "OK");
|
|
432
|
-
var isAborted = /* @__PURE__ */ __name((
|
|
433
|
-
var isDirty = /* @__PURE__ */ __name((
|
|
434
|
-
var isValid = /* @__PURE__ */ __name((
|
|
435
|
-
var isAsync = /* @__PURE__ */ __name((
|
|
432
|
+
var isAborted = /* @__PURE__ */ __name((x2) => x2.status === "aborted", "isAborted");
|
|
433
|
+
var isDirty = /* @__PURE__ */ __name((x2) => x2.status === "dirty", "isDirty");
|
|
434
|
+
var isValid = /* @__PURE__ */ __name((x2) => x2.status === "valid", "isValid");
|
|
435
|
+
var isAsync = /* @__PURE__ */ __name((x2) => typeof Promise !== void 0 && x2 instanceof Promise, "isAsync");
|
|
436
436
|
var errorUtil;
|
|
437
437
|
(function(errorUtil2) {
|
|
438
438
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
@@ -763,11 +763,14 @@ var ZodString = class extends ZodType {
|
|
|
763
763
|
const parsedType = this._getType(input);
|
|
764
764
|
if (parsedType !== ZodParsedType.string) {
|
|
765
765
|
const ctx2 = this._getOrReturnCtx(input);
|
|
766
|
-
addIssueToContext(
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
766
|
+
addIssueToContext(
|
|
767
|
+
ctx2,
|
|
768
|
+
{
|
|
769
|
+
code: ZodIssueCode.invalid_type,
|
|
770
|
+
expected: ZodParsedType.string,
|
|
771
|
+
received: ctx2.parsedType
|
|
772
|
+
}
|
|
773
|
+
);
|
|
771
774
|
return INVALID;
|
|
772
775
|
}
|
|
773
776
|
const status = new ParseStatus();
|
|
@@ -1610,14 +1613,14 @@ var ZodArray = class extends ZodType {
|
|
|
1610
1613
|
}
|
|
1611
1614
|
}
|
|
1612
1615
|
if (ctx.common.async) {
|
|
1613
|
-
return Promise.all(ctx.data.map((item,
|
|
1614
|
-
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path,
|
|
1616
|
+
return Promise.all(ctx.data.map((item, i2) => {
|
|
1617
|
+
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
|
|
1615
1618
|
})).then((result2) => {
|
|
1616
1619
|
return ParseStatus.mergeArray(status, result2);
|
|
1617
1620
|
});
|
|
1618
1621
|
}
|
|
1619
|
-
const result = ctx.data.map((item,
|
|
1620
|
-
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path,
|
|
1622
|
+
const result = ctx.data.map((item, i2) => {
|
|
1623
|
+
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i2));
|
|
1621
1624
|
});
|
|
1622
1625
|
return ParseStatus.mergeArray(status, result);
|
|
1623
1626
|
}
|
|
@@ -1773,7 +1776,9 @@ var ZodObject = class extends ZodType {
|
|
|
1773
1776
|
const value = ctx.data[key];
|
|
1774
1777
|
pairs.push({
|
|
1775
1778
|
key: { status: "valid", value: key },
|
|
1776
|
-
value: catchall._parse(
|
|
1779
|
+
value: catchall._parse(
|
|
1780
|
+
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
|
1781
|
+
),
|
|
1777
1782
|
alwaysSet: key in ctx.data
|
|
1778
1783
|
});
|
|
1779
1784
|
}
|
|
@@ -2146,17 +2151,17 @@ var ZodDiscriminatedUnion = class extends ZodType {
|
|
|
2146
2151
|
}
|
|
2147
2152
|
};
|
|
2148
2153
|
__name(ZodDiscriminatedUnion, "ZodDiscriminatedUnion");
|
|
2149
|
-
function mergeValues(
|
|
2150
|
-
const aType = getParsedType(
|
|
2151
|
-
const bType = getParsedType(
|
|
2152
|
-
if (
|
|
2153
|
-
return { valid: true, data:
|
|
2154
|
+
function mergeValues(a3, b2) {
|
|
2155
|
+
const aType = getParsedType(a3);
|
|
2156
|
+
const bType = getParsedType(b2);
|
|
2157
|
+
if (a3 === b2) {
|
|
2158
|
+
return { valid: true, data: a3 };
|
|
2154
2159
|
} else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
|
|
2155
|
-
const bKeys = util.objectKeys(
|
|
2156
|
-
const sharedKeys = util.objectKeys(
|
|
2157
|
-
const newObj = { ...
|
|
2160
|
+
const bKeys = util.objectKeys(b2);
|
|
2161
|
+
const sharedKeys = util.objectKeys(a3).filter((key) => bKeys.indexOf(key) !== -1);
|
|
2162
|
+
const newObj = { ...a3, ...b2 };
|
|
2158
2163
|
for (const key of sharedKeys) {
|
|
2159
|
-
const sharedValue = mergeValues(
|
|
2164
|
+
const sharedValue = mergeValues(a3[key], b2[key]);
|
|
2160
2165
|
if (!sharedValue.valid) {
|
|
2161
2166
|
return { valid: false };
|
|
2162
2167
|
}
|
|
@@ -2164,13 +2169,13 @@ function mergeValues(a, b) {
|
|
|
2164
2169
|
}
|
|
2165
2170
|
return { valid: true, data: newObj };
|
|
2166
2171
|
} else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
|
|
2167
|
-
if (
|
|
2172
|
+
if (a3.length !== b2.length) {
|
|
2168
2173
|
return { valid: false };
|
|
2169
2174
|
}
|
|
2170
2175
|
const newArray = [];
|
|
2171
|
-
for (let index = 0; index <
|
|
2172
|
-
const itemA =
|
|
2173
|
-
const itemB =
|
|
2176
|
+
for (let index = 0; index < a3.length; index++) {
|
|
2177
|
+
const itemA = a3[index];
|
|
2178
|
+
const itemB = b2[index];
|
|
2174
2179
|
const sharedValue = mergeValues(itemA, itemB);
|
|
2175
2180
|
if (!sharedValue.valid) {
|
|
2176
2181
|
return { valid: false };
|
|
@@ -2178,8 +2183,8 @@ function mergeValues(a, b) {
|
|
|
2178
2183
|
newArray.push(sharedValue.data);
|
|
2179
2184
|
}
|
|
2180
2185
|
return { valid: true, data: newArray };
|
|
2181
|
-
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +
|
|
2182
|
-
return { valid: true, data:
|
|
2186
|
+
} else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a3 === +b2) {
|
|
2187
|
+
return { valid: true, data: a3 };
|
|
2183
2188
|
} else {
|
|
2184
2189
|
return { valid: false };
|
|
2185
2190
|
}
|
|
@@ -2276,7 +2281,7 @@ var ZodTuple = class extends ZodType {
|
|
|
2276
2281
|
if (!schema)
|
|
2277
2282
|
return null;
|
|
2278
2283
|
return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
|
|
2279
|
-
}).filter((
|
|
2284
|
+
}).filter((x2) => !!x2);
|
|
2280
2285
|
if (ctx.common.async) {
|
|
2281
2286
|
return Promise.all(items).then((results) => {
|
|
2282
2287
|
return ParseStatus.mergeArray(status, results);
|
|
@@ -2472,7 +2477,7 @@ var ZodSet = class extends ZodType {
|
|
|
2472
2477
|
return { status: status.value, value: parsedSet };
|
|
2473
2478
|
}
|
|
2474
2479
|
__name(finalizeSet, "finalizeSet");
|
|
2475
|
-
const elements = [...ctx.data.values()].map((item,
|
|
2480
|
+
const elements = [...ctx.data.values()].map((item, i2) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i2)));
|
|
2476
2481
|
if (ctx.common.async) {
|
|
2477
2482
|
return Promise.all(elements).then((elements2) => finalizeSet(elements2));
|
|
2478
2483
|
} else {
|
|
@@ -2532,7 +2537,7 @@ var ZodFunction = class extends ZodType {
|
|
|
2532
2537
|
ctx.schemaErrorMap,
|
|
2533
2538
|
getErrorMap(),
|
|
2534
2539
|
errorMap
|
|
2535
|
-
].filter((
|
|
2540
|
+
].filter((x2) => !!x2),
|
|
2536
2541
|
issueData: {
|
|
2537
2542
|
code: ZodIssueCode.invalid_arguments,
|
|
2538
2543
|
argumentsError: error
|
|
@@ -2549,7 +2554,7 @@ var ZodFunction = class extends ZodType {
|
|
|
2549
2554
|
ctx.schemaErrorMap,
|
|
2550
2555
|
getErrorMap(),
|
|
2551
2556
|
errorMap
|
|
2552
|
-
].filter((
|
|
2557
|
+
].filter((x2) => !!x2),
|
|
2553
2558
|
issueData: {
|
|
2554
2559
|
code: ZodIssueCode.invalid_return_type,
|
|
2555
2560
|
returnTypeError: error
|
|
@@ -2562,13 +2567,13 @@ var ZodFunction = class extends ZodType {
|
|
|
2562
2567
|
if (this._def.returns instanceof ZodPromise) {
|
|
2563
2568
|
return OK(async (...args) => {
|
|
2564
2569
|
const error = new ZodError([]);
|
|
2565
|
-
const parsedArgs = await this._def.args.parseAsync(args, params).catch((
|
|
2566
|
-
error.addIssue(makeArgsIssue(args,
|
|
2570
|
+
const parsedArgs = await this._def.args.parseAsync(args, params).catch((e2) => {
|
|
2571
|
+
error.addIssue(makeArgsIssue(args, e2));
|
|
2567
2572
|
throw error;
|
|
2568
2573
|
});
|
|
2569
2574
|
const result = await fn(...parsedArgs);
|
|
2570
|
-
const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((
|
|
2571
|
-
error.addIssue(makeReturnsIssue(result,
|
|
2575
|
+
const parsedReturns = await this._def.returns._def.type.parseAsync(result, params).catch((e2) => {
|
|
2576
|
+
error.addIssue(makeReturnsIssue(result, e2));
|
|
2572
2577
|
throw error;
|
|
2573
2578
|
});
|
|
2574
2579
|
return parsedReturns;
|
|
@@ -3094,10 +3099,10 @@ var ZodPipeline = class extends ZodType {
|
|
|
3094
3099
|
}
|
|
3095
3100
|
}
|
|
3096
3101
|
}
|
|
3097
|
-
static create(
|
|
3102
|
+
static create(a3, b2) {
|
|
3098
3103
|
return new ZodPipeline({
|
|
3099
|
-
in:
|
|
3100
|
-
out:
|
|
3104
|
+
in: a3,
|
|
3105
|
+
out: b2,
|
|
3101
3106
|
typeName: ZodFirstPartyTypeKind.ZodPipeline
|
|
3102
3107
|
});
|
|
3103
3108
|
}
|
|
@@ -3324,11 +3329,13 @@ var AchievementCriteriaValidator = mod.object({
|
|
|
3324
3329
|
type: mod.string().optional(),
|
|
3325
3330
|
narrative: mod.string().optional()
|
|
3326
3331
|
});
|
|
3327
|
-
var ImageValidator = mod.string().or(
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
+
var ImageValidator = mod.string().or(
|
|
3333
|
+
mod.object({
|
|
3334
|
+
id: mod.string(),
|
|
3335
|
+
type: mod.string(),
|
|
3336
|
+
caption: mod.string().optional()
|
|
3337
|
+
})
|
|
3338
|
+
);
|
|
3332
3339
|
var GeoCoordinatesValidator = mod.object({
|
|
3333
3340
|
type: mod.string().min(1).or(mod.string().array().nonempty()),
|
|
3334
3341
|
latitude: mod.number(),
|
|
@@ -3370,29 +3377,31 @@ var IdentifierEntryValidator = mod.object({
|
|
|
3370
3377
|
identifier: mod.string(),
|
|
3371
3378
|
identifierType: IdentifierTypeValidator
|
|
3372
3379
|
});
|
|
3373
|
-
var ProfileValidator = mod.string().or(
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3380
|
+
var ProfileValidator = mod.string().or(
|
|
3381
|
+
mod.object({
|
|
3382
|
+
id: mod.string().optional(),
|
|
3383
|
+
type: mod.string().or(mod.string().array().nonempty().optional()),
|
|
3384
|
+
name: mod.string().optional(),
|
|
3385
|
+
url: mod.string().optional(),
|
|
3386
|
+
phone: mod.string().optional(),
|
|
3387
|
+
description: mod.string().optional(),
|
|
3388
|
+
endorsement: mod.any().array().optional(),
|
|
3389
|
+
image: ImageValidator.optional(),
|
|
3390
|
+
email: mod.string().email().optional(),
|
|
3391
|
+
address: AddressValidator.optional(),
|
|
3392
|
+
otherIdentifier: IdentifierEntryValidator.array().optional(),
|
|
3393
|
+
official: mod.string().optional(),
|
|
3394
|
+
parentOrg: mod.any().optional(),
|
|
3395
|
+
familyName: mod.string().optional(),
|
|
3396
|
+
givenName: mod.string().optional(),
|
|
3397
|
+
additionalName: mod.string().optional(),
|
|
3398
|
+
patronymicName: mod.string().optional(),
|
|
3399
|
+
honorificPrefix: mod.string().optional(),
|
|
3400
|
+
honorificSuffix: mod.string().optional(),
|
|
3401
|
+
familyNamePrefix: mod.string().optional(),
|
|
3402
|
+
dateOfBirth: mod.string().optional()
|
|
3403
|
+
}).catchall(mod.any())
|
|
3404
|
+
);
|
|
3396
3405
|
var CredentialSubjectValidator = mod.object({ id: mod.string().optional() }).catchall(mod.any());
|
|
3397
3406
|
var CredentialStatusValidator = mod.object({ type: mod.string(), id: mod.string() }).catchall(mod.any());
|
|
3398
3407
|
var CredentialSchemaValidator = mod.object({ id: mod.string(), type: mod.string() }).catchall(mod.any());
|
|
@@ -3461,15 +3470,17 @@ var JWEValidator = mod.object({
|
|
|
3461
3470
|
aad: mod.string().optional(),
|
|
3462
3471
|
recipients: JWERecipientValidator.array().optional()
|
|
3463
3472
|
});
|
|
3464
|
-
var VerificationMethodValidator = mod.string().or(
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
+
var VerificationMethodValidator = mod.string().or(
|
|
3474
|
+
mod.object({
|
|
3475
|
+
"@context": ContextValidator.optional(),
|
|
3476
|
+
id: mod.string(),
|
|
3477
|
+
type: mod.string(),
|
|
3478
|
+
controller: mod.string(),
|
|
3479
|
+
publicKeyJwk: JWKValidator.optional(),
|
|
3480
|
+
publicKeyBase58: mod.string().optional(),
|
|
3481
|
+
blockChainAccountId: mod.string().optional()
|
|
3482
|
+
}).catchall(mod.any())
|
|
3483
|
+
);
|
|
3473
3484
|
var ServiceValidator = mod.object({
|
|
3474
3485
|
id: mod.string(),
|
|
3475
3486
|
type: mod.string().or(mod.string().array().nonempty()),
|
|
@@ -3667,7 +3678,9 @@ var UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({
|
|
|
3667
3678
|
name: mod.string().optional(),
|
|
3668
3679
|
description: mod.string().optional(),
|
|
3669
3680
|
image: ImageValidator.optional(),
|
|
3670
|
-
credentialSubject: AchievementSubjectValidator.or(
|
|
3681
|
+
credentialSubject: AchievementSubjectValidator.or(
|
|
3682
|
+
AchievementSubjectValidator.array()
|
|
3683
|
+
),
|
|
3671
3684
|
endorsement: UnsignedVCValidator.array().optional(),
|
|
3672
3685
|
evidence: EvidenceValidator.array().optional()
|
|
3673
3686
|
});
|
|
@@ -3726,7 +3739,7 @@ var LCNProfileValidator = mod.object({
|
|
|
3726
3739
|
websiteLink: mod.string().optional(),
|
|
3727
3740
|
isServiceProfile: mod.boolean().default(false).optional(),
|
|
3728
3741
|
type: mod.string().optional(),
|
|
3729
|
-
notificationsWebhook: mod.string().url().startsWith("
|
|
3742
|
+
notificationsWebhook: mod.string().url().startsWith("http").optional()
|
|
3730
3743
|
});
|
|
3731
3744
|
var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
|
|
3732
3745
|
records: LCNProfileValidator.array()
|
|
@@ -3753,11 +3766,17 @@ var BoostValidator = mod.object({
|
|
|
3753
3766
|
status: LCNBoostStatus.optional(),
|
|
3754
3767
|
autoConnectRecipients: mod.boolean().optional()
|
|
3755
3768
|
});
|
|
3769
|
+
var PaginatedBoostsValidator = PaginationResponseValidator.extend({
|
|
3770
|
+
records: BoostValidator.array()
|
|
3771
|
+
});
|
|
3756
3772
|
var BoostRecipientValidator = mod.object({
|
|
3757
3773
|
to: LCNProfileValidator,
|
|
3758
3774
|
from: mod.string(),
|
|
3759
3775
|
received: mod.string().optional()
|
|
3760
3776
|
});
|
|
3777
|
+
var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
|
|
3778
|
+
records: BoostRecipientValidator.array()
|
|
3779
|
+
});
|
|
3761
3780
|
var LCNBoostClaimLinkSigningAuthorityValidator = mod.object({
|
|
3762
3781
|
endpoint: mod.string(),
|
|
3763
3782
|
name: mod.string(),
|
|
@@ -3890,7 +3909,9 @@ var ConsentFlowTransactionActionValidator = mod.enum([
|
|
|
3890
3909
|
]);
|
|
3891
3910
|
var ConsentFlowTransactionsQueryValidator = mod.object({
|
|
3892
3911
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
|
3893
|
-
action: ConsentFlowTransactionActionValidator.or(
|
|
3912
|
+
action: ConsentFlowTransactionActionValidator.or(
|
|
3913
|
+
ConsentFlowTransactionActionValidator.array()
|
|
3914
|
+
).optional(),
|
|
3894
3915
|
date: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
|
3895
3916
|
expiresAt: mod.object({ $gt: mod.string() }).or(mod.object({ $lt: mod.string() })).or(mod.object({ $eq: mod.string() })).optional(),
|
|
3896
3917
|
oneTime: mod.boolean().optional()
|
|
@@ -3935,7 +3956,18 @@ var LCNNotificationValidator = mod.object({
|
|
|
3935
3956
|
sent: mod.string().datetime().optional()
|
|
3936
3957
|
});
|
|
3937
3958
|
|
|
3938
|
-
// ../../../node_modules/.pnpm
|
|
3959
|
+
// ../../../node_modules/.pnpm/@babel+runtime@7.25.6/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
3960
|
+
function _typeof(o) {
|
|
3961
|
+
"@babel/helpers - typeof";
|
|
3962
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
3963
|
+
return typeof o2;
|
|
3964
|
+
} : function(o2) {
|
|
3965
|
+
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
3966
|
+
}, _typeof(o);
|
|
3967
|
+
}
|
|
3968
|
+
__name(_typeof, "_typeof");
|
|
3969
|
+
|
|
3970
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/toInteger/index.js
|
|
3939
3971
|
function toInteger(dirtyNumber) {
|
|
3940
3972
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
3941
3973
|
return NaN;
|
|
@@ -3948,7 +3980,7 @@ function toInteger(dirtyNumber) {
|
|
|
3948
3980
|
}
|
|
3949
3981
|
__name(toInteger, "toInteger");
|
|
3950
3982
|
|
|
3951
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
3983
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/requiredArgs/index.js
|
|
3952
3984
|
function requiredArgs(required, args) {
|
|
3953
3985
|
if (args.length < required) {
|
|
3954
3986
|
throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
|
|
@@ -3956,17 +3988,17 @@ function requiredArgs(required, args) {
|
|
|
3956
3988
|
}
|
|
3957
3989
|
__name(requiredArgs, "requiredArgs");
|
|
3958
3990
|
|
|
3959
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
3991
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/toDate/index.js
|
|
3960
3992
|
function toDate(argument) {
|
|
3961
3993
|
requiredArgs(1, arguments);
|
|
3962
3994
|
var argStr = Object.prototype.toString.call(argument);
|
|
3963
|
-
if (argument instanceof Date ||
|
|
3995
|
+
if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
|
|
3964
3996
|
return new Date(argument.getTime());
|
|
3965
3997
|
} else if (typeof argument === "number" || argStr === "[object Number]") {
|
|
3966
3998
|
return new Date(argument);
|
|
3967
3999
|
} else {
|
|
3968
4000
|
if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
|
|
3969
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://
|
|
4001
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
3970
4002
|
console.warn(new Error().stack);
|
|
3971
4003
|
}
|
|
3972
4004
|
return new Date(NaN);
|
|
@@ -3974,7 +4006,7 @@ function toDate(argument) {
|
|
|
3974
4006
|
}
|
|
3975
4007
|
__name(toDate, "toDate");
|
|
3976
4008
|
|
|
3977
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4009
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/addMilliseconds/index.js
|
|
3978
4010
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
3979
4011
|
requiredArgs(2, arguments);
|
|
3980
4012
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -3983,7 +4015,14 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
3983
4015
|
}
|
|
3984
4016
|
__name(addMilliseconds, "addMilliseconds");
|
|
3985
4017
|
|
|
3986
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4018
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/defaultOptions/index.js
|
|
4019
|
+
var defaultOptions = {};
|
|
4020
|
+
function getDefaultOptions() {
|
|
4021
|
+
return defaultOptions;
|
|
4022
|
+
}
|
|
4023
|
+
__name(getDefaultOptions, "getDefaultOptions");
|
|
4024
|
+
|
|
4025
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
|
|
3987
4026
|
function getTimezoneOffsetInMilliseconds(date) {
|
|
3988
4027
|
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
3989
4028
|
utcDate.setUTCFullYear(date.getFullYear());
|
|
@@ -3991,14 +4030,14 @@ function getTimezoneOffsetInMilliseconds(date) {
|
|
|
3991
4030
|
}
|
|
3992
4031
|
__name(getTimezoneOffsetInMilliseconds, "getTimezoneOffsetInMilliseconds");
|
|
3993
4032
|
|
|
3994
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4033
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isDate/index.js
|
|
3995
4034
|
function isDate(value) {
|
|
3996
4035
|
requiredArgs(1, arguments);
|
|
3997
|
-
return value instanceof Date ||
|
|
4036
|
+
return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
3998
4037
|
}
|
|
3999
4038
|
__name(isDate, "isDate");
|
|
4000
4039
|
|
|
4001
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4040
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isValid/index.js
|
|
4002
4041
|
function isValid2(dirtyDate) {
|
|
4003
4042
|
requiredArgs(1, arguments);
|
|
4004
4043
|
if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
|
|
@@ -4009,705 +4048,220 @@ function isValid2(dirtyDate) {
|
|
|
4009
4048
|
}
|
|
4010
4049
|
__name(isValid2, "isValid");
|
|
4011
4050
|
|
|
4012
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
|
-
one: "1 year",
|
|
4065
|
-
other: "{{count}} years"
|
|
4066
|
-
},
|
|
4067
|
-
overXYears: {
|
|
4068
|
-
one: "over 1 year",
|
|
4069
|
-
other: "over {{count}} years"
|
|
4070
|
-
},
|
|
4071
|
-
almostXYears: {
|
|
4072
|
-
one: "almost 1 year",
|
|
4073
|
-
other: "almost {{count}} years"
|
|
4074
|
-
}
|
|
4075
|
-
};
|
|
4076
|
-
var formatDistance = /* @__PURE__ */ __name(function(token, count, options) {
|
|
4077
|
-
var result;
|
|
4078
|
-
var tokenValue = formatDistanceLocale[token];
|
|
4079
|
-
if (typeof tokenValue === "string") {
|
|
4080
|
-
result = tokenValue;
|
|
4081
|
-
} else if (count === 1) {
|
|
4082
|
-
result = tokenValue.one;
|
|
4051
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/subMilliseconds/index.js
|
|
4052
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
4053
|
+
requiredArgs(2, arguments);
|
|
4054
|
+
var amount = toInteger(dirtyAmount);
|
|
4055
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
4056
|
+
}
|
|
4057
|
+
__name(subMilliseconds, "subMilliseconds");
|
|
4058
|
+
|
|
4059
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
|
|
4060
|
+
var MILLISECONDS_IN_DAY = 864e5;
|
|
4061
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
4062
|
+
requiredArgs(1, arguments);
|
|
4063
|
+
var date = toDate(dirtyDate);
|
|
4064
|
+
var timestamp = date.getTime();
|
|
4065
|
+
date.setUTCMonth(0, 1);
|
|
4066
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
4067
|
+
var startOfYearTimestamp = date.getTime();
|
|
4068
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
4069
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
4070
|
+
}
|
|
4071
|
+
__name(getUTCDayOfYear, "getUTCDayOfYear");
|
|
4072
|
+
|
|
4073
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
|
|
4074
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
4075
|
+
requiredArgs(1, arguments);
|
|
4076
|
+
var weekStartsOn = 1;
|
|
4077
|
+
var date = toDate(dirtyDate);
|
|
4078
|
+
var day = date.getUTCDay();
|
|
4079
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
4080
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
4081
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
4082
|
+
return date;
|
|
4083
|
+
}
|
|
4084
|
+
__name(startOfUTCISOWeek, "startOfUTCISOWeek");
|
|
4085
|
+
|
|
4086
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
|
|
4087
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
4088
|
+
requiredArgs(1, arguments);
|
|
4089
|
+
var date = toDate(dirtyDate);
|
|
4090
|
+
var year = date.getUTCFullYear();
|
|
4091
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
4092
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
4093
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
4094
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
4095
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
4096
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
4097
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
4098
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
4099
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
4100
|
+
return year + 1;
|
|
4101
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
4102
|
+
return year;
|
|
4083
4103
|
} else {
|
|
4084
|
-
|
|
4085
|
-
}
|
|
4086
|
-
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
4087
|
-
if (options.comparison && options.comparison > 0) {
|
|
4088
|
-
return "in " + result;
|
|
4089
|
-
} else {
|
|
4090
|
-
return result + " ago";
|
|
4091
|
-
}
|
|
4104
|
+
return year - 1;
|
|
4092
4105
|
}
|
|
4093
|
-
return result;
|
|
4094
|
-
}, "formatDistance");
|
|
4095
|
-
var formatDistance_default = formatDistance;
|
|
4096
|
-
|
|
4097
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
|
|
4098
|
-
function buildFormatLongFn(args) {
|
|
4099
|
-
return function() {
|
|
4100
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4101
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
4102
|
-
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
4103
|
-
return format2;
|
|
4104
|
-
};
|
|
4105
4106
|
}
|
|
4106
|
-
__name(
|
|
4107
|
+
__name(getUTCISOWeekYear, "getUTCISOWeekYear");
|
|
4107
4108
|
|
|
4108
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
var
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
short: "h:mm a"
|
|
4120
|
-
};
|
|
4121
|
-
var dateTimeFormats = {
|
|
4122
|
-
full: "{{date}} 'at' {{time}}",
|
|
4123
|
-
long: "{{date}} 'at' {{time}}",
|
|
4124
|
-
medium: "{{date}}, {{time}}",
|
|
4125
|
-
short: "{{date}}, {{time}}"
|
|
4126
|
-
};
|
|
4127
|
-
var formatLong = {
|
|
4128
|
-
date: buildFormatLongFn({
|
|
4129
|
-
formats: dateFormats,
|
|
4130
|
-
defaultWidth: "full"
|
|
4131
|
-
}),
|
|
4132
|
-
time: buildFormatLongFn({
|
|
4133
|
-
formats: timeFormats,
|
|
4134
|
-
defaultWidth: "full"
|
|
4135
|
-
}),
|
|
4136
|
-
dateTime: buildFormatLongFn({
|
|
4137
|
-
formats: dateTimeFormats,
|
|
4138
|
-
defaultWidth: "full"
|
|
4139
|
-
})
|
|
4140
|
-
};
|
|
4141
|
-
var formatLong_default = formatLong;
|
|
4109
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
|
|
4110
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
4111
|
+
requiredArgs(1, arguments);
|
|
4112
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
4113
|
+
var fourthOfJanuary = new Date(0);
|
|
4114
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
4115
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
4116
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
4117
|
+
return date;
|
|
4118
|
+
}
|
|
4119
|
+
__name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
|
|
4142
4120
|
|
|
4143
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4144
|
-
var
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
var formatRelative = /* @__PURE__ */ __name(function(token, _date, _baseDate, _options) {
|
|
4153
|
-
return formatRelativeLocale[token];
|
|
4154
|
-
}, "formatRelative");
|
|
4155
|
-
var formatRelative_default = formatRelative;
|
|
4121
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
|
|
4122
|
+
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
4123
|
+
function getUTCISOWeek(dirtyDate) {
|
|
4124
|
+
requiredArgs(1, arguments);
|
|
4125
|
+
var date = toDate(dirtyDate);
|
|
4126
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
4127
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
4128
|
+
}
|
|
4129
|
+
__name(getUTCISOWeek, "getUTCISOWeek");
|
|
4156
4130
|
|
|
4157
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4158
|
-
function
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
4173
|
-
return valuesArray[index];
|
|
4174
|
-
};
|
|
4131
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
|
4132
|
+
function startOfUTCWeek(dirtyDate, options) {
|
|
4133
|
+
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
4134
|
+
requiredArgs(1, arguments);
|
|
4135
|
+
var defaultOptions2 = getDefaultOptions();
|
|
4136
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
4137
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
4138
|
+
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
4139
|
+
}
|
|
4140
|
+
var date = toDate(dirtyDate);
|
|
4141
|
+
var day = date.getUTCDay();
|
|
4142
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
4143
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
4144
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
4145
|
+
return date;
|
|
4175
4146
|
}
|
|
4176
|
-
__name(
|
|
4147
|
+
__name(startOfUTCWeek, "startOfUTCWeek");
|
|
4177
4148
|
|
|
4178
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
var
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
};
|
|
4189
|
-
var monthValues = {
|
|
4190
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
4191
|
-
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
4192
|
-
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
4193
|
-
};
|
|
4194
|
-
var dayValues = {
|
|
4195
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
4196
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
4197
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
4198
|
-
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
4199
|
-
};
|
|
4200
|
-
var dayPeriodValues = {
|
|
4201
|
-
narrow: {
|
|
4202
|
-
am: "a",
|
|
4203
|
-
pm: "p",
|
|
4204
|
-
midnight: "mi",
|
|
4205
|
-
noon: "n",
|
|
4206
|
-
morning: "morning",
|
|
4207
|
-
afternoon: "afternoon",
|
|
4208
|
-
evening: "evening",
|
|
4209
|
-
night: "night"
|
|
4210
|
-
},
|
|
4211
|
-
abbreviated: {
|
|
4212
|
-
am: "AM",
|
|
4213
|
-
pm: "PM",
|
|
4214
|
-
midnight: "midnight",
|
|
4215
|
-
noon: "noon",
|
|
4216
|
-
morning: "morning",
|
|
4217
|
-
afternoon: "afternoon",
|
|
4218
|
-
evening: "evening",
|
|
4219
|
-
night: "night"
|
|
4220
|
-
},
|
|
4221
|
-
wide: {
|
|
4222
|
-
am: "a.m.",
|
|
4223
|
-
pm: "p.m.",
|
|
4224
|
-
midnight: "midnight",
|
|
4225
|
-
noon: "noon",
|
|
4226
|
-
morning: "morning",
|
|
4227
|
-
afternoon: "afternoon",
|
|
4228
|
-
evening: "evening",
|
|
4229
|
-
night: "night"
|
|
4230
|
-
}
|
|
4231
|
-
};
|
|
4232
|
-
var formattingDayPeriodValues = {
|
|
4233
|
-
narrow: {
|
|
4234
|
-
am: "a",
|
|
4235
|
-
pm: "p",
|
|
4236
|
-
midnight: "mi",
|
|
4237
|
-
noon: "n",
|
|
4238
|
-
morning: "in the morning",
|
|
4239
|
-
afternoon: "in the afternoon",
|
|
4240
|
-
evening: "in the evening",
|
|
4241
|
-
night: "at night"
|
|
4242
|
-
},
|
|
4243
|
-
abbreviated: {
|
|
4244
|
-
am: "AM",
|
|
4245
|
-
pm: "PM",
|
|
4246
|
-
midnight: "midnight",
|
|
4247
|
-
noon: "noon",
|
|
4248
|
-
morning: "in the morning",
|
|
4249
|
-
afternoon: "in the afternoon",
|
|
4250
|
-
evening: "in the evening",
|
|
4251
|
-
night: "at night"
|
|
4252
|
-
},
|
|
4253
|
-
wide: {
|
|
4254
|
-
am: "a.m.",
|
|
4255
|
-
pm: "p.m.",
|
|
4256
|
-
midnight: "midnight",
|
|
4257
|
-
noon: "noon",
|
|
4258
|
-
morning: "in the morning",
|
|
4259
|
-
afternoon: "in the afternoon",
|
|
4260
|
-
evening: "in the evening",
|
|
4261
|
-
night: "at night"
|
|
4149
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
|
|
4150
|
+
function getUTCWeekYear(dirtyDate, options) {
|
|
4151
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
4152
|
+
requiredArgs(1, arguments);
|
|
4153
|
+
var date = toDate(dirtyDate);
|
|
4154
|
+
var year = date.getUTCFullYear();
|
|
4155
|
+
var defaultOptions2 = getDefaultOptions();
|
|
4156
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
4157
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
4158
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
4262
4159
|
}
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
var
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4160
|
+
var firstWeekOfNextYear = new Date(0);
|
|
4161
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
4162
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
4163
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
|
|
4164
|
+
var firstWeekOfThisYear = new Date(0);
|
|
4165
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
4166
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
4167
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
4168
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
4169
|
+
return year + 1;
|
|
4170
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
4171
|
+
return year;
|
|
4172
|
+
} else {
|
|
4173
|
+
return year - 1;
|
|
4276
4174
|
}
|
|
4277
|
-
return number + "th";
|
|
4278
|
-
}, "ordinalNumber");
|
|
4279
|
-
var localize = {
|
|
4280
|
-
ordinalNumber,
|
|
4281
|
-
era: buildLocalizeFn({
|
|
4282
|
-
values: eraValues,
|
|
4283
|
-
defaultWidth: "wide"
|
|
4284
|
-
}),
|
|
4285
|
-
quarter: buildLocalizeFn({
|
|
4286
|
-
values: quarterValues,
|
|
4287
|
-
defaultWidth: "wide",
|
|
4288
|
-
argumentCallback: function(quarter) {
|
|
4289
|
-
return quarter - 1;
|
|
4290
|
-
}
|
|
4291
|
-
}),
|
|
4292
|
-
month: buildLocalizeFn({
|
|
4293
|
-
values: monthValues,
|
|
4294
|
-
defaultWidth: "wide"
|
|
4295
|
-
}),
|
|
4296
|
-
day: buildLocalizeFn({
|
|
4297
|
-
values: dayValues,
|
|
4298
|
-
defaultWidth: "wide"
|
|
4299
|
-
}),
|
|
4300
|
-
dayPeriod: buildLocalizeFn({
|
|
4301
|
-
values: dayPeriodValues,
|
|
4302
|
-
defaultWidth: "wide",
|
|
4303
|
-
formattingValues: formattingDayPeriodValues,
|
|
4304
|
-
defaultFormattingWidth: "wide"
|
|
4305
|
-
})
|
|
4306
|
-
};
|
|
4307
|
-
var localize_default = localize;
|
|
4308
|
-
|
|
4309
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
|
|
4310
|
-
function buildMatchFn(args) {
|
|
4311
|
-
return function(string) {
|
|
4312
|
-
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4313
|
-
var width = options.width;
|
|
4314
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
4315
|
-
var matchResult = string.match(matchPattern);
|
|
4316
|
-
if (!matchResult) {
|
|
4317
|
-
return null;
|
|
4318
|
-
}
|
|
4319
|
-
var matchedString = matchResult[0];
|
|
4320
|
-
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
4321
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
4322
|
-
return pattern.test(matchedString);
|
|
4323
|
-
}) : findKey(parsePatterns, function(pattern) {
|
|
4324
|
-
return pattern.test(matchedString);
|
|
4325
|
-
});
|
|
4326
|
-
var value;
|
|
4327
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
4328
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4329
|
-
var rest = string.slice(matchedString.length);
|
|
4330
|
-
return {
|
|
4331
|
-
value,
|
|
4332
|
-
rest
|
|
4333
|
-
};
|
|
4334
|
-
};
|
|
4335
4175
|
}
|
|
4336
|
-
__name(
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4176
|
+
__name(getUTCWeekYear, "getUTCWeekYear");
|
|
4177
|
+
|
|
4178
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
|
|
4179
|
+
function startOfUTCWeekYear(dirtyDate, options) {
|
|
4180
|
+
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
4181
|
+
requiredArgs(1, arguments);
|
|
4182
|
+
var defaultOptions2 = getDefaultOptions();
|
|
4183
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
4184
|
+
var year = getUTCWeekYear(dirtyDate, options);
|
|
4185
|
+
var firstWeek = new Date(0);
|
|
4186
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
4187
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
4188
|
+
var date = startOfUTCWeek(firstWeek, options);
|
|
4189
|
+
return date;
|
|
4344
4190
|
}
|
|
4345
|
-
__name(
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4191
|
+
__name(startOfUTCWeekYear, "startOfUTCWeekYear");
|
|
4192
|
+
|
|
4193
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
|
|
4194
|
+
var MILLISECONDS_IN_WEEK2 = 6048e5;
|
|
4195
|
+
function getUTCWeek(dirtyDate, options) {
|
|
4196
|
+
requiredArgs(1, arguments);
|
|
4197
|
+
var date = toDate(dirtyDate);
|
|
4198
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
4199
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
|
|
4353
4200
|
}
|
|
4354
|
-
__name(
|
|
4201
|
+
__name(getUTCWeek, "getUTCWeek");
|
|
4355
4202
|
|
|
4356
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4357
|
-
function
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
var parseResult = string.match(args.parsePattern);
|
|
4365
|
-
if (!parseResult)
|
|
4366
|
-
return null;
|
|
4367
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
4368
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
4369
|
-
var rest = string.slice(matchedString.length);
|
|
4370
|
-
return {
|
|
4371
|
-
value,
|
|
4372
|
-
rest
|
|
4373
|
-
};
|
|
4374
|
-
};
|
|
4203
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
|
|
4204
|
+
function addLeadingZeros(number, targetLength) {
|
|
4205
|
+
var sign = number < 0 ? "-" : "";
|
|
4206
|
+
var output = Math.abs(number).toString();
|
|
4207
|
+
while (output.length < targetLength) {
|
|
4208
|
+
output = "0" + output;
|
|
4209
|
+
}
|
|
4210
|
+
return sign + output;
|
|
4375
4211
|
}
|
|
4376
|
-
__name(
|
|
4212
|
+
__name(addLeadingZeros, "addLeadingZeros");
|
|
4377
4213
|
|
|
4378
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4379
|
-
var
|
|
4380
|
-
|
|
4381
|
-
var
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
var
|
|
4387
|
-
|
|
4388
|
-
}
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
}
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
}
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
var
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
noon: /^no/i,
|
|
4426
|
-
morning: /morning/i,
|
|
4427
|
-
afternoon: /afternoon/i,
|
|
4428
|
-
evening: /evening/i,
|
|
4429
|
-
night: /night/i
|
|
4430
|
-
}
|
|
4431
|
-
};
|
|
4432
|
-
var match = {
|
|
4433
|
-
ordinalNumber: buildMatchPatternFn({
|
|
4434
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
4435
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
4436
|
-
valueCallback: function(value) {
|
|
4437
|
-
return parseInt(value, 10);
|
|
4438
|
-
}
|
|
4439
|
-
}),
|
|
4440
|
-
era: buildMatchFn({
|
|
4441
|
-
matchPatterns: matchEraPatterns,
|
|
4442
|
-
defaultMatchWidth: "wide",
|
|
4443
|
-
parsePatterns: parseEraPatterns,
|
|
4444
|
-
defaultParseWidth: "any"
|
|
4445
|
-
}),
|
|
4446
|
-
quarter: buildMatchFn({
|
|
4447
|
-
matchPatterns: matchQuarterPatterns,
|
|
4448
|
-
defaultMatchWidth: "wide",
|
|
4449
|
-
parsePatterns: parseQuarterPatterns,
|
|
4450
|
-
defaultParseWidth: "any",
|
|
4451
|
-
valueCallback: function(index) {
|
|
4452
|
-
return index + 1;
|
|
4453
|
-
}
|
|
4454
|
-
}),
|
|
4455
|
-
month: buildMatchFn({
|
|
4456
|
-
matchPatterns: matchMonthPatterns,
|
|
4457
|
-
defaultMatchWidth: "wide",
|
|
4458
|
-
parsePatterns: parseMonthPatterns,
|
|
4459
|
-
defaultParseWidth: "any"
|
|
4460
|
-
}),
|
|
4461
|
-
day: buildMatchFn({
|
|
4462
|
-
matchPatterns: matchDayPatterns,
|
|
4463
|
-
defaultMatchWidth: "wide",
|
|
4464
|
-
parsePatterns: parseDayPatterns,
|
|
4465
|
-
defaultParseWidth: "any"
|
|
4466
|
-
}),
|
|
4467
|
-
dayPeriod: buildMatchFn({
|
|
4468
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
4469
|
-
defaultMatchWidth: "any",
|
|
4470
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
4471
|
-
defaultParseWidth: "any"
|
|
4472
|
-
})
|
|
4473
|
-
};
|
|
4474
|
-
var match_default = match;
|
|
4475
|
-
|
|
4476
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/locale/en-US/index.js
|
|
4477
|
-
var locale = {
|
|
4478
|
-
code: "en-US",
|
|
4479
|
-
formatDistance: formatDistance_default,
|
|
4480
|
-
formatLong: formatLong_default,
|
|
4481
|
-
formatRelative: formatRelative_default,
|
|
4482
|
-
localize: localize_default,
|
|
4483
|
-
match: match_default,
|
|
4484
|
-
options: {
|
|
4485
|
-
weekStartsOn: 0,
|
|
4486
|
-
firstWeekContainsDate: 1
|
|
4487
|
-
}
|
|
4488
|
-
};
|
|
4489
|
-
var en_US_default = locale;
|
|
4490
|
-
|
|
4491
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/subMilliseconds/index.js
|
|
4492
|
-
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
4493
|
-
requiredArgs(2, arguments);
|
|
4494
|
-
var amount = toInteger(dirtyAmount);
|
|
4495
|
-
return addMilliseconds(dirtyDate, -amount);
|
|
4496
|
-
}
|
|
4497
|
-
__name(subMilliseconds, "subMilliseconds");
|
|
4498
|
-
|
|
4499
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
|
|
4500
|
-
var MILLISECONDS_IN_DAY = 864e5;
|
|
4501
|
-
function getUTCDayOfYear(dirtyDate) {
|
|
4502
|
-
requiredArgs(1, arguments);
|
|
4503
|
-
var date = toDate(dirtyDate);
|
|
4504
|
-
var timestamp = date.getTime();
|
|
4505
|
-
date.setUTCMonth(0, 1);
|
|
4506
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
4507
|
-
var startOfYearTimestamp = date.getTime();
|
|
4508
|
-
var difference = timestamp - startOfYearTimestamp;
|
|
4509
|
-
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
4510
|
-
}
|
|
4511
|
-
__name(getUTCDayOfYear, "getUTCDayOfYear");
|
|
4512
|
-
|
|
4513
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
|
|
4514
|
-
function startOfUTCISOWeek(dirtyDate) {
|
|
4515
|
-
requiredArgs(1, arguments);
|
|
4516
|
-
var weekStartsOn = 1;
|
|
4517
|
-
var date = toDate(dirtyDate);
|
|
4518
|
-
var day = date.getUTCDay();
|
|
4519
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
4520
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
4521
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
4522
|
-
return date;
|
|
4523
|
-
}
|
|
4524
|
-
__name(startOfUTCISOWeek, "startOfUTCISOWeek");
|
|
4525
|
-
|
|
4526
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
|
|
4527
|
-
function getUTCISOWeekYear(dirtyDate) {
|
|
4528
|
-
requiredArgs(1, arguments);
|
|
4529
|
-
var date = toDate(dirtyDate);
|
|
4530
|
-
var year = date.getUTCFullYear();
|
|
4531
|
-
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
4532
|
-
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
4533
|
-
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
4534
|
-
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
4535
|
-
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
4536
|
-
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
4537
|
-
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
4538
|
-
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
4539
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
4540
|
-
return year + 1;
|
|
4541
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
4542
|
-
return year;
|
|
4543
|
-
} else {
|
|
4544
|
-
return year - 1;
|
|
4545
|
-
}
|
|
4546
|
-
}
|
|
4547
|
-
__name(getUTCISOWeekYear, "getUTCISOWeekYear");
|
|
4548
|
-
|
|
4549
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
|
|
4550
|
-
function startOfUTCISOWeekYear(dirtyDate) {
|
|
4551
|
-
requiredArgs(1, arguments);
|
|
4552
|
-
var year = getUTCISOWeekYear(dirtyDate);
|
|
4553
|
-
var fourthOfJanuary = new Date(0);
|
|
4554
|
-
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
4555
|
-
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
4556
|
-
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
4557
|
-
return date;
|
|
4558
|
-
}
|
|
4559
|
-
__name(startOfUTCISOWeekYear, "startOfUTCISOWeekYear");
|
|
4560
|
-
|
|
4561
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
|
|
4562
|
-
var MILLISECONDS_IN_WEEK = 6048e5;
|
|
4563
|
-
function getUTCISOWeek(dirtyDate) {
|
|
4564
|
-
requiredArgs(1, arguments);
|
|
4565
|
-
var date = toDate(dirtyDate);
|
|
4566
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
4567
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
4568
|
-
}
|
|
4569
|
-
__name(getUTCISOWeek, "getUTCISOWeek");
|
|
4570
|
-
|
|
4571
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
|
|
4572
|
-
function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
4573
|
-
requiredArgs(1, arguments);
|
|
4574
|
-
var options = dirtyOptions || {};
|
|
4575
|
-
var locale2 = options.locale;
|
|
4576
|
-
var localeWeekStartsOn = locale2 && locale2.options && locale2.options.weekStartsOn;
|
|
4577
|
-
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
4578
|
-
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
|
|
4579
|
-
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
4580
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
4581
|
-
}
|
|
4582
|
-
var date = toDate(dirtyDate);
|
|
4583
|
-
var day = date.getUTCDay();
|
|
4584
|
-
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
4585
|
-
date.setUTCDate(date.getUTCDate() - diff);
|
|
4586
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
4587
|
-
return date;
|
|
4588
|
-
}
|
|
4589
|
-
__name(startOfUTCWeek, "startOfUTCWeek");
|
|
4590
|
-
|
|
4591
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
|
|
4592
|
-
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
4593
|
-
requiredArgs(1, arguments);
|
|
4594
|
-
var date = toDate(dirtyDate);
|
|
4595
|
-
var year = date.getUTCFullYear();
|
|
4596
|
-
var options = dirtyOptions || {};
|
|
4597
|
-
var locale2 = options.locale;
|
|
4598
|
-
var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
|
|
4599
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
4600
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
4601
|
-
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
4602
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
4603
|
-
}
|
|
4604
|
-
var firstWeekOfNextYear = new Date(0);
|
|
4605
|
-
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
4606
|
-
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
4607
|
-
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
|
|
4608
|
-
var firstWeekOfThisYear = new Date(0);
|
|
4609
|
-
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
4610
|
-
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
4611
|
-
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
|
|
4612
|
-
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
4613
|
-
return year + 1;
|
|
4614
|
-
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
4615
|
-
return year;
|
|
4616
|
-
} else {
|
|
4617
|
-
return year - 1;
|
|
4618
|
-
}
|
|
4619
|
-
}
|
|
4620
|
-
__name(getUTCWeekYear, "getUTCWeekYear");
|
|
4621
|
-
|
|
4622
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
|
|
4623
|
-
function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
4624
|
-
requiredArgs(1, arguments);
|
|
4625
|
-
var options = dirtyOptions || {};
|
|
4626
|
-
var locale2 = options.locale;
|
|
4627
|
-
var localeFirstWeekContainsDate = locale2 && locale2.options && locale2.options.firstWeekContainsDate;
|
|
4628
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
4629
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
4630
|
-
var year = getUTCWeekYear(dirtyDate, dirtyOptions);
|
|
4631
|
-
var firstWeek = new Date(0);
|
|
4632
|
-
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
4633
|
-
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
4634
|
-
var date = startOfUTCWeek(firstWeek, dirtyOptions);
|
|
4635
|
-
return date;
|
|
4636
|
-
}
|
|
4637
|
-
__name(startOfUTCWeekYear, "startOfUTCWeekYear");
|
|
4638
|
-
|
|
4639
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/getUTCWeek/index.js
|
|
4640
|
-
var MILLISECONDS_IN_WEEK2 = 6048e5;
|
|
4641
|
-
function getUTCWeek(dirtyDate, options) {
|
|
4642
|
-
requiredArgs(1, arguments);
|
|
4643
|
-
var date = toDate(dirtyDate);
|
|
4644
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
4645
|
-
return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
|
|
4646
|
-
}
|
|
4647
|
-
__name(getUTCWeek, "getUTCWeek");
|
|
4648
|
-
|
|
4649
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
|
|
4650
|
-
function addLeadingZeros(number, targetLength) {
|
|
4651
|
-
var sign = number < 0 ? "-" : "";
|
|
4652
|
-
var output = Math.abs(number).toString();
|
|
4653
|
-
while (output.length < targetLength) {
|
|
4654
|
-
output = "0" + output;
|
|
4655
|
-
}
|
|
4656
|
-
return sign + output;
|
|
4657
|
-
}
|
|
4658
|
-
__name(addLeadingZeros, "addLeadingZeros");
|
|
4659
|
-
|
|
4660
|
-
// ../../../node_modules/.pnpm/date-fns@2.28.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
|
|
4661
|
-
var formatters = {
|
|
4662
|
-
y: function(date, token) {
|
|
4663
|
-
var signedYear = date.getUTCFullYear();
|
|
4664
|
-
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
4665
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
4666
|
-
},
|
|
4667
|
-
M: function(date, token) {
|
|
4668
|
-
var month = date.getUTCMonth();
|
|
4669
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
4670
|
-
},
|
|
4671
|
-
d: function(date, token) {
|
|
4672
|
-
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
4673
|
-
},
|
|
4674
|
-
a: function(date, token) {
|
|
4675
|
-
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
4676
|
-
switch (token) {
|
|
4677
|
-
case "a":
|
|
4678
|
-
case "aa":
|
|
4679
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
4680
|
-
case "aaa":
|
|
4681
|
-
return dayPeriodEnumValue;
|
|
4682
|
-
case "aaaaa":
|
|
4683
|
-
return dayPeriodEnumValue[0];
|
|
4684
|
-
case "aaaa":
|
|
4685
|
-
default:
|
|
4686
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
4687
|
-
}
|
|
4688
|
-
},
|
|
4689
|
-
h: function(date, token) {
|
|
4690
|
-
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
4691
|
-
},
|
|
4692
|
-
H: function(date, token) {
|
|
4693
|
-
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
4694
|
-
},
|
|
4695
|
-
m: function(date, token) {
|
|
4696
|
-
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
4697
|
-
},
|
|
4698
|
-
s: function(date, token) {
|
|
4699
|
-
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
4700
|
-
},
|
|
4701
|
-
S: function(date, token) {
|
|
4702
|
-
var numberOfDigits = token.length;
|
|
4703
|
-
var milliseconds = date.getUTCMilliseconds();
|
|
4704
|
-
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
4705
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
4706
|
-
}
|
|
4214
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
|
|
4215
|
+
var formatters = {
|
|
4216
|
+
y: /* @__PURE__ */ __name(function y(date, token) {
|
|
4217
|
+
var signedYear = date.getUTCFullYear();
|
|
4218
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
4219
|
+
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
4220
|
+
}, "y"),
|
|
4221
|
+
M: /* @__PURE__ */ __name(function M(date, token) {
|
|
4222
|
+
var month = date.getUTCMonth();
|
|
4223
|
+
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
4224
|
+
}, "M"),
|
|
4225
|
+
d: /* @__PURE__ */ __name(function d(date, token) {
|
|
4226
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
4227
|
+
}, "d"),
|
|
4228
|
+
a: /* @__PURE__ */ __name(function a(date, token) {
|
|
4229
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
4230
|
+
switch (token) {
|
|
4231
|
+
case "a":
|
|
4232
|
+
case "aa":
|
|
4233
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
4234
|
+
case "aaa":
|
|
4235
|
+
return dayPeriodEnumValue;
|
|
4236
|
+
case "aaaaa":
|
|
4237
|
+
return dayPeriodEnumValue[0];
|
|
4238
|
+
case "aaaa":
|
|
4239
|
+
default:
|
|
4240
|
+
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
4241
|
+
}
|
|
4242
|
+
}, "a"),
|
|
4243
|
+
h: /* @__PURE__ */ __name(function h(date, token) {
|
|
4244
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
4245
|
+
}, "h"),
|
|
4246
|
+
H: /* @__PURE__ */ __name(function H(date, token) {
|
|
4247
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
4248
|
+
}, "H"),
|
|
4249
|
+
m: /* @__PURE__ */ __name(function m(date, token) {
|
|
4250
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
4251
|
+
}, "m"),
|
|
4252
|
+
s: /* @__PURE__ */ __name(function s(date, token) {
|
|
4253
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
4254
|
+
}, "s"),
|
|
4255
|
+
S: /* @__PURE__ */ __name(function S(date, token) {
|
|
4256
|
+
var numberOfDigits = token.length;
|
|
4257
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
4258
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
4259
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
4260
|
+
}, "S")
|
|
4707
4261
|
};
|
|
4708
4262
|
var lightFormatters_default = formatters;
|
|
4709
4263
|
|
|
4710
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
4264
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/format/formatters/index.js
|
|
4711
4265
|
var dayPeriodEnum = {
|
|
4712
4266
|
am: "am",
|
|
4713
4267
|
pm: "pm",
|
|
@@ -4719,7 +4273,7 @@ var dayPeriodEnum = {
|
|
|
4719
4273
|
night: "night"
|
|
4720
4274
|
};
|
|
4721
4275
|
var formatters2 = {
|
|
4722
|
-
G: function(date, token, localize2) {
|
|
4276
|
+
G: /* @__PURE__ */ __name(function G(date, token, localize2) {
|
|
4723
4277
|
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
4724
4278
|
switch (token) {
|
|
4725
4279
|
case "G":
|
|
@@ -4738,8 +4292,8 @@ var formatters2 = {
|
|
|
4738
4292
|
width: "wide"
|
|
4739
4293
|
});
|
|
4740
4294
|
}
|
|
4741
|
-
},
|
|
4742
|
-
y: function(date, token, localize2) {
|
|
4295
|
+
}, "G"),
|
|
4296
|
+
y: /* @__PURE__ */ __name(function y2(date, token, localize2) {
|
|
4743
4297
|
if (token === "yo") {
|
|
4744
4298
|
var signedYear = date.getUTCFullYear();
|
|
4745
4299
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
@@ -4748,8 +4302,8 @@ var formatters2 = {
|
|
|
4748
4302
|
});
|
|
4749
4303
|
}
|
|
4750
4304
|
return lightFormatters_default.y(date, token);
|
|
4751
|
-
},
|
|
4752
|
-
Y: function(date, token, localize2, options) {
|
|
4305
|
+
}, "y"),
|
|
4306
|
+
Y: /* @__PURE__ */ __name(function Y(date, token, localize2, options) {
|
|
4753
4307
|
var signedWeekYear = getUTCWeekYear(date, options);
|
|
4754
4308
|
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
4755
4309
|
if (token === "YY") {
|
|
@@ -4762,16 +4316,16 @@ var formatters2 = {
|
|
|
4762
4316
|
});
|
|
4763
4317
|
}
|
|
4764
4318
|
return addLeadingZeros(weekYear, token.length);
|
|
4765
|
-
},
|
|
4766
|
-
R: function(date, token) {
|
|
4319
|
+
}, "Y"),
|
|
4320
|
+
R: /* @__PURE__ */ __name(function R(date, token) {
|
|
4767
4321
|
var isoWeekYear = getUTCISOWeekYear(date);
|
|
4768
4322
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
4769
|
-
},
|
|
4770
|
-
u: function(date, token) {
|
|
4323
|
+
}, "R"),
|
|
4324
|
+
u: /* @__PURE__ */ __name(function u(date, token) {
|
|
4771
4325
|
var year = date.getUTCFullYear();
|
|
4772
4326
|
return addLeadingZeros(year, token.length);
|
|
4773
|
-
},
|
|
4774
|
-
Q: function(date, token, localize2) {
|
|
4327
|
+
}, "u"),
|
|
4328
|
+
Q: /* @__PURE__ */ __name(function Q(date, token, localize2) {
|
|
4775
4329
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
4776
4330
|
switch (token) {
|
|
4777
4331
|
case "Q":
|
|
@@ -4799,8 +4353,8 @@ var formatters2 = {
|
|
|
4799
4353
|
context: "formatting"
|
|
4800
4354
|
});
|
|
4801
4355
|
}
|
|
4802
|
-
},
|
|
4803
|
-
q: function(date, token, localize2) {
|
|
4356
|
+
}, "Q"),
|
|
4357
|
+
q: /* @__PURE__ */ __name(function q(date, token, localize2) {
|
|
4804
4358
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
4805
4359
|
switch (token) {
|
|
4806
4360
|
case "q":
|
|
@@ -4828,8 +4382,8 @@ var formatters2 = {
|
|
|
4828
4382
|
context: "standalone"
|
|
4829
4383
|
});
|
|
4830
4384
|
}
|
|
4831
|
-
},
|
|
4832
|
-
M: function(date, token, localize2) {
|
|
4385
|
+
}, "q"),
|
|
4386
|
+
M: /* @__PURE__ */ __name(function M2(date, token, localize2) {
|
|
4833
4387
|
var month = date.getUTCMonth();
|
|
4834
4388
|
switch (token) {
|
|
4835
4389
|
case "M":
|
|
@@ -4856,8 +4410,8 @@ var formatters2 = {
|
|
|
4856
4410
|
context: "formatting"
|
|
4857
4411
|
});
|
|
4858
4412
|
}
|
|
4859
|
-
},
|
|
4860
|
-
L: function(date, token, localize2) {
|
|
4413
|
+
}, "M"),
|
|
4414
|
+
L: /* @__PURE__ */ __name(function L(date, token, localize2) {
|
|
4861
4415
|
var month = date.getUTCMonth();
|
|
4862
4416
|
switch (token) {
|
|
4863
4417
|
case "L":
|
|
@@ -4885,8 +4439,8 @@ var formatters2 = {
|
|
|
4885
4439
|
context: "standalone"
|
|
4886
4440
|
});
|
|
4887
4441
|
}
|
|
4888
|
-
},
|
|
4889
|
-
w: function(date, token, localize2, options) {
|
|
4442
|
+
}, "L"),
|
|
4443
|
+
w: /* @__PURE__ */ __name(function w(date, token, localize2, options) {
|
|
4890
4444
|
var week = getUTCWeek(date, options);
|
|
4891
4445
|
if (token === "wo") {
|
|
4892
4446
|
return localize2.ordinalNumber(week, {
|
|
@@ -4894,8 +4448,8 @@ var formatters2 = {
|
|
|
4894
4448
|
});
|
|
4895
4449
|
}
|
|
4896
4450
|
return addLeadingZeros(week, token.length);
|
|
4897
|
-
},
|
|
4898
|
-
I: function(date, token, localize2) {
|
|
4451
|
+
}, "w"),
|
|
4452
|
+
I: /* @__PURE__ */ __name(function I(date, token, localize2) {
|
|
4899
4453
|
var isoWeek = getUTCISOWeek(date);
|
|
4900
4454
|
if (token === "Io") {
|
|
4901
4455
|
return localize2.ordinalNumber(isoWeek, {
|
|
@@ -4903,16 +4457,16 @@ var formatters2 = {
|
|
|
4903
4457
|
});
|
|
4904
4458
|
}
|
|
4905
4459
|
return addLeadingZeros(isoWeek, token.length);
|
|
4906
|
-
},
|
|
4907
|
-
d: function(date, token, localize2) {
|
|
4460
|
+
}, "I"),
|
|
4461
|
+
d: /* @__PURE__ */ __name(function d2(date, token, localize2) {
|
|
4908
4462
|
if (token === "do") {
|
|
4909
4463
|
return localize2.ordinalNumber(date.getUTCDate(), {
|
|
4910
4464
|
unit: "date"
|
|
4911
4465
|
});
|
|
4912
4466
|
}
|
|
4913
4467
|
return lightFormatters_default.d(date, token);
|
|
4914
|
-
},
|
|
4915
|
-
D: function(date, token, localize2) {
|
|
4468
|
+
}, "d"),
|
|
4469
|
+
D: /* @__PURE__ */ __name(function D(date, token, localize2) {
|
|
4916
4470
|
var dayOfYear = getUTCDayOfYear(date);
|
|
4917
4471
|
if (token === "Do") {
|
|
4918
4472
|
return localize2.ordinalNumber(dayOfYear, {
|
|
@@ -4920,8 +4474,8 @@ var formatters2 = {
|
|
|
4920
4474
|
});
|
|
4921
4475
|
}
|
|
4922
4476
|
return addLeadingZeros(dayOfYear, token.length);
|
|
4923
|
-
},
|
|
4924
|
-
E: function(date, token, localize2) {
|
|
4477
|
+
}, "D"),
|
|
4478
|
+
E: /* @__PURE__ */ __name(function E(date, token, localize2) {
|
|
4925
4479
|
var dayOfWeek = date.getUTCDay();
|
|
4926
4480
|
switch (token) {
|
|
4927
4481
|
case "E":
|
|
@@ -4948,8 +4502,8 @@ var formatters2 = {
|
|
|
4948
4502
|
context: "formatting"
|
|
4949
4503
|
});
|
|
4950
4504
|
}
|
|
4951
|
-
},
|
|
4952
|
-
e: function(date, token, localize2, options) {
|
|
4505
|
+
}, "E"),
|
|
4506
|
+
e: /* @__PURE__ */ __name(function e(date, token, localize2, options) {
|
|
4953
4507
|
var dayOfWeek = date.getUTCDay();
|
|
4954
4508
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4955
4509
|
switch (token) {
|
|
@@ -4983,8 +4537,8 @@ var formatters2 = {
|
|
|
4983
4537
|
context: "formatting"
|
|
4984
4538
|
});
|
|
4985
4539
|
}
|
|
4986
|
-
},
|
|
4987
|
-
c: function(date, token, localize2, options) {
|
|
4540
|
+
}, "e"),
|
|
4541
|
+
c: /* @__PURE__ */ __name(function c(date, token, localize2, options) {
|
|
4988
4542
|
var dayOfWeek = date.getUTCDay();
|
|
4989
4543
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
4990
4544
|
switch (token) {
|
|
@@ -5018,8 +4572,8 @@ var formatters2 = {
|
|
|
5018
4572
|
context: "standalone"
|
|
5019
4573
|
});
|
|
5020
4574
|
}
|
|
5021
|
-
},
|
|
5022
|
-
i: function(date, token, localize2) {
|
|
4575
|
+
}, "c"),
|
|
4576
|
+
i: /* @__PURE__ */ __name(function i(date, token, localize2) {
|
|
5023
4577
|
var dayOfWeek = date.getUTCDay();
|
|
5024
4578
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
5025
4579
|
switch (token) {
|
|
@@ -5053,8 +4607,8 @@ var formatters2 = {
|
|
|
5053
4607
|
context: "formatting"
|
|
5054
4608
|
});
|
|
5055
4609
|
}
|
|
5056
|
-
},
|
|
5057
|
-
a: function(date, token, localize2) {
|
|
4610
|
+
}, "i"),
|
|
4611
|
+
a: /* @__PURE__ */ __name(function a2(date, token, localize2) {
|
|
5058
4612
|
var hours = date.getUTCHours();
|
|
5059
4613
|
var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
5060
4614
|
switch (token) {
|
|
@@ -5081,8 +4635,8 @@ var formatters2 = {
|
|
|
5081
4635
|
context: "formatting"
|
|
5082
4636
|
});
|
|
5083
4637
|
}
|
|
5084
|
-
},
|
|
5085
|
-
b: function(date, token, localize2) {
|
|
4638
|
+
}, "a"),
|
|
4639
|
+
b: /* @__PURE__ */ __name(function b(date, token, localize2) {
|
|
5086
4640
|
var hours = date.getUTCHours();
|
|
5087
4641
|
var dayPeriodEnumValue;
|
|
5088
4642
|
if (hours === 12) {
|
|
@@ -5116,8 +4670,8 @@ var formatters2 = {
|
|
|
5116
4670
|
context: "formatting"
|
|
5117
4671
|
});
|
|
5118
4672
|
}
|
|
5119
|
-
},
|
|
5120
|
-
B: function(date, token, localize2) {
|
|
4673
|
+
}, "b"),
|
|
4674
|
+
B: /* @__PURE__ */ __name(function B(date, token, localize2) {
|
|
5121
4675
|
var hours = date.getUTCHours();
|
|
5122
4676
|
var dayPeriodEnumValue;
|
|
5123
4677
|
if (hours >= 17) {
|
|
@@ -5149,8 +4703,8 @@ var formatters2 = {
|
|
|
5149
4703
|
context: "formatting"
|
|
5150
4704
|
});
|
|
5151
4705
|
}
|
|
5152
|
-
},
|
|
5153
|
-
h: function(date, token, localize2) {
|
|
4706
|
+
}, "B"),
|
|
4707
|
+
h: /* @__PURE__ */ __name(function h2(date, token, localize2) {
|
|
5154
4708
|
if (token === "ho") {
|
|
5155
4709
|
var hours = date.getUTCHours() % 12;
|
|
5156
4710
|
if (hours === 0)
|
|
@@ -5160,16 +4714,16 @@ var formatters2 = {
|
|
|
5160
4714
|
});
|
|
5161
4715
|
}
|
|
5162
4716
|
return lightFormatters_default.h(date, token);
|
|
5163
|
-
},
|
|
5164
|
-
H: function(date, token, localize2) {
|
|
4717
|
+
}, "h"),
|
|
4718
|
+
H: /* @__PURE__ */ __name(function H2(date, token, localize2) {
|
|
5165
4719
|
if (token === "Ho") {
|
|
5166
4720
|
return localize2.ordinalNumber(date.getUTCHours(), {
|
|
5167
4721
|
unit: "hour"
|
|
5168
4722
|
});
|
|
5169
4723
|
}
|
|
5170
4724
|
return lightFormatters_default.H(date, token);
|
|
5171
|
-
},
|
|
5172
|
-
K: function(date, token, localize2) {
|
|
4725
|
+
}, "H"),
|
|
4726
|
+
K: /* @__PURE__ */ __name(function K(date, token, localize2) {
|
|
5173
4727
|
var hours = date.getUTCHours() % 12;
|
|
5174
4728
|
if (token === "Ko") {
|
|
5175
4729
|
return localize2.ordinalNumber(hours, {
|
|
@@ -5177,8 +4731,8 @@ var formatters2 = {
|
|
|
5177
4731
|
});
|
|
5178
4732
|
}
|
|
5179
4733
|
return addLeadingZeros(hours, token.length);
|
|
5180
|
-
},
|
|
5181
|
-
k: function(date, token, localize2) {
|
|
4734
|
+
}, "K"),
|
|
4735
|
+
k: /* @__PURE__ */ __name(function k(date, token, localize2) {
|
|
5182
4736
|
var hours = date.getUTCHours();
|
|
5183
4737
|
if (hours === 0)
|
|
5184
4738
|
hours = 24;
|
|
@@ -5188,27 +4742,27 @@ var formatters2 = {
|
|
|
5188
4742
|
});
|
|
5189
4743
|
}
|
|
5190
4744
|
return addLeadingZeros(hours, token.length);
|
|
5191
|
-
},
|
|
5192
|
-
m: function(date, token, localize2) {
|
|
4745
|
+
}, "k"),
|
|
4746
|
+
m: /* @__PURE__ */ __name(function m2(date, token, localize2) {
|
|
5193
4747
|
if (token === "mo") {
|
|
5194
4748
|
return localize2.ordinalNumber(date.getUTCMinutes(), {
|
|
5195
4749
|
unit: "minute"
|
|
5196
4750
|
});
|
|
5197
4751
|
}
|
|
5198
4752
|
return lightFormatters_default.m(date, token);
|
|
5199
|
-
},
|
|
5200
|
-
s: function(date, token, localize2) {
|
|
4753
|
+
}, "m"),
|
|
4754
|
+
s: /* @__PURE__ */ __name(function s2(date, token, localize2) {
|
|
5201
4755
|
if (token === "so") {
|
|
5202
4756
|
return localize2.ordinalNumber(date.getUTCSeconds(), {
|
|
5203
4757
|
unit: "second"
|
|
5204
4758
|
});
|
|
5205
4759
|
}
|
|
5206
4760
|
return lightFormatters_default.s(date, token);
|
|
5207
|
-
},
|
|
5208
|
-
S: function(date, token) {
|
|
4761
|
+
}, "s"),
|
|
4762
|
+
S: /* @__PURE__ */ __name(function S2(date, token) {
|
|
5209
4763
|
return lightFormatters_default.S(date, token);
|
|
5210
|
-
},
|
|
5211
|
-
X: function(date, token, _localize, options) {
|
|
4764
|
+
}, "S"),
|
|
4765
|
+
X: /* @__PURE__ */ __name(function X(date, token, _localize, options) {
|
|
5212
4766
|
var originalDate = options._originalDate || date;
|
|
5213
4767
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
5214
4768
|
if (timezoneOffset === 0) {
|
|
@@ -5225,8 +4779,8 @@ var formatters2 = {
|
|
|
5225
4779
|
default:
|
|
5226
4780
|
return formatTimezone(timezoneOffset, ":");
|
|
5227
4781
|
}
|
|
5228
|
-
},
|
|
5229
|
-
x: function(date, token, _localize, options) {
|
|
4782
|
+
}, "X"),
|
|
4783
|
+
x: /* @__PURE__ */ __name(function x(date, token, _localize, options) {
|
|
5230
4784
|
var originalDate = options._originalDate || date;
|
|
5231
4785
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
5232
4786
|
switch (token) {
|
|
@@ -5240,204 +4794,679 @@ var formatters2 = {
|
|
|
5240
4794
|
default:
|
|
5241
4795
|
return formatTimezone(timezoneOffset, ":");
|
|
5242
4796
|
}
|
|
5243
|
-
},
|
|
5244
|
-
O: function(date, token, _localize, options) {
|
|
5245
|
-
var originalDate = options._originalDate || date;
|
|
5246
|
-
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
5247
|
-
switch (token) {
|
|
5248
|
-
case "O":
|
|
5249
|
-
case "OO":
|
|
5250
|
-
case "OOO":
|
|
5251
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
5252
|
-
case "OOOO":
|
|
5253
|
-
default:
|
|
5254
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4797
|
+
}, "x"),
|
|
4798
|
+
O: /* @__PURE__ */ __name(function O(date, token, _localize, options) {
|
|
4799
|
+
var originalDate = options._originalDate || date;
|
|
4800
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4801
|
+
switch (token) {
|
|
4802
|
+
case "O":
|
|
4803
|
+
case "OO":
|
|
4804
|
+
case "OOO":
|
|
4805
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4806
|
+
case "OOOO":
|
|
4807
|
+
default:
|
|
4808
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4809
|
+
}
|
|
4810
|
+
}, "O"),
|
|
4811
|
+
z: /* @__PURE__ */ __name(function z(date, token, _localize, options) {
|
|
4812
|
+
var originalDate = options._originalDate || date;
|
|
4813
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
4814
|
+
switch (token) {
|
|
4815
|
+
case "z":
|
|
4816
|
+
case "zz":
|
|
4817
|
+
case "zzz":
|
|
4818
|
+
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
4819
|
+
case "zzzz":
|
|
4820
|
+
default:
|
|
4821
|
+
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
4822
|
+
}
|
|
4823
|
+
}, "z"),
|
|
4824
|
+
t: /* @__PURE__ */ __name(function t(date, token, _localize, options) {
|
|
4825
|
+
var originalDate = options._originalDate || date;
|
|
4826
|
+
var timestamp = Math.floor(originalDate.getTime() / 1e3);
|
|
4827
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4828
|
+
}, "t"),
|
|
4829
|
+
T: /* @__PURE__ */ __name(function T(date, token, _localize, options) {
|
|
4830
|
+
var originalDate = options._originalDate || date;
|
|
4831
|
+
var timestamp = originalDate.getTime();
|
|
4832
|
+
return addLeadingZeros(timestamp, token.length);
|
|
4833
|
+
}, "T")
|
|
4834
|
+
};
|
|
4835
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
4836
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4837
|
+
var absOffset = Math.abs(offset);
|
|
4838
|
+
var hours = Math.floor(absOffset / 60);
|
|
4839
|
+
var minutes = absOffset % 60;
|
|
4840
|
+
if (minutes === 0) {
|
|
4841
|
+
return sign + String(hours);
|
|
4842
|
+
}
|
|
4843
|
+
var delimiter = dirtyDelimiter || "";
|
|
4844
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
4845
|
+
}
|
|
4846
|
+
__name(formatTimezoneShort, "formatTimezoneShort");
|
|
4847
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
4848
|
+
if (offset % 60 === 0) {
|
|
4849
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4850
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
4851
|
+
}
|
|
4852
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
4853
|
+
}
|
|
4854
|
+
__name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
|
|
4855
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
4856
|
+
var delimiter = dirtyDelimiter || "";
|
|
4857
|
+
var sign = offset > 0 ? "-" : "+";
|
|
4858
|
+
var absOffset = Math.abs(offset);
|
|
4859
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
4860
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
4861
|
+
return sign + hours + delimiter + minutes;
|
|
4862
|
+
}
|
|
4863
|
+
__name(formatTimezone, "formatTimezone");
|
|
4864
|
+
var formatters_default = formatters2;
|
|
4865
|
+
|
|
4866
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/format/longFormatters/index.js
|
|
4867
|
+
var dateLongFormatter = /* @__PURE__ */ __name(function dateLongFormatter2(pattern, formatLong2) {
|
|
4868
|
+
switch (pattern) {
|
|
4869
|
+
case "P":
|
|
4870
|
+
return formatLong2.date({
|
|
4871
|
+
width: "short"
|
|
4872
|
+
});
|
|
4873
|
+
case "PP":
|
|
4874
|
+
return formatLong2.date({
|
|
4875
|
+
width: "medium"
|
|
4876
|
+
});
|
|
4877
|
+
case "PPP":
|
|
4878
|
+
return formatLong2.date({
|
|
4879
|
+
width: "long"
|
|
4880
|
+
});
|
|
4881
|
+
case "PPPP":
|
|
4882
|
+
default:
|
|
4883
|
+
return formatLong2.date({
|
|
4884
|
+
width: "full"
|
|
4885
|
+
});
|
|
4886
|
+
}
|
|
4887
|
+
}, "dateLongFormatter");
|
|
4888
|
+
var timeLongFormatter = /* @__PURE__ */ __name(function timeLongFormatter2(pattern, formatLong2) {
|
|
4889
|
+
switch (pattern) {
|
|
4890
|
+
case "p":
|
|
4891
|
+
return formatLong2.time({
|
|
4892
|
+
width: "short"
|
|
4893
|
+
});
|
|
4894
|
+
case "pp":
|
|
4895
|
+
return formatLong2.time({
|
|
4896
|
+
width: "medium"
|
|
4897
|
+
});
|
|
4898
|
+
case "ppp":
|
|
4899
|
+
return formatLong2.time({
|
|
4900
|
+
width: "long"
|
|
4901
|
+
});
|
|
4902
|
+
case "pppp":
|
|
4903
|
+
default:
|
|
4904
|
+
return formatLong2.time({
|
|
4905
|
+
width: "full"
|
|
4906
|
+
});
|
|
4907
|
+
}
|
|
4908
|
+
}, "timeLongFormatter");
|
|
4909
|
+
var dateTimeLongFormatter = /* @__PURE__ */ __name(function dateTimeLongFormatter2(pattern, formatLong2) {
|
|
4910
|
+
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
4911
|
+
var datePattern = matchResult[1];
|
|
4912
|
+
var timePattern = matchResult[2];
|
|
4913
|
+
if (!timePattern) {
|
|
4914
|
+
return dateLongFormatter(pattern, formatLong2);
|
|
4915
|
+
}
|
|
4916
|
+
var dateTimeFormat;
|
|
4917
|
+
switch (datePattern) {
|
|
4918
|
+
case "P":
|
|
4919
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4920
|
+
width: "short"
|
|
4921
|
+
});
|
|
4922
|
+
break;
|
|
4923
|
+
case "PP":
|
|
4924
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4925
|
+
width: "medium"
|
|
4926
|
+
});
|
|
4927
|
+
break;
|
|
4928
|
+
case "PPP":
|
|
4929
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4930
|
+
width: "long"
|
|
4931
|
+
});
|
|
4932
|
+
break;
|
|
4933
|
+
case "PPPP":
|
|
4934
|
+
default:
|
|
4935
|
+
dateTimeFormat = formatLong2.dateTime({
|
|
4936
|
+
width: "full"
|
|
4937
|
+
});
|
|
4938
|
+
break;
|
|
4939
|
+
}
|
|
4940
|
+
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
4941
|
+
}, "dateTimeLongFormatter");
|
|
4942
|
+
var longFormatters = {
|
|
4943
|
+
p: timeLongFormatter,
|
|
4944
|
+
P: dateTimeLongFormatter
|
|
4945
|
+
};
|
|
4946
|
+
var longFormatters_default = longFormatters;
|
|
4947
|
+
|
|
4948
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/protectedTokens/index.js
|
|
4949
|
+
var protectedDayOfYearTokens = ["D", "DD"];
|
|
4950
|
+
var protectedWeekYearTokens = ["YY", "YYYY"];
|
|
4951
|
+
function isProtectedDayOfYearToken(token) {
|
|
4952
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
4953
|
+
}
|
|
4954
|
+
__name(isProtectedDayOfYearToken, "isProtectedDayOfYearToken");
|
|
4955
|
+
function isProtectedWeekYearToken(token) {
|
|
4956
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
4957
|
+
}
|
|
4958
|
+
__name(isProtectedWeekYearToken, "isProtectedWeekYearToken");
|
|
4959
|
+
function throwProtectedError(token, format2, input) {
|
|
4960
|
+
if (token === "YYYY") {
|
|
4961
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4962
|
+
} else if (token === "YY") {
|
|
4963
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4964
|
+
} else if (token === "D") {
|
|
4965
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4966
|
+
} else if (token === "DD") {
|
|
4967
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4970
|
+
__name(throwProtectedError, "throwProtectedError");
|
|
4971
|
+
|
|
4972
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
|
|
4973
|
+
var formatDistanceLocale = {
|
|
4974
|
+
lessThanXSeconds: {
|
|
4975
|
+
one: "less than a second",
|
|
4976
|
+
other: "less than {{count}} seconds"
|
|
4977
|
+
},
|
|
4978
|
+
xSeconds: {
|
|
4979
|
+
one: "1 second",
|
|
4980
|
+
other: "{{count}} seconds"
|
|
4981
|
+
},
|
|
4982
|
+
halfAMinute: "half a minute",
|
|
4983
|
+
lessThanXMinutes: {
|
|
4984
|
+
one: "less than a minute",
|
|
4985
|
+
other: "less than {{count}} minutes"
|
|
4986
|
+
},
|
|
4987
|
+
xMinutes: {
|
|
4988
|
+
one: "1 minute",
|
|
4989
|
+
other: "{{count}} minutes"
|
|
4990
|
+
},
|
|
4991
|
+
aboutXHours: {
|
|
4992
|
+
one: "about 1 hour",
|
|
4993
|
+
other: "about {{count}} hours"
|
|
4994
|
+
},
|
|
4995
|
+
xHours: {
|
|
4996
|
+
one: "1 hour",
|
|
4997
|
+
other: "{{count}} hours"
|
|
4998
|
+
},
|
|
4999
|
+
xDays: {
|
|
5000
|
+
one: "1 day",
|
|
5001
|
+
other: "{{count}} days"
|
|
5002
|
+
},
|
|
5003
|
+
aboutXWeeks: {
|
|
5004
|
+
one: "about 1 week",
|
|
5005
|
+
other: "about {{count}} weeks"
|
|
5006
|
+
},
|
|
5007
|
+
xWeeks: {
|
|
5008
|
+
one: "1 week",
|
|
5009
|
+
other: "{{count}} weeks"
|
|
5010
|
+
},
|
|
5011
|
+
aboutXMonths: {
|
|
5012
|
+
one: "about 1 month",
|
|
5013
|
+
other: "about {{count}} months"
|
|
5014
|
+
},
|
|
5015
|
+
xMonths: {
|
|
5016
|
+
one: "1 month",
|
|
5017
|
+
other: "{{count}} months"
|
|
5018
|
+
},
|
|
5019
|
+
aboutXYears: {
|
|
5020
|
+
one: "about 1 year",
|
|
5021
|
+
other: "about {{count}} years"
|
|
5022
|
+
},
|
|
5023
|
+
xYears: {
|
|
5024
|
+
one: "1 year",
|
|
5025
|
+
other: "{{count}} years"
|
|
5026
|
+
},
|
|
5027
|
+
overXYears: {
|
|
5028
|
+
one: "over 1 year",
|
|
5029
|
+
other: "over {{count}} years"
|
|
5030
|
+
},
|
|
5031
|
+
almostXYears: {
|
|
5032
|
+
one: "almost 1 year",
|
|
5033
|
+
other: "almost {{count}} years"
|
|
5034
|
+
}
|
|
5035
|
+
};
|
|
5036
|
+
var formatDistance = /* @__PURE__ */ __name(function formatDistance2(token, count, options) {
|
|
5037
|
+
var result;
|
|
5038
|
+
var tokenValue = formatDistanceLocale[token];
|
|
5039
|
+
if (typeof tokenValue === "string") {
|
|
5040
|
+
result = tokenValue;
|
|
5041
|
+
} else if (count === 1) {
|
|
5042
|
+
result = tokenValue.one;
|
|
5043
|
+
} else {
|
|
5044
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
5045
|
+
}
|
|
5046
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
5047
|
+
if (options.comparison && options.comparison > 0) {
|
|
5048
|
+
return "in " + result;
|
|
5049
|
+
} else {
|
|
5050
|
+
return result + " ago";
|
|
5051
|
+
}
|
|
5052
|
+
}
|
|
5053
|
+
return result;
|
|
5054
|
+
}, "formatDistance");
|
|
5055
|
+
var formatDistance_default = formatDistance;
|
|
5056
|
+
|
|
5057
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
|
|
5058
|
+
function buildFormatLongFn(args) {
|
|
5059
|
+
return function() {
|
|
5060
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5061
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
5062
|
+
var format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
5063
|
+
return format2;
|
|
5064
|
+
};
|
|
5065
|
+
}
|
|
5066
|
+
__name(buildFormatLongFn, "buildFormatLongFn");
|
|
5067
|
+
|
|
5068
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
|
|
5069
|
+
var dateFormats = {
|
|
5070
|
+
full: "EEEE, MMMM do, y",
|
|
5071
|
+
long: "MMMM do, y",
|
|
5072
|
+
medium: "MMM d, y",
|
|
5073
|
+
short: "MM/dd/yyyy"
|
|
5074
|
+
};
|
|
5075
|
+
var timeFormats = {
|
|
5076
|
+
full: "h:mm:ss a zzzz",
|
|
5077
|
+
long: "h:mm:ss a z",
|
|
5078
|
+
medium: "h:mm:ss a",
|
|
5079
|
+
short: "h:mm a"
|
|
5080
|
+
};
|
|
5081
|
+
var dateTimeFormats = {
|
|
5082
|
+
full: "{{date}} 'at' {{time}}",
|
|
5083
|
+
long: "{{date}} 'at' {{time}}",
|
|
5084
|
+
medium: "{{date}}, {{time}}",
|
|
5085
|
+
short: "{{date}}, {{time}}"
|
|
5086
|
+
};
|
|
5087
|
+
var formatLong = {
|
|
5088
|
+
date: buildFormatLongFn({
|
|
5089
|
+
formats: dateFormats,
|
|
5090
|
+
defaultWidth: "full"
|
|
5091
|
+
}),
|
|
5092
|
+
time: buildFormatLongFn({
|
|
5093
|
+
formats: timeFormats,
|
|
5094
|
+
defaultWidth: "full"
|
|
5095
|
+
}),
|
|
5096
|
+
dateTime: buildFormatLongFn({
|
|
5097
|
+
formats: dateTimeFormats,
|
|
5098
|
+
defaultWidth: "full"
|
|
5099
|
+
})
|
|
5100
|
+
};
|
|
5101
|
+
var formatLong_default = formatLong;
|
|
5102
|
+
|
|
5103
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
|
|
5104
|
+
var formatRelativeLocale = {
|
|
5105
|
+
lastWeek: "'last' eeee 'at' p",
|
|
5106
|
+
yesterday: "'yesterday at' p",
|
|
5107
|
+
today: "'today at' p",
|
|
5108
|
+
tomorrow: "'tomorrow at' p",
|
|
5109
|
+
nextWeek: "eeee 'at' p",
|
|
5110
|
+
other: "P"
|
|
5111
|
+
};
|
|
5112
|
+
var formatRelative = /* @__PURE__ */ __name(function formatRelative2(token, _date, _baseDate, _options) {
|
|
5113
|
+
return formatRelativeLocale[token];
|
|
5114
|
+
}, "formatRelative");
|
|
5115
|
+
var formatRelative_default = formatRelative;
|
|
5116
|
+
|
|
5117
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
|
|
5118
|
+
function buildLocalizeFn(args) {
|
|
5119
|
+
return function(dirtyIndex, options) {
|
|
5120
|
+
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
|
|
5121
|
+
var valuesArray;
|
|
5122
|
+
if (context === "formatting" && args.formattingValues) {
|
|
5123
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
5124
|
+
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
|
|
5125
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
5126
|
+
} else {
|
|
5127
|
+
var _defaultWidth = args.defaultWidth;
|
|
5128
|
+
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
|
|
5129
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
5255
5130
|
}
|
|
5131
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
|
|
5132
|
+
return valuesArray[index];
|
|
5133
|
+
};
|
|
5134
|
+
}
|
|
5135
|
+
__name(buildLocalizeFn, "buildLocalizeFn");
|
|
5136
|
+
|
|
5137
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
|
|
5138
|
+
var eraValues = {
|
|
5139
|
+
narrow: ["B", "A"],
|
|
5140
|
+
abbreviated: ["BC", "AD"],
|
|
5141
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
5142
|
+
};
|
|
5143
|
+
var quarterValues = {
|
|
5144
|
+
narrow: ["1", "2", "3", "4"],
|
|
5145
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
5146
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
5147
|
+
};
|
|
5148
|
+
var monthValues = {
|
|
5149
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
5150
|
+
abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
|
5151
|
+
wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
5152
|
+
};
|
|
5153
|
+
var dayValues = {
|
|
5154
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
5155
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
5156
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
5157
|
+
wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
|
|
5158
|
+
};
|
|
5159
|
+
var dayPeriodValues = {
|
|
5160
|
+
narrow: {
|
|
5161
|
+
am: "a",
|
|
5162
|
+
pm: "p",
|
|
5163
|
+
midnight: "mi",
|
|
5164
|
+
noon: "n",
|
|
5165
|
+
morning: "morning",
|
|
5166
|
+
afternoon: "afternoon",
|
|
5167
|
+
evening: "evening",
|
|
5168
|
+
night: "night"
|
|
5256
5169
|
},
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
default:
|
|
5267
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
5268
|
-
}
|
|
5170
|
+
abbreviated: {
|
|
5171
|
+
am: "AM",
|
|
5172
|
+
pm: "PM",
|
|
5173
|
+
midnight: "midnight",
|
|
5174
|
+
noon: "noon",
|
|
5175
|
+
morning: "morning",
|
|
5176
|
+
afternoon: "afternoon",
|
|
5177
|
+
evening: "evening",
|
|
5178
|
+
night: "night"
|
|
5269
5179
|
},
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5180
|
+
wide: {
|
|
5181
|
+
am: "a.m.",
|
|
5182
|
+
pm: "p.m.",
|
|
5183
|
+
midnight: "midnight",
|
|
5184
|
+
noon: "noon",
|
|
5185
|
+
morning: "morning",
|
|
5186
|
+
afternoon: "afternoon",
|
|
5187
|
+
evening: "evening",
|
|
5188
|
+
night: "night"
|
|
5189
|
+
}
|
|
5190
|
+
};
|
|
5191
|
+
var formattingDayPeriodValues = {
|
|
5192
|
+
narrow: {
|
|
5193
|
+
am: "a",
|
|
5194
|
+
pm: "p",
|
|
5195
|
+
midnight: "mi",
|
|
5196
|
+
noon: "n",
|
|
5197
|
+
morning: "in the morning",
|
|
5198
|
+
afternoon: "in the afternoon",
|
|
5199
|
+
evening: "in the evening",
|
|
5200
|
+
night: "at night"
|
|
5274
5201
|
},
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5202
|
+
abbreviated: {
|
|
5203
|
+
am: "AM",
|
|
5204
|
+
pm: "PM",
|
|
5205
|
+
midnight: "midnight",
|
|
5206
|
+
noon: "noon",
|
|
5207
|
+
morning: "in the morning",
|
|
5208
|
+
afternoon: "in the afternoon",
|
|
5209
|
+
evening: "in the evening",
|
|
5210
|
+
night: "at night"
|
|
5211
|
+
},
|
|
5212
|
+
wide: {
|
|
5213
|
+
am: "a.m.",
|
|
5214
|
+
pm: "p.m.",
|
|
5215
|
+
midnight: "midnight",
|
|
5216
|
+
noon: "noon",
|
|
5217
|
+
morning: "in the morning",
|
|
5218
|
+
afternoon: "in the afternoon",
|
|
5219
|
+
evening: "in the evening",
|
|
5220
|
+
night: "at night"
|
|
5279
5221
|
}
|
|
5280
5222
|
};
|
|
5281
|
-
function
|
|
5282
|
-
var
|
|
5283
|
-
var
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5223
|
+
var ordinalNumber = /* @__PURE__ */ __name(function ordinalNumber2(dirtyNumber, _options) {
|
|
5224
|
+
var number = Number(dirtyNumber);
|
|
5225
|
+
var rem100 = number % 100;
|
|
5226
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
5227
|
+
switch (rem100 % 10) {
|
|
5228
|
+
case 1:
|
|
5229
|
+
return number + "st";
|
|
5230
|
+
case 2:
|
|
5231
|
+
return number + "nd";
|
|
5232
|
+
case 3:
|
|
5233
|
+
return number + "rd";
|
|
5234
|
+
}
|
|
5288
5235
|
}
|
|
5289
|
-
|
|
5290
|
-
|
|
5236
|
+
return number + "th";
|
|
5237
|
+
}, "ordinalNumber");
|
|
5238
|
+
var localize = {
|
|
5239
|
+
ordinalNumber,
|
|
5240
|
+
era: buildLocalizeFn({
|
|
5241
|
+
values: eraValues,
|
|
5242
|
+
defaultWidth: "wide"
|
|
5243
|
+
}),
|
|
5244
|
+
quarter: buildLocalizeFn({
|
|
5245
|
+
values: quarterValues,
|
|
5246
|
+
defaultWidth: "wide",
|
|
5247
|
+
argumentCallback: /* @__PURE__ */ __name(function argumentCallback(quarter) {
|
|
5248
|
+
return quarter - 1;
|
|
5249
|
+
}, "argumentCallback")
|
|
5250
|
+
}),
|
|
5251
|
+
month: buildLocalizeFn({
|
|
5252
|
+
values: monthValues,
|
|
5253
|
+
defaultWidth: "wide"
|
|
5254
|
+
}),
|
|
5255
|
+
day: buildLocalizeFn({
|
|
5256
|
+
values: dayValues,
|
|
5257
|
+
defaultWidth: "wide"
|
|
5258
|
+
}),
|
|
5259
|
+
dayPeriod: buildLocalizeFn({
|
|
5260
|
+
values: dayPeriodValues,
|
|
5261
|
+
defaultWidth: "wide",
|
|
5262
|
+
formattingValues: formattingDayPeriodValues,
|
|
5263
|
+
defaultFormattingWidth: "wide"
|
|
5264
|
+
})
|
|
5265
|
+
};
|
|
5266
|
+
var localize_default = localize;
|
|
5267
|
+
|
|
5268
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
|
|
5269
|
+
function buildMatchFn(args) {
|
|
5270
|
+
return function(string) {
|
|
5271
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5272
|
+
var width = options.width;
|
|
5273
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
5274
|
+
var matchResult = string.match(matchPattern);
|
|
5275
|
+
if (!matchResult) {
|
|
5276
|
+
return null;
|
|
5277
|
+
}
|
|
5278
|
+
var matchedString = matchResult[0];
|
|
5279
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
5280
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
|
|
5281
|
+
return pattern.test(matchedString);
|
|
5282
|
+
}) : findKey(parsePatterns, function(pattern) {
|
|
5283
|
+
return pattern.test(matchedString);
|
|
5284
|
+
});
|
|
5285
|
+
var value;
|
|
5286
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
5287
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
5288
|
+
var rest = string.slice(matchedString.length);
|
|
5289
|
+
return {
|
|
5290
|
+
value,
|
|
5291
|
+
rest
|
|
5292
|
+
};
|
|
5293
|
+
};
|
|
5291
5294
|
}
|
|
5292
|
-
__name(
|
|
5293
|
-
function
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5295
|
+
__name(buildMatchFn, "buildMatchFn");
|
|
5296
|
+
function findKey(object, predicate) {
|
|
5297
|
+
for (var key in object) {
|
|
5298
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
5299
|
+
return key;
|
|
5300
|
+
}
|
|
5297
5301
|
}
|
|
5298
|
-
return
|
|
5299
|
-
}
|
|
5300
|
-
__name(formatTimezoneWithOptionalMinutes, "formatTimezoneWithOptionalMinutes");
|
|
5301
|
-
function formatTimezone(offset, dirtyDelimiter) {
|
|
5302
|
-
var delimiter = dirtyDelimiter || "";
|
|
5303
|
-
var sign = offset > 0 ? "-" : "+";
|
|
5304
|
-
var absOffset = Math.abs(offset);
|
|
5305
|
-
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
5306
|
-
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
5307
|
-
return sign + hours + delimiter + minutes;
|
|
5302
|
+
return void 0;
|
|
5308
5303
|
}
|
|
5309
|
-
__name(
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
case "P":
|
|
5316
|
-
return formatLong2.date({
|
|
5317
|
-
width: "short"
|
|
5318
|
-
});
|
|
5319
|
-
case "PP":
|
|
5320
|
-
return formatLong2.date({
|
|
5321
|
-
width: "medium"
|
|
5322
|
-
});
|
|
5323
|
-
case "PPP":
|
|
5324
|
-
return formatLong2.date({
|
|
5325
|
-
width: "long"
|
|
5326
|
-
});
|
|
5327
|
-
case "PPPP":
|
|
5328
|
-
default:
|
|
5329
|
-
return formatLong2.date({
|
|
5330
|
-
width: "full"
|
|
5331
|
-
});
|
|
5304
|
+
__name(findKey, "findKey");
|
|
5305
|
+
function findIndex(array, predicate) {
|
|
5306
|
+
for (var key = 0; key < array.length; key++) {
|
|
5307
|
+
if (predicate(array[key])) {
|
|
5308
|
+
return key;
|
|
5309
|
+
}
|
|
5332
5310
|
}
|
|
5311
|
+
return void 0;
|
|
5333
5312
|
}
|
|
5334
|
-
__name(
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
return
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
return
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
}
|
|
5313
|
+
__name(findIndex, "findIndex");
|
|
5314
|
+
|
|
5315
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
|
|
5316
|
+
function buildMatchPatternFn(args) {
|
|
5317
|
+
return function(string) {
|
|
5318
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5319
|
+
var matchResult = string.match(args.matchPattern);
|
|
5320
|
+
if (!matchResult)
|
|
5321
|
+
return null;
|
|
5322
|
+
var matchedString = matchResult[0];
|
|
5323
|
+
var parseResult = string.match(args.parsePattern);
|
|
5324
|
+
if (!parseResult)
|
|
5325
|
+
return null;
|
|
5326
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
5327
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
5328
|
+
var rest = string.slice(matchedString.length);
|
|
5329
|
+
return {
|
|
5330
|
+
value,
|
|
5331
|
+
rest
|
|
5332
|
+
};
|
|
5333
|
+
};
|
|
5355
5334
|
}
|
|
5356
|
-
__name(
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5335
|
+
__name(buildMatchPatternFn, "buildMatchPatternFn");
|
|
5336
|
+
|
|
5337
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
|
|
5338
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
5339
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
5340
|
+
var matchEraPatterns = {
|
|
5341
|
+
narrow: /^(b|a)/i,
|
|
5342
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
5343
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
5344
|
+
};
|
|
5345
|
+
var parseEraPatterns = {
|
|
5346
|
+
any: [/^b/i, /^(a|c)/i]
|
|
5347
|
+
};
|
|
5348
|
+
var matchQuarterPatterns = {
|
|
5349
|
+
narrow: /^[1234]/i,
|
|
5350
|
+
abbreviated: /^q[1234]/i,
|
|
5351
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
5352
|
+
};
|
|
5353
|
+
var parseQuarterPatterns = {
|
|
5354
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
5355
|
+
};
|
|
5356
|
+
var matchMonthPatterns = {
|
|
5357
|
+
narrow: /^[jfmasond]/i,
|
|
5358
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
5359
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
5360
|
+
};
|
|
5361
|
+
var parseMonthPatterns = {
|
|
5362
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
5363
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
5364
|
+
};
|
|
5365
|
+
var matchDayPatterns = {
|
|
5366
|
+
narrow: /^[smtwf]/i,
|
|
5367
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
5368
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
5369
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
5370
|
+
};
|
|
5371
|
+
var parseDayPatterns = {
|
|
5372
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
5373
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
5374
|
+
};
|
|
5375
|
+
var matchDayPeriodPatterns = {
|
|
5376
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
5377
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
5378
|
+
};
|
|
5379
|
+
var parseDayPeriodPatterns = {
|
|
5380
|
+
any: {
|
|
5381
|
+
am: /^a/i,
|
|
5382
|
+
pm: /^p/i,
|
|
5383
|
+
midnight: /^mi/i,
|
|
5384
|
+
noon: /^no/i,
|
|
5385
|
+
morning: /morning/i,
|
|
5386
|
+
afternoon: /afternoon/i,
|
|
5387
|
+
evening: /evening/i,
|
|
5388
|
+
night: /night/i
|
|
5387
5389
|
}
|
|
5388
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
5389
|
-
}
|
|
5390
|
-
__name(dateTimeLongFormatter, "dateTimeLongFormatter");
|
|
5391
|
-
var longFormatters = {
|
|
5392
|
-
p: timeLongFormatter,
|
|
5393
|
-
P: dateTimeLongFormatter
|
|
5394
5390
|
};
|
|
5395
|
-
var
|
|
5391
|
+
var match = {
|
|
5392
|
+
ordinalNumber: buildMatchPatternFn({
|
|
5393
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
5394
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
5395
|
+
valueCallback: /* @__PURE__ */ __name(function valueCallback(value) {
|
|
5396
|
+
return parseInt(value, 10);
|
|
5397
|
+
}, "valueCallback")
|
|
5398
|
+
}),
|
|
5399
|
+
era: buildMatchFn({
|
|
5400
|
+
matchPatterns: matchEraPatterns,
|
|
5401
|
+
defaultMatchWidth: "wide",
|
|
5402
|
+
parsePatterns: parseEraPatterns,
|
|
5403
|
+
defaultParseWidth: "any"
|
|
5404
|
+
}),
|
|
5405
|
+
quarter: buildMatchFn({
|
|
5406
|
+
matchPatterns: matchQuarterPatterns,
|
|
5407
|
+
defaultMatchWidth: "wide",
|
|
5408
|
+
parsePatterns: parseQuarterPatterns,
|
|
5409
|
+
defaultParseWidth: "any",
|
|
5410
|
+
valueCallback: /* @__PURE__ */ __name(function valueCallback2(index) {
|
|
5411
|
+
return index + 1;
|
|
5412
|
+
}, "valueCallback")
|
|
5413
|
+
}),
|
|
5414
|
+
month: buildMatchFn({
|
|
5415
|
+
matchPatterns: matchMonthPatterns,
|
|
5416
|
+
defaultMatchWidth: "wide",
|
|
5417
|
+
parsePatterns: parseMonthPatterns,
|
|
5418
|
+
defaultParseWidth: "any"
|
|
5419
|
+
}),
|
|
5420
|
+
day: buildMatchFn({
|
|
5421
|
+
matchPatterns: matchDayPatterns,
|
|
5422
|
+
defaultMatchWidth: "wide",
|
|
5423
|
+
parsePatterns: parseDayPatterns,
|
|
5424
|
+
defaultParseWidth: "any"
|
|
5425
|
+
}),
|
|
5426
|
+
dayPeriod: buildMatchFn({
|
|
5427
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
5428
|
+
defaultMatchWidth: "any",
|
|
5429
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
5430
|
+
defaultParseWidth: "any"
|
|
5431
|
+
})
|
|
5432
|
+
};
|
|
5433
|
+
var match_default = match;
|
|
5396
5434
|
|
|
5397
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
5398
|
-
var
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
function throwProtectedError(token, format2, input) {
|
|
5409
|
-
if (token === "YYYY") {
|
|
5410
|
-
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
5411
|
-
} else if (token === "YY") {
|
|
5412
|
-
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
5413
|
-
} else if (token === "D") {
|
|
5414
|
-
throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
5415
|
-
} else if (token === "DD") {
|
|
5416
|
-
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
5435
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/locale/en-US/index.js
|
|
5436
|
+
var locale = {
|
|
5437
|
+
code: "en-US",
|
|
5438
|
+
formatDistance: formatDistance_default,
|
|
5439
|
+
formatLong: formatLong_default,
|
|
5440
|
+
formatRelative: formatRelative_default,
|
|
5441
|
+
localize: localize_default,
|
|
5442
|
+
match: match_default,
|
|
5443
|
+
options: {
|
|
5444
|
+
weekStartsOn: 0,
|
|
5445
|
+
firstWeekContainsDate: 1
|
|
5417
5446
|
}
|
|
5418
|
-
}
|
|
5419
|
-
|
|
5447
|
+
};
|
|
5448
|
+
var en_US_default = locale;
|
|
5420
5449
|
|
|
5421
|
-
// ../../../node_modules/.pnpm/date-fns@2.
|
|
5450
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/defaultLocale/index.js
|
|
5451
|
+
var defaultLocale_default = en_US_default;
|
|
5452
|
+
|
|
5453
|
+
// ../../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/format/index.js
|
|
5422
5454
|
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
5423
5455
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
5424
5456
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
5425
5457
|
var doubleQuoteRegExp = /''/g;
|
|
5426
5458
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
5427
|
-
function format(dirtyDate, dirtyFormatStr,
|
|
5459
|
+
function format(dirtyDate, dirtyFormatStr, options) {
|
|
5460
|
+
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
5428
5461
|
requiredArgs(2, arguments);
|
|
5429
5462
|
var formatStr = String(dirtyFormatStr);
|
|
5430
|
-
var
|
|
5431
|
-
var locale2 = options.locale
|
|
5432
|
-
var
|
|
5433
|
-
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
5434
|
-
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
5463
|
+
var defaultOptions2 = getDefaultOptions();
|
|
5464
|
+
var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale_default;
|
|
5465
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
5435
5466
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
5436
5467
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
5437
5468
|
}
|
|
5438
|
-
var
|
|
5439
|
-
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
5440
|
-
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn);
|
|
5469
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
5441
5470
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
5442
5471
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
5443
5472
|
}
|
|
@@ -5463,7 +5492,7 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
5463
5492
|
var firstCharacter = substring[0];
|
|
5464
5493
|
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
5465
5494
|
var longFormatter = longFormatters_default[firstCharacter];
|
|
5466
|
-
return longFormatter(substring, locale2.formatLong
|
|
5495
|
+
return longFormatter(substring, locale2.formatLong);
|
|
5467
5496
|
}
|
|
5468
5497
|
return substring;
|
|
5469
5498
|
}).join("").match(formattingTokensRegExp).map(function(substring) {
|
|
@@ -5476,11 +5505,11 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
5476
5505
|
}
|
|
5477
5506
|
var formatter = formatters_default[firstCharacter];
|
|
5478
5507
|
if (formatter) {
|
|
5479
|
-
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
|
|
5480
|
-
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
5508
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
5509
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5481
5510
|
}
|
|
5482
|
-
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
|
|
5483
|
-
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
5511
|
+
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
5512
|
+
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
5484
5513
|
}
|
|
5485
5514
|
return formatter(utcDate, substring, locale2.localize, formatterOptions);
|
|
5486
5515
|
}
|
|
@@ -5493,7 +5522,11 @@ function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
|
5493
5522
|
}
|
|
5494
5523
|
__name(format, "format");
|
|
5495
5524
|
function cleanEscapedString(input) {
|
|
5496
|
-
|
|
5525
|
+
var matched = input.match(escapedStringRegExp);
|
|
5526
|
+
if (!matched) {
|
|
5527
|
+
return input;
|
|
5528
|
+
}
|
|
5529
|
+
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
5497
5530
|
}
|
|
5498
5531
|
__name(cleanEscapedString, "cleanEscapedString");
|
|
5499
5532
|
|
|
@@ -5504,14 +5537,26 @@ var transformErrorCheck = /* @__PURE__ */ __name((error, _credential) => {
|
|
|
5504
5537
|
}, "transformErrorCheck");
|
|
5505
5538
|
var transformErrorMessage = /* @__PURE__ */ __name((error, credential) => {
|
|
5506
5539
|
if (error.startsWith("expiration")) {
|
|
5507
|
-
return credential.expirationDate ? `Invalid \u2022 Expired ${format(
|
|
5540
|
+
return credential.expirationDate ? `Invalid \u2022 Expired ${format(
|
|
5541
|
+
new Date(credential.expirationDate),
|
|
5542
|
+
"dd MMM yyyy"
|
|
5543
|
+
).toUpperCase()}` : "Invalid \u2022 Expired";
|
|
5508
5544
|
}
|
|
5509
5545
|
return error;
|
|
5510
5546
|
}, "transformErrorMessage");
|
|
5547
|
+
var transformWarningCheck = /* @__PURE__ */ __name((warning, _credential) => {
|
|
5548
|
+
if (warning.includes("Boost Authenticity"))
|
|
5549
|
+
return "Boost Authenticity";
|
|
5550
|
+
const prefix = warning.split(" warning")[0];
|
|
5551
|
+
return prefix || warning;
|
|
5552
|
+
}, "transformWarningCheck");
|
|
5511
5553
|
var transformCheckMessage = /* @__PURE__ */ __name((check, credential) => {
|
|
5512
5554
|
return {
|
|
5513
5555
|
proof: "Valid",
|
|
5514
|
-
expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
|
|
5556
|
+
expiration: credential.expirationDate ? `Valid \u2022 Expires ${format(
|
|
5557
|
+
new Date(credential.expirationDate),
|
|
5558
|
+
"dd MMM yyyy"
|
|
5559
|
+
).toUpperCase()}` : "Valid \u2022 Does Not Expire"
|
|
5515
5560
|
}[check] || check;
|
|
5516
5561
|
}, "transformCheckMessage");
|
|
5517
5562
|
var verifyCredential = /* @__PURE__ */ __name((learnCard) => {
|
|
@@ -5530,7 +5575,7 @@ var verifyCredential = /* @__PURE__ */ __name((learnCard) => {
|
|
|
5530
5575
|
rawVerificationCheck.warnings.forEach((warning) => {
|
|
5531
5576
|
verificationItems.push({
|
|
5532
5577
|
status: VerificationStatusEnum.Error,
|
|
5533
|
-
check:
|
|
5578
|
+
check: transformWarningCheck(warning, credential),
|
|
5534
5579
|
message: warning
|
|
5535
5580
|
});
|
|
5536
5581
|
});
|