@epam/ai-dial-chat-hooks 1.1.0-dev.411 → 1.1.0-dev.413
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/catalog.js +1 -1
- package/conversation-transfer.js +1 -1
- package/index.js +4 -4
- package/package.json +15 -15
- package/skill-editor.js +2 -2
- package/{skill-manifest-CCX8s4nn.js → skill-manifest-CeG6-WSK.js} +374 -353
- package/{useConversationImport-C2h1GBY4.js → useConversationImport-M6p86dtf.js} +108 -90
- package/{useSkillFileActions-BU5PzZ_8.js → useSkillFileActions-B-VaGD20.js} +1 -1
- package/{useSkillFilePreview-Dkx9F4D-.js → useSkillFilePreview-DM3YnKr4.js} +1 -1
|
@@ -315,6 +315,7 @@ var se = class {
|
|
|
315
315
|
} });
|
|
316
316
|
}
|
|
317
317
|
resolve(e, t) {
|
|
318
|
+
if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
|
|
318
319
|
let n;
|
|
319
320
|
t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], x(e, { Node: (e, t) => {
|
|
320
321
|
(l(t) || _(t)) && n.push(t);
|
|
@@ -863,12 +864,13 @@ var Pe = "<<", R = {
|
|
|
863
864
|
stringify: () => Pe
|
|
864
865
|
}, Fe = (e, t) => (R.identify(t) || p(t) && (!t.type || t.type === A.PLAIN) && R.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === R.tag && e.default);
|
|
865
866
|
function Ie(e, t, n) {
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
else Le(e, t, n);
|
|
867
|
+
let r = Re(e, n);
|
|
868
|
+
if (m(r)) for (let n of r.items) Le(e, t, n);
|
|
869
|
+
else if (Array.isArray(r)) for (let n of r) Le(e, t, n);
|
|
870
|
+
else Le(e, t, r);
|
|
869
871
|
}
|
|
870
872
|
function Le(e, t, n) {
|
|
871
|
-
let r = e
|
|
873
|
+
let r = Re(e, n);
|
|
872
874
|
if (!d(r)) throw Error("Merge sources must be maps or map aliases");
|
|
873
875
|
let i = r.toJSON(null, e, Map);
|
|
874
876
|
for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
|
|
@@ -879,9 +881,12 @@ function Le(e, t, n) {
|
|
|
879
881
|
});
|
|
880
882
|
return t;
|
|
881
883
|
}
|
|
884
|
+
function Re(e, t) {
|
|
885
|
+
return e && l(t) ? t.resolve(e.doc, e) : t;
|
|
886
|
+
}
|
|
882
887
|
//#endregion
|
|
883
888
|
//#region ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
884
|
-
function
|
|
889
|
+
function ze(e, t, { key: n, value: r }) {
|
|
885
890
|
if (g(n) && n.addToJSMap) n.addToJSMap(e, t, r);
|
|
886
891
|
else if (Fe(e, n)) Ie(e, t, r);
|
|
887
892
|
else {
|
|
@@ -889,7 +894,7 @@ function Re(e, t, { key: n, value: r }) {
|
|
|
889
894
|
if (t instanceof Map) t.set(i, k(r, i, e));
|
|
890
895
|
else if (t instanceof Set) t.add(i);
|
|
891
896
|
else {
|
|
892
|
-
let a =
|
|
897
|
+
let a = Be(n, i, e), o = k(r, a, e);
|
|
893
898
|
a in t ? Object.defineProperty(t, a, {
|
|
894
899
|
value: o,
|
|
895
900
|
writable: !0,
|
|
@@ -900,7 +905,7 @@ function Re(e, t, { key: n, value: r }) {
|
|
|
900
905
|
}
|
|
901
906
|
return t;
|
|
902
907
|
}
|
|
903
|
-
function
|
|
908
|
+
function Be(e, t, n) {
|
|
904
909
|
if (t === null) return "";
|
|
905
910
|
if (typeof t != "object") return String(t);
|
|
906
911
|
if (g(e) && n?.doc) {
|
|
@@ -919,7 +924,7 @@ function ze(e, t, n) {
|
|
|
919
924
|
}
|
|
920
925
|
//#endregion
|
|
921
926
|
//#region ../../node_modules/yaml/browser/dist/nodes/Pair.js
|
|
922
|
-
function
|
|
927
|
+
function Ve(e, t, n) {
|
|
923
928
|
return new z(j(e, void 0, n), j(t, void 0, n));
|
|
924
929
|
}
|
|
925
930
|
var z = class e {
|
|
@@ -931,7 +936,7 @@ var z = class e {
|
|
|
931
936
|
return g(n) && (n = n.clone(t)), g(r) && (r = r.clone(t)), new e(n, r);
|
|
932
937
|
}
|
|
933
938
|
toJSON(e, t) {
|
|
934
|
-
return
|
|
939
|
+
return ze(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
|
|
935
940
|
}
|
|
936
941
|
toString(e, t, n) {
|
|
937
942
|
return e?.doc ? Me(this, e, t, n) : JSON.stringify(this);
|
|
@@ -939,20 +944,20 @@ var z = class e {
|
|
|
939
944
|
};
|
|
940
945
|
//#endregion
|
|
941
946
|
//#region ../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
942
|
-
function
|
|
943
|
-
return (t.inFlow ?? e.flow ?
|
|
947
|
+
function He(e, t, n) {
|
|
948
|
+
return (t.inFlow ?? e.flow ? We : Ue)(e, t, n);
|
|
944
949
|
}
|
|
945
|
-
function
|
|
950
|
+
function Ue({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
|
|
946
951
|
let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
|
|
947
952
|
indent: a,
|
|
948
953
|
type: null
|
|
949
954
|
}), d = !1, p = [];
|
|
950
955
|
for (let e = 0; e < t.length; ++e) {
|
|
951
956
|
let i = t[e], o = null;
|
|
952
|
-
if (g(i)) !d && i.spaceBefore && p.push(""),
|
|
957
|
+
if (g(i)) !d && i.spaceBefore && p.push(""), Ge(n, p, i.commentBefore, d), i.comment && (o = i.comment);
|
|
953
958
|
else if (f(i)) {
|
|
954
959
|
let e = g(i.key) ? i.key : null;
|
|
955
|
-
e && (!d && e.spaceBefore && p.push(""),
|
|
960
|
+
e && (!d && e.spaceBefore && p.push(""), Ge(n, p, e.commentBefore, d));
|
|
956
961
|
}
|
|
957
962
|
d = !1;
|
|
958
963
|
let s = L(i, u, () => o = null, () => d = !0);
|
|
@@ -969,7 +974,7 @@ function He({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
|
|
|
969
974
|
}
|
|
970
975
|
return e ? (m += "\n" + N(l(e), c), s && s()) : d && o && o(), m;
|
|
971
976
|
}
|
|
972
|
-
function
|
|
977
|
+
function We({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
973
978
|
let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
|
|
974
979
|
r += a;
|
|
975
980
|
let c = Object.assign({}, t, {
|
|
@@ -979,10 +984,10 @@ function Ue({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
979
984
|
}), l = !1, u = 0, d = [];
|
|
980
985
|
for (let n = 0; n < e.length; ++n) {
|
|
981
986
|
let i = e[n], a = null;
|
|
982
|
-
if (g(i)) i.spaceBefore && d.push(""),
|
|
987
|
+
if (g(i)) i.spaceBefore && d.push(""), Ge(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
|
|
983
988
|
else if (f(i)) {
|
|
984
989
|
let e = g(i.key) ? i.key : null;
|
|
985
|
-
e && (e.spaceBefore && d.push(""),
|
|
990
|
+
e && (e.spaceBefore && d.push(""), Ge(t, d, e.commentBefore, !1), e.comment && (l = !0));
|
|
986
991
|
let n = g(i.value) ? i.value : null;
|
|
987
992
|
n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
|
|
988
993
|
}
|
|
@@ -1002,7 +1007,7 @@ function Ue({ items: e }, t, { flowChars: n, itemIndent: r }) {
|
|
|
1002
1007
|
return `${e}\n${i}${m}`;
|
|
1003
1008
|
} else return `${p}${o}${d.join(" ")}${o}${m}`;
|
|
1004
1009
|
}
|
|
1005
|
-
function
|
|
1010
|
+
function Ge({ indent: e, options: { commentString: t } }, n, r, i) {
|
|
1006
1011
|
if (r && i && (r = r.replace(/^\n+/, "")), r) {
|
|
1007
1012
|
let i = N(t(r), e);
|
|
1008
1013
|
n.push(i.trimStart());
|
|
@@ -1025,7 +1030,7 @@ var V = class extends me {
|
|
|
1025
1030
|
let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
|
|
1026
1031
|
if (typeof i == "function") o = i.call(t, e, o);
|
|
1027
1032
|
else if (Array.isArray(i) && !i.includes(e)) return;
|
|
1028
|
-
(o !== void 0 || r) && a.items.push(
|
|
1033
|
+
(o !== void 0 || r) && a.items.push(Ve(e, o, n));
|
|
1029
1034
|
};
|
|
1030
1035
|
if (t instanceof Map) for (let [e, n] of t) o(e, n);
|
|
1031
1036
|
else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
|
|
@@ -1060,13 +1065,13 @@ var V = class extends me {
|
|
|
1060
1065
|
toJSON(e, t, n) {
|
|
1061
1066
|
let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
1062
1067
|
t?.onCreate && t.onCreate(r);
|
|
1063
|
-
for (let e of this.items)
|
|
1068
|
+
for (let e of this.items) ze(t, r, e);
|
|
1064
1069
|
return r;
|
|
1065
1070
|
}
|
|
1066
1071
|
toString(e, t, n) {
|
|
1067
1072
|
if (!e) return JSON.stringify(this);
|
|
1068
1073
|
for (let e of this.items) if (!f(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
|
|
1069
|
-
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })),
|
|
1074
|
+
return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), He(this, e, {
|
|
1070
1075
|
blockItemPrefix: "",
|
|
1071
1076
|
flowChars: {
|
|
1072
1077
|
start: "{",
|
|
@@ -1097,21 +1102,21 @@ var V = class extends me {
|
|
|
1097
1102
|
this.items.push(e);
|
|
1098
1103
|
}
|
|
1099
1104
|
delete(e) {
|
|
1100
|
-
let t =
|
|
1105
|
+
let t = Ke(e);
|
|
1101
1106
|
return typeof t == "number" ? this.items.splice(t, 1).length > 0 : !1;
|
|
1102
1107
|
}
|
|
1103
1108
|
get(e, t) {
|
|
1104
|
-
let n =
|
|
1109
|
+
let n = Ke(e);
|
|
1105
1110
|
if (typeof n != "number") return;
|
|
1106
1111
|
let r = this.items[n];
|
|
1107
1112
|
return !t && p(r) ? r.value : r;
|
|
1108
1113
|
}
|
|
1109
1114
|
has(e) {
|
|
1110
|
-
let t =
|
|
1115
|
+
let t = Ke(e);
|
|
1111
1116
|
return typeof t == "number" && t < this.items.length;
|
|
1112
1117
|
}
|
|
1113
1118
|
set(e, t) {
|
|
1114
|
-
let n =
|
|
1119
|
+
let n = Ke(e);
|
|
1115
1120
|
if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
|
|
1116
1121
|
let r = this.items[n];
|
|
1117
1122
|
p(r) && ue(t) ? r.value = t : this.items[n] = t;
|
|
@@ -1124,7 +1129,7 @@ var V = class extends me {
|
|
|
1124
1129
|
return n;
|
|
1125
1130
|
}
|
|
1126
1131
|
toString(e, t, n) {
|
|
1127
|
-
return e ?
|
|
1132
|
+
return e ? He(this, e, {
|
|
1128
1133
|
blockItemPrefix: "- ",
|
|
1129
1134
|
flowChars: {
|
|
1130
1135
|
start: "[",
|
|
@@ -1150,7 +1155,7 @@ var V = class extends me {
|
|
|
1150
1155
|
return i;
|
|
1151
1156
|
}
|
|
1152
1157
|
};
|
|
1153
|
-
function
|
|
1158
|
+
function Ke(e) {
|
|
1154
1159
|
let t = p(e) ? e.value : e;
|
|
1155
1160
|
return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
|
|
1156
1161
|
}
|
|
@@ -1165,7 +1170,7 @@ var W = {
|
|
|
1165
1170
|
return m(e) || t("Expected a sequence for this tag"), e;
|
|
1166
1171
|
},
|
|
1167
1172
|
createNode: (e, t, n) => U.from(e, t, n)
|
|
1168
|
-
},
|
|
1173
|
+
}, qe = {
|
|
1169
1174
|
identify: (e) => typeof e == "string",
|
|
1170
1175
|
default: !0,
|
|
1171
1176
|
tag: "tag:yaml.org,2002:str",
|
|
@@ -1173,22 +1178,22 @@ var W = {
|
|
|
1173
1178
|
stringify(e, t, n, r) {
|
|
1174
1179
|
return t = Object.assign({ actualString: !0 }, t), Oe(e, t, n, r);
|
|
1175
1180
|
}
|
|
1176
|
-
},
|
|
1181
|
+
}, Je = {
|
|
1177
1182
|
identify: (e) => e == null,
|
|
1178
1183
|
createNode: () => new A(null),
|
|
1179
1184
|
default: !0,
|
|
1180
1185
|
tag: "tag:yaml.org,2002:null",
|
|
1181
1186
|
test: /^(?:~|[Nn]ull|NULL)?$/,
|
|
1182
1187
|
resolve: () => new A(null),
|
|
1183
|
-
stringify: ({ source: e }, t) => typeof e == "string" &&
|
|
1184
|
-
},
|
|
1188
|
+
stringify: ({ source: e }, t) => typeof e == "string" && Je.test.test(e) ? e : t.options.nullStr
|
|
1189
|
+
}, Ye = {
|
|
1185
1190
|
identify: (e) => typeof e == "boolean",
|
|
1186
1191
|
default: !0,
|
|
1187
1192
|
tag: "tag:yaml.org,2002:bool",
|
|
1188
1193
|
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
|
1189
1194
|
resolve: (e) => new A(e[0] === "t" || e[0] === "T"),
|
|
1190
1195
|
stringify({ source: e, value: t }, n) {
|
|
1191
|
-
return e &&
|
|
1196
|
+
return e && Ye.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
|
|
1192
1197
|
}
|
|
1193
1198
|
};
|
|
1194
1199
|
//#endregion
|
|
@@ -1198,7 +1203,7 @@ function G({ format: e, minFractionDigits: t, tag: n, value: r }) {
|
|
|
1198
1203
|
let i = typeof r == "number" ? r : Number(r);
|
|
1199
1204
|
if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
|
|
1200
1205
|
let a = Object.is(r, -0) ? "-0" : JSON.stringify(r);
|
|
1201
|
-
if (!e && t && (!n || n === "tag:yaml.org,2002:float") &&
|
|
1206
|
+
if (!e && t && (!n || n === "tag:yaml.org,2002:float") && /^-?\d/.test(a) && !a.includes("e")) {
|
|
1202
1207
|
let e = a.indexOf(".");
|
|
1203
1208
|
e < 0 && (e = a.length, a += ".");
|
|
1204
1209
|
let n = t - (a.length - e - 1);
|
|
@@ -1208,14 +1213,14 @@ function G({ format: e, minFractionDigits: t, tag: n, value: r }) {
|
|
|
1208
1213
|
}
|
|
1209
1214
|
//#endregion
|
|
1210
1215
|
//#region ../../node_modules/yaml/browser/dist/schema/core/float.js
|
|
1211
|
-
var
|
|
1216
|
+
var Xe = {
|
|
1212
1217
|
identify: (e) => typeof e == "number",
|
|
1213
1218
|
default: !0,
|
|
1214
1219
|
tag: "tag:yaml.org,2002:float",
|
|
1215
1220
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1216
1221
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
1217
1222
|
stringify: G
|
|
1218
|
-
},
|
|
1223
|
+
}, Ze = {
|
|
1219
1224
|
identify: (e) => typeof e == "number",
|
|
1220
1225
|
default: !0,
|
|
1221
1226
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1226,7 +1231,7 @@ var Ye = {
|
|
|
1226
1231
|
let t = Number(e.value);
|
|
1227
1232
|
return isFinite(t) ? t.toExponential() : G(e);
|
|
1228
1233
|
}
|
|
1229
|
-
},
|
|
1234
|
+
}, Qe = {
|
|
1230
1235
|
identify: (e) => typeof e == "number",
|
|
1231
1236
|
default: !0,
|
|
1232
1237
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1236,59 +1241,59 @@ var Ye = {
|
|
|
1236
1241
|
return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
|
|
1237
1242
|
},
|
|
1238
1243
|
stringify: G
|
|
1239
|
-
},
|
|
1240
|
-
function
|
|
1244
|
+
}, $e = (e) => typeof e == "bigint" || Number.isInteger(e), et = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
|
|
1245
|
+
function tt(e, t, n) {
|
|
1241
1246
|
let { value: r } = e;
|
|
1242
|
-
return
|
|
1247
|
+
return $e(r) && r >= 0 ? n + r.toString(t) : G(e);
|
|
1243
1248
|
}
|
|
1244
|
-
var
|
|
1245
|
-
identify: (e) =>
|
|
1249
|
+
var nt = {
|
|
1250
|
+
identify: (e) => $e(e) && e >= 0,
|
|
1246
1251
|
default: !0,
|
|
1247
1252
|
tag: "tag:yaml.org,2002:int",
|
|
1248
1253
|
format: "OCT",
|
|
1249
1254
|
test: /^0o[0-7]+$/,
|
|
1250
|
-
resolve: (e, t, n) =>
|
|
1251
|
-
stringify: (e) =>
|
|
1252
|
-
},
|
|
1253
|
-
identify:
|
|
1255
|
+
resolve: (e, t, n) => et(e, 2, 8, n),
|
|
1256
|
+
stringify: (e) => tt(e, 8, "0o")
|
|
1257
|
+
}, rt = {
|
|
1258
|
+
identify: $e,
|
|
1254
1259
|
default: !0,
|
|
1255
1260
|
tag: "tag:yaml.org,2002:int",
|
|
1256
1261
|
test: /^[-+]?[0-9]+$/,
|
|
1257
|
-
resolve: (e, t, n) =>
|
|
1262
|
+
resolve: (e, t, n) => et(e, 0, 10, n),
|
|
1258
1263
|
stringify: G
|
|
1259
|
-
},
|
|
1260
|
-
identify: (e) =>
|
|
1264
|
+
}, it = {
|
|
1265
|
+
identify: (e) => $e(e) && e >= 0,
|
|
1261
1266
|
default: !0,
|
|
1262
1267
|
tag: "tag:yaml.org,2002:int",
|
|
1263
1268
|
format: "HEX",
|
|
1264
1269
|
test: /^0x[0-9a-fA-F]+$/,
|
|
1265
|
-
resolve: (e, t, n) =>
|
|
1266
|
-
stringify: (e) =>
|
|
1267
|
-
},
|
|
1270
|
+
resolve: (e, t, n) => et(e, 2, 16, n),
|
|
1271
|
+
stringify: (e) => tt(e, 16, "0x")
|
|
1272
|
+
}, at = [
|
|
1268
1273
|
H,
|
|
1269
1274
|
W,
|
|
1270
|
-
Ke,
|
|
1271
1275
|
qe,
|
|
1272
1276
|
Je,
|
|
1273
|
-
|
|
1277
|
+
Ye,
|
|
1274
1278
|
nt,
|
|
1275
1279
|
rt,
|
|
1276
|
-
|
|
1280
|
+
it,
|
|
1277
1281
|
Xe,
|
|
1278
|
-
Ze
|
|
1282
|
+
Ze,
|
|
1283
|
+
Qe
|
|
1279
1284
|
];
|
|
1280
1285
|
//#endregion
|
|
1281
1286
|
//#region ../../node_modules/yaml/browser/dist/schema/json/schema.js
|
|
1282
|
-
function
|
|
1287
|
+
function ot(e) {
|
|
1283
1288
|
return typeof e == "bigint" || Number.isInteger(e);
|
|
1284
1289
|
}
|
|
1285
|
-
var
|
|
1290
|
+
var st = ({ value: e }) => JSON.stringify(e), ct = [
|
|
1286
1291
|
{
|
|
1287
1292
|
identify: (e) => typeof e == "string",
|
|
1288
1293
|
default: !0,
|
|
1289
1294
|
tag: "tag:yaml.org,2002:str",
|
|
1290
1295
|
resolve: (e) => e,
|
|
1291
|
-
stringify:
|
|
1296
|
+
stringify: st
|
|
1292
1297
|
},
|
|
1293
1298
|
{
|
|
1294
1299
|
identify: (e) => e == null,
|
|
@@ -1297,7 +1302,7 @@ var ot = ({ value: e }) => JSON.stringify(e), st = [
|
|
|
1297
1302
|
tag: "tag:yaml.org,2002:null",
|
|
1298
1303
|
test: /^null$/,
|
|
1299
1304
|
resolve: () => null,
|
|
1300
|
-
stringify:
|
|
1305
|
+
stringify: st
|
|
1301
1306
|
},
|
|
1302
1307
|
{
|
|
1303
1308
|
identify: (e) => typeof e == "boolean",
|
|
@@ -1305,15 +1310,15 @@ var ot = ({ value: e }) => JSON.stringify(e), st = [
|
|
|
1305
1310
|
tag: "tag:yaml.org,2002:bool",
|
|
1306
1311
|
test: /^true$|^false$/,
|
|
1307
1312
|
resolve: (e) => e === "true",
|
|
1308
|
-
stringify:
|
|
1313
|
+
stringify: st
|
|
1309
1314
|
},
|
|
1310
1315
|
{
|
|
1311
|
-
identify:
|
|
1316
|
+
identify: ot,
|
|
1312
1317
|
default: !0,
|
|
1313
1318
|
tag: "tag:yaml.org,2002:int",
|
|
1314
1319
|
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
1315
1320
|
resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
|
|
1316
|
-
stringify: ({ value: e }) =>
|
|
1321
|
+
stringify: ({ value: e }) => ot(e) ? e.toString() : JSON.stringify(e)
|
|
1317
1322
|
},
|
|
1318
1323
|
{
|
|
1319
1324
|
identify: (e) => typeof e == "number",
|
|
@@ -1321,16 +1326,16 @@ var ot = ({ value: e }) => JSON.stringify(e), st = [
|
|
|
1321
1326
|
tag: "tag:yaml.org,2002:float",
|
|
1322
1327
|
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
1323
1328
|
resolve: (e) => parseFloat(e),
|
|
1324
|
-
stringify:
|
|
1329
|
+
stringify: st
|
|
1325
1330
|
}
|
|
1326
|
-
],
|
|
1331
|
+
], lt = [H, W].concat(ct, {
|
|
1327
1332
|
default: !0,
|
|
1328
1333
|
tag: "",
|
|
1329
1334
|
test: /^/,
|
|
1330
1335
|
resolve(e, t) {
|
|
1331
1336
|
return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
|
|
1332
1337
|
}
|
|
1333
|
-
}),
|
|
1338
|
+
}), ut = {
|
|
1334
1339
|
identify: (e) => e instanceof Uint8Array,
|
|
1335
1340
|
default: !1,
|
|
1336
1341
|
tag: "tag:yaml.org,2002:binary",
|
|
@@ -1363,7 +1368,7 @@ var ot = ({ value: e }) => JSON.stringify(e), st = [
|
|
|
1363
1368
|
};
|
|
1364
1369
|
//#endregion
|
|
1365
1370
|
//#region ../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
1366
|
-
function
|
|
1371
|
+
function dt(e, t) {
|
|
1367
1372
|
if (m(e)) for (let n = 0; n < e.items.length; ++n) {
|
|
1368
1373
|
let r = e.items[n];
|
|
1369
1374
|
if (!f(r)) {
|
|
@@ -1382,7 +1387,7 @@ function ut(e, t) {
|
|
|
1382
1387
|
else t("Expected a sequence for this tag");
|
|
1383
1388
|
return e;
|
|
1384
1389
|
}
|
|
1385
|
-
function
|
|
1390
|
+
function ft(e, t, n) {
|
|
1386
1391
|
let { replacer: r } = n, i = new U(e);
|
|
1387
1392
|
i.tag = "tag:yaml.org,2002:pairs";
|
|
1388
1393
|
let a = 0;
|
|
@@ -1396,17 +1401,17 @@ function dt(e, t, n) {
|
|
|
1396
1401
|
if (t.length === 1) o = t[0], s = e[o];
|
|
1397
1402
|
else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
|
|
1398
1403
|
} else o = e;
|
|
1399
|
-
i.items.push(
|
|
1404
|
+
i.items.push(Ve(o, s, n));
|
|
1400
1405
|
}
|
|
1401
1406
|
return i;
|
|
1402
1407
|
}
|
|
1403
|
-
var
|
|
1408
|
+
var pt = {
|
|
1404
1409
|
collection: "seq",
|
|
1405
1410
|
default: !1,
|
|
1406
1411
|
tag: "tag:yaml.org,2002:pairs",
|
|
1407
|
-
resolve:
|
|
1408
|
-
createNode:
|
|
1409
|
-
},
|
|
1412
|
+
resolve: dt,
|
|
1413
|
+
createNode: ft
|
|
1414
|
+
}, mt = class e extends U {
|
|
1410
1415
|
constructor() {
|
|
1411
1416
|
super(), this.add = V.prototype.add.bind(this), this.delete = V.prototype.delete.bind(this), this.get = V.prototype.get.bind(this), this.has = V.prototype.has.bind(this), this.set = V.prototype.set.bind(this), this.tag = e.tag;
|
|
1412
1417
|
}
|
|
@@ -1422,51 +1427,51 @@ var ft = {
|
|
|
1422
1427
|
return n;
|
|
1423
1428
|
}
|
|
1424
1429
|
static from(e, t, n) {
|
|
1425
|
-
let r =
|
|
1430
|
+
let r = ft(e, t, n), i = new this();
|
|
1426
1431
|
return i.items = r.items, i;
|
|
1427
1432
|
}
|
|
1428
1433
|
};
|
|
1429
|
-
|
|
1430
|
-
var
|
|
1434
|
+
mt.tag = "tag:yaml.org,2002:omap";
|
|
1435
|
+
var ht = {
|
|
1431
1436
|
collection: "seq",
|
|
1432
1437
|
identify: (e) => e instanceof Map,
|
|
1433
|
-
nodeClass:
|
|
1438
|
+
nodeClass: mt,
|
|
1434
1439
|
default: !1,
|
|
1435
1440
|
tag: "tag:yaml.org,2002:omap",
|
|
1436
1441
|
resolve(e, t) {
|
|
1437
|
-
let n =
|
|
1442
|
+
let n = dt(e, t), r = [];
|
|
1438
1443
|
for (let { key: e } of n.items) p(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
|
|
1439
|
-
return Object.assign(new
|
|
1444
|
+
return Object.assign(new mt(), n);
|
|
1440
1445
|
},
|
|
1441
|
-
createNode: (e, t, n) =>
|
|
1446
|
+
createNode: (e, t, n) => mt.from(e, t, n)
|
|
1442
1447
|
};
|
|
1443
1448
|
//#endregion
|
|
1444
1449
|
//#region ../../node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
|
|
1445
|
-
function
|
|
1446
|
-
return t && (e ?
|
|
1450
|
+
function gt({ value: e, source: t }, n) {
|
|
1451
|
+
return t && (e ? _t : vt).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
|
|
1447
1452
|
}
|
|
1448
|
-
var
|
|
1453
|
+
var _t = {
|
|
1449
1454
|
identify: (e) => e === !0,
|
|
1450
1455
|
default: !0,
|
|
1451
1456
|
tag: "tag:yaml.org,2002:bool",
|
|
1452
1457
|
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
|
1453
1458
|
resolve: () => new A(!0),
|
|
1454
|
-
stringify:
|
|
1455
|
-
},
|
|
1459
|
+
stringify: gt
|
|
1460
|
+
}, vt = {
|
|
1456
1461
|
identify: (e) => e === !1,
|
|
1457
1462
|
default: !0,
|
|
1458
1463
|
tag: "tag:yaml.org,2002:bool",
|
|
1459
1464
|
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
1460
1465
|
resolve: () => new A(!1),
|
|
1461
|
-
stringify:
|
|
1462
|
-
},
|
|
1466
|
+
stringify: gt
|
|
1467
|
+
}, yt = {
|
|
1463
1468
|
identify: (e) => typeof e == "number",
|
|
1464
1469
|
default: !0,
|
|
1465
1470
|
tag: "tag:yaml.org,2002:float",
|
|
1466
1471
|
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
|
|
1467
1472
|
resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
|
|
1468
1473
|
stringify: G
|
|
1469
|
-
},
|
|
1474
|
+
}, bt = {
|
|
1470
1475
|
identify: (e) => typeof e == "number",
|
|
1471
1476
|
default: !0,
|
|
1472
1477
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1477,7 +1482,7 @@ var gt = {
|
|
|
1477
1482
|
let t = Number(e.value);
|
|
1478
1483
|
return isFinite(t) ? t.toExponential() : G(e);
|
|
1479
1484
|
}
|
|
1480
|
-
},
|
|
1485
|
+
}, xt = {
|
|
1481
1486
|
identify: (e) => typeof e == "number",
|
|
1482
1487
|
default: !0,
|
|
1483
1488
|
tag: "tag:yaml.org,2002:float",
|
|
@@ -1492,7 +1497,7 @@ var gt = {
|
|
|
1492
1497
|
},
|
|
1493
1498
|
stringify: G
|
|
1494
1499
|
}, K = (e) => typeof e == "bigint" || Number.isInteger(e);
|
|
1495
|
-
function
|
|
1500
|
+
function St(e, t, n, { intAsBigInt: r }) {
|
|
1496
1501
|
let i = e[0];
|
|
1497
1502
|
if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
|
|
1498
1503
|
switch (n) {
|
|
@@ -1512,7 +1517,7 @@ function xt(e, t, n, { intAsBigInt: r }) {
|
|
|
1512
1517
|
let a = parseInt(e, n);
|
|
1513
1518
|
return i === "-" ? -1 * a : a;
|
|
1514
1519
|
}
|
|
1515
|
-
function
|
|
1520
|
+
function Ct(e, t, n) {
|
|
1516
1521
|
let { value: r } = e;
|
|
1517
1522
|
if (K(r)) {
|
|
1518
1523
|
let e = r.toString(t);
|
|
@@ -1520,38 +1525,38 @@ function St(e, t, n) {
|
|
|
1520
1525
|
}
|
|
1521
1526
|
return G(e);
|
|
1522
1527
|
}
|
|
1523
|
-
var
|
|
1528
|
+
var wt = {
|
|
1524
1529
|
identify: K,
|
|
1525
1530
|
default: !0,
|
|
1526
1531
|
tag: "tag:yaml.org,2002:int",
|
|
1527
1532
|
format: "BIN",
|
|
1528
1533
|
test: /^[-+]?0b[0-1_]+$/,
|
|
1529
|
-
resolve: (e, t, n) =>
|
|
1530
|
-
stringify: (e) =>
|
|
1531
|
-
},
|
|
1534
|
+
resolve: (e, t, n) => St(e, 2, 2, n),
|
|
1535
|
+
stringify: (e) => Ct(e, 2, "0b")
|
|
1536
|
+
}, Tt = {
|
|
1532
1537
|
identify: K,
|
|
1533
1538
|
default: !0,
|
|
1534
1539
|
tag: "tag:yaml.org,2002:int",
|
|
1535
1540
|
format: "OCT",
|
|
1536
1541
|
test: /^[-+]?0[0-7_]+$/,
|
|
1537
|
-
resolve: (e, t, n) =>
|
|
1538
|
-
stringify: (e) =>
|
|
1539
|
-
},
|
|
1542
|
+
resolve: (e, t, n) => St(e, 1, 8, n),
|
|
1543
|
+
stringify: (e) => Ct(e, 8, "0")
|
|
1544
|
+
}, Et = {
|
|
1540
1545
|
identify: K,
|
|
1541
1546
|
default: !0,
|
|
1542
1547
|
tag: "tag:yaml.org,2002:int",
|
|
1543
1548
|
test: /^[-+]?[0-9][0-9_]*$/,
|
|
1544
|
-
resolve: (e, t, n) =>
|
|
1549
|
+
resolve: (e, t, n) => St(e, 0, 10, n),
|
|
1545
1550
|
stringify: G
|
|
1546
|
-
},
|
|
1551
|
+
}, Dt = {
|
|
1547
1552
|
identify: K,
|
|
1548
1553
|
default: !0,
|
|
1549
1554
|
tag: "tag:yaml.org,2002:int",
|
|
1550
1555
|
format: "HEX",
|
|
1551
1556
|
test: /^[-+]?0x[0-9a-fA-F_]+$/,
|
|
1552
|
-
resolve: (e, t, n) =>
|
|
1553
|
-
stringify: (e) =>
|
|
1554
|
-
},
|
|
1557
|
+
resolve: (e, t, n) => St(e, 2, 16, n),
|
|
1558
|
+
stringify: (e) => Ct(e, 16, "0x")
|
|
1559
|
+
}, Ot = class e extends V {
|
|
1555
1560
|
constructor(t) {
|
|
1556
1561
|
super(t), this.tag = e.tag;
|
|
1557
1562
|
}
|
|
@@ -1578,21 +1583,21 @@ var Ct = {
|
|
|
1578
1583
|
}
|
|
1579
1584
|
static from(e, t, n) {
|
|
1580
1585
|
let { replacer: r } = n, i = new this(e);
|
|
1581
|
-
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(
|
|
1586
|
+
if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(Ve(e, null, n));
|
|
1582
1587
|
return i;
|
|
1583
1588
|
}
|
|
1584
1589
|
};
|
|
1585
|
-
|
|
1586
|
-
var
|
|
1590
|
+
Ot.tag = "tag:yaml.org,2002:set";
|
|
1591
|
+
var kt = {
|
|
1587
1592
|
collection: "map",
|
|
1588
1593
|
identify: (e) => e instanceof Set,
|
|
1589
|
-
nodeClass:
|
|
1594
|
+
nodeClass: Ot,
|
|
1590
1595
|
default: !1,
|
|
1591
1596
|
tag: "tag:yaml.org,2002:set",
|
|
1592
|
-
createNode: (e, t, n) =>
|
|
1597
|
+
createNode: (e, t, n) => Ot.from(e, t, n),
|
|
1593
1598
|
resolve(e, t) {
|
|
1594
1599
|
if (d(e)) {
|
|
1595
|
-
if (e.hasAllNullValues(!0)) return Object.assign(new
|
|
1600
|
+
if (e.hasAllNullValues(!0)) return Object.assign(new Ot(), e);
|
|
1596
1601
|
t("Set items must all have null values");
|
|
1597
1602
|
} else t("Expected a mapping for this tag");
|
|
1598
1603
|
return e;
|
|
@@ -1600,11 +1605,11 @@ var Ot = {
|
|
|
1600
1605
|
};
|
|
1601
1606
|
//#endregion
|
|
1602
1607
|
//#region ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
1603
|
-
function
|
|
1608
|
+
function At(e, t) {
|
|
1604
1609
|
let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
|
|
1605
1610
|
return n === "-" ? i(-1) * a : a;
|
|
1606
1611
|
}
|
|
1607
|
-
function
|
|
1612
|
+
function jt(e) {
|
|
1608
1613
|
let { value: t } = e, n = (e) => e;
|
|
1609
1614
|
if (typeof t == "bigint") n = (e) => BigInt(e);
|
|
1610
1615
|
else if (isNaN(t) || !isFinite(t)) return G(e);
|
|
@@ -1613,112 +1618,112 @@ function At(e) {
|
|
|
1613
1618
|
let i = n(60), a = [t % i];
|
|
1614
1619
|
return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
|
|
1615
1620
|
}
|
|
1616
|
-
var
|
|
1621
|
+
var Mt = {
|
|
1617
1622
|
identify: (e) => typeof e == "bigint" || Number.isInteger(e),
|
|
1618
1623
|
default: !0,
|
|
1619
1624
|
tag: "tag:yaml.org,2002:int",
|
|
1620
1625
|
format: "TIME",
|
|
1621
1626
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
|
|
1622
|
-
resolve: (e, t, { intAsBigInt: n }) =>
|
|
1623
|
-
stringify:
|
|
1624
|
-
},
|
|
1627
|
+
resolve: (e, t, { intAsBigInt: n }) => At(e, n),
|
|
1628
|
+
stringify: jt
|
|
1629
|
+
}, Nt = {
|
|
1625
1630
|
identify: (e) => typeof e == "number",
|
|
1626
1631
|
default: !0,
|
|
1627
1632
|
tag: "tag:yaml.org,2002:float",
|
|
1628
1633
|
format: "TIME",
|
|
1629
1634
|
test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
|
|
1630
|
-
resolve: (e) =>
|
|
1631
|
-
stringify:
|
|
1632
|
-
},
|
|
1635
|
+
resolve: (e) => At(e, !1),
|
|
1636
|
+
stringify: jt
|
|
1637
|
+
}, Pt = {
|
|
1633
1638
|
identify: (e) => e instanceof Date,
|
|
1634
1639
|
default: !0,
|
|
1635
1640
|
tag: "tag:yaml.org,2002:timestamp",
|
|
1636
1641
|
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
1637
1642
|
resolve(e) {
|
|
1638
|
-
let t = e.match(
|
|
1643
|
+
let t = e.match(Pt.test);
|
|
1639
1644
|
if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
1640
1645
|
let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
|
|
1641
1646
|
if (u && u !== "Z") {
|
|
1642
|
-
let e =
|
|
1647
|
+
let e = At(u, !1);
|
|
1643
1648
|
Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
|
|
1644
1649
|
}
|
|
1645
1650
|
return new Date(l);
|
|
1646
1651
|
},
|
|
1647
1652
|
stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
1648
|
-
},
|
|
1653
|
+
}, Ft = [
|
|
1649
1654
|
H,
|
|
1650
1655
|
W,
|
|
1651
|
-
Ke,
|
|
1652
1656
|
qe,
|
|
1653
|
-
|
|
1657
|
+
Je,
|
|
1654
1658
|
_t,
|
|
1655
|
-
|
|
1659
|
+
vt,
|
|
1656
1660
|
wt,
|
|
1657
1661
|
Tt,
|
|
1658
1662
|
Et,
|
|
1659
|
-
|
|
1663
|
+
Dt,
|
|
1660
1664
|
yt,
|
|
1661
1665
|
bt,
|
|
1662
|
-
|
|
1666
|
+
xt,
|
|
1667
|
+
ut,
|
|
1663
1668
|
R,
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
jt,
|
|
1669
|
+
ht,
|
|
1670
|
+
pt,
|
|
1671
|
+
kt,
|
|
1668
1672
|
Mt,
|
|
1669
|
-
Nt
|
|
1670
|
-
|
|
1671
|
-
|
|
1673
|
+
Nt,
|
|
1674
|
+
Pt
|
|
1675
|
+
], It = new Map([
|
|
1676
|
+
["core", at],
|
|
1672
1677
|
["failsafe", [
|
|
1673
1678
|
H,
|
|
1674
1679
|
W,
|
|
1675
|
-
|
|
1680
|
+
qe
|
|
1676
1681
|
]],
|
|
1677
|
-
["json",
|
|
1678
|
-
["yaml11",
|
|
1679
|
-
["yaml-1.1",
|
|
1680
|
-
]),
|
|
1681
|
-
binary:
|
|
1682
|
-
bool:
|
|
1683
|
-
float:
|
|
1684
|
-
floatExp:
|
|
1685
|
-
floatNaN:
|
|
1686
|
-
floatTime:
|
|
1687
|
-
int:
|
|
1688
|
-
intHex:
|
|
1689
|
-
intOct:
|
|
1690
|
-
intTime:
|
|
1682
|
+
["json", lt],
|
|
1683
|
+
["yaml11", Ft],
|
|
1684
|
+
["yaml-1.1", Ft]
|
|
1685
|
+
]), Lt = {
|
|
1686
|
+
binary: ut,
|
|
1687
|
+
bool: Ye,
|
|
1688
|
+
float: Qe,
|
|
1689
|
+
floatExp: Ze,
|
|
1690
|
+
floatNaN: Xe,
|
|
1691
|
+
floatTime: Nt,
|
|
1692
|
+
int: rt,
|
|
1693
|
+
intHex: it,
|
|
1694
|
+
intOct: nt,
|
|
1695
|
+
intTime: Mt,
|
|
1691
1696
|
map: H,
|
|
1692
1697
|
merge: R,
|
|
1693
|
-
null:
|
|
1694
|
-
omap:
|
|
1695
|
-
pairs:
|
|
1698
|
+
null: Je,
|
|
1699
|
+
omap: ht,
|
|
1700
|
+
pairs: pt,
|
|
1696
1701
|
seq: W,
|
|
1697
|
-
set:
|
|
1698
|
-
timestamp:
|
|
1699
|
-
},
|
|
1700
|
-
"tag:yaml.org,2002:binary":
|
|
1702
|
+
set: kt,
|
|
1703
|
+
timestamp: Pt
|
|
1704
|
+
}, Rt = {
|
|
1705
|
+
"tag:yaml.org,2002:binary": ut,
|
|
1701
1706
|
"tag:yaml.org,2002:merge": R,
|
|
1702
|
-
"tag:yaml.org,2002:omap":
|
|
1703
|
-
"tag:yaml.org,2002:pairs":
|
|
1704
|
-
"tag:yaml.org,2002:set":
|
|
1705
|
-
"tag:yaml.org,2002:timestamp":
|
|
1707
|
+
"tag:yaml.org,2002:omap": ht,
|
|
1708
|
+
"tag:yaml.org,2002:pairs": pt,
|
|
1709
|
+
"tag:yaml.org,2002:set": kt,
|
|
1710
|
+
"tag:yaml.org,2002:timestamp": Pt
|
|
1706
1711
|
};
|
|
1707
|
-
function
|
|
1708
|
-
let r =
|
|
1712
|
+
function zt(e, t, n) {
|
|
1713
|
+
let r = It.get(t);
|
|
1709
1714
|
if (r && !e) return n && !r.includes(R) ? r.concat(R) : r.slice();
|
|
1710
1715
|
let i = r;
|
|
1711
1716
|
if (!i) if (Array.isArray(e)) i = [];
|
|
1712
1717
|
else {
|
|
1713
|
-
let e = Array.from(
|
|
1718
|
+
let e = Array.from(It.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
|
|
1714
1719
|
throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
|
|
1715
1720
|
}
|
|
1716
1721
|
if (Array.isArray(e)) for (let t of e) i = i.concat(t);
|
|
1717
1722
|
else typeof e == "function" && (i = e(i.slice()));
|
|
1718
1723
|
return n && (i = i.concat(R)), i.reduce((e, t) => {
|
|
1719
|
-
let n = typeof t == "string" ?
|
|
1724
|
+
let n = typeof t == "string" ? Lt[t] : t;
|
|
1720
1725
|
if (!n) {
|
|
1721
|
-
let e = JSON.stringify(t), n = Object.keys(
|
|
1726
|
+
let e = JSON.stringify(t), n = Object.keys(Lt).map((e) => JSON.stringify(e)).join(", ");
|
|
1722
1727
|
throw Error(`Unknown custom tag ${e}; use one of ${n}`);
|
|
1723
1728
|
}
|
|
1724
1729
|
return e.includes(n) || e.push(n), e;
|
|
@@ -1726,9 +1731,9 @@ function Rt(e, t, n) {
|
|
|
1726
1731
|
}
|
|
1727
1732
|
//#endregion
|
|
1728
1733
|
//#region ../../node_modules/yaml/browser/dist/schema/Schema.js
|
|
1729
|
-
var
|
|
1734
|
+
var Bt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Vt = class e {
|
|
1730
1735
|
constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: a, sortMapEntries: c, toStringDefaults: l }) {
|
|
1731
|
-
this.compat = Array.isArray(e) ?
|
|
1736
|
+
this.compat = Array.isArray(e) ? zt(e, "compat") : e ? zt(null, e) : null, this.name = typeof a == "string" && a || "core", this.knownTags = r ? Rt : {}, this.tags = zt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, i, { value: H }), Object.defineProperty(this, o, { value: qe }), Object.defineProperty(this, s, { value: W }), this.sortMapEntries = typeof c == "function" ? c : c === !0 ? Bt : null;
|
|
1732
1737
|
}
|
|
1733
1738
|
clone() {
|
|
1734
1739
|
let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
|
|
@@ -1737,7 +1742,7 @@ var zt = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), Bt = class e {
|
|
|
1737
1742
|
};
|
|
1738
1743
|
//#endregion
|
|
1739
1744
|
//#region ../../node_modules/yaml/browser/dist/stringify/stringifyDocument.js
|
|
1740
|
-
function
|
|
1745
|
+
function Ht(e, t) {
|
|
1741
1746
|
let n = [], r = t.directives === !0;
|
|
1742
1747
|
if (t.directives !== !1 && e.directives) {
|
|
1743
1748
|
let t = e.directives.toString(e);
|
|
@@ -1774,7 +1779,7 @@ function Vt(e, t) {
|
|
|
1774
1779
|
}
|
|
1775
1780
|
//#endregion
|
|
1776
1781
|
//#region ../../node_modules/yaml/browser/dist/doc/Document.js
|
|
1777
|
-
var
|
|
1782
|
+
var Ut = class e {
|
|
1778
1783
|
constructor(e, t, n) {
|
|
1779
1784
|
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, c, { value: r });
|
|
1780
1785
|
let i = null;
|
|
@@ -1881,7 +1886,7 @@ var Ht = class e {
|
|
|
1881
1886
|
}
|
|
1882
1887
|
}
|
|
1883
1888
|
if (t.schema instanceof Object) this.schema = t.schema;
|
|
1884
|
-
else if (n) this.schema = new
|
|
1889
|
+
else if (n) this.schema = new Vt(Object.assign(n, t));
|
|
1885
1890
|
else throw Error("With a null YAML version, the { schema: Schema } option is required");
|
|
1886
1891
|
}
|
|
1887
1892
|
toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
|
|
@@ -1910,7 +1915,7 @@ var Ht = class e {
|
|
|
1910
1915
|
let t = JSON.stringify(e.indent);
|
|
1911
1916
|
throw Error(`"indent" option must be a positive integer, not ${t}`);
|
|
1912
1917
|
}
|
|
1913
|
-
return
|
|
1918
|
+
return Ht(this, e);
|
|
1914
1919
|
}
|
|
1915
1920
|
};
|
|
1916
1921
|
function q(e) {
|
|
@@ -1919,19 +1924,19 @@ function q(e) {
|
|
|
1919
1924
|
}
|
|
1920
1925
|
//#endregion
|
|
1921
1926
|
//#region ../../node_modules/yaml/browser/dist/errors.js
|
|
1922
|
-
var
|
|
1927
|
+
var Wt = class extends Error {
|
|
1923
1928
|
constructor(e, t, n, r) {
|
|
1924
1929
|
super(), this.name = e, this.code = n, this.message = r, this.pos = t;
|
|
1925
1930
|
}
|
|
1926
|
-
}, J = class extends
|
|
1931
|
+
}, J = class extends Wt {
|
|
1927
1932
|
constructor(e, t, n) {
|
|
1928
1933
|
super("YAMLParseError", e, t, n);
|
|
1929
1934
|
}
|
|
1930
|
-
},
|
|
1935
|
+
}, Gt = class extends Wt {
|
|
1931
1936
|
constructor(e, t, n) {
|
|
1932
1937
|
super("YAMLWarning", e, t, n);
|
|
1933
1938
|
}
|
|
1934
|
-
},
|
|
1939
|
+
}, Kt = (e, t) => (n) => {
|
|
1935
1940
|
if (n.pos[0] === -1) return;
|
|
1936
1941
|
n.linePos = n.pos.map((e) => t.linePos(e));
|
|
1937
1942
|
let { line: r, col: i } = n.linePos[0];
|
|
@@ -2000,7 +2005,7 @@ function Y(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentInd
|
|
|
2000
2005
|
}
|
|
2001
2006
|
//#endregion
|
|
2002
2007
|
//#region ../../node_modules/yaml/browser/dist/compose/util-contains-newline.js
|
|
2003
|
-
function
|
|
2008
|
+
function qt(e) {
|
|
2004
2009
|
if (!e) return null;
|
|
2005
2010
|
switch (e.type) {
|
|
2006
2011
|
case "alias":
|
|
@@ -2018,7 +2023,7 @@ function Kt(e) {
|
|
|
2018
2023
|
if (t.sep) {
|
|
2019
2024
|
for (let e of t.sep) if (e.type === "newline") return !0;
|
|
2020
2025
|
}
|
|
2021
|
-
if (
|
|
2026
|
+
if (qt(t.key) || qt(t.value)) return !0;
|
|
2022
2027
|
}
|
|
2023
2028
|
return !1;
|
|
2024
2029
|
default: return !0;
|
|
@@ -2026,15 +2031,15 @@ function Kt(e) {
|
|
|
2026
2031
|
}
|
|
2027
2032
|
//#endregion
|
|
2028
2033
|
//#region ../../node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
|
|
2029
|
-
function
|
|
2034
|
+
function Jt(e, t, n) {
|
|
2030
2035
|
if (t?.type === "flow-collection") {
|
|
2031
2036
|
let r = t.end[0];
|
|
2032
|
-
r.indent === e && (r.source === "]" || r.source === "}") &&
|
|
2037
|
+
r.indent === e && (r.source === "]" || r.source === "}") && qt(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
|
|
2033
2038
|
}
|
|
2034
2039
|
}
|
|
2035
2040
|
//#endregion
|
|
2036
2041
|
//#region ../../node_modules/yaml/browser/dist/compose/util-map-includes.js
|
|
2037
|
-
function
|
|
2042
|
+
function Yt(e, t, n) {
|
|
2038
2043
|
let { uniqueKeys: r } = e.options;
|
|
2039
2044
|
if (r === !1) return !1;
|
|
2040
2045
|
let i = typeof r == "function" ? r : (e, t) => e === t || p(e) && p(t) && e.value === t.value;
|
|
@@ -2042,8 +2047,8 @@ function Jt(e, t, n) {
|
|
|
2042
2047
|
}
|
|
2043
2048
|
//#endregion
|
|
2044
2049
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-block-map.js
|
|
2045
|
-
var
|
|
2046
|
-
function
|
|
2050
|
+
var Xt = "All mapping items must start at the same column";
|
|
2051
|
+
function Zt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2047
2052
|
let o = new (a?.nodeClass ?? V)(n.schema);
|
|
2048
2053
|
n.atRoot &&= !1;
|
|
2049
2054
|
let s = r.offset, c = null;
|
|
@@ -2057,15 +2062,15 @@ function Xt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2057
2062
|
startOnNewline: !0
|
|
2058
2063
|
}), m = !p.found;
|
|
2059
2064
|
if (m) {
|
|
2060
|
-
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT",
|
|
2065
|
+
if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", Xt)), !p.anchor && !p.tag && !d) {
|
|
2061
2066
|
c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
|
|
2062
2067
|
continue;
|
|
2063
2068
|
}
|
|
2064
|
-
(p.newlineAfterProp ||
|
|
2065
|
-
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT",
|
|
2069
|
+
(p.newlineAfterProp || qt(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
2070
|
+
} else p.found?.indent !== r.indent && i(s, "BAD_INDENT", Xt);
|
|
2066
2071
|
n.atKey = !0;
|
|
2067
2072
|
let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
|
|
2068
|
-
n.schema.compat &&
|
|
2073
|
+
n.schema.compat && Jt(r.indent, u, i), n.atKey = !1, Yt(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
|
|
2069
2074
|
let _ = Y(d ?? [], {
|
|
2070
2075
|
indicator: "map-value-ind",
|
|
2071
2076
|
next: f,
|
|
@@ -2077,7 +2082,7 @@ function Xt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2077
2082
|
if (s = _.end, _.found) {
|
|
2078
2083
|
m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
2079
2084
|
let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
|
|
2080
|
-
n.schema.compat &&
|
|
2085
|
+
n.schema.compat && Jt(r.indent, f, i), s = c.range[2];
|
|
2081
2086
|
let l = new z(g, c);
|
|
2082
2087
|
n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
|
|
2083
2088
|
} else {
|
|
@@ -2094,7 +2099,7 @@ function Xt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2094
2099
|
}
|
|
2095
2100
|
//#endregion
|
|
2096
2101
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-block-seq.js
|
|
2097
|
-
function
|
|
2102
|
+
function Qt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2098
2103
|
let o = new (a?.nodeClass ?? U)(n.schema);
|
|
2099
2104
|
n.atRoot &&= !1, n.atKey &&= !1;
|
|
2100
2105
|
let s = r.offset, c = null;
|
|
@@ -2113,7 +2118,7 @@ function Zt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2113
2118
|
continue;
|
|
2114
2119
|
}
|
|
2115
2120
|
let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
|
|
2116
|
-
n.schema.compat &&
|
|
2121
|
+
n.schema.compat && Jt(r.indent, l, i), s = d.range[2], o.items.push(d);
|
|
2117
2122
|
}
|
|
2118
2123
|
return o.range = [
|
|
2119
2124
|
r.offset,
|
|
@@ -2123,7 +2128,7 @@ function Zt({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2123
2128
|
}
|
|
2124
2129
|
//#endregion
|
|
2125
2130
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-end.js
|
|
2126
|
-
function
|
|
2131
|
+
function $t(e, t, n, r) {
|
|
2127
2132
|
let i = "";
|
|
2128
2133
|
if (e) {
|
|
2129
2134
|
let a = !1, o = "";
|
|
@@ -2154,8 +2159,8 @@ function Qt(e, t, n, r) {
|
|
|
2154
2159
|
}
|
|
2155
2160
|
//#endregion
|
|
2156
2161
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
|
|
2157
|
-
var
|
|
2158
|
-
function
|
|
2162
|
+
var en = "Block collections are not allowed within flow collections", tn = (e) => e && (e.type === "block-map" || e.type === "block-seq");
|
|
2163
|
+
function nn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
2159
2164
|
let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new (a?.nodeClass ?? (o ? V : U))(n.schema);
|
|
2160
2165
|
c.flow = !0;
|
|
2161
2166
|
let l = n.atRoot;
|
|
@@ -2176,7 +2181,7 @@ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2176
2181
|
a === 0 && g.comma ? i(g.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(g.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), g.comment && (c.comment ? c.comment += "\n" + g.comment : c.comment = g.comment), u = g.end;
|
|
2177
2182
|
continue;
|
|
2178
2183
|
}
|
|
2179
|
-
!o && n.options.strict &&
|
|
2184
|
+
!o && n.options.strict && qt(p) && i(p, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
|
|
2180
2185
|
}
|
|
2181
2186
|
if (a === 0) g.comma && i(g.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
|
|
2182
2187
|
else if (g.comma || i(g.start, "MISSING_CHAR", `Missing , between ${s} items`), g.comment) {
|
|
@@ -2196,11 +2201,11 @@ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2196
2201
|
}
|
|
2197
2202
|
if (!o && !m && !g.found) {
|
|
2198
2203
|
let r = h ? e(n, h, g, i) : t(n, g.end, m, null, g, i);
|
|
2199
|
-
c.items.push(r), u = r.range[2],
|
|
2204
|
+
c.items.push(r), u = r.range[2], tn(h) && i(r.range, "BLOCK_IN_FLOW", en);
|
|
2200
2205
|
} else {
|
|
2201
2206
|
n.atKey = !0;
|
|
2202
2207
|
let a = g.end, f = p ? e(n, p, g, i) : t(n, a, d, null, g, i);
|
|
2203
|
-
|
|
2208
|
+
tn(p) && i(f.range, "BLOCK_IN_FLOW", en), n.atKey = !1;
|
|
2204
2209
|
let _ = Y(m ?? [], {
|
|
2205
2210
|
flow: s,
|
|
2206
2211
|
indicator: "map-value-ind",
|
|
@@ -2223,11 +2228,11 @@ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2223
2228
|
}
|
|
2224
2229
|
} else h && ("source" in h && h.source?.[0] === ":" ? i(h, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
|
|
2225
2230
|
let v = h ? e(n, h, _, i) : _.found ? t(n, _.end, m, null, _, i) : null;
|
|
2226
|
-
v ?
|
|
2231
|
+
v ? tn(h) && i(v.range, "BLOCK_IN_FLOW", en) : _.comment && (f.comment ? f.comment += "\n" + _.comment : f.comment = _.comment);
|
|
2227
2232
|
let y = new z(f, v);
|
|
2228
2233
|
if (n.options.keepSourceTokens && (y.srcToken = l), o) {
|
|
2229
2234
|
let e = c;
|
|
2230
|
-
|
|
2235
|
+
Yt(n, e.items, f) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
|
|
2231
2236
|
} else {
|
|
2232
2237
|
let e = new V(n.schema);
|
|
2233
2238
|
e.flow = !0, e.items.push(y);
|
|
@@ -2248,7 +2253,7 @@ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2248
2253
|
i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), p && p.source.length !== 1 && m.unshift(p);
|
|
2249
2254
|
}
|
|
2250
2255
|
if (m.length > 0) {
|
|
2251
|
-
let e =
|
|
2256
|
+
let e = $t(m, h, n.options.strict, i);
|
|
2252
2257
|
e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
|
|
2253
2258
|
r.offset,
|
|
2254
2259
|
h,
|
|
@@ -2263,31 +2268,31 @@ function tn({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
|
|
|
2263
2268
|
}
|
|
2264
2269
|
//#endregion
|
|
2265
2270
|
//#region ../../node_modules/yaml/browser/dist/compose/compose-collection.js
|
|
2266
|
-
function
|
|
2267
|
-
let o = n.type === "block-map" ?
|
|
2271
|
+
function rn(e, t, n, r, i, a) {
|
|
2272
|
+
let o = n.type === "block-map" ? Zt(e, t, n, r, a) : n.type === "block-seq" ? Qt(e, t, n, r, a) : nn(e, t, n, r, a), s = o.constructor;
|
|
2268
2273
|
return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
|
|
2269
2274
|
}
|
|
2270
|
-
function
|
|
2275
|
+
function an(e, t, n, r, i) {
|
|
2271
2276
|
let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
|
|
2272
2277
|
if (n.type === "block-seq") {
|
|
2273
2278
|
let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
|
|
2274
2279
|
n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
2275
2280
|
}
|
|
2276
2281
|
let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
|
|
2277
|
-
if (!a || !o || o === "!" || o === V.tagName && s === "map" || o === U.tagName && s === "seq") return
|
|
2282
|
+
if (!a || !o || o === "!" || o === V.tagName && s === "map" || o === U.tagName && s === "seq") return rn(e, t, n, i, o);
|
|
2278
2283
|
let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
|
|
2279
2284
|
if (!c) {
|
|
2280
2285
|
let r = t.schema.knownTags[o];
|
|
2281
2286
|
if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
|
|
2282
|
-
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0),
|
|
2287
|
+
else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), rn(e, t, n, i, o);
|
|
2283
2288
|
}
|
|
2284
|
-
let l =
|
|
2289
|
+
let l = rn(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = g(u) ? u : new A(u);
|
|
2285
2290
|
return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
|
|
2286
2291
|
}
|
|
2287
2292
|
//#endregion
|
|
2288
2293
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
|
|
2289
|
-
function
|
|
2290
|
-
let r = t.offset, i =
|
|
2294
|
+
function on(e, t, n) {
|
|
2295
|
+
let r = t.offset, i = sn(t, e.options.strict, n);
|
|
2291
2296
|
if (!i) return {
|
|
2292
2297
|
value: "",
|
|
2293
2298
|
type: null,
|
|
@@ -2298,7 +2303,7 @@ function an(e, t, n) {
|
|
|
2298
2303
|
r
|
|
2299
2304
|
]
|
|
2300
2305
|
};
|
|
2301
|
-
let a = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = t.source ?
|
|
2306
|
+
let a = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = t.source ? cn(t.source) : [], s = o.length;
|
|
2302
2307
|
for (let e = o.length - 1; e >= 0; --e) {
|
|
2303
2308
|
let t = o[e][1];
|
|
2304
2309
|
if (t === "" || t === "\r") s = e;
|
|
@@ -2361,7 +2366,7 @@ function an(e, t, n) {
|
|
|
2361
2366
|
]
|
|
2362
2367
|
};
|
|
2363
2368
|
}
|
|
2364
|
-
function
|
|
2369
|
+
function sn({ offset: e, props: t }, n, r) {
|
|
2365
2370
|
/* istanbul ignore if should not happen */
|
|
2366
2371
|
if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
|
|
2367
2372
|
let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
|
|
@@ -2404,24 +2409,24 @@ function on({ offset: e, props: t }, n, r) {
|
|
|
2404
2409
|
length: d
|
|
2405
2410
|
};
|
|
2406
2411
|
}
|
|
2407
|
-
function
|
|
2412
|
+
function cn(e) {
|
|
2408
2413
|
let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
|
|
2409
2414
|
for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
|
|
2410
2415
|
return i;
|
|
2411
2416
|
}
|
|
2412
2417
|
//#endregion
|
|
2413
2418
|
//#region ../../node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
|
|
2414
|
-
function
|
|
2419
|
+
function ln(e, t, n) {
|
|
2415
2420
|
let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
|
|
2416
2421
|
switch (i) {
|
|
2417
2422
|
case "scalar":
|
|
2418
|
-
s = A.PLAIN, c =
|
|
2423
|
+
s = A.PLAIN, c = un(a, l);
|
|
2419
2424
|
break;
|
|
2420
2425
|
case "single-quoted-scalar":
|
|
2421
|
-
s = A.QUOTE_SINGLE, c =
|
|
2426
|
+
s = A.QUOTE_SINGLE, c = dn(a, l);
|
|
2422
2427
|
break;
|
|
2423
2428
|
case "double-quoted-scalar":
|
|
2424
|
-
s = A.QUOTE_DOUBLE, c =
|
|
2429
|
+
s = A.QUOTE_DOUBLE, c = pn(a, l);
|
|
2425
2430
|
break;
|
|
2426
2431
|
/* istanbul ignore next should not happen */
|
|
2427
2432
|
default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
|
|
@@ -2435,7 +2440,7 @@ function cn(e, t, n) {
|
|
|
2435
2440
|
]
|
|
2436
2441
|
};
|
|
2437
2442
|
}
|
|
2438
|
-
let u = r + a.length, d =
|
|
2443
|
+
let u = r + a.length, d = $t(o, u, t, n);
|
|
2439
2444
|
return {
|
|
2440
2445
|
value: c,
|
|
2441
2446
|
type: s,
|
|
@@ -2447,7 +2452,7 @@ function cn(e, t, n) {
|
|
|
2447
2452
|
]
|
|
2448
2453
|
};
|
|
2449
2454
|
}
|
|
2450
|
-
function
|
|
2455
|
+
function un(e, t) {
|
|
2451
2456
|
let n = "";
|
|
2452
2457
|
switch (e[0]) {
|
|
2453
2458
|
/* istanbul ignore next should not happen */
|
|
@@ -2469,12 +2474,12 @@ function ln(e, t) {
|
|
|
2469
2474
|
n = `reserved character ${e[0]}`;
|
|
2470
2475
|
break;
|
|
2471
2476
|
}
|
|
2472
|
-
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`),
|
|
2477
|
+
return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), fn(e);
|
|
2473
2478
|
}
|
|
2474
|
-
function
|
|
2475
|
-
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"),
|
|
2479
|
+
function dn(e, t) {
|
|
2480
|
+
return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), fn(e.slice(1, -1)).replace(/''/g, "'");
|
|
2476
2481
|
}
|
|
2477
|
-
function
|
|
2482
|
+
function fn(e) {
|
|
2478
2483
|
let t, n;
|
|
2479
2484
|
try {
|
|
2480
2485
|
t = /* @__PURE__ */ RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
@@ -2488,25 +2493,21 @@ function dn(e) {
|
|
|
2488
2493
|
let s = /[ \t]*(.*)/sy;
|
|
2489
2494
|
return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
|
|
2490
2495
|
}
|
|
2491
|
-
function
|
|
2496
|
+
function pn(e, t) {
|
|
2492
2497
|
let n = "";
|
|
2493
2498
|
for (let r = 1; r < e.length - 1; ++r) {
|
|
2494
2499
|
let i = e[r];
|
|
2495
2500
|
if (!(i === "\r" && e[r + 1] === "\n")) if (i === "\n") {
|
|
2496
|
-
let { fold: t, offset: i } =
|
|
2501
|
+
let { fold: t, offset: i } = mn(e, r);
|
|
2497
2502
|
n += t, r = i;
|
|
2498
2503
|
} else if (i === "\\") {
|
|
2499
|
-
let i = e[++r], a =
|
|
2504
|
+
let i = e[++r], a = hn[i];
|
|
2500
2505
|
if (a) n += a;
|
|
2501
2506
|
else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
2502
2507
|
else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
|
|
2503
2508
|
else if (i === "x" || i === "u" || i === "U") {
|
|
2504
|
-
let a =
|
|
2505
|
-
|
|
2506
|
-
u: 4,
|
|
2507
|
-
U: 8
|
|
2508
|
-
}[i];
|
|
2509
|
-
n += hn(e, r + 1, a, t), r += a;
|
|
2509
|
+
let a = i === "x" ? 2 : i === "u" ? 4 : 8;
|
|
2510
|
+
n += gn(e, r + 1, a, t), r += a;
|
|
2510
2511
|
} else {
|
|
2511
2512
|
let i = e.substr(r - 1, 2);
|
|
2512
2513
|
t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
|
|
@@ -2519,7 +2520,7 @@ function fn(e, t) {
|
|
|
2519
2520
|
}
|
|
2520
2521
|
return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
|
|
2521
2522
|
}
|
|
2522
|
-
function
|
|
2523
|
+
function mn(e, t) {
|
|
2523
2524
|
let n = "", r = e[t + 1];
|
|
2524
2525
|
for (; (r === " " || r === " " || r === "\n" || r === "\r") && !(r === "\r" && e[t + 2] !== "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
|
|
2525
2526
|
return n ||= " ", {
|
|
@@ -2527,7 +2528,7 @@ function pn(e, t) {
|
|
|
2527
2528
|
offset: t
|
|
2528
2529
|
};
|
|
2529
2530
|
}
|
|
2530
|
-
var
|
|
2531
|
+
var hn = {
|
|
2531
2532
|
0: "\0",
|
|
2532
2533
|
a: "\x07",
|
|
2533
2534
|
b: "\b",
|
|
@@ -2547,19 +2548,20 @@ var mn = {
|
|
|
2547
2548
|
"\\": "\\",
|
|
2548
2549
|
" ": " "
|
|
2549
2550
|
};
|
|
2550
|
-
function
|
|
2551
|
+
function gn(e, t, n, r) {
|
|
2551
2552
|
let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
|
|
2552
|
-
|
|
2553
|
+
try {
|
|
2554
|
+
return String.fromCodePoint(a);
|
|
2555
|
+
} catch {
|
|
2553
2556
|
let i = e.substr(t - 2, n + 2);
|
|
2554
2557
|
return r(t - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), i;
|
|
2555
2558
|
}
|
|
2556
|
-
return String.fromCodePoint(a);
|
|
2557
2559
|
}
|
|
2558
2560
|
//#endregion
|
|
2559
2561
|
//#region ../../node_modules/yaml/browser/dist/compose/compose-scalar.js
|
|
2560
|
-
function
|
|
2561
|
-
let { value: i, type: a, comment: s, range: c } = t.type === "block-scalar" ?
|
|
2562
|
-
u = e.options.stringKeys && e.atKey ? e.schema[o] : l ?
|
|
2562
|
+
function _n(e, t, n, r) {
|
|
2563
|
+
let { value: i, type: a, comment: s, range: c } = t.type === "block-scalar" ? on(e, t, r) : ln(t, e.options.strict, r), l = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, u;
|
|
2564
|
+
u = e.options.stringKeys && e.atKey ? e.schema[o] : l ? vn(e.schema, i, l, n, r) : t.type === "scalar" ? yn(e, i, t, r) : e.schema[o];
|
|
2563
2565
|
let d;
|
|
2564
2566
|
try {
|
|
2565
2567
|
let a = u.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
|
|
@@ -2570,7 +2572,7 @@ function gn(e, t, n, r) {
|
|
|
2570
2572
|
}
|
|
2571
2573
|
return d.range = c, d.source = i, a && (d.type = a), l && (d.tag = l), u.format && (d.format = u.format), s && (d.comment = s), d;
|
|
2572
2574
|
}
|
|
2573
|
-
function
|
|
2575
|
+
function vn(e, t, n, r, i) {
|
|
2574
2576
|
if (n === "!") return e[o];
|
|
2575
2577
|
let a = [];
|
|
2576
2578
|
for (let t of e.tags) if (!t.collection && t.tag === n) if (t.default && t.test) a.push(t);
|
|
@@ -2582,7 +2584,7 @@ function _n(e, t, n, r, i) {
|
|
|
2582
2584
|
test: void 0
|
|
2583
2585
|
})), s) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[o]);
|
|
2584
2586
|
}
|
|
2585
|
-
function
|
|
2587
|
+
function yn({ atKey: e, directives: t, schema: n }, r, i, a) {
|
|
2586
2588
|
let s = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[o];
|
|
2587
2589
|
if (n.compat) {
|
|
2588
2590
|
let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[o];
|
|
@@ -2592,7 +2594,7 @@ function vn({ atKey: e, directives: t, schema: n }, r, i, a) {
|
|
|
2592
2594
|
}
|
|
2593
2595
|
//#endregion
|
|
2594
2596
|
//#region ../../node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
|
|
2595
|
-
function
|
|
2597
|
+
function bn(e, t, n) {
|
|
2596
2598
|
if (t) {
|
|
2597
2599
|
n ??= t.length;
|
|
2598
2600
|
for (let r = n - 1; r >= 0; --r) {
|
|
@@ -2612,48 +2614,48 @@ function yn(e, t, n) {
|
|
|
2612
2614
|
}
|
|
2613
2615
|
//#endregion
|
|
2614
2616
|
//#region ../../node_modules/yaml/browser/dist/compose/compose-node.js
|
|
2615
|
-
var
|
|
2616
|
-
composeNode:
|
|
2617
|
-
composeEmptyNode:
|
|
2617
|
+
var xn = {
|
|
2618
|
+
composeNode: Sn,
|
|
2619
|
+
composeEmptyNode: Cn
|
|
2618
2620
|
};
|
|
2619
|
-
function
|
|
2621
|
+
function Sn(e, t, n, r) {
|
|
2620
2622
|
let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
|
|
2621
2623
|
switch (t.type) {
|
|
2622
2624
|
case "alias":
|
|
2623
|
-
l =
|
|
2625
|
+
l = wn(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
2624
2626
|
break;
|
|
2625
2627
|
case "scalar":
|
|
2626
2628
|
case "single-quoted-scalar":
|
|
2627
2629
|
case "double-quoted-scalar":
|
|
2628
2630
|
case "block-scalar":
|
|
2629
|
-
l =
|
|
2631
|
+
l = _n(e, t, c, r), s && (l.anchor = s.source.substring(1));
|
|
2630
2632
|
break;
|
|
2631
2633
|
case "block-map":
|
|
2632
2634
|
case "block-seq":
|
|
2633
2635
|
case "flow-collection":
|
|
2634
2636
|
try {
|
|
2635
|
-
l =
|
|
2637
|
+
l = an(xn, e, t, n, r), s && (l.anchor = s.source.substring(1));
|
|
2636
2638
|
} catch (e) {
|
|
2637
2639
|
r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
|
|
2638
2640
|
}
|
|
2639
2641
|
break;
|
|
2640
2642
|
default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
|
|
2641
2643
|
}
|
|
2642
|
-
return l ??=
|
|
2644
|
+
return l ??= Cn(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!p(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
|
|
2643
2645
|
}
|
|
2644
|
-
function
|
|
2645
|
-
let u =
|
|
2646
|
+
function Cn(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
|
|
2647
|
+
let u = _n(e, {
|
|
2646
2648
|
type: "scalar",
|
|
2647
|
-
offset:
|
|
2649
|
+
offset: bn(t, n, r),
|
|
2648
2650
|
indent: -1,
|
|
2649
2651
|
source: ""
|
|
2650
2652
|
}, s, l);
|
|
2651
2653
|
return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
|
|
2652
2654
|
}
|
|
2653
|
-
function
|
|
2655
|
+
function wn({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
2654
2656
|
let a = new ce(n.substring(1));
|
|
2655
2657
|
a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
|
|
2656
|
-
let o = t + n.length, s =
|
|
2658
|
+
let o = t + n.length, s = $t(r, o, e.strict, i);
|
|
2657
2659
|
return a.range = [
|
|
2658
2660
|
t,
|
|
2659
2661
|
o,
|
|
@@ -2662,8 +2664,8 @@ function Cn({ options: e }, { offset: t, source: n, end: r }, i) {
|
|
|
2662
2664
|
}
|
|
2663
2665
|
//#endregion
|
|
2664
2666
|
//#region ../../node_modules/yaml/browser/dist/compose/compose-doc.js
|
|
2665
|
-
function
|
|
2666
|
-
let s = new
|
|
2667
|
+
function Tn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
2668
|
+
let s = new Ut(void 0, Object.assign({ _directives: t }, e)), c = {
|
|
2667
2669
|
atKey: !1,
|
|
2668
2670
|
atRoot: !0,
|
|
2669
2671
|
directives: s.directives,
|
|
@@ -2677,8 +2679,8 @@ function wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
2677
2679
|
parentIndent: 0,
|
|
2678
2680
|
startOnNewline: !0
|
|
2679
2681
|
});
|
|
2680
|
-
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ?
|
|
2681
|
-
let u = s.contents.range[2], d =
|
|
2682
|
+
l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Sn(c, i, l, o) : Cn(c, l.end, r, null, l, o);
|
|
2683
|
+
let u = s.contents.range[2], d = $t(a, u, !1, o);
|
|
2682
2684
|
return d.comment && (s.comment = d.comment), s.range = [
|
|
2683
2685
|
n,
|
|
2684
2686
|
u,
|
|
@@ -2687,13 +2689,13 @@ function wn(e, t, { offset: n, start: r, value: i, end: a }, o) {
|
|
|
2687
2689
|
}
|
|
2688
2690
|
//#endregion
|
|
2689
2691
|
//#region ../../node_modules/yaml/browser/dist/compose/composer.js
|
|
2690
|
-
function
|
|
2692
|
+
function En(e) {
|
|
2691
2693
|
if (typeof e == "number") return [e, e + 1];
|
|
2692
2694
|
if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
|
|
2693
2695
|
let { offset: t, source: n } = e;
|
|
2694
2696
|
return [t, t + (typeof n == "string" ? n.length : 1)];
|
|
2695
2697
|
}
|
|
2696
|
-
function
|
|
2698
|
+
function Dn(e) {
|
|
2697
2699
|
let t = "", n = !1, r = !1;
|
|
2698
2700
|
for (let i = 0; i < e.length; ++i) {
|
|
2699
2701
|
let a = e[i];
|
|
@@ -2712,15 +2714,15 @@ function En(e) {
|
|
|
2712
2714
|
afterEmptyLine: r
|
|
2713
2715
|
};
|
|
2714
2716
|
}
|
|
2715
|
-
var
|
|
2717
|
+
var On = class {
|
|
2716
2718
|
constructor(e = {}) {
|
|
2717
2719
|
this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
|
|
2718
|
-
let i =
|
|
2719
|
-
r ? this.warnings.push(new
|
|
2720
|
+
let i = En(e);
|
|
2721
|
+
r ? this.warnings.push(new Gt(i, t, n)) : this.errors.push(new J(i, t, n));
|
|
2720
2722
|
}, this.directives = new D({ version: e.version || "1.2" }), this.options = e;
|
|
2721
2723
|
}
|
|
2722
2724
|
decorate(e, t) {
|
|
2723
|
-
let { comment: n, afterEmptyLine: r } =
|
|
2725
|
+
let { comment: n, afterEmptyLine: r } = Dn(this.prelude);
|
|
2724
2726
|
if (n) {
|
|
2725
2727
|
let i = e.contents;
|
|
2726
2728
|
if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
|
|
@@ -2735,11 +2737,15 @@ var Dn = class {
|
|
|
2735
2737
|
i.commentBefore = e ? `${n}\n${e}` : n;
|
|
2736
2738
|
}
|
|
2737
2739
|
}
|
|
2738
|
-
|
|
2740
|
+
if (t) {
|
|
2741
|
+
for (let t = 0; t < this.errors.length; ++t) e.errors.push(this.errors[t]);
|
|
2742
|
+
for (let t = 0; t < this.warnings.length; ++t) e.warnings.push(this.warnings[t]);
|
|
2743
|
+
} else e.errors = this.errors, e.warnings = this.warnings;
|
|
2744
|
+
this.prelude = [], this.errors = [], this.warnings = [];
|
|
2739
2745
|
}
|
|
2740
2746
|
streamInfo() {
|
|
2741
2747
|
return {
|
|
2742
|
-
comment:
|
|
2748
|
+
comment: Dn(this.prelude).comment,
|
|
2743
2749
|
directives: this.directives,
|
|
2744
2750
|
errors: this.errors,
|
|
2745
2751
|
warnings: this.warnings
|
|
@@ -2753,12 +2759,12 @@ var Dn = class {
|
|
|
2753
2759
|
switch (e.type) {
|
|
2754
2760
|
case "directive":
|
|
2755
2761
|
this.directives.add(e.source, (t, n, r) => {
|
|
2756
|
-
let i =
|
|
2762
|
+
let i = En(e);
|
|
2757
2763
|
i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
|
|
2758
2764
|
}), this.prelude.push(e.source), this.atDirectives = !0;
|
|
2759
2765
|
break;
|
|
2760
2766
|
case "document": {
|
|
2761
|
-
let t =
|
|
2767
|
+
let t = Tn(this.options, this.directives, e, this.onError);
|
|
2762
2768
|
this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
|
|
2763
2769
|
break;
|
|
2764
2770
|
}
|
|
@@ -2769,17 +2775,17 @@ var Dn = class {
|
|
|
2769
2775
|
this.prelude.push(e.source);
|
|
2770
2776
|
break;
|
|
2771
2777
|
case "error": {
|
|
2772
|
-
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new J(
|
|
2778
|
+
let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new J(En(e), "UNEXPECTED_TOKEN", t);
|
|
2773
2779
|
this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
|
|
2774
2780
|
break;
|
|
2775
2781
|
}
|
|
2776
2782
|
case "doc-end": {
|
|
2777
2783
|
if (!this.doc) {
|
|
2778
|
-
this.errors.push(new J(
|
|
2784
|
+
this.errors.push(new J(En(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
|
|
2779
2785
|
break;
|
|
2780
2786
|
}
|
|
2781
2787
|
this.doc.directives.docEnd = !0;
|
|
2782
|
-
let t =
|
|
2788
|
+
let t = $t(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
|
|
2783
2789
|
if (this.decorate(this.doc, !0), t.comment) {
|
|
2784
2790
|
let e = this.doc.comment;
|
|
2785
2791
|
this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
|
|
@@ -2787,13 +2793,13 @@ var Dn = class {
|
|
|
2787
2793
|
this.doc.range[2] = t.offset;
|
|
2788
2794
|
break;
|
|
2789
2795
|
}
|
|
2790
|
-
default: this.errors.push(new J(
|
|
2796
|
+
default: this.errors.push(new J(En(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
|
|
2791
2797
|
}
|
|
2792
2798
|
}
|
|
2793
2799
|
*end(e = !1, t = -1) {
|
|
2794
2800
|
if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
|
|
2795
2801
|
else if (e) {
|
|
2796
|
-
let e = new
|
|
2802
|
+
let e = new Ut(void 0, Object.assign({ _directives: this.directives }, this.options));
|
|
2797
2803
|
this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
|
|
2798
2804
|
0,
|
|
2799
2805
|
t,
|
|
@@ -2801,14 +2807,14 @@ var Dn = class {
|
|
|
2801
2807
|
], this.decorate(e, !1), yield e;
|
|
2802
2808
|
}
|
|
2803
2809
|
}
|
|
2804
|
-
},
|
|
2810
|
+
}, kn = Symbol("break visit"), An = Symbol("skip children"), jn = Symbol("remove item");
|
|
2805
2811
|
function X(e, t) {
|
|
2806
2812
|
"type" in e && e.type === "document" && (e = {
|
|
2807
2813
|
start: e.start,
|
|
2808
2814
|
value: e.value
|
|
2809
|
-
}),
|
|
2815
|
+
}), Mn(Object.freeze([]), e, t);
|
|
2810
2816
|
}
|
|
2811
|
-
X.BREAK =
|
|
2817
|
+
X.BREAK = kn, X.SKIP = An, X.REMOVE = jn, X.itemAtPath = (e, t) => {
|
|
2812
2818
|
let n = e;
|
|
2813
2819
|
for (let [e, r] of t) {
|
|
2814
2820
|
let t = n?.[e];
|
|
@@ -2821,24 +2827,24 @@ X.BREAK = On, X.SKIP = kn, X.REMOVE = An, X.itemAtPath = (e, t) => {
|
|
|
2821
2827
|
if (i && "items" in i) return i;
|
|
2822
2828
|
throw Error("Parent collection not found");
|
|
2823
2829
|
};
|
|
2824
|
-
function
|
|
2830
|
+
function Mn(e, t, n) {
|
|
2825
2831
|
let r = n(t, e);
|
|
2826
2832
|
if (typeof r == "symbol") return r;
|
|
2827
2833
|
for (let i of ["key", "value"]) {
|
|
2828
2834
|
let a = t[i];
|
|
2829
2835
|
if (a && "items" in a) {
|
|
2830
2836
|
for (let t = 0; t < a.items.length; ++t) {
|
|
2831
|
-
let r =
|
|
2837
|
+
let r = Mn(Object.freeze(e.concat([[i, t]])), a.items[t], n);
|
|
2832
2838
|
if (typeof r == "number") t = r - 1;
|
|
2833
|
-
else if (r ===
|
|
2834
|
-
else r ===
|
|
2839
|
+
else if (r === kn) return kn;
|
|
2840
|
+
else r === jn && (a.items.splice(t, 1), --t);
|
|
2835
2841
|
}
|
|
2836
2842
|
typeof r == "function" && i === "key" && (r = r(t, e));
|
|
2837
2843
|
}
|
|
2838
2844
|
}
|
|
2839
2845
|
return typeof r == "function" ? r(t, e) : r;
|
|
2840
2846
|
}
|
|
2841
|
-
function
|
|
2847
|
+
function Nn(e) {
|
|
2842
2848
|
switch (e) {
|
|
2843
2849
|
case "": return "byte-order-mark";
|
|
2844
2850
|
case "": return "doc-mode";
|
|
@@ -2885,7 +2891,7 @@ function Z(e) {
|
|
|
2885
2891
|
default: return !1;
|
|
2886
2892
|
}
|
|
2887
2893
|
}
|
|
2888
|
-
var
|
|
2894
|
+
var Pn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Fn = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), In = /* @__PURE__ */ new Set(",[]{}"), Ln = /* @__PURE__ */ new Set(" ,[]{}\n\r "), Rn = (e) => !e || Ln.has(e), zn = class {
|
|
2889
2895
|
constructor() {
|
|
2890
2896
|
this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
|
|
2891
2897
|
}
|
|
@@ -2989,7 +2995,7 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
2989
2995
|
if (!t && !this.atEnd) return this.setNext("block-start");
|
|
2990
2996
|
if ((e === "-" || e === "?" || e === ":") && Z(t)) {
|
|
2991
2997
|
let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
|
|
2992
|
-
return this.indentNext = this.indentValue + 1, this.indentValue += e,
|
|
2998
|
+
return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
|
|
2993
2999
|
}
|
|
2994
3000
|
return "doc";
|
|
2995
3001
|
}
|
|
@@ -3005,7 +3011,7 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3005
3011
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
|
|
3006
3012
|
case "}":
|
|
3007
3013
|
case "]": return yield* this.pushCount(1), "doc";
|
|
3008
|
-
case "*": return yield* this.pushUntil(
|
|
3014
|
+
case "*": return yield* this.pushUntil(Rn), "doc";
|
|
3009
3015
|
case "\"":
|
|
3010
3016
|
case "'": return yield* this.parseQuotedScalar();
|
|
3011
3017
|
case "|":
|
|
@@ -3030,7 +3036,7 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3030
3036
|
case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
|
|
3031
3037
|
case "}":
|
|
3032
3038
|
case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
|
|
3033
|
-
case "*": return yield* this.pushUntil(
|
|
3039
|
+
case "*": return yield* this.pushUntil(Rn), "flow";
|
|
3034
3040
|
case "\"":
|
|
3035
3041
|
case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
|
|
3036
3042
|
case ":": {
|
|
@@ -3123,18 +3129,18 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3123
3129
|
let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
|
|
3124
3130
|
for (; r = this.buffer[++n];) if (r === ":") {
|
|
3125
3131
|
let r = this.buffer[n + 1];
|
|
3126
|
-
if (Z(r) || e &&
|
|
3132
|
+
if (Z(r) || e && In.has(r)) break;
|
|
3127
3133
|
t = n;
|
|
3128
3134
|
} else if (Z(r)) {
|
|
3129
3135
|
let i = this.buffer[n + 1];
|
|
3130
|
-
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e &&
|
|
3136
|
+
if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && In.has(i)) break;
|
|
3131
3137
|
if (r === "\n") {
|
|
3132
3138
|
let e = this.continueScalar(n + 1);
|
|
3133
3139
|
if (e === -1) break;
|
|
3134
3140
|
n = Math.max(n, e - 2);
|
|
3135
3141
|
}
|
|
3136
3142
|
} else {
|
|
3137
|
-
if (e &&
|
|
3143
|
+
if (e && In.has(r)) break;
|
|
3138
3144
|
t = n;
|
|
3139
3145
|
}
|
|
3140
3146
|
return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
|
|
@@ -3147,17 +3153,28 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3147
3153
|
return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
|
|
3148
3154
|
}
|
|
3149
3155
|
*pushIndicators() {
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3156
|
+
let e = 0;
|
|
3157
|
+
loop: for (;;) {
|
|
3158
|
+
switch (this.charAt(0)) {
|
|
3159
|
+
case "!":
|
|
3160
|
+
e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
|
|
3161
|
+
continue loop;
|
|
3162
|
+
case "&":
|
|
3163
|
+
e += yield* this.pushUntil(Rn), e += yield* this.pushSpaces(!0);
|
|
3164
|
+
continue loop;
|
|
3165
|
+
case "-":
|
|
3166
|
+
case "?":
|
|
3167
|
+
case ":": {
|
|
3168
|
+
let t = this.flowLevel > 0, n = this.charAt(1);
|
|
3169
|
+
if (Z(n) || t && In.has(n)) {
|
|
3170
|
+
t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
|
|
3171
|
+
continue loop;
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3158
3174
|
}
|
|
3175
|
+
break loop;
|
|
3159
3176
|
}
|
|
3160
|
-
return
|
|
3177
|
+
return e;
|
|
3161
3178
|
}
|
|
3162
3179
|
*pushTag() {
|
|
3163
3180
|
if (this.charAt(1) === "<") {
|
|
@@ -3166,8 +3183,8 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3166
3183
|
return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
|
|
3167
3184
|
} else {
|
|
3168
3185
|
let e = this.pos + 1, t = this.buffer[e];
|
|
3169
|
-
for (; t;) if (
|
|
3170
|
-
else if (t === "%" &&
|
|
3186
|
+
for (; t;) if (Fn.has(t)) t = this.buffer[++e];
|
|
3187
|
+
else if (t === "%" && Pn.has(this.buffer[e + 1]) && Pn.has(this.buffer[e + 2])) t = this.buffer[e += 3];
|
|
3171
3188
|
else break;
|
|
3172
3189
|
return yield* this.pushToIndex(e, !1);
|
|
3173
3190
|
}
|
|
@@ -3189,7 +3206,7 @@ var Nn = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Pn = /* @__PURE__ */
|
|
|
3189
3206
|
for (; !e(n);) n = this.buffer[++t];
|
|
3190
3207
|
return yield* this.pushToIndex(t, !1);
|
|
3191
3208
|
}
|
|
3192
|
-
},
|
|
3209
|
+
}, Bn = class {
|
|
3193
3210
|
constructor() {
|
|
3194
3211
|
this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
|
|
3195
3212
|
let t = 0, n = this.lineStarts.length;
|
|
@@ -3219,7 +3236,7 @@ function Q(e, t) {
|
|
|
3219
3236
|
for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
|
|
3220
3237
|
return !1;
|
|
3221
3238
|
}
|
|
3222
|
-
function
|
|
3239
|
+
function Vn(e) {
|
|
3223
3240
|
for (let t = 0; t < e.length; ++t) switch (e[t].type) {
|
|
3224
3241
|
case "space":
|
|
3225
3242
|
case "comment":
|
|
@@ -3228,7 +3245,7 @@ function Bn(e) {
|
|
|
3228
3245
|
}
|
|
3229
3246
|
return -1;
|
|
3230
3247
|
}
|
|
3231
|
-
function
|
|
3248
|
+
function Hn(e) {
|
|
3232
3249
|
switch (e?.type) {
|
|
3233
3250
|
case "alias":
|
|
3234
3251
|
case "scalar":
|
|
@@ -3238,7 +3255,7 @@ function Vn(e) {
|
|
|
3238
3255
|
default: return !1;
|
|
3239
3256
|
}
|
|
3240
3257
|
}
|
|
3241
|
-
function
|
|
3258
|
+
function Un(e) {
|
|
3242
3259
|
switch (e.type) {
|
|
3243
3260
|
case "document": return e.start;
|
|
3244
3261
|
case "block-map": {
|
|
@@ -3263,12 +3280,16 @@ function $(e) {
|
|
|
3263
3280
|
for (; e[++t]?.type === "space";);
|
|
3264
3281
|
return e.splice(t, e.length);
|
|
3265
3282
|
}
|
|
3266
|
-
function
|
|
3267
|
-
if (
|
|
3283
|
+
function Wn(e, t) {
|
|
3284
|
+
if (t.length < 1e5) Array.prototype.push.apply(e, t);
|
|
3285
|
+
else for (let n = 0; n < t.length; ++n) e.push(t[n]);
|
|
3268
3286
|
}
|
|
3269
|
-
|
|
3287
|
+
function Gn(e) {
|
|
3288
|
+
if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !Q(t.start, "explicit-key-ind") && !Q(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, Hn(t.value) ? t.value.end ? Wn(t.value.end, t.sep) : t.value.end = t.sep : Wn(t.start, t.sep), delete t.sep);
|
|
3289
|
+
}
|
|
3290
|
+
var Kn = class {
|
|
3270
3291
|
constructor(e) {
|
|
3271
|
-
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new
|
|
3292
|
+
this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new zn(), this.onNewLine = e;
|
|
3272
3293
|
}
|
|
3273
3294
|
*parse(e, t = !1) {
|
|
3274
3295
|
this.onNewLine && this.offset === 0 && this.onNewLine(0);
|
|
@@ -3280,7 +3301,7 @@ var Wn = class {
|
|
|
3280
3301
|
this.atScalar = !1, yield* this.step(), this.offset += e.length;
|
|
3281
3302
|
return;
|
|
3282
3303
|
}
|
|
3283
|
-
let t =
|
|
3304
|
+
let t = Nn(e);
|
|
3284
3305
|
if (!t) {
|
|
3285
3306
|
let t = `Not a YAML token: ${e}`;
|
|
3286
3307
|
yield* this.pop({
|
|
@@ -3363,7 +3384,7 @@ var Wn = class {
|
|
|
3363
3384
|
else if (this.stack.length === 0) yield t;
|
|
3364
3385
|
else {
|
|
3365
3386
|
let e = this.peek(1);
|
|
3366
|
-
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" &&
|
|
3387
|
+
switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && Gn(t), e.type) {
|
|
3367
3388
|
case "document":
|
|
3368
3389
|
e.value = t;
|
|
3369
3390
|
break;
|
|
@@ -3414,7 +3435,7 @@ var Wn = class {
|
|
|
3414
3435
|
}
|
|
3415
3436
|
if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
|
|
3416
3437
|
let n = t.items[t.items.length - 1];
|
|
3417
|
-
n && !n.sep && !n.value && n.start.length > 0 &&
|
|
3438
|
+
n && !n.sep && !n.value && n.start.length > 0 && Vn(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
|
|
3418
3439
|
}
|
|
3419
3440
|
}
|
|
3420
3441
|
}
|
|
@@ -3455,7 +3476,7 @@ var Wn = class {
|
|
|
3455
3476
|
if (e.value) return yield* this.lineEnd(e);
|
|
3456
3477
|
switch (this.type) {
|
|
3457
3478
|
case "doc-start":
|
|
3458
|
-
|
|
3479
|
+
Vn(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
|
|
3459
3480
|
return;
|
|
3460
3481
|
case "anchor":
|
|
3461
3482
|
case "tag":
|
|
@@ -3475,7 +3496,7 @@ var Wn = class {
|
|
|
3475
3496
|
}
|
|
3476
3497
|
*scalar(e) {
|
|
3477
3498
|
if (this.type === "map-value-ind") {
|
|
3478
|
-
let t = $(
|
|
3499
|
+
let t = $(Un(this.peek(2))), n;
|
|
3479
3500
|
e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
|
|
3480
3501
|
let r = {
|
|
3481
3502
|
type: "block-map",
|
|
@@ -3525,7 +3546,7 @@ var Wn = class {
|
|
|
3525
3546
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
3526
3547
|
let n = e.items[e.items.length - 2]?.value?.end;
|
|
3527
3548
|
if (Array.isArray(n)) {
|
|
3528
|
-
|
|
3549
|
+
Wn(n, t.start), n.push(this.sourceToken), e.items.pop();
|
|
3529
3550
|
return;
|
|
3530
3551
|
}
|
|
3531
3552
|
}
|
|
@@ -3604,7 +3625,7 @@ var Wn = class {
|
|
|
3604
3625
|
sep: [this.sourceToken]
|
|
3605
3626
|
}]
|
|
3606
3627
|
});
|
|
3607
|
-
else if (
|
|
3628
|
+
else if (Hn(t.key) && !Q(t.sep, "newline")) {
|
|
3608
3629
|
let e = $(t.start), n = t.key, r = t.sep;
|
|
3609
3630
|
r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
|
|
3610
3631
|
type: "block-map",
|
|
@@ -3689,7 +3710,7 @@ var Wn = class {
|
|
|
3689
3710
|
if (this.atIndentedComment(t.start, e.indent)) {
|
|
3690
3711
|
let n = e.items[e.items.length - 2]?.value?.end;
|
|
3691
3712
|
if (Array.isArray(n)) {
|
|
3692
|
-
|
|
3713
|
+
Wn(n, t.start), n.push(this.sourceToken), e.items.pop();
|
|
3693
3714
|
return;
|
|
3694
3715
|
}
|
|
3695
3716
|
}
|
|
@@ -3772,8 +3793,8 @@ var Wn = class {
|
|
|
3772
3793
|
let t = this.peek(2);
|
|
3773
3794
|
if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
|
|
3774
3795
|
else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
|
|
3775
|
-
let n = $(
|
|
3776
|
-
|
|
3796
|
+
let n = $(Un(t));
|
|
3797
|
+
Gn(e);
|
|
3777
3798
|
let r = e.end.splice(1, e.end.length);
|
|
3778
3799
|
r.push(this.sourceToken);
|
|
3779
3800
|
let i = {
|
|
@@ -3832,7 +3853,7 @@ var Wn = class {
|
|
|
3832
3853
|
};
|
|
3833
3854
|
case "explicit-key-ind": {
|
|
3834
3855
|
this.onKeyLine = !0;
|
|
3835
|
-
let t = $(
|
|
3856
|
+
let t = $(Un(e));
|
|
3836
3857
|
return t.push(this.sourceToken), {
|
|
3837
3858
|
type: "block-map",
|
|
3838
3859
|
offset: this.offset,
|
|
@@ -3845,7 +3866,7 @@ var Wn = class {
|
|
|
3845
3866
|
}
|
|
3846
3867
|
case "map-value-ind": {
|
|
3847
3868
|
this.onKeyLine = !0;
|
|
3848
|
-
let t = $(
|
|
3869
|
+
let t = $(Un(e));
|
|
3849
3870
|
return {
|
|
3850
3871
|
type: "block-map",
|
|
3851
3872
|
offset: this.offset,
|
|
@@ -3883,26 +3904,26 @@ var Wn = class {
|
|
|
3883
3904
|
};
|
|
3884
3905
|
//#endregion
|
|
3885
3906
|
//#region ../../node_modules/yaml/browser/dist/public-api.js
|
|
3886
|
-
function
|
|
3907
|
+
function qn(e) {
|
|
3887
3908
|
let t = e.prettyErrors !== !1;
|
|
3888
3909
|
return {
|
|
3889
|
-
lineCounter: e.lineCounter || t && new
|
|
3910
|
+
lineCounter: e.lineCounter || t && new Bn() || null,
|
|
3890
3911
|
prettyErrors: t
|
|
3891
3912
|
};
|
|
3892
3913
|
}
|
|
3893
|
-
function
|
|
3894
|
-
let { lineCounter: n, prettyErrors: r } =
|
|
3914
|
+
function Jn(e, t = {}) {
|
|
3915
|
+
let { lineCounter: n, prettyErrors: r } = qn(t), i = new Kn(n?.addNewLine), a = new On(t), o = null;
|
|
3895
3916
|
for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
|
|
3896
3917
|
else if (o.options.logLevel !== "silent") {
|
|
3897
3918
|
o.errors.push(new J(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
3898
3919
|
break;
|
|
3899
3920
|
}
|
|
3900
|
-
return r && n && (o.errors.forEach(
|
|
3921
|
+
return r && n && (o.errors.forEach(Kt(e, n)), o.warnings.forEach(Kt(e, n))), o;
|
|
3901
3922
|
}
|
|
3902
|
-
function
|
|
3923
|
+
function Yn(e, t, n) {
|
|
3903
3924
|
let r;
|
|
3904
3925
|
typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
|
|
3905
|
-
let i =
|
|
3926
|
+
let i = Jn(e, n);
|
|
3906
3927
|
if (!i) return null;
|
|
3907
3928
|
if (i.warnings.forEach((e) => Ne(i.options.logLevel, e)), i.errors.length > 0) {
|
|
3908
3929
|
if (i.options.logLevel !== "silent") throw i.errors[0];
|
|
@@ -3910,7 +3931,7 @@ function qn(e, t, n) {
|
|
|
3910
3931
|
}
|
|
3911
3932
|
return i.toJS(Object.assign({ reviver: r }, n));
|
|
3912
3933
|
}
|
|
3913
|
-
function
|
|
3934
|
+
function Xn(e, t, n) {
|
|
3914
3935
|
let r = null;
|
|
3915
3936
|
if (typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t), typeof n == "string" && (n = n.length), typeof n == "number") {
|
|
3916
3937
|
let e = Math.round(n);
|
|
@@ -3920,52 +3941,52 @@ function Jn(e, t, n) {
|
|
|
3920
3941
|
let { keepUndefined: e } = n ?? t ?? {};
|
|
3921
3942
|
if (!e) return;
|
|
3922
3943
|
}
|
|
3923
|
-
return u(e) && !r ? e.toString(n) : new
|
|
3944
|
+
return u(e) && !r ? e.toString(n) : new Ut(e, r, n).toString(n);
|
|
3924
3945
|
}
|
|
3925
3946
|
//#endregion
|
|
3926
3947
|
//#region src/skill/skill.ts
|
|
3927
|
-
var
|
|
3928
|
-
if (e === "" || e.startsWith("/") ||
|
|
3948
|
+
var Zn = "SKILL.md", Qn = 1048576, $n = 16777216, er = 100, tr = new Set([".dial-resource", ".dial-folder"]), nr = new Set(["files", "v"]), rr = /^[a-zA-Z]:/, ir = /[\x00-\x1f]/, ar = (e) => {
|
|
3949
|
+
if (e === "" || e.startsWith("/") || rr.test(e) || e.includes("\\") || ir.test(e)) return !1;
|
|
3929
3950
|
let t = e.split("/");
|
|
3930
|
-
return !(t.some((e) => e === "" || e === "." || e === "..") || t.some((e) =>
|
|
3931
|
-
},
|
|
3951
|
+
return !(t.some((e) => e === "" || e === "." || e === "..") || t.some((e) => tr.has(e)) || nr.has(t[0]));
|
|
3952
|
+
}, or = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, ""), sr = ({ name: e, description: t, instructions: n }) => `---\n${Xn({
|
|
3932
3953
|
name: e,
|
|
3933
3954
|
description: t
|
|
3934
|
-
}).trimEnd()}\n---\n\n${n}`,
|
|
3955
|
+
}).trimEnd()}\n---\n\n${n}`, cr = (e, t, n, r) => `---\n${Xn({
|
|
3935
3956
|
...e,
|
|
3936
3957
|
name: t,
|
|
3937
3958
|
description: n
|
|
3938
|
-
}).trimEnd()}\n---\n\n${r}`,
|
|
3939
|
-
let t =
|
|
3959
|
+
}).trimEnd()}\n---\n\n${r}`, lr = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/, ur = (e) => {
|
|
3960
|
+
let t = lr.exec(e);
|
|
3940
3961
|
if (!t) throw Error("SKILL.md is missing its YAML frontmatter block");
|
|
3941
3962
|
let [, n, r] = t;
|
|
3942
3963
|
return {
|
|
3943
|
-
frontmatter:
|
|
3964
|
+
frontmatter: Yn(n) ?? {},
|
|
3944
3965
|
instructions: r.replace(/^\r?\n/, "")
|
|
3945
3966
|
};
|
|
3946
|
-
},
|
|
3947
|
-
let n = e(t), r = n[
|
|
3948
|
-
if (r == null) throw Error(`Skill archive is missing a root ${
|
|
3967
|
+
}, dr = (t) => {
|
|
3968
|
+
let n = e(t), r = n[Zn];
|
|
3969
|
+
if (r == null) throw Error(`Skill archive is missing a root ${Zn} file`);
|
|
3949
3970
|
let i = /* @__PURE__ */ new Map();
|
|
3950
3971
|
for (let [e, t] of Object.entries(n)) e === "SKILL.md" || e.endsWith("/") || i.set(e, t);
|
|
3951
3972
|
return {
|
|
3952
3973
|
manifestText: new TextDecoder().decode(r),
|
|
3953
3974
|
files: i
|
|
3954
3975
|
};
|
|
3955
|
-
},
|
|
3976
|
+
}, fr = (e) => {
|
|
3956
3977
|
let t = e.lastIndexOf("/");
|
|
3957
3978
|
return t === -1 ? e : e.slice(t + 1);
|
|
3958
|
-
},
|
|
3979
|
+
}, pr = (e) => new Blob([new Uint8Array(e)]), mr = (e, t, n, r) => Object.keys(e).length > 0 ? cr(e, t, n, r) : sr({
|
|
3959
3980
|
name: t,
|
|
3960
3981
|
description: n,
|
|
3961
3982
|
instructions: r
|
|
3962
|
-
}),
|
|
3983
|
+
}), hr = (e, n) => {
|
|
3963
3984
|
let r = e.filter((e) => e.kind === t.File);
|
|
3964
3985
|
return {
|
|
3965
3986
|
filePaths: r.map((e) => e.path),
|
|
3966
|
-
files: r.map((e) =>
|
|
3987
|
+
files: r.map((e) => pr(n.get(e.path)?.bytes ?? new Uint8Array()))
|
|
3967
3988
|
};
|
|
3968
|
-
},
|
|
3989
|
+
}, gr = /^---[ \t]*$/, _r = {
|
|
3969
3990
|
whenToUse: [
|
|
3970
3991
|
"when_to_use",
|
|
3971
3992
|
"when-to-use",
|
|
@@ -3986,12 +4007,12 @@ var Yn = "SKILL.md", Xn = 1048576, Zn = 16777216, Qn = 100, $n = new Set([".dial
|
|
|
3986
4007
|
"skill-prompt",
|
|
3987
4008
|
"skillPrompt"
|
|
3988
4009
|
]
|
|
3989
|
-
},
|
|
4010
|
+
}, vr = (e, t) => {
|
|
3990
4011
|
for (let n of t) {
|
|
3991
4012
|
let t = e[n];
|
|
3992
4013
|
if (typeof t == "string" && t !== "") return t;
|
|
3993
4014
|
}
|
|
3994
|
-
},
|
|
4015
|
+
}, yr = (e, t) => {
|
|
3995
4016
|
for (let n of t) {
|
|
3996
4017
|
let t = e[n];
|
|
3997
4018
|
if (typeof t == "string" && t !== "") return [t];
|
|
@@ -3999,23 +4020,23 @@ var Yn = "SKILL.md", Xn = 1048576, Zn = 16777216, Qn = 100, $n = new Set([".dial
|
|
|
3999
4020
|
let r = t.filter((e) => typeof e == "string" && e !== "");
|
|
4000
4021
|
if (r.length > 0) return r;
|
|
4001
4022
|
}
|
|
4002
|
-
},
|
|
4003
|
-
let t = {}, n =
|
|
4023
|
+
}, br = (e) => {
|
|
4024
|
+
let t = {}, n = vr(e, _r.whenToUse);
|
|
4004
4025
|
n != null && (t.whenToUse = n);
|
|
4005
|
-
let r =
|
|
4026
|
+
let r = yr(e, _r.allowedTools);
|
|
4006
4027
|
r != null && (t.allowedTools = r);
|
|
4007
|
-
let i =
|
|
4028
|
+
let i = yr(e, _r.bundledResources);
|
|
4008
4029
|
i != null && (t.bundledResources = i);
|
|
4009
|
-
let a =
|
|
4030
|
+
let a = vr(e, _r.skillPrompt);
|
|
4010
4031
|
return a != null && (t.skillPrompt = a), Object.keys(t).length > 0 ? t : void 0;
|
|
4011
|
-
},
|
|
4032
|
+
}, xr = (e) => {
|
|
4012
4033
|
let t = e.replace(/^\uFEFF/, "").replace(/\r\n/g, "\n").split("\n"), n = t.findIndex((e) => e.trim() !== "");
|
|
4013
|
-
if (n === -1 || !
|
|
4014
|
-
let r = t.findIndex((e, t) => t > n &&
|
|
4034
|
+
if (n === -1 || !gr.test(t[n].trim())) return { body: e };
|
|
4035
|
+
let r = t.findIndex((e, t) => t > n && gr.test(e.trim()));
|
|
4015
4036
|
if (r === -1) return { body: e };
|
|
4016
4037
|
let i;
|
|
4017
4038
|
try {
|
|
4018
|
-
i =
|
|
4039
|
+
i = Yn(t.slice(n + 1, r).join("\n"));
|
|
4019
4040
|
} catch {
|
|
4020
4041
|
return { body: e };
|
|
4021
4042
|
}
|
|
@@ -4023,7 +4044,7 @@ var Yn = "SKILL.md", Xn = 1048576, Zn = 16777216, Qn = 100, $n = new Set([".dial
|
|
|
4023
4044
|
a[0] === "" && a.shift();
|
|
4024
4045
|
let o = a.join("\n");
|
|
4025
4046
|
if (typeof i != "object" || !i) return { body: o };
|
|
4026
|
-
let s = i, c =
|
|
4047
|
+
let s = i, c = vr(s, ["name"]), l = vr(s, ["description"]), u = br(s);
|
|
4027
4048
|
return {
|
|
4028
4049
|
...c == null ? {} : { name: c },
|
|
4029
4050
|
...l == null ? {} : { description: l },
|
|
@@ -4032,4 +4053,4 @@ var Yn = "SKILL.md", Xn = 1048576, Zn = 16777216, Qn = 100, $n = new Set([".dial
|
|
|
4032
4053
|
};
|
|
4033
4054
|
};
|
|
4034
4055
|
//#endregion
|
|
4035
|
-
export {
|
|
4056
|
+
export { $n as a, mr as c, fr as d, or as f, dr as h, er as i, cr as l, pr as m, Qn as n, hr as o, ur as p, Zn as r, sr as s, xr as t, ar as u };
|