@botpress/webchat 2.1.10 → 2.1.11
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/.turbo/turbo-build.log +8 -14
- package/dist/client/types.d.ts +4 -0
- package/dist/gen/signals/index.d.ts +36 -0
- package/dist/gen/signals/typingStarted.j.d.ts +3 -0
- package/dist/gen/signals/typingStarted.t.d.ts +6 -0
- package/dist/gen/signals/typingStarted.z.d.ts +22 -0
- package/dist/gen/signals/typingStopped.j.d.ts +3 -0
- package/dist/gen/signals/typingStopped.t.d.ts +4 -0
- package/dist/gen/signals/typingStopped.z.d.ts +12 -0
- package/dist/index.js +38948 -41
- package/dist/index.umd.cjs +117 -218
- package/dist/stores/webchatStore.d.ts +3 -1
- package/package.json +1 -1
- package/dist/index-4df6b320.js +0 -44762
- package/dist/index-5a1dccbb.js +0 -3240
package/dist/index-5a1dccbb.js
DELETED
|
@@ -1,3240 +0,0 @@
|
|
|
1
|
-
import { g as pi, c as _, r as Se, a as hi } from "./index-4df6b320.js";
|
|
2
|
-
function gi(e, r) {
|
|
3
|
-
for (var n = 0; n < r.length; n++) {
|
|
4
|
-
const t = r[n];
|
|
5
|
-
if (typeof t != "string" && !Array.isArray(t)) {
|
|
6
|
-
for (const i in t)
|
|
7
|
-
if (i !== "default" && !(i in e)) {
|
|
8
|
-
const l = Object.getOwnPropertyDescriptor(t, i);
|
|
9
|
-
l && Object.defineProperty(e, i, l.get ? l : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => t[i]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var Qe = {}, Ve = {};
|
|
19
|
-
const _i = !1, mi = /\r?\n/, vi = /\bono[ @]/;
|
|
20
|
-
function yi(e) {
|
|
21
|
-
return !!(e && e.configurable && typeof e.get == "function");
|
|
22
|
-
}
|
|
23
|
-
function xi(e) {
|
|
24
|
-
return !!// If there is no stack property, then it's writable, since assigning it will create it
|
|
25
|
-
(!e || e.writable || typeof e.set == "function");
|
|
26
|
-
}
|
|
27
|
-
function on(e, r) {
|
|
28
|
-
let n = ln(e.stack), t = r ? r.stack : void 0;
|
|
29
|
-
return n && t ? n + `
|
|
30
|
-
|
|
31
|
-
` + t : n || t;
|
|
32
|
-
}
|
|
33
|
-
function wi(e, r, n) {
|
|
34
|
-
n ? Object.defineProperty(r, "stack", {
|
|
35
|
-
get: () => {
|
|
36
|
-
let t = e.get.apply(r);
|
|
37
|
-
return on({ stack: t }, n);
|
|
38
|
-
},
|
|
39
|
-
enumerable: !1,
|
|
40
|
-
configurable: !0
|
|
41
|
-
}) : bi(r, e);
|
|
42
|
-
}
|
|
43
|
-
function ln(e) {
|
|
44
|
-
if (e) {
|
|
45
|
-
let r = e.split(mi), n;
|
|
46
|
-
for (let t = 0; t < r.length; t++) {
|
|
47
|
-
let i = r[t];
|
|
48
|
-
if (vi.test(i))
|
|
49
|
-
n === void 0 && (n = t);
|
|
50
|
-
else if (n !== void 0) {
|
|
51
|
-
r.splice(n, t - n);
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (r.length > 0)
|
|
56
|
-
return r.join(`
|
|
57
|
-
`);
|
|
58
|
-
}
|
|
59
|
-
return e;
|
|
60
|
-
}
|
|
61
|
-
function bi(e, r) {
|
|
62
|
-
Object.defineProperty(e, "stack", {
|
|
63
|
-
get: () => ln(r.get.apply(e)),
|
|
64
|
-
enumerable: !1,
|
|
65
|
-
configurable: !0
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
const Ei = ["function", "symbol", "undefined"], Oi = ["constructor", "prototype", "__proto__"], Ai = Object.getPrototypeOf({});
|
|
69
|
-
function un() {
|
|
70
|
-
let e = {}, r = this;
|
|
71
|
-
for (let n of an(r))
|
|
72
|
-
if (typeof n == "string") {
|
|
73
|
-
let t = r[n], i = typeof t;
|
|
74
|
-
Ei.includes(i) || (e[n] = t);
|
|
75
|
-
}
|
|
76
|
-
return e;
|
|
77
|
-
}
|
|
78
|
-
function an(e, r = []) {
|
|
79
|
-
let n = [];
|
|
80
|
-
for (; e && e !== Ai; )
|
|
81
|
-
n = n.concat(Object.getOwnPropertyNames(e), Object.getOwnPropertySymbols(e)), e = Object.getPrototypeOf(e);
|
|
82
|
-
let t = new Set(n);
|
|
83
|
-
for (let i of r.concat(Oi))
|
|
84
|
-
t.delete(i);
|
|
85
|
-
return t;
|
|
86
|
-
}
|
|
87
|
-
const Pi = ["name", "message", "stack"];
|
|
88
|
-
function me(e, r, n) {
|
|
89
|
-
let t = e;
|
|
90
|
-
return Si(t, r), r && typeof r == "object" && $i(t, r), t.toJSON = un, n && typeof n == "object" && Object.assign(t, n), t;
|
|
91
|
-
}
|
|
92
|
-
function Si(e, r) {
|
|
93
|
-
let n = Object.getOwnPropertyDescriptor(e, "stack");
|
|
94
|
-
yi(n) ? wi(n, e, r) : xi(n) && (e.stack = on(e, r));
|
|
95
|
-
}
|
|
96
|
-
function $i(e, r) {
|
|
97
|
-
let n = an(r, Pi), t = e, i = r;
|
|
98
|
-
for (let l of n)
|
|
99
|
-
if (t[l] === void 0)
|
|
100
|
-
try {
|
|
101
|
-
t[l] = i[l];
|
|
102
|
-
} catch {
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function ji(e) {
|
|
106
|
-
return e = e || {}, {
|
|
107
|
-
concatMessages: e.concatMessages === void 0 ? !0 : !!e.concatMessages,
|
|
108
|
-
format: e.format === void 0 ? _i : typeof e.format == "function" ? e.format : !1
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function Ci(e, r) {
|
|
112
|
-
let n, t, i, l = "";
|
|
113
|
-
return typeof e[0] == "string" ? i = e : typeof e[1] == "string" ? (e[0] instanceof Error ? n = e[0] : t = e[0], i = e.slice(1)) : (n = e[0], t = e[1], i = e.slice(2)), i.length > 0 && (r.format ? l = r.format.apply(void 0, i) : l = i.join(" ")), r.concatMessages && n && n.message && (l += (l ? `
|
|
114
|
-
` : "") + n.message), { originalError: n, props: t, message: l };
|
|
115
|
-
}
|
|
116
|
-
const Y = Xe;
|
|
117
|
-
function Xe(e, r) {
|
|
118
|
-
r = ji(r);
|
|
119
|
-
function n(...t) {
|
|
120
|
-
let { originalError: i, props: l, message: o } = Ci(t, r), u = new e(o);
|
|
121
|
-
return me(u, i, l);
|
|
122
|
-
}
|
|
123
|
-
return n[Symbol.species] = e, n;
|
|
124
|
-
}
|
|
125
|
-
Xe.toJSON = function(r) {
|
|
126
|
-
return un.call(r);
|
|
127
|
-
};
|
|
128
|
-
Xe.extend = function(r, n, t) {
|
|
129
|
-
return t || n instanceof Error ? me(r, n, t) : n ? me(r, void 0, n) : me(r);
|
|
130
|
-
};
|
|
131
|
-
const Ar = I;
|
|
132
|
-
I.error = new Y(Error);
|
|
133
|
-
I.eval = new Y(EvalError);
|
|
134
|
-
I.range = new Y(RangeError);
|
|
135
|
-
I.reference = new Y(ReferenceError);
|
|
136
|
-
I.syntax = new Y(SyntaxError);
|
|
137
|
-
I.type = new Y(TypeError);
|
|
138
|
-
I.uri = new Y(URIError);
|
|
139
|
-
const Ti = I;
|
|
140
|
-
function I(...e) {
|
|
141
|
-
let r = e[0];
|
|
142
|
-
if (typeof r == "object" && typeof r.name == "string") {
|
|
143
|
-
for (let n of Object.values(Ti))
|
|
144
|
-
if (typeof n == "function" && n.name === "ono") {
|
|
145
|
-
let t = n[Symbol.species];
|
|
146
|
-
if (t && t !== Error && (r instanceof t || r.name === t.name))
|
|
147
|
-
return n.apply(void 0, e);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return I.error.apply(void 0, e);
|
|
151
|
-
}
|
|
152
|
-
typeof module == "object" && typeof module.exports == "object" && (module.exports = Object.assign(module.exports.default, module.exports));
|
|
153
|
-
const Ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
154
|
-
__proto__: null,
|
|
155
|
-
Ono: Y,
|
|
156
|
-
default: Ar,
|
|
157
|
-
ono: Ar
|
|
158
|
-
}, Symbol.toStringTag, { value: "Module" })), q = /* @__PURE__ */ pi(Ri);
|
|
159
|
-
var he = {}, ge = {}, O = {}, $e = {}, Mi = _ && _.__importDefault || function(e) {
|
|
160
|
-
return e && e.__esModule ? e : { default: e };
|
|
161
|
-
};
|
|
162
|
-
Object.defineProperty($e, "__esModule", { value: !0 });
|
|
163
|
-
const Pr = Mi(Se);
|
|
164
|
-
function Fi(e) {
|
|
165
|
-
var n, t, i, l;
|
|
166
|
-
return e.startsWith("\\\\?\\") ? e : e.split((t = (n = Pr.default) == null ? void 0 : n.win32) == null ? void 0 : t.sep).join(((l = (i = Pr.default) == null ? void 0 : i.posix) == null ? void 0 : l.sep) ?? "/");
|
|
167
|
-
}
|
|
168
|
-
$e.default = Fi;
|
|
169
|
-
var je = {};
|
|
170
|
-
Object.defineProperty(je, "__esModule", { value: !0 });
|
|
171
|
-
je.isWindows = void 0;
|
|
172
|
-
const Ii = /^win/.test(globalThis.process ? globalThis.process.platform : ""), Di = () => Ii;
|
|
173
|
-
je.isWindows = Di;
|
|
174
|
-
var Ni = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
175
|
-
t === void 0 && (t = n);
|
|
176
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
177
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
178
|
-
return r[n];
|
|
179
|
-
} }), Object.defineProperty(e, t, i);
|
|
180
|
-
} : function(e, r, n, t) {
|
|
181
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
182
|
-
}), Li = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
183
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
184
|
-
} : function(e, r) {
|
|
185
|
-
e.default = r;
|
|
186
|
-
}), Bi = _ && _.__importStar || function(e) {
|
|
187
|
-
if (e && e.__esModule)
|
|
188
|
-
return e;
|
|
189
|
-
var r = {};
|
|
190
|
-
if (e != null)
|
|
191
|
-
for (var n in e)
|
|
192
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && Ni(r, e, n);
|
|
193
|
-
return Li(r, e), r;
|
|
194
|
-
}, Hi = _ && _.__importDefault || function(e) {
|
|
195
|
-
return e && e.__esModule ? e : { default: e };
|
|
196
|
-
};
|
|
197
|
-
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
198
|
-
O.relative = O.safePointerToPath = O.toFileSystemPath = O.fromFileSystemPath = O.isFileSystemPath = O.isHttp = O.stripHash = O.getHash = O.stripQuery = O.getExtension = O.getProtocol = O.cwd = O.resolve = O.parse = void 0;
|
|
199
|
-
const ye = Hi($e), ke = Bi(Se), ki = /\//g, Ui = /^(\w{2,}):\/\//i, Yi = /~1/g, Gi = /~0/g, Wi = Se, ve = je, Ji = [
|
|
200
|
-
[/\?/g, "%3F"],
|
|
201
|
-
[/#/g, "%23"]
|
|
202
|
-
], Ie = [/%23/g, "#", /%24/g, "$", /%26/g, "&", /%2C/g, ",", /%40/g, "@"], qi = (e) => new URL(e);
|
|
203
|
-
O.parse = qi;
|
|
204
|
-
function cn(e, r) {
|
|
205
|
-
var l;
|
|
206
|
-
const n = new URL((0, ye.default)(e), "resolve://"), t = new URL((0, ye.default)(r), n), i = ((l = r.match(/(\s*)$/)) == null ? void 0 : l[1]) || "";
|
|
207
|
-
if (t.protocol === "resolve:") {
|
|
208
|
-
const { pathname: o, search: u, hash: a } = t;
|
|
209
|
-
return o + u + a + i;
|
|
210
|
-
}
|
|
211
|
-
return t.toString() + i;
|
|
212
|
-
}
|
|
213
|
-
O.resolve = cn;
|
|
214
|
-
function fn() {
|
|
215
|
-
if (typeof window < "u")
|
|
216
|
-
return location.href;
|
|
217
|
-
const e = process.cwd(), r = e.slice(-1);
|
|
218
|
-
return r === "/" || r === "\\" ? e : e + "/";
|
|
219
|
-
}
|
|
220
|
-
O.cwd = fn;
|
|
221
|
-
function Ze(e) {
|
|
222
|
-
const r = Ui.exec(e || "");
|
|
223
|
-
if (r)
|
|
224
|
-
return r[1].toLowerCase();
|
|
225
|
-
}
|
|
226
|
-
O.getProtocol = Ze;
|
|
227
|
-
function Ki(e) {
|
|
228
|
-
const r = e.lastIndexOf(".");
|
|
229
|
-
return r >= 0 ? sn(e.substr(r).toLowerCase()) : "";
|
|
230
|
-
}
|
|
231
|
-
O.getExtension = Ki;
|
|
232
|
-
function sn(e) {
|
|
233
|
-
const r = e.indexOf("?");
|
|
234
|
-
return r >= 0 && (e = e.substr(0, r)), e;
|
|
235
|
-
}
|
|
236
|
-
O.stripQuery = sn;
|
|
237
|
-
function dn(e) {
|
|
238
|
-
if (!e)
|
|
239
|
-
return "#";
|
|
240
|
-
const r = e.indexOf("#");
|
|
241
|
-
return r >= 0 ? e.substring(r) : "#";
|
|
242
|
-
}
|
|
243
|
-
O.getHash = dn;
|
|
244
|
-
function Ue(e) {
|
|
245
|
-
if (!e)
|
|
246
|
-
return "";
|
|
247
|
-
const r = e.indexOf("#");
|
|
248
|
-
return r >= 0 && (e = e.substring(0, r)), e;
|
|
249
|
-
}
|
|
250
|
-
O.stripHash = Ue;
|
|
251
|
-
function zi(e) {
|
|
252
|
-
const r = Ze(e);
|
|
253
|
-
return r === "http" || r === "https" ? !0 : r === void 0 ? typeof window < "u" : !1;
|
|
254
|
-
}
|
|
255
|
-
O.isHttp = zi;
|
|
256
|
-
function Ye(e) {
|
|
257
|
-
if (typeof window < "u" || process.browser)
|
|
258
|
-
return !1;
|
|
259
|
-
const r = Ze(e);
|
|
260
|
-
return r === void 0 || r === "file";
|
|
261
|
-
}
|
|
262
|
-
O.isFileSystemPath = Ye;
|
|
263
|
-
function Qi(e) {
|
|
264
|
-
var r;
|
|
265
|
-
if ((0, ve.isWindows)()) {
|
|
266
|
-
const n = fn(), t = e.toUpperCase(), l = (0, ye.default)(n).toUpperCase(), o = t.includes(l), u = t.includes(l), a = ((r = ke.win32) == null ? void 0 : r.isAbsolute(e)) || e.startsWith("http://") || e.startsWith("https://") || e.startsWith("file://");
|
|
267
|
-
!(o || u || a) && !n.startsWith("http") && (e = (0, Wi.join)(n, e)), e = (0, ye.default)(e);
|
|
268
|
-
}
|
|
269
|
-
e = encodeURI(e);
|
|
270
|
-
for (const n of Ji)
|
|
271
|
-
e = e.replace(n[0], n[1]);
|
|
272
|
-
return e;
|
|
273
|
-
}
|
|
274
|
-
O.fromFileSystemPath = Qi;
|
|
275
|
-
function Vi(e, r) {
|
|
276
|
-
e = decodeURI(e);
|
|
277
|
-
for (let t = 0; t < Ie.length; t += 2)
|
|
278
|
-
e = e.replace(Ie[t], Ie[t + 1]);
|
|
279
|
-
let n = e.substr(0, 7).toLowerCase() === "file://";
|
|
280
|
-
return n && (e = e[7] === "/" ? e.substr(8) : e.substr(7), (0, ve.isWindows)() && e[1] === "/" && (e = e[0] + ":" + e.substr(1)), r ? e = "file:///" + e : (n = !1, e = (0, ve.isWindows)() ? e : "/" + e)), (0, ve.isWindows)() && !n && (e = e.replace(ki, "\\"), e.substr(1, 2) === ":\\" && (e = e[0].toUpperCase() + e.substr(1))), e;
|
|
281
|
-
}
|
|
282
|
-
O.toFileSystemPath = Vi;
|
|
283
|
-
function Xi(e) {
|
|
284
|
-
return e.length <= 1 || e[0] !== "#" || e[1] !== "/" ? [] : e.slice(2).split("/").map((r) => decodeURIComponent(r).replace(Yi, "/").replace(Gi, "~"));
|
|
285
|
-
}
|
|
286
|
-
O.safePointerToPath = Xi;
|
|
287
|
-
function Zi(e, r) {
|
|
288
|
-
if (!Ye(e) || !Ye(r))
|
|
289
|
-
return cn(e, r);
|
|
290
|
-
const n = ke.default.dirname(Ue(e)), t = Ue(r);
|
|
291
|
-
return ke.default.relative(n, t) + dn(r);
|
|
292
|
-
}
|
|
293
|
-
O.relative = Zi;
|
|
294
|
-
var A = {};
|
|
295
|
-
Object.defineProperty(A, "__esModule", { value: !0 });
|
|
296
|
-
A.normalizeError = A.isHandledError = A.InvalidPointerError = A.TimeoutError = A.MissingPointerError = A.UnmatchedResolverError = A.ResolverError = A.UnmatchedParserError = A.ParserError = A.JSONParserErrorGroup = A.JSONParserError = void 0;
|
|
297
|
-
const pn = q, er = O;
|
|
298
|
-
class N extends Error {
|
|
299
|
-
constructor(r, n) {
|
|
300
|
-
super(), this.code = "EUNKNOWN", this.name = "JSONParserError", this.message = r, this.source = n, this.path = null, pn.Ono.extend(this);
|
|
301
|
-
}
|
|
302
|
-
get footprint() {
|
|
303
|
-
return `${this.path}+${this.source}+${this.code}+${this.message}`;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
A.JSONParserError = N;
|
|
307
|
-
class Ce extends Error {
|
|
308
|
-
constructor(r) {
|
|
309
|
-
super(), this.files = r, this.name = "JSONParserErrorGroup", this.message = `${this.errors.length} error${this.errors.length > 1 ? "s" : ""} occurred while reading '${(0, er.toFileSystemPath)(r.$refs._root$Ref.path)}'`, pn.Ono.extend(this);
|
|
310
|
-
}
|
|
311
|
-
static getParserErrors(r) {
|
|
312
|
-
const n = [];
|
|
313
|
-
for (const t of Object.values(r.$refs._$refs))
|
|
314
|
-
t.errors && n.push(...t.errors);
|
|
315
|
-
return n;
|
|
316
|
-
}
|
|
317
|
-
get errors() {
|
|
318
|
-
return Ce.getParserErrors(this.files);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
A.JSONParserErrorGroup = Ce;
|
|
322
|
-
class et extends N {
|
|
323
|
-
constructor(r, n) {
|
|
324
|
-
super(`Error parsing ${n}: ${r}`, n), this.code = "EPARSER", this.name = "ParserError";
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
A.ParserError = et;
|
|
328
|
-
class rt extends N {
|
|
329
|
-
constructor(r) {
|
|
330
|
-
super(`Could not find parser for "${r}"`, r), this.code = "EUNMATCHEDPARSER", this.name = "UnmatchedParserError";
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
A.UnmatchedParserError = rt;
|
|
334
|
-
class nt extends N {
|
|
335
|
-
constructor(r, n) {
|
|
336
|
-
super(r.message || `Error reading file "${n}"`, n), this.code = "ERESOLVER", this.name = "ResolverError", "code" in r && (this.ioErrorCode = String(r.code));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
A.ResolverError = nt;
|
|
340
|
-
class it extends N {
|
|
341
|
-
constructor(r) {
|
|
342
|
-
super(`Could not find resolver for "${r}"`, r), this.code = "EUNMATCHEDRESOLVER", this.name = "UnmatchedResolverError";
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
A.UnmatchedResolverError = it;
|
|
346
|
-
class tt extends N {
|
|
347
|
-
constructor(r, n) {
|
|
348
|
-
super(`Token "${r}" does not exist.`, (0, er.stripHash)(n)), this.code = "EUNMATCHEDRESOLVER", this.name = "MissingPointerError";
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
A.MissingPointerError = tt;
|
|
352
|
-
class ot extends N {
|
|
353
|
-
constructor(r) {
|
|
354
|
-
super(`Dereferencing timeout reached: ${r}ms`), this.code = "ETIMEOUT", this.name = "TimeoutError";
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
A.TimeoutError = ot;
|
|
358
|
-
class lt extends N {
|
|
359
|
-
constructor(r, n) {
|
|
360
|
-
super(`Invalid $ref pointer "${r}". Pointers must begin with "#/"`, (0, er.stripHash)(n)), this.code = "EUNMATCHEDRESOLVER", this.name = "InvalidPointerError";
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
A.InvalidPointerError = lt;
|
|
364
|
-
function ut(e) {
|
|
365
|
-
return e instanceof N || e instanceof Ce;
|
|
366
|
-
}
|
|
367
|
-
A.isHandledError = ut;
|
|
368
|
-
function at(e) {
|
|
369
|
-
return e.path === null && (e.path = []), e;
|
|
370
|
-
}
|
|
371
|
-
A.normalizeError = at;
|
|
372
|
-
var Sr;
|
|
373
|
-
function Te() {
|
|
374
|
-
if (Sr)
|
|
375
|
-
return ge;
|
|
376
|
-
Sr = 1;
|
|
377
|
-
var e = _ && _.__createBinding || (Object.create ? function(d, c, x, E) {
|
|
378
|
-
E === void 0 && (E = x);
|
|
379
|
-
var v = Object.getOwnPropertyDescriptor(c, x);
|
|
380
|
-
(!v || ("get" in v ? !c.__esModule : v.writable || v.configurable)) && (v = { enumerable: !0, get: function() {
|
|
381
|
-
return c[x];
|
|
382
|
-
} }), Object.defineProperty(d, E, v);
|
|
383
|
-
} : function(d, c, x, E) {
|
|
384
|
-
E === void 0 && (E = x), d[E] = c[x];
|
|
385
|
-
}), r = _ && _.__setModuleDefault || (Object.create ? function(d, c) {
|
|
386
|
-
Object.defineProperty(d, "default", { enumerable: !0, value: c });
|
|
387
|
-
} : function(d, c) {
|
|
388
|
-
d.default = c;
|
|
389
|
-
}), n = _ && _.__importStar || function(d) {
|
|
390
|
-
if (d && d.__esModule)
|
|
391
|
-
return d;
|
|
392
|
-
var c = {};
|
|
393
|
-
if (d != null)
|
|
394
|
-
for (var x in d)
|
|
395
|
-
x !== "default" && Object.prototype.hasOwnProperty.call(d, x) && e(c, d, x);
|
|
396
|
-
return r(c, d), c;
|
|
397
|
-
}, t = _ && _.__importDefault || function(d) {
|
|
398
|
-
return d && d.__esModule ? d : { default: d };
|
|
399
|
-
};
|
|
400
|
-
Object.defineProperty(ge, "__esModule", { value: !0 });
|
|
401
|
-
const i = t(ce()), l = n(O), o = A, u = /\//g, a = /~/g, f = /~1/g, h = /~0/g, s = (d) => {
|
|
402
|
-
try {
|
|
403
|
-
return decodeURIComponent(d);
|
|
404
|
-
} catch {
|
|
405
|
-
return d;
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
class p {
|
|
409
|
-
constructor(c, x, E) {
|
|
410
|
-
this.$ref = c, this.path = x, this.originalPath = E || x, this.value = void 0, this.circular = !1, this.indirections = 0;
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Resolves the value of a nested property within the given object.
|
|
414
|
-
*
|
|
415
|
-
* @param obj - The object that will be crawled
|
|
416
|
-
* @param options
|
|
417
|
-
* @param pathFromRoot - the path of place that initiated resolving
|
|
418
|
-
*
|
|
419
|
-
* @returns
|
|
420
|
-
* Returns a JSON pointer whose {@link Pointer#value} is the resolved value.
|
|
421
|
-
* If resolving this value required resolving other JSON references, then
|
|
422
|
-
* the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path
|
|
423
|
-
* of the resolved value.
|
|
424
|
-
*/
|
|
425
|
-
resolve(c, x, E) {
|
|
426
|
-
const v = p.parse(this.path, this.originalPath);
|
|
427
|
-
this.value = y(c);
|
|
428
|
-
for (let P = 0; P < v.length; P++) {
|
|
429
|
-
if (g(this, x, E) && (this.path = p.join(this.path, v.slice(P))), typeof this.value == "object" && this.value !== null && !b(E) && "$ref" in this.value)
|
|
430
|
-
return this;
|
|
431
|
-
const L = v[P];
|
|
432
|
-
if (this.value[L] === void 0 || this.value[L] === null && P === v.length - 1) {
|
|
433
|
-
let Er = !1;
|
|
434
|
-
for (let pe = v.length - 1; pe > P; pe--) {
|
|
435
|
-
const Or = v.slice(P, pe + 1).join("/");
|
|
436
|
-
if (this.value[Or] !== void 0) {
|
|
437
|
-
this.value = this.value[Or], P = pe, Er = !0;
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
if (Er)
|
|
442
|
-
continue;
|
|
443
|
-
throw this.value = null, new o.MissingPointerError(L, decodeURI(this.originalPath));
|
|
444
|
-
} else
|
|
445
|
-
this.value = this.value[L];
|
|
446
|
-
}
|
|
447
|
-
return (!this.value || this.value.$ref && l.resolve(this.path, this.value.$ref) !== E) && g(this, x, E), this;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Sets the value of a nested property within the given object.
|
|
451
|
-
*
|
|
452
|
-
* @param obj - The object that will be crawled
|
|
453
|
-
* @param value - the value to assign
|
|
454
|
-
* @param options
|
|
455
|
-
*
|
|
456
|
-
* @returns
|
|
457
|
-
* Returns the modified object, or an entirely new object if the entire object is overwritten.
|
|
458
|
-
*/
|
|
459
|
-
set(c, x, E) {
|
|
460
|
-
const v = p.parse(this.path);
|
|
461
|
-
let P;
|
|
462
|
-
if (v.length === 0)
|
|
463
|
-
return this.value = x, x;
|
|
464
|
-
this.value = y(c);
|
|
465
|
-
for (let L = 0; L < v.length - 1; L++)
|
|
466
|
-
g(this, E), P = v[L], this.value && this.value[P] !== void 0 ? this.value = this.value[P] : this.value = m(this, P, {});
|
|
467
|
-
return g(this, E), P = v[v.length - 1], m(this, P, x), c;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Parses a JSON pointer (or a path containing a JSON pointer in the hash)
|
|
471
|
-
* and returns an array of the pointer's tokens.
|
|
472
|
-
* (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"])
|
|
473
|
-
*
|
|
474
|
-
* The pointer is parsed according to RFC 6901
|
|
475
|
-
* {@link https://tools.ietf.org/html/rfc6901#section-3}
|
|
476
|
-
*
|
|
477
|
-
* @param path
|
|
478
|
-
* @param [originalPath]
|
|
479
|
-
* @returns
|
|
480
|
-
*/
|
|
481
|
-
static parse(c, x) {
|
|
482
|
-
const E = l.getHash(c).substring(1);
|
|
483
|
-
if (!E)
|
|
484
|
-
return [];
|
|
485
|
-
const v = E.split("/");
|
|
486
|
-
for (let P = 0; P < v.length; P++)
|
|
487
|
-
v[P] = s(v[P].replace(f, "/").replace(h, "~"));
|
|
488
|
-
if (v[0] !== "")
|
|
489
|
-
throw new o.InvalidPointerError(v, x === void 0 ? c : x);
|
|
490
|
-
return v.slice(1);
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Creates a JSON pointer path, by joining one or more tokens to a base path.
|
|
494
|
-
*
|
|
495
|
-
* @param base - The base path (e.g. "schema.json#/definitions/person")
|
|
496
|
-
* @param tokens - The token(s) to append (e.g. ["name", "first"])
|
|
497
|
-
* @returns
|
|
498
|
-
*/
|
|
499
|
-
static join(c, x) {
|
|
500
|
-
c.indexOf("#") === -1 && (c += "#"), x = Array.isArray(x) ? x : [x];
|
|
501
|
-
for (let E = 0; E < x.length; E++) {
|
|
502
|
-
const v = x[E];
|
|
503
|
-
c += "/" + encodeURIComponent(v.replace(a, "~0").replace(u, "~1"));
|
|
504
|
-
}
|
|
505
|
-
return c;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
function g(d, c, x) {
|
|
509
|
-
if (i.default.isAllowed$Ref(d.value, c)) {
|
|
510
|
-
const E = l.resolve(d.path, d.value.$ref);
|
|
511
|
-
if (E === d.path && !b(x))
|
|
512
|
-
d.circular = !0;
|
|
513
|
-
else {
|
|
514
|
-
const v = d.$ref.$refs._resolve(E, d.path, c);
|
|
515
|
-
return v === null ? !1 : (d.indirections += v.indirections + 1, i.default.isExtended$Ref(d.value) ? (d.value = i.default.dereference(d.value, v.value), !1) : (d.$ref = v.$ref, d.path = v.path, d.value = v.value, !0));
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
ge.default = p;
|
|
520
|
-
function m(d, c, x) {
|
|
521
|
-
if (d.value && typeof d.value == "object")
|
|
522
|
-
c === "-" && Array.isArray(d.value) ? d.value.push(x) : d.value[c] = x;
|
|
523
|
-
else
|
|
524
|
-
throw new o.JSONParserError(`Error assigning $ref pointer "${d.path}".
|
|
525
|
-
Cannot set "${c}" of a non-object.`);
|
|
526
|
-
return x;
|
|
527
|
-
}
|
|
528
|
-
function y(d) {
|
|
529
|
-
if ((0, o.isHandledError)(d))
|
|
530
|
-
throw d;
|
|
531
|
-
return d;
|
|
532
|
-
}
|
|
533
|
-
function b(d) {
|
|
534
|
-
return typeof d == "string" && p.parse(d).length == 0;
|
|
535
|
-
}
|
|
536
|
-
return ge;
|
|
537
|
-
}
|
|
538
|
-
var $r;
|
|
539
|
-
function ce() {
|
|
540
|
-
if ($r)
|
|
541
|
-
return he;
|
|
542
|
-
$r = 1;
|
|
543
|
-
var e = _ && _.__importDefault || function(l) {
|
|
544
|
-
return l && l.__esModule ? l : { default: l };
|
|
545
|
-
};
|
|
546
|
-
Object.defineProperty(he, "__esModule", { value: !0 });
|
|
547
|
-
const r = e(Te()), n = A, t = O;
|
|
548
|
-
class i {
|
|
549
|
-
constructor(o) {
|
|
550
|
-
this.errors = [], this.$refs = o;
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Pushes an error to errors array.
|
|
554
|
-
*
|
|
555
|
-
* @param err - The error to be pushed
|
|
556
|
-
* @returns
|
|
557
|
-
*/
|
|
558
|
-
addError(o) {
|
|
559
|
-
this.errors === void 0 && (this.errors = []);
|
|
560
|
-
const u = this.errors.map(({ footprint: a }) => a);
|
|
561
|
-
"errors" in o && Array.isArray(o.errors) ? this.errors.push(...o.errors.map(n.normalizeError).filter(({ footprint: a }) => !u.includes(a))) : (!("footprint" in o) || !u.includes(o.footprint)) && this.errors.push((0, n.normalizeError)(o));
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Determines whether the given JSON reference exists within this {@link $Ref#value}.
|
|
565
|
-
*
|
|
566
|
-
* @param path - The full path being resolved, optionally with a JSON pointer in the hash
|
|
567
|
-
* @param options
|
|
568
|
-
* @returns
|
|
569
|
-
*/
|
|
570
|
-
exists(o, u) {
|
|
571
|
-
try {
|
|
572
|
-
return this.resolve(o, u), !0;
|
|
573
|
-
} catch {
|
|
574
|
-
return !1;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Resolves the given JSON reference within this {@link $Ref#value} and returns the resolved value.
|
|
579
|
-
*
|
|
580
|
-
* @param path - The full path being resolved, optionally with a JSON pointer in the hash
|
|
581
|
-
* @param options
|
|
582
|
-
* @returns - Returns the resolved value
|
|
583
|
-
*/
|
|
584
|
-
get(o, u) {
|
|
585
|
-
var a;
|
|
586
|
-
return (a = this.resolve(o, u)) == null ? void 0 : a.value;
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* Resolves the given JSON reference within this {@link $Ref#value}.
|
|
590
|
-
*
|
|
591
|
-
* @param path - The full path being resolved, optionally with a JSON pointer in the hash
|
|
592
|
-
* @param options
|
|
593
|
-
* @param friendlyPath - The original user-specified path (used for error messages)
|
|
594
|
-
* @param pathFromRoot - The path of `obj` from the schema root
|
|
595
|
-
* @returns
|
|
596
|
-
*/
|
|
597
|
-
resolve(o, u, a, f) {
|
|
598
|
-
const h = new r.default(this, o, a);
|
|
599
|
-
try {
|
|
600
|
-
return h.resolve(this.value, u, f);
|
|
601
|
-
} catch (s) {
|
|
602
|
-
if (!u || !u.continueOnError || !(0, n.isHandledError)(s))
|
|
603
|
-
throw s;
|
|
604
|
-
return s.path === null && (s.path = (0, t.safePointerToPath)((0, t.getHash)(f))), s instanceof n.InvalidPointerError && (s.source = decodeURI((0, t.stripHash)(f))), this.addError(s), null;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Sets the value of a nested property within this {@link $Ref#value}.
|
|
609
|
-
* If the property, or any of its parents don't exist, they will be created.
|
|
610
|
-
*
|
|
611
|
-
* @param path - The full path of the property to set, optionally with a JSON pointer in the hash
|
|
612
|
-
* @param value - The value to assign
|
|
613
|
-
*/
|
|
614
|
-
set(o, u) {
|
|
615
|
-
const a = new r.default(this, o);
|
|
616
|
-
this.value = a.set(this.value, u);
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Determines whether the given value is a JSON reference.
|
|
620
|
-
*
|
|
621
|
-
* @param value - The value to inspect
|
|
622
|
-
* @returns
|
|
623
|
-
*/
|
|
624
|
-
static is$Ref(o) {
|
|
625
|
-
return !!o && typeof o == "object" && o !== null && "$ref" in o && typeof o.$ref == "string" && o.$ref.length > 0;
|
|
626
|
-
}
|
|
627
|
-
/**
|
|
628
|
-
* Determines whether the given value is an external JSON reference.
|
|
629
|
-
*
|
|
630
|
-
* @param value - The value to inspect
|
|
631
|
-
* @returns
|
|
632
|
-
*/
|
|
633
|
-
static isExternal$Ref(o) {
|
|
634
|
-
return i.is$Ref(o) && o.$ref[0] !== "#";
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* Determines whether the given value is a JSON reference, and whether it is allowed by the options.
|
|
638
|
-
* For example, if it references an external file, then options.resolve.external must be true.
|
|
639
|
-
*
|
|
640
|
-
* @param value - The value to inspect
|
|
641
|
-
* @param options
|
|
642
|
-
* @returns
|
|
643
|
-
*/
|
|
644
|
-
static isAllowed$Ref(o, u) {
|
|
645
|
-
var a;
|
|
646
|
-
if (this.is$Ref(o)) {
|
|
647
|
-
if (o.$ref.substring(0, 2) === "#/" || o.$ref === "#")
|
|
648
|
-
return !0;
|
|
649
|
-
if (o.$ref[0] !== "#" && (!u || (a = u.resolve) != null && a.external))
|
|
650
|
-
return !0;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Determines whether the given value is a JSON reference that "extends" its resolved value.
|
|
655
|
-
* That is, it has extra properties (in addition to "$ref"), so rather than simply pointing to
|
|
656
|
-
* an existing value, this $ref actually creates a NEW value that is a shallow copy of the resolved
|
|
657
|
-
* value, plus the extra properties.
|
|
658
|
-
*
|
|
659
|
-
* @example: {
|
|
660
|
-
person: {
|
|
661
|
-
properties: {
|
|
662
|
-
firstName: { type: string }
|
|
663
|
-
lastName: { type: string }
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
employee: {
|
|
667
|
-
properties: {
|
|
668
|
-
$ref: #/person/properties
|
|
669
|
-
salary: { type: number }
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
* In this example, "employee" is an extended $ref, since it extends "person" with an additional
|
|
674
|
-
* property (salary). The result is a NEW value that looks like this:
|
|
675
|
-
*
|
|
676
|
-
* {
|
|
677
|
-
* properties: {
|
|
678
|
-
* firstName: { type: string }
|
|
679
|
-
* lastName: { type: string }
|
|
680
|
-
* salary: { type: number }
|
|
681
|
-
* }
|
|
682
|
-
* }
|
|
683
|
-
*
|
|
684
|
-
* @param value - The value to inspect
|
|
685
|
-
* @returns
|
|
686
|
-
*/
|
|
687
|
-
static isExtended$Ref(o) {
|
|
688
|
-
return i.is$Ref(o) && Object.keys(o).length > 1;
|
|
689
|
-
}
|
|
690
|
-
/**
|
|
691
|
-
* Returns the resolved value of a JSON Reference.
|
|
692
|
-
* If necessary, the resolved value is merged with the JSON Reference to create a new object
|
|
693
|
-
*
|
|
694
|
-
* @example: {
|
|
695
|
-
person: {
|
|
696
|
-
properties: {
|
|
697
|
-
firstName: { type: string }
|
|
698
|
-
lastName: { type: string }
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
employee: {
|
|
702
|
-
properties: {
|
|
703
|
-
$ref: #/person/properties
|
|
704
|
-
salary: { type: number }
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
} When "person" and "employee" are merged, you end up with the following object:
|
|
708
|
-
*
|
|
709
|
-
* {
|
|
710
|
-
* properties: {
|
|
711
|
-
* firstName: { type: string }
|
|
712
|
-
* lastName: { type: string }
|
|
713
|
-
* salary: { type: number }
|
|
714
|
-
* }
|
|
715
|
-
* }
|
|
716
|
-
*
|
|
717
|
-
* @param $ref - The JSON reference object (the one with the "$ref" property)
|
|
718
|
-
* @param resolvedValue - The resolved value, which can be any type
|
|
719
|
-
* @returns - Returns the dereferenced value
|
|
720
|
-
*/
|
|
721
|
-
static dereference(o, u) {
|
|
722
|
-
if (u && typeof u == "object" && i.isExtended$Ref(o)) {
|
|
723
|
-
const a = {};
|
|
724
|
-
for (const f of Object.keys(o))
|
|
725
|
-
f !== "$ref" && (a[f] = o[f]);
|
|
726
|
-
for (const f of Object.keys(u))
|
|
727
|
-
f in a || (a[f] = u[f]);
|
|
728
|
-
return a;
|
|
729
|
-
} else
|
|
730
|
-
return u;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
return he.default = i, he;
|
|
734
|
-
}
|
|
735
|
-
var ct = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
736
|
-
t === void 0 && (t = n);
|
|
737
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
738
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
739
|
-
return r[n];
|
|
740
|
-
} }), Object.defineProperty(e, t, i);
|
|
741
|
-
} : function(e, r, n, t) {
|
|
742
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
743
|
-
}), ft = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
744
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
745
|
-
} : function(e, r) {
|
|
746
|
-
e.default = r;
|
|
747
|
-
}), st = _ && _.__importStar || function(e) {
|
|
748
|
-
if (e && e.__esModule)
|
|
749
|
-
return e;
|
|
750
|
-
var r = {};
|
|
751
|
-
if (e != null)
|
|
752
|
-
for (var n in e)
|
|
753
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && ct(r, e, n);
|
|
754
|
-
return ft(r, e), r;
|
|
755
|
-
}, hn = _ && _.__importDefault || function(e) {
|
|
756
|
-
return e && e.__esModule ? e : { default: e };
|
|
757
|
-
};
|
|
758
|
-
Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
759
|
-
const jr = q, dt = hn(ce()), B = st(O), Cr = hn($e);
|
|
760
|
-
class pt {
|
|
761
|
-
/**
|
|
762
|
-
* Returns the paths/URLs of all the files in your schema (including the main schema file).
|
|
763
|
-
*
|
|
764
|
-
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html#pathstypes
|
|
765
|
-
*
|
|
766
|
-
* @param types (optional) Optionally only return certain types of paths ("file", "http", etc.)
|
|
767
|
-
*/
|
|
768
|
-
paths(...r) {
|
|
769
|
-
return Tr(this._$refs, r.flat()).map((t) => (0, Cr.default)(t.decoded));
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* Returns a map of paths/URLs and their correspond values.
|
|
773
|
-
*
|
|
774
|
-
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html#valuestypes
|
|
775
|
-
*
|
|
776
|
-
* @param types (optional) Optionally only return values from certain locations ("file", "http", etc.)
|
|
777
|
-
*/
|
|
778
|
-
values(...r) {
|
|
779
|
-
const n = this._$refs;
|
|
780
|
-
return Tr(n, r.flat()).reduce((i, l) => (i[(0, Cr.default)(l.decoded)] = n[l.encoded].value, i), {});
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Returns `true` if the given path exists in the schema; otherwise, returns `false`
|
|
784
|
-
*
|
|
785
|
-
* See https://apitools.dev/json-schema-ref-parser/docs/refs.html#existsref
|
|
786
|
-
*
|
|
787
|
-
* @param $ref The JSON Reference path, optionally with a JSON Pointer in the hash
|
|
788
|
-
*/
|
|
789
|
-
/**
|
|
790
|
-
* Determines whether the given JSON reference exists.
|
|
791
|
-
*
|
|
792
|
-
* @param path - The path being resolved, optionally with a JSON pointer in the hash
|
|
793
|
-
* @param [options]
|
|
794
|
-
* @returns
|
|
795
|
-
*/
|
|
796
|
-
exists(r, n) {
|
|
797
|
-
try {
|
|
798
|
-
return this._resolve(r, "", n), !0;
|
|
799
|
-
} catch {
|
|
800
|
-
return !1;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* Resolves the given JSON reference and returns the resolved value.
|
|
805
|
-
*
|
|
806
|
-
* @param path - The path being resolved, with a JSON pointer in the hash
|
|
807
|
-
* @param [options]
|
|
808
|
-
* @returns - Returns the resolved value
|
|
809
|
-
*/
|
|
810
|
-
get(r, n) {
|
|
811
|
-
return this._resolve(r, "", n).value;
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* Sets the value at the given path in the schema. If the property, or any of its parents, don't exist, they will be created.
|
|
815
|
-
*
|
|
816
|
-
* @param path The JSON Reference path, optionally with a JSON Pointer in the hash
|
|
817
|
-
* @param value The value to assign. Can be anything (object, string, number, etc.)
|
|
818
|
-
*/
|
|
819
|
-
set(r, n) {
|
|
820
|
-
const t = B.resolve(this._root$Ref.path, r), i = B.stripHash(t), l = this._$refs[i];
|
|
821
|
-
if (!l)
|
|
822
|
-
throw (0, jr.ono)(`Error resolving $ref pointer "${r}".
|
|
823
|
-
"${i}" not found.`);
|
|
824
|
-
l.set(t, n);
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Returns the specified {@link $Ref} object, or undefined.
|
|
828
|
-
*
|
|
829
|
-
* @param path - The path being resolved, optionally with a JSON pointer in the hash
|
|
830
|
-
* @returns
|
|
831
|
-
* @protected
|
|
832
|
-
*/
|
|
833
|
-
_get$Ref(r) {
|
|
834
|
-
r = B.resolve(this._root$Ref.path, r);
|
|
835
|
-
const n = B.stripHash(r);
|
|
836
|
-
return this._$refs[n];
|
|
837
|
-
}
|
|
838
|
-
/**
|
|
839
|
-
* Creates a new {@link $Ref} object and adds it to this {@link $Refs} object.
|
|
840
|
-
*
|
|
841
|
-
* @param path - The file path or URL of the referenced file
|
|
842
|
-
*/
|
|
843
|
-
_add(r) {
|
|
844
|
-
const n = B.stripHash(r), t = new dt.default(this);
|
|
845
|
-
return t.path = n, this._$refs[n] = t, this._root$Ref = this._root$Ref || t, t;
|
|
846
|
-
}
|
|
847
|
-
/**
|
|
848
|
-
* Resolves the given JSON reference.
|
|
849
|
-
*
|
|
850
|
-
* @param path - The path being resolved, optionally with a JSON pointer in the hash
|
|
851
|
-
* @param pathFromRoot - The path of `obj` from the schema root
|
|
852
|
-
* @param [options]
|
|
853
|
-
* @returns
|
|
854
|
-
* @protected
|
|
855
|
-
*/
|
|
856
|
-
_resolve(r, n, t) {
|
|
857
|
-
const i = B.resolve(this._root$Ref.path, r), l = B.stripHash(i), o = this._$refs[l];
|
|
858
|
-
if (!o)
|
|
859
|
-
throw (0, jr.ono)(`Error resolving $ref pointer "${r}".
|
|
860
|
-
"${l}" not found.`);
|
|
861
|
-
return o.resolve(i, t, r, n);
|
|
862
|
-
}
|
|
863
|
-
constructor() {
|
|
864
|
-
this._$refs = {}, this.toJSON = this.values, this.circular = !1, this._$refs = {}, this._root$Ref = null;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
Ve.default = pt;
|
|
868
|
-
function Tr(e, r) {
|
|
869
|
-
let n = Object.keys(e);
|
|
870
|
-
return r = Array.isArray(r[0]) ? r[0] : Array.prototype.slice.call(r), r.length > 0 && r[0] && (n = n.filter((t) => r.includes(e[t].pathType))), n.map((t) => ({
|
|
871
|
-
encoded: t,
|
|
872
|
-
decoded: e[t].pathType === "file" ? B.toFileSystemPath(t, !0) : t
|
|
873
|
-
}));
|
|
874
|
-
}
|
|
875
|
-
var Re = {}, M = {};
|
|
876
|
-
Object.defineProperty(M, "__esModule", { value: !0 });
|
|
877
|
-
M.run = M.sort = M.filter = M.all = void 0;
|
|
878
|
-
function ht(e) {
|
|
879
|
-
return Object.keys(e || {}).filter((r) => typeof e[r] == "object").map((r) => (e[r].name = r, e[r]));
|
|
880
|
-
}
|
|
881
|
-
M.all = ht;
|
|
882
|
-
function gt(e, r, n) {
|
|
883
|
-
return e.filter((t) => !!gn(t, r, n));
|
|
884
|
-
}
|
|
885
|
-
M.filter = gt;
|
|
886
|
-
function _t(e) {
|
|
887
|
-
for (const r of e)
|
|
888
|
-
r.order = r.order || Number.MAX_SAFE_INTEGER;
|
|
889
|
-
return e.sort((r, n) => r.order - n.order);
|
|
890
|
-
}
|
|
891
|
-
M.sort = _t;
|
|
892
|
-
async function mt(e, r, n, t) {
|
|
893
|
-
let i, l, o = 0;
|
|
894
|
-
return new Promise((u, a) => {
|
|
895
|
-
f();
|
|
896
|
-
function f() {
|
|
897
|
-
if (i = e[o++], !i)
|
|
898
|
-
return a(l);
|
|
899
|
-
try {
|
|
900
|
-
const g = gn(i, r, n, h, t);
|
|
901
|
-
if (g && typeof g.then == "function")
|
|
902
|
-
g.then(s, p);
|
|
903
|
-
else if (g !== void 0)
|
|
904
|
-
s(g);
|
|
905
|
-
else if (o === e.length)
|
|
906
|
-
throw new Error("No promise has been returned or callback has been called.");
|
|
907
|
-
} catch (g) {
|
|
908
|
-
p(g);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
function h(g, m) {
|
|
912
|
-
g ? p(g) : s(m);
|
|
913
|
-
}
|
|
914
|
-
function s(g) {
|
|
915
|
-
u({
|
|
916
|
-
plugin: i,
|
|
917
|
-
result: g
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
function p(g) {
|
|
921
|
-
l = {
|
|
922
|
-
plugin: i,
|
|
923
|
-
error: g
|
|
924
|
-
}, f();
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
M.run = mt;
|
|
929
|
-
function gn(e, r, n, t, i) {
|
|
930
|
-
const l = e[r];
|
|
931
|
-
if (typeof l == "function")
|
|
932
|
-
return l.apply(e, [n, t, i]);
|
|
933
|
-
if (!t) {
|
|
934
|
-
if (l instanceof RegExp)
|
|
935
|
-
return l.test(n.url);
|
|
936
|
-
if (typeof l == "string")
|
|
937
|
-
return l === n.extension;
|
|
938
|
-
if (Array.isArray(l))
|
|
939
|
-
return l.indexOf(n.extension) !== -1;
|
|
940
|
-
}
|
|
941
|
-
return l;
|
|
942
|
-
}
|
|
943
|
-
var vt = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
944
|
-
t === void 0 && (t = n);
|
|
945
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
946
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
947
|
-
return r[n];
|
|
948
|
-
} }), Object.defineProperty(e, t, i);
|
|
949
|
-
} : function(e, r, n, t) {
|
|
950
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
951
|
-
}), yt = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
952
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
953
|
-
} : function(e, r) {
|
|
954
|
-
e.default = r;
|
|
955
|
-
}), _n = _ && _.__importStar || function(e) {
|
|
956
|
-
if (e && e.__esModule)
|
|
957
|
-
return e;
|
|
958
|
-
var r = {};
|
|
959
|
-
if (e != null)
|
|
960
|
-
for (var n in e)
|
|
961
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && vt(r, e, n);
|
|
962
|
-
return yt(r, e), r;
|
|
963
|
-
};
|
|
964
|
-
Object.defineProperty(Re, "__esModule", { value: !0 });
|
|
965
|
-
const Ge = q, xt = _n(O), H = _n(M), W = A;
|
|
966
|
-
async function wt(e, r, n) {
|
|
967
|
-
const t = e.indexOf("#");
|
|
968
|
-
let i = "";
|
|
969
|
-
t >= 0 && (i = e.substring(t), e = e.substring(0, t));
|
|
970
|
-
const l = r._add(e), o = {
|
|
971
|
-
url: e,
|
|
972
|
-
hash: i,
|
|
973
|
-
extension: xt.getExtension(e)
|
|
974
|
-
};
|
|
975
|
-
try {
|
|
976
|
-
const u = await bt(o, n, r);
|
|
977
|
-
l.pathType = u.plugin.name, o.data = u.result;
|
|
978
|
-
const a = await Et(o, n, r);
|
|
979
|
-
return l.value = a.result, a.result;
|
|
980
|
-
} catch (u) {
|
|
981
|
-
throw (0, W.isHandledError)(u) && (l.value = u), u;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
async function bt(e, r, n) {
|
|
985
|
-
let t = H.all(r.resolve);
|
|
986
|
-
t = H.filter(t, "canRead", e), H.sort(t);
|
|
987
|
-
try {
|
|
988
|
-
return await H.run(t, "read", e, n);
|
|
989
|
-
} catch (i) {
|
|
990
|
-
throw !i && r.continueOnError ? new W.UnmatchedResolverError(e.url) : !i || !("error" in i) ? Ge.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`) : i.error instanceof W.ResolverError ? i.error : new W.ResolverError(i, e.url);
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
async function Et(e, r, n) {
|
|
994
|
-
const t = H.all(r.parse), i = H.filter(t, "canParse", e), l = i.length > 0 ? i : t;
|
|
995
|
-
H.sort(l);
|
|
996
|
-
try {
|
|
997
|
-
const o = await H.run(l, "parse", e, n);
|
|
998
|
-
if (!o.plugin.allowEmpty && Ot(o.result))
|
|
999
|
-
throw Ge.ono.syntax(`Error parsing "${e.url}" as ${o.plugin.name}.
|
|
1000
|
-
Parsed value is empty`);
|
|
1001
|
-
return o;
|
|
1002
|
-
} catch (o) {
|
|
1003
|
-
throw !o && r.continueOnError ? new W.UnmatchedParserError(e.url) : o && o.message && o.message.startsWith("Error parsing") ? o : !o || !("error" in o) ? Ge.ono.syntax(`Unable to parse ${e.url}`) : o.error instanceof W.ParserError ? o.error : new W.ParserError(o.error.message, e.url);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
function Ot(e) {
|
|
1007
|
-
return e === void 0 || typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0 || Buffer.isBuffer(e) && e.length === 0;
|
|
1008
|
-
}
|
|
1009
|
-
Re.default = wt;
|
|
1010
|
-
var fe = {}, mn = {}, rr = {};
|
|
1011
|
-
Object.defineProperty(rr, "__esModule", { value: !0 });
|
|
1012
|
-
const Rr = A;
|
|
1013
|
-
rr.default = {
|
|
1014
|
-
/**
|
|
1015
|
-
* The order that this parser will run, in relation to other parsers.
|
|
1016
|
-
*/
|
|
1017
|
-
order: 100,
|
|
1018
|
-
/**
|
|
1019
|
-
* Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects.
|
|
1020
|
-
*/
|
|
1021
|
-
allowEmpty: !0,
|
|
1022
|
-
/**
|
|
1023
|
-
* Determines whether this parser can parse a given file reference.
|
|
1024
|
-
* Parsers that match will be tried, in order, until one successfully parses the file.
|
|
1025
|
-
* Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case
|
|
1026
|
-
* every parser will be tried.
|
|
1027
|
-
*/
|
|
1028
|
-
canParse: ".json",
|
|
1029
|
-
/**
|
|
1030
|
-
* Allow JSON files with byte order marks (BOM)
|
|
1031
|
-
*/
|
|
1032
|
-
allowBOM: !0,
|
|
1033
|
-
/**
|
|
1034
|
-
* Parses the given file as JSON
|
|
1035
|
-
*/
|
|
1036
|
-
async parse(e) {
|
|
1037
|
-
let r = e.data;
|
|
1038
|
-
if (Buffer.isBuffer(r) && (r = r.toString()), typeof r == "string") {
|
|
1039
|
-
if (r.trim().length === 0)
|
|
1040
|
-
return;
|
|
1041
|
-
try {
|
|
1042
|
-
return JSON.parse(r);
|
|
1043
|
-
} catch (n) {
|
|
1044
|
-
if (this.allowBOM)
|
|
1045
|
-
try {
|
|
1046
|
-
const t = r.indexOf("{");
|
|
1047
|
-
return r = r.slice(t), JSON.parse(r);
|
|
1048
|
-
} catch (t) {
|
|
1049
|
-
throw new Rr.ParserError(t.message, e.url);
|
|
1050
|
-
}
|
|
1051
|
-
throw new Rr.ParserError(n.message, e.url);
|
|
1052
|
-
}
|
|
1053
|
-
} else
|
|
1054
|
-
return r;
|
|
1055
|
-
}
|
|
1056
|
-
};
|
|
1057
|
-
var nr = {}, $ = {}, ir = {}, R = {};
|
|
1058
|
-
function vn(e) {
|
|
1059
|
-
return typeof e > "u" || e === null;
|
|
1060
|
-
}
|
|
1061
|
-
function At(e) {
|
|
1062
|
-
return typeof e == "object" && e !== null;
|
|
1063
|
-
}
|
|
1064
|
-
function Pt(e) {
|
|
1065
|
-
return Array.isArray(e) ? e : vn(e) ? [] : [e];
|
|
1066
|
-
}
|
|
1067
|
-
function St(e, r) {
|
|
1068
|
-
var n, t, i, l;
|
|
1069
|
-
if (r)
|
|
1070
|
-
for (l = Object.keys(r), n = 0, t = l.length; n < t; n += 1)
|
|
1071
|
-
i = l[n], e[i] = r[i];
|
|
1072
|
-
return e;
|
|
1073
|
-
}
|
|
1074
|
-
function $t(e, r) {
|
|
1075
|
-
var n = "", t;
|
|
1076
|
-
for (t = 0; t < r; t += 1)
|
|
1077
|
-
n += e;
|
|
1078
|
-
return n;
|
|
1079
|
-
}
|
|
1080
|
-
function jt(e) {
|
|
1081
|
-
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1082
|
-
}
|
|
1083
|
-
R.isNothing = vn;
|
|
1084
|
-
R.isObject = At;
|
|
1085
|
-
R.toArray = Pt;
|
|
1086
|
-
R.repeat = $t;
|
|
1087
|
-
R.isNegativeZero = jt;
|
|
1088
|
-
R.extend = St;
|
|
1089
|
-
function yn(e, r) {
|
|
1090
|
-
var n = "", t = e.reason || "(unknown reason)";
|
|
1091
|
-
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !r && e.mark.snippet && (n += `
|
|
1092
|
-
|
|
1093
|
-
` + e.mark.snippet), t + " " + n) : t;
|
|
1094
|
-
}
|
|
1095
|
-
function te(e, r) {
|
|
1096
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = r, this.message = yn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1097
|
-
}
|
|
1098
|
-
te.prototype = Object.create(Error.prototype);
|
|
1099
|
-
te.prototype.constructor = te;
|
|
1100
|
-
te.prototype.toString = function(r) {
|
|
1101
|
-
return this.name + ": " + yn(this, r);
|
|
1102
|
-
};
|
|
1103
|
-
var se = te, re = R;
|
|
1104
|
-
function De(e, r, n, t, i) {
|
|
1105
|
-
var l = "", o = "", u = Math.floor(i / 2) - 1;
|
|
1106
|
-
return t - r > u && (l = " ... ", r = t - u + l.length), n - t > u && (o = " ...", n = t + u - o.length), {
|
|
1107
|
-
str: l + e.slice(r, n).replace(/\t/g, "→") + o,
|
|
1108
|
-
pos: t - r + l.length
|
|
1109
|
-
// relative position
|
|
1110
|
-
};
|
|
1111
|
-
}
|
|
1112
|
-
function Ne(e, r) {
|
|
1113
|
-
return re.repeat(" ", r - e.length) + e;
|
|
1114
|
-
}
|
|
1115
|
-
function Ct(e, r) {
|
|
1116
|
-
if (r = Object.create(r || null), !e.buffer)
|
|
1117
|
-
return null;
|
|
1118
|
-
r.maxLength || (r.maxLength = 79), typeof r.indent != "number" && (r.indent = 1), typeof r.linesBefore != "number" && (r.linesBefore = 3), typeof r.linesAfter != "number" && (r.linesAfter = 2);
|
|
1119
|
-
for (var n = /\r?\n|\r|\0/g, t = [0], i = [], l, o = -1; l = n.exec(e.buffer); )
|
|
1120
|
-
i.push(l.index), t.push(l.index + l[0].length), e.position <= l.index && o < 0 && (o = t.length - 2);
|
|
1121
|
-
o < 0 && (o = t.length - 1);
|
|
1122
|
-
var u = "", a, f, h = Math.min(e.line + r.linesAfter, i.length).toString().length, s = r.maxLength - (r.indent + h + 3);
|
|
1123
|
-
for (a = 1; a <= r.linesBefore && !(o - a < 0); a++)
|
|
1124
|
-
f = De(
|
|
1125
|
-
e.buffer,
|
|
1126
|
-
t[o - a],
|
|
1127
|
-
i[o - a],
|
|
1128
|
-
e.position - (t[o] - t[o - a]),
|
|
1129
|
-
s
|
|
1130
|
-
), u = re.repeat(" ", r.indent) + Ne((e.line - a + 1).toString(), h) + " | " + f.str + `
|
|
1131
|
-
` + u;
|
|
1132
|
-
for (f = De(e.buffer, t[o], i[o], e.position, s), u += re.repeat(" ", r.indent) + Ne((e.line + 1).toString(), h) + " | " + f.str + `
|
|
1133
|
-
`, u += re.repeat("-", r.indent + h + 3 + f.pos) + `^
|
|
1134
|
-
`, a = 1; a <= r.linesAfter && !(o + a >= i.length); a++)
|
|
1135
|
-
f = De(
|
|
1136
|
-
e.buffer,
|
|
1137
|
-
t[o + a],
|
|
1138
|
-
i[o + a],
|
|
1139
|
-
e.position - (t[o] - t[o + a]),
|
|
1140
|
-
s
|
|
1141
|
-
), u += re.repeat(" ", r.indent) + Ne((e.line + a + 1).toString(), h) + " | " + f.str + `
|
|
1142
|
-
`;
|
|
1143
|
-
return u.replace(/\n$/, "");
|
|
1144
|
-
}
|
|
1145
|
-
var Tt = Ct, Mr = se, Rt = [
|
|
1146
|
-
"kind",
|
|
1147
|
-
"multi",
|
|
1148
|
-
"resolve",
|
|
1149
|
-
"construct",
|
|
1150
|
-
"instanceOf",
|
|
1151
|
-
"predicate",
|
|
1152
|
-
"represent",
|
|
1153
|
-
"representName",
|
|
1154
|
-
"defaultStyle",
|
|
1155
|
-
"styleAliases"
|
|
1156
|
-
], Mt = [
|
|
1157
|
-
"scalar",
|
|
1158
|
-
"sequence",
|
|
1159
|
-
"mapping"
|
|
1160
|
-
];
|
|
1161
|
-
function Ft(e) {
|
|
1162
|
-
var r = {};
|
|
1163
|
-
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1164
|
-
e[n].forEach(function(t) {
|
|
1165
|
-
r[String(t)] = n;
|
|
1166
|
-
});
|
|
1167
|
-
}), r;
|
|
1168
|
-
}
|
|
1169
|
-
function It(e, r) {
|
|
1170
|
-
if (r = r || {}, Object.keys(r).forEach(function(n) {
|
|
1171
|
-
if (Rt.indexOf(n) === -1)
|
|
1172
|
-
throw new Mr('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1173
|
-
}), this.options = r, this.tag = e, this.kind = r.kind || null, this.resolve = r.resolve || function() {
|
|
1174
|
-
return !0;
|
|
1175
|
-
}, this.construct = r.construct || function(n) {
|
|
1176
|
-
return n;
|
|
1177
|
-
}, this.instanceOf = r.instanceOf || null, this.predicate = r.predicate || null, this.represent = r.represent || null, this.representName = r.representName || null, this.defaultStyle = r.defaultStyle || null, this.multi = r.multi || !1, this.styleAliases = Ft(r.styleAliases || null), Mt.indexOf(this.kind) === -1)
|
|
1178
|
-
throw new Mr('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1179
|
-
}
|
|
1180
|
-
var C = It, ee = se, Le = C;
|
|
1181
|
-
function Fr(e, r) {
|
|
1182
|
-
var n = [];
|
|
1183
|
-
return e[r].forEach(function(t) {
|
|
1184
|
-
var i = n.length;
|
|
1185
|
-
n.forEach(function(l, o) {
|
|
1186
|
-
l.tag === t.tag && l.kind === t.kind && l.multi === t.multi && (i = o);
|
|
1187
|
-
}), n[i] = t;
|
|
1188
|
-
}), n;
|
|
1189
|
-
}
|
|
1190
|
-
function Dt() {
|
|
1191
|
-
var e = {
|
|
1192
|
-
scalar: {},
|
|
1193
|
-
sequence: {},
|
|
1194
|
-
mapping: {},
|
|
1195
|
-
fallback: {},
|
|
1196
|
-
multi: {
|
|
1197
|
-
scalar: [],
|
|
1198
|
-
sequence: [],
|
|
1199
|
-
mapping: [],
|
|
1200
|
-
fallback: []
|
|
1201
|
-
}
|
|
1202
|
-
}, r, n;
|
|
1203
|
-
function t(i) {
|
|
1204
|
-
i.multi ? (e.multi[i.kind].push(i), e.multi.fallback.push(i)) : e[i.kind][i.tag] = e.fallback[i.tag] = i;
|
|
1205
|
-
}
|
|
1206
|
-
for (r = 0, n = arguments.length; r < n; r += 1)
|
|
1207
|
-
arguments[r].forEach(t);
|
|
1208
|
-
return e;
|
|
1209
|
-
}
|
|
1210
|
-
function We(e) {
|
|
1211
|
-
return this.extend(e);
|
|
1212
|
-
}
|
|
1213
|
-
We.prototype.extend = function(r) {
|
|
1214
|
-
var n = [], t = [];
|
|
1215
|
-
if (r instanceof Le)
|
|
1216
|
-
t.push(r);
|
|
1217
|
-
else if (Array.isArray(r))
|
|
1218
|
-
t = t.concat(r);
|
|
1219
|
-
else if (r && (Array.isArray(r.implicit) || Array.isArray(r.explicit)))
|
|
1220
|
-
r.implicit && (n = n.concat(r.implicit)), r.explicit && (t = t.concat(r.explicit));
|
|
1221
|
-
else
|
|
1222
|
-
throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1223
|
-
n.forEach(function(l) {
|
|
1224
|
-
if (!(l instanceof Le))
|
|
1225
|
-
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1226
|
-
if (l.loadKind && l.loadKind !== "scalar")
|
|
1227
|
-
throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1228
|
-
if (l.multi)
|
|
1229
|
-
throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1230
|
-
}), t.forEach(function(l) {
|
|
1231
|
-
if (!(l instanceof Le))
|
|
1232
|
-
throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1233
|
-
});
|
|
1234
|
-
var i = Object.create(We.prototype);
|
|
1235
|
-
return i.implicit = (this.implicit || []).concat(n), i.explicit = (this.explicit || []).concat(t), i.compiledImplicit = Fr(i, "implicit"), i.compiledExplicit = Fr(i, "explicit"), i.compiledTypeMap = Dt(i.compiledImplicit, i.compiledExplicit), i;
|
|
1236
|
-
};
|
|
1237
|
-
var xn = We, Nt = C, wn = new Nt("tag:yaml.org,2002:str", {
|
|
1238
|
-
kind: "scalar",
|
|
1239
|
-
construct: function(e) {
|
|
1240
|
-
return e !== null ? e : "";
|
|
1241
|
-
}
|
|
1242
|
-
}), Lt = C, bn = new Lt("tag:yaml.org,2002:seq", {
|
|
1243
|
-
kind: "sequence",
|
|
1244
|
-
construct: function(e) {
|
|
1245
|
-
return e !== null ? e : [];
|
|
1246
|
-
}
|
|
1247
|
-
}), Bt = C, En = new Bt("tag:yaml.org,2002:map", {
|
|
1248
|
-
kind: "mapping",
|
|
1249
|
-
construct: function(e) {
|
|
1250
|
-
return e !== null ? e : {};
|
|
1251
|
-
}
|
|
1252
|
-
}), Ht = xn, On = new Ht({
|
|
1253
|
-
explicit: [
|
|
1254
|
-
wn,
|
|
1255
|
-
bn,
|
|
1256
|
-
En
|
|
1257
|
-
]
|
|
1258
|
-
}), kt = C;
|
|
1259
|
-
function Ut(e) {
|
|
1260
|
-
if (e === null)
|
|
1261
|
-
return !0;
|
|
1262
|
-
var r = e.length;
|
|
1263
|
-
return r === 1 && e === "~" || r === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1264
|
-
}
|
|
1265
|
-
function Yt() {
|
|
1266
|
-
return null;
|
|
1267
|
-
}
|
|
1268
|
-
function Gt(e) {
|
|
1269
|
-
return e === null;
|
|
1270
|
-
}
|
|
1271
|
-
var An = new kt("tag:yaml.org,2002:null", {
|
|
1272
|
-
kind: "scalar",
|
|
1273
|
-
resolve: Ut,
|
|
1274
|
-
construct: Yt,
|
|
1275
|
-
predicate: Gt,
|
|
1276
|
-
represent: {
|
|
1277
|
-
canonical: function() {
|
|
1278
|
-
return "~";
|
|
1279
|
-
},
|
|
1280
|
-
lowercase: function() {
|
|
1281
|
-
return "null";
|
|
1282
|
-
},
|
|
1283
|
-
uppercase: function() {
|
|
1284
|
-
return "NULL";
|
|
1285
|
-
},
|
|
1286
|
-
camelcase: function() {
|
|
1287
|
-
return "Null";
|
|
1288
|
-
},
|
|
1289
|
-
empty: function() {
|
|
1290
|
-
return "";
|
|
1291
|
-
}
|
|
1292
|
-
},
|
|
1293
|
-
defaultStyle: "lowercase"
|
|
1294
|
-
}), Wt = C;
|
|
1295
|
-
function Jt(e) {
|
|
1296
|
-
if (e === null)
|
|
1297
|
-
return !1;
|
|
1298
|
-
var r = e.length;
|
|
1299
|
-
return r === 4 && (e === "true" || e === "True" || e === "TRUE") || r === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1300
|
-
}
|
|
1301
|
-
function qt(e) {
|
|
1302
|
-
return e === "true" || e === "True" || e === "TRUE";
|
|
1303
|
-
}
|
|
1304
|
-
function Kt(e) {
|
|
1305
|
-
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1306
|
-
}
|
|
1307
|
-
var Pn = new Wt("tag:yaml.org,2002:bool", {
|
|
1308
|
-
kind: "scalar",
|
|
1309
|
-
resolve: Jt,
|
|
1310
|
-
construct: qt,
|
|
1311
|
-
predicate: Kt,
|
|
1312
|
-
represent: {
|
|
1313
|
-
lowercase: function(e) {
|
|
1314
|
-
return e ? "true" : "false";
|
|
1315
|
-
},
|
|
1316
|
-
uppercase: function(e) {
|
|
1317
|
-
return e ? "TRUE" : "FALSE";
|
|
1318
|
-
},
|
|
1319
|
-
camelcase: function(e) {
|
|
1320
|
-
return e ? "True" : "False";
|
|
1321
|
-
}
|
|
1322
|
-
},
|
|
1323
|
-
defaultStyle: "lowercase"
|
|
1324
|
-
}), zt = R, Qt = C;
|
|
1325
|
-
function Vt(e) {
|
|
1326
|
-
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1327
|
-
}
|
|
1328
|
-
function Xt(e) {
|
|
1329
|
-
return 48 <= e && e <= 55;
|
|
1330
|
-
}
|
|
1331
|
-
function Zt(e) {
|
|
1332
|
-
return 48 <= e && e <= 57;
|
|
1333
|
-
}
|
|
1334
|
-
function eo(e) {
|
|
1335
|
-
if (e === null)
|
|
1336
|
-
return !1;
|
|
1337
|
-
var r = e.length, n = 0, t = !1, i;
|
|
1338
|
-
if (!r)
|
|
1339
|
-
return !1;
|
|
1340
|
-
if (i = e[n], (i === "-" || i === "+") && (i = e[++n]), i === "0") {
|
|
1341
|
-
if (n + 1 === r)
|
|
1342
|
-
return !0;
|
|
1343
|
-
if (i = e[++n], i === "b") {
|
|
1344
|
-
for (n++; n < r; n++)
|
|
1345
|
-
if (i = e[n], i !== "_") {
|
|
1346
|
-
if (i !== "0" && i !== "1")
|
|
1347
|
-
return !1;
|
|
1348
|
-
t = !0;
|
|
1349
|
-
}
|
|
1350
|
-
return t && i !== "_";
|
|
1351
|
-
}
|
|
1352
|
-
if (i === "x") {
|
|
1353
|
-
for (n++; n < r; n++)
|
|
1354
|
-
if (i = e[n], i !== "_") {
|
|
1355
|
-
if (!Vt(e.charCodeAt(n)))
|
|
1356
|
-
return !1;
|
|
1357
|
-
t = !0;
|
|
1358
|
-
}
|
|
1359
|
-
return t && i !== "_";
|
|
1360
|
-
}
|
|
1361
|
-
if (i === "o") {
|
|
1362
|
-
for (n++; n < r; n++)
|
|
1363
|
-
if (i = e[n], i !== "_") {
|
|
1364
|
-
if (!Xt(e.charCodeAt(n)))
|
|
1365
|
-
return !1;
|
|
1366
|
-
t = !0;
|
|
1367
|
-
}
|
|
1368
|
-
return t && i !== "_";
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
if (i === "_")
|
|
1372
|
-
return !1;
|
|
1373
|
-
for (; n < r; n++)
|
|
1374
|
-
if (i = e[n], i !== "_") {
|
|
1375
|
-
if (!Zt(e.charCodeAt(n)))
|
|
1376
|
-
return !1;
|
|
1377
|
-
t = !0;
|
|
1378
|
-
}
|
|
1379
|
-
return !(!t || i === "_");
|
|
1380
|
-
}
|
|
1381
|
-
function ro(e) {
|
|
1382
|
-
var r = e, n = 1, t;
|
|
1383
|
-
if (r.indexOf("_") !== -1 && (r = r.replace(/_/g, "")), t = r[0], (t === "-" || t === "+") && (t === "-" && (n = -1), r = r.slice(1), t = r[0]), r === "0")
|
|
1384
|
-
return 0;
|
|
1385
|
-
if (t === "0") {
|
|
1386
|
-
if (r[1] === "b")
|
|
1387
|
-
return n * parseInt(r.slice(2), 2);
|
|
1388
|
-
if (r[1] === "x")
|
|
1389
|
-
return n * parseInt(r.slice(2), 16);
|
|
1390
|
-
if (r[1] === "o")
|
|
1391
|
-
return n * parseInt(r.slice(2), 8);
|
|
1392
|
-
}
|
|
1393
|
-
return n * parseInt(r, 10);
|
|
1394
|
-
}
|
|
1395
|
-
function no(e) {
|
|
1396
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !zt.isNegativeZero(e);
|
|
1397
|
-
}
|
|
1398
|
-
var Sn = new Qt("tag:yaml.org,2002:int", {
|
|
1399
|
-
kind: "scalar",
|
|
1400
|
-
resolve: eo,
|
|
1401
|
-
construct: ro,
|
|
1402
|
-
predicate: no,
|
|
1403
|
-
represent: {
|
|
1404
|
-
binary: function(e) {
|
|
1405
|
-
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
1406
|
-
},
|
|
1407
|
-
octal: function(e) {
|
|
1408
|
-
return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1);
|
|
1409
|
-
},
|
|
1410
|
-
decimal: function(e) {
|
|
1411
|
-
return e.toString(10);
|
|
1412
|
-
},
|
|
1413
|
-
/* eslint-disable max-len */
|
|
1414
|
-
hexadecimal: function(e) {
|
|
1415
|
-
return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1);
|
|
1416
|
-
}
|
|
1417
|
-
},
|
|
1418
|
-
defaultStyle: "decimal",
|
|
1419
|
-
styleAliases: {
|
|
1420
|
-
binary: [2, "bin"],
|
|
1421
|
-
octal: [8, "oct"],
|
|
1422
|
-
decimal: [10, "dec"],
|
|
1423
|
-
hexadecimal: [16, "hex"]
|
|
1424
|
-
}
|
|
1425
|
-
}), $n = R, io = C, to = new RegExp(
|
|
1426
|
-
// 2.5e4, 2.5 and integers
|
|
1427
|
-
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1428
|
-
);
|
|
1429
|
-
function oo(e) {
|
|
1430
|
-
return !(e === null || !to.test(e) || // Quick hack to not allow integers end with `_`
|
|
1431
|
-
// Probably should update regexp & check speed
|
|
1432
|
-
e[e.length - 1] === "_");
|
|
1433
|
-
}
|
|
1434
|
-
function lo(e) {
|
|
1435
|
-
var r, n;
|
|
1436
|
-
return r = e.replace(/_/g, "").toLowerCase(), n = r[0] === "-" ? -1 : 1, "+-".indexOf(r[0]) >= 0 && (r = r.slice(1)), r === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : r === ".nan" ? NaN : n * parseFloat(r, 10);
|
|
1437
|
-
}
|
|
1438
|
-
var uo = /^[-+]?[0-9]+e/;
|
|
1439
|
-
function ao(e, r) {
|
|
1440
|
-
var n;
|
|
1441
|
-
if (isNaN(e))
|
|
1442
|
-
switch (r) {
|
|
1443
|
-
case "lowercase":
|
|
1444
|
-
return ".nan";
|
|
1445
|
-
case "uppercase":
|
|
1446
|
-
return ".NAN";
|
|
1447
|
-
case "camelcase":
|
|
1448
|
-
return ".NaN";
|
|
1449
|
-
}
|
|
1450
|
-
else if (Number.POSITIVE_INFINITY === e)
|
|
1451
|
-
switch (r) {
|
|
1452
|
-
case "lowercase":
|
|
1453
|
-
return ".inf";
|
|
1454
|
-
case "uppercase":
|
|
1455
|
-
return ".INF";
|
|
1456
|
-
case "camelcase":
|
|
1457
|
-
return ".Inf";
|
|
1458
|
-
}
|
|
1459
|
-
else if (Number.NEGATIVE_INFINITY === e)
|
|
1460
|
-
switch (r) {
|
|
1461
|
-
case "lowercase":
|
|
1462
|
-
return "-.inf";
|
|
1463
|
-
case "uppercase":
|
|
1464
|
-
return "-.INF";
|
|
1465
|
-
case "camelcase":
|
|
1466
|
-
return "-.Inf";
|
|
1467
|
-
}
|
|
1468
|
-
else if ($n.isNegativeZero(e))
|
|
1469
|
-
return "-0.0";
|
|
1470
|
-
return n = e.toString(10), uo.test(n) ? n.replace("e", ".e") : n;
|
|
1471
|
-
}
|
|
1472
|
-
function co(e) {
|
|
1473
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || $n.isNegativeZero(e));
|
|
1474
|
-
}
|
|
1475
|
-
var jn = new io("tag:yaml.org,2002:float", {
|
|
1476
|
-
kind: "scalar",
|
|
1477
|
-
resolve: oo,
|
|
1478
|
-
construct: lo,
|
|
1479
|
-
predicate: co,
|
|
1480
|
-
represent: ao,
|
|
1481
|
-
defaultStyle: "lowercase"
|
|
1482
|
-
}), Cn = On.extend({
|
|
1483
|
-
implicit: [
|
|
1484
|
-
An,
|
|
1485
|
-
Pn,
|
|
1486
|
-
Sn,
|
|
1487
|
-
jn
|
|
1488
|
-
]
|
|
1489
|
-
}), Tn = Cn, fo = C, Rn = new RegExp(
|
|
1490
|
-
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1491
|
-
), Mn = new RegExp(
|
|
1492
|
-
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1493
|
-
);
|
|
1494
|
-
function so(e) {
|
|
1495
|
-
return e === null ? !1 : Rn.exec(e) !== null || Mn.exec(e) !== null;
|
|
1496
|
-
}
|
|
1497
|
-
function po(e) {
|
|
1498
|
-
var r, n, t, i, l, o, u, a = 0, f = null, h, s, p;
|
|
1499
|
-
if (r = Rn.exec(e), r === null && (r = Mn.exec(e)), r === null)
|
|
1500
|
-
throw new Error("Date resolve error");
|
|
1501
|
-
if (n = +r[1], t = +r[2] - 1, i = +r[3], !r[4])
|
|
1502
|
-
return new Date(Date.UTC(n, t, i));
|
|
1503
|
-
if (l = +r[4], o = +r[5], u = +r[6], r[7]) {
|
|
1504
|
-
for (a = r[7].slice(0, 3); a.length < 3; )
|
|
1505
|
-
a += "0";
|
|
1506
|
-
a = +a;
|
|
1507
|
-
}
|
|
1508
|
-
return r[9] && (h = +r[10], s = +(r[11] || 0), f = (h * 60 + s) * 6e4, r[9] === "-" && (f = -f)), p = new Date(Date.UTC(n, t, i, l, o, u, a)), f && p.setTime(p.getTime() - f), p;
|
|
1509
|
-
}
|
|
1510
|
-
function ho(e) {
|
|
1511
|
-
return e.toISOString();
|
|
1512
|
-
}
|
|
1513
|
-
var Fn = new fo("tag:yaml.org,2002:timestamp", {
|
|
1514
|
-
kind: "scalar",
|
|
1515
|
-
resolve: so,
|
|
1516
|
-
construct: po,
|
|
1517
|
-
instanceOf: Date,
|
|
1518
|
-
represent: ho
|
|
1519
|
-
}), go = C;
|
|
1520
|
-
function _o(e) {
|
|
1521
|
-
return e === "<<" || e === null;
|
|
1522
|
-
}
|
|
1523
|
-
var In = new go("tag:yaml.org,2002:merge", {
|
|
1524
|
-
kind: "scalar",
|
|
1525
|
-
resolve: _o
|
|
1526
|
-
}), mo = C, tr = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1527
|
-
\r`;
|
|
1528
|
-
function vo(e) {
|
|
1529
|
-
if (e === null)
|
|
1530
|
-
return !1;
|
|
1531
|
-
var r, n, t = 0, i = e.length, l = tr;
|
|
1532
|
-
for (n = 0; n < i; n++)
|
|
1533
|
-
if (r = l.indexOf(e.charAt(n)), !(r > 64)) {
|
|
1534
|
-
if (r < 0)
|
|
1535
|
-
return !1;
|
|
1536
|
-
t += 6;
|
|
1537
|
-
}
|
|
1538
|
-
return t % 8 === 0;
|
|
1539
|
-
}
|
|
1540
|
-
function yo(e) {
|
|
1541
|
-
var r, n, t = e.replace(/[\r\n=]/g, ""), i = t.length, l = tr, o = 0, u = [];
|
|
1542
|
-
for (r = 0; r < i; r++)
|
|
1543
|
-
r % 4 === 0 && r && (u.push(o >> 16 & 255), u.push(o >> 8 & 255), u.push(o & 255)), o = o << 6 | l.indexOf(t.charAt(r));
|
|
1544
|
-
return n = i % 4 * 6, n === 0 ? (u.push(o >> 16 & 255), u.push(o >> 8 & 255), u.push(o & 255)) : n === 18 ? (u.push(o >> 10 & 255), u.push(o >> 2 & 255)) : n === 12 && u.push(o >> 4 & 255), new Uint8Array(u);
|
|
1545
|
-
}
|
|
1546
|
-
function xo(e) {
|
|
1547
|
-
var r = "", n = 0, t, i, l = e.length, o = tr;
|
|
1548
|
-
for (t = 0; t < l; t++)
|
|
1549
|
-
t % 3 === 0 && t && (r += o[n >> 18 & 63], r += o[n >> 12 & 63], r += o[n >> 6 & 63], r += o[n & 63]), n = (n << 8) + e[t];
|
|
1550
|
-
return i = l % 3, i === 0 ? (r += o[n >> 18 & 63], r += o[n >> 12 & 63], r += o[n >> 6 & 63], r += o[n & 63]) : i === 2 ? (r += o[n >> 10 & 63], r += o[n >> 4 & 63], r += o[n << 2 & 63], r += o[64]) : i === 1 && (r += o[n >> 2 & 63], r += o[n << 4 & 63], r += o[64], r += o[64]), r;
|
|
1551
|
-
}
|
|
1552
|
-
function wo(e) {
|
|
1553
|
-
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1554
|
-
}
|
|
1555
|
-
var Dn = new mo("tag:yaml.org,2002:binary", {
|
|
1556
|
-
kind: "scalar",
|
|
1557
|
-
resolve: vo,
|
|
1558
|
-
construct: yo,
|
|
1559
|
-
predicate: wo,
|
|
1560
|
-
represent: xo
|
|
1561
|
-
}), bo = C, Eo = Object.prototype.hasOwnProperty, Oo = Object.prototype.toString;
|
|
1562
|
-
function Ao(e) {
|
|
1563
|
-
if (e === null)
|
|
1564
|
-
return !0;
|
|
1565
|
-
var r = [], n, t, i, l, o, u = e;
|
|
1566
|
-
for (n = 0, t = u.length; n < t; n += 1) {
|
|
1567
|
-
if (i = u[n], o = !1, Oo.call(i) !== "[object Object]")
|
|
1568
|
-
return !1;
|
|
1569
|
-
for (l in i)
|
|
1570
|
-
if (Eo.call(i, l))
|
|
1571
|
-
if (!o)
|
|
1572
|
-
o = !0;
|
|
1573
|
-
else
|
|
1574
|
-
return !1;
|
|
1575
|
-
if (!o)
|
|
1576
|
-
return !1;
|
|
1577
|
-
if (r.indexOf(l) === -1)
|
|
1578
|
-
r.push(l);
|
|
1579
|
-
else
|
|
1580
|
-
return !1;
|
|
1581
|
-
}
|
|
1582
|
-
return !0;
|
|
1583
|
-
}
|
|
1584
|
-
function Po(e) {
|
|
1585
|
-
return e !== null ? e : [];
|
|
1586
|
-
}
|
|
1587
|
-
var Nn = new bo("tag:yaml.org,2002:omap", {
|
|
1588
|
-
kind: "sequence",
|
|
1589
|
-
resolve: Ao,
|
|
1590
|
-
construct: Po
|
|
1591
|
-
}), So = C, $o = Object.prototype.toString;
|
|
1592
|
-
function jo(e) {
|
|
1593
|
-
if (e === null)
|
|
1594
|
-
return !0;
|
|
1595
|
-
var r, n, t, i, l, o = e;
|
|
1596
|
-
for (l = new Array(o.length), r = 0, n = o.length; r < n; r += 1) {
|
|
1597
|
-
if (t = o[r], $o.call(t) !== "[object Object]" || (i = Object.keys(t), i.length !== 1))
|
|
1598
|
-
return !1;
|
|
1599
|
-
l[r] = [i[0], t[i[0]]];
|
|
1600
|
-
}
|
|
1601
|
-
return !0;
|
|
1602
|
-
}
|
|
1603
|
-
function Co(e) {
|
|
1604
|
-
if (e === null)
|
|
1605
|
-
return [];
|
|
1606
|
-
var r, n, t, i, l, o = e;
|
|
1607
|
-
for (l = new Array(o.length), r = 0, n = o.length; r < n; r += 1)
|
|
1608
|
-
t = o[r], i = Object.keys(t), l[r] = [i[0], t[i[0]]];
|
|
1609
|
-
return l;
|
|
1610
|
-
}
|
|
1611
|
-
var Ln = new So("tag:yaml.org,2002:pairs", {
|
|
1612
|
-
kind: "sequence",
|
|
1613
|
-
resolve: jo,
|
|
1614
|
-
construct: Co
|
|
1615
|
-
}), To = C, Ro = Object.prototype.hasOwnProperty;
|
|
1616
|
-
function Mo(e) {
|
|
1617
|
-
if (e === null)
|
|
1618
|
-
return !0;
|
|
1619
|
-
var r, n = e;
|
|
1620
|
-
for (r in n)
|
|
1621
|
-
if (Ro.call(n, r) && n[r] !== null)
|
|
1622
|
-
return !1;
|
|
1623
|
-
return !0;
|
|
1624
|
-
}
|
|
1625
|
-
function Fo(e) {
|
|
1626
|
-
return e !== null ? e : {};
|
|
1627
|
-
}
|
|
1628
|
-
var Bn = new To("tag:yaml.org,2002:set", {
|
|
1629
|
-
kind: "mapping",
|
|
1630
|
-
resolve: Mo,
|
|
1631
|
-
construct: Fo
|
|
1632
|
-
}), or = Tn.extend({
|
|
1633
|
-
implicit: [
|
|
1634
|
-
Fn,
|
|
1635
|
-
In
|
|
1636
|
-
],
|
|
1637
|
-
explicit: [
|
|
1638
|
-
Dn,
|
|
1639
|
-
Nn,
|
|
1640
|
-
Ln,
|
|
1641
|
-
Bn
|
|
1642
|
-
]
|
|
1643
|
-
}), G = R, Hn = se, Io = Tt, Do = or, U = Object.prototype.hasOwnProperty, xe = 1, kn = 2, Un = 3, we = 4, Be = 1, No = 2, Ir = 3, Lo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Bo = /[\x85\u2028\u2029]/, Ho = /[,\[\]\{\}]/, Yn = /^(?:!|!!|![a-z\-]+!)$/i, Gn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1644
|
-
function Dr(e) {
|
|
1645
|
-
return Object.prototype.toString.call(e);
|
|
1646
|
-
}
|
|
1647
|
-
function F(e) {
|
|
1648
|
-
return e === 10 || e === 13;
|
|
1649
|
-
}
|
|
1650
|
-
function J(e) {
|
|
1651
|
-
return e === 9 || e === 32;
|
|
1652
|
-
}
|
|
1653
|
-
function T(e) {
|
|
1654
|
-
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1655
|
-
}
|
|
1656
|
-
function V(e) {
|
|
1657
|
-
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1658
|
-
}
|
|
1659
|
-
function ko(e) {
|
|
1660
|
-
var r;
|
|
1661
|
-
return 48 <= e && e <= 57 ? e - 48 : (r = e | 32, 97 <= r && r <= 102 ? r - 97 + 10 : -1);
|
|
1662
|
-
}
|
|
1663
|
-
function Uo(e) {
|
|
1664
|
-
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1665
|
-
}
|
|
1666
|
-
function Yo(e) {
|
|
1667
|
-
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1668
|
-
}
|
|
1669
|
-
function Nr(e) {
|
|
1670
|
-
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1671
|
-
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1672
|
-
}
|
|
1673
|
-
function Go(e) {
|
|
1674
|
-
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1675
|
-
(e - 65536 >> 10) + 55296,
|
|
1676
|
-
(e - 65536 & 1023) + 56320
|
|
1677
|
-
);
|
|
1678
|
-
}
|
|
1679
|
-
var Wn = new Array(256), Jn = new Array(256);
|
|
1680
|
-
for (var K = 0; K < 256; K++)
|
|
1681
|
-
Wn[K] = Nr(K) ? 1 : 0, Jn[K] = Nr(K);
|
|
1682
|
-
function Wo(e, r) {
|
|
1683
|
-
this.input = e, this.filename = r.filename || null, this.schema = r.schema || Do, this.onWarning = r.onWarning || null, this.legacy = r.legacy || !1, this.json = r.json || !1, this.listener = r.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1684
|
-
}
|
|
1685
|
-
function qn(e, r) {
|
|
1686
|
-
var n = {
|
|
1687
|
-
name: e.filename,
|
|
1688
|
-
buffer: e.input.slice(0, -1),
|
|
1689
|
-
// omit trailing \0
|
|
1690
|
-
position: e.position,
|
|
1691
|
-
line: e.line,
|
|
1692
|
-
column: e.position - e.lineStart
|
|
1693
|
-
};
|
|
1694
|
-
return n.snippet = Io(n), new Hn(r, n);
|
|
1695
|
-
}
|
|
1696
|
-
function w(e, r) {
|
|
1697
|
-
throw qn(e, r);
|
|
1698
|
-
}
|
|
1699
|
-
function be(e, r) {
|
|
1700
|
-
e.onWarning && e.onWarning.call(null, qn(e, r));
|
|
1701
|
-
}
|
|
1702
|
-
var Lr = {
|
|
1703
|
-
YAML: function(r, n, t) {
|
|
1704
|
-
var i, l, o;
|
|
1705
|
-
r.version !== null && w(r, "duplication of %YAML directive"), t.length !== 1 && w(r, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), i === null && w(r, "ill-formed argument of the YAML directive"), l = parseInt(i[1], 10), o = parseInt(i[2], 10), l !== 1 && w(r, "unacceptable YAML version of the document"), r.version = t[0], r.checkLineBreaks = o < 2, o !== 1 && o !== 2 && be(r, "unsupported YAML version of the document");
|
|
1706
|
-
},
|
|
1707
|
-
TAG: function(r, n, t) {
|
|
1708
|
-
var i, l;
|
|
1709
|
-
t.length !== 2 && w(r, "TAG directive accepts exactly two arguments"), i = t[0], l = t[1], Yn.test(i) || w(r, "ill-formed tag handle (first argument) of the TAG directive"), U.call(r.tagMap, i) && w(r, 'there is a previously declared suffix for "' + i + '" tag handle'), Gn.test(l) || w(r, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1710
|
-
try {
|
|
1711
|
-
l = decodeURIComponent(l);
|
|
1712
|
-
} catch {
|
|
1713
|
-
w(r, "tag prefix is malformed: " + l);
|
|
1714
|
-
}
|
|
1715
|
-
r.tagMap[i] = l;
|
|
1716
|
-
}
|
|
1717
|
-
};
|
|
1718
|
-
function k(e, r, n, t) {
|
|
1719
|
-
var i, l, o, u;
|
|
1720
|
-
if (r < n) {
|
|
1721
|
-
if (u = e.input.slice(r, n), t)
|
|
1722
|
-
for (i = 0, l = u.length; i < l; i += 1)
|
|
1723
|
-
o = u.charCodeAt(i), o === 9 || 32 <= o && o <= 1114111 || w(e, "expected valid JSON character");
|
|
1724
|
-
else
|
|
1725
|
-
Lo.test(u) && w(e, "the stream contains non-printable characters");
|
|
1726
|
-
e.result += u;
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
function Br(e, r, n, t) {
|
|
1730
|
-
var i, l, o, u;
|
|
1731
|
-
for (G.isObject(n) || w(e, "cannot merge mappings; the provided source object is unacceptable"), i = Object.keys(n), o = 0, u = i.length; o < u; o += 1)
|
|
1732
|
-
l = i[o], U.call(r, l) || (r[l] = n[l], t[l] = !0);
|
|
1733
|
-
}
|
|
1734
|
-
function X(e, r, n, t, i, l, o, u, a) {
|
|
1735
|
-
var f, h;
|
|
1736
|
-
if (Array.isArray(i))
|
|
1737
|
-
for (i = Array.prototype.slice.call(i), f = 0, h = i.length; f < h; f += 1)
|
|
1738
|
-
Array.isArray(i[f]) && w(e, "nested arrays are not supported inside keys"), typeof i == "object" && Dr(i[f]) === "[object Object]" && (i[f] = "[object Object]");
|
|
1739
|
-
if (typeof i == "object" && Dr(i) === "[object Object]" && (i = "[object Object]"), i = String(i), r === null && (r = {}), t === "tag:yaml.org,2002:merge")
|
|
1740
|
-
if (Array.isArray(l))
|
|
1741
|
-
for (f = 0, h = l.length; f < h; f += 1)
|
|
1742
|
-
Br(e, r, l[f], n);
|
|
1743
|
-
else
|
|
1744
|
-
Br(e, r, l, n);
|
|
1745
|
-
else
|
|
1746
|
-
!e.json && !U.call(n, i) && U.call(r, i) && (e.line = o || e.line, e.lineStart = u || e.lineStart, e.position = a || e.position, w(e, "duplicated mapping key")), i === "__proto__" ? Object.defineProperty(r, i, {
|
|
1747
|
-
configurable: !0,
|
|
1748
|
-
enumerable: !0,
|
|
1749
|
-
writable: !0,
|
|
1750
|
-
value: l
|
|
1751
|
-
}) : r[i] = l, delete n[i];
|
|
1752
|
-
return r;
|
|
1753
|
-
}
|
|
1754
|
-
function lr(e) {
|
|
1755
|
-
var r;
|
|
1756
|
-
r = e.input.charCodeAt(e.position), r === 10 ? e.position++ : r === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : w(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1757
|
-
}
|
|
1758
|
-
function S(e, r, n) {
|
|
1759
|
-
for (var t = 0, i = e.input.charCodeAt(e.position); i !== 0; ) {
|
|
1760
|
-
for (; J(i); )
|
|
1761
|
-
i === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), i = e.input.charCodeAt(++e.position);
|
|
1762
|
-
if (r && i === 35)
|
|
1763
|
-
do
|
|
1764
|
-
i = e.input.charCodeAt(++e.position);
|
|
1765
|
-
while (i !== 10 && i !== 13 && i !== 0);
|
|
1766
|
-
if (F(i))
|
|
1767
|
-
for (lr(e), i = e.input.charCodeAt(e.position), t++, e.lineIndent = 0; i === 32; )
|
|
1768
|
-
e.lineIndent++, i = e.input.charCodeAt(++e.position);
|
|
1769
|
-
else
|
|
1770
|
-
break;
|
|
1771
|
-
}
|
|
1772
|
-
return n !== -1 && t !== 0 && e.lineIndent < n && be(e, "deficient indentation"), t;
|
|
1773
|
-
}
|
|
1774
|
-
function Me(e) {
|
|
1775
|
-
var r = e.position, n;
|
|
1776
|
-
return n = e.input.charCodeAt(r), !!((n === 45 || n === 46) && n === e.input.charCodeAt(r + 1) && n === e.input.charCodeAt(r + 2) && (r += 3, n = e.input.charCodeAt(r), n === 0 || T(n)));
|
|
1777
|
-
}
|
|
1778
|
-
function ur(e, r) {
|
|
1779
|
-
r === 1 ? e.result += " " : r > 1 && (e.result += G.repeat(`
|
|
1780
|
-
`, r - 1));
|
|
1781
|
-
}
|
|
1782
|
-
function Jo(e, r, n) {
|
|
1783
|
-
var t, i, l, o, u, a, f, h, s = e.kind, p = e.result, g;
|
|
1784
|
-
if (g = e.input.charCodeAt(e.position), T(g) || V(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (i = e.input.charCodeAt(e.position + 1), T(i) || n && V(i)))
|
|
1785
|
-
return !1;
|
|
1786
|
-
for (e.kind = "scalar", e.result = "", l = o = e.position, u = !1; g !== 0; ) {
|
|
1787
|
-
if (g === 58) {
|
|
1788
|
-
if (i = e.input.charCodeAt(e.position + 1), T(i) || n && V(i))
|
|
1789
|
-
break;
|
|
1790
|
-
} else if (g === 35) {
|
|
1791
|
-
if (t = e.input.charCodeAt(e.position - 1), T(t))
|
|
1792
|
-
break;
|
|
1793
|
-
} else {
|
|
1794
|
-
if (e.position === e.lineStart && Me(e) || n && V(g))
|
|
1795
|
-
break;
|
|
1796
|
-
if (F(g))
|
|
1797
|
-
if (a = e.line, f = e.lineStart, h = e.lineIndent, S(e, !1, -1), e.lineIndent >= r) {
|
|
1798
|
-
u = !0, g = e.input.charCodeAt(e.position);
|
|
1799
|
-
continue;
|
|
1800
|
-
} else {
|
|
1801
|
-
e.position = o, e.line = a, e.lineStart = f, e.lineIndent = h;
|
|
1802
|
-
break;
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
u && (k(e, l, o, !1), ur(e, e.line - a), l = o = e.position, u = !1), J(g) || (o = e.position + 1), g = e.input.charCodeAt(++e.position);
|
|
1806
|
-
}
|
|
1807
|
-
return k(e, l, o, !1), e.result ? !0 : (e.kind = s, e.result = p, !1);
|
|
1808
|
-
}
|
|
1809
|
-
function qo(e, r) {
|
|
1810
|
-
var n, t, i;
|
|
1811
|
-
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1812
|
-
return !1;
|
|
1813
|
-
for (e.kind = "scalar", e.result = "", e.position++, t = i = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1814
|
-
if (n === 39)
|
|
1815
|
-
if (k(e, t, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1816
|
-
t = e.position, e.position++, i = e.position;
|
|
1817
|
-
else
|
|
1818
|
-
return !0;
|
|
1819
|
-
else
|
|
1820
|
-
F(n) ? (k(e, t, i, !0), ur(e, S(e, !1, r)), t = i = e.position) : e.position === e.lineStart && Me(e) ? w(e, "unexpected end of the document within a single quoted scalar") : (e.position++, i = e.position);
|
|
1821
|
-
w(e, "unexpected end of the stream within a single quoted scalar");
|
|
1822
|
-
}
|
|
1823
|
-
function Ko(e, r) {
|
|
1824
|
-
var n, t, i, l, o, u;
|
|
1825
|
-
if (u = e.input.charCodeAt(e.position), u !== 34)
|
|
1826
|
-
return !1;
|
|
1827
|
-
for (e.kind = "scalar", e.result = "", e.position++, n = t = e.position; (u = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1828
|
-
if (u === 34)
|
|
1829
|
-
return k(e, n, e.position, !0), e.position++, !0;
|
|
1830
|
-
if (u === 92) {
|
|
1831
|
-
if (k(e, n, e.position, !0), u = e.input.charCodeAt(++e.position), F(u))
|
|
1832
|
-
S(e, !1, r);
|
|
1833
|
-
else if (u < 256 && Wn[u])
|
|
1834
|
-
e.result += Jn[u], e.position++;
|
|
1835
|
-
else if ((o = Uo(u)) > 0) {
|
|
1836
|
-
for (i = o, l = 0; i > 0; i--)
|
|
1837
|
-
u = e.input.charCodeAt(++e.position), (o = ko(u)) >= 0 ? l = (l << 4) + o : w(e, "expected hexadecimal character");
|
|
1838
|
-
e.result += Go(l), e.position++;
|
|
1839
|
-
} else
|
|
1840
|
-
w(e, "unknown escape sequence");
|
|
1841
|
-
n = t = e.position;
|
|
1842
|
-
} else
|
|
1843
|
-
F(u) ? (k(e, n, t, !0), ur(e, S(e, !1, r)), n = t = e.position) : e.position === e.lineStart && Me(e) ? w(e, "unexpected end of the document within a double quoted scalar") : (e.position++, t = e.position);
|
|
1844
|
-
}
|
|
1845
|
-
w(e, "unexpected end of the stream within a double quoted scalar");
|
|
1846
|
-
}
|
|
1847
|
-
function zo(e, r) {
|
|
1848
|
-
var n = !0, t, i, l, o = e.tag, u, a = e.anchor, f, h, s, p, g, m = /* @__PURE__ */ Object.create(null), y, b, d, c;
|
|
1849
|
-
if (c = e.input.charCodeAt(e.position), c === 91)
|
|
1850
|
-
h = 93, g = !1, u = [];
|
|
1851
|
-
else if (c === 123)
|
|
1852
|
-
h = 125, g = !0, u = {};
|
|
1853
|
-
else
|
|
1854
|
-
return !1;
|
|
1855
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), c = e.input.charCodeAt(++e.position); c !== 0; ) {
|
|
1856
|
-
if (S(e, !0, r), c = e.input.charCodeAt(e.position), c === h)
|
|
1857
|
-
return e.position++, e.tag = o, e.anchor = a, e.kind = g ? "mapping" : "sequence", e.result = u, !0;
|
|
1858
|
-
n ? c === 44 && w(e, "expected the node content, but found ','") : w(e, "missed comma between flow collection entries"), b = y = d = null, s = p = !1, c === 63 && (f = e.input.charCodeAt(e.position + 1), T(f) && (s = p = !0, e.position++, S(e, !0, r))), t = e.line, i = e.lineStart, l = e.position, Z(e, r, xe, !1, !0), b = e.tag, y = e.result, S(e, !0, r), c = e.input.charCodeAt(e.position), (p || e.line === t) && c === 58 && (s = !0, c = e.input.charCodeAt(++e.position), S(e, !0, r), Z(e, r, xe, !1, !0), d = e.result), g ? X(e, u, m, b, y, d, t, i, l) : s ? u.push(X(e, null, m, b, y, d, t, i, l)) : u.push(y), S(e, !0, r), c = e.input.charCodeAt(e.position), c === 44 ? (n = !0, c = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1859
|
-
}
|
|
1860
|
-
w(e, "unexpected end of the stream within a flow collection");
|
|
1861
|
-
}
|
|
1862
|
-
function Qo(e, r) {
|
|
1863
|
-
var n, t, i = Be, l = !1, o = !1, u = r, a = 0, f = !1, h, s;
|
|
1864
|
-
if (s = e.input.charCodeAt(e.position), s === 124)
|
|
1865
|
-
t = !1;
|
|
1866
|
-
else if (s === 62)
|
|
1867
|
-
t = !0;
|
|
1868
|
-
else
|
|
1869
|
-
return !1;
|
|
1870
|
-
for (e.kind = "scalar", e.result = ""; s !== 0; )
|
|
1871
|
-
if (s = e.input.charCodeAt(++e.position), s === 43 || s === 45)
|
|
1872
|
-
Be === i ? i = s === 43 ? Ir : No : w(e, "repeat of a chomping mode identifier");
|
|
1873
|
-
else if ((h = Yo(s)) >= 0)
|
|
1874
|
-
h === 0 ? w(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? w(e, "repeat of an indentation width identifier") : (u = r + h - 1, o = !0);
|
|
1875
|
-
else
|
|
1876
|
-
break;
|
|
1877
|
-
if (J(s)) {
|
|
1878
|
-
do
|
|
1879
|
-
s = e.input.charCodeAt(++e.position);
|
|
1880
|
-
while (J(s));
|
|
1881
|
-
if (s === 35)
|
|
1882
|
-
do
|
|
1883
|
-
s = e.input.charCodeAt(++e.position);
|
|
1884
|
-
while (!F(s) && s !== 0);
|
|
1885
|
-
}
|
|
1886
|
-
for (; s !== 0; ) {
|
|
1887
|
-
for (lr(e), e.lineIndent = 0, s = e.input.charCodeAt(e.position); (!o || e.lineIndent < u) && s === 32; )
|
|
1888
|
-
e.lineIndent++, s = e.input.charCodeAt(++e.position);
|
|
1889
|
-
if (!o && e.lineIndent > u && (u = e.lineIndent), F(s)) {
|
|
1890
|
-
a++;
|
|
1891
|
-
continue;
|
|
1892
|
-
}
|
|
1893
|
-
if (e.lineIndent < u) {
|
|
1894
|
-
i === Ir ? e.result += G.repeat(`
|
|
1895
|
-
`, l ? 1 + a : a) : i === Be && l && (e.result += `
|
|
1896
|
-
`);
|
|
1897
|
-
break;
|
|
1898
|
-
}
|
|
1899
|
-
for (t ? J(s) ? (f = !0, e.result += G.repeat(`
|
|
1900
|
-
`, l ? 1 + a : a)) : f ? (f = !1, e.result += G.repeat(`
|
|
1901
|
-
`, a + 1)) : a === 0 ? l && (e.result += " ") : e.result += G.repeat(`
|
|
1902
|
-
`, a) : e.result += G.repeat(`
|
|
1903
|
-
`, l ? 1 + a : a), l = !0, o = !0, a = 0, n = e.position; !F(s) && s !== 0; )
|
|
1904
|
-
s = e.input.charCodeAt(++e.position);
|
|
1905
|
-
k(e, n, e.position, !1);
|
|
1906
|
-
}
|
|
1907
|
-
return !0;
|
|
1908
|
-
}
|
|
1909
|
-
function Hr(e, r) {
|
|
1910
|
-
var n, t = e.tag, i = e.anchor, l = [], o, u = !1, a;
|
|
1911
|
-
if (e.firstTabInLine !== -1)
|
|
1912
|
-
return !1;
|
|
1913
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), a = e.input.charCodeAt(e.position); a !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, w(e, "tab characters must not be used in indentation")), !(a !== 45 || (o = e.input.charCodeAt(e.position + 1), !T(o)))); ) {
|
|
1914
|
-
if (u = !0, e.position++, S(e, !0, -1) && e.lineIndent <= r) {
|
|
1915
|
-
l.push(null), a = e.input.charCodeAt(e.position);
|
|
1916
|
-
continue;
|
|
1917
|
-
}
|
|
1918
|
-
if (n = e.line, Z(e, r, Un, !1, !0), l.push(e.result), S(e, !0, -1), a = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > r) && a !== 0)
|
|
1919
|
-
w(e, "bad indentation of a sequence entry");
|
|
1920
|
-
else if (e.lineIndent < r)
|
|
1921
|
-
break;
|
|
1922
|
-
}
|
|
1923
|
-
return u ? (e.tag = t, e.anchor = i, e.kind = "sequence", e.result = l, !0) : !1;
|
|
1924
|
-
}
|
|
1925
|
-
function Vo(e, r, n) {
|
|
1926
|
-
var t, i, l, o, u, a, f = e.tag, h = e.anchor, s = {}, p = /* @__PURE__ */ Object.create(null), g = null, m = null, y = null, b = !1, d = !1, c;
|
|
1927
|
-
if (e.firstTabInLine !== -1)
|
|
1928
|
-
return !1;
|
|
1929
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), c = e.input.charCodeAt(e.position); c !== 0; ) {
|
|
1930
|
-
if (!b && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, w(e, "tab characters must not be used in indentation")), t = e.input.charCodeAt(e.position + 1), l = e.line, (c === 63 || c === 58) && T(t))
|
|
1931
|
-
c === 63 ? (b && (X(e, s, p, g, m, null, o, u, a), g = m = y = null), d = !0, b = !0, i = !0) : b ? (b = !1, i = !0) : w(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, c = t;
|
|
1932
|
-
else {
|
|
1933
|
-
if (o = e.line, u = e.lineStart, a = e.position, !Z(e, n, kn, !1, !0))
|
|
1934
|
-
break;
|
|
1935
|
-
if (e.line === l) {
|
|
1936
|
-
for (c = e.input.charCodeAt(e.position); J(c); )
|
|
1937
|
-
c = e.input.charCodeAt(++e.position);
|
|
1938
|
-
if (c === 58)
|
|
1939
|
-
c = e.input.charCodeAt(++e.position), T(c) || w(e, "a whitespace character is expected after the key-value separator within a block mapping"), b && (X(e, s, p, g, m, null, o, u, a), g = m = y = null), d = !0, b = !1, i = !1, g = e.tag, m = e.result;
|
|
1940
|
-
else if (d)
|
|
1941
|
-
w(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1942
|
-
else
|
|
1943
|
-
return e.tag = f, e.anchor = h, !0;
|
|
1944
|
-
} else if (d)
|
|
1945
|
-
w(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1946
|
-
else
|
|
1947
|
-
return e.tag = f, e.anchor = h, !0;
|
|
1948
|
-
}
|
|
1949
|
-
if ((e.line === l || e.lineIndent > r) && (b && (o = e.line, u = e.lineStart, a = e.position), Z(e, r, we, !0, i) && (b ? m = e.result : y = e.result), b || (X(e, s, p, g, m, y, o, u, a), g = m = y = null), S(e, !0, -1), c = e.input.charCodeAt(e.position)), (e.line === l || e.lineIndent > r) && c !== 0)
|
|
1950
|
-
w(e, "bad indentation of a mapping entry");
|
|
1951
|
-
else if (e.lineIndent < r)
|
|
1952
|
-
break;
|
|
1953
|
-
}
|
|
1954
|
-
return b && X(e, s, p, g, m, null, o, u, a), d && (e.tag = f, e.anchor = h, e.kind = "mapping", e.result = s), d;
|
|
1955
|
-
}
|
|
1956
|
-
function Xo(e) {
|
|
1957
|
-
var r, n = !1, t = !1, i, l, o;
|
|
1958
|
-
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1959
|
-
return !1;
|
|
1960
|
-
if (e.tag !== null && w(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (t = !0, i = "!!", o = e.input.charCodeAt(++e.position)) : i = "!", r = e.position, n) {
|
|
1961
|
-
do
|
|
1962
|
-
o = e.input.charCodeAt(++e.position);
|
|
1963
|
-
while (o !== 0 && o !== 62);
|
|
1964
|
-
e.position < e.length ? (l = e.input.slice(r, e.position), o = e.input.charCodeAt(++e.position)) : w(e, "unexpected end of the stream within a verbatim tag");
|
|
1965
|
-
} else {
|
|
1966
|
-
for (; o !== 0 && !T(o); )
|
|
1967
|
-
o === 33 && (t ? w(e, "tag suffix cannot contain exclamation marks") : (i = e.input.slice(r - 1, e.position + 1), Yn.test(i) || w(e, "named tag handle cannot contain such characters"), t = !0, r = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1968
|
-
l = e.input.slice(r, e.position), Ho.test(l) && w(e, "tag suffix cannot contain flow indicator characters");
|
|
1969
|
-
}
|
|
1970
|
-
l && !Gn.test(l) && w(e, "tag name cannot contain such characters: " + l);
|
|
1971
|
-
try {
|
|
1972
|
-
l = decodeURIComponent(l);
|
|
1973
|
-
} catch {
|
|
1974
|
-
w(e, "tag name is malformed: " + l);
|
|
1975
|
-
}
|
|
1976
|
-
return n ? e.tag = l : U.call(e.tagMap, i) ? e.tag = e.tagMap[i] + l : i === "!" ? e.tag = "!" + l : i === "!!" ? e.tag = "tag:yaml.org,2002:" + l : w(e, 'undeclared tag handle "' + i + '"'), !0;
|
|
1977
|
-
}
|
|
1978
|
-
function Zo(e) {
|
|
1979
|
-
var r, n;
|
|
1980
|
-
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1981
|
-
return !1;
|
|
1982
|
-
for (e.anchor !== null && w(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), r = e.position; n !== 0 && !T(n) && !V(n); )
|
|
1983
|
-
n = e.input.charCodeAt(++e.position);
|
|
1984
|
-
return e.position === r && w(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(r, e.position), !0;
|
|
1985
|
-
}
|
|
1986
|
-
function el(e) {
|
|
1987
|
-
var r, n, t;
|
|
1988
|
-
if (t = e.input.charCodeAt(e.position), t !== 42)
|
|
1989
|
-
return !1;
|
|
1990
|
-
for (t = e.input.charCodeAt(++e.position), r = e.position; t !== 0 && !T(t) && !V(t); )
|
|
1991
|
-
t = e.input.charCodeAt(++e.position);
|
|
1992
|
-
return e.position === r && w(e, "name of an alias node must contain at least one character"), n = e.input.slice(r, e.position), U.call(e.anchorMap, n) || w(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], S(e, !0, -1), !0;
|
|
1993
|
-
}
|
|
1994
|
-
function Z(e, r, n, t, i) {
|
|
1995
|
-
var l, o, u, a = 1, f = !1, h = !1, s, p, g, m, y, b;
|
|
1996
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = u = we === n || Un === n, t && S(e, !0, -1) && (f = !0, e.lineIndent > r ? a = 1 : e.lineIndent === r ? a = 0 : e.lineIndent < r && (a = -1)), a === 1)
|
|
1997
|
-
for (; Xo(e) || Zo(e); )
|
|
1998
|
-
S(e, !0, -1) ? (f = !0, u = l, e.lineIndent > r ? a = 1 : e.lineIndent === r ? a = 0 : e.lineIndent < r && (a = -1)) : u = !1;
|
|
1999
|
-
if (u && (u = f || i), (a === 1 || we === n) && (xe === n || kn === n ? y = r : y = r + 1, b = e.position - e.lineStart, a === 1 ? u && (Hr(e, b) || Vo(e, b, y)) || zo(e, y) ? h = !0 : (o && Qo(e, y) || qo(e, y) || Ko(e, y) ? h = !0 : el(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && w(e, "alias node should not have any properties")) : Jo(e, y, xe === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : a === 0 && (h = u && Hr(e, b))), e.tag === null)
|
|
2000
|
-
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2001
|
-
else if (e.tag === "?") {
|
|
2002
|
-
for (e.result !== null && e.kind !== "scalar" && w(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), s = 0, p = e.implicitTypes.length; s < p; s += 1)
|
|
2003
|
-
if (m = e.implicitTypes[s], m.resolve(e.result)) {
|
|
2004
|
-
e.result = m.construct(e.result), e.tag = m.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2005
|
-
break;
|
|
2006
|
-
}
|
|
2007
|
-
} else if (e.tag !== "!") {
|
|
2008
|
-
if (U.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2009
|
-
m = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2010
|
-
else
|
|
2011
|
-
for (m = null, g = e.typeMap.multi[e.kind || "fallback"], s = 0, p = g.length; s < p; s += 1)
|
|
2012
|
-
if (e.tag.slice(0, g[s].tag.length) === g[s].tag) {
|
|
2013
|
-
m = g[s];
|
|
2014
|
-
break;
|
|
2015
|
-
}
|
|
2016
|
-
m || w(e, "unknown tag !<" + e.tag + ">"), e.result !== null && m.kind !== e.kind && w(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + m.kind + '", not "' + e.kind + '"'), m.resolve(e.result, e.tag) ? (e.result = m.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : w(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2017
|
-
}
|
|
2018
|
-
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || h;
|
|
2019
|
-
}
|
|
2020
|
-
function rl(e) {
|
|
2021
|
-
var r = e.position, n, t, i, l = !1, o;
|
|
2022
|
-
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (S(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
2023
|
-
for (l = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !T(o); )
|
|
2024
|
-
o = e.input.charCodeAt(++e.position);
|
|
2025
|
-
for (t = e.input.slice(n, e.position), i = [], t.length < 1 && w(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2026
|
-
for (; J(o); )
|
|
2027
|
-
o = e.input.charCodeAt(++e.position);
|
|
2028
|
-
if (o === 35) {
|
|
2029
|
-
do
|
|
2030
|
-
o = e.input.charCodeAt(++e.position);
|
|
2031
|
-
while (o !== 0 && !F(o));
|
|
2032
|
-
break;
|
|
2033
|
-
}
|
|
2034
|
-
if (F(o))
|
|
2035
|
-
break;
|
|
2036
|
-
for (n = e.position; o !== 0 && !T(o); )
|
|
2037
|
-
o = e.input.charCodeAt(++e.position);
|
|
2038
|
-
i.push(e.input.slice(n, e.position));
|
|
2039
|
-
}
|
|
2040
|
-
o !== 0 && lr(e), U.call(Lr, t) ? Lr[t](e, t, i) : be(e, 'unknown document directive "' + t + '"');
|
|
2041
|
-
}
|
|
2042
|
-
if (S(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, S(e, !0, -1)) : l && w(e, "directives end mark is expected"), Z(e, e.lineIndent - 1, we, !1, !0), S(e, !0, -1), e.checkLineBreaks && Bo.test(e.input.slice(r, e.position)) && be(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Me(e)) {
|
|
2043
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3, S(e, !0, -1));
|
|
2044
|
-
return;
|
|
2045
|
-
}
|
|
2046
|
-
if (e.position < e.length - 1)
|
|
2047
|
-
w(e, "end of the stream or a document separator is expected");
|
|
2048
|
-
else
|
|
2049
|
-
return;
|
|
2050
|
-
}
|
|
2051
|
-
function Kn(e, r) {
|
|
2052
|
-
e = String(e), r = r || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2053
|
-
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2054
|
-
var n = new Wo(e, r), t = e.indexOf("\0");
|
|
2055
|
-
for (t !== -1 && (n.position = t, w(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2056
|
-
n.lineIndent += 1, n.position += 1;
|
|
2057
|
-
for (; n.position < n.length - 1; )
|
|
2058
|
-
rl(n);
|
|
2059
|
-
return n.documents;
|
|
2060
|
-
}
|
|
2061
|
-
function nl(e, r, n) {
|
|
2062
|
-
r !== null && typeof r == "object" && typeof n > "u" && (n = r, r = null);
|
|
2063
|
-
var t = Kn(e, n);
|
|
2064
|
-
if (typeof r != "function")
|
|
2065
|
-
return t;
|
|
2066
|
-
for (var i = 0, l = t.length; i < l; i += 1)
|
|
2067
|
-
r(t[i]);
|
|
2068
|
-
}
|
|
2069
|
-
function il(e, r) {
|
|
2070
|
-
var n = Kn(e, r);
|
|
2071
|
-
if (n.length !== 0) {
|
|
2072
|
-
if (n.length === 1)
|
|
2073
|
-
return n[0];
|
|
2074
|
-
throw new Hn("expected a single document in the stream, but found more");
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
ir.loadAll = nl;
|
|
2078
|
-
ir.load = il;
|
|
2079
|
-
var zn = {}, Fe = R, de = se, tl = or, Qn = Object.prototype.toString, Vn = Object.prototype.hasOwnProperty, ar = 65279, ol = 9, oe = 10, ll = 13, ul = 32, al = 33, cl = 34, Je = 35, fl = 37, sl = 38, dl = 39, pl = 42, Xn = 44, hl = 45, Ee = 58, gl = 61, _l = 62, ml = 63, vl = 64, Zn = 91, ei = 93, yl = 96, ri = 123, xl = 124, ni = 125, j = {};
|
|
2080
|
-
j[0] = "\\0";
|
|
2081
|
-
j[7] = "\\a";
|
|
2082
|
-
j[8] = "\\b";
|
|
2083
|
-
j[9] = "\\t";
|
|
2084
|
-
j[10] = "\\n";
|
|
2085
|
-
j[11] = "\\v";
|
|
2086
|
-
j[12] = "\\f";
|
|
2087
|
-
j[13] = "\\r";
|
|
2088
|
-
j[27] = "\\e";
|
|
2089
|
-
j[34] = '\\"';
|
|
2090
|
-
j[92] = "\\\\";
|
|
2091
|
-
j[133] = "\\N";
|
|
2092
|
-
j[160] = "\\_";
|
|
2093
|
-
j[8232] = "\\L";
|
|
2094
|
-
j[8233] = "\\P";
|
|
2095
|
-
var wl = [
|
|
2096
|
-
"y",
|
|
2097
|
-
"Y",
|
|
2098
|
-
"yes",
|
|
2099
|
-
"Yes",
|
|
2100
|
-
"YES",
|
|
2101
|
-
"on",
|
|
2102
|
-
"On",
|
|
2103
|
-
"ON",
|
|
2104
|
-
"n",
|
|
2105
|
-
"N",
|
|
2106
|
-
"no",
|
|
2107
|
-
"No",
|
|
2108
|
-
"NO",
|
|
2109
|
-
"off",
|
|
2110
|
-
"Off",
|
|
2111
|
-
"OFF"
|
|
2112
|
-
], bl = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2113
|
-
function El(e, r) {
|
|
2114
|
-
var n, t, i, l, o, u, a;
|
|
2115
|
-
if (r === null)
|
|
2116
|
-
return {};
|
|
2117
|
-
for (n = {}, t = Object.keys(r), i = 0, l = t.length; i < l; i += 1)
|
|
2118
|
-
o = t[i], u = String(r[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), a = e.compiledTypeMap.fallback[o], a && Vn.call(a.styleAliases, u) && (u = a.styleAliases[u]), n[o] = u;
|
|
2119
|
-
return n;
|
|
2120
|
-
}
|
|
2121
|
-
function Ol(e) {
|
|
2122
|
-
var r, n, t;
|
|
2123
|
-
if (r = e.toString(16).toUpperCase(), e <= 255)
|
|
2124
|
-
n = "x", t = 2;
|
|
2125
|
-
else if (e <= 65535)
|
|
2126
|
-
n = "u", t = 4;
|
|
2127
|
-
else if (e <= 4294967295)
|
|
2128
|
-
n = "U", t = 8;
|
|
2129
|
-
else
|
|
2130
|
-
throw new de("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2131
|
-
return "\\" + n + Fe.repeat("0", t - r.length) + r;
|
|
2132
|
-
}
|
|
2133
|
-
var Al = 1, le = 2;
|
|
2134
|
-
function Pl(e) {
|
|
2135
|
-
this.schema = e.schema || tl, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = Fe.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = El(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? le : Al, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2136
|
-
}
|
|
2137
|
-
function kr(e, r) {
|
|
2138
|
-
for (var n = Fe.repeat(" ", r), t = 0, i = -1, l = "", o, u = e.length; t < u; )
|
|
2139
|
-
i = e.indexOf(`
|
|
2140
|
-
`, t), i === -1 ? (o = e.slice(t), t = u) : (o = e.slice(t, i + 1), t = i + 1), o.length && o !== `
|
|
2141
|
-
` && (l += n), l += o;
|
|
2142
|
-
return l;
|
|
2143
|
-
}
|
|
2144
|
-
function qe(e, r) {
|
|
2145
|
-
return `
|
|
2146
|
-
` + Fe.repeat(" ", e.indent * r);
|
|
2147
|
-
}
|
|
2148
|
-
function Sl(e, r) {
|
|
2149
|
-
var n, t, i;
|
|
2150
|
-
for (n = 0, t = e.implicitTypes.length; n < t; n += 1)
|
|
2151
|
-
if (i = e.implicitTypes[n], i.resolve(r))
|
|
2152
|
-
return !0;
|
|
2153
|
-
return !1;
|
|
2154
|
-
}
|
|
2155
|
-
function Oe(e) {
|
|
2156
|
-
return e === ul || e === ol;
|
|
2157
|
-
}
|
|
2158
|
-
function ue(e) {
|
|
2159
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ar || 65536 <= e && e <= 1114111;
|
|
2160
|
-
}
|
|
2161
|
-
function Ur(e) {
|
|
2162
|
-
return ue(e) && e !== ar && e !== ll && e !== oe;
|
|
2163
|
-
}
|
|
2164
|
-
function Yr(e, r, n) {
|
|
2165
|
-
var t = Ur(e), i = t && !Oe(e);
|
|
2166
|
-
return (
|
|
2167
|
-
// ns-plain-safe
|
|
2168
|
-
(n ? (
|
|
2169
|
-
// c = flow-in
|
|
2170
|
-
t
|
|
2171
|
-
) : t && e !== Xn && e !== Zn && e !== ei && e !== ri && e !== ni) && e !== Je && !(r === Ee && !i) || Ur(r) && !Oe(r) && e === Je || r === Ee && i
|
|
2172
|
-
);
|
|
2173
|
-
}
|
|
2174
|
-
function $l(e) {
|
|
2175
|
-
return ue(e) && e !== ar && !Oe(e) && e !== hl && e !== ml && e !== Ee && e !== Xn && e !== Zn && e !== ei && e !== ri && e !== ni && e !== Je && e !== sl && e !== pl && e !== al && e !== xl && e !== gl && e !== _l && e !== dl && e !== cl && e !== fl && e !== vl && e !== yl;
|
|
2176
|
-
}
|
|
2177
|
-
function jl(e) {
|
|
2178
|
-
return !Oe(e) && e !== Ee;
|
|
2179
|
-
}
|
|
2180
|
-
function ne(e, r) {
|
|
2181
|
-
var n = e.charCodeAt(r), t;
|
|
2182
|
-
return n >= 55296 && n <= 56319 && r + 1 < e.length && (t = e.charCodeAt(r + 1), t >= 56320 && t <= 57343) ? (n - 55296) * 1024 + t - 56320 + 65536 : n;
|
|
2183
|
-
}
|
|
2184
|
-
function ii(e) {
|
|
2185
|
-
var r = /^\n* /;
|
|
2186
|
-
return r.test(e);
|
|
2187
|
-
}
|
|
2188
|
-
var ti = 1, Ke = 2, oi = 3, li = 4, Q = 5;
|
|
2189
|
-
function Cl(e, r, n, t, i, l, o, u) {
|
|
2190
|
-
var a, f = 0, h = null, s = !1, p = !1, g = t !== -1, m = -1, y = $l(ne(e, 0)) && jl(ne(e, e.length - 1));
|
|
2191
|
-
if (r || o)
|
|
2192
|
-
for (a = 0; a < e.length; f >= 65536 ? a += 2 : a++) {
|
|
2193
|
-
if (f = ne(e, a), !ue(f))
|
|
2194
|
-
return Q;
|
|
2195
|
-
y = y && Yr(f, h, u), h = f;
|
|
2196
|
-
}
|
|
2197
|
-
else {
|
|
2198
|
-
for (a = 0; a < e.length; f >= 65536 ? a += 2 : a++) {
|
|
2199
|
-
if (f = ne(e, a), f === oe)
|
|
2200
|
-
s = !0, g && (p = p || // Foldable line = too long, and not more-indented.
|
|
2201
|
-
a - m - 1 > t && e[m + 1] !== " ", m = a);
|
|
2202
|
-
else if (!ue(f))
|
|
2203
|
-
return Q;
|
|
2204
|
-
y = y && Yr(f, h, u), h = f;
|
|
2205
|
-
}
|
|
2206
|
-
p = p || g && a - m - 1 > t && e[m + 1] !== " ";
|
|
2207
|
-
}
|
|
2208
|
-
return !s && !p ? y && !o && !i(e) ? ti : l === le ? Q : Ke : n > 9 && ii(e) ? Q : o ? l === le ? Q : Ke : p ? li : oi;
|
|
2209
|
-
}
|
|
2210
|
-
function Tl(e, r, n, t, i) {
|
|
2211
|
-
e.dump = function() {
|
|
2212
|
-
if (r.length === 0)
|
|
2213
|
-
return e.quotingType === le ? '""' : "''";
|
|
2214
|
-
if (!e.noCompatMode && (wl.indexOf(r) !== -1 || bl.test(r)))
|
|
2215
|
-
return e.quotingType === le ? '"' + r + '"' : "'" + r + "'";
|
|
2216
|
-
var l = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), u = t || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2217
|
-
function a(f) {
|
|
2218
|
-
return Sl(e, f);
|
|
2219
|
-
}
|
|
2220
|
-
switch (Cl(
|
|
2221
|
-
r,
|
|
2222
|
-
u,
|
|
2223
|
-
e.indent,
|
|
2224
|
-
o,
|
|
2225
|
-
a,
|
|
2226
|
-
e.quotingType,
|
|
2227
|
-
e.forceQuotes && !t,
|
|
2228
|
-
i
|
|
2229
|
-
)) {
|
|
2230
|
-
case ti:
|
|
2231
|
-
return r;
|
|
2232
|
-
case Ke:
|
|
2233
|
-
return "'" + r.replace(/'/g, "''") + "'";
|
|
2234
|
-
case oi:
|
|
2235
|
-
return "|" + Gr(r, e.indent) + Wr(kr(r, l));
|
|
2236
|
-
case li:
|
|
2237
|
-
return ">" + Gr(r, e.indent) + Wr(kr(Rl(r, o), l));
|
|
2238
|
-
case Q:
|
|
2239
|
-
return '"' + Ml(r) + '"';
|
|
2240
|
-
default:
|
|
2241
|
-
throw new de("impossible error: invalid scalar style");
|
|
2242
|
-
}
|
|
2243
|
-
}();
|
|
2244
|
-
}
|
|
2245
|
-
function Gr(e, r) {
|
|
2246
|
-
var n = ii(e) ? String(r) : "", t = e[e.length - 1] === `
|
|
2247
|
-
`, i = t && (e[e.length - 2] === `
|
|
2248
|
-
` || e === `
|
|
2249
|
-
`), l = i ? "+" : t ? "" : "-";
|
|
2250
|
-
return n + l + `
|
|
2251
|
-
`;
|
|
2252
|
-
}
|
|
2253
|
-
function Wr(e) {
|
|
2254
|
-
return e[e.length - 1] === `
|
|
2255
|
-
` ? e.slice(0, -1) : e;
|
|
2256
|
-
}
|
|
2257
|
-
function Rl(e, r) {
|
|
2258
|
-
for (var n = /(\n+)([^\n]*)/g, t = function() {
|
|
2259
|
-
var f = e.indexOf(`
|
|
2260
|
-
`);
|
|
2261
|
-
return f = f !== -1 ? f : e.length, n.lastIndex = f, Jr(e.slice(0, f), r);
|
|
2262
|
-
}(), i = e[0] === `
|
|
2263
|
-
` || e[0] === " ", l, o; o = n.exec(e); ) {
|
|
2264
|
-
var u = o[1], a = o[2];
|
|
2265
|
-
l = a[0] === " ", t += u + (!i && !l && a !== "" ? `
|
|
2266
|
-
` : "") + Jr(a, r), i = l;
|
|
2267
|
-
}
|
|
2268
|
-
return t;
|
|
2269
|
-
}
|
|
2270
|
-
function Jr(e, r) {
|
|
2271
|
-
if (e === "" || e[0] === " ")
|
|
2272
|
-
return e;
|
|
2273
|
-
for (var n = / [^ ]/g, t, i = 0, l, o = 0, u = 0, a = ""; t = n.exec(e); )
|
|
2274
|
-
u = t.index, u - i > r && (l = o > i ? o : u, a += `
|
|
2275
|
-
` + e.slice(i, l), i = l + 1), o = u;
|
|
2276
|
-
return a += `
|
|
2277
|
-
`, e.length - i > r && o > i ? a += e.slice(i, o) + `
|
|
2278
|
-
` + e.slice(o + 1) : a += e.slice(i), a.slice(1);
|
|
2279
|
-
}
|
|
2280
|
-
function Ml(e) {
|
|
2281
|
-
for (var r = "", n = 0, t, i = 0; i < e.length; n >= 65536 ? i += 2 : i++)
|
|
2282
|
-
n = ne(e, i), t = j[n], !t && ue(n) ? (r += e[i], n >= 65536 && (r += e[i + 1])) : r += t || Ol(n);
|
|
2283
|
-
return r;
|
|
2284
|
-
}
|
|
2285
|
-
function Fl(e, r, n) {
|
|
2286
|
-
var t = "", i = e.tag, l, o, u;
|
|
2287
|
-
for (l = 0, o = n.length; l < o; l += 1)
|
|
2288
|
-
u = n[l], e.replacer && (u = e.replacer.call(n, String(l), u)), (D(e, r, u, !1, !1) || typeof u > "u" && D(e, r, null, !1, !1)) && (t !== "" && (t += "," + (e.condenseFlow ? "" : " ")), t += e.dump);
|
|
2289
|
-
e.tag = i, e.dump = "[" + t + "]";
|
|
2290
|
-
}
|
|
2291
|
-
function qr(e, r, n, t) {
|
|
2292
|
-
var i = "", l = e.tag, o, u, a;
|
|
2293
|
-
for (o = 0, u = n.length; o < u; o += 1)
|
|
2294
|
-
a = n[o], e.replacer && (a = e.replacer.call(n, String(o), a)), (D(e, r + 1, a, !0, !0, !1, !0) || typeof a > "u" && D(e, r + 1, null, !0, !0, !1, !0)) && ((!t || i !== "") && (i += qe(e, r)), e.dump && oe === e.dump.charCodeAt(0) ? i += "-" : i += "- ", i += e.dump);
|
|
2295
|
-
e.tag = l, e.dump = i || "[]";
|
|
2296
|
-
}
|
|
2297
|
-
function Il(e, r, n) {
|
|
2298
|
-
var t = "", i = e.tag, l = Object.keys(n), o, u, a, f, h;
|
|
2299
|
-
for (o = 0, u = l.length; o < u; o += 1)
|
|
2300
|
-
h = "", t !== "" && (h += ", "), e.condenseFlow && (h += '"'), a = l[o], f = n[a], e.replacer && (f = e.replacer.call(n, a, f)), D(e, r, a, !1, !1) && (e.dump.length > 1024 && (h += "? "), h += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), D(e, r, f, !1, !1) && (h += e.dump, t += h));
|
|
2301
|
-
e.tag = i, e.dump = "{" + t + "}";
|
|
2302
|
-
}
|
|
2303
|
-
function Dl(e, r, n, t) {
|
|
2304
|
-
var i = "", l = e.tag, o = Object.keys(n), u, a, f, h, s, p;
|
|
2305
|
-
if (e.sortKeys === !0)
|
|
2306
|
-
o.sort();
|
|
2307
|
-
else if (typeof e.sortKeys == "function")
|
|
2308
|
-
o.sort(e.sortKeys);
|
|
2309
|
-
else if (e.sortKeys)
|
|
2310
|
-
throw new de("sortKeys must be a boolean or a function");
|
|
2311
|
-
for (u = 0, a = o.length; u < a; u += 1)
|
|
2312
|
-
p = "", (!t || i !== "") && (p += qe(e, r)), f = o[u], h = n[f], e.replacer && (h = e.replacer.call(n, f, h)), D(e, r + 1, f, !0, !0, !0) && (s = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, s && (e.dump && oe === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, s && (p += qe(e, r)), D(e, r + 1, h, !0, s) && (e.dump && oe === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, i += p));
|
|
2313
|
-
e.tag = l, e.dump = i || "{}";
|
|
2314
|
-
}
|
|
2315
|
-
function Kr(e, r, n) {
|
|
2316
|
-
var t, i, l, o, u, a;
|
|
2317
|
-
for (i = n ? e.explicitTypes : e.implicitTypes, l = 0, o = i.length; l < o; l += 1)
|
|
2318
|
-
if (u = i[l], (u.instanceOf || u.predicate) && (!u.instanceOf || typeof r == "object" && r instanceof u.instanceOf) && (!u.predicate || u.predicate(r))) {
|
|
2319
|
-
if (n ? u.multi && u.representName ? e.tag = u.representName(r) : e.tag = u.tag : e.tag = "?", u.represent) {
|
|
2320
|
-
if (a = e.styleMap[u.tag] || u.defaultStyle, Qn.call(u.represent) === "[object Function]")
|
|
2321
|
-
t = u.represent(r, a);
|
|
2322
|
-
else if (Vn.call(u.represent, a))
|
|
2323
|
-
t = u.represent[a](r, a);
|
|
2324
|
-
else
|
|
2325
|
-
throw new de("!<" + u.tag + '> tag resolver accepts not "' + a + '" style');
|
|
2326
|
-
e.dump = t;
|
|
2327
|
-
}
|
|
2328
|
-
return !0;
|
|
2329
|
-
}
|
|
2330
|
-
return !1;
|
|
2331
|
-
}
|
|
2332
|
-
function D(e, r, n, t, i, l, o) {
|
|
2333
|
-
e.tag = null, e.dump = n, Kr(e, n, !1) || Kr(e, n, !0);
|
|
2334
|
-
var u = Qn.call(e.dump), a = t, f;
|
|
2335
|
-
t && (t = e.flowLevel < 0 || e.flowLevel > r);
|
|
2336
|
-
var h = u === "[object Object]" || u === "[object Array]", s, p;
|
|
2337
|
-
if (h && (s = e.duplicates.indexOf(n), p = s !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && r > 0) && (i = !1), p && e.usedDuplicates[s])
|
|
2338
|
-
e.dump = "*ref_" + s;
|
|
2339
|
-
else {
|
|
2340
|
-
if (h && p && !e.usedDuplicates[s] && (e.usedDuplicates[s] = !0), u === "[object Object]")
|
|
2341
|
-
t && Object.keys(e.dump).length !== 0 ? (Dl(e, r, e.dump, i), p && (e.dump = "&ref_" + s + e.dump)) : (Il(e, r, e.dump), p && (e.dump = "&ref_" + s + " " + e.dump));
|
|
2342
|
-
else if (u === "[object Array]")
|
|
2343
|
-
t && e.dump.length !== 0 ? (e.noArrayIndent && !o && r > 0 ? qr(e, r - 1, e.dump, i) : qr(e, r, e.dump, i), p && (e.dump = "&ref_" + s + e.dump)) : (Fl(e, r, e.dump), p && (e.dump = "&ref_" + s + " " + e.dump));
|
|
2344
|
-
else if (u === "[object String]")
|
|
2345
|
-
e.tag !== "?" && Tl(e, e.dump, r, l, a);
|
|
2346
|
-
else {
|
|
2347
|
-
if (u === "[object Undefined]")
|
|
2348
|
-
return !1;
|
|
2349
|
-
if (e.skipInvalid)
|
|
2350
|
-
return !1;
|
|
2351
|
-
throw new de("unacceptable kind of an object to dump " + u);
|
|
2352
|
-
}
|
|
2353
|
-
e.tag !== null && e.tag !== "?" && (f = encodeURI(
|
|
2354
|
-
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
2355
|
-
).replace(/!/g, "%21"), e.tag[0] === "!" ? f = "!" + f : f.slice(0, 18) === "tag:yaml.org,2002:" ? f = "!!" + f.slice(18) : f = "!<" + f + ">", e.dump = f + " " + e.dump);
|
|
2356
|
-
}
|
|
2357
|
-
return !0;
|
|
2358
|
-
}
|
|
2359
|
-
function Nl(e, r) {
|
|
2360
|
-
var n = [], t = [], i, l;
|
|
2361
|
-
for (ze(e, n, t), i = 0, l = t.length; i < l; i += 1)
|
|
2362
|
-
r.duplicates.push(n[t[i]]);
|
|
2363
|
-
r.usedDuplicates = new Array(l);
|
|
2364
|
-
}
|
|
2365
|
-
function ze(e, r, n) {
|
|
2366
|
-
var t, i, l;
|
|
2367
|
-
if (e !== null && typeof e == "object")
|
|
2368
|
-
if (i = r.indexOf(e), i !== -1)
|
|
2369
|
-
n.indexOf(i) === -1 && n.push(i);
|
|
2370
|
-
else if (r.push(e), Array.isArray(e))
|
|
2371
|
-
for (i = 0, l = e.length; i < l; i += 1)
|
|
2372
|
-
ze(e[i], r, n);
|
|
2373
|
-
else
|
|
2374
|
-
for (t = Object.keys(e), i = 0, l = t.length; i < l; i += 1)
|
|
2375
|
-
ze(e[t[i]], r, n);
|
|
2376
|
-
}
|
|
2377
|
-
function Ll(e, r) {
|
|
2378
|
-
r = r || {};
|
|
2379
|
-
var n = new Pl(r);
|
|
2380
|
-
n.noRefs || Nl(e, n);
|
|
2381
|
-
var t = e;
|
|
2382
|
-
return n.replacer && (t = n.replacer.call({ "": t }, "", t)), D(n, 0, t, !0, !0) ? n.dump + `
|
|
2383
|
-
` : "";
|
|
2384
|
-
}
|
|
2385
|
-
zn.dump = Ll;
|
|
2386
|
-
var ui = ir, Bl = zn;
|
|
2387
|
-
function cr(e, r) {
|
|
2388
|
-
return function() {
|
|
2389
|
-
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + r + " instead, which is now safe by default.");
|
|
2390
|
-
};
|
|
2391
|
-
}
|
|
2392
|
-
$.Type = C;
|
|
2393
|
-
$.Schema = xn;
|
|
2394
|
-
$.FAILSAFE_SCHEMA = On;
|
|
2395
|
-
$.JSON_SCHEMA = Cn;
|
|
2396
|
-
$.CORE_SCHEMA = Tn;
|
|
2397
|
-
$.DEFAULT_SCHEMA = or;
|
|
2398
|
-
$.load = ui.load;
|
|
2399
|
-
$.loadAll = ui.loadAll;
|
|
2400
|
-
$.dump = Bl.dump;
|
|
2401
|
-
$.YAMLException = se;
|
|
2402
|
-
$.types = {
|
|
2403
|
-
binary: Dn,
|
|
2404
|
-
float: jn,
|
|
2405
|
-
map: En,
|
|
2406
|
-
null: An,
|
|
2407
|
-
pairs: Ln,
|
|
2408
|
-
set: Bn,
|
|
2409
|
-
timestamp: Fn,
|
|
2410
|
-
bool: Pn,
|
|
2411
|
-
int: Sn,
|
|
2412
|
-
merge: In,
|
|
2413
|
-
omap: Nn,
|
|
2414
|
-
seq: bn,
|
|
2415
|
-
str: wn
|
|
2416
|
-
};
|
|
2417
|
-
$.safeLoad = cr("safeLoad", "load");
|
|
2418
|
-
$.safeLoadAll = cr("safeLoadAll", "loadAll");
|
|
2419
|
-
$.safeDump = cr("safeDump", "dump");
|
|
2420
|
-
var Hl = _ && _.__importDefault || function(e) {
|
|
2421
|
-
return e && e.__esModule ? e : { default: e };
|
|
2422
|
-
};
|
|
2423
|
-
Object.defineProperty(nr, "__esModule", { value: !0 });
|
|
2424
|
-
const kl = A, Ul = Hl($), Yl = $;
|
|
2425
|
-
nr.default = {
|
|
2426
|
-
/**
|
|
2427
|
-
* The order that this parser will run, in relation to other parsers.
|
|
2428
|
-
*/
|
|
2429
|
-
order: 200,
|
|
2430
|
-
/**
|
|
2431
|
-
* Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects.
|
|
2432
|
-
*/
|
|
2433
|
-
allowEmpty: !0,
|
|
2434
|
-
/**
|
|
2435
|
-
* Determines whether this parser can parse a given file reference.
|
|
2436
|
-
* Parsers that match will be tried, in order, until one successfully parses the file.
|
|
2437
|
-
* Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case
|
|
2438
|
-
* every parser will be tried.
|
|
2439
|
-
*/
|
|
2440
|
-
canParse: [".yaml", ".yml", ".json"],
|
|
2441
|
-
// JSON is valid YAML
|
|
2442
|
-
/**
|
|
2443
|
-
* Parses the given file as YAML
|
|
2444
|
-
*
|
|
2445
|
-
* @param file - An object containing information about the referenced file
|
|
2446
|
-
* @param file.url - The full URL of the referenced file
|
|
2447
|
-
* @param file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
|
|
2448
|
-
* @param file.data - The file contents. This will be whatever data type was returned by the resolver
|
|
2449
|
-
* @returns
|
|
2450
|
-
*/
|
|
2451
|
-
async parse(e) {
|
|
2452
|
-
let r = e.data;
|
|
2453
|
-
if (Buffer.isBuffer(r) && (r = r.toString()), typeof r == "string")
|
|
2454
|
-
try {
|
|
2455
|
-
return Ul.default.load(r, { schema: Yl.JSON_SCHEMA });
|
|
2456
|
-
} catch (n) {
|
|
2457
|
-
throw new kl.ParserError((n == null ? void 0 : n.message) || "Parser Error", e.url);
|
|
2458
|
-
}
|
|
2459
|
-
else
|
|
2460
|
-
return r;
|
|
2461
|
-
}
|
|
2462
|
-
};
|
|
2463
|
-
var fr = {};
|
|
2464
|
-
Object.defineProperty(fr, "__esModule", { value: !0 });
|
|
2465
|
-
const Gl = A, Wl = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;
|
|
2466
|
-
fr.default = {
|
|
2467
|
-
/**
|
|
2468
|
-
* The order that this parser will run, in relation to other parsers.
|
|
2469
|
-
*/
|
|
2470
|
-
order: 300,
|
|
2471
|
-
/**
|
|
2472
|
-
* Whether to allow "empty" files (zero bytes).
|
|
2473
|
-
*/
|
|
2474
|
-
allowEmpty: !0,
|
|
2475
|
-
/**
|
|
2476
|
-
* The encoding that the text is expected to be in.
|
|
2477
|
-
*/
|
|
2478
|
-
encoding: "utf8",
|
|
2479
|
-
/**
|
|
2480
|
-
* Determines whether this parser can parse a given file reference.
|
|
2481
|
-
* Parsers that return true will be tried, in order, until one successfully parses the file.
|
|
2482
|
-
* Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
|
|
2483
|
-
* every parser will be tried.
|
|
2484
|
-
*/
|
|
2485
|
-
canParse(e) {
|
|
2486
|
-
return (typeof e.data == "string" || Buffer.isBuffer(e.data)) && Wl.test(e.url);
|
|
2487
|
-
},
|
|
2488
|
-
/**
|
|
2489
|
-
* Parses the given file as text
|
|
2490
|
-
*/
|
|
2491
|
-
parse(e) {
|
|
2492
|
-
if (typeof e.data == "string")
|
|
2493
|
-
return e.data;
|
|
2494
|
-
if (Buffer.isBuffer(e.data))
|
|
2495
|
-
return e.data.toString(this.encoding);
|
|
2496
|
-
throw new Gl.ParserError("data is not text", e.url);
|
|
2497
|
-
}
|
|
2498
|
-
};
|
|
2499
|
-
var sr = {};
|
|
2500
|
-
Object.defineProperty(sr, "__esModule", { value: !0 });
|
|
2501
|
-
const Jl = /\.(jpeg|jpg|gif|png|bmp|ico)$/i;
|
|
2502
|
-
sr.default = {
|
|
2503
|
-
/**
|
|
2504
|
-
* The order that this parser will run, in relation to other parsers.
|
|
2505
|
-
*/
|
|
2506
|
-
order: 400,
|
|
2507
|
-
/**
|
|
2508
|
-
* Whether to allow "empty" files (zero bytes).
|
|
2509
|
-
*/
|
|
2510
|
-
allowEmpty: !0,
|
|
2511
|
-
/**
|
|
2512
|
-
* Determines whether this parser can parse a given file reference.
|
|
2513
|
-
* Parsers that return true will be tried, in order, until one successfully parses the file.
|
|
2514
|
-
* Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
|
|
2515
|
-
* every parser will be tried.
|
|
2516
|
-
*/
|
|
2517
|
-
canParse(e) {
|
|
2518
|
-
return Buffer.isBuffer(e.data) && Jl.test(e.url);
|
|
2519
|
-
},
|
|
2520
|
-
/**
|
|
2521
|
-
* Parses the given data as a Buffer (byte array).
|
|
2522
|
-
*/
|
|
2523
|
-
parse(e) {
|
|
2524
|
-
return Buffer.isBuffer(e.data) ? e.data : Buffer.from(e.data);
|
|
2525
|
-
}
|
|
2526
|
-
};
|
|
2527
|
-
var dr = {}, ql = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
2528
|
-
t === void 0 && (t = n);
|
|
2529
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
2530
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2531
|
-
return r[n];
|
|
2532
|
-
} }), Object.defineProperty(e, t, i);
|
|
2533
|
-
} : function(e, r, n, t) {
|
|
2534
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
2535
|
-
}), Kl = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
2536
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
2537
|
-
} : function(e, r) {
|
|
2538
|
-
e.default = r;
|
|
2539
|
-
}), zl = _ && _.__importStar || function(e) {
|
|
2540
|
-
if (e && e.__esModule)
|
|
2541
|
-
return e;
|
|
2542
|
-
var r = {};
|
|
2543
|
-
if (e != null)
|
|
2544
|
-
for (var n in e)
|
|
2545
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && ql(r, e, n);
|
|
2546
|
-
return Kl(r, e), r;
|
|
2547
|
-
}, Ql = _ && _.__importDefault || function(e) {
|
|
2548
|
-
return e && e.__esModule ? e : { default: e };
|
|
2549
|
-
};
|
|
2550
|
-
Object.defineProperty(dr, "__esModule", { value: !0 });
|
|
2551
|
-
const Vl = Ql(Se), zr = q, Qr = zl(O), Vr = A;
|
|
2552
|
-
dr.default = {
|
|
2553
|
-
/**
|
|
2554
|
-
* The order that this resolver will run, in relation to other resolvers.
|
|
2555
|
-
*/
|
|
2556
|
-
order: 100,
|
|
2557
|
-
/**
|
|
2558
|
-
* Determines whether this resolver can read a given file reference.
|
|
2559
|
-
* Resolvers that return true will be tried, in order, until one successfully resolves the file.
|
|
2560
|
-
* Resolvers that return false will not be given a chance to resolve the file.
|
|
2561
|
-
*/
|
|
2562
|
-
canRead(e) {
|
|
2563
|
-
return Qr.isFileSystemPath(e.url);
|
|
2564
|
-
},
|
|
2565
|
-
/**
|
|
2566
|
-
* Reads the given file and returns its raw contents as a Buffer.
|
|
2567
|
-
*/
|
|
2568
|
-
async read(e) {
|
|
2569
|
-
let r;
|
|
2570
|
-
try {
|
|
2571
|
-
r = Qr.toFileSystemPath(e.url);
|
|
2572
|
-
} catch (n) {
|
|
2573
|
-
throw new Vr.ResolverError(zr.ono.uri(n, `Malformed URI: ${e.url}`), e.url);
|
|
2574
|
-
}
|
|
2575
|
-
try {
|
|
2576
|
-
return await Vl.default.promises.readFile(r);
|
|
2577
|
-
} catch (n) {
|
|
2578
|
-
throw new Vr.ResolverError((0, zr.ono)(n, `Error opening file "${r}"`), r);
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
};
|
|
2582
|
-
var pr = {}, Xl = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
2583
|
-
t === void 0 && (t = n);
|
|
2584
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
2585
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2586
|
-
return r[n];
|
|
2587
|
-
} }), Object.defineProperty(e, t, i);
|
|
2588
|
-
} : function(e, r, n, t) {
|
|
2589
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
2590
|
-
}), Zl = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
2591
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
2592
|
-
} : function(e, r) {
|
|
2593
|
-
e.default = r;
|
|
2594
|
-
}), eu = _ && _.__importStar || function(e) {
|
|
2595
|
-
if (e && e.__esModule)
|
|
2596
|
-
return e;
|
|
2597
|
-
var r = {};
|
|
2598
|
-
if (e != null)
|
|
2599
|
-
for (var n in e)
|
|
2600
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && Xl(r, e, n);
|
|
2601
|
-
return Zl(r, e), r;
|
|
2602
|
-
};
|
|
2603
|
-
Object.defineProperty(pr, "__esModule", { value: !0 });
|
|
2604
|
-
const _e = q, ie = eu(O), Xr = A;
|
|
2605
|
-
pr.default = {
|
|
2606
|
-
/**
|
|
2607
|
-
* The order that this resolver will run, in relation to other resolvers.
|
|
2608
|
-
*/
|
|
2609
|
-
order: 200,
|
|
2610
|
-
/**
|
|
2611
|
-
* HTTP headers to send when downloading files.
|
|
2612
|
-
*
|
|
2613
|
-
* @example:
|
|
2614
|
-
* {
|
|
2615
|
-
* "User-Agent": "JSON Schema $Ref Parser",
|
|
2616
|
-
* Accept: "application/json"
|
|
2617
|
-
* }
|
|
2618
|
-
*/
|
|
2619
|
-
headers: null,
|
|
2620
|
-
/**
|
|
2621
|
-
* HTTP request timeout (in milliseconds).
|
|
2622
|
-
*/
|
|
2623
|
-
timeout: 5e3,
|
|
2624
|
-
// 5 seconds
|
|
2625
|
-
/**
|
|
2626
|
-
* The maximum number of HTTP redirects to follow.
|
|
2627
|
-
* To disable automatic following of redirects, set this to zero.
|
|
2628
|
-
*/
|
|
2629
|
-
redirects: 5,
|
|
2630
|
-
/**
|
|
2631
|
-
* The `withCredentials` option of XMLHttpRequest.
|
|
2632
|
-
* Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication
|
|
2633
|
-
*/
|
|
2634
|
-
withCredentials: !1,
|
|
2635
|
-
/**
|
|
2636
|
-
* Determines whether this resolver can read a given file reference.
|
|
2637
|
-
* Resolvers that return true will be tried in order, until one successfully resolves the file.
|
|
2638
|
-
* Resolvers that return false will not be given a chance to resolve the file.
|
|
2639
|
-
*/
|
|
2640
|
-
canRead(e) {
|
|
2641
|
-
return ie.isHttp(e.url);
|
|
2642
|
-
},
|
|
2643
|
-
/**
|
|
2644
|
-
* Reads the given URL and returns its raw contents as a Buffer.
|
|
2645
|
-
*/
|
|
2646
|
-
read(e) {
|
|
2647
|
-
const r = ie.parse(e.url);
|
|
2648
|
-
return typeof window < "u" && !r.protocol && (r.protocol = ie.parse(location.href).protocol), ai(r, this);
|
|
2649
|
-
}
|
|
2650
|
-
};
|
|
2651
|
-
async function ai(e, r, n) {
|
|
2652
|
-
e = ie.parse(e);
|
|
2653
|
-
const t = n || [];
|
|
2654
|
-
t.push(e.href);
|
|
2655
|
-
try {
|
|
2656
|
-
const i = await ru(e, r);
|
|
2657
|
-
if (i.status >= 400)
|
|
2658
|
-
throw (0, _e.ono)({ status: i.status }, `HTTP ERROR ${i.status}`);
|
|
2659
|
-
if (i.status >= 300) {
|
|
2660
|
-
if (!Number.isNaN(r.redirects) && t.length > r.redirects)
|
|
2661
|
-
throw new Xr.ResolverError((0, _e.ono)({ status: i.status }, `Error downloading ${t[0]}.
|
|
2662
|
-
Too many redirects:
|
|
2663
|
-
${t.join(`
|
|
2664
|
-
`)}`));
|
|
2665
|
-
if (!("location" in i.headers) || !i.headers.location)
|
|
2666
|
-
throw (0, _e.ono)({ status: i.status }, `HTTP ${i.status} redirect with no location header`);
|
|
2667
|
-
{
|
|
2668
|
-
const l = ie.resolve(e.href, i.headers.location);
|
|
2669
|
-
return ai(l, r, t);
|
|
2670
|
-
}
|
|
2671
|
-
} else {
|
|
2672
|
-
if (i.body) {
|
|
2673
|
-
const l = await i.arrayBuffer();
|
|
2674
|
-
return Buffer.from(l);
|
|
2675
|
-
}
|
|
2676
|
-
return Buffer.alloc(0);
|
|
2677
|
-
}
|
|
2678
|
-
} catch (i) {
|
|
2679
|
-
throw new Xr.ResolverError((0, _e.ono)(i, `Error downloading ${e.href}`), e.href);
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
async function ru(e, r) {
|
|
2683
|
-
let n, t;
|
|
2684
|
-
r.timeout && (n = new AbortController(), t = setTimeout(() => n.abort(), r.timeout));
|
|
2685
|
-
const i = await fetch(e, {
|
|
2686
|
-
method: "GET",
|
|
2687
|
-
headers: r.headers || {},
|
|
2688
|
-
credentials: r.withCredentials ? "include" : "same-origin",
|
|
2689
|
-
signal: n ? n.signal : null
|
|
2690
|
-
});
|
|
2691
|
-
return t && clearTimeout(t), i;
|
|
2692
|
-
}
|
|
2693
|
-
(function(e) {
|
|
2694
|
-
var r = _ && _.__importDefault || function(p) {
|
|
2695
|
-
return p && p.__esModule ? p : { default: p };
|
|
2696
|
-
};
|
|
2697
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.getNewOptions = e.getJsonSchemaRefParserDefaultOptions = void 0;
|
|
2698
|
-
const n = r(rr), t = r(nr), i = r(fr), l = r(sr), o = r(dr), u = r(pr), a = () => ({
|
|
2699
|
-
/**
|
|
2700
|
-
* Determines how different types of files will be parsed.
|
|
2701
|
-
*
|
|
2702
|
-
* You can add additional parsers of your own, replace an existing one with
|
|
2703
|
-
* your own implementation, or disable any parser by setting it to false.
|
|
2704
|
-
*/
|
|
2705
|
-
parse: {
|
|
2706
|
-
json: { ...n.default },
|
|
2707
|
-
yaml: { ...t.default },
|
|
2708
|
-
text: { ...i.default },
|
|
2709
|
-
binary: { ...l.default }
|
|
2710
|
-
},
|
|
2711
|
-
/**
|
|
2712
|
-
* Determines how JSON References will be resolved.
|
|
2713
|
-
*
|
|
2714
|
-
* You can add additional resolvers of your own, replace an existing one with
|
|
2715
|
-
* your own implementation, or disable any resolver by setting it to false.
|
|
2716
|
-
*/
|
|
2717
|
-
resolve: {
|
|
2718
|
-
file: { ...o.default },
|
|
2719
|
-
http: { ...u.default },
|
|
2720
|
-
/**
|
|
2721
|
-
* Determines whether external $ref pointers will be resolved.
|
|
2722
|
-
* If this option is disabled, then none of above resolvers will be called.
|
|
2723
|
-
* Instead, external $ref pointers will simply be ignored.
|
|
2724
|
-
*
|
|
2725
|
-
* @type {boolean}
|
|
2726
|
-
*/
|
|
2727
|
-
external: !0
|
|
2728
|
-
},
|
|
2729
|
-
/**
|
|
2730
|
-
* By default, JSON Schema $Ref Parser throws the first error it encounters. Setting `continueOnError` to `true`
|
|
2731
|
-
* causes it to keep processing as much as possible and then throw a single error that contains all errors
|
|
2732
|
-
* that were encountered.
|
|
2733
|
-
*/
|
|
2734
|
-
continueOnError: !1,
|
|
2735
|
-
/**
|
|
2736
|
-
* Determines the types of JSON references that are allowed.
|
|
2737
|
-
*/
|
|
2738
|
-
dereference: {
|
|
2739
|
-
/**
|
|
2740
|
-
* Dereference circular (recursive) JSON references?
|
|
2741
|
-
* If false, then a {@link ReferenceError} will be thrown if a circular reference is found.
|
|
2742
|
-
* If "ignore", then circular references will not be dereferenced.
|
|
2743
|
-
*
|
|
2744
|
-
* @type {boolean|string}
|
|
2745
|
-
*/
|
|
2746
|
-
circular: !0,
|
|
2747
|
-
/**
|
|
2748
|
-
* A function, called for each path, which can return true to stop this path and all
|
|
2749
|
-
* subpaths from being dereferenced further. This is useful in schemas where some
|
|
2750
|
-
* subpaths contain literal $ref keys that should not be dereferenced.
|
|
2751
|
-
*
|
|
2752
|
-
* @type {function}
|
|
2753
|
-
*/
|
|
2754
|
-
excludedPathMatcher: () => !1,
|
|
2755
|
-
referenceResolution: "relative"
|
|
2756
|
-
},
|
|
2757
|
-
mutateInputSchema: !0
|
|
2758
|
-
});
|
|
2759
|
-
e.getJsonSchemaRefParserDefaultOptions = a;
|
|
2760
|
-
const f = (p) => {
|
|
2761
|
-
const g = (0, e.getJsonSchemaRefParserDefaultOptions)();
|
|
2762
|
-
return p && h(g, p), g;
|
|
2763
|
-
};
|
|
2764
|
-
e.getNewOptions = f;
|
|
2765
|
-
function h(p, g) {
|
|
2766
|
-
if (s(g)) {
|
|
2767
|
-
const m = Object.keys(g).filter((y) => !["__proto__", "constructor", "prototype"].includes(y));
|
|
2768
|
-
for (let y = 0; y < m.length; y++) {
|
|
2769
|
-
const b = m[y], d = g[b], c = p[b];
|
|
2770
|
-
s(d) ? p[b] = h(c || {}, d) : d !== void 0 && (p[b] = d);
|
|
2771
|
-
}
|
|
2772
|
-
}
|
|
2773
|
-
return p;
|
|
2774
|
-
}
|
|
2775
|
-
function s(p) {
|
|
2776
|
-
return p && typeof p == "object" && !Array.isArray(p) && !(p instanceof RegExp) && !(p instanceof Date);
|
|
2777
|
-
}
|
|
2778
|
-
})(mn);
|
|
2779
|
-
Object.defineProperty(fe, "__esModule", { value: !0 });
|
|
2780
|
-
fe.normalizeArgs = void 0;
|
|
2781
|
-
const nu = mn;
|
|
2782
|
-
function ci(e) {
|
|
2783
|
-
let r, n, t, i;
|
|
2784
|
-
const l = Array.prototype.slice.call(e);
|
|
2785
|
-
typeof l[l.length - 1] == "function" && (i = l.pop()), typeof l[0] == "string" ? (r = l[0], typeof l[2] == "object" ? (n = l[1], t = l[2]) : (n = void 0, t = l[1])) : (r = "", n = l[0], t = l[1]);
|
|
2786
|
-
try {
|
|
2787
|
-
t = (0, nu.getNewOptions)(t);
|
|
2788
|
-
} catch (o) {
|
|
2789
|
-
console.error(`JSON Schema Ref Parser: Error normalizing options: ${o}`);
|
|
2790
|
-
}
|
|
2791
|
-
return !t.mutateInputSchema && typeof n == "object" && (n = JSON.parse(JSON.stringify(n))), {
|
|
2792
|
-
path: r,
|
|
2793
|
-
schema: n,
|
|
2794
|
-
options: t,
|
|
2795
|
-
callback: i
|
|
2796
|
-
};
|
|
2797
|
-
}
|
|
2798
|
-
fe.normalizeArgs = ci;
|
|
2799
|
-
fe.default = ci;
|
|
2800
|
-
var hr = {}, iu = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
2801
|
-
t === void 0 && (t = n);
|
|
2802
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
2803
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2804
|
-
return r[n];
|
|
2805
|
-
} }), Object.defineProperty(e, t, i);
|
|
2806
|
-
} : function(e, r, n, t) {
|
|
2807
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
2808
|
-
}), tu = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
2809
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
2810
|
-
} : function(e, r) {
|
|
2811
|
-
e.default = r;
|
|
2812
|
-
}), ou = _ && _.__importStar || function(e) {
|
|
2813
|
-
if (e && e.__esModule)
|
|
2814
|
-
return e;
|
|
2815
|
-
var r = {};
|
|
2816
|
-
if (e != null)
|
|
2817
|
-
for (var n in e)
|
|
2818
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && iu(r, e, n);
|
|
2819
|
-
return tu(r, e), r;
|
|
2820
|
-
}, gr = _ && _.__importDefault || function(e) {
|
|
2821
|
-
return e && e.__esModule ? e : { default: e };
|
|
2822
|
-
};
|
|
2823
|
-
Object.defineProperty(hr, "__esModule", { value: !0 });
|
|
2824
|
-
const lu = gr(ce()), uu = gr(Te()), au = gr(Re), z = ou(O), cu = A;
|
|
2825
|
-
function fu(e, r) {
|
|
2826
|
-
var n;
|
|
2827
|
-
if (!((n = r.resolve) != null && n.external))
|
|
2828
|
-
return Promise.resolve();
|
|
2829
|
-
try {
|
|
2830
|
-
const t = _r(e.schema, e.$refs._root$Ref.path + "#", e.$refs, r);
|
|
2831
|
-
return Promise.all(t);
|
|
2832
|
-
} catch (t) {
|
|
2833
|
-
return Promise.reject(t);
|
|
2834
|
-
}
|
|
2835
|
-
}
|
|
2836
|
-
function _r(e, r, n, t, i, l) {
|
|
2837
|
-
i || (i = /* @__PURE__ */ new Set());
|
|
2838
|
-
let o = [];
|
|
2839
|
-
if (e && typeof e == "object" && !ArrayBuffer.isView(e) && !i.has(e)) {
|
|
2840
|
-
i.add(e), lu.default.isExternal$Ref(e) && o.push(su(e, r, n, t));
|
|
2841
|
-
const u = Object.keys(e);
|
|
2842
|
-
for (const a of u) {
|
|
2843
|
-
const f = uu.default.join(r, a), h = e[a];
|
|
2844
|
-
o = o.concat(_r(h, f, n, t, i));
|
|
2845
|
-
}
|
|
2846
|
-
}
|
|
2847
|
-
return o;
|
|
2848
|
-
}
|
|
2849
|
-
async function su(e, r, n, t) {
|
|
2850
|
-
var a;
|
|
2851
|
-
const i = ((a = t.dereference) == null ? void 0 : a.externalReferenceResolution) === "root", l = z.resolve(i ? z.cwd() : r, e.$ref), o = z.stripHash(l), u = n._$refs[o];
|
|
2852
|
-
if (u)
|
|
2853
|
-
return Promise.resolve(u.value);
|
|
2854
|
-
try {
|
|
2855
|
-
const f = await (0, au.default)(l, n, t), h = _r(f, o + "#", n, t, /* @__PURE__ */ new Set(), !0);
|
|
2856
|
-
return Promise.all(h);
|
|
2857
|
-
} catch (f) {
|
|
2858
|
-
if (!(t != null && t.continueOnError) || !(0, cu.isHandledError)(f))
|
|
2859
|
-
throw f;
|
|
2860
|
-
return n._$refs[o] && (f.source = decodeURI(z.stripHash(r)), f.path = z.safePointerToPath(z.getHash(r))), [];
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
hr.default = fu;
|
|
2864
|
-
var mr = {}, du = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
2865
|
-
t === void 0 && (t = n);
|
|
2866
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
2867
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2868
|
-
return r[n];
|
|
2869
|
-
} }), Object.defineProperty(e, t, i);
|
|
2870
|
-
} : function(e, r, n, t) {
|
|
2871
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
2872
|
-
}), pu = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
2873
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
2874
|
-
} : function(e, r) {
|
|
2875
|
-
e.default = r;
|
|
2876
|
-
}), hu = _ && _.__importStar || function(e) {
|
|
2877
|
-
if (e && e.__esModule)
|
|
2878
|
-
return e;
|
|
2879
|
-
var r = {};
|
|
2880
|
-
if (e != null)
|
|
2881
|
-
for (var n in e)
|
|
2882
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && du(r, e, n);
|
|
2883
|
-
return pu(r, e), r;
|
|
2884
|
-
}, fi = _ && _.__importDefault || function(e) {
|
|
2885
|
-
return e && e.__esModule ? e : { default: e };
|
|
2886
|
-
};
|
|
2887
|
-
Object.defineProperty(mr, "__esModule", { value: !0 });
|
|
2888
|
-
const Ae = fi(ce()), ae = fi(Te()), He = hu(O);
|
|
2889
|
-
function gu(e, r) {
|
|
2890
|
-
const n = [];
|
|
2891
|
-
vr(e, "schema", e.$refs._root$Ref.path + "#", "#", 0, n, e.$refs, r), _u(n);
|
|
2892
|
-
}
|
|
2893
|
-
function vr(e, r, n, t, i, l, o, u) {
|
|
2894
|
-
const a = r === null ? e : e[r];
|
|
2895
|
-
if (a && typeof a == "object" && !ArrayBuffer.isView(a))
|
|
2896
|
-
if (Ae.default.isAllowed$Ref(a))
|
|
2897
|
-
Zr(e, r, n, t, i, l, o, u);
|
|
2898
|
-
else {
|
|
2899
|
-
const f = Object.keys(a).sort((h, s) => h === "definitions" ? -1 : s === "definitions" ? 1 : h.length - s.length);
|
|
2900
|
-
for (const h of f) {
|
|
2901
|
-
const s = ae.default.join(n, h), p = ae.default.join(t, h), g = a[h];
|
|
2902
|
-
Ae.default.isAllowed$Ref(g) ? Zr(a, h, n, p, i, l, o, u) : vr(a, h, s, p, i, l, o, u);
|
|
2903
|
-
}
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
function Zr(e, r, n, t, i, l, o, u) {
|
|
2907
|
-
const a = r === null ? e : e[r], f = He.resolve(n, a.$ref), h = o._resolve(f, t, u);
|
|
2908
|
-
if (h === null)
|
|
2909
|
-
return;
|
|
2910
|
-
const p = ae.default.parse(t).length, g = He.stripHash(h.path), m = He.getHash(h.path), y = g !== o._root$Ref.path, b = Ae.default.isExtended$Ref(a);
|
|
2911
|
-
i += h.indirections;
|
|
2912
|
-
const d = mu(l, e, r);
|
|
2913
|
-
if (d)
|
|
2914
|
-
if (p < d.depth || i < d.indirections)
|
|
2915
|
-
vu(l, d);
|
|
2916
|
-
else
|
|
2917
|
-
return;
|
|
2918
|
-
l.push({
|
|
2919
|
-
$ref: a,
|
|
2920
|
-
// The JSON Reference (e.g. {$ref: string})
|
|
2921
|
-
parent: e,
|
|
2922
|
-
// The object that contains this $ref pointer
|
|
2923
|
-
key: r,
|
|
2924
|
-
// The key in `parent` that is the $ref pointer
|
|
2925
|
-
pathFromRoot: t,
|
|
2926
|
-
// The path to the $ref pointer, from the JSON Schema root
|
|
2927
|
-
depth: p,
|
|
2928
|
-
// How far from the JSON Schema root is this $ref pointer?
|
|
2929
|
-
file: g,
|
|
2930
|
-
// The file that the $ref pointer resolves to
|
|
2931
|
-
hash: m,
|
|
2932
|
-
// The hash within `file` that the $ref pointer resolves to
|
|
2933
|
-
value: h.value,
|
|
2934
|
-
// The resolved value of the $ref pointer
|
|
2935
|
-
circular: h.circular,
|
|
2936
|
-
// Is this $ref pointer DIRECTLY circular? (i.e. it references itself)
|
|
2937
|
-
extended: b,
|
|
2938
|
-
// Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
|
|
2939
|
-
external: y,
|
|
2940
|
-
// Does this $ref pointer point to a file other than the main JSON Schema file?
|
|
2941
|
-
indirections: i
|
|
2942
|
-
// The number of indirect references that were traversed to resolve the value
|
|
2943
|
-
}), (!d || y) && vr(h.value, null, h.path, t, i + 1, l, o, u);
|
|
2944
|
-
}
|
|
2945
|
-
function _u(e) {
|
|
2946
|
-
e.sort((i, l) => {
|
|
2947
|
-
if (i.file !== l.file)
|
|
2948
|
-
return i.file < l.file ? -1 : 1;
|
|
2949
|
-
if (i.hash !== l.hash)
|
|
2950
|
-
return i.hash < l.hash ? -1 : 1;
|
|
2951
|
-
if (i.circular !== l.circular)
|
|
2952
|
-
return i.circular ? -1 : 1;
|
|
2953
|
-
if (i.extended !== l.extended)
|
|
2954
|
-
return i.extended ? 1 : -1;
|
|
2955
|
-
if (i.indirections !== l.indirections)
|
|
2956
|
-
return i.indirections - l.indirections;
|
|
2957
|
-
if (i.depth !== l.depth)
|
|
2958
|
-
return i.depth - l.depth;
|
|
2959
|
-
{
|
|
2960
|
-
const o = i.pathFromRoot.lastIndexOf("/definitions"), u = l.pathFromRoot.lastIndexOf("/definitions");
|
|
2961
|
-
return o !== u ? u - o : i.pathFromRoot.length - l.pathFromRoot.length;
|
|
2962
|
-
}
|
|
2963
|
-
});
|
|
2964
|
-
let r, n, t;
|
|
2965
|
-
for (const i of e)
|
|
2966
|
-
i.external ? i.file === r && i.hash === n ? i.$ref.$ref = t : i.file === r && i.hash.indexOf(n + "/") === 0 ? i.$ref.$ref = ae.default.join(t, ae.default.parse(i.hash.replace(n, "#"))) : (r = i.file, n = i.hash, t = i.pathFromRoot, i.$ref = i.parent[i.key] = Ae.default.dereference(i.$ref, i.value), i.circular && (i.$ref.$ref = i.pathFromRoot)) : i.$ref.$ref = i.hash;
|
|
2967
|
-
}
|
|
2968
|
-
function mu(e, r, n) {
|
|
2969
|
-
for (const t of e)
|
|
2970
|
-
if (t && t.parent === r && t.key === n)
|
|
2971
|
-
return t;
|
|
2972
|
-
}
|
|
2973
|
-
function vu(e, r) {
|
|
2974
|
-
const n = e.indexOf(r);
|
|
2975
|
-
e.splice(n, 1);
|
|
2976
|
-
}
|
|
2977
|
-
mr.default = gu;
|
|
2978
|
-
var yr = {}, yu = _ && _.__createBinding || (Object.create ? function(e, r, n, t) {
|
|
2979
|
-
t === void 0 && (t = n);
|
|
2980
|
-
var i = Object.getOwnPropertyDescriptor(r, n);
|
|
2981
|
-
(!i || ("get" in i ? !r.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2982
|
-
return r[n];
|
|
2983
|
-
} }), Object.defineProperty(e, t, i);
|
|
2984
|
-
} : function(e, r, n, t) {
|
|
2985
|
-
t === void 0 && (t = n), e[t] = r[n];
|
|
2986
|
-
}), xu = _ && _.__setModuleDefault || (Object.create ? function(e, r) {
|
|
2987
|
-
Object.defineProperty(e, "default", { enumerable: !0, value: r });
|
|
2988
|
-
} : function(e, r) {
|
|
2989
|
-
e.default = r;
|
|
2990
|
-
}), wu = _ && _.__importStar || function(e) {
|
|
2991
|
-
if (e && e.__esModule)
|
|
2992
|
-
return e;
|
|
2993
|
-
var r = {};
|
|
2994
|
-
if (e != null)
|
|
2995
|
-
for (var n in e)
|
|
2996
|
-
n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && yu(r, e, n);
|
|
2997
|
-
return xu(r, e), r;
|
|
2998
|
-
}, si = _ && _.__importDefault || function(e) {
|
|
2999
|
-
return e && e.__esModule ? e : { default: e };
|
|
3000
|
-
};
|
|
3001
|
-
Object.defineProperty(yr, "__esModule", { value: !0 });
|
|
3002
|
-
const Pe = si(ce()), en = si(Te()), bu = q, rn = wu(O), Eu = A;
|
|
3003
|
-
yr.default = Ou;
|
|
3004
|
-
function Ou(e, r) {
|
|
3005
|
-
const n = Date.now(), t = xr(e.schema, e.$refs._root$Ref.path, "#", /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), /* @__PURE__ */ new Map(), e.$refs, r, n);
|
|
3006
|
-
e.$refs.circular = t.circular, e.schema = t.value;
|
|
3007
|
-
}
|
|
3008
|
-
function xr(e, r, n, t, i, l, o, u, a) {
|
|
3009
|
-
var g;
|
|
3010
|
-
let f;
|
|
3011
|
-
const h = {
|
|
3012
|
-
value: e,
|
|
3013
|
-
circular: !1
|
|
3014
|
-
};
|
|
3015
|
-
if (u && u.timeoutMs && Date.now() - a > u.timeoutMs)
|
|
3016
|
-
throw new Eu.TimeoutError(u.timeoutMs);
|
|
3017
|
-
const s = u.dereference || {}, p = s.excludedPathMatcher || (() => !1);
|
|
3018
|
-
if (((s == null ? void 0 : s.circular) === "ignore" || !i.has(e)) && e && typeof e == "object" && !ArrayBuffer.isView(e) && !p(n)) {
|
|
3019
|
-
if (t.add(e), i.add(e), Pe.default.isAllowed$Ref(e, u))
|
|
3020
|
-
f = nn(e, r, n, t, i, l, o, u, a), h.circular = f.circular, h.value = f.value;
|
|
3021
|
-
else
|
|
3022
|
-
for (const m of Object.keys(e)) {
|
|
3023
|
-
const y = en.default.join(r, m), b = en.default.join(n, m);
|
|
3024
|
-
if (p(b))
|
|
3025
|
-
continue;
|
|
3026
|
-
const d = e[m];
|
|
3027
|
-
let c = !1;
|
|
3028
|
-
Pe.default.isAllowed$Ref(d, u) ? (f = nn(d, y, b, t, i, l, o, u, a), c = f.circular, e[m] !== f.value && (e[m] = f.value, (g = s == null ? void 0 : s.onDereference) == null || g.call(s, d.$ref, e[m], e, m))) : t.has(d) ? c = di(y, o, u) : (f = xr(d, y, b, t, i, l, o, u, a), c = f.circular, e[m] !== f.value && (e[m] = f.value)), h.circular = h.circular || c;
|
|
3029
|
-
}
|
|
3030
|
-
t.delete(e);
|
|
3031
|
-
}
|
|
3032
|
-
return h;
|
|
3033
|
-
}
|
|
3034
|
-
function nn(e, r, n, t, i, l, o, u, a) {
|
|
3035
|
-
var c, x;
|
|
3036
|
-
const h = Pe.default.isExternal$Ref(e) && ((c = u == null ? void 0 : u.dereference) == null ? void 0 : c.externalReferenceResolution) === "root", s = rn.resolve(h ? rn.cwd() : r, e.$ref), p = l.get(s);
|
|
3037
|
-
if (p) {
|
|
3038
|
-
const E = Object.keys(e);
|
|
3039
|
-
if (E.length > 1) {
|
|
3040
|
-
const v = {};
|
|
3041
|
-
for (const P of E)
|
|
3042
|
-
P !== "$ref" && !(P in p.value) && (v[P] = e[P]);
|
|
3043
|
-
return {
|
|
3044
|
-
circular: p.circular,
|
|
3045
|
-
value: Object.assign({}, p.value, v)
|
|
3046
|
-
};
|
|
3047
|
-
}
|
|
3048
|
-
return p;
|
|
3049
|
-
}
|
|
3050
|
-
const g = o._resolve(s, r, u);
|
|
3051
|
-
if (g === null)
|
|
3052
|
-
return {
|
|
3053
|
-
circular: !1,
|
|
3054
|
-
value: null
|
|
3055
|
-
};
|
|
3056
|
-
const m = g.circular;
|
|
3057
|
-
let y = m || t.has(g.value);
|
|
3058
|
-
y && di(r, o, u);
|
|
3059
|
-
let b = Pe.default.dereference(e, g.value);
|
|
3060
|
-
if (!y) {
|
|
3061
|
-
const E = xr(b, g.path, n, t, i, l, o, u, a);
|
|
3062
|
-
y = E.circular, b = E.value;
|
|
3063
|
-
}
|
|
3064
|
-
y && !m && ((x = u.dereference) == null ? void 0 : x.circular) === "ignore" && (b = e), m && (b.$ref = n);
|
|
3065
|
-
const d = {
|
|
3066
|
-
circular: y,
|
|
3067
|
-
value: b
|
|
3068
|
-
};
|
|
3069
|
-
return Object.keys(e).length === 1 && l.set(s, d), d;
|
|
3070
|
-
}
|
|
3071
|
-
function di(e, r, n) {
|
|
3072
|
-
if (r.circular = !0, !n.dereference.circular)
|
|
3073
|
-
throw bu.ono.reference(`Circular $ref pointer found at ${e}`);
|
|
3074
|
-
return !0;
|
|
3075
|
-
}
|
|
3076
|
-
var wr = {}, br = {};
|
|
3077
|
-
Object.defineProperty(br, "__esModule", { value: !0 });
|
|
3078
|
-
function Au() {
|
|
3079
|
-
return typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : typeof setImmediate == "function" ? setImmediate : function(r) {
|
|
3080
|
-
setTimeout(r, 0);
|
|
3081
|
-
};
|
|
3082
|
-
}
|
|
3083
|
-
br.default = Au();
|
|
3084
|
-
var Pu = _ && _.__importDefault || function(e) {
|
|
3085
|
-
return e && e.__esModule ? e : { default: e };
|
|
3086
|
-
};
|
|
3087
|
-
Object.defineProperty(wr, "__esModule", { value: !0 });
|
|
3088
|
-
const tn = Pu(br);
|
|
3089
|
-
function Su(e, r) {
|
|
3090
|
-
if (e) {
|
|
3091
|
-
r.then(function(n) {
|
|
3092
|
-
(0, tn.default)(function() {
|
|
3093
|
-
e(null, n);
|
|
3094
|
-
});
|
|
3095
|
-
}, function(n) {
|
|
3096
|
-
(0, tn.default)(function() {
|
|
3097
|
-
e(n);
|
|
3098
|
-
});
|
|
3099
|
-
});
|
|
3100
|
-
return;
|
|
3101
|
-
} else
|
|
3102
|
-
return r;
|
|
3103
|
-
}
|
|
3104
|
-
wr.default = Su;
|
|
3105
|
-
(function(e) {
|
|
3106
|
-
var r = _ && _.__createBinding || (Object.create ? function(d, c, x, E) {
|
|
3107
|
-
E === void 0 && (E = x);
|
|
3108
|
-
var v = Object.getOwnPropertyDescriptor(c, x);
|
|
3109
|
-
(!v || ("get" in v ? !c.__esModule : v.writable || v.configurable)) && (v = { enumerable: !0, get: function() {
|
|
3110
|
-
return c[x];
|
|
3111
|
-
} }), Object.defineProperty(d, E, v);
|
|
3112
|
-
} : function(d, c, x, E) {
|
|
3113
|
-
E === void 0 && (E = x), d[E] = c[x];
|
|
3114
|
-
}), n = _ && _.__setModuleDefault || (Object.create ? function(d, c) {
|
|
3115
|
-
Object.defineProperty(d, "default", { enumerable: !0, value: c });
|
|
3116
|
-
} : function(d, c) {
|
|
3117
|
-
d.default = c;
|
|
3118
|
-
}), t = _ && _.__importStar || function(d) {
|
|
3119
|
-
if (d && d.__esModule)
|
|
3120
|
-
return d;
|
|
3121
|
-
var c = {};
|
|
3122
|
-
if (d != null)
|
|
3123
|
-
for (var x in d)
|
|
3124
|
-
x !== "default" && Object.prototype.hasOwnProperty.call(d, x) && r(c, d, x);
|
|
3125
|
-
return n(c, d), c;
|
|
3126
|
-
}, i = _ && _.__importDefault || function(d) {
|
|
3127
|
-
return d && d.__esModule ? d : { default: d };
|
|
3128
|
-
};
|
|
3129
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.JSONParserErrorGroup = e.isHandledError = e.UnmatchedParserError = e.ParserError = e.ResolverError = e.MissingPointerError = e.InvalidPointerError = e.JSONParserError = e.UnmatchedResolverError = e.dereference = e.bundle = e.resolve = e.parse = e.$RefParser = void 0;
|
|
3130
|
-
const l = i(Ve), o = i(Re), u = i(fe), a = i(hr), f = i(mr), h = i(yr), s = t(O), p = A;
|
|
3131
|
-
Object.defineProperty(e, "JSONParserError", { enumerable: !0, get: function() {
|
|
3132
|
-
return p.JSONParserError;
|
|
3133
|
-
} }), Object.defineProperty(e, "InvalidPointerError", { enumerable: !0, get: function() {
|
|
3134
|
-
return p.InvalidPointerError;
|
|
3135
|
-
} }), Object.defineProperty(e, "MissingPointerError", { enumerable: !0, get: function() {
|
|
3136
|
-
return p.MissingPointerError;
|
|
3137
|
-
} }), Object.defineProperty(e, "ResolverError", { enumerable: !0, get: function() {
|
|
3138
|
-
return p.ResolverError;
|
|
3139
|
-
} }), Object.defineProperty(e, "ParserError", { enumerable: !0, get: function() {
|
|
3140
|
-
return p.ParserError;
|
|
3141
|
-
} }), Object.defineProperty(e, "UnmatchedParserError", { enumerable: !0, get: function() {
|
|
3142
|
-
return p.UnmatchedParserError;
|
|
3143
|
-
} }), Object.defineProperty(e, "UnmatchedResolverError", { enumerable: !0, get: function() {
|
|
3144
|
-
return p.UnmatchedResolverError;
|
|
3145
|
-
} }), Object.defineProperty(e, "isHandledError", { enumerable: !0, get: function() {
|
|
3146
|
-
return p.isHandledError;
|
|
3147
|
-
} }), Object.defineProperty(e, "JSONParserErrorGroup", { enumerable: !0, get: function() {
|
|
3148
|
-
return p.JSONParserErrorGroup;
|
|
3149
|
-
} });
|
|
3150
|
-
const g = q, m = i(wr);
|
|
3151
|
-
class y {
|
|
3152
|
-
constructor() {
|
|
3153
|
-
this.schema = null, this.$refs = new l.default();
|
|
3154
|
-
}
|
|
3155
|
-
async parse() {
|
|
3156
|
-
const c = (0, u.default)(arguments);
|
|
3157
|
-
let x;
|
|
3158
|
-
if (!c.path && !c.schema) {
|
|
3159
|
-
const v = (0, g.ono)(`Expected a file path, URL, or object. Got ${c.path || c.schema}`);
|
|
3160
|
-
return (0, m.default)(c.callback, Promise.reject(v));
|
|
3161
|
-
}
|
|
3162
|
-
this.schema = null, this.$refs = new l.default();
|
|
3163
|
-
let E = "http";
|
|
3164
|
-
if (s.isFileSystemPath(c.path))
|
|
3165
|
-
c.path = s.fromFileSystemPath(c.path), E = "file";
|
|
3166
|
-
else if (!c.path && c.schema && "$id" in c.schema && c.schema.$id) {
|
|
3167
|
-
const v = s.parse(c.schema.$id), P = v.protocol === "https:" ? 443 : 80;
|
|
3168
|
-
c.path = `${v.protocol}//${v.hostname}:${P}`;
|
|
3169
|
-
}
|
|
3170
|
-
if (c.path = s.resolve(s.cwd(), c.path), c.schema && typeof c.schema == "object") {
|
|
3171
|
-
const v = this.$refs._add(c.path);
|
|
3172
|
-
v.value = c.schema, v.pathType = E, x = Promise.resolve(c.schema);
|
|
3173
|
-
} else
|
|
3174
|
-
x = (0, o.default)(c.path, this.$refs, c.options);
|
|
3175
|
-
try {
|
|
3176
|
-
const v = await x;
|
|
3177
|
-
if (v !== null && typeof v == "object" && !Buffer.isBuffer(v))
|
|
3178
|
-
return this.schema = v, (0, m.default)(c.callback, Promise.resolve(this.schema));
|
|
3179
|
-
if (c.options.continueOnError)
|
|
3180
|
-
return this.schema = null, (0, m.default)(c.callback, Promise.resolve(this.schema));
|
|
3181
|
-
throw g.ono.syntax(`"${this.$refs._root$Ref.path || v}" is not a valid JSON Schema`);
|
|
3182
|
-
} catch (v) {
|
|
3183
|
-
return !c.options.continueOnError || !(0, p.isHandledError)(v) ? (0, m.default)(c.callback, Promise.reject(v)) : (this.$refs._$refs[s.stripHash(c.path)] && this.$refs._$refs[s.stripHash(c.path)].addError(v), (0, m.default)(c.callback, Promise.resolve(null)));
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
|
-
static parse() {
|
|
3187
|
-
const c = new y();
|
|
3188
|
-
return c.parse.apply(c, arguments);
|
|
3189
|
-
}
|
|
3190
|
-
async resolve() {
|
|
3191
|
-
const c = (0, u.default)(arguments);
|
|
3192
|
-
try {
|
|
3193
|
-
return await this.parse(c.path, c.schema, c.options), await (0, a.default)(this, c.options), b(this), (0, m.default)(c.callback, Promise.resolve(this.$refs));
|
|
3194
|
-
} catch (x) {
|
|
3195
|
-
return (0, m.default)(c.callback, Promise.reject(x));
|
|
3196
|
-
}
|
|
3197
|
-
}
|
|
3198
|
-
static resolve() {
|
|
3199
|
-
const c = new y();
|
|
3200
|
-
return c.resolve.apply(c, arguments);
|
|
3201
|
-
}
|
|
3202
|
-
static bundle() {
|
|
3203
|
-
const c = new y();
|
|
3204
|
-
return c.bundle.apply(c, arguments);
|
|
3205
|
-
}
|
|
3206
|
-
async bundle() {
|
|
3207
|
-
const c = (0, u.default)(arguments);
|
|
3208
|
-
try {
|
|
3209
|
-
return await this.resolve(c.path, c.schema, c.options), (0, f.default)(this, c.options), b(this), (0, m.default)(c.callback, Promise.resolve(this.schema));
|
|
3210
|
-
} catch (x) {
|
|
3211
|
-
return (0, m.default)(c.callback, Promise.reject(x));
|
|
3212
|
-
}
|
|
3213
|
-
}
|
|
3214
|
-
static dereference() {
|
|
3215
|
-
const c = new y();
|
|
3216
|
-
return c.dereference.apply(c, arguments);
|
|
3217
|
-
}
|
|
3218
|
-
async dereference() {
|
|
3219
|
-
const c = (0, u.default)(arguments);
|
|
3220
|
-
try {
|
|
3221
|
-
return await this.resolve(c.path, c.schema, c.options), (0, h.default)(this, c.options), b(this), (0, m.default)(c.callback, Promise.resolve(this.schema));
|
|
3222
|
-
} catch (x) {
|
|
3223
|
-
return (0, m.default)(c.callback, Promise.reject(x));
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
e.$RefParser = y, e.default = y;
|
|
3228
|
-
function b(d) {
|
|
3229
|
-
if (p.JSONParserErrorGroup.getParserErrors(d).length > 0)
|
|
3230
|
-
throw new p.JSONParserErrorGroup(d);
|
|
3231
|
-
}
|
|
3232
|
-
e.parse = y.parse, e.resolve = y.resolve, e.bundle = y.bundle, e.dereference = y.dereference;
|
|
3233
|
-
})(Qe);
|
|
3234
|
-
const $u = /* @__PURE__ */ hi(Qe), Cu = /* @__PURE__ */ gi({
|
|
3235
|
-
__proto__: null,
|
|
3236
|
-
default: $u
|
|
3237
|
-
}, [Qe]);
|
|
3238
|
-
export {
|
|
3239
|
-
Cu as i
|
|
3240
|
-
};
|