scordi-extension 1.15.15 → 1.15.18
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/blocks/NetworkCatchBlock.d.ts +4 -0
- package/dist/blocks/NetworkCatchBlock.d.ts.map +1 -1
- package/dist/blocks/index.d.ts +3 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/sdk/EightGClient.d.ts +32 -1
- package/dist/sdk/EightGClient.d.ts.map +1 -1
- package/dist/sdk/index.cjs +4 -4
- package/dist/sdk/index.js +651 -606
- package/dist/src/blocks/NetworkCatchBlock.ts.js +5 -0
- package/dist/types/internal-messages.d.ts +1 -0
- package/dist/types/internal-messages.d.ts.map +1 -1
- package/dist/vendor/vite-client.js +1 -1
- package/package.json +1 -1
package/dist/sdk/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var Rr;
|
|
|
46
46
|
// second overwrites first
|
|
47
47
|
});
|
|
48
48
|
})(Rr || (Rr = {}));
|
|
49
|
-
const
|
|
49
|
+
const W = we.arrayToEnum([
|
|
50
50
|
"string",
|
|
51
51
|
"nan",
|
|
52
52
|
"number",
|
|
@@ -70,23 +70,23 @@ const z = we.arrayToEnum([
|
|
|
70
70
|
]), _t = (r) => {
|
|
71
71
|
switch (typeof r) {
|
|
72
72
|
case "undefined":
|
|
73
|
-
return
|
|
73
|
+
return W.undefined;
|
|
74
74
|
case "string":
|
|
75
|
-
return
|
|
75
|
+
return W.string;
|
|
76
76
|
case "number":
|
|
77
|
-
return Number.isNaN(r) ?
|
|
77
|
+
return Number.isNaN(r) ? W.nan : W.number;
|
|
78
78
|
case "boolean":
|
|
79
|
-
return
|
|
79
|
+
return W.boolean;
|
|
80
80
|
case "function":
|
|
81
|
-
return
|
|
81
|
+
return W.function;
|
|
82
82
|
case "bigint":
|
|
83
|
-
return
|
|
83
|
+
return W.bigint;
|
|
84
84
|
case "symbol":
|
|
85
|
-
return
|
|
85
|
+
return W.symbol;
|
|
86
86
|
case "object":
|
|
87
|
-
return Array.isArray(r) ?
|
|
87
|
+
return Array.isArray(r) ? W.array : r === null ? W.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? W.promise : typeof Map < "u" && r instanceof Map ? W.map : typeof Set < "u" && r instanceof Set ? W.set : typeof Date < "u" && r instanceof Date ? W.date : W.object;
|
|
88
88
|
default:
|
|
89
|
-
return
|
|
89
|
+
return W.unknown;
|
|
90
90
|
}
|
|
91
91
|
}, P = we.arrayToEnum([
|
|
92
92
|
"invalid_type",
|
|
@@ -174,7 +174,7 @@ const Gt = (r, e) => {
|
|
|
174
174
|
let t;
|
|
175
175
|
switch (r.code) {
|
|
176
176
|
case P.invalid_type:
|
|
177
|
-
r.received ===
|
|
177
|
+
r.received === W.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
|
|
178
178
|
break;
|
|
179
179
|
case P.invalid_literal:
|
|
180
180
|
t = `Invalid literal value, expected ${JSON.stringify(r.expected, we.jsonStringifyReplacer)}`;
|
|
@@ -503,7 +503,7 @@ class le {
|
|
|
503
503
|
return yt.create(this, this._def);
|
|
504
504
|
}
|
|
505
505
|
nullable() {
|
|
506
|
-
return
|
|
506
|
+
return Rt.create(this, this._def);
|
|
507
507
|
}
|
|
508
508
|
nullish() {
|
|
509
509
|
return this.nullable().optional();
|
|
@@ -573,9 +573,9 @@ class le {
|
|
|
573
573
|
return this.safeParse(null).success;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
const In = /^c[^\s-]{8,}$/i, jn = /^[0-9a-z]+$/, Fn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, $n = /^[a-z0-9_-]{21}$/i, Ln = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Bn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Zn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,
|
|
576
|
+
const In = /^c[^\s-]{8,}$/i, jn = /^[0-9a-z]+$/, Fn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, $n = /^[a-z0-9_-]{21}$/i, Ln = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Bn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Zn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Wn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
577
577
|
let Pr;
|
|
578
|
-
const
|
|
578
|
+
const zn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Vn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, qn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, Hn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Gn = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Yn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Qr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Kn = new RegExp(`^${Qr}$`);
|
|
579
579
|
function en(r) {
|
|
580
580
|
let e = "[0-5]\\d";
|
|
581
581
|
r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`);
|
|
@@ -591,7 +591,7 @@ function tn(r) {
|
|
|
591
591
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
592
592
|
}
|
|
593
593
|
function Xn(r, e) {
|
|
594
|
-
return !!((e === "v4" || !e) &&
|
|
594
|
+
return !!((e === "v4" || !e) && zn.test(r) || (e === "v6" || !e) && qn.test(r));
|
|
595
595
|
}
|
|
596
596
|
function Qn(r, e) {
|
|
597
597
|
if (!Ln.test(r))
|
|
@@ -611,11 +611,11 @@ function ea(r, e) {
|
|
|
611
611
|
}
|
|
612
612
|
class ft extends le {
|
|
613
613
|
_parse(e) {
|
|
614
|
-
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !==
|
|
614
|
+
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== W.string) {
|
|
615
615
|
const i = this._getOrReturnCtx(e);
|
|
616
616
|
return $(i, {
|
|
617
617
|
code: P.invalid_type,
|
|
618
|
-
expected:
|
|
618
|
+
expected: W.string,
|
|
619
619
|
received: i.parsedType
|
|
620
620
|
}), te;
|
|
621
621
|
}
|
|
@@ -664,7 +664,7 @@ class ft extends le {
|
|
|
664
664
|
message: i.message
|
|
665
665
|
}), a.dirty());
|
|
666
666
|
else if (i.kind === "emoji")
|
|
667
|
-
Pr || (Pr = new RegExp(
|
|
667
|
+
Pr || (Pr = new RegExp(Wn, "u")), Pr.test(e.data) || (s = this._getOrReturnCtx(e, s), $(s, {
|
|
668
668
|
validation: "emoji",
|
|
669
669
|
code: P.invalid_string,
|
|
670
670
|
message: i.message
|
|
@@ -996,16 +996,16 @@ function ta(r, e) {
|
|
|
996
996
|
const t = (r.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, s = t > a ? t : a, i = Number.parseInt(r.toFixed(s).replace(".", "")), c = Number.parseInt(e.toFixed(s).replace(".", ""));
|
|
997
997
|
return i % c / 10 ** s;
|
|
998
998
|
}
|
|
999
|
-
class
|
|
999
|
+
class Pt extends le {
|
|
1000
1000
|
constructor() {
|
|
1001
1001
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1002
1002
|
}
|
|
1003
1003
|
_parse(e) {
|
|
1004
|
-
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !==
|
|
1004
|
+
if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== W.number) {
|
|
1005
1005
|
const i = this._getOrReturnCtx(e);
|
|
1006
1006
|
return $(i, {
|
|
1007
1007
|
code: P.invalid_type,
|
|
1008
|
-
expected:
|
|
1008
|
+
expected: W.number,
|
|
1009
1009
|
received: i.parsedType
|
|
1010
1010
|
}), te;
|
|
1011
1011
|
}
|
|
@@ -1054,7 +1054,7 @@ class Ot extends le {
|
|
|
1054
1054
|
return this.setLimit("max", e, !1, Y.toString(t));
|
|
1055
1055
|
}
|
|
1056
1056
|
setLimit(e, t, a, s) {
|
|
1057
|
-
return new
|
|
1057
|
+
return new Pt({
|
|
1058
1058
|
...this._def,
|
|
1059
1059
|
checks: [
|
|
1060
1060
|
...this._def.checks,
|
|
@@ -1068,7 +1068,7 @@ class Ot extends le {
|
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
1070
|
_addCheck(e) {
|
|
1071
|
-
return new
|
|
1071
|
+
return new Pt({
|
|
1072
1072
|
...this._def,
|
|
1073
1073
|
checks: [...this._def.checks, e]
|
|
1074
1074
|
});
|
|
@@ -1162,13 +1162,13 @@ class Ot extends le {
|
|
|
1162
1162
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
|
|
1165
|
+
Pt.create = (r) => new Pt({
|
|
1166
1166
|
checks: [],
|
|
1167
1167
|
typeName: ne.ZodNumber,
|
|
1168
1168
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1169
1169
|
...oe(r)
|
|
1170
1170
|
});
|
|
1171
|
-
class
|
|
1171
|
+
class Nt extends le {
|
|
1172
1172
|
constructor() {
|
|
1173
1173
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1174
1174
|
}
|
|
@@ -1179,7 +1179,7 @@ class Pt extends le {
|
|
|
1179
1179
|
} catch {
|
|
1180
1180
|
return this._getInvalidInput(e);
|
|
1181
1181
|
}
|
|
1182
|
-
if (this._getType(e) !==
|
|
1182
|
+
if (this._getType(e) !== W.bigint)
|
|
1183
1183
|
return this._getInvalidInput(e);
|
|
1184
1184
|
let a;
|
|
1185
1185
|
const s = new Ke();
|
|
@@ -1207,7 +1207,7 @@ class Pt extends le {
|
|
|
1207
1207
|
const t = this._getOrReturnCtx(e);
|
|
1208
1208
|
return $(t, {
|
|
1209
1209
|
code: P.invalid_type,
|
|
1210
|
-
expected:
|
|
1210
|
+
expected: W.bigint,
|
|
1211
1211
|
received: t.parsedType
|
|
1212
1212
|
}), te;
|
|
1213
1213
|
}
|
|
@@ -1224,7 +1224,7 @@ class Pt extends le {
|
|
|
1224
1224
|
return this.setLimit("max", e, !1, Y.toString(t));
|
|
1225
1225
|
}
|
|
1226
1226
|
setLimit(e, t, a, s) {
|
|
1227
|
-
return new
|
|
1227
|
+
return new Nt({
|
|
1228
1228
|
...this._def,
|
|
1229
1229
|
checks: [
|
|
1230
1230
|
...this._def.checks,
|
|
@@ -1238,7 +1238,7 @@ class Pt extends le {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
}
|
|
1240
1240
|
_addCheck(e) {
|
|
1241
|
-
return new
|
|
1241
|
+
return new Nt({
|
|
1242
1242
|
...this._def,
|
|
1243
1243
|
checks: [...this._def.checks, e]
|
|
1244
1244
|
});
|
|
@@ -1295,7 +1295,7 @@ class Pt extends le {
|
|
|
1295
1295
|
return e;
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
|
-
|
|
1298
|
+
Nt.create = (r) => new Nt({
|
|
1299
1299
|
checks: [],
|
|
1300
1300
|
typeName: ne.ZodBigInt,
|
|
1301
1301
|
coerce: (r == null ? void 0 : r.coerce) ?? !1,
|
|
@@ -1303,11 +1303,11 @@ Pt.create = (r) => new Pt({
|
|
|
1303
1303
|
});
|
|
1304
1304
|
class rr extends le {
|
|
1305
1305
|
_parse(e) {
|
|
1306
|
-
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !==
|
|
1306
|
+
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== W.boolean) {
|
|
1307
1307
|
const a = this._getOrReturnCtx(e);
|
|
1308
1308
|
return $(a, {
|
|
1309
1309
|
code: P.invalid_type,
|
|
1310
|
-
expected:
|
|
1310
|
+
expected: W.boolean,
|
|
1311
1311
|
received: a.parsedType
|
|
1312
1312
|
}), te;
|
|
1313
1313
|
}
|
|
@@ -1321,11 +1321,11 @@ rr.create = (r) => new rr({
|
|
|
1321
1321
|
});
|
|
1322
1322
|
class Ut extends le {
|
|
1323
1323
|
_parse(e) {
|
|
1324
|
-
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !==
|
|
1324
|
+
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== W.date) {
|
|
1325
1325
|
const i = this._getOrReturnCtx(e);
|
|
1326
1326
|
return $(i, {
|
|
1327
1327
|
code: P.invalid_type,
|
|
1328
|
-
expected:
|
|
1328
|
+
expected: W.date,
|
|
1329
1329
|
received: i.parsedType
|
|
1330
1330
|
}), te;
|
|
1331
1331
|
}
|
|
@@ -1399,11 +1399,11 @@ Ut.create = (r) => new Ut({
|
|
|
1399
1399
|
});
|
|
1400
1400
|
class Er extends le {
|
|
1401
1401
|
_parse(e) {
|
|
1402
|
-
if (this._getType(e) !==
|
|
1402
|
+
if (this._getType(e) !== W.symbol) {
|
|
1403
1403
|
const a = this._getOrReturnCtx(e);
|
|
1404
1404
|
return $(a, {
|
|
1405
1405
|
code: P.invalid_type,
|
|
1406
|
-
expected:
|
|
1406
|
+
expected: W.symbol,
|
|
1407
1407
|
received: a.parsedType
|
|
1408
1408
|
}), te;
|
|
1409
1409
|
}
|
|
@@ -1416,11 +1416,11 @@ Er.create = (r) => new Er({
|
|
|
1416
1416
|
});
|
|
1417
1417
|
class nr extends le {
|
|
1418
1418
|
_parse(e) {
|
|
1419
|
-
if (this._getType(e) !==
|
|
1419
|
+
if (this._getType(e) !== W.undefined) {
|
|
1420
1420
|
const a = this._getOrReturnCtx(e);
|
|
1421
1421
|
return $(a, {
|
|
1422
1422
|
code: P.invalid_type,
|
|
1423
|
-
expected:
|
|
1423
|
+
expected: W.undefined,
|
|
1424
1424
|
received: a.parsedType
|
|
1425
1425
|
}), te;
|
|
1426
1426
|
}
|
|
@@ -1433,11 +1433,11 @@ nr.create = (r) => new nr({
|
|
|
1433
1433
|
});
|
|
1434
1434
|
class ar extends le {
|
|
1435
1435
|
_parse(e) {
|
|
1436
|
-
if (this._getType(e) !==
|
|
1436
|
+
if (this._getType(e) !== W.null) {
|
|
1437
1437
|
const a = this._getOrReturnCtx(e);
|
|
1438
1438
|
return $(a, {
|
|
1439
1439
|
code: P.invalid_type,
|
|
1440
|
-
expected:
|
|
1440
|
+
expected: W.null,
|
|
1441
1441
|
received: a.parsedType
|
|
1442
1442
|
}), te;
|
|
1443
1443
|
}
|
|
@@ -1477,7 +1477,7 @@ class Et extends le {
|
|
|
1477
1477
|
const t = this._getOrReturnCtx(e);
|
|
1478
1478
|
return $(t, {
|
|
1479
1479
|
code: P.invalid_type,
|
|
1480
|
-
expected:
|
|
1480
|
+
expected: W.never,
|
|
1481
1481
|
received: t.parsedType
|
|
1482
1482
|
}), te;
|
|
1483
1483
|
}
|
|
@@ -1488,11 +1488,11 @@ Et.create = (r) => new Et({
|
|
|
1488
1488
|
});
|
|
1489
1489
|
class Tr extends le {
|
|
1490
1490
|
_parse(e) {
|
|
1491
|
-
if (this._getType(e) !==
|
|
1491
|
+
if (this._getType(e) !== W.undefined) {
|
|
1492
1492
|
const a = this._getOrReturnCtx(e);
|
|
1493
1493
|
return $(a, {
|
|
1494
1494
|
code: P.invalid_type,
|
|
1495
|
-
expected:
|
|
1495
|
+
expected: W.void,
|
|
1496
1496
|
received: a.parsedType
|
|
1497
1497
|
}), te;
|
|
1498
1498
|
}
|
|
@@ -1506,10 +1506,10 @@ Tr.create = (r) => new Tr({
|
|
|
1506
1506
|
class dt extends le {
|
|
1507
1507
|
_parse(e) {
|
|
1508
1508
|
const { ctx: t, status: a } = this._processInputParams(e), s = this._def;
|
|
1509
|
-
if (t.parsedType !==
|
|
1509
|
+
if (t.parsedType !== W.array)
|
|
1510
1510
|
return $(t, {
|
|
1511
1511
|
code: P.invalid_type,
|
|
1512
|
-
expected:
|
|
1512
|
+
expected: W.array,
|
|
1513
1513
|
received: t.parsedType
|
|
1514
1514
|
}), te;
|
|
1515
1515
|
if (s.exactLength !== null) {
|
|
@@ -1577,22 +1577,22 @@ dt.create = (r, e) => new dt({
|
|
|
1577
1577
|
...oe(e)
|
|
1578
1578
|
});
|
|
1579
1579
|
function Vt(r) {
|
|
1580
|
-
if (r instanceof
|
|
1580
|
+
if (r instanceof je) {
|
|
1581
1581
|
const e = {};
|
|
1582
1582
|
for (const t in r.shape) {
|
|
1583
1583
|
const a = r.shape[t];
|
|
1584
1584
|
e[t] = yt.create(Vt(a));
|
|
1585
1585
|
}
|
|
1586
|
-
return new
|
|
1586
|
+
return new je({
|
|
1587
1587
|
...r._def,
|
|
1588
1588
|
shape: () => e
|
|
1589
1589
|
});
|
|
1590
1590
|
} else return r instanceof dt ? new dt({
|
|
1591
1591
|
...r._def,
|
|
1592
1592
|
type: Vt(r.element)
|
|
1593
|
-
}) : r instanceof yt ? yt.create(Vt(r.unwrap())) : r instanceof
|
|
1593
|
+
}) : r instanceof yt ? yt.create(Vt(r.unwrap())) : r instanceof Rt ? Rt.create(Vt(r.unwrap())) : r instanceof vt ? vt.create(r.items.map((e) => Vt(e))) : r;
|
|
1594
1594
|
}
|
|
1595
|
-
class
|
|
1595
|
+
class je extends le {
|
|
1596
1596
|
constructor() {
|
|
1597
1597
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1598
1598
|
}
|
|
@@ -1603,11 +1603,11 @@ class Ie extends le {
|
|
|
1603
1603
|
return this._cached = { shape: e, keys: t }, this._cached;
|
|
1604
1604
|
}
|
|
1605
1605
|
_parse(e) {
|
|
1606
|
-
if (this._getType(e) !==
|
|
1606
|
+
if (this._getType(e) !== W.object) {
|
|
1607
1607
|
const k = this._getOrReturnCtx(e);
|
|
1608
1608
|
return $(k, {
|
|
1609
1609
|
code: P.invalid_type,
|
|
1610
|
-
expected:
|
|
1610
|
+
expected: W.object,
|
|
1611
1611
|
received: k.parsedType
|
|
1612
1612
|
}), te;
|
|
1613
1613
|
}
|
|
@@ -1669,7 +1669,7 @@ class Ie extends le {
|
|
|
1669
1669
|
return this._def.shape();
|
|
1670
1670
|
}
|
|
1671
1671
|
strict(e) {
|
|
1672
|
-
return Y.errToObj, new
|
|
1672
|
+
return Y.errToObj, new je({
|
|
1673
1673
|
...this._def,
|
|
1674
1674
|
unknownKeys: "strict",
|
|
1675
1675
|
...e !== void 0 ? {
|
|
@@ -1686,13 +1686,13 @@ class Ie extends le {
|
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
1688
|
strip() {
|
|
1689
|
-
return new
|
|
1689
|
+
return new je({
|
|
1690
1690
|
...this._def,
|
|
1691
1691
|
unknownKeys: "strip"
|
|
1692
1692
|
});
|
|
1693
1693
|
}
|
|
1694
1694
|
passthrough() {
|
|
1695
|
-
return new
|
|
1695
|
+
return new je({
|
|
1696
1696
|
...this._def,
|
|
1697
1697
|
unknownKeys: "passthrough"
|
|
1698
1698
|
});
|
|
@@ -1715,7 +1715,7 @@ class Ie extends le {
|
|
|
1715
1715
|
// }) as any;
|
|
1716
1716
|
// };
|
|
1717
1717
|
extend(e) {
|
|
1718
|
-
return new
|
|
1718
|
+
return new je({
|
|
1719
1719
|
...this._def,
|
|
1720
1720
|
shape: () => ({
|
|
1721
1721
|
...this._def.shape(),
|
|
@@ -1729,7 +1729,7 @@ class Ie extends le {
|
|
|
1729
1729
|
* upgrade if you are experiencing issues.
|
|
1730
1730
|
*/
|
|
1731
1731
|
merge(e) {
|
|
1732
|
-
return new
|
|
1732
|
+
return new je({
|
|
1733
1733
|
unknownKeys: e._def.unknownKeys,
|
|
1734
1734
|
catchall: e._def.catchall,
|
|
1735
1735
|
shape: () => ({
|
|
@@ -1799,7 +1799,7 @@ class Ie extends le {
|
|
|
1799
1799
|
// return merged;
|
|
1800
1800
|
// }
|
|
1801
1801
|
catchall(e) {
|
|
1802
|
-
return new
|
|
1802
|
+
return new je({
|
|
1803
1803
|
...this._def,
|
|
1804
1804
|
catchall: e
|
|
1805
1805
|
});
|
|
@@ -1808,7 +1808,7 @@ class Ie extends le {
|
|
|
1808
1808
|
const t = {};
|
|
1809
1809
|
for (const a of we.objectKeys(e))
|
|
1810
1810
|
e[a] && this.shape[a] && (t[a] = this.shape[a]);
|
|
1811
|
-
return new
|
|
1811
|
+
return new je({
|
|
1812
1812
|
...this._def,
|
|
1813
1813
|
shape: () => t
|
|
1814
1814
|
});
|
|
@@ -1817,7 +1817,7 @@ class Ie extends le {
|
|
|
1817
1817
|
const t = {};
|
|
1818
1818
|
for (const a of we.objectKeys(this.shape))
|
|
1819
1819
|
e[a] || (t[a] = this.shape[a]);
|
|
1820
|
-
return new
|
|
1820
|
+
return new je({
|
|
1821
1821
|
...this._def,
|
|
1822
1822
|
shape: () => t
|
|
1823
1823
|
});
|
|
@@ -1834,7 +1834,7 @@ class Ie extends le {
|
|
|
1834
1834
|
const s = this.shape[a];
|
|
1835
1835
|
e && !e[a] ? t[a] = s : t[a] = s.optional();
|
|
1836
1836
|
}
|
|
1837
|
-
return new
|
|
1837
|
+
return new je({
|
|
1838
1838
|
...this._def,
|
|
1839
1839
|
shape: () => t
|
|
1840
1840
|
});
|
|
@@ -1850,7 +1850,7 @@ class Ie extends le {
|
|
|
1850
1850
|
i = i._def.innerType;
|
|
1851
1851
|
t[a] = i;
|
|
1852
1852
|
}
|
|
1853
|
-
return new
|
|
1853
|
+
return new je({
|
|
1854
1854
|
...this._def,
|
|
1855
1855
|
shape: () => t
|
|
1856
1856
|
});
|
|
@@ -1859,21 +1859,21 @@ class Ie extends le {
|
|
|
1859
1859
|
return rn(we.objectKeys(this.shape));
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
|
|
1862
|
+
je.create = (r, e) => new je({
|
|
1863
1863
|
shape: () => r,
|
|
1864
1864
|
unknownKeys: "strip",
|
|
1865
1865
|
catchall: Et.create(),
|
|
1866
1866
|
typeName: ne.ZodObject,
|
|
1867
1867
|
...oe(e)
|
|
1868
1868
|
});
|
|
1869
|
-
|
|
1869
|
+
je.strictCreate = (r, e) => new je({
|
|
1870
1870
|
shape: () => r,
|
|
1871
1871
|
unknownKeys: "strict",
|
|
1872
1872
|
catchall: Et.create(),
|
|
1873
1873
|
typeName: ne.ZodObject,
|
|
1874
1874
|
...oe(e)
|
|
1875
1875
|
});
|
|
1876
|
-
|
|
1876
|
+
je.lazycreate = (r, e) => new je({
|
|
1877
1877
|
shape: r,
|
|
1878
1878
|
unknownKeys: "strip",
|
|
1879
1879
|
catchall: Et.create(),
|
|
@@ -1953,14 +1953,14 @@ sr.create = (r, e) => new sr({
|
|
|
1953
1953
|
typeName: ne.ZodUnion,
|
|
1954
1954
|
...oe(e)
|
|
1955
1955
|
});
|
|
1956
|
-
const xt = (r) => r instanceof cr ? xt(r.schema) : r instanceof ht ? xt(r.innerType()) : r instanceof ur ? [r.value] : r instanceof
|
|
1956
|
+
const xt = (r) => r instanceof cr ? xt(r.schema) : r instanceof ht ? xt(r.innerType()) : r instanceof ur ? [r.value] : r instanceof Ct ? r.options : r instanceof lr ? we.objectValues(r.enum) : r instanceof fr ? xt(r._def.innerType) : r instanceof nr ? [void 0] : r instanceof ar ? [null] : r instanceof yt ? [void 0, ...xt(r.unwrap())] : r instanceof Rt ? [null, ...xt(r.unwrap())] : r instanceof $r || r instanceof hr ? xt(r.unwrap()) : r instanceof dr ? xt(r._def.innerType) : [];
|
|
1957
1957
|
class Dr extends le {
|
|
1958
1958
|
_parse(e) {
|
|
1959
1959
|
const { ctx: t } = this._processInputParams(e);
|
|
1960
|
-
if (t.parsedType !==
|
|
1960
|
+
if (t.parsedType !== W.object)
|
|
1961
1961
|
return $(t, {
|
|
1962
1962
|
code: P.invalid_type,
|
|
1963
|
-
expected:
|
|
1963
|
+
expected: W.object,
|
|
1964
1964
|
received: t.parsedType
|
|
1965
1965
|
}), te;
|
|
1966
1966
|
const a = this.discriminator, s = t.data[a], i = this.optionsMap.get(s);
|
|
@@ -2020,7 +2020,7 @@ function jr(r, e) {
|
|
|
2020
2020
|
const t = _t(r), a = _t(e);
|
|
2021
2021
|
if (r === e)
|
|
2022
2022
|
return { valid: !0, data: r };
|
|
2023
|
-
if (t ===
|
|
2023
|
+
if (t === W.object && a === W.object) {
|
|
2024
2024
|
const s = we.objectKeys(e), i = we.objectKeys(r).filter((f) => s.indexOf(f) !== -1), c = { ...r, ...e };
|
|
2025
2025
|
for (const f of i) {
|
|
2026
2026
|
const w = jr(r[f], e[f]);
|
|
@@ -2029,7 +2029,7 @@ function jr(r, e) {
|
|
|
2029
2029
|
c[f] = w.data;
|
|
2030
2030
|
}
|
|
2031
2031
|
return { valid: !0, data: c };
|
|
2032
|
-
} else if (t ===
|
|
2032
|
+
} else if (t === W.array && a === W.array) {
|
|
2033
2033
|
if (r.length !== e.length)
|
|
2034
2034
|
return { valid: !1 };
|
|
2035
2035
|
const s = [];
|
|
@@ -2040,7 +2040,7 @@ function jr(r, e) {
|
|
|
2040
2040
|
s.push(w.data);
|
|
2041
2041
|
}
|
|
2042
2042
|
return { valid: !0, data: s };
|
|
2043
|
-
} else return t ===
|
|
2043
|
+
} else return t === W.date && a === W.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
2044
2044
|
}
|
|
2045
2045
|
class ir extends le {
|
|
2046
2046
|
_parse(e) {
|
|
@@ -2083,10 +2083,10 @@ ir.create = (r, e, t) => new ir({
|
|
|
2083
2083
|
class vt extends le {
|
|
2084
2084
|
_parse(e) {
|
|
2085
2085
|
const { status: t, ctx: a } = this._processInputParams(e);
|
|
2086
|
-
if (a.parsedType !==
|
|
2086
|
+
if (a.parsedType !== W.array)
|
|
2087
2087
|
return $(a, {
|
|
2088
2088
|
code: P.invalid_type,
|
|
2089
|
-
expected:
|
|
2089
|
+
expected: W.array,
|
|
2090
2090
|
received: a.parsedType
|
|
2091
2091
|
}), te;
|
|
2092
2092
|
if (a.data.length < this._def.items.length)
|
|
@@ -2139,10 +2139,10 @@ class or extends le {
|
|
|
2139
2139
|
}
|
|
2140
2140
|
_parse(e) {
|
|
2141
2141
|
const { status: t, ctx: a } = this._processInputParams(e);
|
|
2142
|
-
if (a.parsedType !==
|
|
2142
|
+
if (a.parsedType !== W.object)
|
|
2143
2143
|
return $(a, {
|
|
2144
2144
|
code: P.invalid_type,
|
|
2145
|
-
expected:
|
|
2145
|
+
expected: W.object,
|
|
2146
2146
|
received: a.parsedType
|
|
2147
2147
|
}), te;
|
|
2148
2148
|
const s = [], i = this._def.keyType, c = this._def.valueType;
|
|
@@ -2180,10 +2180,10 @@ class Ar extends le {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
_parse(e) {
|
|
2182
2182
|
const { status: t, ctx: a } = this._processInputParams(e);
|
|
2183
|
-
if (a.parsedType !==
|
|
2183
|
+
if (a.parsedType !== W.map)
|
|
2184
2184
|
return $(a, {
|
|
2185
2185
|
code: P.invalid_type,
|
|
2186
|
-
expected:
|
|
2186
|
+
expected: W.map,
|
|
2187
2187
|
received: a.parsedType
|
|
2188
2188
|
}), te;
|
|
2189
2189
|
const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, w], k) => ({
|
|
@@ -2222,10 +2222,10 @@ Ar.create = (r, e, t) => new Ar({
|
|
|
2222
2222
|
class $t extends le {
|
|
2223
2223
|
_parse(e) {
|
|
2224
2224
|
const { status: t, ctx: a } = this._processInputParams(e);
|
|
2225
|
-
if (a.parsedType !==
|
|
2225
|
+
if (a.parsedType !== W.set)
|
|
2226
2226
|
return $(a, {
|
|
2227
2227
|
code: P.invalid_type,
|
|
2228
|
-
expected:
|
|
2228
|
+
expected: W.set,
|
|
2229
2229
|
received: a.parsedType
|
|
2230
2230
|
}), te;
|
|
2231
2231
|
const s = this._def;
|
|
@@ -2289,10 +2289,10 @@ class Ht extends le {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
_parse(e) {
|
|
2291
2291
|
const { ctx: t } = this._processInputParams(e);
|
|
2292
|
-
if (t.parsedType !==
|
|
2292
|
+
if (t.parsedType !== W.function)
|
|
2293
2293
|
return $(t, {
|
|
2294
2294
|
code: P.invalid_type,
|
|
2295
|
-
expected:
|
|
2295
|
+
expected: W.function,
|
|
2296
2296
|
received: t.parsedType
|
|
2297
2297
|
}), te;
|
|
2298
2298
|
function a(f, w) {
|
|
@@ -2410,13 +2410,13 @@ ur.create = (r, e) => new ur({
|
|
|
2410
2410
|
...oe(e)
|
|
2411
2411
|
});
|
|
2412
2412
|
function rn(r, e) {
|
|
2413
|
-
return new
|
|
2413
|
+
return new Ct({
|
|
2414
2414
|
values: r,
|
|
2415
2415
|
typeName: ne.ZodEnum,
|
|
2416
2416
|
...oe(e)
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
class
|
|
2419
|
+
class Ct extends le {
|
|
2420
2420
|
_parse(e) {
|
|
2421
2421
|
if (typeof e.data != "string") {
|
|
2422
2422
|
const t = this._getOrReturnCtx(e), a = this._def.values;
|
|
@@ -2458,23 +2458,23 @@ class Nt extends le {
|
|
|
2458
2458
|
return e;
|
|
2459
2459
|
}
|
|
2460
2460
|
extract(e, t = this._def) {
|
|
2461
|
-
return
|
|
2461
|
+
return Ct.create(e, {
|
|
2462
2462
|
...this._def,
|
|
2463
2463
|
...t
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
2466
|
exclude(e, t = this._def) {
|
|
2467
|
-
return
|
|
2467
|
+
return Ct.create(this.options.filter((a) => !e.includes(a)), {
|
|
2468
2468
|
...this._def,
|
|
2469
2469
|
...t
|
|
2470
2470
|
});
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
|
-
|
|
2473
|
+
Ct.create = rn;
|
|
2474
2474
|
class lr extends le {
|
|
2475
2475
|
_parse(e) {
|
|
2476
2476
|
const t = we.getValidEnumValues(this._def.values), a = this._getOrReturnCtx(e);
|
|
2477
|
-
if (a.parsedType !==
|
|
2477
|
+
if (a.parsedType !== W.string && a.parsedType !== W.number) {
|
|
2478
2478
|
const s = we.objectValues(t);
|
|
2479
2479
|
return $(a, {
|
|
2480
2480
|
expected: we.joinValues(s),
|
|
@@ -2507,13 +2507,13 @@ class Kt extends le {
|
|
|
2507
2507
|
}
|
|
2508
2508
|
_parse(e) {
|
|
2509
2509
|
const { ctx: t } = this._processInputParams(e);
|
|
2510
|
-
if (t.parsedType !==
|
|
2510
|
+
if (t.parsedType !== W.promise && t.common.async === !1)
|
|
2511
2511
|
return $(t, {
|
|
2512
2512
|
code: P.invalid_type,
|
|
2513
|
-
expected:
|
|
2513
|
+
expected: W.promise,
|
|
2514
2514
|
received: t.parsedType
|
|
2515
2515
|
}), te;
|
|
2516
|
-
const a = t.parsedType ===
|
|
2516
|
+
const a = t.parsedType === W.promise ? t.data : Promise.resolve(t.data);
|
|
2517
2517
|
return Je(a.then((s) => this._def.type.parseAsync(s, {
|
|
2518
2518
|
path: t.path,
|
|
2519
2519
|
errorMap: t.common.contextualErrorMap
|
|
@@ -2619,7 +2619,7 @@ ht.createWithPreprocess = (r, e, t) => new ht({
|
|
|
2619
2619
|
});
|
|
2620
2620
|
class yt extends le {
|
|
2621
2621
|
_parse(e) {
|
|
2622
|
-
return this._getType(e) ===
|
|
2622
|
+
return this._getType(e) === W.undefined ? Je(void 0) : this._def.innerType._parse(e);
|
|
2623
2623
|
}
|
|
2624
2624
|
unwrap() {
|
|
2625
2625
|
return this._def.innerType;
|
|
@@ -2630,15 +2630,15 @@ yt.create = (r, e) => new yt({
|
|
|
2630
2630
|
typeName: ne.ZodOptional,
|
|
2631
2631
|
...oe(e)
|
|
2632
2632
|
});
|
|
2633
|
-
class
|
|
2633
|
+
class Rt extends le {
|
|
2634
2634
|
_parse(e) {
|
|
2635
|
-
return this._getType(e) ===
|
|
2635
|
+
return this._getType(e) === W.null ? Je(null) : this._def.innerType._parse(e);
|
|
2636
2636
|
}
|
|
2637
2637
|
unwrap() {
|
|
2638
2638
|
return this._def.innerType;
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
|
|
2641
|
+
Rt.create = (r, e) => new Rt({
|
|
2642
2642
|
innerType: r,
|
|
2643
2643
|
typeName: ne.ZodNullable,
|
|
2644
2644
|
...oe(e)
|
|
@@ -2647,7 +2647,7 @@ class fr extends le {
|
|
|
2647
2647
|
_parse(e) {
|
|
2648
2648
|
const { ctx: t } = this._processInputParams(e);
|
|
2649
2649
|
let a = t.data;
|
|
2650
|
-
return t.parsedType ===
|
|
2650
|
+
return t.parsedType === W.undefined && (a = this._def.defaultValue()), this._def.innerType._parse({
|
|
2651
2651
|
data: a,
|
|
2652
2652
|
path: t.path,
|
|
2653
2653
|
parent: t
|
|
@@ -2708,11 +2708,11 @@ dr.create = (r, e) => new dr({
|
|
|
2708
2708
|
});
|
|
2709
2709
|
class Sr extends le {
|
|
2710
2710
|
_parse(e) {
|
|
2711
|
-
if (this._getType(e) !==
|
|
2711
|
+
if (this._getType(e) !== W.nan) {
|
|
2712
2712
|
const a = this._getOrReturnCtx(e);
|
|
2713
2713
|
return $(a, {
|
|
2714
2714
|
code: P.invalid_type,
|
|
2715
|
-
expected:
|
|
2715
|
+
expected: W.nan,
|
|
2716
2716
|
received: a.parsedType
|
|
2717
2717
|
}), te;
|
|
2718
2718
|
}
|
|
@@ -2812,7 +2812,7 @@ function nn(r, e = {}, t) {
|
|
|
2812
2812
|
}) : Yt.create();
|
|
2813
2813
|
}
|
|
2814
2814
|
const na = {
|
|
2815
|
-
object:
|
|
2815
|
+
object: je.lazycreate
|
|
2816
2816
|
};
|
|
2817
2817
|
var ne;
|
|
2818
2818
|
(function(r) {
|
|
@@ -2820,16 +2820,16 @@ var ne;
|
|
|
2820
2820
|
})(ne || (ne = {}));
|
|
2821
2821
|
const aa = (r, e = {
|
|
2822
2822
|
message: `Input not instance of ${r.name}`
|
|
2823
|
-
}) => nn((t) => t instanceof r, e),
|
|
2823
|
+
}) => nn((t) => t instanceof r, e), Pe = ft.create, Lt = Pt.create, sa = Sr.create, ia = Nt.create, Tt = rr.create, oa = Ut.create, ca = Er.create, ua = nr.create, la = ar.create, fa = Yt.create, da = jt.create, ha = Et.create, pa = Tr.create, ma = dt.create, At = je.create, ya = je.strictCreate, ga = sr.create, va = Dr.create, wa = ir.create, ba = vt.create, ka = or.create, xa = Ar.create, _a = $t.create, Ea = Ht.create, Ta = cr.create, Aa = ur.create, Lr = Ct.create, Br = lr.create, Sa = Kt.create, Gr = ht.create, Da = yt.create, Oa = Rt.create, Pa = ht.createWithPreprocess, Na = pr.create, Ca = () => Pe().optional(), Ra = () => Lt().optional(), Ma = () => Tt().optional(), Fr = {
|
|
2824
2824
|
string: ((r) => ft.create({ ...r, coerce: !0 })),
|
|
2825
|
-
number: ((r) =>
|
|
2825
|
+
number: ((r) => Pt.create({ ...r, coerce: !0 })),
|
|
2826
2826
|
boolean: ((r) => rr.create({
|
|
2827
2827
|
...r,
|
|
2828
2828
|
coerce: !0
|
|
2829
2829
|
})),
|
|
2830
|
-
bigint: ((r) =>
|
|
2830
|
+
bigint: ((r) => Nt.create({ ...r, coerce: !0 })),
|
|
2831
2831
|
date: ((r) => Ut.create({ ...r, coerce: !0 }))
|
|
2832
|
-
}, Ia = te,
|
|
2832
|
+
}, Ia = te, E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2833
2833
|
__proto__: null,
|
|
2834
2834
|
BRAND: ra,
|
|
2835
2835
|
DIRTY: qt,
|
|
@@ -2841,7 +2841,7 @@ const aa = (r, e = {
|
|
|
2841
2841
|
Schema: le,
|
|
2842
2842
|
ZodAny: Yt,
|
|
2843
2843
|
ZodArray: dt,
|
|
2844
|
-
ZodBigInt:
|
|
2844
|
+
ZodBigInt: Nt,
|
|
2845
2845
|
ZodBoolean: rr,
|
|
2846
2846
|
ZodBranded: $r,
|
|
2847
2847
|
ZodCatch: dr,
|
|
@@ -2849,7 +2849,7 @@ const aa = (r, e = {
|
|
|
2849
2849
|
ZodDefault: fr,
|
|
2850
2850
|
ZodDiscriminatedUnion: Dr,
|
|
2851
2851
|
ZodEffects: ht,
|
|
2852
|
-
ZodEnum:
|
|
2852
|
+
ZodEnum: Ct,
|
|
2853
2853
|
ZodError: at,
|
|
2854
2854
|
get ZodFirstPartyTypeKind() {
|
|
2855
2855
|
return ne;
|
|
@@ -2864,11 +2864,11 @@ const aa = (r, e = {
|
|
|
2864
2864
|
ZodNativeEnum: lr,
|
|
2865
2865
|
ZodNever: Et,
|
|
2866
2866
|
ZodNull: ar,
|
|
2867
|
-
ZodNullable:
|
|
2868
|
-
ZodNumber:
|
|
2869
|
-
ZodObject:
|
|
2867
|
+
ZodNullable: Rt,
|
|
2868
|
+
ZodNumber: Pt,
|
|
2869
|
+
ZodObject: je,
|
|
2870
2870
|
ZodOptional: yt,
|
|
2871
|
-
ZodParsedType:
|
|
2871
|
+
ZodParsedType: W,
|
|
2872
2872
|
ZodPipeline: pr,
|
|
2873
2873
|
ZodPromise: Kt,
|
|
2874
2874
|
ZodReadonly: hr,
|
|
@@ -2917,7 +2917,7 @@ const aa = (r, e = {
|
|
|
2917
2917
|
null: la,
|
|
2918
2918
|
nullable: Oa,
|
|
2919
2919
|
number: Lt,
|
|
2920
|
-
object:
|
|
2920
|
+
object: At,
|
|
2921
2921
|
get objectUtil() {
|
|
2922
2922
|
return Rr;
|
|
2923
2923
|
},
|
|
@@ -2933,7 +2933,7 @@ const aa = (r, e = {
|
|
|
2933
2933
|
set: _a,
|
|
2934
2934
|
setErrorMap: Rn,
|
|
2935
2935
|
strictObject: ya,
|
|
2936
|
-
string:
|
|
2936
|
+
string: Pe,
|
|
2937
2937
|
symbol: ca,
|
|
2938
2938
|
transformer: Gr,
|
|
2939
2939
|
tuple: ba,
|
|
@@ -2944,33 +2944,33 @@ const aa = (r, e = {
|
|
|
2944
2944
|
return we;
|
|
2945
2945
|
},
|
|
2946
2946
|
void: pa
|
|
2947
|
-
}, Symbol.toStringTag, { value: "Module" })), wt =
|
|
2948
|
-
name:
|
|
2949
|
-
selector:
|
|
2947
|
+
}, Symbol.toStringTag, { value: "Module" })), wt = At({
|
|
2948
|
+
name: Pe(),
|
|
2949
|
+
selector: Pe(),
|
|
2950
2950
|
findBy: Lr(["cssSelector", "xpath"]),
|
|
2951
|
-
option:
|
|
2951
|
+
option: At({
|
|
2952
2952
|
waitForSelector: Tt().optional(),
|
|
2953
2953
|
waitSelectorTimeout: Lt().optional(),
|
|
2954
2954
|
multiple: Tt().optional()
|
|
2955
2955
|
})
|
|
2956
|
-
}), ja =
|
|
2957
|
-
type:
|
|
2958
|
-
shape:
|
|
2959
|
-
}), Fa =
|
|
2960
|
-
type:
|
|
2961
|
-
items:
|
|
2962
|
-
}), Ua =
|
|
2956
|
+
}), ja = E.object({
|
|
2957
|
+
type: E.literal("object"),
|
|
2958
|
+
shape: E.record(E.string(), E.any())
|
|
2959
|
+
}), Fa = E.object({
|
|
2960
|
+
type: E.literal("array"),
|
|
2961
|
+
items: E.any()
|
|
2962
|
+
}), Ua = E.discriminatedUnion("type", [
|
|
2963
2963
|
ja,
|
|
2964
2964
|
Fa
|
|
2965
|
-
]), an =
|
|
2966
|
-
name:
|
|
2967
|
-
sourceData:
|
|
2965
|
+
]), an = E.object({
|
|
2966
|
+
name: E.literal("ai-parse-data"),
|
|
2967
|
+
sourceData: E.any().optional(),
|
|
2968
2968
|
schemaDefinition: Ua,
|
|
2969
|
-
prompt:
|
|
2970
|
-
model:
|
|
2971
|
-
apiKey:
|
|
2969
|
+
prompt: E.string().optional(),
|
|
2970
|
+
model: E.string().optional(),
|
|
2971
|
+
apiKey: E.string().min(1, "AI API key is required"),
|
|
2972
2972
|
// 필수
|
|
2973
|
-
provider:
|
|
2973
|
+
provider: E.enum(["openai", "anthropic"])
|
|
2974
2974
|
// 필수
|
|
2975
2975
|
});
|
|
2976
2976
|
function $a(r) {
|
|
@@ -3014,19 +3014,19 @@ async function La(r) {
|
|
|
3014
3014
|
};
|
|
3015
3015
|
}
|
|
3016
3016
|
}
|
|
3017
|
-
function
|
|
3017
|
+
function ti(r) {
|
|
3018
3018
|
return {
|
|
3019
3019
|
type: "object",
|
|
3020
3020
|
shape: r
|
|
3021
3021
|
};
|
|
3022
3022
|
}
|
|
3023
|
-
function
|
|
3023
|
+
function ri(r) {
|
|
3024
3024
|
return {
|
|
3025
3025
|
type: "array",
|
|
3026
3026
|
items: r
|
|
3027
3027
|
};
|
|
3028
3028
|
}
|
|
3029
|
-
const
|
|
3029
|
+
const ni = {
|
|
3030
3030
|
string: (r) => ({
|
|
3031
3031
|
type: "string",
|
|
3032
3032
|
...r
|
|
@@ -3130,7 +3130,7 @@ class Za extends Or {
|
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
3132
3132
|
}
|
|
3133
|
-
class
|
|
3133
|
+
class Wa extends Or {
|
|
3134
3134
|
async find(e, t = document) {
|
|
3135
3135
|
const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
|
|
3136
3136
|
if (!a || a.trim() === "")
|
|
@@ -3159,7 +3159,7 @@ class za extends Or {
|
|
|
3159
3159
|
return null;
|
|
3160
3160
|
}
|
|
3161
3161
|
}
|
|
3162
|
-
class
|
|
3162
|
+
class za extends Or {
|
|
3163
3163
|
async find(e, t = document) {
|
|
3164
3164
|
const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
|
|
3165
3165
|
try {
|
|
@@ -3253,20 +3253,20 @@ async function pt(r, e = document) {
|
|
|
3253
3253
|
return i ? f.waitForElement(r, e, c) : f.find(r, e);
|
|
3254
3254
|
}
|
|
3255
3255
|
function qa(r, e) {
|
|
3256
|
-
return e === "xpath" ? new
|
|
3256
|
+
return e === "xpath" ? new za() : r.includes(">>") ? new Wa() : r.includes("|>") ? new Za() : new Ba();
|
|
3257
3257
|
}
|
|
3258
3258
|
const sn = wt.extend({
|
|
3259
|
-
name:
|
|
3260
|
-
includeTags:
|
|
3261
|
-
useTextContent:
|
|
3262
|
-
regex:
|
|
3263
|
-
prefixText:
|
|
3264
|
-
suffixText:
|
|
3265
|
-
filterEmpty:
|
|
3266
|
-
scrollToCollect:
|
|
3267
|
-
scrollDistance:
|
|
3268
|
-
scrollWaitMs:
|
|
3269
|
-
maxScrollAttempts:
|
|
3259
|
+
name: E.literal("get-text"),
|
|
3260
|
+
includeTags: E.boolean().optional(),
|
|
3261
|
+
useTextContent: E.boolean().optional(),
|
|
3262
|
+
regex: E.string().optional(),
|
|
3263
|
+
prefixText: E.string().optional(),
|
|
3264
|
+
suffixText: E.string().optional(),
|
|
3265
|
+
filterEmpty: E.boolean().optional(),
|
|
3266
|
+
scrollToCollect: E.boolean().optional(),
|
|
3267
|
+
scrollDistance: E.number().optional(),
|
|
3268
|
+
scrollWaitMs: E.number().optional(),
|
|
3269
|
+
maxScrollAttempts: E.number().optional()
|
|
3270
3270
|
});
|
|
3271
3271
|
function Ha(r) {
|
|
3272
3272
|
return sn.parse(r);
|
|
@@ -3350,8 +3350,8 @@ async function Ya(r) {
|
|
|
3350
3350
|
if (H && Array.isArray(H)) {
|
|
3351
3351
|
const B = I.size;
|
|
3352
3352
|
if (H.forEach((L) => {
|
|
3353
|
-
const
|
|
3354
|
-
(!k ||
|
|
3353
|
+
const z = S(L);
|
|
3354
|
+
(!k || z.trim() !== "") && I.add(z);
|
|
3355
3355
|
}), I.size === B) {
|
|
3356
3356
|
if (Q++, Q >= pe)
|
|
3357
3357
|
break;
|
|
@@ -3376,8 +3376,8 @@ function on(r, e, t, a = "", s = "") {
|
|
|
3376
3376
|
};
|
|
3377
3377
|
}
|
|
3378
3378
|
const cn = wt.extend({
|
|
3379
|
-
name:
|
|
3380
|
-
attributeName:
|
|
3379
|
+
name: E.literal("attribute-value"),
|
|
3380
|
+
attributeName: E.string()
|
|
3381
3381
|
});
|
|
3382
3382
|
function Ka(r) {
|
|
3383
3383
|
return cn.parse(r);
|
|
@@ -3400,8 +3400,8 @@ async function Ja(r) {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
3402
|
const un = wt.extend({
|
|
3403
|
-
name:
|
|
3404
|
-
type:
|
|
3403
|
+
name: E.literal("get-value-form"),
|
|
3404
|
+
type: E.enum(["text-field", "select", "checkbox"]).optional()
|
|
3405
3405
|
});
|
|
3406
3406
|
function Xa(r) {
|
|
3407
3407
|
return un.parse(r);
|
|
@@ -3443,9 +3443,9 @@ function es(r, e) {
|
|
|
3443
3443
|
throw new Error(`Invalid element type for ${e}`);
|
|
3444
3444
|
}
|
|
3445
3445
|
const ln = wt.extend({
|
|
3446
|
-
name:
|
|
3447
|
-
setValue:
|
|
3448
|
-
type:
|
|
3446
|
+
name: E.literal("set-value-form"),
|
|
3447
|
+
setValue: E.string(),
|
|
3448
|
+
type: E.enum(["text-field", "select", "checkbox"]).optional()
|
|
3449
3449
|
});
|
|
3450
3450
|
function ts(r) {
|
|
3451
3451
|
return ln.parse(r);
|
|
@@ -3483,8 +3483,8 @@ function ns(r, e, t) {
|
|
|
3483
3483
|
}
|
|
3484
3484
|
}
|
|
3485
3485
|
const fn = wt.extend({
|
|
3486
|
-
name:
|
|
3487
|
-
type:
|
|
3486
|
+
name: E.literal("clear-value-form"),
|
|
3487
|
+
type: E.enum(["text-field", "select", "checkbox"]).optional()
|
|
3488
3488
|
});
|
|
3489
3489
|
function as(r) {
|
|
3490
3490
|
return fn.parse(r);
|
|
@@ -3522,7 +3522,7 @@ function is(r, e) {
|
|
|
3522
3522
|
}
|
|
3523
3523
|
}
|
|
3524
3524
|
const dn = wt.extend({
|
|
3525
|
-
name:
|
|
3525
|
+
name: E.literal("element-exists")
|
|
3526
3526
|
});
|
|
3527
3527
|
function os(r) {
|
|
3528
3528
|
return dn.parse(r);
|
|
@@ -3542,10 +3542,10 @@ async function cs(r) {
|
|
|
3542
3542
|
}
|
|
3543
3543
|
}
|
|
3544
3544
|
const hn = wt.extend({
|
|
3545
|
-
name:
|
|
3546
|
-
textFilter:
|
|
3547
|
-
text:
|
|
3548
|
-
mode:
|
|
3545
|
+
name: E.literal("event-click"),
|
|
3546
|
+
textFilter: E.object({
|
|
3547
|
+
text: E.union([E.string(), E.array(E.string())]),
|
|
3548
|
+
mode: E.enum(["exact", "contains", "startsWith", "endsWith", "regex"])
|
|
3549
3549
|
}).optional()
|
|
3550
3550
|
});
|
|
3551
3551
|
function us(r) {
|
|
@@ -3654,12 +3654,12 @@ async function hs(r) {
|
|
|
3654
3654
|
}
|
|
3655
3655
|
await new Promise((s) => setTimeout(s, 50));
|
|
3656
3656
|
}
|
|
3657
|
-
const pn =
|
|
3658
|
-
name:
|
|
3659
|
-
key:
|
|
3660
|
-
code:
|
|
3661
|
-
keyCode:
|
|
3662
|
-
modifiers:
|
|
3657
|
+
const pn = E.object({
|
|
3658
|
+
name: E.literal("keypress"),
|
|
3659
|
+
key: E.string(),
|
|
3660
|
+
code: E.string().optional(),
|
|
3661
|
+
keyCode: E.number().optional(),
|
|
3662
|
+
modifiers: E.array(E.enum(["Alt", "Control", "Meta", "Shift"])).optional()
|
|
3663
3663
|
});
|
|
3664
3664
|
function ps(r) {
|
|
3665
3665
|
return pn.parse(r);
|
|
@@ -3735,9 +3735,9 @@ function Yr(r) {
|
|
|
3735
3735
|
shiftKey: r.includes("Shift")
|
|
3736
3736
|
};
|
|
3737
3737
|
}
|
|
3738
|
-
const mn =
|
|
3739
|
-
name:
|
|
3740
|
-
duration:
|
|
3738
|
+
const mn = E.object({
|
|
3739
|
+
name: E.literal("wait"),
|
|
3740
|
+
duration: E.number().min(0)
|
|
3741
3741
|
});
|
|
3742
3742
|
function gs(r) {
|
|
3743
3743
|
return mn.parse(r);
|
|
@@ -3754,32 +3754,32 @@ async function vs(r) {
|
|
|
3754
3754
|
};
|
|
3755
3755
|
}
|
|
3756
3756
|
}
|
|
3757
|
-
const yn =
|
|
3758
|
-
name:
|
|
3759
|
-
conditions:
|
|
3760
|
-
urlPattern:
|
|
3761
|
-
elementExists:
|
|
3762
|
-
selector:
|
|
3763
|
-
findBy:
|
|
3757
|
+
const yn = E.object({
|
|
3758
|
+
name: E.literal("wait-for-condition"),
|
|
3759
|
+
conditions: E.object({
|
|
3760
|
+
urlPattern: E.string().optional(),
|
|
3761
|
+
elementExists: E.object({
|
|
3762
|
+
selector: E.string(),
|
|
3763
|
+
findBy: E.enum(["cssSelector", "xpath"])
|
|
3764
3764
|
}).optional(),
|
|
3765
|
-
cookieExists:
|
|
3766
|
-
storageKey:
|
|
3767
|
-
type:
|
|
3768
|
-
key:
|
|
3765
|
+
cookieExists: E.string().optional(),
|
|
3766
|
+
storageKey: E.object({
|
|
3767
|
+
type: E.enum(["localStorage", "sessionStorage"]),
|
|
3768
|
+
key: E.string()
|
|
3769
3769
|
}).optional(),
|
|
3770
|
-
userConfirmation:
|
|
3771
|
-
message:
|
|
3772
|
-
buttonText:
|
|
3770
|
+
userConfirmation: E.boolean().optional(),
|
|
3771
|
+
message: E.string().optional(),
|
|
3772
|
+
buttonText: E.string().optional()
|
|
3773
3773
|
}).refine(
|
|
3774
3774
|
(r) => r.urlPattern !== void 0 || r.elementExists !== void 0 || r.cookieExists !== void 0 || r.storageKey !== void 0 || r.userConfirmation === !0,
|
|
3775
3775
|
{
|
|
3776
3776
|
message: "At least one condition must be specified"
|
|
3777
3777
|
}
|
|
3778
3778
|
),
|
|
3779
|
-
mode:
|
|
3780
|
-
pollingIntervalMs:
|
|
3781
|
-
timeoutMs:
|
|
3782
|
-
position:
|
|
3779
|
+
mode: E.enum(["auto", "manual", "auto-or-manual"]).optional(),
|
|
3780
|
+
pollingIntervalMs: E.number().min(100).optional(),
|
|
3781
|
+
timeoutMs: E.number().min(1e3).optional(),
|
|
3782
|
+
position: E.enum(["top-left", "top-right", "bottom-left", "bottom-right"]).optional()
|
|
3783
3783
|
});
|
|
3784
3784
|
function ws(r) {
|
|
3785
3785
|
return yn.parse(r);
|
|
@@ -3891,11 +3891,11 @@ async function bs(r) {
|
|
|
3891
3891
|
};
|
|
3892
3892
|
}
|
|
3893
3893
|
}
|
|
3894
|
-
const gn =
|
|
3895
|
-
name:
|
|
3896
|
-
url:
|
|
3897
|
-
waitForLoad:
|
|
3898
|
-
timeout:
|
|
3894
|
+
const gn = E.object({
|
|
3895
|
+
name: E.literal("navigate"),
|
|
3896
|
+
url: E.string().url("Valid URL is required"),
|
|
3897
|
+
waitForLoad: E.boolean().optional(),
|
|
3898
|
+
timeout: E.number().min(0).optional()
|
|
3899
3899
|
});
|
|
3900
3900
|
function ks(r) {
|
|
3901
3901
|
return gn.parse(r);
|
|
@@ -3920,7 +3920,7 @@ async function xs(r) {
|
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
3922
|
const vn = wt.extend({
|
|
3923
|
-
name:
|
|
3923
|
+
name: E.literal("save-assets")
|
|
3924
3924
|
});
|
|
3925
3925
|
function _s(r) {
|
|
3926
3926
|
return vn.parse(r);
|
|
@@ -3999,16 +3999,16 @@ class Ts {
|
|
|
3999
3999
|
}
|
|
4000
4000
|
}
|
|
4001
4001
|
const wn = wt.extend({
|
|
4002
|
-
name:
|
|
4003
|
-
includeText:
|
|
4004
|
-
includeTags:
|
|
4005
|
-
useTextContent:
|
|
4006
|
-
regex:
|
|
4007
|
-
prefixText:
|
|
4008
|
-
suffixText:
|
|
4009
|
-
attributes:
|
|
4010
|
-
includeSelector:
|
|
4011
|
-
includeXPath:
|
|
4002
|
+
name: E.literal("get-element-data"),
|
|
4003
|
+
includeText: E.boolean().optional(),
|
|
4004
|
+
includeTags: E.boolean().optional(),
|
|
4005
|
+
useTextContent: E.boolean().optional(),
|
|
4006
|
+
regex: E.string().optional(),
|
|
4007
|
+
prefixText: E.string().optional(),
|
|
4008
|
+
suffixText: E.string().optional(),
|
|
4009
|
+
attributes: E.array(E.string()).optional(),
|
|
4010
|
+
includeSelector: E.boolean().optional(),
|
|
4011
|
+
includeXPath: E.boolean().optional()
|
|
4012
4012
|
});
|
|
4013
4013
|
function As(r) {
|
|
4014
4014
|
return wn.parse(r);
|
|
@@ -4078,12 +4078,12 @@ function Ds(r, e, t, a, s = "", i = "", c = [], f = !1, w = !1) {
|
|
|
4078
4078
|
};
|
|
4079
4079
|
}
|
|
4080
4080
|
const bn = wt.extend({
|
|
4081
|
-
name:
|
|
4082
|
-
scrollType:
|
|
4083
|
-
distance:
|
|
4084
|
-
behavior:
|
|
4085
|
-
maxScrolls:
|
|
4086
|
-
waitAfterScroll:
|
|
4081
|
+
name: E.literal("scroll"),
|
|
4082
|
+
scrollType: E.enum(["toElement", "toBottom", "byDistance", "untilLoaded"]).optional(),
|
|
4083
|
+
distance: E.number().optional(),
|
|
4084
|
+
behavior: E.enum(["auto", "smooth"]).optional(),
|
|
4085
|
+
maxScrolls: E.number().optional(),
|
|
4086
|
+
waitAfterScroll: E.number().optional()
|
|
4087
4087
|
});
|
|
4088
4088
|
function Os(r) {
|
|
4089
4089
|
return bn.parse(r);
|
|
@@ -4166,15 +4166,15 @@ async function Ms(r, e, t, a) {
|
|
|
4166
4166
|
}
|
|
4167
4167
|
return { data: !0 };
|
|
4168
4168
|
}
|
|
4169
|
-
const kn =
|
|
4170
|
-
name:
|
|
4171
|
-
url:
|
|
4172
|
-
method:
|
|
4173
|
-
headers:
|
|
4174
|
-
body:
|
|
4175
|
-
timeout:
|
|
4176
|
-
parseJson:
|
|
4177
|
-
returnHeaders:
|
|
4169
|
+
const kn = E.object({
|
|
4170
|
+
name: E.literal("fetch-api"),
|
|
4171
|
+
url: E.string(),
|
|
4172
|
+
method: E.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).optional(),
|
|
4173
|
+
headers: E.record(E.string(), E.string()).optional(),
|
|
4174
|
+
body: E.record(E.string(), E.any()).optional(),
|
|
4175
|
+
timeout: E.number().min(0).optional(),
|
|
4176
|
+
parseJson: E.boolean().optional(),
|
|
4177
|
+
returnHeaders: E.boolean().optional()
|
|
4178
4178
|
});
|
|
4179
4179
|
function Is(r) {
|
|
4180
4180
|
return kn.parse(r);
|
|
@@ -4380,9 +4380,9 @@ function Us() {
|
|
|
4380
4380
|
return;
|
|
4381
4381
|
v = Math.floor(v);
|
|
4382
4382
|
const b = xe(A);
|
|
4383
|
-
return
|
|
4383
|
+
return z(v, b);
|
|
4384
4384
|
}
|
|
4385
|
-
const
|
|
4385
|
+
const T = {
|
|
4386
4386
|
DECIMAL: "decimal",
|
|
4387
4387
|
LETTERS: "letters",
|
|
4388
4388
|
ROMAN: "roman",
|
|
@@ -4393,20 +4393,20 @@ function Us() {
|
|
|
4393
4393
|
LOWER: "lower",
|
|
4394
4394
|
TITLE: "title"
|
|
4395
4395
|
};
|
|
4396
|
-
function
|
|
4396
|
+
function z(v, A) {
|
|
4397
4397
|
let b;
|
|
4398
4398
|
const N = v < 0;
|
|
4399
4399
|
switch (v = Math.abs(v), A.primary) {
|
|
4400
|
-
case
|
|
4400
|
+
case T.LETTERS:
|
|
4401
4401
|
b = C(v, A.case === L.UPPER ? "A" : "a");
|
|
4402
4402
|
break;
|
|
4403
|
-
case
|
|
4403
|
+
case T.ROMAN:
|
|
4404
4404
|
b = pe(v), A.case === L.UPPER && (b = b.toUpperCase());
|
|
4405
4405
|
break;
|
|
4406
|
-
case
|
|
4406
|
+
case T.WORDS:
|
|
4407
4407
|
b = x(v, A.ordinal), A.case === L.UPPER ? b = b.toUpperCase() : A.case === L.LOWER && (b = b.toLowerCase());
|
|
4408
4408
|
break;
|
|
4409
|
-
case
|
|
4409
|
+
case T.DECIMAL:
|
|
4410
4410
|
b = "" + v;
|
|
4411
4411
|
var U = A.mandatoryDigits - b.length;
|
|
4412
4412
|
if (U > 0) {
|
|
@@ -4429,7 +4429,7 @@ function Us() {
|
|
|
4429
4429
|
(!J || b.length > 1 && b[b.length - 2] === "1") && (J = "th"), b = b + J;
|
|
4430
4430
|
}
|
|
4431
4431
|
break;
|
|
4432
|
-
case
|
|
4432
|
+
case T.SEQUENCE:
|
|
4433
4433
|
throw {
|
|
4434
4434
|
code: "D3130",
|
|
4435
4435
|
value: A.token
|
|
@@ -4441,7 +4441,7 @@ function Us() {
|
|
|
4441
4441
|
function xe(v) {
|
|
4442
4442
|
const A = {
|
|
4443
4443
|
type: "integer",
|
|
4444
|
-
primary:
|
|
4444
|
+
primary: T.DECIMAL,
|
|
4445
4445
|
case: L.LOWER,
|
|
4446
4446
|
ordinal: !1
|
|
4447
4447
|
};
|
|
@@ -4452,22 +4452,22 @@ function Us() {
|
|
|
4452
4452
|
A.case = L.UPPER;
|
|
4453
4453
|
/* eslnt-disable-next-line no-fallthrough */
|
|
4454
4454
|
case "a":
|
|
4455
|
-
A.primary =
|
|
4455
|
+
A.primary = T.LETTERS;
|
|
4456
4456
|
break;
|
|
4457
4457
|
case "I":
|
|
4458
4458
|
A.case = L.UPPER;
|
|
4459
4459
|
/* eslnt-disable-next-line no-fallthrough */
|
|
4460
4460
|
case "i":
|
|
4461
|
-
A.primary =
|
|
4461
|
+
A.primary = T.ROMAN;
|
|
4462
4462
|
break;
|
|
4463
4463
|
case "W":
|
|
4464
|
-
A.case = L.UPPER, A.primary =
|
|
4464
|
+
A.case = L.UPPER, A.primary = T.WORDS;
|
|
4465
4465
|
break;
|
|
4466
4466
|
case "Ww":
|
|
4467
|
-
A.case = L.TITLE, A.primary =
|
|
4467
|
+
A.case = L.TITLE, A.primary = T.WORDS;
|
|
4468
4468
|
break;
|
|
4469
4469
|
case "w":
|
|
4470
|
-
A.primary =
|
|
4470
|
+
A.primary = T.WORDS;
|
|
4471
4471
|
break;
|
|
4472
4472
|
default: {
|
|
4473
4473
|
let j = null, O = 0, F = 0, J = [], ge = 0;
|
|
@@ -4490,7 +4490,7 @@ function Us() {
|
|
|
4490
4490
|
character: String.fromCodePoint(K)
|
|
4491
4491
|
}));
|
|
4492
4492
|
}), O > 0) {
|
|
4493
|
-
A.primary =
|
|
4493
|
+
A.primary = T.DECIMAL, A.zeroCode = j, A.mandatoryDigits = O, A.optionalDigits = F;
|
|
4494
4494
|
const ee = function(me) {
|
|
4495
4495
|
if (me.length === 0)
|
|
4496
4496
|
return 0;
|
|
@@ -4511,7 +4511,7 @@ function Us() {
|
|
|
4511
4511
|
character: J[0].character
|
|
4512
4512
|
}) : (A.regular = !1, A.groupingSeparators = J);
|
|
4513
4513
|
} else
|
|
4514
|
-
A.primary =
|
|
4514
|
+
A.primary = T.SEQUENCE, A.token = b;
|
|
4515
4515
|
}
|
|
4516
4516
|
}
|
|
4517
4517
|
return A;
|
|
@@ -4614,7 +4614,7 @@ function Us() {
|
|
|
4614
4614
|
}
|
|
4615
4615
|
return N(U, j), b;
|
|
4616
4616
|
}
|
|
4617
|
-
const ve = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
|
|
4617
|
+
const ve = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], Me = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], et = 1e3 * 60 * 60 * 24, _e = function(v) {
|
|
4618
4618
|
const A = Date.UTC(v.year, v.month);
|
|
4619
4619
|
var b = new Date(A).getUTCDay();
|
|
4620
4620
|
return b === 0 && (b = 7), b > 4 ? A + (8 - b) * et : A - (b - 1) * et;
|
|
@@ -4724,7 +4724,7 @@ function Us() {
|
|
|
4724
4724
|
}
|
|
4725
4725
|
return b;
|
|
4726
4726
|
};
|
|
4727
|
-
let
|
|
4727
|
+
let Ue = null;
|
|
4728
4728
|
function st(v, A, b) {
|
|
4729
4729
|
var N = 0, U = 0;
|
|
4730
4730
|
if (typeof b < "u") {
|
|
@@ -4736,7 +4736,7 @@ function Us() {
|
|
|
4736
4736
|
if ("YMDdFWwXxHhms".indexOf(K.component) !== -1)
|
|
4737
4737
|
if (K.component === "Y" && K.n !== -1 && (ee = ee % Math.pow(10, K.n)), K.names) {
|
|
4738
4738
|
if (K.component === "M" || K.component === "x")
|
|
4739
|
-
ee =
|
|
4739
|
+
ee = Me[ee - 1];
|
|
4740
4740
|
else if (K.component === "F")
|
|
4741
4741
|
ee = ve[ee];
|
|
4742
4742
|
else
|
|
@@ -4746,19 +4746,19 @@ function Us() {
|
|
|
4746
4746
|
};
|
|
4747
4747
|
K.names === L.UPPER ? ee = ee.toUpperCase() : K.names === L.LOWER && (ee = ee.toLowerCase()), K.width && ee.length > K.width.max && (ee = ee.substring(0, K.width.max));
|
|
4748
4748
|
} else
|
|
4749
|
-
ee =
|
|
4749
|
+
ee = z(ee, K.integerFormat);
|
|
4750
4750
|
else if (K.component === "f")
|
|
4751
|
-
ee =
|
|
4751
|
+
ee = z(ee, K.integerFormat);
|
|
4752
4752
|
else if (K.component === "Z" || K.component === "z") {
|
|
4753
4753
|
const me = N * 100 + U;
|
|
4754
4754
|
if (K.integerFormat.regular)
|
|
4755
|
-
ee =
|
|
4755
|
+
ee = z(me, K.integerFormat);
|
|
4756
4756
|
else {
|
|
4757
4757
|
const G = K.integerFormat.mandatoryDigits;
|
|
4758
4758
|
if (G === 1 || G === 2)
|
|
4759
|
-
ee =
|
|
4759
|
+
ee = z(N, K.integerFormat), U !== 0 && (ee += ":" + B(U, "00"));
|
|
4760
4760
|
else if (G === 3 || G === 4)
|
|
4761
|
-
ee =
|
|
4761
|
+
ee = z(me, K.integerFormat);
|
|
4762
4762
|
else
|
|
4763
4763
|
throw {
|
|
4764
4764
|
code: "D3134",
|
|
@@ -4770,7 +4770,7 @@ function Us() {
|
|
|
4770
4770
|
return ee;
|
|
4771
4771
|
};
|
|
4772
4772
|
let O;
|
|
4773
|
-
typeof A > "u" ? (
|
|
4773
|
+
typeof A > "u" ? (Ue === null && (Ue = Ae("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")), O = Ue) : O = Ae(A);
|
|
4774
4774
|
const F = (60 * N + U) * 60 * 1e3, J = new Date(v + F);
|
|
4775
4775
|
let ge = "";
|
|
4776
4776
|
return O.parts.forEach(function(be) {
|
|
@@ -4797,7 +4797,7 @@ function Us() {
|
|
|
4797
4797
|
N.regex = "[a-zA-Z]+";
|
|
4798
4798
|
var U = {};
|
|
4799
4799
|
if (b.component === "M" || b.component === "x")
|
|
4800
|
-
|
|
4800
|
+
Me.forEach(function(j, O) {
|
|
4801
4801
|
b.width && b.width.max ? U[j.substring(0, b.width.max)] = O + 1 : U[j] = O + 1;
|
|
4802
4802
|
});
|
|
4803
4803
|
else if (b.component === "F")
|
|
@@ -4821,22 +4821,22 @@ function Us() {
|
|
|
4821
4821
|
A.type = "integer";
|
|
4822
4822
|
const b = v.case === L.UPPER;
|
|
4823
4823
|
switch (v.primary) {
|
|
4824
|
-
case
|
|
4824
|
+
case T.LETTERS:
|
|
4825
4825
|
A.regex = b ? "[A-Z]+" : "[a-z]+", A.parse = function(N) {
|
|
4826
4826
|
return se(N, b ? "A" : "a");
|
|
4827
4827
|
};
|
|
4828
4828
|
break;
|
|
4829
|
-
case
|
|
4829
|
+
case T.ROMAN:
|
|
4830
4830
|
A.regex = b ? "[MDCLXVI]+" : "[mdclxvi]+", A.parse = function(N) {
|
|
4831
4831
|
return H(b ? N : N.toUpperCase());
|
|
4832
4832
|
};
|
|
4833
4833
|
break;
|
|
4834
|
-
case
|
|
4834
|
+
case T.WORDS:
|
|
4835
4835
|
A.regex = "(?:" + Object.keys(S).concat("and", "[\\-, ]").join("|") + ")+", A.parse = function(N) {
|
|
4836
4836
|
return I(N.toLowerCase());
|
|
4837
4837
|
};
|
|
4838
4838
|
break;
|
|
4839
|
-
case
|
|
4839
|
+
case T.DECIMAL:
|
|
4840
4840
|
A.regex = "[0-9]", v.parseWidth ? A.regex += `{${v.parseWidth}}` : A.regex += "+", v.ordinal && (A.regex += "(?:th|st|nd|rd)"), A.parse = function(N) {
|
|
4841
4841
|
let U = N;
|
|
4842
4842
|
return v.ordinal && (U = N.substring(0, N.length - 2)), v.regular ? U = U.split(",").join("") : v.groupingSeparators.forEach((j) => {
|
|
@@ -4844,7 +4844,7 @@ function Us() {
|
|
|
4844
4844
|
}), v.zeroCode !== 48 && (U = U.split("").map((j) => String.fromCodePoint(j.codePointAt(0) - v.zeroCode + 48)).join("")), parseInt(U);
|
|
4845
4845
|
};
|
|
4846
4846
|
break;
|
|
4847
|
-
case
|
|
4847
|
+
case T.SEQUENCE:
|
|
4848
4848
|
throw {
|
|
4849
4849
|
code: "D3130",
|
|
4850
4850
|
value: v.token
|
|
@@ -4875,13 +4875,13 @@ function Us() {
|
|
|
4875
4875
|
Ze <<= 1, Ze += De ? 1 : 0;
|
|
4876
4876
|
}, qe = (De) => !(~De & Ze) && !!(De & Ze);
|
|
4877
4877
|
"YXMxWwdD".split("").forEach((De) => it(G[De]));
|
|
4878
|
-
const He = !qe(161) && qe(130), bt = qe(84),
|
|
4878
|
+
const He = !qe(161) && qe(130), bt = qe(84), St = !bt && qe(72);
|
|
4879
4879
|
Ze = 0, "PHhmsf".split("").forEach((De) => it(G[De]));
|
|
4880
|
-
const
|
|
4880
|
+
const Dt = !qe(23) && qe(47), Jt = (He ? "YD" : bt ? "XxwF" : St ? "XWF" : "YMD") + (Dt ? "Phmsf" : "Hmsf"), ut = this.environment.timestamp;
|
|
4881
4881
|
let Bt = !1, mt = !1;
|
|
4882
4882
|
if (Jt.split("").forEach((De) => {
|
|
4883
4883
|
if (typeof G[De] > "u")
|
|
4884
|
-
Bt ? (G[De] = "MDd".indexOf(De) !== -1 ? 1 : 0, mt = !0) : G[De] = ie(
|
|
4884
|
+
Bt ? (G[De] = "MDd".indexOf(De) !== -1 ? 1 : 0, mt = !0) : G[De] = ie(ut, De);
|
|
4885
4885
|
else if (Bt = !0, mt)
|
|
4886
4886
|
throw {
|
|
4887
4887
|
code: "D3136"
|
|
@@ -4894,17 +4894,17 @@ function Us() {
|
|
|
4894
4894
|
throw {
|
|
4895
4895
|
code: "D3136"
|
|
4896
4896
|
};
|
|
4897
|
-
if (
|
|
4897
|
+
if (St)
|
|
4898
4898
|
throw {
|
|
4899
4899
|
code: "D3136"
|
|
4900
4900
|
};
|
|
4901
|
-
|
|
4901
|
+
Dt && (G.H = G.h === 12 ? 0 : G.h, G.P === 1 && (G.H += 12));
|
|
4902
4902
|
var F = Date.UTC(G.Y, G.M, G.D, G.H, G.m, G.s, G.f);
|
|
4903
4903
|
return (G.Z || G.z) && (F -= (G.Z || G.z) * 60 * 1e3), F;
|
|
4904
4904
|
}
|
|
4905
4905
|
}
|
|
4906
4906
|
var de = new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");
|
|
4907
|
-
function
|
|
4907
|
+
function Ne(v, A) {
|
|
4908
4908
|
if (!(typeof v > "u"))
|
|
4909
4909
|
if (typeof A > "u") {
|
|
4910
4910
|
if (!de.test(v))
|
|
@@ -4925,7 +4925,7 @@ function Us() {
|
|
|
4925
4925
|
formatInteger: B,
|
|
4926
4926
|
parseInteger: m,
|
|
4927
4927
|
fromMillis: Ee,
|
|
4928
|
-
toMillis:
|
|
4928
|
+
toMillis: Ne
|
|
4929
4929
|
};
|
|
4930
4930
|
})();
|
|
4931
4931
|
a.exports = c;
|
|
@@ -4950,7 +4950,7 @@ function Us() {
|
|
|
4950
4950
|
if (!(typeof n > "u" || n.length === 0))
|
|
4951
4951
|
return Math.max.apply(Math, n);
|
|
4952
4952
|
}
|
|
4953
|
-
function
|
|
4953
|
+
function T(n) {
|
|
4954
4954
|
if (!(typeof n > "u" || n.length === 0))
|
|
4955
4955
|
return Math.min.apply(Math, n);
|
|
4956
4956
|
}
|
|
@@ -4962,7 +4962,7 @@ function Us() {
|
|
|
4962
4962
|
}), o / n.length;
|
|
4963
4963
|
}
|
|
4964
4964
|
}
|
|
4965
|
-
function
|
|
4965
|
+
function z(n, o = !1) {
|
|
4966
4966
|
if (!(typeof n > "u")) {
|
|
4967
4967
|
var l;
|
|
4968
4968
|
if (typeof n == "string")
|
|
@@ -5016,7 +5016,7 @@ function Us() {
|
|
|
5016
5016
|
if (!(typeof n > "u"))
|
|
5017
5017
|
return n.toUpperCase();
|
|
5018
5018
|
}
|
|
5019
|
-
function
|
|
5019
|
+
function Me(n) {
|
|
5020
5020
|
if (!(typeof n > "u"))
|
|
5021
5021
|
return H(n).length;
|
|
5022
5022
|
}
|
|
@@ -5031,7 +5031,7 @@ function Us() {
|
|
|
5031
5031
|
(typeof l > "u" || l.length === 0) && (l = " ");
|
|
5032
5032
|
var g;
|
|
5033
5033
|
o = Math.trunc(o);
|
|
5034
|
-
var p = Math.abs(o) -
|
|
5034
|
+
var p = Math.abs(o) - Me(n);
|
|
5035
5035
|
if (p > 0) {
|
|
5036
5036
|
var _ = new Array(p + 1).join(l);
|
|
5037
5037
|
l.length > 1 && (_ = he(_, 0, p)), o > 0 ? g = n + _ : g = _ + n;
|
|
@@ -5084,7 +5084,7 @@ function Us() {
|
|
|
5084
5084
|
return g;
|
|
5085
5085
|
}
|
|
5086
5086
|
}
|
|
5087
|
-
async function
|
|
5087
|
+
async function Ue(n, o, l, g) {
|
|
5088
5088
|
if (!(typeof n > "u")) {
|
|
5089
5089
|
var p = this;
|
|
5090
5090
|
if (o === "")
|
|
@@ -5103,28 +5103,28 @@ function Us() {
|
|
|
5103
5103
|
};
|
|
5104
5104
|
var _;
|
|
5105
5105
|
typeof l == "string" ? _ = function(Se) {
|
|
5106
|
-
for (var
|
|
5107
|
-
|
|
5106
|
+
for (var We = "", ke = 0, Fe = l.indexOf("$", ke); Fe !== -1 && ke < l.length; ) {
|
|
5107
|
+
We += l.substring(ke, Fe), ke = Fe + 1;
|
|
5108
5108
|
var ot = l.charAt(ke);
|
|
5109
5109
|
if (ot === "$")
|
|
5110
|
-
|
|
5110
|
+
We += "$", ke++;
|
|
5111
5111
|
else if (ot === "0")
|
|
5112
|
-
|
|
5112
|
+
We += Se.match, ke++;
|
|
5113
5113
|
else {
|
|
5114
|
-
var
|
|
5115
|
-
if (Se.groups.length === 0 ?
|
|
5116
|
-
|
|
5114
|
+
var ze;
|
|
5115
|
+
if (Se.groups.length === 0 ? ze = 1 : ze = Math.floor(Math.log(Se.groups.length) * Math.LOG10E) + 1, Fe = parseInt(l.substring(ke, ke + ze), 10), ze > 1 && Fe > Se.groups.length && (Fe = parseInt(l.substring(ke, ke + ze - 1), 10)), isNaN(Fe))
|
|
5116
|
+
We += "$";
|
|
5117
5117
|
else {
|
|
5118
5118
|
if (Se.groups.length > 0) {
|
|
5119
|
-
var Zt = Se.groups[
|
|
5120
|
-
typeof Zt < "u" && (
|
|
5119
|
+
var Zt = Se.groups[Fe - 1];
|
|
5120
|
+
typeof Zt < "u" && (We += Zt);
|
|
5121
5121
|
}
|
|
5122
|
-
ke +=
|
|
5122
|
+
ke += Fe.toString().length;
|
|
5123
5123
|
}
|
|
5124
5124
|
}
|
|
5125
|
-
|
|
5125
|
+
Fe = l.indexOf("$", ke);
|
|
5126
5126
|
}
|
|
5127
|
-
return
|
|
5127
|
+
return We += l.substring(ke), We;
|
|
5128
5128
|
} : _ = l;
|
|
5129
5129
|
var R = "", q = 0;
|
|
5130
5130
|
if (typeof g > "u" || g > 0) {
|
|
@@ -5138,14 +5138,14 @@ function Us() {
|
|
|
5138
5138
|
if (typeof ye < "u") {
|
|
5139
5139
|
for (; typeof ye < "u" && (typeof g > "u" || X < g); ) {
|
|
5140
5140
|
R += n.substring(q, ye.start);
|
|
5141
|
-
var
|
|
5142
|
-
if (ae(
|
|
5143
|
-
R +=
|
|
5141
|
+
var Ce = _.apply(p, [ye]);
|
|
5142
|
+
if (ae(Ce) && (Ce = await Ce), typeof Ce == "string")
|
|
5143
|
+
R += Ce;
|
|
5144
5144
|
else
|
|
5145
5145
|
throw {
|
|
5146
5146
|
code: "D3012",
|
|
5147
5147
|
stack: new Error().stack,
|
|
5148
|
-
value:
|
|
5148
|
+
value: Ce
|
|
5149
5149
|
};
|
|
5150
5150
|
q = ye.start + ye.match.length, X++, ye = await fe(ye.next);
|
|
5151
5151
|
}
|
|
@@ -5228,7 +5228,7 @@ function Us() {
|
|
|
5228
5228
|
return o;
|
|
5229
5229
|
}
|
|
5230
5230
|
}
|
|
5231
|
-
function
|
|
5231
|
+
function Ne(n) {
|
|
5232
5232
|
if (!(typeof n > "u")) {
|
|
5233
5233
|
var o;
|
|
5234
5234
|
try {
|
|
@@ -5300,7 +5300,7 @@ function Us() {
|
|
|
5300
5300
|
stack: new Error().stack
|
|
5301
5301
|
};
|
|
5302
5302
|
var ye = function(re) {
|
|
5303
|
-
var
|
|
5303
|
+
var Ie = (function() {
|
|
5304
5304
|
for (var Be, nt = 0; nt < re.length; nt++)
|
|
5305
5305
|
if (Be = re.charAt(nt), X.indexOf(Be) !== -1 && Be !== p["exponent-separator"])
|
|
5306
5306
|
return re.substring(0, nt);
|
|
@@ -5308,75 +5308,75 @@ function Us() {
|
|
|
5308
5308
|
for (var Be, nt = re.length - 1; nt >= 0; nt--)
|
|
5309
5309
|
if (Be = re.charAt(nt), X.indexOf(Be) !== -1 && Be !== p["exponent-separator"])
|
|
5310
5310
|
return re.substring(nt + 1);
|
|
5311
|
-
})(),
|
|
5312
|
-
rt === -1 || rt > re.length - Ye.length ? (Xe =
|
|
5313
|
-
var
|
|
5314
|
-
return
|
|
5315
|
-
prefix:
|
|
5311
|
+
})(), Re = re.substring(Ie.length, re.length - Ye.length), Xe, Ot, Qe, It, rt = re.indexOf(p["exponent-separator"], Ie.length);
|
|
5312
|
+
rt === -1 || rt > re.length - Ye.length ? (Xe = Re, Ot = void 0) : (Xe = Re.substring(0, rt), Ot = Re.substring(rt + 1));
|
|
5313
|
+
var lt = Xe.indexOf(p["decimal-separator"]);
|
|
5314
|
+
return lt === -1 ? (Qe = Xe, It = Ye) : (Qe = Xe.substring(0, lt), It = Xe.substring(lt + 1)), {
|
|
5315
|
+
prefix: Ie,
|
|
5316
5316
|
suffix: Ye,
|
|
5317
|
-
activePart:
|
|
5317
|
+
activePart: Re,
|
|
5318
5318
|
mantissaPart: Xe,
|
|
5319
|
-
exponentPart:
|
|
5319
|
+
exponentPart: Ot,
|
|
5320
5320
|
integerPart: Qe,
|
|
5321
5321
|
fractionalPart: It,
|
|
5322
5322
|
subpicture: re
|
|
5323
5323
|
};
|
|
5324
|
-
},
|
|
5325
|
-
var
|
|
5326
|
-
Xe !==
|
|
5327
|
-
var
|
|
5324
|
+
}, Ce = function(re) {
|
|
5325
|
+
var Ie, Ye, Re = re.subpicture, Xe = Re.indexOf(p["decimal-separator"]);
|
|
5326
|
+
Xe !== Re.lastIndexOf(p["decimal-separator"]) && (Ie = "D3081"), Re.indexOf(p.percent) !== Re.lastIndexOf(p.percent) && (Ie = "D3082"), Re.indexOf(p["per-mille"]) !== Re.lastIndexOf(p["per-mille"]) && (Ie = "D3083"), Re.indexOf(p.percent) !== -1 && Re.indexOf(p["per-mille"]) !== -1 && (Ie = "D3084");
|
|
5327
|
+
var Ot = !1;
|
|
5328
5328
|
for (Ye = 0; Ye < re.mantissaPart.length; Ye++) {
|
|
5329
5329
|
var Qe = re.mantissaPart.charAt(Ye);
|
|
5330
5330
|
if (_.indexOf(Qe) !== -1 || Qe === p.digit) {
|
|
5331
|
-
|
|
5331
|
+
Ot = !0;
|
|
5332
5332
|
break;
|
|
5333
5333
|
}
|
|
5334
5334
|
}
|
|
5335
|
-
|
|
5335
|
+
Ot || (Ie = "D3085");
|
|
5336
5336
|
var It = re.activePart.split("").map(function(Be) {
|
|
5337
5337
|
return X.indexOf(Be) === -1 ? "p" : "a";
|
|
5338
5338
|
}).join("");
|
|
5339
|
-
It.indexOf("p") !== -1 && (
|
|
5339
|
+
It.indexOf("p") !== -1 && (Ie = "D3086"), Xe !== -1 ? (Re.charAt(Xe - 1) === p["grouping-separator"] || Re.charAt(Xe + 1) === p["grouping-separator"]) && (Ie = "D3087") : re.integerPart.charAt(re.integerPart.length - 1) === p["grouping-separator"] && (Ie = "D3088"), Re.indexOf(p["grouping-separator"] + p["grouping-separator"]) !== -1 && (Ie = "D3089");
|
|
5340
5340
|
var rt = re.integerPart.indexOf(p.digit);
|
|
5341
5341
|
rt !== -1 && re.integerPart.substring(0, rt).split("").filter(function(Be) {
|
|
5342
5342
|
return _.indexOf(Be) > -1;
|
|
5343
|
-
}).length > 0 && (
|
|
5343
|
+
}).length > 0 && (Ie = "D3090"), rt = re.fractionalPart.lastIndexOf(p.digit), rt !== -1 && re.fractionalPart.substring(rt).split("").filter(function(Be) {
|
|
5344
5344
|
return _.indexOf(Be) > -1;
|
|
5345
|
-
}).length > 0 && (
|
|
5346
|
-
var
|
|
5347
|
-
if (
|
|
5345
|
+
}).length > 0 && (Ie = "D3091");
|
|
5346
|
+
var lt = typeof re.exponentPart == "string";
|
|
5347
|
+
if (lt && re.exponentPart.length > 0 && (Re.indexOf(p.percent) !== -1 || Re.indexOf(p["per-mille"]) !== -1) && (Ie = "D3092"), lt && (re.exponentPart.length === 0 || re.exponentPart.split("").filter(function(Be) {
|
|
5348
5348
|
return _.indexOf(Be) === -1;
|
|
5349
|
-
}).length > 0) && (
|
|
5349
|
+
}).length > 0) && (Ie = "D3093"), Ie)
|
|
5350
5350
|
throw {
|
|
5351
|
-
code:
|
|
5351
|
+
code: Ie,
|
|
5352
5352
|
stack: new Error().stack
|
|
5353
5353
|
};
|
|
5354
5354
|
}, Se = function(re) {
|
|
5355
|
-
var
|
|
5355
|
+
var Ie = function(Ve, wr) {
|
|
5356
5356
|
for (var er = [], kt = Ve.indexOf(p["grouping-separator"]); kt !== -1; ) {
|
|
5357
|
-
var br = (wr ? Ve.substring(0, kt) : Ve.substring(kt)).split("").filter(function(
|
|
5358
|
-
return _.indexOf(
|
|
5357
|
+
var br = (wr ? Ve.substring(0, kt) : Ve.substring(kt)).split("").filter(function(zt) {
|
|
5358
|
+
return _.indexOf(zt) !== -1 || zt === p.digit;
|
|
5359
5359
|
}).length;
|
|
5360
5360
|
er.push(br), kt = re.integerPart.indexOf(p["grouping-separator"], kt + 1);
|
|
5361
5361
|
}
|
|
5362
5362
|
return er;
|
|
5363
|
-
}, Ye =
|
|
5363
|
+
}, Ye = Ie(re.integerPart), Re = function(Ve) {
|
|
5364
5364
|
if (Ve.length === 0)
|
|
5365
5365
|
return 0;
|
|
5366
|
-
for (var wr = function(br,
|
|
5367
|
-
return
|
|
5366
|
+
for (var wr = function(br, zt) {
|
|
5367
|
+
return zt === 0 ? br : wr(zt, br % zt);
|
|
5368
5368
|
}, er = Ve.reduce(wr), kt = 1; kt <= Ve.length; kt++)
|
|
5369
5369
|
if (Ve.indexOf(kt * er) === -1)
|
|
5370
5370
|
return 0;
|
|
5371
5371
|
return er;
|
|
5372
|
-
}, Xe =
|
|
5372
|
+
}, Xe = Re(Ye), Ot = Ie(re.fractionalPart, !0), Qe = re.integerPart.split("").filter(function(Ve) {
|
|
5373
5373
|
return _.indexOf(Ve) !== -1;
|
|
5374
|
-
}).length, It = Qe, rt = re.fractionalPart.split(""),
|
|
5374
|
+
}).length, It = Qe, rt = re.fractionalPart.split(""), lt = rt.filter(function(Ve) {
|
|
5375
5375
|
return _.indexOf(Ve) !== -1;
|
|
5376
5376
|
}).length, Be = rt.filter(function(Ve) {
|
|
5377
5377
|
return _.indexOf(Ve) !== -1 || Ve === p.digit;
|
|
5378
5378
|
}).length, nt = typeof re.exponentPart == "string";
|
|
5379
|
-
Qe === 0 && Be === 0 && (nt ? (
|
|
5379
|
+
Qe === 0 && Be === 0 && (nt ? (lt = 1, Be = 1) : Qe = 1), nt && Qe === 0 && re.integerPart.indexOf(p.digit) !== -1 && (Qe = 1), Qe === 0 && lt === 0 && (lt = 1);
|
|
5380
5380
|
var Vr = 0;
|
|
5381
5381
|
return nt && (Vr = re.exponentPart.split("").filter(function(Ve) {
|
|
5382
5382
|
return _.indexOf(Ve) !== -1;
|
|
@@ -5386,57 +5386,57 @@ function Us() {
|
|
|
5386
5386
|
minimumIntegerPartSize: Qe,
|
|
5387
5387
|
scalingFactor: It,
|
|
5388
5388
|
prefix: re.prefix,
|
|
5389
|
-
fractionalPartGroupingPositions:
|
|
5390
|
-
minimumFactionalPartSize:
|
|
5389
|
+
fractionalPartGroupingPositions: Ot,
|
|
5390
|
+
minimumFactionalPartSize: lt,
|
|
5391
5391
|
maximumFactionalPartSize: Be,
|
|
5392
5392
|
minimumExponentSize: Vr,
|
|
5393
5393
|
suffix: re.suffix,
|
|
5394
5394
|
picture: re.subpicture
|
|
5395
5395
|
};
|
|
5396
|
-
},
|
|
5397
|
-
|
|
5398
|
-
var ke =
|
|
5399
|
-
ke.length === 1 && (ke.push(JSON.parse(JSON.stringify(ke[0]))), ke[1].prefix =
|
|
5400
|
-
var
|
|
5401
|
-
n >= 0 ?
|
|
5396
|
+
}, We = Oe.map(ye);
|
|
5397
|
+
We.forEach(Ce);
|
|
5398
|
+
var ke = We.map(Se), Fe = p["minus-sign"], ot = p["zero-digit"], ze = p["decimal-separator"], Zt = p["grouping-separator"];
|
|
5399
|
+
ke.length === 1 && (ke.push(JSON.parse(JSON.stringify(ke[0]))), ke[1].prefix = Fe + ke[1].prefix);
|
|
5400
|
+
var $e;
|
|
5401
|
+
n >= 0 ? $e = ke[0] : $e = ke[1];
|
|
5402
5402
|
var Xt;
|
|
5403
|
-
|
|
5404
|
-
var Mt,
|
|
5405
|
-
if (
|
|
5403
|
+
$e.picture.indexOf(p.percent) !== -1 ? Xt = n * 100 : $e.picture.indexOf(p["per-mille"]) !== -1 ? Xt = n * 1e3 : Xt = n;
|
|
5404
|
+
var Mt, Wt;
|
|
5405
|
+
if ($e.minimumExponentSize === 0)
|
|
5406
5406
|
Mt = Xt;
|
|
5407
5407
|
else {
|
|
5408
|
-
var An = Math.pow(10,
|
|
5409
|
-
for (Mt = Xt,
|
|
5410
|
-
Mt *= 10,
|
|
5408
|
+
var An = Math.pow(10, $e.scalingFactor), Sn = Math.pow(10, $e.scalingFactor - 1);
|
|
5409
|
+
for (Mt = Xt, Wt = 0; Mt < Sn; )
|
|
5410
|
+
Mt *= 10, Wt -= 1;
|
|
5411
5411
|
for (; Mt > An; )
|
|
5412
|
-
Mt /= 10,
|
|
5412
|
+
Mt /= 10, Wt += 1;
|
|
5413
5413
|
}
|
|
5414
|
-
var Dn = F(Mt,
|
|
5415
|
-
var Ye = Math.abs(re).toFixed(
|
|
5416
|
-
return ot !== "0" && (Ye = Ye.split("").map(function(
|
|
5417
|
-
return
|
|
5414
|
+
var Dn = F(Mt, $e.maximumFactionalPartSize), Wr = function(re, Ie) {
|
|
5415
|
+
var Ye = Math.abs(re).toFixed(Ie);
|
|
5416
|
+
return ot !== "0" && (Ye = Ye.split("").map(function(Re) {
|
|
5417
|
+
return Re >= "0" && Re <= "9" ? _[Re.charCodeAt(0) - 48] : Re;
|
|
5418
5418
|
}).join("")), Ye;
|
|
5419
|
-
}, ce =
|
|
5420
|
-
for (Ge === -1 ? ce = ce +
|
|
5419
|
+
}, ce = Wr(Dn, $e.maximumFactionalPartSize), Ge = ce.indexOf(".");
|
|
5420
|
+
for (Ge === -1 ? ce = ce + ze : ce = ce.replace(".", ze); ce.charAt(0) === ot; )
|
|
5421
5421
|
ce = ce.substring(1);
|
|
5422
5422
|
for (; ce.charAt(ce.length - 1) === ot; )
|
|
5423
5423
|
ce = ce.substring(0, ce.length - 1);
|
|
5424
|
-
Ge = ce.indexOf(
|
|
5425
|
-
var Qt =
|
|
5426
|
-
if (ce = (Qt > 0 ? new Array(Qt + 1).join(ot) : "") + ce, ce = ce + (
|
|
5427
|
-
for (var On = Math.floor((Ge - 1) /
|
|
5428
|
-
ce = [ce.slice(0, Ge - gr *
|
|
5424
|
+
Ge = ce.indexOf(ze);
|
|
5425
|
+
var Qt = $e.minimumIntegerPartSize - Ge, zr = $e.minimumFactionalPartSize - (ce.length - Ge - 1);
|
|
5426
|
+
if (ce = (Qt > 0 ? new Array(Qt + 1).join(ot) : "") + ce, ce = ce + (zr > 0 ? new Array(zr + 1).join(ot) : ""), Ge = ce.indexOf(ze), $e.regularGrouping > 0)
|
|
5427
|
+
for (var On = Math.floor((Ge - 1) / $e.regularGrouping), gr = 1; gr <= On; gr++)
|
|
5428
|
+
ce = [ce.slice(0, Ge - gr * $e.regularGrouping), Zt, ce.slice(Ge - gr * $e.regularGrouping)].join("");
|
|
5429
5429
|
else
|
|
5430
|
-
|
|
5430
|
+
$e.integerPartGroupingPositions.forEach(function(re) {
|
|
5431
5431
|
ce = [ce.slice(0, Ge - re), Zt, ce.slice(Ge - re)].join(""), Ge++;
|
|
5432
5432
|
});
|
|
5433
|
-
if (Ge = ce.indexOf(
|
|
5433
|
+
if (Ge = ce.indexOf(ze), $e.fractionalPartGroupingPositions.forEach(function(re) {
|
|
5434
5434
|
ce = [ce.slice(0, re + Ge + 1), Zt, ce.slice(re + Ge + 1)].join("");
|
|
5435
|
-
}), Ge = ce.indexOf(
|
|
5436
|
-
var vr =
|
|
5437
|
-
Qt =
|
|
5435
|
+
}), Ge = ce.indexOf(ze), ($e.picture.indexOf(ze) === -1 || Ge === ce.length - 1) && (ce = ce.substring(0, ce.length - 1)), typeof Wt < "u") {
|
|
5436
|
+
var vr = Wr(Wt, 0);
|
|
5437
|
+
Qt = $e.minimumExponentSize - vr.length, Qt > 0 && (vr = new Array(Qt + 1).join(ot) + vr), ce = ce + p["exponent-separator"] + (Wt < 0 ? Fe : "") + vr;
|
|
5438
5438
|
}
|
|
5439
|
-
return ce =
|
|
5439
|
+
return ce = $e.prefix + ce + $e.suffix, ce;
|
|
5440
5440
|
}
|
|
5441
5441
|
}
|
|
5442
5442
|
function b(n, o) {
|
|
@@ -5649,17 +5649,17 @@ function Us() {
|
|
|
5649
5649
|
} else n !== null && typeof n == "object" && !S(n) && (l = n[o]);
|
|
5650
5650
|
return l;
|
|
5651
5651
|
}
|
|
5652
|
-
function
|
|
5652
|
+
function St(n, o) {
|
|
5653
5653
|
return typeof n > "u" ? o : typeof o > "u" ? n : (Array.isArray(n) || (n = D(n)), Array.isArray(o) || (o = [o]), n.concat(o));
|
|
5654
5654
|
}
|
|
5655
5655
|
function mr(n) {
|
|
5656
5656
|
return !(typeof n > "u");
|
|
5657
5657
|
}
|
|
5658
|
-
function
|
|
5658
|
+
function Dt(n) {
|
|
5659
5659
|
var o = D();
|
|
5660
5660
|
if (Array.isArray(n))
|
|
5661
5661
|
n.forEach(function(p) {
|
|
5662
|
-
o =
|
|
5662
|
+
o = St(o, Dt(p));
|
|
5663
5663
|
});
|
|
5664
5664
|
else if (n !== null && typeof n == "object" && !I(n))
|
|
5665
5665
|
for (var l in n) {
|
|
@@ -5696,7 +5696,7 @@ function Us() {
|
|
|
5696
5696
|
}
|
|
5697
5697
|
return l;
|
|
5698
5698
|
}
|
|
5699
|
-
function
|
|
5699
|
+
function ut(n) {
|
|
5700
5700
|
throw {
|
|
5701
5701
|
code: "D3137",
|
|
5702
5702
|
stack: new Error().stack,
|
|
@@ -5733,8 +5733,8 @@ function Us() {
|
|
|
5733
5733
|
} else
|
|
5734
5734
|
l = o;
|
|
5735
5735
|
var g = async function(R, q) {
|
|
5736
|
-
var X = async function(ye,
|
|
5737
|
-
|
|
5736
|
+
var X = async function(ye, Ce, Se) {
|
|
5737
|
+
Ce.length === 0 ? Array.prototype.push.apply(ye, Se) : Se.length === 0 ? Array.prototype.push.apply(ye, Ce) : await l(Ce[0], Se[0]) ? (ye.push(Se[0]), await X(ye, Ce, Se.slice(1))) : (ye.push(Ce[0]), await X(ye, Ce.slice(1), Se));
|
|
5738
5738
|
}, Oe = [];
|
|
5739
5739
|
return await X(Oe, R, q), Oe;
|
|
5740
5740
|
}, p = async function(R) {
|
|
@@ -5784,20 +5784,20 @@ function Us() {
|
|
|
5784
5784
|
sum: C,
|
|
5785
5785
|
count: se,
|
|
5786
5786
|
max: B,
|
|
5787
|
-
min:
|
|
5787
|
+
min: T,
|
|
5788
5788
|
average: L,
|
|
5789
|
-
string:
|
|
5789
|
+
string: z,
|
|
5790
5790
|
substring: he,
|
|
5791
5791
|
substringBefore: xe,
|
|
5792
5792
|
substringAfter: Te,
|
|
5793
5793
|
lowercase: Ae,
|
|
5794
5794
|
uppercase: ve,
|
|
5795
|
-
length:
|
|
5795
|
+
length: Me,
|
|
5796
5796
|
trim: et,
|
|
5797
5797
|
pad: _e,
|
|
5798
5798
|
match: ie,
|
|
5799
5799
|
contains: tt,
|
|
5800
|
-
replace:
|
|
5800
|
+
replace: Ue,
|
|
5801
5801
|
split: Ee,
|
|
5802
5802
|
join: v,
|
|
5803
5803
|
formatNumber: A,
|
|
@@ -5820,13 +5820,13 @@ function Us() {
|
|
|
5820
5820
|
sift: y,
|
|
5821
5821
|
keys: He,
|
|
5822
5822
|
lookup: bt,
|
|
5823
|
-
append:
|
|
5823
|
+
append: St,
|
|
5824
5824
|
exists: mr,
|
|
5825
|
-
spread:
|
|
5825
|
+
spread: Dt,
|
|
5826
5826
|
merge: Z,
|
|
5827
5827
|
reverse: yr,
|
|
5828
5828
|
each: Jt,
|
|
5829
|
-
error:
|
|
5829
|
+
error: ut,
|
|
5830
5830
|
assert: Bt,
|
|
5831
5831
|
type: mt,
|
|
5832
5832
|
sort: De,
|
|
@@ -5837,7 +5837,7 @@ function Us() {
|
|
|
5837
5837
|
encodeUrlComponent: m,
|
|
5838
5838
|
encodeUrl: V,
|
|
5839
5839
|
decodeUrlComponent: de,
|
|
5840
|
-
decodeUrl:
|
|
5840
|
+
decodeUrl: Ne
|
|
5841
5841
|
};
|
|
5842
5842
|
})();
|
|
5843
5843
|
a.exports = f;
|
|
@@ -5845,15 +5845,15 @@ function Us() {
|
|
|
5845
5845
|
}).call(this, typeof Kr < "u" ? Kr : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
5846
5846
|
}, { "./utils": 6 }], 3: [function(t, a, s) {
|
|
5847
5847
|
var i = t("./datetime"), c = t("./functions"), f = t("./utils"), w = t("./parser"), k = t("./signature"), M = (function() {
|
|
5848
|
-
var D = f.isNumeric, x = f.isArrayOfStrings, S = f.isArrayOfNumbers, I = f.createSequence, ae = f.isSequence, Q = f.isFunction, pe = f.isLambda, H = f.isIterable, C = f.isPromise, se = f.getFunctionArity, B = f.isDeepEqual,
|
|
5848
|
+
var D = f.isNumeric, x = f.isArrayOfStrings, S = f.isArrayOfNumbers, I = f.createSequence, ae = f.isSequence, Q = f.isFunction, pe = f.isLambda, H = f.isIterable, C = f.isPromise, se = f.getFunctionArity, B = f.isDeepEqual, T = ut(null);
|
|
5849
5849
|
async function L(u, h, y) {
|
|
5850
5850
|
var n, o = y.lookup(Symbol.for("jsonata.__evaluate_entry"));
|
|
5851
5851
|
switch (o && await o(u, h, y), u.type) {
|
|
5852
5852
|
case "path":
|
|
5853
|
-
n = await
|
|
5853
|
+
n = await z(u, h, y);
|
|
5854
5854
|
break;
|
|
5855
5855
|
case "binary":
|
|
5856
|
-
n = await
|
|
5856
|
+
n = await Me(u, h, y);
|
|
5857
5857
|
break;
|
|
5858
5858
|
case "unary":
|
|
5859
5859
|
n = await et(u, h, y);
|
|
@@ -5870,7 +5870,7 @@ function Us() {
|
|
|
5870
5870
|
n = tt(u, h);
|
|
5871
5871
|
break;
|
|
5872
5872
|
case "descendant":
|
|
5873
|
-
n =
|
|
5873
|
+
n = Ue(u, h);
|
|
5874
5874
|
break;
|
|
5875
5875
|
case "parent":
|
|
5876
5876
|
n = y.lookup(u.slot.label);
|
|
@@ -5913,7 +5913,7 @@ function Us() {
|
|
|
5913
5913
|
var g = y.lookup(Symbol.for("jsonata.__evaluate_exit"));
|
|
5914
5914
|
return g && await g(u, h, y, n), n && ae(n) && !n.tupleStream && (u.keepArray && (n.keepSingleton = !0), n.length === 0 ? n = void 0 : n.length === 1 && (n = n.keepSingleton ? n : n[0])), n;
|
|
5915
5915
|
}
|
|
5916
|
-
async function
|
|
5916
|
+
async function z(u, h, y) {
|
|
5917
5917
|
var n;
|
|
5918
5918
|
Array.isArray(h) && u.steps[0].type !== "variable" ? n = h : n = I(h);
|
|
5919
5919
|
for (var o, l = !1, g = void 0, p = 0; p < u.steps.length; p++) {
|
|
@@ -5931,7 +5931,7 @@ function Us() {
|
|
|
5931
5931
|
return u.keepSingletonArray && (Array.isArray(o) && o.cons && !o.sequence && (o = I(o)), o.keepSingleton = !0), u.hasOwnProperty("group") && (o = await A(u.group, l ? g : o, y)), o;
|
|
5932
5932
|
}
|
|
5933
5933
|
function he(u, h) {
|
|
5934
|
-
var y =
|
|
5934
|
+
var y = ut(u);
|
|
5935
5935
|
for (const n in h)
|
|
5936
5936
|
y.bind(n, h[n]);
|
|
5937
5937
|
return y;
|
|
@@ -6018,11 +6018,11 @@ function Us() {
|
|
|
6018
6018
|
}
|
|
6019
6019
|
return n;
|
|
6020
6020
|
}
|
|
6021
|
-
async function
|
|
6021
|
+
async function Me(u, h, y) {
|
|
6022
6022
|
var n, o = await L(u.lhs, h, y), l = u.value, g = async () => await L(u.rhs, h, y);
|
|
6023
6023
|
if (l === "and" || l === "or")
|
|
6024
6024
|
try {
|
|
6025
|
-
return await
|
|
6025
|
+
return await Ne(o, g, l);
|
|
6026
6026
|
} catch (_) {
|
|
6027
6027
|
throw _.position = u.position, _.token = l, _;
|
|
6028
6028
|
}
|
|
@@ -6115,7 +6115,7 @@ function Us() {
|
|
|
6115
6115
|
ie(y, h);
|
|
6116
6116
|
}) : h.push(u), h;
|
|
6117
6117
|
}
|
|
6118
|
-
function
|
|
6118
|
+
function Ue(u, h) {
|
|
6119
6119
|
var y, n = I();
|
|
6120
6120
|
return typeof h < "u" && (st(h, n), n.length === 1 ? y = n[0] : y = n), y;
|
|
6121
6121
|
}
|
|
@@ -6220,7 +6220,7 @@ function Us() {
|
|
|
6220
6220
|
}
|
|
6221
6221
|
return y;
|
|
6222
6222
|
}
|
|
6223
|
-
async function
|
|
6223
|
+
async function Ne(u, h, y) {
|
|
6224
6224
|
var n, o = Ee(u);
|
|
6225
6225
|
switch (y) {
|
|
6226
6226
|
case "and":
|
|
@@ -6268,18 +6268,18 @@ function Us() {
|
|
|
6268
6268
|
o[X] = Oe;
|
|
6269
6269
|
}
|
|
6270
6270
|
}
|
|
6271
|
-
let ye = await Promise.all(Object.keys(o).map(async (Se,
|
|
6271
|
+
let ye = await Promise.all(Object.keys(o).map(async (Se, We) => {
|
|
6272
6272
|
let ke = o[Se];
|
|
6273
|
-
var
|
|
6273
|
+
var Fe = ke.data, ot = y;
|
|
6274
6274
|
if (l) {
|
|
6275
|
-
var
|
|
6276
|
-
|
|
6275
|
+
var ze = b(ke.data);
|
|
6276
|
+
Fe = ze["@"], delete ze["@"], ot = he(y, ze);
|
|
6277
6277
|
}
|
|
6278
|
-
return y.isParallelCall =
|
|
6278
|
+
return y.isParallelCall = We > 0, [Se, await L(u.lhs[ke.exprIndex][1], Fe, ot)];
|
|
6279
6279
|
}));
|
|
6280
6280
|
for (let Se of ye) {
|
|
6281
|
-
var [X,
|
|
6282
|
-
typeof
|
|
6281
|
+
var [X, Ce] = await Se;
|
|
6282
|
+
typeof Ce < "u" && (n[X] = Ce);
|
|
6283
6283
|
}
|
|
6284
6284
|
return n;
|
|
6285
6285
|
}
|
|
@@ -6330,7 +6330,7 @@ function Us() {
|
|
|
6330
6330
|
return c.boolean(o) ? n = await L(u.then, h, y) : typeof u.else < "u" && (n = await L(u.else, h, y)), n;
|
|
6331
6331
|
}
|
|
6332
6332
|
async function O(u, h, y) {
|
|
6333
|
-
for (var n, o =
|
|
6333
|
+
for (var n, o = ut(y), l = 0; l < u.expressions.length; l++)
|
|
6334
6334
|
n = await L(u.expressions[l], h, o);
|
|
6335
6335
|
return n;
|
|
6336
6336
|
}
|
|
@@ -6373,35 +6373,35 @@ function Us() {
|
|
|
6373
6373
|
async function ge(u, h, y) {
|
|
6374
6374
|
var n, o = h, l = !!h.tupleStream, g = async function(_, R) {
|
|
6375
6375
|
for (var q = 0, X = 0; q === 0 && X < u.terms.length; X++) {
|
|
6376
|
-
var Oe = u.terms[X], ye = _,
|
|
6377
|
-
l && (ye = _["@"],
|
|
6378
|
-
var Se = await L(Oe.expression, ye,
|
|
6379
|
-
ye = R,
|
|
6380
|
-
var
|
|
6376
|
+
var Oe = u.terms[X], ye = _, Ce = y;
|
|
6377
|
+
l && (ye = _["@"], Ce = he(y, _));
|
|
6378
|
+
var Se = await L(Oe.expression, ye, Ce);
|
|
6379
|
+
ye = R, Ce = y, l && (ye = R["@"], Ce = he(y, R));
|
|
6380
|
+
var We = await L(Oe.expression, ye, Ce), ke = typeof Se, Fe = typeof We;
|
|
6381
6381
|
if (ke === "undefined") {
|
|
6382
|
-
q =
|
|
6382
|
+
q = Fe === "undefined" ? 0 : 1;
|
|
6383
6383
|
continue;
|
|
6384
6384
|
}
|
|
6385
|
-
if (
|
|
6385
|
+
if (Fe === "undefined") {
|
|
6386
6386
|
q = -1;
|
|
6387
6387
|
continue;
|
|
6388
6388
|
}
|
|
6389
|
-
if (!(ke === "string" || ke === "number") || !(
|
|
6389
|
+
if (!(ke === "string" || ke === "number") || !(Fe === "string" || Fe === "number"))
|
|
6390
6390
|
throw {
|
|
6391
6391
|
code: "T2008",
|
|
6392
6392
|
stack: new Error().stack,
|
|
6393
6393
|
position: u.position,
|
|
6394
|
-
value: ke === "string" || ke === "number" ?
|
|
6394
|
+
value: ke === "string" || ke === "number" ? We : Se
|
|
6395
6395
|
};
|
|
6396
|
-
if (ke !==
|
|
6396
|
+
if (ke !== Fe)
|
|
6397
6397
|
throw {
|
|
6398
6398
|
code: "T2007",
|
|
6399
6399
|
stack: new Error().stack,
|
|
6400
6400
|
position: u.position,
|
|
6401
6401
|
value: Se,
|
|
6402
|
-
value2:
|
|
6402
|
+
value2: We
|
|
6403
6403
|
};
|
|
6404
|
-
Se !==
|
|
6404
|
+
Se !== We && (Se < We ? q = -1 : q = 1, Oe.descending === !0 && (q = -q));
|
|
6405
6405
|
}
|
|
6406
6406
|
return q === 1;
|
|
6407
6407
|
}, p = {
|
|
@@ -6446,13 +6446,13 @@ function Us() {
|
|
|
6446
6446
|
if (typeof u.delete < "u") {
|
|
6447
6447
|
var ye = await L(u.delete, R, y);
|
|
6448
6448
|
if (typeof ye < "u") {
|
|
6449
|
-
var
|
|
6449
|
+
var Ce = ye;
|
|
6450
6450
|
if (Array.isArray(ye) || (ye = [ye]), !x(ye))
|
|
6451
6451
|
throw {
|
|
6452
6452
|
code: "T2012",
|
|
6453
6453
|
stack: new Error().stack,
|
|
6454
6454
|
position: u.delete.position,
|
|
6455
|
-
value:
|
|
6455
|
+
value: Ce
|
|
6456
6456
|
};
|
|
6457
6457
|
for (var Se = 0; Se < ye.length; Se++)
|
|
6458
6458
|
typeof R == "object" && R !== null && delete R[ye[Se]];
|
|
@@ -6580,9 +6580,9 @@ function Us() {
|
|
|
6580
6580
|
if (pe(p))
|
|
6581
6581
|
n = bt(p, o);
|
|
6582
6582
|
else if (p && p._jsonata_function === !0)
|
|
6583
|
-
n =
|
|
6583
|
+
n = St(p.implementation, o);
|
|
6584
6584
|
else if (typeof p == "function")
|
|
6585
|
-
n =
|
|
6585
|
+
n = St(p, o);
|
|
6586
6586
|
else
|
|
6587
6587
|
throw {
|
|
6588
6588
|
code: "T1008",
|
|
@@ -6599,13 +6599,13 @@ function Us() {
|
|
|
6599
6599
|
return n;
|
|
6600
6600
|
}
|
|
6601
6601
|
async function He(u, h) {
|
|
6602
|
-
var y, n =
|
|
6602
|
+
var y, n = ut(u.environment);
|
|
6603
6603
|
return u.arguments.forEach(function(o, l) {
|
|
6604
6604
|
n.bind(o.value, h[l]);
|
|
6605
6605
|
}), typeof u.body == "function" ? y = await mr(u.body, n) : y = await L(u.body, u.input, n), y;
|
|
6606
6606
|
}
|
|
6607
6607
|
function bt(u, h) {
|
|
6608
|
-
var y =
|
|
6608
|
+
var y = ut(u.environment), n = [];
|
|
6609
6609
|
u.arguments.forEach(function(l, g) {
|
|
6610
6610
|
var p = h[g];
|
|
6611
6611
|
p && p.type === "operator" && p.value === "?" ? n.push(l) : y.bind(l.value, p);
|
|
@@ -6619,8 +6619,8 @@ function Us() {
|
|
|
6619
6619
|
};
|
|
6620
6620
|
return o;
|
|
6621
6621
|
}
|
|
6622
|
-
function
|
|
6623
|
-
var y =
|
|
6622
|
+
function St(u, h) {
|
|
6623
|
+
var y = Dt(u);
|
|
6624
6624
|
y = y.map(function(g) {
|
|
6625
6625
|
return "$" + g.trim();
|
|
6626
6626
|
});
|
|
@@ -6630,14 +6630,14 @@ function Us() {
|
|
|
6630
6630
|
return l;
|
|
6631
6631
|
}
|
|
6632
6632
|
async function mr(u, h) {
|
|
6633
|
-
var y =
|
|
6633
|
+
var y = Dt(u), n = y.map(function(g) {
|
|
6634
6634
|
return h.lookup(g.trim());
|
|
6635
6635
|
}), o = {
|
|
6636
6636
|
environment: h
|
|
6637
6637
|
}, l = u.apply(o, n);
|
|
6638
6638
|
return C(l) && (l = await l), l;
|
|
6639
6639
|
}
|
|
6640
|
-
function
|
|
6640
|
+
function Dt(u) {
|
|
6641
6641
|
var h = u.toString(), y = /\(([^)]*)\)/.exec(h)[1], n = y.split(",");
|
|
6642
6642
|
return n;
|
|
6643
6643
|
}
|
|
@@ -6679,7 +6679,7 @@ function Us() {
|
|
|
6679
6679
|
if (!(typeof u > "u"))
|
|
6680
6680
|
return JSON.parse(c.string(u));
|
|
6681
6681
|
}
|
|
6682
|
-
function
|
|
6682
|
+
function ut(u) {
|
|
6683
6683
|
var h = {};
|
|
6684
6684
|
const y = {
|
|
6685
6685
|
bind: function(o, l) {
|
|
@@ -6702,7 +6702,7 @@ function Us() {
|
|
|
6702
6702
|
}
|
|
6703
6703
|
return y;
|
|
6704
6704
|
}
|
|
6705
|
-
|
|
6705
|
+
T.bind("sum", Z(c.sum, "<a<n>:n>")), T.bind("count", Z(c.count, "<a:n>")), T.bind("max", Z(c.max, "<a<n>:n>")), T.bind("min", Z(c.min, "<a<n>:n>")), T.bind("average", Z(c.average, "<a<n>:n>")), T.bind("string", Z(c.string, "<x-b?:s>")), T.bind("substring", Z(c.substring, "<s-nn?:s>")), T.bind("substringBefore", Z(c.substringBefore, "<s-s:s>")), T.bind("substringAfter", Z(c.substringAfter, "<s-s:s>")), T.bind("lowercase", Z(c.lowercase, "<s-:s>")), T.bind("uppercase", Z(c.uppercase, "<s-:s>")), T.bind("length", Z(c.length, "<s-:n>")), T.bind("trim", Z(c.trim, "<s-:s>")), T.bind("pad", Z(c.pad, "<s-ns?:s>")), T.bind("match", Z(c.match, "<s-f<s:o>n?:a<o>>")), T.bind("contains", Z(c.contains, "<s-(sf):b>")), T.bind("replace", Z(c.replace, "<s-(sf)(sf)n?:s>")), T.bind("split", Z(c.split, "<s-(sf)n?:a<s>>")), T.bind("join", Z(c.join, "<a<s>s?:s>")), T.bind("formatNumber", Z(c.formatNumber, "<n-so?:s>")), T.bind("formatBase", Z(c.formatBase, "<n-n?:s>")), T.bind("formatInteger", Z(i.formatInteger, "<n-s:s>")), T.bind("parseInteger", Z(i.parseInteger, "<s-s:n>")), T.bind("number", Z(c.number, "<(nsb)-:n>")), T.bind("floor", Z(c.floor, "<n-:n>")), T.bind("ceil", Z(c.ceil, "<n-:n>")), T.bind("round", Z(c.round, "<n-n?:n>")), T.bind("abs", Z(c.abs, "<n-:n>")), T.bind("sqrt", Z(c.sqrt, "<n-:n>")), T.bind("power", Z(c.power, "<n-n:n>")), T.bind("random", Z(c.random, "<:n>")), T.bind("boolean", Z(c.boolean, "<x-:b>")), T.bind("not", Z(c.not, "<x-:b>")), T.bind("map", Z(c.map, "<af>")), T.bind("zip", Z(c.zip, "<a+>")), T.bind("filter", Z(c.filter, "<af>")), T.bind("single", Z(c.single, "<af?>")), T.bind("reduce", Z(c.foldLeft, "<afj?:j>")), T.bind("sift", Z(c.sift, "<o-f?:o>")), T.bind("keys", Z(c.keys, "<x-:a<s>>")), T.bind("lookup", Z(c.lookup, "<x-s:x>")), T.bind("append", Z(c.append, "<xx:a>")), T.bind("exists", Z(c.exists, "<x:b>")), T.bind("spread", Z(c.spread, "<x-:a<o>>")), T.bind("merge", Z(c.merge, "<a<o>:o>")), T.bind("reverse", Z(c.reverse, "<a:a>")), T.bind("each", Z(c.each, "<o-f:a>")), T.bind("error", Z(c.error, "<s?:x>")), T.bind("assert", Z(c.assert, "<bs?:x>")), T.bind("type", Z(c.type, "<x:s>")), T.bind("sort", Z(c.sort, "<af?:a>")), T.bind("shuffle", Z(c.shuffle, "<a:a>")), T.bind("distinct", Z(c.distinct, "<x:x>")), T.bind("base64encode", Z(c.base64encode, "<s-:s>")), T.bind("base64decode", Z(c.base64decode, "<s-:s>")), T.bind("encodeUrlComponent", Z(c.encodeUrlComponent, "<s-:s>")), T.bind("encodeUrl", Z(c.encodeUrl, "<s-:s>")), T.bind("decodeUrlComponent", Z(c.decodeUrlComponent, "<s-:s>")), T.bind("decodeUrl", Z(c.decodeUrl, "<s-:s>")), T.bind("eval", Z(yr, "<sx?:x>")), T.bind("toMillis", Z(i.toMillis, "<s-s?:n>")), T.bind("fromMillis", Z(i.fromMillis, "<n-s?s?:s>")), T.bind("clone", Z(Jt, "<(oa)-:o>"));
|
|
6706
6706
|
var Bt = {
|
|
6707
6707
|
S0101: "String literal must be terminated by a matching quote",
|
|
6708
6708
|
S0102: "Number out of range: {{token}}",
|
|
@@ -6822,7 +6822,7 @@ function Us() {
|
|
|
6822
6822
|
} catch (g) {
|
|
6823
6823
|
throw mt(g), g;
|
|
6824
6824
|
}
|
|
6825
|
-
var o =
|
|
6825
|
+
var o = ut(T), l = /* @__PURE__ */ new Date();
|
|
6826
6826
|
return o.bind("now", Z(function(g, p) {
|
|
6827
6827
|
return i.fromMillis(l.getTime(), g, p);
|
|
6828
6828
|
}, "<s?s?:s>")), o.bind("millis", Z(function() {
|
|
@@ -6838,7 +6838,7 @@ function Us() {
|
|
|
6838
6838
|
}
|
|
6839
6839
|
if (typeof p < "u") {
|
|
6840
6840
|
var q;
|
|
6841
|
-
q =
|
|
6841
|
+
q = ut(o);
|
|
6842
6842
|
for (var X in p)
|
|
6843
6843
|
q.bind(X, p[X]);
|
|
6844
6844
|
} else
|
|
@@ -6931,14 +6931,14 @@ function Us() {
|
|
|
6931
6931
|
}, ae = function() {
|
|
6932
6932
|
for (var pe = x, H = 0, C, se, B = function(L) {
|
|
6933
6933
|
if (D.charAt(L) === "/" && H === 0) {
|
|
6934
|
-
for (var
|
|
6935
|
-
|
|
6936
|
-
if (
|
|
6934
|
+
for (var z = 0; D.charAt(L - (z + 1)) === "\\"; )
|
|
6935
|
+
z++;
|
|
6936
|
+
if (z % 2 === 0)
|
|
6937
6937
|
return !0;
|
|
6938
6938
|
}
|
|
6939
6939
|
return !1;
|
|
6940
6940
|
}; x < S; ) {
|
|
6941
|
-
var
|
|
6941
|
+
var T = D.charAt(x);
|
|
6942
6942
|
if (B(x)) {
|
|
6943
6943
|
if (C = D.substring(pe, x), C === "")
|
|
6944
6944
|
throw {
|
|
@@ -6946,11 +6946,11 @@ function Us() {
|
|
|
6946
6946
|
stack: new Error().stack,
|
|
6947
6947
|
position: x
|
|
6948
6948
|
};
|
|
6949
|
-
for (x++,
|
|
6950
|
-
x++,
|
|
6949
|
+
for (x++, T = D.charAt(x), pe = x; T === "i" || T === "m"; )
|
|
6950
|
+
x++, T = D.charAt(x);
|
|
6951
6951
|
return se = D.substring(pe, x) + "g", new RegExp(C, se);
|
|
6952
6952
|
}
|
|
6953
|
-
(
|
|
6953
|
+
(T === "(" || T === "[" || T === "{") && D.charAt(x - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && D.charAt(x - 1) !== "\\" && H--, x++;
|
|
6954
6954
|
}
|
|
6955
6955
|
throw {
|
|
6956
6956
|
code: "S0302",
|
|
@@ -7003,9 +7003,9 @@ function Us() {
|
|
|
7003
7003
|
if (x++, H = D.charAt(x), Object.prototype.hasOwnProperty.call(w, H))
|
|
7004
7004
|
B += w[H];
|
|
7005
7005
|
else if (H === "u") {
|
|
7006
|
-
var
|
|
7007
|
-
if (/^[0-9a-fA-F]+$/.test(
|
|
7008
|
-
var L = parseInt(
|
|
7006
|
+
var T = D.substr(x + 1, 4);
|
|
7007
|
+
if (/^[0-9a-fA-F]+$/.test(T)) {
|
|
7008
|
+
var L = parseInt(T, 16);
|
|
7009
7009
|
B += String.fromCharCode(L), x += 4;
|
|
7010
7010
|
} else
|
|
7011
7011
|
throw {
|
|
@@ -7033,7 +7033,7 @@ function Us() {
|
|
|
7033
7033
|
position: x
|
|
7034
7034
|
};
|
|
7035
7035
|
}
|
|
7036
|
-
var
|
|
7036
|
+
var z = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, he = z.exec(D.substring(x));
|
|
7037
7037
|
if (he !== null) {
|
|
7038
7038
|
var xe = parseFloat(he[0]);
|
|
7039
7039
|
if (!isNaN(xe) && isFinite(xe))
|
|
@@ -7057,9 +7057,9 @@ function Us() {
|
|
|
7057
7057
|
position: x
|
|
7058
7058
|
};
|
|
7059
7059
|
}
|
|
7060
|
-
for (var ve = x,
|
|
7061
|
-
if (
|
|
7062
|
-
\r\v`.indexOf(
|
|
7060
|
+
for (var ve = x, Me; ; )
|
|
7061
|
+
if (Me = D.charAt(ve), ve === S || `
|
|
7062
|
+
\r\v`.indexOf(Me) > -1 || Object.prototype.hasOwnProperty.call(f, Me)) {
|
|
7063
7063
|
if (D.charAt(x) === "$")
|
|
7064
7064
|
return Te = D.substring(x + 1, ve), x = ve, I("variable", Te);
|
|
7065
7065
|
switch (Te = D.substring(x, ve), x = ve, Te) {
|
|
@@ -7120,10 +7120,10 @@ function Us() {
|
|
|
7120
7120
|
};
|
|
7121
7121
|
return se(de);
|
|
7122
7122
|
}
|
|
7123
|
-
var
|
|
7124
|
-
if (
|
|
7123
|
+
var Ne = I(m);
|
|
7124
|
+
if (Ne === null)
|
|
7125
7125
|
return S = ae["(end)"], S.position = D.length, S;
|
|
7126
|
-
var Ee =
|
|
7126
|
+
var Ee = Ne.value, v = Ne.type, A;
|
|
7127
7127
|
switch (v) {
|
|
7128
7128
|
case "name":
|
|
7129
7129
|
case "variable":
|
|
@@ -7134,7 +7134,7 @@ function Us() {
|
|
|
7134
7134
|
return se({
|
|
7135
7135
|
code: "S0204",
|
|
7136
7136
|
stack: new Error().stack,
|
|
7137
|
-
position:
|
|
7137
|
+
position: Ne.position,
|
|
7138
7138
|
token: Ee
|
|
7139
7139
|
});
|
|
7140
7140
|
break;
|
|
@@ -7151,12 +7151,12 @@ function Us() {
|
|
|
7151
7151
|
return se({
|
|
7152
7152
|
code: "S0205",
|
|
7153
7153
|
stack: new Error().stack,
|
|
7154
|
-
position:
|
|
7154
|
+
position: Ne.position,
|
|
7155
7155
|
token: Ee
|
|
7156
7156
|
});
|
|
7157
7157
|
}
|
|
7158
|
-
return S = Object.create(A), S.value = Ee, S.type = v, S.position =
|
|
7159
|
-
},
|
|
7158
|
+
return S = Object.create(A), S.value = Ee, S.type = v, S.position = Ne.position, S;
|
|
7159
|
+
}, T = function(d) {
|
|
7160
7160
|
var m, V = S;
|
|
7161
7161
|
for (B(null, !0), m = V.nud(); d < S.lbp; )
|
|
7162
7162
|
V = S, B(), m = V.led(m);
|
|
@@ -7166,27 +7166,27 @@ function Us() {
|
|
|
7166
7166
|
m.nud = function() {
|
|
7167
7167
|
return this;
|
|
7168
7168
|
};
|
|
7169
|
-
},
|
|
7170
|
-
var de = m || f[d],
|
|
7171
|
-
return
|
|
7172
|
-
return this.lhs = Ee, this.rhs =
|
|
7173
|
-
},
|
|
7169
|
+
}, z = function(d, m, V) {
|
|
7170
|
+
var de = m || f[d], Ne = C(d, de);
|
|
7171
|
+
return Ne.led = V || function(Ee) {
|
|
7172
|
+
return this.lhs = Ee, this.rhs = T(de), this.type = "binary", this;
|
|
7173
|
+
}, Ne;
|
|
7174
7174
|
}, he = function(d, m, V) {
|
|
7175
7175
|
var de = C(d, m);
|
|
7176
7176
|
return de.led = V, de;
|
|
7177
7177
|
}, xe = function(d, m) {
|
|
7178
7178
|
var V = C(d);
|
|
7179
7179
|
return V.nud = m || function() {
|
|
7180
|
-
return this.expression =
|
|
7180
|
+
return this.expression = T(70), this.type = "unary", this;
|
|
7181
7181
|
}, V;
|
|
7182
7182
|
};
|
|
7183
|
-
L("(end)"), L("(name)"), L("(literal)"), L("(regex)"), C(":"), C(";"), C(","), C(")"), C("]"), C("}"), C(".."),
|
|
7183
|
+
L("(end)"), L("(name)"), L("(literal)"), L("(regex)"), C(":"), C(";"), C(","), C(")"), C("]"), C("}"), C(".."), z("."), z("+"), z("-"), z("*"), z("/"), z("%"), z("="), z("<"), z(">"), z("!="), z("<="), z(">="), z("&"), z("and"), z("or"), z("in"), L("and"), L("or"), L("in"), xe("-"), z("~>"), z("??", f["??"], function(d) {
|
|
7184
7184
|
return this.type = "condition", this.condition = {
|
|
7185
7185
|
type: "function",
|
|
7186
7186
|
value: "(",
|
|
7187
7187
|
procedure: { type: "variable", value: "exists" },
|
|
7188
7188
|
arguments: [d]
|
|
7189
|
-
}, this.then = d, this.else =
|
|
7189
|
+
}, this.then = d, this.else = T(0), this;
|
|
7190
7190
|
}), he("(error)", 10, function(d) {
|
|
7191
7191
|
return this.lhs = d, this.error = S.error, this.remaining = pe(), this.type = "error", this;
|
|
7192
7192
|
}), xe("*", function() {
|
|
@@ -7195,9 +7195,9 @@ function Us() {
|
|
|
7195
7195
|
return this.type = "descendant", this;
|
|
7196
7196
|
}), xe("%", function() {
|
|
7197
7197
|
return this.type = "parent", this;
|
|
7198
|
-
}),
|
|
7198
|
+
}), z("(", f["("], function(d) {
|
|
7199
7199
|
if (this.procedure = d, this.type = "function", this.arguments = [], S.id !== ")")
|
|
7200
|
-
for (; S.type === "operator" && S.id === "?" ? (this.type = "partial", this.arguments.push(S), B("?")) : this.arguments.push(
|
|
7200
|
+
for (; S.type === "operator" && S.id === "?" ? (this.type = "partial", this.arguments.push(S), B("?")) : this.arguments.push(T(0)), S.id === ","; )
|
|
7201
7201
|
B(",");
|
|
7202
7202
|
if (B(")", !0), d.type === "name" && (d.value === "function" || d.value === "λ")) {
|
|
7203
7203
|
if (this.arguments.forEach(function(Ee, v) {
|
|
@@ -7211,8 +7211,8 @@ function Us() {
|
|
|
7211
7211
|
});
|
|
7212
7212
|
}), this.type = "lambda", S.id === "<") {
|
|
7213
7213
|
for (var m = S.position, V = 1, de = "<"; V > 0 && S.id !== "{" && S.id !== "(end)"; ) {
|
|
7214
|
-
var
|
|
7215
|
-
|
|
7214
|
+
var Ne = B();
|
|
7215
|
+
Ne.id === ">" ? V-- : Ne.id === "<" && V++, de += Ne.value;
|
|
7216
7216
|
}
|
|
7217
7217
|
B(">");
|
|
7218
7218
|
try {
|
|
@@ -7221,41 +7221,41 @@ function Us() {
|
|
|
7221
7221
|
return Ee.position = m + Ee.offset, se(Ee);
|
|
7222
7222
|
}
|
|
7223
7223
|
}
|
|
7224
|
-
B("{"), this.body =
|
|
7224
|
+
B("{"), this.body = T(0), B("}");
|
|
7225
7225
|
}
|
|
7226
7226
|
return this;
|
|
7227
7227
|
}), xe("(", function() {
|
|
7228
|
-
for (var d = []; S.id !== ")" && (d.push(
|
|
7228
|
+
for (var d = []; S.id !== ")" && (d.push(T(0)), S.id === ";"); )
|
|
7229
7229
|
B(";");
|
|
7230
7230
|
return B(")", !0), this.type = "block", this.expressions = d, this;
|
|
7231
7231
|
}), xe("[", function() {
|
|
7232
7232
|
var d = [];
|
|
7233
7233
|
if (S.id !== "]")
|
|
7234
7234
|
for (; ; ) {
|
|
7235
|
-
var m =
|
|
7235
|
+
var m = T(0);
|
|
7236
7236
|
if (S.id === "..") {
|
|
7237
7237
|
var V = { type: "binary", value: "..", position: S.position, lhs: m };
|
|
7238
|
-
B(".."), V.rhs =
|
|
7238
|
+
B(".."), V.rhs = T(0), m = V;
|
|
7239
7239
|
}
|
|
7240
7240
|
if (d.push(m), S.id !== ",")
|
|
7241
7241
|
break;
|
|
7242
7242
|
B(",");
|
|
7243
7243
|
}
|
|
7244
7244
|
return B("]", !0), this.expressions = d, this.type = "unary", this;
|
|
7245
|
-
}),
|
|
7245
|
+
}), z("[", f["["], function(d) {
|
|
7246
7246
|
if (S.id === "]") {
|
|
7247
7247
|
for (var m = d; m && m.type === "binary" && m.value === "["; )
|
|
7248
7248
|
m = m.lhs;
|
|
7249
7249
|
return m.keepArray = !0, B("]"), d;
|
|
7250
7250
|
} else
|
|
7251
|
-
return this.lhs = d, this.rhs =
|
|
7252
|
-
}),
|
|
7251
|
+
return this.lhs = d, this.rhs = T(f["]"]), this.type = "binary", B("]", !0), this;
|
|
7252
|
+
}), z("^", f["^"], function(d) {
|
|
7253
7253
|
B("(");
|
|
7254
7254
|
for (var m = []; ; ) {
|
|
7255
7255
|
var V = {
|
|
7256
7256
|
descending: !1
|
|
7257
7257
|
};
|
|
7258
|
-
if (S.id === "<" ? B("<") : S.id === ">" && (V.descending = !0, B(">")), V.expression =
|
|
7258
|
+
if (S.id === "<" ? B("<") : S.id === ">" && (V.descending = !0, B(">")), V.expression = T(0), m.push(V), S.id !== ",")
|
|
7259
7259
|
break;
|
|
7260
7260
|
B(",");
|
|
7261
7261
|
}
|
|
@@ -7265,42 +7265,42 @@ function Us() {
|
|
|
7265
7265
|
var m = [];
|
|
7266
7266
|
if (S.id !== "}")
|
|
7267
7267
|
for (; ; ) {
|
|
7268
|
-
var V =
|
|
7268
|
+
var V = T(0);
|
|
7269
7269
|
B(":");
|
|
7270
|
-
var de =
|
|
7270
|
+
var de = T(0);
|
|
7271
7271
|
if (m.push([V, de]), S.id !== ",")
|
|
7272
7272
|
break;
|
|
7273
7273
|
B(",");
|
|
7274
7274
|
}
|
|
7275
7275
|
return B("}", !0), typeof d > "u" ? (this.lhs = m, this.type = "unary") : (this.lhs = d, this.rhs = m, this.type = "binary"), this;
|
|
7276
7276
|
};
|
|
7277
|
-
xe("{", Te),
|
|
7277
|
+
xe("{", Te), z("{", f["{"], Te), he(":=", f[":="], function(d) {
|
|
7278
7278
|
return d.type !== "variable" ? se({
|
|
7279
7279
|
code: "S0212",
|
|
7280
7280
|
stack: new Error().stack,
|
|
7281
7281
|
position: d.position,
|
|
7282
7282
|
token: d.value
|
|
7283
|
-
}) : (this.lhs = d, this.rhs =
|
|
7284
|
-
}),
|
|
7285
|
-
return this.lhs = d, this.rhs =
|
|
7283
|
+
}) : (this.lhs = d, this.rhs = T(f[":="] - 1), this.type = "binary", this);
|
|
7284
|
+
}), z("@", f["@"], function(d) {
|
|
7285
|
+
return this.lhs = d, this.rhs = T(f["@"]), this.rhs.type !== "variable" ? se({
|
|
7286
7286
|
code: "S0214",
|
|
7287
7287
|
stack: new Error().stack,
|
|
7288
7288
|
position: this.rhs.position,
|
|
7289
7289
|
token: "@"
|
|
7290
7290
|
}) : (this.type = "binary", this);
|
|
7291
|
-
}),
|
|
7292
|
-
return this.lhs = d, this.rhs =
|
|
7291
|
+
}), z("#", f["#"], function(d) {
|
|
7292
|
+
return this.lhs = d, this.rhs = T(f["#"]), this.rhs.type !== "variable" ? se({
|
|
7293
7293
|
code: "S0214",
|
|
7294
7294
|
stack: new Error().stack,
|
|
7295
7295
|
position: this.rhs.position,
|
|
7296
7296
|
token: "#"
|
|
7297
7297
|
}) : (this.type = "binary", this);
|
|
7298
|
-
}),
|
|
7299
|
-
return this.type = "condition", this.condition = d, this.then =
|
|
7300
|
-
}),
|
|
7301
|
-
return this.type = "condition", this.condition = d, this.then = d, this.else =
|
|
7298
|
+
}), z("?", f["?"], function(d) {
|
|
7299
|
+
return this.type = "condition", this.condition = d, this.then = T(0), S.id === ":" && (B(":"), this.else = T(0)), this;
|
|
7300
|
+
}), z("?:", f["?:"], function(d) {
|
|
7301
|
+
return this.type = "condition", this.condition = d, this.then = d, this.else = T(0), this;
|
|
7302
7302
|
}), xe("|", function() {
|
|
7303
|
-
return this.type = "transform", this.pattern =
|
|
7303
|
+
return this.type = "transform", this.pattern = T(0), B("|"), this.update = T(0), S.id === "," && (B(","), this.delete = T(0)), B("|"), this;
|
|
7304
7304
|
});
|
|
7305
7305
|
var Ae = function(d) {
|
|
7306
7306
|
var m;
|
|
@@ -7315,7 +7315,7 @@ function Us() {
|
|
|
7315
7315
|
} else
|
|
7316
7316
|
m = d;
|
|
7317
7317
|
return m;
|
|
7318
|
-
}, ve = 0,
|
|
7318
|
+
}, ve = 0, Me = 0, et = [], _e = function(d, m) {
|
|
7319
7319
|
switch (d.type) {
|
|
7320
7320
|
case "name":
|
|
7321
7321
|
case "wildcard":
|
|
@@ -7349,8 +7349,8 @@ function Us() {
|
|
|
7349
7349
|
}, tt = function(d) {
|
|
7350
7350
|
var m = d.steps.length - 1, V = d.steps[m], de = typeof V.seekingParent < "u" ? V.seekingParent : [];
|
|
7351
7351
|
V.type === "parent" && de.push(V.slot);
|
|
7352
|
-
for (var
|
|
7353
|
-
var Ee = de[
|
|
7352
|
+
for (var Ne = 0; Ne < de.length; Ne++) {
|
|
7353
|
+
var Ee = de[Ne];
|
|
7354
7354
|
for (m = d.steps.length - 2; Ee.level > 0; ) {
|
|
7355
7355
|
if (m < 0) {
|
|
7356
7356
|
typeof d.seekingParent > "u" ? d.seekingParent = [Ee] : d.seekingParent.push(Ee);
|
|
@@ -7384,8 +7384,8 @@ function Us() {
|
|
|
7384
7384
|
}), m.steps.filter(function(F) {
|
|
7385
7385
|
return F.keepArray === !0;
|
|
7386
7386
|
}).length > 0 && (m.keepSingletonArray = !0);
|
|
7387
|
-
var
|
|
7388
|
-
|
|
7387
|
+
var Ne = m.steps[0];
|
|
7388
|
+
Ne.type === "unary" && Ne.value === "[" && (Ne.consarray = !0);
|
|
7389
7389
|
var Ee = m.steps[m.steps.length - 1];
|
|
7390
7390
|
Ee.type === "unary" && Ee.value === "[" && (Ee.consarray = !0), tt(m);
|
|
7391
7391
|
break;
|
|
@@ -7501,7 +7501,7 @@ function Us() {
|
|
|
7501
7501
|
m = { type: "path", steps: [d] }, d.keepArray && (m.keepSingletonArray = !0);
|
|
7502
7502
|
break;
|
|
7503
7503
|
case "parent":
|
|
7504
|
-
m = { type: "parent", slot: { label: "!" + ve++, level: 1, index:
|
|
7504
|
+
m = { type: "parent", slot: { label: "!" + ve++, level: 1, index: Me++ } }, et.push(m);
|
|
7505
7505
|
break;
|
|
7506
7506
|
case "string":
|
|
7507
7507
|
case "number":
|
|
@@ -7543,7 +7543,7 @@ function Us() {
|
|
|
7543
7543
|
return d.keepArray && (m.keepArray = !0), m;
|
|
7544
7544
|
};
|
|
7545
7545
|
I = k(D), B();
|
|
7546
|
-
var
|
|
7546
|
+
var Ue = T(0);
|
|
7547
7547
|
if (S.id !== "(end)") {
|
|
7548
7548
|
var st = {
|
|
7549
7549
|
code: "S0201",
|
|
@@ -7552,13 +7552,13 @@ function Us() {
|
|
|
7552
7552
|
};
|
|
7553
7553
|
se(st);
|
|
7554
7554
|
}
|
|
7555
|
-
if (
|
|
7555
|
+
if (Ue = ie(Ue), Ue.type === "parent" || typeof Ue.seekingParent < "u")
|
|
7556
7556
|
throw {
|
|
7557
7557
|
code: "S0217",
|
|
7558
|
-
token:
|
|
7559
|
-
position:
|
|
7558
|
+
token: Ue.type,
|
|
7559
|
+
position: Ue.position
|
|
7560
7560
|
};
|
|
7561
|
-
return Q.length > 0 && (
|
|
7561
|
+
return Q.length > 0 && (Ue.errors = Q), Ue;
|
|
7562
7562
|
};
|
|
7563
7563
|
return M;
|
|
7564
7564
|
})();
|
|
@@ -7581,9 +7581,9 @@ function Us() {
|
|
|
7581
7581
|
break;
|
|
7582
7582
|
var ae = function() {
|
|
7583
7583
|
D.push(x), S = x, x = {};
|
|
7584
|
-
}, Q = function(
|
|
7585
|
-
for (var Ae = 1, ve = he; ve <
|
|
7586
|
-
if (ve++, I =
|
|
7584
|
+
}, Q = function(z, he, xe, Te) {
|
|
7585
|
+
for (var Ae = 1, ve = he; ve < z.length; )
|
|
7586
|
+
if (ve++, I = z.charAt(ve), I === Te) {
|
|
7587
7587
|
if (Ae--, Ae === 0)
|
|
7588
7588
|
break;
|
|
7589
7589
|
} else I === xe && Ae++;
|
|
@@ -7649,14 +7649,14 @@ function Us() {
|
|
|
7649
7649
|
}
|
|
7650
7650
|
M++;
|
|
7651
7651
|
}
|
|
7652
|
-
var se = "^" + D.map(function(
|
|
7653
|
-
return "(" +
|
|
7654
|
-
}).join("") + "$", B = new RegExp(se),
|
|
7652
|
+
var se = "^" + D.map(function(z) {
|
|
7653
|
+
return "(" + z.regex + ")";
|
|
7654
|
+
}).join("") + "$", B = new RegExp(se), T = function(z) {
|
|
7655
7655
|
var he;
|
|
7656
|
-
if (i.isFunction(
|
|
7656
|
+
if (i.isFunction(z))
|
|
7657
7657
|
he = "f";
|
|
7658
7658
|
else {
|
|
7659
|
-
var xe = typeof
|
|
7659
|
+
var xe = typeof z;
|
|
7660
7660
|
switch (xe) {
|
|
7661
7661
|
case "string":
|
|
7662
7662
|
he = "s";
|
|
@@ -7668,7 +7668,7 @@ function Us() {
|
|
|
7668
7668
|
he = "b";
|
|
7669
7669
|
break;
|
|
7670
7670
|
case "object":
|
|
7671
|
-
|
|
7671
|
+
z === null ? he = "l" : Array.isArray(z) ? he = "a" : he = "o";
|
|
7672
7672
|
break;
|
|
7673
7673
|
case "undefined":
|
|
7674
7674
|
default:
|
|
@@ -7676,7 +7676,7 @@ function Us() {
|
|
|
7676
7676
|
}
|
|
7677
7677
|
}
|
|
7678
7678
|
return he;
|
|
7679
|
-
}, L = function(
|
|
7679
|
+
}, L = function(z, he) {
|
|
7680
7680
|
for (var xe = "^", Te = 0, Ae = 0; Ae < D.length; Ae++) {
|
|
7681
7681
|
xe += D[Ae].regex;
|
|
7682
7682
|
var ve = he.match(xe);
|
|
@@ -7684,7 +7684,7 @@ function Us() {
|
|
|
7684
7684
|
throw {
|
|
7685
7685
|
code: "T0410",
|
|
7686
7686
|
stack: new Error().stack,
|
|
7687
|
-
value:
|
|
7687
|
+
value: z[Te],
|
|
7688
7688
|
index: Te + 1
|
|
7689
7689
|
};
|
|
7690
7690
|
Te = ve[0].length;
|
|
@@ -7692,26 +7692,26 @@ function Us() {
|
|
|
7692
7692
|
throw {
|
|
7693
7693
|
code: "T0410",
|
|
7694
7694
|
stack: new Error().stack,
|
|
7695
|
-
value:
|
|
7695
|
+
value: z[Te],
|
|
7696
7696
|
index: Te + 1
|
|
7697
7697
|
};
|
|
7698
7698
|
};
|
|
7699
7699
|
return {
|
|
7700
7700
|
definition: k,
|
|
7701
|
-
validate: function(
|
|
7701
|
+
validate: function(z, he) {
|
|
7702
7702
|
var xe = "";
|
|
7703
|
-
|
|
7704
|
-
xe +=
|
|
7703
|
+
z.forEach(function(Me) {
|
|
7704
|
+
xe += T(Me);
|
|
7705
7705
|
});
|
|
7706
7706
|
var Te = B.exec(xe);
|
|
7707
7707
|
if (Te) {
|
|
7708
7708
|
var Ae = [], ve = 0;
|
|
7709
|
-
return D.forEach(function(
|
|
7710
|
-
var _e =
|
|
7709
|
+
return D.forEach(function(Me, et) {
|
|
7710
|
+
var _e = z[ve], fe = Te[et + 1];
|
|
7711
7711
|
if (fe === "")
|
|
7712
|
-
if (
|
|
7713
|
-
var tt =
|
|
7714
|
-
if (
|
|
7712
|
+
if (Me.context && Me.contextRegex) {
|
|
7713
|
+
var tt = T(he);
|
|
7714
|
+
if (Me.contextRegex.test(tt))
|
|
7715
7715
|
Ae.push(he);
|
|
7716
7716
|
else
|
|
7717
7717
|
throw {
|
|
@@ -7724,34 +7724,34 @@ function Us() {
|
|
|
7724
7724
|
Ae.push(_e), ve++;
|
|
7725
7725
|
else
|
|
7726
7726
|
fe.split("").forEach(function(ie) {
|
|
7727
|
-
if (
|
|
7727
|
+
if (Me.type === "a") {
|
|
7728
7728
|
if (ie === "m")
|
|
7729
7729
|
_e = void 0;
|
|
7730
7730
|
else {
|
|
7731
|
-
_e =
|
|
7732
|
-
var
|
|
7733
|
-
if (typeof
|
|
7734
|
-
if (ie !== "a" && fe !==
|
|
7735
|
-
|
|
7731
|
+
_e = z[ve];
|
|
7732
|
+
var Ue = !0;
|
|
7733
|
+
if (typeof Me.subtype < "u") {
|
|
7734
|
+
if (ie !== "a" && fe !== Me.subtype)
|
|
7735
|
+
Ue = !1;
|
|
7736
7736
|
else if (ie === "a" && _e.length > 0) {
|
|
7737
|
-
var st =
|
|
7738
|
-
if (st !==
|
|
7739
|
-
|
|
7737
|
+
var st = T(_e[0]);
|
|
7738
|
+
if (st !== Me.subtype.charAt(0))
|
|
7739
|
+
Ue = !1;
|
|
7740
7740
|
else {
|
|
7741
7741
|
var d = _e.filter(function(m) {
|
|
7742
|
-
return
|
|
7742
|
+
return T(m) !== st;
|
|
7743
7743
|
});
|
|
7744
|
-
|
|
7744
|
+
Ue = d.length === 0;
|
|
7745
7745
|
}
|
|
7746
7746
|
}
|
|
7747
7747
|
}
|
|
7748
|
-
if (!
|
|
7748
|
+
if (!Ue)
|
|
7749
7749
|
throw {
|
|
7750
7750
|
code: "T0412",
|
|
7751
7751
|
stack: new Error().stack,
|
|
7752
7752
|
value: _e,
|
|
7753
7753
|
index: ve + 1,
|
|
7754
|
-
type: f[
|
|
7754
|
+
type: f[Me.subtype]
|
|
7755
7755
|
};
|
|
7756
7756
|
ie !== "a" && (_e = [_e]);
|
|
7757
7757
|
}
|
|
@@ -7761,7 +7761,7 @@ function Us() {
|
|
|
7761
7761
|
});
|
|
7762
7762
|
}), Ae;
|
|
7763
7763
|
}
|
|
7764
|
-
L(
|
|
7764
|
+
L(z, xe);
|
|
7765
7765
|
}
|
|
7766
7766
|
};
|
|
7767
7767
|
}
|
|
@@ -7825,15 +7825,15 @@ function Us() {
|
|
|
7825
7825
|
return !1;
|
|
7826
7826
|
return !0;
|
|
7827
7827
|
}
|
|
7828
|
-
var
|
|
7829
|
-
if (
|
|
7828
|
+
var T = Object.getOwnPropertyNames(C), L = Object.getOwnPropertyNames(se);
|
|
7829
|
+
if (T.length !== L.length)
|
|
7830
7830
|
return !1;
|
|
7831
|
-
for (
|
|
7832
|
-
if (
|
|
7831
|
+
for (T = T.sort(), L = L.sort(), B = 0; B < T.length; B++)
|
|
7832
|
+
if (T[B] !== L[B])
|
|
7833
7833
|
return !1;
|
|
7834
|
-
for (B = 0; B <
|
|
7835
|
-
var
|
|
7836
|
-
if (!Q(C[
|
|
7834
|
+
for (B = 0; B < T.length; B++) {
|
|
7835
|
+
var z = T[B];
|
|
7836
|
+
if (!Q(C[z], se[z]))
|
|
7837
7837
|
return !1;
|
|
7838
7838
|
}
|
|
7839
7839
|
return !0;
|
|
@@ -7870,10 +7870,10 @@ function Us() {
|
|
|
7870
7870
|
})(Cr)), Cr.exports;
|
|
7871
7871
|
}
|
|
7872
7872
|
var $s = Us();
|
|
7873
|
-
const Ls = /* @__PURE__ */ Fs($s), xn =
|
|
7874
|
-
name:
|
|
7875
|
-
sourceData:
|
|
7876
|
-
expression:
|
|
7873
|
+
const Ls = /* @__PURE__ */ Fs($s), xn = E.object({
|
|
7874
|
+
name: E.literal("transform-data"),
|
|
7875
|
+
sourceData: E.any().optional(),
|
|
7876
|
+
expression: E.string().min(1, "JSONata expression is required")
|
|
7877
7877
|
});
|
|
7878
7878
|
function Bs(r) {
|
|
7879
7879
|
return xn.parse(r);
|
|
@@ -7908,20 +7908,20 @@ async function Zs(r) {
|
|
|
7908
7908
|
};
|
|
7909
7909
|
}
|
|
7910
7910
|
}
|
|
7911
|
-
const _n =
|
|
7912
|
-
name:
|
|
7913
|
-
data:
|
|
7914
|
-
format:
|
|
7915
|
-
filename:
|
|
7916
|
-
csvOptions:
|
|
7917
|
-
delimiter:
|
|
7918
|
-
includeHeaders:
|
|
7911
|
+
const _n = E.object({
|
|
7912
|
+
name: E.literal("export-data"),
|
|
7913
|
+
data: E.any(),
|
|
7914
|
+
format: E.enum(["json", "csv", "xlsx"]),
|
|
7915
|
+
filename: E.string().optional(),
|
|
7916
|
+
csvOptions: E.object({
|
|
7917
|
+
delimiter: E.string().optional(),
|
|
7918
|
+
includeHeaders: E.boolean().optional()
|
|
7919
7919
|
}).optional()
|
|
7920
7920
|
});
|
|
7921
|
-
function
|
|
7921
|
+
function Ws(r) {
|
|
7922
7922
|
return _n.parse(r);
|
|
7923
7923
|
}
|
|
7924
|
-
async function
|
|
7924
|
+
async function zs(r) {
|
|
7925
7925
|
try {
|
|
7926
7926
|
const { data: e, format: t, filename: a, csvOptions: s } = r;
|
|
7927
7927
|
console.log("[ExportDataBlock] Sending export request to background:", t);
|
|
@@ -7949,22 +7949,26 @@ async function Ws(r) {
|
|
|
7949
7949
|
};
|
|
7950
7950
|
}
|
|
7951
7951
|
}
|
|
7952
|
-
const En =
|
|
7953
|
-
name:
|
|
7954
|
-
urlPattern:
|
|
7955
|
-
method:
|
|
7956
|
-
status:
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
min:
|
|
7960
|
-
max:
|
|
7952
|
+
const En = E.object({
|
|
7953
|
+
name: E.literal("network-catch"),
|
|
7954
|
+
urlPattern: E.string().optional(),
|
|
7955
|
+
method: E.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).optional(),
|
|
7956
|
+
status: E.union([
|
|
7957
|
+
E.number(),
|
|
7958
|
+
E.object({
|
|
7959
|
+
min: E.number().optional(),
|
|
7960
|
+
max: E.number().optional()
|
|
7961
7961
|
})
|
|
7962
7962
|
]).optional(),
|
|
7963
|
-
mimeType:
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7963
|
+
mimeType: E.string().optional(),
|
|
7964
|
+
requestBodyPattern: E.union([
|
|
7965
|
+
E.string(),
|
|
7966
|
+
E.record(E.any())
|
|
7967
|
+
]).optional(),
|
|
7968
|
+
waitForRequest: E.boolean().optional(),
|
|
7969
|
+
waitTimeout: E.number().min(0).optional(),
|
|
7970
|
+
returnAll: E.boolean().optional(),
|
|
7971
|
+
includeHeaders: E.boolean().optional()
|
|
7968
7972
|
});
|
|
7969
7973
|
function Vs(r) {
|
|
7970
7974
|
return En.parse(r);
|
|
@@ -7979,6 +7983,7 @@ async function qs(r) {
|
|
|
7979
7983
|
method: r.method,
|
|
7980
7984
|
status: r.status,
|
|
7981
7985
|
mimeType: r.mimeType,
|
|
7986
|
+
requestBodyPattern: r.requestBodyPattern,
|
|
7982
7987
|
waitForRequest: r.waitForRequest || !1,
|
|
7983
7988
|
waitTimeout: r.waitTimeout || 5e3,
|
|
7984
7989
|
returnAll: r.returnAll || !1,
|
|
@@ -7999,7 +8004,7 @@ async function qs(r) {
|
|
|
7999
8004
|
};
|
|
8000
8005
|
}
|
|
8001
8006
|
}
|
|
8002
|
-
const
|
|
8007
|
+
const ai = {
|
|
8003
8008
|
"get-text": sn,
|
|
8004
8009
|
"attribute-value": cn,
|
|
8005
8010
|
"get-value-form": un,
|
|
@@ -8020,7 +8025,7 @@ const ni = {
|
|
|
8020
8025
|
"export-data": _n,
|
|
8021
8026
|
"network-catch": En
|
|
8022
8027
|
};
|
|
8023
|
-
class
|
|
8028
|
+
class si {
|
|
8024
8029
|
// Implementation
|
|
8025
8030
|
static async executeBlock(e) {
|
|
8026
8031
|
try {
|
|
@@ -8094,8 +8099,8 @@ class ai {
|
|
|
8094
8099
|
return await Zs(t);
|
|
8095
8100
|
}
|
|
8096
8101
|
case "export-data": {
|
|
8097
|
-
const t =
|
|
8098
|
-
return await
|
|
8102
|
+
const t = Ws(e);
|
|
8103
|
+
return await zs(t);
|
|
8099
8104
|
}
|
|
8100
8105
|
case "network-catch": {
|
|
8101
8106
|
const t = Vs(e);
|
|
@@ -8117,20 +8122,20 @@ class ai {
|
|
|
8117
8122
|
}
|
|
8118
8123
|
}
|
|
8119
8124
|
}
|
|
8120
|
-
class
|
|
8125
|
+
class ii {
|
|
8121
8126
|
constructor() {
|
|
8122
8127
|
ue(this, "expr");
|
|
8123
8128
|
ue(this, "json");
|
|
8124
8129
|
}
|
|
8125
8130
|
}
|
|
8126
|
-
class
|
|
8131
|
+
class oi {
|
|
8127
8132
|
constructor() {
|
|
8128
8133
|
ue(this, "template");
|
|
8129
8134
|
ue(this, "valueFrom");
|
|
8130
8135
|
ue(this, "default");
|
|
8131
8136
|
}
|
|
8132
8137
|
}
|
|
8133
|
-
class
|
|
8138
|
+
class ci {
|
|
8134
8139
|
constructor() {
|
|
8135
8140
|
ue(this, "id");
|
|
8136
8141
|
ue(this, "title");
|
|
@@ -8148,7 +8153,7 @@ class oi {
|
|
|
8148
8153
|
ue(this, "delayAfterMs");
|
|
8149
8154
|
}
|
|
8150
8155
|
}
|
|
8151
|
-
class
|
|
8156
|
+
class ui {
|
|
8152
8157
|
constructor() {
|
|
8153
8158
|
ue(this, "version");
|
|
8154
8159
|
ue(this, "id");
|
|
@@ -8161,7 +8166,7 @@ class ci {
|
|
|
8161
8166
|
ue(this, "defaultDelayMs");
|
|
8162
8167
|
}
|
|
8163
8168
|
}
|
|
8164
|
-
class
|
|
8169
|
+
class li {
|
|
8165
8170
|
constructor() {
|
|
8166
8171
|
ue(this, "stepId");
|
|
8167
8172
|
ue(this, "skipped");
|
|
@@ -8173,7 +8178,7 @@ class ui {
|
|
|
8173
8178
|
ue(this, "attempts");
|
|
8174
8179
|
}
|
|
8175
8180
|
}
|
|
8176
|
-
class
|
|
8181
|
+
class fi {
|
|
8177
8182
|
constructor() {
|
|
8178
8183
|
ue(this, "success");
|
|
8179
8184
|
ue(this, "steps");
|
|
@@ -8237,25 +8242,25 @@ const Hs = {
|
|
|
8237
8242
|
description: "Formatted display text (e.g., US$57.75)"
|
|
8238
8243
|
}
|
|
8239
8244
|
};
|
|
8240
|
-
class
|
|
8245
|
+
class ct extends Error {
|
|
8241
8246
|
constructor(e, t, a) {
|
|
8242
8247
|
super(e), this.code = t, this.details = a, this.name = "EightGError";
|
|
8243
8248
|
}
|
|
8244
8249
|
static extensionNotInstalled() {
|
|
8245
|
-
return new
|
|
8250
|
+
return new ct(
|
|
8246
8251
|
"8G Extension is not installed or not responding",
|
|
8247
8252
|
"EXTENSION_NOT_FOUND"
|
|
8248
8253
|
);
|
|
8249
8254
|
}
|
|
8250
8255
|
static invalidRequest(e) {
|
|
8251
|
-
return new
|
|
8256
|
+
return new ct(`Invalid request: ${e}`, "INVALID_REQUEST");
|
|
8252
8257
|
}
|
|
8253
8258
|
static collectionFailed(e) {
|
|
8254
|
-
return new
|
|
8259
|
+
return new ct(`Data collection failed: ${e}`, "COLLECTION_FAILED");
|
|
8255
8260
|
}
|
|
8256
8261
|
static requestTimeout(e = 6e5) {
|
|
8257
8262
|
const t = Math.floor(e / 1e3);
|
|
8258
|
-
return new
|
|
8263
|
+
return new ct(
|
|
8259
8264
|
`Request timeout - Extension did not respond within ${t} seconds`,
|
|
8260
8265
|
"REQUEST_TIMEOUT"
|
|
8261
8266
|
);
|
|
@@ -8264,37 +8269,52 @@ class lt extends Error {
|
|
|
8264
8269
|
function Gs(r) {
|
|
8265
8270
|
return r && r.type === "8G_EXTENSION_RESPONSE";
|
|
8266
8271
|
}
|
|
8267
|
-
const Ys =
|
|
8272
|
+
const Ys = At({
|
|
8268
8273
|
// 워크스페이스를 구분할 수 있는 구분자, ex) slug 같은 것들 01republic
|
|
8269
|
-
id:
|
|
8274
|
+
id: Pe(),
|
|
8270
8275
|
// 워크스페이스 이름
|
|
8271
|
-
name:
|
|
8276
|
+
name: Pe(),
|
|
8272
8277
|
// 워크스페이스의 프로필 이미지
|
|
8273
|
-
image:
|
|
8278
|
+
image: Pe(),
|
|
8274
8279
|
// member 수
|
|
8275
8280
|
memberCount: Lt(),
|
|
8276
8281
|
// 관리자 여부
|
|
8277
8282
|
isAdmin: Tt().nullable().optional()
|
|
8283
|
+
}), Ks = At({
|
|
8284
|
+
// 워크스페이스를 구분할 수 있는 구분자, ex) slug 같은 것들 01republic
|
|
8285
|
+
slug: Pe(),
|
|
8286
|
+
// 워크스페이스 이름
|
|
8287
|
+
displayName: Pe(),
|
|
8288
|
+
// 워크스페이스의 프로필 이미지
|
|
8289
|
+
profileImageUrl: Pe(),
|
|
8290
|
+
// 설명
|
|
8291
|
+
description: Pe(),
|
|
8292
|
+
// 공개 이메일
|
|
8293
|
+
publicEmail: Pe(),
|
|
8294
|
+
// 결제 이메일
|
|
8295
|
+
billingEmail: Pe(),
|
|
8296
|
+
// 조직 메인 페이지 URL
|
|
8297
|
+
orgPageUrl: Pe()
|
|
8278
8298
|
});
|
|
8279
8299
|
var Tn = /* @__PURE__ */ ((r) => (r.monthly = "MONTHLY", r.yearly = "YEARLY", r))(Tn || {});
|
|
8280
|
-
const Ur =
|
|
8300
|
+
const Ur = At({
|
|
8281
8301
|
// 통화 코드
|
|
8282
8302
|
code: Br(Zr),
|
|
8283
8303
|
// 통화 기호
|
|
8284
|
-
symbol:
|
|
8304
|
+
symbol: Pe(),
|
|
8285
8305
|
// 통화 표시 형식
|
|
8286
|
-
format:
|
|
8306
|
+
format: Pe(),
|
|
8287
8307
|
// 실제 금액
|
|
8288
8308
|
amount: Lt(),
|
|
8289
8309
|
// 표시용 텍스트 (optional, 예: "US$57.75")
|
|
8290
|
-
text:
|
|
8291
|
-
}),
|
|
8310
|
+
text: Pe().optional()
|
|
8311
|
+
}), Js = At({
|
|
8292
8312
|
// 플랜 이름
|
|
8293
|
-
planName:
|
|
8313
|
+
planName: Pe(),
|
|
8294
8314
|
// 현재 주기 결제 금액
|
|
8295
8315
|
currentCycleBillAmount: Ur,
|
|
8296
8316
|
// 다음 결제 예정일
|
|
8297
|
-
nextPaymentDue:
|
|
8317
|
+
nextPaymentDue: Pe(),
|
|
8298
8318
|
// 주기 단위
|
|
8299
8319
|
cycleTerm: Br(Tn).nullable(),
|
|
8300
8320
|
// 무료 티어 여부
|
|
@@ -8308,9 +8328,9 @@ const Ur = Rt({
|
|
|
8308
8328
|
// 단위 가격
|
|
8309
8329
|
unitPrice: Ur.nullable(),
|
|
8310
8330
|
// 카드 번호
|
|
8311
|
-
cardNumber:
|
|
8331
|
+
cardNumber: Pe(),
|
|
8312
8332
|
// 카드 이름
|
|
8313
|
-
cardName:
|
|
8333
|
+
cardName: Pe()
|
|
8314
8334
|
/*
|
|
8315
8335
|
카드 정보 추가
|
|
8316
8336
|
number4: string;
|
|
@@ -8320,43 +8340,43 @@ const Ur = Rt({
|
|
|
8320
8340
|
isPersonal: boolean; // 추가 정보 <- 필수 추가 정보
|
|
8321
8341
|
isCreditCard: boolean; // 추가 정보 <- 필수 추가 정보
|
|
8322
8342
|
|
|
8323
|
-
optional 하게
|
|
8343
|
+
optional 하게
|
|
8324
8344
|
cardNumber: string -> 전체
|
|
8325
8345
|
name : 가져온거
|
|
8326
8346
|
유효기간(나중에 컬럼명 찾아서 수정)
|
|
8327
8347
|
소지자
|
|
8328
8348
|
비고
|
|
8329
8349
|
*/
|
|
8330
|
-
}),
|
|
8350
|
+
}), Xs = At({
|
|
8331
8351
|
// 결제 이력 고유 아이디
|
|
8332
|
-
uid:
|
|
8352
|
+
uid: Pe(),
|
|
8333
8353
|
// 결제 일자
|
|
8334
8354
|
issuedDate: Fr.date(),
|
|
8335
8355
|
// 결제 완료 일자
|
|
8336
8356
|
paidDate: Fr.date().nullable().optional(),
|
|
8337
8357
|
// 결제 방법
|
|
8338
|
-
paymentMethod:
|
|
8358
|
+
paymentMethod: Pe(),
|
|
8339
8359
|
// 결제 금액
|
|
8340
8360
|
amount: Ur,
|
|
8341
8361
|
// 결제 성공 여부
|
|
8342
8362
|
isSuccessfulPaid: Tt(),
|
|
8343
8363
|
// 결제 영수증 링크
|
|
8344
|
-
receiptUrl:
|
|
8345
|
-
}),
|
|
8364
|
+
receiptUrl: Pe()
|
|
8365
|
+
}), Qs = At({
|
|
8346
8366
|
// 멤버 이름
|
|
8347
|
-
name:
|
|
8367
|
+
name: Pe(),
|
|
8348
8368
|
// 멤버 이메일
|
|
8349
|
-
email:
|
|
8369
|
+
email: Pe().email(),
|
|
8350
8370
|
// 멤버 프로필 이미지 링크
|
|
8351
|
-
profileImageUrl:
|
|
8371
|
+
profileImageUrl: Pe(),
|
|
8352
8372
|
// 멤버 역할
|
|
8353
|
-
role:
|
|
8373
|
+
role: Pe(),
|
|
8354
8374
|
// 멤버 결제 여부
|
|
8355
8375
|
isPaid: Tt().nullable().optional(),
|
|
8356
8376
|
// 멤버 구독 좌석 상태
|
|
8357
8377
|
subscriptionSeatStatus: Lr(["FREE", "PAID"]).nullable().optional()
|
|
8358
8378
|
});
|
|
8359
|
-
class
|
|
8379
|
+
class di {
|
|
8360
8380
|
constructor() {
|
|
8361
8381
|
}
|
|
8362
8382
|
/**
|
|
@@ -8365,7 +8385,7 @@ class fi {
|
|
|
8365
8385
|
async checkExtension() {
|
|
8366
8386
|
return new Promise((e, t) => {
|
|
8367
8387
|
const a = setTimeout(() => {
|
|
8368
|
-
t(
|
|
8388
|
+
t(ct.extensionNotInstalled());
|
|
8369
8389
|
}, 5e3), s = (i) => {
|
|
8370
8390
|
Gs(i.data) && (clearTimeout(a), window.removeEventListener("message", s), e(i.data));
|
|
8371
8391
|
};
|
|
@@ -8378,7 +8398,7 @@ class fi {
|
|
|
8378
8398
|
async collectWorkflow(e) {
|
|
8379
8399
|
return new Promise((t, a) => {
|
|
8380
8400
|
const s = `8g_wf_${Date.now()}_${Math.random()}`, i = e.timeoutMs ?? 6e5, c = setTimeout(() => {
|
|
8381
|
-
a(
|
|
8401
|
+
a(ct.requestTimeout(i));
|
|
8382
8402
|
}, i), f = (w) => {
|
|
8383
8403
|
var k, M, D, x, S, I, ae;
|
|
8384
8404
|
if (((k = w.data) == null ? void 0 : k.type) === "8G_COLLECT_RESPONSE" && w.data.requestId === s) {
|
|
@@ -8394,21 +8414,24 @@ class fi {
|
|
|
8394
8414
|
});
|
|
8395
8415
|
}
|
|
8396
8416
|
};
|
|
8397
|
-
window.addEventListener("message", f), window.postMessage(
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8417
|
+
window.addEventListener("message", f), window.postMessage(
|
|
8418
|
+
{
|
|
8419
|
+
type: "8G_COLLECT_WORKFLOW",
|
|
8420
|
+
requestId: s,
|
|
8421
|
+
targetUrl: e.targetUrl,
|
|
8422
|
+
workflow: e.workflow,
|
|
8423
|
+
closeTabAfterCollection: e.closeTabAfterCollection !== !1,
|
|
8424
|
+
activateTab: e.activateTab === !0
|
|
8425
|
+
},
|
|
8426
|
+
"*"
|
|
8427
|
+
);
|
|
8405
8428
|
});
|
|
8406
8429
|
}
|
|
8407
8430
|
async getWorkspaces(e) {
|
|
8408
8431
|
var i, c;
|
|
8409
8432
|
const t = await this.collectWorkflow(e);
|
|
8410
8433
|
if (!t.success)
|
|
8411
|
-
throw new
|
|
8434
|
+
throw new ct("Failed to get workspaces", "GET_WORKSPACES_FAILED");
|
|
8412
8435
|
const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
|
|
8413
8436
|
if (!a || !Array.isArray(a))
|
|
8414
8437
|
return {
|
|
@@ -8427,6 +8450,22 @@ class fi {
|
|
|
8427
8450
|
isSuccess: !0
|
|
8428
8451
|
};
|
|
8429
8452
|
}
|
|
8453
|
+
// 워크스페이스 상세
|
|
8454
|
+
async getWorkspaceDetail(e) {
|
|
8455
|
+
var i, c;
|
|
8456
|
+
const t = await this.collectWorkflow(e);
|
|
8457
|
+
if (!t.success)
|
|
8458
|
+
throw new ct("Failed to get workspaces", "GET_WORKSPACES_FAILED");
|
|
8459
|
+
const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
|
|
8460
|
+
if (!a)
|
|
8461
|
+
return { ...t };
|
|
8462
|
+
const s = Ks.safeParse(a);
|
|
8463
|
+
if (s.success) {
|
|
8464
|
+
const f = s.data;
|
|
8465
|
+
return { ...t, data: f };
|
|
8466
|
+
} else
|
|
8467
|
+
return console.warn("Invalid workspace detail data:", a, s.error), { ...t, data: void 0 };
|
|
8468
|
+
}
|
|
8430
8469
|
// 플랜, 결제주기
|
|
8431
8470
|
async getWorkspacePlanAndCycle(e, t) {
|
|
8432
8471
|
var c, f;
|
|
@@ -8436,16 +8475,19 @@ class fi {
|
|
|
8436
8475
|
};
|
|
8437
8476
|
const a = await this.collectWorkflow(t);
|
|
8438
8477
|
if (!a.success)
|
|
8439
|
-
throw new
|
|
8478
|
+
throw new ct(
|
|
8479
|
+
"Failed to get workspace plan and cycle",
|
|
8480
|
+
"GET_WORKSPACE_PLAN_AND_CYCLE_FAILED"
|
|
8481
|
+
);
|
|
8440
8482
|
const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
|
|
8441
8483
|
if (!s)
|
|
8442
8484
|
return { ...a };
|
|
8443
|
-
const i =
|
|
8485
|
+
const i = Js.safeParse(s);
|
|
8444
8486
|
if (i.success) {
|
|
8445
8487
|
const w = i.data;
|
|
8446
|
-
return { ...a,
|
|
8488
|
+
return { ...a, data: w };
|
|
8447
8489
|
} else
|
|
8448
|
-
return console.warn("Invalid workspace billing data:", s, i.error), { ...a };
|
|
8490
|
+
return console.warn("Invalid workspace billing data:", s, i.error), { ...a, data: void 0 };
|
|
8449
8491
|
}
|
|
8450
8492
|
// 결제내역
|
|
8451
8493
|
async getWorkspaceBillingHistories(e, t) {
|
|
@@ -8456,13 +8498,16 @@ class fi {
|
|
|
8456
8498
|
};
|
|
8457
8499
|
const a = await this.collectWorkflow(t);
|
|
8458
8500
|
if (!a.success)
|
|
8459
|
-
throw new
|
|
8501
|
+
throw new ct(
|
|
8502
|
+
"Failed to get workspace billing histories",
|
|
8503
|
+
"GET_WORKSPACE_BILLING_HISTORIES_FAILED"
|
|
8504
|
+
);
|
|
8460
8505
|
const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
|
|
8461
8506
|
if (!s || !Array.isArray(s))
|
|
8462
8507
|
return { ...a, data: [] };
|
|
8463
8508
|
const i = [];
|
|
8464
8509
|
for (const w of s) {
|
|
8465
|
-
const k =
|
|
8510
|
+
const k = Xs.safeParse(w);
|
|
8466
8511
|
k.success ? i.push(k.data) : console.warn("Invalid workspace billing history data:", w, k.error);
|
|
8467
8512
|
}
|
|
8468
8513
|
return { ...a, data: i };
|
|
@@ -8476,13 +8521,13 @@ class fi {
|
|
|
8476
8521
|
};
|
|
8477
8522
|
const a = await this.collectWorkflow(t);
|
|
8478
8523
|
if (!a.success)
|
|
8479
|
-
throw new
|
|
8524
|
+
throw new ct("Failed to get workspace members", "GET_WORKSPACE_MEMBERS_FAILED");
|
|
8480
8525
|
const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
|
|
8481
8526
|
if (!s || !Array.isArray(s))
|
|
8482
8527
|
return { ...a, data: [] };
|
|
8483
8528
|
const i = [];
|
|
8484
8529
|
for (const w of s) {
|
|
8485
|
-
const k =
|
|
8530
|
+
const k = Qs.safeParse(w);
|
|
8486
8531
|
k.success ? i.push(k.data) : console.warn("Invalid workspace member data:", w, k.error);
|
|
8487
8532
|
}
|
|
8488
8533
|
return { ...a, data: i };
|
|
@@ -8510,18 +8555,18 @@ class fi {
|
|
|
8510
8555
|
}
|
|
8511
8556
|
export {
|
|
8512
8557
|
an as AiParseDataBlockSchema,
|
|
8513
|
-
|
|
8558
|
+
ai as AllBlockSchemas,
|
|
8514
8559
|
wt as BaseBlockSchema,
|
|
8515
8560
|
Tn as BillingCycleTerm,
|
|
8516
|
-
|
|
8517
|
-
|
|
8561
|
+
oi as Binding,
|
|
8562
|
+
si as BlockHandler,
|
|
8518
8563
|
fn as ClearValueFormsBlockSchema,
|
|
8519
|
-
|
|
8520
|
-
|
|
8564
|
+
fi as CollectWorkflowResult,
|
|
8565
|
+
ii as Condition,
|
|
8521
8566
|
Zr as CurrencyCode,
|
|
8522
8567
|
Hs as CurrencyInfoSchema,
|
|
8523
|
-
|
|
8524
|
-
|
|
8568
|
+
di as EightGClient,
|
|
8569
|
+
ct as EightGError,
|
|
8525
8570
|
dn as ElementExistsBlockSchema,
|
|
8526
8571
|
hn as EventClickBlockSchema,
|
|
8527
8572
|
_n as ExportDataBlockSchema,
|
|
@@ -8534,19 +8579,19 @@ export {
|
|
|
8534
8579
|
gn as NavigateBlockSchema,
|
|
8535
8580
|
En as NetworkCatchBlockSchema,
|
|
8536
8581
|
vn as SaveAssetsBlockSchema,
|
|
8537
|
-
|
|
8582
|
+
ni as Schema,
|
|
8538
8583
|
bn as ScrollBlockSchema,
|
|
8539
8584
|
ln as SetValueFormsBlockSchema,
|
|
8540
8585
|
xn as TransformDataBlockSchema,
|
|
8541
8586
|
mn as WaitBlockSchema,
|
|
8542
8587
|
yn as WaitForConditionBlockSchema,
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8588
|
+
ui as Workflow,
|
|
8589
|
+
ci as WorkflowStep,
|
|
8590
|
+
li as WorkflowStepRunResult,
|
|
8591
|
+
Xs as WorkspaceBillingHistorySchema,
|
|
8592
|
+
Js as WorkspaceBillingSchema,
|
|
8548
8593
|
Ys as WorkspaceItemSchema,
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8594
|
+
Qs as WorkspaceMemberSchema,
|
|
8595
|
+
ri as createArraySchema,
|
|
8596
|
+
ti as createSchema
|
|
8552
8597
|
};
|