peachsim 0.1.2600 → 0.1.2601
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/cli/commands/detect.ts +16 -10
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +11432 -11074
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +11 -2276
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-FGRSVFK5.mjs → acorn-QZ2CUPHM.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-ZPZHTSVV.mjs → chunk-36UH63MB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-F72K7HJL.mjs → chunk-3XOVNNLW.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7O5GHZNG.mjs → chunk-4DSC65OJ.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-C3YFMHVW.mjs → chunk-5SWBLCBW.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-CC6C72OW.mjs → chunk-6YPM2YPR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BVRFDE5A.mjs → chunk-7NCBX65P.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-23YC72IU.mjs → chunk-AJARDL5C.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DB24TNAU.mjs → chunk-CK3Z4ICA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-46MZJPMK.mjs → chunk-E26HGQSD.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-66EJ2CSG.mjs → chunk-EWL5AKTY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7VUNHZJ4.mjs → chunk-EZ4QHTFM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-T7BVUONU.mjs → chunk-K7OOJRZB.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RFLRGBWJ.mjs → chunk-N4YUQWGP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IANEFUXF.mjs → chunk-OSRDW3DT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IEXENIW2.mjs → chunk-PE2YXAKR.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-GNN4EGGX.mjs → chunk-Q37TTP7V.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LLIEH2SU.mjs → chunk-RL5UG2KA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-C2BC7GUJ.mjs → chunk-SGLGSFK7.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-FQRSMKOT.mjs → chunk-SYLKF7NM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-GTJLYHLX.mjs → chunk-VZZ4446Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-R5YW43IZ.mjs → chunk-Y4RGOFWV.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-G2OL3VLT.mjs → chunk-ZGZPGLDT.mjs} +1024 -653
- package/dist-lib/esm-chunks/{metro-layout-parser-WVDFEJTE.mjs → metro-layout-parser-GIQWWTMJ.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-FRKYWMMQ.mjs → swift-package-prebuilt-XEZH6YEY.mjs} +10 -10
- package/dist-lib/esm-chunks/{swift-sdk-app-module-TMDS6TCR.mjs → swift-sdk-app-module-COF7L4HK.mjs} +14 -14
- package/dist-lib/esm-chunks/{swift-sdk-image-73TU5HWR.mjs → swift-sdk-image-AQCBWHPL.mjs} +14 -14
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-WJTPYSJ4.mjs → swift-sdk-image-producer-5L5LD4VP.mjs} +4 -4
- package/dist-lib/expo-swift-bundle.cjs +12833 -12475
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +12809 -12451
- package/dist-lib/host/fetch-proxy-handler.cjs +5434 -5422
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +10 -2275
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +23 -11
- package/dist-lib/native-app-identity-project.mjs +16 -16
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +82 -81
- package/dist-lib/public-origins-lib.json +372 -429
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +1093 -735
- package/dist-lib/swift-compile.cjs +1029 -652
- package/dist-lib/swift-compile.mjs +10 -10
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/package.json +1 -2
- package/src/device-catalog.ts +4 -5
- package/src/ios-version.ts +8 -0
- package/src/swift-guest-compile.ts +5 -3
- package/src/swift-guest-image-ledger.ts +563 -264
- package/src/swift-guest-link.ts +628 -468
- package/src/wasm-binary-sections.ts +1 -1
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2601 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -3231,2271 +3231,6 @@ var import_node_child_process4 = require("node:child_process");
|
|
|
3231
3231
|
var import_node_fs14 = require("node:fs");
|
|
3232
3232
|
var import_node_path12 = require("node:path");
|
|
3233
3233
|
|
|
3234
|
-
// ../../node_modules/yaml/browser/dist/nodes/identity.js
|
|
3235
|
-
var ALIAS = Symbol.for("yaml.alias");
|
|
3236
|
-
var DOC = Symbol.for("yaml.document");
|
|
3237
|
-
var MAP = Symbol.for("yaml.map");
|
|
3238
|
-
var PAIR = Symbol.for("yaml.pair");
|
|
3239
|
-
var SCALAR = Symbol.for("yaml.scalar");
|
|
3240
|
-
var SEQ = Symbol.for("yaml.seq");
|
|
3241
|
-
var NODE_TYPE = Symbol.for("yaml.node.type");
|
|
3242
|
-
var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
|
|
3243
|
-
var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
|
|
3244
|
-
var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
|
|
3245
|
-
var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
|
|
3246
|
-
var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
|
|
3247
|
-
var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
|
|
3248
|
-
function isCollection(node) {
|
|
3249
|
-
if (node && typeof node === "object")
|
|
3250
|
-
switch (node[NODE_TYPE]) {
|
|
3251
|
-
case MAP:
|
|
3252
|
-
case SEQ:
|
|
3253
|
-
return true;
|
|
3254
|
-
}
|
|
3255
|
-
return false;
|
|
3256
|
-
}
|
|
3257
|
-
function isNode(node) {
|
|
3258
|
-
if (node && typeof node === "object")
|
|
3259
|
-
switch (node[NODE_TYPE]) {
|
|
3260
|
-
case ALIAS:
|
|
3261
|
-
case MAP:
|
|
3262
|
-
case SCALAR:
|
|
3263
|
-
case SEQ:
|
|
3264
|
-
return true;
|
|
3265
|
-
}
|
|
3266
|
-
return false;
|
|
3267
|
-
}
|
|
3268
|
-
var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
3269
|
-
|
|
3270
|
-
// ../../node_modules/yaml/browser/dist/visit.js
|
|
3271
|
-
var BREAK = Symbol("break visit");
|
|
3272
|
-
var SKIP = Symbol("skip children");
|
|
3273
|
-
var REMOVE = Symbol("remove node");
|
|
3274
|
-
function visit(node, visitor) {
|
|
3275
|
-
const visitor_ = initVisitor(visitor);
|
|
3276
|
-
if (isDocument(node)) {
|
|
3277
|
-
const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
|
|
3278
|
-
if (cd === REMOVE)
|
|
3279
|
-
node.contents = null;
|
|
3280
|
-
} else
|
|
3281
|
-
visit_(null, node, visitor_, Object.freeze([]));
|
|
3282
|
-
}
|
|
3283
|
-
visit.BREAK = BREAK;
|
|
3284
|
-
visit.SKIP = SKIP;
|
|
3285
|
-
visit.REMOVE = REMOVE;
|
|
3286
|
-
function visit_(key, node, visitor, path10) {
|
|
3287
|
-
const ctrl = callVisitor(key, node, visitor, path10);
|
|
3288
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
3289
|
-
replaceNode(key, path10, ctrl);
|
|
3290
|
-
return visit_(key, ctrl, visitor, path10);
|
|
3291
|
-
}
|
|
3292
|
-
if (typeof ctrl !== "symbol") {
|
|
3293
|
-
if (isCollection(node)) {
|
|
3294
|
-
path10 = Object.freeze(path10.concat(node));
|
|
3295
|
-
for (let i = 0; i < node.items.length; ++i) {
|
|
3296
|
-
const ci = visit_(i, node.items[i], visitor, path10);
|
|
3297
|
-
if (typeof ci === "number")
|
|
3298
|
-
i = ci - 1;
|
|
3299
|
-
else if (ci === BREAK)
|
|
3300
|
-
return BREAK;
|
|
3301
|
-
else if (ci === REMOVE) {
|
|
3302
|
-
node.items.splice(i, 1);
|
|
3303
|
-
i -= 1;
|
|
3304
|
-
}
|
|
3305
|
-
}
|
|
3306
|
-
} else if (isPair(node)) {
|
|
3307
|
-
path10 = Object.freeze(path10.concat(node));
|
|
3308
|
-
const ck = visit_("key", node.key, visitor, path10);
|
|
3309
|
-
if (ck === BREAK)
|
|
3310
|
-
return BREAK;
|
|
3311
|
-
else if (ck === REMOVE)
|
|
3312
|
-
node.key = null;
|
|
3313
|
-
const cv = visit_("value", node.value, visitor, path10);
|
|
3314
|
-
if (cv === BREAK)
|
|
3315
|
-
return BREAK;
|
|
3316
|
-
else if (cv === REMOVE)
|
|
3317
|
-
node.value = null;
|
|
3318
|
-
}
|
|
3319
|
-
}
|
|
3320
|
-
return ctrl;
|
|
3321
|
-
}
|
|
3322
|
-
async function visitAsync(node, visitor) {
|
|
3323
|
-
const visitor_ = initVisitor(visitor);
|
|
3324
|
-
if (isDocument(node)) {
|
|
3325
|
-
const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
|
|
3326
|
-
if (cd === REMOVE)
|
|
3327
|
-
node.contents = null;
|
|
3328
|
-
} else
|
|
3329
|
-
await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
3330
|
-
}
|
|
3331
|
-
visitAsync.BREAK = BREAK;
|
|
3332
|
-
visitAsync.SKIP = SKIP;
|
|
3333
|
-
visitAsync.REMOVE = REMOVE;
|
|
3334
|
-
async function visitAsync_(key, node, visitor, path10) {
|
|
3335
|
-
const ctrl = await callVisitor(key, node, visitor, path10);
|
|
3336
|
-
if (isNode(ctrl) || isPair(ctrl)) {
|
|
3337
|
-
replaceNode(key, path10, ctrl);
|
|
3338
|
-
return visitAsync_(key, ctrl, visitor, path10);
|
|
3339
|
-
}
|
|
3340
|
-
if (typeof ctrl !== "symbol") {
|
|
3341
|
-
if (isCollection(node)) {
|
|
3342
|
-
path10 = Object.freeze(path10.concat(node));
|
|
3343
|
-
for (let i = 0; i < node.items.length; ++i) {
|
|
3344
|
-
const ci = await visitAsync_(i, node.items[i], visitor, path10);
|
|
3345
|
-
if (typeof ci === "number")
|
|
3346
|
-
i = ci - 1;
|
|
3347
|
-
else if (ci === BREAK)
|
|
3348
|
-
return BREAK;
|
|
3349
|
-
else if (ci === REMOVE) {
|
|
3350
|
-
node.items.splice(i, 1);
|
|
3351
|
-
i -= 1;
|
|
3352
|
-
}
|
|
3353
|
-
}
|
|
3354
|
-
} else if (isPair(node)) {
|
|
3355
|
-
path10 = Object.freeze(path10.concat(node));
|
|
3356
|
-
const ck = await visitAsync_("key", node.key, visitor, path10);
|
|
3357
|
-
if (ck === BREAK)
|
|
3358
|
-
return BREAK;
|
|
3359
|
-
else if (ck === REMOVE)
|
|
3360
|
-
node.key = null;
|
|
3361
|
-
const cv = await visitAsync_("value", node.value, visitor, path10);
|
|
3362
|
-
if (cv === BREAK)
|
|
3363
|
-
return BREAK;
|
|
3364
|
-
else if (cv === REMOVE)
|
|
3365
|
-
node.value = null;
|
|
3366
|
-
}
|
|
3367
|
-
}
|
|
3368
|
-
return ctrl;
|
|
3369
|
-
}
|
|
3370
|
-
function initVisitor(visitor) {
|
|
3371
|
-
if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) {
|
|
3372
|
-
return Object.assign({
|
|
3373
|
-
Alias: visitor.Node,
|
|
3374
|
-
Map: visitor.Node,
|
|
3375
|
-
Scalar: visitor.Node,
|
|
3376
|
-
Seq: visitor.Node
|
|
3377
|
-
}, visitor.Value && {
|
|
3378
|
-
Map: visitor.Value,
|
|
3379
|
-
Scalar: visitor.Value,
|
|
3380
|
-
Seq: visitor.Value
|
|
3381
|
-
}, visitor.Collection && {
|
|
3382
|
-
Map: visitor.Collection,
|
|
3383
|
-
Seq: visitor.Collection
|
|
3384
|
-
}, visitor);
|
|
3385
|
-
}
|
|
3386
|
-
return visitor;
|
|
3387
|
-
}
|
|
3388
|
-
function callVisitor(key, node, visitor, path10) {
|
|
3389
|
-
if (typeof visitor === "function")
|
|
3390
|
-
return visitor(key, node, path10);
|
|
3391
|
-
if (isMap(node))
|
|
3392
|
-
return visitor.Map?.(key, node, path10);
|
|
3393
|
-
if (isSeq(node))
|
|
3394
|
-
return visitor.Seq?.(key, node, path10);
|
|
3395
|
-
if (isPair(node))
|
|
3396
|
-
return visitor.Pair?.(key, node, path10);
|
|
3397
|
-
if (isScalar(node))
|
|
3398
|
-
return visitor.Scalar?.(key, node, path10);
|
|
3399
|
-
if (isAlias(node))
|
|
3400
|
-
return visitor.Alias?.(key, node, path10);
|
|
3401
|
-
return void 0;
|
|
3402
|
-
}
|
|
3403
|
-
function replaceNode(key, path10, node) {
|
|
3404
|
-
const parent = path10[path10.length - 1];
|
|
3405
|
-
if (isCollection(parent)) {
|
|
3406
|
-
parent.items[key] = node;
|
|
3407
|
-
} else if (isPair(parent)) {
|
|
3408
|
-
if (key === "key")
|
|
3409
|
-
parent.key = node;
|
|
3410
|
-
else
|
|
3411
|
-
parent.value = node;
|
|
3412
|
-
} else if (isDocument(parent)) {
|
|
3413
|
-
parent.contents = node;
|
|
3414
|
-
} else {
|
|
3415
|
-
const pt = isAlias(parent) ? "alias" : "scalar";
|
|
3416
|
-
throw new Error(`Cannot replace node with ${pt} parent`);
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
// ../../node_modules/yaml/browser/dist/doc/directives.js
|
|
3421
|
-
var escapeChars = {
|
|
3422
|
-
"!": "%21",
|
|
3423
|
-
",": "%2C",
|
|
3424
|
-
"[": "%5B",
|
|
3425
|
-
"]": "%5D",
|
|
3426
|
-
"{": "%7B",
|
|
3427
|
-
"}": "%7D"
|
|
3428
|
-
};
|
|
3429
|
-
var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]);
|
|
3430
|
-
var Directives = class _Directives {
|
|
3431
|
-
constructor(yaml, tags) {
|
|
3432
|
-
this.docStart = null;
|
|
3433
|
-
this.docEnd = false;
|
|
3434
|
-
this.yaml = Object.assign({}, _Directives.defaultYaml, yaml);
|
|
3435
|
-
this.tags = Object.assign({}, _Directives.defaultTags, tags);
|
|
3436
|
-
}
|
|
3437
|
-
clone() {
|
|
3438
|
-
const copy = new _Directives(this.yaml, this.tags);
|
|
3439
|
-
copy.docStart = this.docStart;
|
|
3440
|
-
return copy;
|
|
3441
|
-
}
|
|
3442
|
-
/**
|
|
3443
|
-
* During parsing, get a Directives instance for the current document and
|
|
3444
|
-
* update the stream state according to the current version's spec.
|
|
3445
|
-
*/
|
|
3446
|
-
atDocument() {
|
|
3447
|
-
const res = new _Directives(this.yaml, this.tags);
|
|
3448
|
-
switch (this.yaml.version) {
|
|
3449
|
-
case "1.1":
|
|
3450
|
-
this.atNextDocument = true;
|
|
3451
|
-
break;
|
|
3452
|
-
case "1.2":
|
|
3453
|
-
this.atNextDocument = false;
|
|
3454
|
-
this.yaml = {
|
|
3455
|
-
explicit: _Directives.defaultYaml.explicit,
|
|
3456
|
-
version: "1.2"
|
|
3457
|
-
};
|
|
3458
|
-
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
3459
|
-
break;
|
|
3460
|
-
}
|
|
3461
|
-
return res;
|
|
3462
|
-
}
|
|
3463
|
-
/**
|
|
3464
|
-
* @param onError - May be called even if the action was successful
|
|
3465
|
-
* @returns `true` on success
|
|
3466
|
-
*/
|
|
3467
|
-
add(line, onError) {
|
|
3468
|
-
if (this.atNextDocument) {
|
|
3469
|
-
this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" };
|
|
3470
|
-
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
3471
|
-
this.atNextDocument = false;
|
|
3472
|
-
}
|
|
3473
|
-
const parts = line.trim().split(/[ \t]+/);
|
|
3474
|
-
const name2 = parts.shift();
|
|
3475
|
-
switch (name2) {
|
|
3476
|
-
case "%TAG": {
|
|
3477
|
-
if (parts.length !== 2) {
|
|
3478
|
-
onError(0, "%TAG directive should contain exactly two parts");
|
|
3479
|
-
if (parts.length < 2)
|
|
3480
|
-
return false;
|
|
3481
|
-
}
|
|
3482
|
-
const [handle, prefix] = parts;
|
|
3483
|
-
this.tags[handle] = prefix;
|
|
3484
|
-
return true;
|
|
3485
|
-
}
|
|
3486
|
-
case "%YAML": {
|
|
3487
|
-
this.yaml.explicit = true;
|
|
3488
|
-
if (parts.length !== 1) {
|
|
3489
|
-
onError(0, "%YAML directive should contain exactly one part");
|
|
3490
|
-
return false;
|
|
3491
|
-
}
|
|
3492
|
-
const [version] = parts;
|
|
3493
|
-
if (version === "1.1" || version === "1.2") {
|
|
3494
|
-
this.yaml.version = version;
|
|
3495
|
-
return true;
|
|
3496
|
-
} else {
|
|
3497
|
-
const isValid = /^\d+\.\d+$/.test(version);
|
|
3498
|
-
onError(6, `Unsupported YAML version ${version}`, isValid);
|
|
3499
|
-
return false;
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
default:
|
|
3503
|
-
onError(0, `Unknown directive ${name2}`, true);
|
|
3504
|
-
return false;
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
/**
|
|
3508
|
-
* Resolves a tag, matching handles to those defined in %TAG directives.
|
|
3509
|
-
*
|
|
3510
|
-
* @returns Resolved tag, which may also be the non-specific tag `'!'` or a
|
|
3511
|
-
* `'!local'` tag, or `null` if unresolvable.
|
|
3512
|
-
*/
|
|
3513
|
-
tagName(source, onError) {
|
|
3514
|
-
if (source === "!")
|
|
3515
|
-
return "!";
|
|
3516
|
-
if (source[0] !== "!") {
|
|
3517
|
-
onError(`Not a valid tag: ${source}`);
|
|
3518
|
-
return null;
|
|
3519
|
-
}
|
|
3520
|
-
if (source[1] === "<") {
|
|
3521
|
-
const verbatim = source.slice(2, -1);
|
|
3522
|
-
if (verbatim === "!" || verbatim === "!!") {
|
|
3523
|
-
onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
|
|
3524
|
-
return null;
|
|
3525
|
-
}
|
|
3526
|
-
if (source[source.length - 1] !== ">")
|
|
3527
|
-
onError("Verbatim tags must end with a >");
|
|
3528
|
-
return verbatim;
|
|
3529
|
-
}
|
|
3530
|
-
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
|
3531
|
-
if (!suffix)
|
|
3532
|
-
onError(`The ${source} tag has no suffix`);
|
|
3533
|
-
const prefix = this.tags[handle];
|
|
3534
|
-
if (prefix) {
|
|
3535
|
-
try {
|
|
3536
|
-
return prefix + decodeURIComponent(suffix);
|
|
3537
|
-
} catch (error) {
|
|
3538
|
-
onError(String(error));
|
|
3539
|
-
return null;
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
if (handle === "!")
|
|
3543
|
-
return source;
|
|
3544
|
-
onError(`Could not resolve tag: ${source}`);
|
|
3545
|
-
return null;
|
|
3546
|
-
}
|
|
3547
|
-
/**
|
|
3548
|
-
* Given a fully resolved tag, returns its printable string form,
|
|
3549
|
-
* taking into account current tag prefixes and defaults.
|
|
3550
|
-
*/
|
|
3551
|
-
tagString(tag) {
|
|
3552
|
-
for (const [handle, prefix] of Object.entries(this.tags)) {
|
|
3553
|
-
if (tag.startsWith(prefix))
|
|
3554
|
-
return handle + escapeTagName(tag.substring(prefix.length));
|
|
3555
|
-
}
|
|
3556
|
-
return tag[0] === "!" ? tag : `!<${tag}>`;
|
|
3557
|
-
}
|
|
3558
|
-
toString(doc) {
|
|
3559
|
-
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
3560
|
-
const tagEntries = Object.entries(this.tags);
|
|
3561
|
-
let tagNames;
|
|
3562
|
-
if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
|
|
3563
|
-
const tags = {};
|
|
3564
|
-
visit(doc.contents, (_key, node) => {
|
|
3565
|
-
if (isNode(node) && node.tag)
|
|
3566
|
-
tags[node.tag] = true;
|
|
3567
|
-
});
|
|
3568
|
-
tagNames = Object.keys(tags);
|
|
3569
|
-
} else
|
|
3570
|
-
tagNames = [];
|
|
3571
|
-
for (const [handle, prefix] of tagEntries) {
|
|
3572
|
-
if (handle === "!!" && prefix === "tag:yaml.org,2002:")
|
|
3573
|
-
continue;
|
|
3574
|
-
if (!doc || tagNames.some((tn) => tn.startsWith(prefix)))
|
|
3575
|
-
lines.push(`%TAG ${handle} ${prefix}`);
|
|
3576
|
-
}
|
|
3577
|
-
return lines.join("\n");
|
|
3578
|
-
}
|
|
3579
|
-
};
|
|
3580
|
-
Directives.defaultYaml = { explicit: false, version: "1.2" };
|
|
3581
|
-
Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
3582
|
-
|
|
3583
|
-
// ../../node_modules/yaml/browser/dist/doc/anchors.js
|
|
3584
|
-
function anchorIsValid(anchor) {
|
|
3585
|
-
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
|
|
3586
|
-
const sa = JSON.stringify(anchor);
|
|
3587
|
-
const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
|
|
3588
|
-
throw new Error(msg);
|
|
3589
|
-
}
|
|
3590
|
-
return true;
|
|
3591
|
-
}
|
|
3592
|
-
|
|
3593
|
-
// ../../node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
3594
|
-
function applyReviver(reviver, obj, key, val) {
|
|
3595
|
-
if (val && typeof val === "object") {
|
|
3596
|
-
if (Array.isArray(val)) {
|
|
3597
|
-
for (let i = 0, len = val.length; i < len; ++i) {
|
|
3598
|
-
const v0 = val[i];
|
|
3599
|
-
const v1 = applyReviver(reviver, val, String(i), v0);
|
|
3600
|
-
if (v1 === void 0)
|
|
3601
|
-
delete val[i];
|
|
3602
|
-
else if (v1 !== v0)
|
|
3603
|
-
val[i] = v1;
|
|
3604
|
-
}
|
|
3605
|
-
} else if (val instanceof Map) {
|
|
3606
|
-
for (const k of Array.from(val.keys())) {
|
|
3607
|
-
const v0 = val.get(k);
|
|
3608
|
-
const v1 = applyReviver(reviver, val, k, v0);
|
|
3609
|
-
if (v1 === void 0)
|
|
3610
|
-
val.delete(k);
|
|
3611
|
-
else if (v1 !== v0)
|
|
3612
|
-
val.set(k, v1);
|
|
3613
|
-
}
|
|
3614
|
-
} else if (val instanceof Set) {
|
|
3615
|
-
for (const v0 of Array.from(val)) {
|
|
3616
|
-
const v1 = applyReviver(reviver, val, v0, v0);
|
|
3617
|
-
if (v1 === void 0)
|
|
3618
|
-
val.delete(v0);
|
|
3619
|
-
else if (v1 !== v0) {
|
|
3620
|
-
val.delete(v0);
|
|
3621
|
-
val.add(v1);
|
|
3622
|
-
}
|
|
3623
|
-
}
|
|
3624
|
-
} else {
|
|
3625
|
-
for (const [k, v0] of Object.entries(val)) {
|
|
3626
|
-
const v1 = applyReviver(reviver, val, k, v0);
|
|
3627
|
-
if (v1 === void 0)
|
|
3628
|
-
delete val[k];
|
|
3629
|
-
else if (v1 !== v0)
|
|
3630
|
-
val[k] = v1;
|
|
3631
|
-
}
|
|
3632
|
-
}
|
|
3633
|
-
}
|
|
3634
|
-
return reviver.call(obj, key, val);
|
|
3635
|
-
}
|
|
3636
|
-
|
|
3637
|
-
// ../../node_modules/yaml/browser/dist/nodes/toJS.js
|
|
3638
|
-
function toJS(value, arg, ctx) {
|
|
3639
|
-
if (Array.isArray(value))
|
|
3640
|
-
return value.map((v, i) => toJS(v, String(i), ctx));
|
|
3641
|
-
if (value && typeof value.toJSON === "function") {
|
|
3642
|
-
if (!ctx || !hasAnchor(value))
|
|
3643
|
-
return value.toJSON(arg, ctx);
|
|
3644
|
-
const data = { aliasCount: 0, count: 1, res: void 0 };
|
|
3645
|
-
ctx.anchors.set(value, data);
|
|
3646
|
-
ctx.onCreate = (res2) => {
|
|
3647
|
-
data.res = res2;
|
|
3648
|
-
delete ctx.onCreate;
|
|
3649
|
-
};
|
|
3650
|
-
const res = value.toJSON(arg, ctx);
|
|
3651
|
-
if (ctx.onCreate)
|
|
3652
|
-
ctx.onCreate(res);
|
|
3653
|
-
return res;
|
|
3654
|
-
}
|
|
3655
|
-
if (typeof value === "bigint" && !ctx?.keep)
|
|
3656
|
-
return Number(value);
|
|
3657
|
-
return value;
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
// ../../node_modules/yaml/browser/dist/nodes/Node.js
|
|
3661
|
-
var NodeBase = class {
|
|
3662
|
-
constructor(type) {
|
|
3663
|
-
Object.defineProperty(this, NODE_TYPE, { value: type });
|
|
3664
|
-
}
|
|
3665
|
-
/** Create a copy of this node. */
|
|
3666
|
-
clone() {
|
|
3667
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
3668
|
-
if (this.range)
|
|
3669
|
-
copy.range = this.range.slice();
|
|
3670
|
-
return copy;
|
|
3671
|
-
}
|
|
3672
|
-
/** A plain JavaScript representation of this node. */
|
|
3673
|
-
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
3674
|
-
if (!isDocument(doc))
|
|
3675
|
-
throw new TypeError("A document argument is required");
|
|
3676
|
-
const ctx = {
|
|
3677
|
-
anchors: /* @__PURE__ */ new Map(),
|
|
3678
|
-
doc,
|
|
3679
|
-
keep: true,
|
|
3680
|
-
mapAsMap: mapAsMap === true,
|
|
3681
|
-
mapKeyWarned: false,
|
|
3682
|
-
maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
|
|
3683
|
-
};
|
|
3684
|
-
const res = toJS(this, "", ctx);
|
|
3685
|
-
if (typeof onAnchor === "function")
|
|
3686
|
-
for (const { count, res: res2 } of ctx.anchors.values())
|
|
3687
|
-
onAnchor(res2, count);
|
|
3688
|
-
return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
|
|
3689
|
-
}
|
|
3690
|
-
};
|
|
3691
|
-
|
|
3692
|
-
// ../../node_modules/yaml/browser/dist/nodes/Alias.js
|
|
3693
|
-
var Alias = class extends NodeBase {
|
|
3694
|
-
constructor(source) {
|
|
3695
|
-
super(ALIAS);
|
|
3696
|
-
this.source = source;
|
|
3697
|
-
Object.defineProperty(this, "tag", {
|
|
3698
|
-
set() {
|
|
3699
|
-
throw new Error("Alias nodes cannot have tags");
|
|
3700
|
-
}
|
|
3701
|
-
});
|
|
3702
|
-
}
|
|
3703
|
-
/**
|
|
3704
|
-
* Resolve the value of this alias within `doc`, finding the last
|
|
3705
|
-
* instance of the `source` anchor before this node.
|
|
3706
|
-
*/
|
|
3707
|
-
resolve(doc, ctx) {
|
|
3708
|
-
if (ctx?.maxAliasCount === 0)
|
|
3709
|
-
throw new ReferenceError("Alias resolution is disabled");
|
|
3710
|
-
let nodes;
|
|
3711
|
-
if (ctx?.aliasResolveCache) {
|
|
3712
|
-
nodes = ctx.aliasResolveCache;
|
|
3713
|
-
} else {
|
|
3714
|
-
nodes = [];
|
|
3715
|
-
visit(doc, {
|
|
3716
|
-
Node: (_key, node) => {
|
|
3717
|
-
if (isAlias(node) || hasAnchor(node))
|
|
3718
|
-
nodes.push(node);
|
|
3719
|
-
}
|
|
3720
|
-
});
|
|
3721
|
-
if (ctx)
|
|
3722
|
-
ctx.aliasResolveCache = nodes;
|
|
3723
|
-
}
|
|
3724
|
-
let found = void 0;
|
|
3725
|
-
for (const node of nodes) {
|
|
3726
|
-
if (node === this)
|
|
3727
|
-
break;
|
|
3728
|
-
if (node.anchor === this.source)
|
|
3729
|
-
found = node;
|
|
3730
|
-
}
|
|
3731
|
-
return found;
|
|
3732
|
-
}
|
|
3733
|
-
toJSON(_arg, ctx) {
|
|
3734
|
-
if (!ctx)
|
|
3735
|
-
return { source: this.source };
|
|
3736
|
-
const { anchors, doc, maxAliasCount } = ctx;
|
|
3737
|
-
const source = this.resolve(doc, ctx);
|
|
3738
|
-
if (!source) {
|
|
3739
|
-
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
3740
|
-
throw new ReferenceError(msg);
|
|
3741
|
-
}
|
|
3742
|
-
let data = anchors.get(source);
|
|
3743
|
-
if (!data) {
|
|
3744
|
-
toJS(source, null, ctx);
|
|
3745
|
-
data = anchors.get(source);
|
|
3746
|
-
}
|
|
3747
|
-
if (data?.res === void 0) {
|
|
3748
|
-
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
3749
|
-
throw new ReferenceError(msg);
|
|
3750
|
-
}
|
|
3751
|
-
if (maxAliasCount >= 0) {
|
|
3752
|
-
data.count += 1;
|
|
3753
|
-
if (data.aliasCount === 0)
|
|
3754
|
-
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
3755
|
-
if (data.count * data.aliasCount > maxAliasCount) {
|
|
3756
|
-
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
3757
|
-
throw new ReferenceError(msg);
|
|
3758
|
-
}
|
|
3759
|
-
}
|
|
3760
|
-
return data.res;
|
|
3761
|
-
}
|
|
3762
|
-
toString(ctx, _onComment, _onChompKeep) {
|
|
3763
|
-
const src = `*${this.source}`;
|
|
3764
|
-
if (ctx) {
|
|
3765
|
-
anchorIsValid(this.source);
|
|
3766
|
-
if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
|
|
3767
|
-
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
3768
|
-
throw new Error(msg);
|
|
3769
|
-
}
|
|
3770
|
-
if (ctx.implicitKey)
|
|
3771
|
-
return `${src} `;
|
|
3772
|
-
}
|
|
3773
|
-
return src;
|
|
3774
|
-
}
|
|
3775
|
-
};
|
|
3776
|
-
function getAliasCount(doc, node, anchors) {
|
|
3777
|
-
if (isAlias(node)) {
|
|
3778
|
-
const source = node.resolve(doc);
|
|
3779
|
-
const anchor = anchors && source && anchors.get(source);
|
|
3780
|
-
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
3781
|
-
} else if (isCollection(node)) {
|
|
3782
|
-
let count = 0;
|
|
3783
|
-
for (const item of node.items) {
|
|
3784
|
-
const c = getAliasCount(doc, item, anchors);
|
|
3785
|
-
if (c > count)
|
|
3786
|
-
count = c;
|
|
3787
|
-
}
|
|
3788
|
-
return count;
|
|
3789
|
-
} else if (isPair(node)) {
|
|
3790
|
-
const kc = getAliasCount(doc, node.key, anchors);
|
|
3791
|
-
const vc = getAliasCount(doc, node.value, anchors);
|
|
3792
|
-
return Math.max(kc, vc);
|
|
3793
|
-
}
|
|
3794
|
-
return 1;
|
|
3795
|
-
}
|
|
3796
|
-
|
|
3797
|
-
// ../../node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
3798
|
-
var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
3799
|
-
var Scalar = class extends NodeBase {
|
|
3800
|
-
constructor(value) {
|
|
3801
|
-
super(SCALAR);
|
|
3802
|
-
this.value = value;
|
|
3803
|
-
}
|
|
3804
|
-
toJSON(arg, ctx) {
|
|
3805
|
-
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
3806
|
-
}
|
|
3807
|
-
toString() {
|
|
3808
|
-
return String(this.value);
|
|
3809
|
-
}
|
|
3810
|
-
};
|
|
3811
|
-
Scalar.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
3812
|
-
Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
3813
|
-
Scalar.PLAIN = "PLAIN";
|
|
3814
|
-
Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
3815
|
-
Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
3816
|
-
|
|
3817
|
-
// ../../node_modules/yaml/browser/dist/doc/createNode.js
|
|
3818
|
-
var defaultTagPrefix = "tag:yaml.org,2002:";
|
|
3819
|
-
function findTagObject(value, tagName, tags) {
|
|
3820
|
-
if (tagName) {
|
|
3821
|
-
const match = tags.filter((t) => t.tag === tagName);
|
|
3822
|
-
const tagObj = match.find((t) => !t.format) ?? match[0];
|
|
3823
|
-
if (!tagObj)
|
|
3824
|
-
throw new Error(`Tag ${tagName} not found`);
|
|
3825
|
-
return tagObj;
|
|
3826
|
-
}
|
|
3827
|
-
return tags.find((t) => t.identify?.(value) && !t.format);
|
|
3828
|
-
}
|
|
3829
|
-
function createNode(value, tagName, ctx) {
|
|
3830
|
-
if (isDocument(value))
|
|
3831
|
-
value = value.contents;
|
|
3832
|
-
if (isNode(value))
|
|
3833
|
-
return value;
|
|
3834
|
-
if (isPair(value)) {
|
|
3835
|
-
const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
3836
|
-
map2.items.push(value);
|
|
3837
|
-
return map2;
|
|
3838
|
-
}
|
|
3839
|
-
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
|
|
3840
|
-
value = value.valueOf();
|
|
3841
|
-
}
|
|
3842
|
-
const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema4, sourceObjects } = ctx;
|
|
3843
|
-
let ref = void 0;
|
|
3844
|
-
if (aliasDuplicateObjects && value && typeof value === "object") {
|
|
3845
|
-
ref = sourceObjects.get(value);
|
|
3846
|
-
if (ref) {
|
|
3847
|
-
ref.anchor ?? (ref.anchor = onAnchor(value));
|
|
3848
|
-
return new Alias(ref.anchor);
|
|
3849
|
-
} else {
|
|
3850
|
-
ref = { anchor: null, node: null };
|
|
3851
|
-
sourceObjects.set(value, ref);
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3854
|
-
if (tagName?.startsWith("!!"))
|
|
3855
|
-
tagName = defaultTagPrefix + tagName.slice(2);
|
|
3856
|
-
let tagObj = findTagObject(value, tagName, schema4.tags);
|
|
3857
|
-
if (!tagObj) {
|
|
3858
|
-
if (value && typeof value.toJSON === "function") {
|
|
3859
|
-
value = value.toJSON();
|
|
3860
|
-
}
|
|
3861
|
-
if (!value || typeof value !== "object") {
|
|
3862
|
-
const node2 = new Scalar(value);
|
|
3863
|
-
if (ref)
|
|
3864
|
-
ref.node = node2;
|
|
3865
|
-
return node2;
|
|
3866
|
-
}
|
|
3867
|
-
tagObj = value instanceof Map ? schema4[MAP] : Symbol.iterator in Object(value) ? schema4[SEQ] : schema4[MAP];
|
|
3868
|
-
}
|
|
3869
|
-
if (onTagObj) {
|
|
3870
|
-
onTagObj(tagObj);
|
|
3871
|
-
delete ctx.onTagObj;
|
|
3872
|
-
}
|
|
3873
|
-
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar(value);
|
|
3874
|
-
if (tagName)
|
|
3875
|
-
node.tag = tagName;
|
|
3876
|
-
else if (!tagObj.default)
|
|
3877
|
-
node.tag = tagObj.tag;
|
|
3878
|
-
if (ref)
|
|
3879
|
-
ref.node = node;
|
|
3880
|
-
return node;
|
|
3881
|
-
}
|
|
3882
|
-
|
|
3883
|
-
// ../../node_modules/yaml/browser/dist/nodes/Collection.js
|
|
3884
|
-
function collectionFromPath(schema4, path10, value) {
|
|
3885
|
-
let v = value;
|
|
3886
|
-
for (let i = path10.length - 1; i >= 0; --i) {
|
|
3887
|
-
const k = path10[i];
|
|
3888
|
-
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
3889
|
-
const a = [];
|
|
3890
|
-
a[k] = v;
|
|
3891
|
-
v = a;
|
|
3892
|
-
} else {
|
|
3893
|
-
v = /* @__PURE__ */ new Map([[k, v]]);
|
|
3894
|
-
}
|
|
3895
|
-
}
|
|
3896
|
-
return createNode(v, void 0, {
|
|
3897
|
-
aliasDuplicateObjects: false,
|
|
3898
|
-
keepUndefined: false,
|
|
3899
|
-
onAnchor: () => {
|
|
3900
|
-
throw new Error("This should not happen, please report a bug.");
|
|
3901
|
-
},
|
|
3902
|
-
schema: schema4,
|
|
3903
|
-
sourceObjects: /* @__PURE__ */ new Map()
|
|
3904
|
-
});
|
|
3905
|
-
}
|
|
3906
|
-
var isEmptyPath = (path10) => path10 == null || typeof path10 === "object" && !!path10[Symbol.iterator]().next().done;
|
|
3907
|
-
var Collection = class extends NodeBase {
|
|
3908
|
-
constructor(type, schema4) {
|
|
3909
|
-
super(type);
|
|
3910
|
-
Object.defineProperty(this, "schema", {
|
|
3911
|
-
value: schema4,
|
|
3912
|
-
configurable: true,
|
|
3913
|
-
enumerable: false,
|
|
3914
|
-
writable: true
|
|
3915
|
-
});
|
|
3916
|
-
}
|
|
3917
|
-
/**
|
|
3918
|
-
* Create a copy of this collection.
|
|
3919
|
-
*
|
|
3920
|
-
* @param schema - If defined, overwrites the original's schema
|
|
3921
|
-
*/
|
|
3922
|
-
clone(schema4) {
|
|
3923
|
-
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
3924
|
-
if (schema4)
|
|
3925
|
-
copy.schema = schema4;
|
|
3926
|
-
copy.items = copy.items.map((it) => isNode(it) || isPair(it) ? it.clone(schema4) : it);
|
|
3927
|
-
if (this.range)
|
|
3928
|
-
copy.range = this.range.slice();
|
|
3929
|
-
return copy;
|
|
3930
|
-
}
|
|
3931
|
-
/**
|
|
3932
|
-
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
3933
|
-
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
3934
|
-
* that already exists in the map.
|
|
3935
|
-
*/
|
|
3936
|
-
addIn(path10, value) {
|
|
3937
|
-
if (isEmptyPath(path10))
|
|
3938
|
-
this.add(value);
|
|
3939
|
-
else {
|
|
3940
|
-
const [key, ...rest] = path10;
|
|
3941
|
-
const node = this.get(key, true);
|
|
3942
|
-
if (isCollection(node))
|
|
3943
|
-
node.addIn(rest, value);
|
|
3944
|
-
else if (node === void 0 && this.schema)
|
|
3945
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
3946
|
-
else
|
|
3947
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
3948
|
-
}
|
|
3949
|
-
}
|
|
3950
|
-
/**
|
|
3951
|
-
* Removes a value from the collection.
|
|
3952
|
-
* @returns `true` if the item was found and removed.
|
|
3953
|
-
*/
|
|
3954
|
-
deleteIn(path10) {
|
|
3955
|
-
const [key, ...rest] = path10;
|
|
3956
|
-
if (rest.length === 0)
|
|
3957
|
-
return this.delete(key);
|
|
3958
|
-
const node = this.get(key, true);
|
|
3959
|
-
if (isCollection(node))
|
|
3960
|
-
return node.deleteIn(rest);
|
|
3961
|
-
else
|
|
3962
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
3963
|
-
}
|
|
3964
|
-
/**
|
|
3965
|
-
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
3966
|
-
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
3967
|
-
* `true` (collections are always returned intact).
|
|
3968
|
-
*/
|
|
3969
|
-
getIn(path10, keepScalar) {
|
|
3970
|
-
const [key, ...rest] = path10;
|
|
3971
|
-
const node = this.get(key, true);
|
|
3972
|
-
if (rest.length === 0)
|
|
3973
|
-
return !keepScalar && isScalar(node) ? node.value : node;
|
|
3974
|
-
else
|
|
3975
|
-
return isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
|
|
3976
|
-
}
|
|
3977
|
-
hasAllNullValues(allowScalar) {
|
|
3978
|
-
return this.items.every((node) => {
|
|
3979
|
-
if (!isPair(node))
|
|
3980
|
-
return false;
|
|
3981
|
-
const n = node.value;
|
|
3982
|
-
return n == null || allowScalar && isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
3983
|
-
});
|
|
3984
|
-
}
|
|
3985
|
-
/**
|
|
3986
|
-
* Checks if the collection includes a value with the key `key`.
|
|
3987
|
-
*/
|
|
3988
|
-
hasIn(path10) {
|
|
3989
|
-
const [key, ...rest] = path10;
|
|
3990
|
-
if (rest.length === 0)
|
|
3991
|
-
return this.has(key);
|
|
3992
|
-
const node = this.get(key, true);
|
|
3993
|
-
return isCollection(node) ? node.hasIn(rest) : false;
|
|
3994
|
-
}
|
|
3995
|
-
/**
|
|
3996
|
-
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
3997
|
-
* boolean to add/remove the item from the set.
|
|
3998
|
-
*/
|
|
3999
|
-
setIn(path10, value) {
|
|
4000
|
-
const [key, ...rest] = path10;
|
|
4001
|
-
if (rest.length === 0) {
|
|
4002
|
-
this.set(key, value);
|
|
4003
|
-
} else {
|
|
4004
|
-
const node = this.get(key, true);
|
|
4005
|
-
if (isCollection(node))
|
|
4006
|
-
node.setIn(rest, value);
|
|
4007
|
-
else if (node === void 0 && this.schema)
|
|
4008
|
-
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
4009
|
-
else
|
|
4010
|
-
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
4011
|
-
}
|
|
4012
|
-
}
|
|
4013
|
-
};
|
|
4014
|
-
|
|
4015
|
-
// ../../node_modules/yaml/browser/dist/stringify/stringifyComment.js
|
|
4016
|
-
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
4017
|
-
function indentComment(comment, indent) {
|
|
4018
|
-
if (/^\n+$/.test(comment))
|
|
4019
|
-
return comment.substring(1);
|
|
4020
|
-
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
4021
|
-
}
|
|
4022
|
-
var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
|
|
4023
|
-
|
|
4024
|
-
// ../../node_modules/yaml/browser/dist/stringify/foldFlowLines.js
|
|
4025
|
-
var FOLD_FLOW = "flow";
|
|
4026
|
-
var FOLD_BLOCK = "block";
|
|
4027
|
-
var FOLD_QUOTED = "quoted";
|
|
4028
|
-
function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
4029
|
-
if (!lineWidth || lineWidth < 0)
|
|
4030
|
-
return text;
|
|
4031
|
-
if (lineWidth < minContentWidth)
|
|
4032
|
-
minContentWidth = 0;
|
|
4033
|
-
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
|
|
4034
|
-
if (text.length <= endStep)
|
|
4035
|
-
return text;
|
|
4036
|
-
const folds = [];
|
|
4037
|
-
const escapedFolds = {};
|
|
4038
|
-
let end = lineWidth - indent.length;
|
|
4039
|
-
if (typeof indentAtStart === "number") {
|
|
4040
|
-
if (indentAtStart > lineWidth - Math.max(2, minContentWidth))
|
|
4041
|
-
folds.push(0);
|
|
4042
|
-
else
|
|
4043
|
-
end = lineWidth - indentAtStart;
|
|
4044
|
-
}
|
|
4045
|
-
let split = void 0;
|
|
4046
|
-
let prev = void 0;
|
|
4047
|
-
let overflow = false;
|
|
4048
|
-
let i = -1;
|
|
4049
|
-
let escStart = -1;
|
|
4050
|
-
let escEnd = -1;
|
|
4051
|
-
if (mode === FOLD_BLOCK) {
|
|
4052
|
-
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
4053
|
-
if (i !== -1)
|
|
4054
|
-
end = i + endStep;
|
|
4055
|
-
}
|
|
4056
|
-
for (let ch; ch = text[i += 1]; ) {
|
|
4057
|
-
if (mode === FOLD_QUOTED && ch === "\\") {
|
|
4058
|
-
escStart = i;
|
|
4059
|
-
switch (text[i + 1]) {
|
|
4060
|
-
case "x":
|
|
4061
|
-
i += 3;
|
|
4062
|
-
break;
|
|
4063
|
-
case "u":
|
|
4064
|
-
i += 5;
|
|
4065
|
-
break;
|
|
4066
|
-
case "U":
|
|
4067
|
-
i += 9;
|
|
4068
|
-
break;
|
|
4069
|
-
default:
|
|
4070
|
-
i += 1;
|
|
4071
|
-
}
|
|
4072
|
-
escEnd = i;
|
|
4073
|
-
}
|
|
4074
|
-
if (ch === "\n") {
|
|
4075
|
-
if (mode === FOLD_BLOCK)
|
|
4076
|
-
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
4077
|
-
end = i + indent.length + endStep;
|
|
4078
|
-
split = void 0;
|
|
4079
|
-
} else {
|
|
4080
|
-
if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
|
4081
|
-
const next = text[i + 1];
|
|
4082
|
-
if (next && next !== " " && next !== "\n" && next !== " ")
|
|
4083
|
-
split = i;
|
|
4084
|
-
}
|
|
4085
|
-
if (i >= end) {
|
|
4086
|
-
if (split) {
|
|
4087
|
-
folds.push(split);
|
|
4088
|
-
end = split + endStep;
|
|
4089
|
-
split = void 0;
|
|
4090
|
-
} else if (mode === FOLD_QUOTED) {
|
|
4091
|
-
while (prev === " " || prev === " ") {
|
|
4092
|
-
prev = ch;
|
|
4093
|
-
ch = text[i += 1];
|
|
4094
|
-
overflow = true;
|
|
4095
|
-
}
|
|
4096
|
-
const j = i > escEnd + 1 ? i - 2 : escStart - 1;
|
|
4097
|
-
if (escapedFolds[j])
|
|
4098
|
-
return text;
|
|
4099
|
-
folds.push(j);
|
|
4100
|
-
escapedFolds[j] = true;
|
|
4101
|
-
end = j + endStep;
|
|
4102
|
-
split = void 0;
|
|
4103
|
-
} else {
|
|
4104
|
-
overflow = true;
|
|
4105
|
-
}
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
prev = ch;
|
|
4109
|
-
}
|
|
4110
|
-
if (overflow && onOverflow)
|
|
4111
|
-
onOverflow();
|
|
4112
|
-
if (folds.length === 0)
|
|
4113
|
-
return text;
|
|
4114
|
-
if (onFold)
|
|
4115
|
-
onFold();
|
|
4116
|
-
let res = text.slice(0, folds[0]);
|
|
4117
|
-
for (let i2 = 0; i2 < folds.length; ++i2) {
|
|
4118
|
-
const fold = folds[i2];
|
|
4119
|
-
const end2 = folds[i2 + 1] || text.length;
|
|
4120
|
-
if (fold === 0)
|
|
4121
|
-
res = `
|
|
4122
|
-
${indent}${text.slice(0, end2)}`;
|
|
4123
|
-
else {
|
|
4124
|
-
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
4125
|
-
res += `${text[fold]}\\`;
|
|
4126
|
-
res += `
|
|
4127
|
-
${indent}${text.slice(fold + 1, end2)}`;
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
return res;
|
|
4131
|
-
}
|
|
4132
|
-
function consumeMoreIndentedLines(text, i, indent) {
|
|
4133
|
-
let end = i;
|
|
4134
|
-
let start = i + 1;
|
|
4135
|
-
let ch = text[start];
|
|
4136
|
-
while (ch === " " || ch === " ") {
|
|
4137
|
-
if (i < start + indent) {
|
|
4138
|
-
ch = text[++i];
|
|
4139
|
-
} else {
|
|
4140
|
-
do {
|
|
4141
|
-
ch = text[++i];
|
|
4142
|
-
} while (ch && ch !== "\n");
|
|
4143
|
-
end = i;
|
|
4144
|
-
start = i + 1;
|
|
4145
|
-
ch = text[start];
|
|
4146
|
-
}
|
|
4147
|
-
}
|
|
4148
|
-
return end;
|
|
4149
|
-
}
|
|
4150
|
-
|
|
4151
|
-
// ../../node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
4152
|
-
var getFoldOptions = (ctx, isBlock) => ({
|
|
4153
|
-
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
4154
|
-
lineWidth: ctx.options.lineWidth,
|
|
4155
|
-
minContentWidth: ctx.options.minContentWidth
|
|
4156
|
-
});
|
|
4157
|
-
var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str);
|
|
4158
|
-
function lineLengthOverLimit(str, lineWidth, indentLength) {
|
|
4159
|
-
if (!lineWidth || lineWidth < 0)
|
|
4160
|
-
return false;
|
|
4161
|
-
const limit = lineWidth - indentLength;
|
|
4162
|
-
const strLen = str.length;
|
|
4163
|
-
if (strLen <= limit)
|
|
4164
|
-
return false;
|
|
4165
|
-
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
4166
|
-
if (str[i] === "\n") {
|
|
4167
|
-
if (i - start > limit)
|
|
4168
|
-
return true;
|
|
4169
|
-
start = i + 1;
|
|
4170
|
-
if (strLen - start <= limit)
|
|
4171
|
-
return false;
|
|
4172
|
-
}
|
|
4173
|
-
}
|
|
4174
|
-
return true;
|
|
4175
|
-
}
|
|
4176
|
-
function doubleQuotedString(value, ctx) {
|
|
4177
|
-
const json = JSON.stringify(value);
|
|
4178
|
-
if (ctx.options.doubleQuotedAsJSON)
|
|
4179
|
-
return json;
|
|
4180
|
-
const { implicitKey } = ctx;
|
|
4181
|
-
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
4182
|
-
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
4183
|
-
let str = "";
|
|
4184
|
-
let start = 0;
|
|
4185
|
-
for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
|
|
4186
|
-
if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
4187
|
-
str += json.slice(start, i) + "\\ ";
|
|
4188
|
-
i += 1;
|
|
4189
|
-
start = i;
|
|
4190
|
-
ch = "\\";
|
|
4191
|
-
}
|
|
4192
|
-
if (ch === "\\")
|
|
4193
|
-
switch (json[i + 1]) {
|
|
4194
|
-
case "u":
|
|
4195
|
-
{
|
|
4196
|
-
str += json.slice(start, i);
|
|
4197
|
-
const code = json.substr(i + 2, 4);
|
|
4198
|
-
switch (code) {
|
|
4199
|
-
case "0000":
|
|
4200
|
-
str += "\\0";
|
|
4201
|
-
break;
|
|
4202
|
-
case "0007":
|
|
4203
|
-
str += "\\a";
|
|
4204
|
-
break;
|
|
4205
|
-
case "000b":
|
|
4206
|
-
str += "\\v";
|
|
4207
|
-
break;
|
|
4208
|
-
case "001b":
|
|
4209
|
-
str += "\\e";
|
|
4210
|
-
break;
|
|
4211
|
-
case "0085":
|
|
4212
|
-
str += "\\N";
|
|
4213
|
-
break;
|
|
4214
|
-
case "00a0":
|
|
4215
|
-
str += "\\_";
|
|
4216
|
-
break;
|
|
4217
|
-
case "2028":
|
|
4218
|
-
str += "\\L";
|
|
4219
|
-
break;
|
|
4220
|
-
case "2029":
|
|
4221
|
-
str += "\\P";
|
|
4222
|
-
break;
|
|
4223
|
-
default:
|
|
4224
|
-
if (code.substr(0, 2) === "00")
|
|
4225
|
-
str += "\\x" + code.substr(2);
|
|
4226
|
-
else
|
|
4227
|
-
str += json.substr(i, 6);
|
|
4228
|
-
}
|
|
4229
|
-
i += 5;
|
|
4230
|
-
start = i + 1;
|
|
4231
|
-
}
|
|
4232
|
-
break;
|
|
4233
|
-
case "n":
|
|
4234
|
-
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
4235
|
-
i += 1;
|
|
4236
|
-
} else {
|
|
4237
|
-
str += json.slice(start, i) + "\n\n";
|
|
4238
|
-
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
4239
|
-
str += "\n";
|
|
4240
|
-
i += 2;
|
|
4241
|
-
}
|
|
4242
|
-
str += indent;
|
|
4243
|
-
if (json[i + 2] === " ")
|
|
4244
|
-
str += "\\";
|
|
4245
|
-
i += 1;
|
|
4246
|
-
start = i + 1;
|
|
4247
|
-
}
|
|
4248
|
-
break;
|
|
4249
|
-
default:
|
|
4250
|
-
i += 1;
|
|
4251
|
-
}
|
|
4252
|
-
}
|
|
4253
|
-
str = start ? str + json.slice(start) : json;
|
|
4254
|
-
return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
4255
|
-
}
|
|
4256
|
-
function singleQuotedString(value, ctx) {
|
|
4257
|
-
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
4258
|
-
return doubleQuotedString(value, ctx);
|
|
4259
|
-
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
4260
|
-
const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
4261
|
-
${indent}`) + "'";
|
|
4262
|
-
return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
4263
|
-
}
|
|
4264
|
-
function quotedString(value, ctx) {
|
|
4265
|
-
const { singleQuote } = ctx.options;
|
|
4266
|
-
let qs;
|
|
4267
|
-
if (singleQuote === false)
|
|
4268
|
-
qs = doubleQuotedString;
|
|
4269
|
-
else {
|
|
4270
|
-
const hasDouble = value.includes('"');
|
|
4271
|
-
const hasSingle = value.includes("'");
|
|
4272
|
-
if (hasDouble && !hasSingle)
|
|
4273
|
-
qs = singleQuotedString;
|
|
4274
|
-
else if (hasSingle && !hasDouble)
|
|
4275
|
-
qs = doubleQuotedString;
|
|
4276
|
-
else
|
|
4277
|
-
qs = singleQuote ? singleQuotedString : doubleQuotedString;
|
|
4278
|
-
}
|
|
4279
|
-
return qs(value, ctx);
|
|
4280
|
-
}
|
|
4281
|
-
var blockEndNewlines;
|
|
4282
|
-
try {
|
|
4283
|
-
blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
4284
|
-
} catch {
|
|
4285
|
-
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
4286
|
-
}
|
|
4287
|
-
function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
4288
|
-
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
4289
|
-
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
4290
|
-
return quotedString(value, ctx);
|
|
4291
|
-
}
|
|
4292
|
-
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
4293
|
-
const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
|
|
4294
|
-
if (!value)
|
|
4295
|
-
return literal ? "|\n" : ">\n";
|
|
4296
|
-
let chomp;
|
|
4297
|
-
let endStart;
|
|
4298
|
-
for (endStart = value.length; endStart > 0; --endStart) {
|
|
4299
|
-
const ch = value[endStart - 1];
|
|
4300
|
-
if (ch !== "\n" && ch !== " " && ch !== " ")
|
|
4301
|
-
break;
|
|
4302
|
-
}
|
|
4303
|
-
let end = value.substring(endStart);
|
|
4304
|
-
const endNlPos = end.indexOf("\n");
|
|
4305
|
-
if (endNlPos === -1) {
|
|
4306
|
-
chomp = "-";
|
|
4307
|
-
} else if (value === end || endNlPos !== end.length - 1) {
|
|
4308
|
-
chomp = "+";
|
|
4309
|
-
if (onChompKeep)
|
|
4310
|
-
onChompKeep();
|
|
4311
|
-
} else {
|
|
4312
|
-
chomp = "";
|
|
4313
|
-
}
|
|
4314
|
-
if (end) {
|
|
4315
|
-
value = value.slice(0, -end.length);
|
|
4316
|
-
if (end[end.length - 1] === "\n")
|
|
4317
|
-
end = end.slice(0, -1);
|
|
4318
|
-
end = end.replace(blockEndNewlines, `$&${indent}`);
|
|
4319
|
-
}
|
|
4320
|
-
let startWithSpace = false;
|
|
4321
|
-
let startEnd;
|
|
4322
|
-
let startNlPos = -1;
|
|
4323
|
-
for (startEnd = 0; startEnd < value.length; ++startEnd) {
|
|
4324
|
-
const ch = value[startEnd];
|
|
4325
|
-
if (ch === " ")
|
|
4326
|
-
startWithSpace = true;
|
|
4327
|
-
else if (ch === "\n")
|
|
4328
|
-
startNlPos = startEnd;
|
|
4329
|
-
else
|
|
4330
|
-
break;
|
|
4331
|
-
}
|
|
4332
|
-
let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);
|
|
4333
|
-
if (start) {
|
|
4334
|
-
value = value.substring(start.length);
|
|
4335
|
-
start = start.replace(/\n+/g, `$&${indent}`);
|
|
4336
|
-
}
|
|
4337
|
-
const indentSize = indent ? "2" : "1";
|
|
4338
|
-
let header = (startWithSpace ? indentSize : "") + chomp;
|
|
4339
|
-
if (comment) {
|
|
4340
|
-
header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
|
|
4341
|
-
if (onComment)
|
|
4342
|
-
onComment();
|
|
4343
|
-
}
|
|
4344
|
-
if (!literal) {
|
|
4345
|
-
const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
|
|
4346
|
-
let literalFallback = false;
|
|
4347
|
-
const foldOptions = getFoldOptions(ctx, true);
|
|
4348
|
-
if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) {
|
|
4349
|
-
foldOptions.onOverflow = () => {
|
|
4350
|
-
literalFallback = true;
|
|
4351
|
-
};
|
|
4352
|
-
}
|
|
4353
|
-
const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);
|
|
4354
|
-
if (!literalFallback)
|
|
4355
|
-
return `>${header}
|
|
4356
|
-
${indent}${body}`;
|
|
4357
|
-
}
|
|
4358
|
-
value = value.replace(/\n+/g, `$&${indent}`);
|
|
4359
|
-
return `|${header}
|
|
4360
|
-
${indent}${start}${value}${end}`;
|
|
4361
|
-
}
|
|
4362
|
-
function plainString(item, ctx, onComment, onChompKeep) {
|
|
4363
|
-
const { type, value } = item;
|
|
4364
|
-
const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
|
|
4365
|
-
if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
|
|
4366
|
-
return quotedString(value, ctx);
|
|
4367
|
-
}
|
|
4368
|
-
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
4369
|
-
return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
4370
|
-
}
|
|
4371
|
-
if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) {
|
|
4372
|
-
return blockString(item, ctx, onComment, onChompKeep);
|
|
4373
|
-
}
|
|
4374
|
-
if (containsDocumentMarker(value)) {
|
|
4375
|
-
if (indent === "") {
|
|
4376
|
-
ctx.forceBlockIndent = true;
|
|
4377
|
-
return blockString(item, ctx, onComment, onChompKeep);
|
|
4378
|
-
} else if (implicitKey && indent === indentStep) {
|
|
4379
|
-
return quotedString(value, ctx);
|
|
4380
|
-
}
|
|
4381
|
-
}
|
|
4382
|
-
const str = value.replace(/\n+/g, `$&
|
|
4383
|
-
${indent}`);
|
|
4384
|
-
if (actualString) {
|
|
4385
|
-
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str);
|
|
4386
|
-
const { compat, tags } = ctx.doc.schema;
|
|
4387
|
-
if (tags.some(test) || compat?.some(test))
|
|
4388
|
-
return quotedString(value, ctx);
|
|
4389
|
-
}
|
|
4390
|
-
return implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
4391
|
-
}
|
|
4392
|
-
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
4393
|
-
const { implicitKey, inFlow } = ctx;
|
|
4394
|
-
const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
|
|
4395
|
-
let { type } = item;
|
|
4396
|
-
if (type !== Scalar.QUOTE_DOUBLE) {
|
|
4397
|
-
if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
|
|
4398
|
-
type = Scalar.QUOTE_DOUBLE;
|
|
4399
|
-
}
|
|
4400
|
-
const _stringify = (_type) => {
|
|
4401
|
-
switch (_type) {
|
|
4402
|
-
case Scalar.BLOCK_FOLDED:
|
|
4403
|
-
case Scalar.BLOCK_LITERAL:
|
|
4404
|
-
return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
|
|
4405
|
-
case Scalar.QUOTE_DOUBLE:
|
|
4406
|
-
return doubleQuotedString(ss.value, ctx);
|
|
4407
|
-
case Scalar.QUOTE_SINGLE:
|
|
4408
|
-
return singleQuotedString(ss.value, ctx);
|
|
4409
|
-
case Scalar.PLAIN:
|
|
4410
|
-
return plainString(ss, ctx, onComment, onChompKeep);
|
|
4411
|
-
default:
|
|
4412
|
-
return null;
|
|
4413
|
-
}
|
|
4414
|
-
};
|
|
4415
|
-
let res = _stringify(type);
|
|
4416
|
-
if (res === null) {
|
|
4417
|
-
const { defaultKeyType, defaultStringType } = ctx.options;
|
|
4418
|
-
const t = implicitKey && defaultKeyType || defaultStringType;
|
|
4419
|
-
res = _stringify(t);
|
|
4420
|
-
if (res === null)
|
|
4421
|
-
throw new Error(`Unsupported default string type ${t}`);
|
|
4422
|
-
}
|
|
4423
|
-
return res;
|
|
4424
|
-
}
|
|
4425
|
-
|
|
4426
|
-
// ../../node_modules/yaml/browser/dist/stringify/stringify.js
|
|
4427
|
-
function createStringifyContext(doc, options) {
|
|
4428
|
-
const opt = Object.assign({
|
|
4429
|
-
blockQuote: true,
|
|
4430
|
-
commentString: stringifyComment,
|
|
4431
|
-
defaultKeyType: null,
|
|
4432
|
-
defaultStringType: "PLAIN",
|
|
4433
|
-
directives: null,
|
|
4434
|
-
doubleQuotedAsJSON: false,
|
|
4435
|
-
doubleQuotedMinMultiLineLength: 40,
|
|
4436
|
-
falseStr: "false",
|
|
4437
|
-
flowCollectionPadding: true,
|
|
4438
|
-
indentSeq: true,
|
|
4439
|
-
lineWidth: 80,
|
|
4440
|
-
minContentWidth: 20,
|
|
4441
|
-
nullStr: "null",
|
|
4442
|
-
simpleKeys: false,
|
|
4443
|
-
singleQuote: null,
|
|
4444
|
-
trailingComma: false,
|
|
4445
|
-
trueStr: "true",
|
|
4446
|
-
verifyAliasOrder: true
|
|
4447
|
-
}, doc.schema.toStringOptions, options);
|
|
4448
|
-
let inFlow;
|
|
4449
|
-
switch (opt.collectionStyle) {
|
|
4450
|
-
case "block":
|
|
4451
|
-
inFlow = false;
|
|
4452
|
-
break;
|
|
4453
|
-
case "flow":
|
|
4454
|
-
inFlow = true;
|
|
4455
|
-
break;
|
|
4456
|
-
default:
|
|
4457
|
-
inFlow = null;
|
|
4458
|
-
}
|
|
4459
|
-
return {
|
|
4460
|
-
anchors: /* @__PURE__ */ new Set(),
|
|
4461
|
-
doc,
|
|
4462
|
-
flowCollectionPadding: opt.flowCollectionPadding ? " " : "",
|
|
4463
|
-
indent: "",
|
|
4464
|
-
indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ",
|
|
4465
|
-
inFlow,
|
|
4466
|
-
options: opt
|
|
4467
|
-
};
|
|
4468
|
-
}
|
|
4469
|
-
function getTagObject(tags, item) {
|
|
4470
|
-
if (item.tag) {
|
|
4471
|
-
const match = tags.filter((t) => t.tag === item.tag);
|
|
4472
|
-
if (match.length > 0)
|
|
4473
|
-
return match.find((t) => t.format === item.format) ?? match[0];
|
|
4474
|
-
}
|
|
4475
|
-
let tagObj = void 0;
|
|
4476
|
-
let obj;
|
|
4477
|
-
if (isScalar(item)) {
|
|
4478
|
-
obj = item.value;
|
|
4479
|
-
let match = tags.filter((t) => t.identify?.(obj));
|
|
4480
|
-
if (match.length > 1) {
|
|
4481
|
-
const testMatch = match.filter((t) => t.test);
|
|
4482
|
-
if (testMatch.length > 0)
|
|
4483
|
-
match = testMatch;
|
|
4484
|
-
}
|
|
4485
|
-
tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
|
|
4486
|
-
} else {
|
|
4487
|
-
obj = item;
|
|
4488
|
-
tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
|
|
4489
|
-
}
|
|
4490
|
-
if (!tagObj) {
|
|
4491
|
-
const name2 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
|
|
4492
|
-
throw new Error(`Tag not resolved for ${name2} value`);
|
|
4493
|
-
}
|
|
4494
|
-
return tagObj;
|
|
4495
|
-
}
|
|
4496
|
-
function stringifyProps(node, tagObj, { anchors, doc }) {
|
|
4497
|
-
if (!doc.directives)
|
|
4498
|
-
return "";
|
|
4499
|
-
const props = [];
|
|
4500
|
-
const anchor = (isScalar(node) || isCollection(node)) && node.anchor;
|
|
4501
|
-
if (anchor && anchorIsValid(anchor)) {
|
|
4502
|
-
anchors.add(anchor);
|
|
4503
|
-
props.push(`&${anchor}`);
|
|
4504
|
-
}
|
|
4505
|
-
const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
4506
|
-
if (tag)
|
|
4507
|
-
props.push(doc.directives.tagString(tag));
|
|
4508
|
-
return props.join(" ");
|
|
4509
|
-
}
|
|
4510
|
-
function stringify(item, ctx, onComment, onChompKeep) {
|
|
4511
|
-
if (isPair(item))
|
|
4512
|
-
return item.toString(ctx, onComment, onChompKeep);
|
|
4513
|
-
if (isAlias(item)) {
|
|
4514
|
-
if (ctx.doc.directives)
|
|
4515
|
-
return item.toString(ctx);
|
|
4516
|
-
if (ctx.resolvedAliases?.has(item)) {
|
|
4517
|
-
throw new TypeError(`Cannot stringify circular structure without alias nodes`);
|
|
4518
|
-
} else {
|
|
4519
|
-
if (ctx.resolvedAliases)
|
|
4520
|
-
ctx.resolvedAliases.add(item);
|
|
4521
|
-
else
|
|
4522
|
-
ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);
|
|
4523
|
-
item = item.resolve(ctx.doc);
|
|
4524
|
-
}
|
|
4525
|
-
}
|
|
4526
|
-
let tagObj = void 0;
|
|
4527
|
-
const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
4528
|
-
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
4529
|
-
const props = stringifyProps(node, tagObj, ctx);
|
|
4530
|
-
if (props.length > 0)
|
|
4531
|
-
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
4532
|
-
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
4533
|
-
if (!props)
|
|
4534
|
-
return str;
|
|
4535
|
-
return isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
|
|
4536
|
-
${ctx.indent}${str}`;
|
|
4537
|
-
}
|
|
4538
|
-
|
|
4539
|
-
// ../../node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
4540
|
-
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
4541
|
-
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
4542
|
-
let keyComment = isNode(key) && key.comment || null;
|
|
4543
|
-
if (simpleKeys) {
|
|
4544
|
-
if (keyComment) {
|
|
4545
|
-
throw new Error("With simple keys, key nodes cannot have comments");
|
|
4546
|
-
}
|
|
4547
|
-
if (isCollection(key) || !isNode(key) && typeof key === "object") {
|
|
4548
|
-
const msg = "With simple keys, collection cannot be used as a key value";
|
|
4549
|
-
throw new Error(msg);
|
|
4550
|
-
}
|
|
4551
|
-
}
|
|
4552
|
-
let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object"));
|
|
4553
|
-
ctx = Object.assign({}, ctx, {
|
|
4554
|
-
allNullValues: false,
|
|
4555
|
-
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
4556
|
-
indent: indent + indentStep
|
|
4557
|
-
});
|
|
4558
|
-
let keyCommentDone = false;
|
|
4559
|
-
let chompKeep = false;
|
|
4560
|
-
let str = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
4561
|
-
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
4562
|
-
if (simpleKeys)
|
|
4563
|
-
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
4564
|
-
explicitKey = true;
|
|
4565
|
-
}
|
|
4566
|
-
if (ctx.inFlow) {
|
|
4567
|
-
if (allNullValues || value == null) {
|
|
4568
|
-
if (keyCommentDone && onComment)
|
|
4569
|
-
onComment();
|
|
4570
|
-
return str === "" ? "?" : explicitKey ? `? ${str}` : str;
|
|
4571
|
-
}
|
|
4572
|
-
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
4573
|
-
str = `? ${str}`;
|
|
4574
|
-
if (keyComment && !keyCommentDone) {
|
|
4575
|
-
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
4576
|
-
} else if (chompKeep && onChompKeep)
|
|
4577
|
-
onChompKeep();
|
|
4578
|
-
return str;
|
|
4579
|
-
}
|
|
4580
|
-
if (keyCommentDone)
|
|
4581
|
-
keyComment = null;
|
|
4582
|
-
if (explicitKey) {
|
|
4583
|
-
if (keyComment)
|
|
4584
|
-
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
4585
|
-
str = `? ${str}
|
|
4586
|
-
${indent}:`;
|
|
4587
|
-
} else {
|
|
4588
|
-
str = `${str}:`;
|
|
4589
|
-
if (keyComment)
|
|
4590
|
-
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
4591
|
-
}
|
|
4592
|
-
let vsb, vcb, valueComment;
|
|
4593
|
-
if (isNode(value)) {
|
|
4594
|
-
vsb = !!value.spaceBefore;
|
|
4595
|
-
vcb = value.commentBefore;
|
|
4596
|
-
valueComment = value.comment;
|
|
4597
|
-
} else {
|
|
4598
|
-
vsb = false;
|
|
4599
|
-
vcb = null;
|
|
4600
|
-
valueComment = null;
|
|
4601
|
-
if (value && typeof value === "object")
|
|
4602
|
-
value = doc.createNode(value);
|
|
4603
|
-
}
|
|
4604
|
-
ctx.implicitKey = false;
|
|
4605
|
-
if (!explicitKey && !keyComment && isScalar(value))
|
|
4606
|
-
ctx.indentAtStart = str.length + 1;
|
|
4607
|
-
chompKeep = false;
|
|
4608
|
-
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
4609
|
-
ctx.indent = ctx.indent.substring(2);
|
|
4610
|
-
}
|
|
4611
|
-
let valueCommentDone = false;
|
|
4612
|
-
const valueStr = stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
|
|
4613
|
-
let ws = " ";
|
|
4614
|
-
if (keyComment || vsb || vcb) {
|
|
4615
|
-
ws = vsb ? "\n" : "";
|
|
4616
|
-
if (vcb) {
|
|
4617
|
-
const cs = commentString(vcb);
|
|
4618
|
-
ws += `
|
|
4619
|
-
${indentComment(cs, ctx.indent)}`;
|
|
4620
|
-
}
|
|
4621
|
-
if (valueStr === "" && !ctx.inFlow) {
|
|
4622
|
-
if (ws === "\n" && valueComment)
|
|
4623
|
-
ws = "\n\n";
|
|
4624
|
-
} else {
|
|
4625
|
-
ws += `
|
|
4626
|
-
${ctx.indent}`;
|
|
4627
|
-
}
|
|
4628
|
-
} else if (!explicitKey && isCollection(value)) {
|
|
4629
|
-
const vs0 = valueStr[0];
|
|
4630
|
-
const nl0 = valueStr.indexOf("\n");
|
|
4631
|
-
const hasNewline = nl0 !== -1;
|
|
4632
|
-
const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;
|
|
4633
|
-
if (hasNewline || !flow) {
|
|
4634
|
-
let hasPropsLine = false;
|
|
4635
|
-
if (hasNewline && (vs0 === "&" || vs0 === "!")) {
|
|
4636
|
-
let sp0 = valueStr.indexOf(" ");
|
|
4637
|
-
if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") {
|
|
4638
|
-
sp0 = valueStr.indexOf(" ", sp0 + 1);
|
|
4639
|
-
}
|
|
4640
|
-
if (sp0 === -1 || nl0 < sp0)
|
|
4641
|
-
hasPropsLine = true;
|
|
4642
|
-
}
|
|
4643
|
-
if (!hasPropsLine)
|
|
4644
|
-
ws = `
|
|
4645
|
-
${ctx.indent}`;
|
|
4646
|
-
}
|
|
4647
|
-
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
4648
|
-
ws = "";
|
|
4649
|
-
}
|
|
4650
|
-
str += ws + valueStr;
|
|
4651
|
-
if (ctx.inFlow) {
|
|
4652
|
-
if (valueCommentDone && onComment)
|
|
4653
|
-
onComment();
|
|
4654
|
-
} else if (valueComment && !valueCommentDone) {
|
|
4655
|
-
str += lineComment(str, ctx.indent, commentString(valueComment));
|
|
4656
|
-
} else if (chompKeep && onChompKeep) {
|
|
4657
|
-
onChompKeep();
|
|
4658
|
-
}
|
|
4659
|
-
return str;
|
|
4660
|
-
}
|
|
4661
|
-
|
|
4662
|
-
// ../../node_modules/yaml/browser/dist/log.js
|
|
4663
|
-
function warn(logLevel, warning) {
|
|
4664
|
-
if (logLevel === "debug" || logLevel === "warn") {
|
|
4665
|
-
console.warn(warning);
|
|
4666
|
-
}
|
|
4667
|
-
}
|
|
4668
|
-
|
|
4669
|
-
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
4670
|
-
var MERGE_KEY = "<<";
|
|
4671
|
-
var merge = {
|
|
4672
|
-
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
4673
|
-
default: "key",
|
|
4674
|
-
tag: "tag:yaml.org,2002:merge",
|
|
4675
|
-
test: /^<<$/,
|
|
4676
|
-
resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {
|
|
4677
|
-
addToJSMap: addMergeToJSMap
|
|
4678
|
-
}),
|
|
4679
|
-
stringify: () => MERGE_KEY
|
|
4680
|
-
};
|
|
4681
|
-
var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
4682
|
-
function addMergeToJSMap(ctx, map2, value) {
|
|
4683
|
-
const source = resolveAliasValue(ctx, value);
|
|
4684
|
-
if (isSeq(source))
|
|
4685
|
-
for (const it of source.items)
|
|
4686
|
-
mergeValue(ctx, map2, it);
|
|
4687
|
-
else if (Array.isArray(source))
|
|
4688
|
-
for (const it of source)
|
|
4689
|
-
mergeValue(ctx, map2, it);
|
|
4690
|
-
else
|
|
4691
|
-
mergeValue(ctx, map2, source);
|
|
4692
|
-
}
|
|
4693
|
-
function mergeValue(ctx, map2, value) {
|
|
4694
|
-
const source = resolveAliasValue(ctx, value);
|
|
4695
|
-
if (!isMap(source))
|
|
4696
|
-
throw new Error("Merge sources must be maps or map aliases");
|
|
4697
|
-
const srcMap = source.toJSON(null, ctx, Map);
|
|
4698
|
-
for (const [key, value2] of srcMap) {
|
|
4699
|
-
if (map2 instanceof Map) {
|
|
4700
|
-
if (!map2.has(key))
|
|
4701
|
-
map2.set(key, value2);
|
|
4702
|
-
} else if (map2 instanceof Set) {
|
|
4703
|
-
map2.add(key);
|
|
4704
|
-
} else if (!Object.prototype.hasOwnProperty.call(map2, key)) {
|
|
4705
|
-
Object.defineProperty(map2, key, {
|
|
4706
|
-
value: value2,
|
|
4707
|
-
writable: true,
|
|
4708
|
-
enumerable: true,
|
|
4709
|
-
configurable: true
|
|
4710
|
-
});
|
|
4711
|
-
}
|
|
4712
|
-
}
|
|
4713
|
-
return map2;
|
|
4714
|
-
}
|
|
4715
|
-
function resolveAliasValue(ctx, value) {
|
|
4716
|
-
return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
4717
|
-
}
|
|
4718
|
-
|
|
4719
|
-
// ../../node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
4720
|
-
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
4721
|
-
if (isNode(key) && key.addToJSMap)
|
|
4722
|
-
key.addToJSMap(ctx, map2, value);
|
|
4723
|
-
else if (isMergeKey(ctx, key))
|
|
4724
|
-
addMergeToJSMap(ctx, map2, value);
|
|
4725
|
-
else {
|
|
4726
|
-
const jsKey = toJS(key, "", ctx);
|
|
4727
|
-
if (map2 instanceof Map) {
|
|
4728
|
-
map2.set(jsKey, toJS(value, jsKey, ctx));
|
|
4729
|
-
} else if (map2 instanceof Set) {
|
|
4730
|
-
map2.add(jsKey);
|
|
4731
|
-
} else {
|
|
4732
|
-
const stringKey = stringifyKey(key, jsKey, ctx);
|
|
4733
|
-
const jsValue = toJS(value, stringKey, ctx);
|
|
4734
|
-
if (stringKey in map2)
|
|
4735
|
-
Object.defineProperty(map2, stringKey, {
|
|
4736
|
-
value: jsValue,
|
|
4737
|
-
writable: true,
|
|
4738
|
-
enumerable: true,
|
|
4739
|
-
configurable: true
|
|
4740
|
-
});
|
|
4741
|
-
else
|
|
4742
|
-
map2[stringKey] = jsValue;
|
|
4743
|
-
}
|
|
4744
|
-
}
|
|
4745
|
-
return map2;
|
|
4746
|
-
}
|
|
4747
|
-
function stringifyKey(key, jsKey, ctx) {
|
|
4748
|
-
if (jsKey === null)
|
|
4749
|
-
return "";
|
|
4750
|
-
if (typeof jsKey !== "object")
|
|
4751
|
-
return String(jsKey);
|
|
4752
|
-
if (isNode(key) && ctx?.doc) {
|
|
4753
|
-
const strCtx = createStringifyContext(ctx.doc, {});
|
|
4754
|
-
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
4755
|
-
for (const node of ctx.anchors.keys())
|
|
4756
|
-
strCtx.anchors.add(node.anchor);
|
|
4757
|
-
strCtx.inFlow = true;
|
|
4758
|
-
strCtx.inStringifyKey = true;
|
|
4759
|
-
const strKey = key.toString(strCtx);
|
|
4760
|
-
if (!ctx.mapKeyWarned) {
|
|
4761
|
-
let jsonStr = JSON.stringify(strKey);
|
|
4762
|
-
if (jsonStr.length > 40)
|
|
4763
|
-
jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
4764
|
-
warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
|
|
4765
|
-
ctx.mapKeyWarned = true;
|
|
4766
|
-
}
|
|
4767
|
-
return strKey;
|
|
4768
|
-
}
|
|
4769
|
-
return JSON.stringify(jsKey);
|
|
4770
|
-
}
|
|
4771
|
-
|
|
4772
|
-
// ../../node_modules/yaml/browser/dist/nodes/Pair.js
|
|
4773
|
-
function createPair(key, value, ctx) {
|
|
4774
|
-
const k = createNode(key, void 0, ctx);
|
|
4775
|
-
const v = createNode(value, void 0, ctx);
|
|
4776
|
-
return new Pair(k, v);
|
|
4777
|
-
}
|
|
4778
|
-
var Pair = class _Pair {
|
|
4779
|
-
constructor(key, value = null) {
|
|
4780
|
-
Object.defineProperty(this, NODE_TYPE, { value: PAIR });
|
|
4781
|
-
this.key = key;
|
|
4782
|
-
this.value = value;
|
|
4783
|
-
}
|
|
4784
|
-
clone(schema4) {
|
|
4785
|
-
let { key, value } = this;
|
|
4786
|
-
if (isNode(key))
|
|
4787
|
-
key = key.clone(schema4);
|
|
4788
|
-
if (isNode(value))
|
|
4789
|
-
value = value.clone(schema4);
|
|
4790
|
-
return new _Pair(key, value);
|
|
4791
|
-
}
|
|
4792
|
-
toJSON(_, ctx) {
|
|
4793
|
-
const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
4794
|
-
return addPairToJSMap(ctx, pair, this);
|
|
4795
|
-
}
|
|
4796
|
-
toString(ctx, onComment, onChompKeep) {
|
|
4797
|
-
return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
|
|
4798
|
-
}
|
|
4799
|
-
};
|
|
4800
|
-
|
|
4801
|
-
// ../../node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
4802
|
-
function stringifyCollection(collection, ctx, options) {
|
|
4803
|
-
const flow = ctx.inFlow ?? collection.flow;
|
|
4804
|
-
const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
4805
|
-
return stringify4(collection, ctx, options);
|
|
4806
|
-
}
|
|
4807
|
-
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
4808
|
-
const { indent, options: { commentString } } = ctx;
|
|
4809
|
-
const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
|
|
4810
|
-
let chompKeep = false;
|
|
4811
|
-
const lines = [];
|
|
4812
|
-
for (let i = 0; i < items.length; ++i) {
|
|
4813
|
-
const item = items[i];
|
|
4814
|
-
let comment2 = null;
|
|
4815
|
-
if (isNode(item)) {
|
|
4816
|
-
if (!chompKeep && item.spaceBefore)
|
|
4817
|
-
lines.push("");
|
|
4818
|
-
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
4819
|
-
if (item.comment)
|
|
4820
|
-
comment2 = item.comment;
|
|
4821
|
-
} else if (isPair(item)) {
|
|
4822
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
4823
|
-
if (ik) {
|
|
4824
|
-
if (!chompKeep && ik.spaceBefore)
|
|
4825
|
-
lines.push("");
|
|
4826
|
-
addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
|
|
4827
|
-
}
|
|
4828
|
-
}
|
|
4829
|
-
chompKeep = false;
|
|
4830
|
-
let str2 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
4831
|
-
if (comment2)
|
|
4832
|
-
str2 += lineComment(str2, itemIndent, commentString(comment2));
|
|
4833
|
-
if (chompKeep && comment2)
|
|
4834
|
-
chompKeep = false;
|
|
4835
|
-
lines.push(blockItemPrefix + str2);
|
|
4836
|
-
}
|
|
4837
|
-
let str;
|
|
4838
|
-
if (lines.length === 0) {
|
|
4839
|
-
str = flowChars.start + flowChars.end;
|
|
4840
|
-
} else {
|
|
4841
|
-
str = lines[0];
|
|
4842
|
-
for (let i = 1; i < lines.length; ++i) {
|
|
4843
|
-
const line = lines[i];
|
|
4844
|
-
str += line ? `
|
|
4845
|
-
${indent}${line}` : "\n";
|
|
4846
|
-
}
|
|
4847
|
-
}
|
|
4848
|
-
if (comment) {
|
|
4849
|
-
str += "\n" + indentComment(commentString(comment), indent);
|
|
4850
|
-
if (onComment)
|
|
4851
|
-
onComment();
|
|
4852
|
-
} else if (chompKeep && onChompKeep)
|
|
4853
|
-
onChompKeep();
|
|
4854
|
-
return str;
|
|
4855
|
-
}
|
|
4856
|
-
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
4857
|
-
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
4858
|
-
itemIndent += indentStep;
|
|
4859
|
-
const itemCtx = Object.assign({}, ctx, {
|
|
4860
|
-
indent: itemIndent,
|
|
4861
|
-
inFlow: true,
|
|
4862
|
-
type: null
|
|
4863
|
-
});
|
|
4864
|
-
let reqNewline = false;
|
|
4865
|
-
let linesAtValue = 0;
|
|
4866
|
-
const lines = [];
|
|
4867
|
-
for (let i = 0; i < items.length; ++i) {
|
|
4868
|
-
const item = items[i];
|
|
4869
|
-
let comment = null;
|
|
4870
|
-
if (isNode(item)) {
|
|
4871
|
-
if (item.spaceBefore)
|
|
4872
|
-
lines.push("");
|
|
4873
|
-
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
4874
|
-
if (item.comment)
|
|
4875
|
-
comment = item.comment;
|
|
4876
|
-
} else if (isPair(item)) {
|
|
4877
|
-
const ik = isNode(item.key) ? item.key : null;
|
|
4878
|
-
if (ik) {
|
|
4879
|
-
if (ik.spaceBefore)
|
|
4880
|
-
lines.push("");
|
|
4881
|
-
addCommentBefore(ctx, lines, ik.commentBefore, false);
|
|
4882
|
-
if (ik.comment)
|
|
4883
|
-
reqNewline = true;
|
|
4884
|
-
}
|
|
4885
|
-
const iv = isNode(item.value) ? item.value : null;
|
|
4886
|
-
if (iv) {
|
|
4887
|
-
if (iv.comment)
|
|
4888
|
-
comment = iv.comment;
|
|
4889
|
-
if (iv.commentBefore)
|
|
4890
|
-
reqNewline = true;
|
|
4891
|
-
} else if (item.value == null && ik?.comment) {
|
|
4892
|
-
comment = ik.comment;
|
|
4893
|
-
}
|
|
4894
|
-
}
|
|
4895
|
-
if (comment)
|
|
4896
|
-
reqNewline = true;
|
|
4897
|
-
let str = stringify(item, itemCtx, () => comment = null);
|
|
4898
|
-
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
4899
|
-
if (i < items.length - 1) {
|
|
4900
|
-
str += ",";
|
|
4901
|
-
} else if (ctx.options.trailingComma) {
|
|
4902
|
-
if (ctx.options.lineWidth > 0) {
|
|
4903
|
-
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
4904
|
-
}
|
|
4905
|
-
if (reqNewline) {
|
|
4906
|
-
str += ",";
|
|
4907
|
-
}
|
|
4908
|
-
}
|
|
4909
|
-
if (comment)
|
|
4910
|
-
str += lineComment(str, itemIndent, commentString(comment));
|
|
4911
|
-
lines.push(str);
|
|
4912
|
-
linesAtValue = lines.length;
|
|
4913
|
-
}
|
|
4914
|
-
const { start, end } = flowChars;
|
|
4915
|
-
if (lines.length === 0) {
|
|
4916
|
-
return start + end;
|
|
4917
|
-
} else {
|
|
4918
|
-
if (!reqNewline) {
|
|
4919
|
-
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
|
4920
|
-
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
4921
|
-
}
|
|
4922
|
-
if (reqNewline) {
|
|
4923
|
-
let str = start;
|
|
4924
|
-
for (const line of lines)
|
|
4925
|
-
str += line ? `
|
|
4926
|
-
${indentStep}${indent}${line}` : "\n";
|
|
4927
|
-
return `${str}
|
|
4928
|
-
${indent}${end}`;
|
|
4929
|
-
} else {
|
|
4930
|
-
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
4931
|
-
}
|
|
4932
|
-
}
|
|
4933
|
-
}
|
|
4934
|
-
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
|
4935
|
-
if (comment && chompKeep)
|
|
4936
|
-
comment = comment.replace(/^\n+/, "");
|
|
4937
|
-
if (comment) {
|
|
4938
|
-
const ic = indentComment(commentString(comment), indent);
|
|
4939
|
-
lines.push(ic.trimStart());
|
|
4940
|
-
}
|
|
4941
|
-
}
|
|
4942
|
-
|
|
4943
|
-
// ../../node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
4944
|
-
function findPair(items, key) {
|
|
4945
|
-
const k = isScalar(key) ? key.value : key;
|
|
4946
|
-
for (const it of items) {
|
|
4947
|
-
if (isPair(it)) {
|
|
4948
|
-
if (it.key === key || it.key === k)
|
|
4949
|
-
return it;
|
|
4950
|
-
if (isScalar(it.key) && it.key.value === k)
|
|
4951
|
-
return it;
|
|
4952
|
-
}
|
|
4953
|
-
}
|
|
4954
|
-
return void 0;
|
|
4955
|
-
}
|
|
4956
|
-
var YAMLMap = class extends Collection {
|
|
4957
|
-
static get tagName() {
|
|
4958
|
-
return "tag:yaml.org,2002:map";
|
|
4959
|
-
}
|
|
4960
|
-
constructor(schema4) {
|
|
4961
|
-
super(MAP, schema4);
|
|
4962
|
-
this.items = [];
|
|
4963
|
-
}
|
|
4964
|
-
/**
|
|
4965
|
-
* A generic collection parsing method that can be extended
|
|
4966
|
-
* to other node classes that inherit from YAMLMap
|
|
4967
|
-
*/
|
|
4968
|
-
static from(schema4, obj, ctx) {
|
|
4969
|
-
const { keepUndefined, replacer } = ctx;
|
|
4970
|
-
const map2 = new this(schema4);
|
|
4971
|
-
const add = (key, value) => {
|
|
4972
|
-
if (typeof replacer === "function")
|
|
4973
|
-
value = replacer.call(obj, key, value);
|
|
4974
|
-
else if (Array.isArray(replacer) && !replacer.includes(key))
|
|
4975
|
-
return;
|
|
4976
|
-
if (value !== void 0 || keepUndefined)
|
|
4977
|
-
map2.items.push(createPair(key, value, ctx));
|
|
4978
|
-
};
|
|
4979
|
-
if (obj instanceof Map) {
|
|
4980
|
-
for (const [key, value] of obj)
|
|
4981
|
-
add(key, value);
|
|
4982
|
-
} else if (obj && typeof obj === "object") {
|
|
4983
|
-
for (const key of Object.keys(obj))
|
|
4984
|
-
add(key, obj[key]);
|
|
4985
|
-
}
|
|
4986
|
-
if (typeof schema4.sortMapEntries === "function") {
|
|
4987
|
-
map2.items.sort(schema4.sortMapEntries);
|
|
4988
|
-
}
|
|
4989
|
-
return map2;
|
|
4990
|
-
}
|
|
4991
|
-
/**
|
|
4992
|
-
* Adds a value to the collection.
|
|
4993
|
-
*
|
|
4994
|
-
* @param overwrite - If not set `true`, using a key that is already in the
|
|
4995
|
-
* collection will throw. Otherwise, overwrites the previous value.
|
|
4996
|
-
*/
|
|
4997
|
-
add(pair, overwrite) {
|
|
4998
|
-
let _pair;
|
|
4999
|
-
if (isPair(pair))
|
|
5000
|
-
_pair = pair;
|
|
5001
|
-
else if (!pair || typeof pair !== "object" || !("key" in pair)) {
|
|
5002
|
-
_pair = new Pair(pair, pair?.value);
|
|
5003
|
-
} else
|
|
5004
|
-
_pair = new Pair(pair.key, pair.value);
|
|
5005
|
-
const prev = findPair(this.items, _pair.key);
|
|
5006
|
-
const sortEntries = this.schema?.sortMapEntries;
|
|
5007
|
-
if (prev) {
|
|
5008
|
-
if (!overwrite)
|
|
5009
|
-
throw new Error(`Key ${_pair.key} already set`);
|
|
5010
|
-
if (isScalar(prev.value) && isScalarValue(_pair.value))
|
|
5011
|
-
prev.value.value = _pair.value;
|
|
5012
|
-
else
|
|
5013
|
-
prev.value = _pair.value;
|
|
5014
|
-
} else if (sortEntries) {
|
|
5015
|
-
const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);
|
|
5016
|
-
if (i === -1)
|
|
5017
|
-
this.items.push(_pair);
|
|
5018
|
-
else
|
|
5019
|
-
this.items.splice(i, 0, _pair);
|
|
5020
|
-
} else {
|
|
5021
|
-
this.items.push(_pair);
|
|
5022
|
-
}
|
|
5023
|
-
}
|
|
5024
|
-
delete(key) {
|
|
5025
|
-
const it = findPair(this.items, key);
|
|
5026
|
-
if (!it)
|
|
5027
|
-
return false;
|
|
5028
|
-
const del = this.items.splice(this.items.indexOf(it), 1);
|
|
5029
|
-
return del.length > 0;
|
|
5030
|
-
}
|
|
5031
|
-
get(key, keepScalar) {
|
|
5032
|
-
const it = findPair(this.items, key);
|
|
5033
|
-
const node = it?.value;
|
|
5034
|
-
return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0;
|
|
5035
|
-
}
|
|
5036
|
-
has(key) {
|
|
5037
|
-
return !!findPair(this.items, key);
|
|
5038
|
-
}
|
|
5039
|
-
set(key, value) {
|
|
5040
|
-
this.add(new Pair(key, value), true);
|
|
5041
|
-
}
|
|
5042
|
-
/**
|
|
5043
|
-
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
5044
|
-
* @param {Class} Type - If set, forces the returned collection type
|
|
5045
|
-
* @returns Instance of Type, Map, or Object
|
|
5046
|
-
*/
|
|
5047
|
-
toJSON(_, ctx, Type) {
|
|
5048
|
-
const map2 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
5049
|
-
if (ctx?.onCreate)
|
|
5050
|
-
ctx.onCreate(map2);
|
|
5051
|
-
for (const item of this.items)
|
|
5052
|
-
addPairToJSMap(ctx, map2, item);
|
|
5053
|
-
return map2;
|
|
5054
|
-
}
|
|
5055
|
-
toString(ctx, onComment, onChompKeep) {
|
|
5056
|
-
if (!ctx)
|
|
5057
|
-
return JSON.stringify(this);
|
|
5058
|
-
for (const item of this.items) {
|
|
5059
|
-
if (!isPair(item))
|
|
5060
|
-
throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
|
|
5061
|
-
}
|
|
5062
|
-
if (!ctx.allNullValues && this.hasAllNullValues(false))
|
|
5063
|
-
ctx = Object.assign({}, ctx, { allNullValues: true });
|
|
5064
|
-
return stringifyCollection(this, ctx, {
|
|
5065
|
-
blockItemPrefix: "",
|
|
5066
|
-
flowChars: { start: "{", end: "}" },
|
|
5067
|
-
itemIndent: ctx.indent || "",
|
|
5068
|
-
onChompKeep,
|
|
5069
|
-
onComment
|
|
5070
|
-
});
|
|
5071
|
-
}
|
|
5072
|
-
};
|
|
5073
|
-
|
|
5074
|
-
// ../../node_modules/yaml/browser/dist/schema/common/map.js
|
|
5075
|
-
var map = {
|
|
5076
|
-
collection: "map",
|
|
5077
|
-
default: true,
|
|
5078
|
-
nodeClass: YAMLMap,
|
|
5079
|
-
tag: "tag:yaml.org,2002:map",
|
|
5080
|
-
resolve(map2, onError) {
|
|
5081
|
-
if (!isMap(map2))
|
|
5082
|
-
onError("Expected a mapping for this tag");
|
|
5083
|
-
return map2;
|
|
5084
|
-
},
|
|
5085
|
-
createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
|
|
5086
|
-
};
|
|
5087
|
-
|
|
5088
|
-
// ../../node_modules/yaml/browser/dist/nodes/YAMLSeq.js
|
|
5089
|
-
var YAMLSeq = class extends Collection {
|
|
5090
|
-
static get tagName() {
|
|
5091
|
-
return "tag:yaml.org,2002:seq";
|
|
5092
|
-
}
|
|
5093
|
-
constructor(schema4) {
|
|
5094
|
-
super(SEQ, schema4);
|
|
5095
|
-
this.items = [];
|
|
5096
|
-
}
|
|
5097
|
-
add(value) {
|
|
5098
|
-
this.items.push(value);
|
|
5099
|
-
}
|
|
5100
|
-
/**
|
|
5101
|
-
* Removes a value from the collection.
|
|
5102
|
-
*
|
|
5103
|
-
* `key` must contain a representation of an integer for this to succeed.
|
|
5104
|
-
* It may be wrapped in a `Scalar`.
|
|
5105
|
-
*
|
|
5106
|
-
* @returns `true` if the item was found and removed.
|
|
5107
|
-
*/
|
|
5108
|
-
delete(key) {
|
|
5109
|
-
const idx = asItemIndex(key);
|
|
5110
|
-
if (typeof idx !== "number")
|
|
5111
|
-
return false;
|
|
5112
|
-
const del = this.items.splice(idx, 1);
|
|
5113
|
-
return del.length > 0;
|
|
5114
|
-
}
|
|
5115
|
-
get(key, keepScalar) {
|
|
5116
|
-
const idx = asItemIndex(key);
|
|
5117
|
-
if (typeof idx !== "number")
|
|
5118
|
-
return void 0;
|
|
5119
|
-
const it = this.items[idx];
|
|
5120
|
-
return !keepScalar && isScalar(it) ? it.value : it;
|
|
5121
|
-
}
|
|
5122
|
-
/**
|
|
5123
|
-
* Checks if the collection includes a value with the key `key`.
|
|
5124
|
-
*
|
|
5125
|
-
* `key` must contain a representation of an integer for this to succeed.
|
|
5126
|
-
* It may be wrapped in a `Scalar`.
|
|
5127
|
-
*/
|
|
5128
|
-
has(key) {
|
|
5129
|
-
const idx = asItemIndex(key);
|
|
5130
|
-
return typeof idx === "number" && idx < this.items.length;
|
|
5131
|
-
}
|
|
5132
|
-
/**
|
|
5133
|
-
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
5134
|
-
* boolean to add/remove the item from the set.
|
|
5135
|
-
*
|
|
5136
|
-
* If `key` does not contain a representation of an integer, this will throw.
|
|
5137
|
-
* It may be wrapped in a `Scalar`.
|
|
5138
|
-
*/
|
|
5139
|
-
set(key, value) {
|
|
5140
|
-
const idx = asItemIndex(key);
|
|
5141
|
-
if (typeof idx !== "number")
|
|
5142
|
-
throw new Error(`Expected a valid index, not ${key}.`);
|
|
5143
|
-
const prev = this.items[idx];
|
|
5144
|
-
if (isScalar(prev) && isScalarValue(value))
|
|
5145
|
-
prev.value = value;
|
|
5146
|
-
else
|
|
5147
|
-
this.items[idx] = value;
|
|
5148
|
-
}
|
|
5149
|
-
toJSON(_, ctx) {
|
|
5150
|
-
const seq2 = [];
|
|
5151
|
-
if (ctx?.onCreate)
|
|
5152
|
-
ctx.onCreate(seq2);
|
|
5153
|
-
let i = 0;
|
|
5154
|
-
for (const item of this.items)
|
|
5155
|
-
seq2.push(toJS(item, String(i++), ctx));
|
|
5156
|
-
return seq2;
|
|
5157
|
-
}
|
|
5158
|
-
toString(ctx, onComment, onChompKeep) {
|
|
5159
|
-
if (!ctx)
|
|
5160
|
-
return JSON.stringify(this);
|
|
5161
|
-
return stringifyCollection(this, ctx, {
|
|
5162
|
-
blockItemPrefix: "- ",
|
|
5163
|
-
flowChars: { start: "[", end: "]" },
|
|
5164
|
-
itemIndent: (ctx.indent || "") + " ",
|
|
5165
|
-
onChompKeep,
|
|
5166
|
-
onComment
|
|
5167
|
-
});
|
|
5168
|
-
}
|
|
5169
|
-
static from(schema4, obj, ctx) {
|
|
5170
|
-
const { replacer } = ctx;
|
|
5171
|
-
const seq2 = new this(schema4);
|
|
5172
|
-
if (obj && Symbol.iterator in Object(obj)) {
|
|
5173
|
-
let i = 0;
|
|
5174
|
-
for (let it of obj) {
|
|
5175
|
-
if (typeof replacer === "function") {
|
|
5176
|
-
const key = obj instanceof Set ? it : String(i++);
|
|
5177
|
-
it = replacer.call(obj, key, it);
|
|
5178
|
-
}
|
|
5179
|
-
seq2.items.push(createNode(it, void 0, ctx));
|
|
5180
|
-
}
|
|
5181
|
-
}
|
|
5182
|
-
return seq2;
|
|
5183
|
-
}
|
|
5184
|
-
};
|
|
5185
|
-
function asItemIndex(key) {
|
|
5186
|
-
let idx = isScalar(key) ? key.value : key;
|
|
5187
|
-
if (idx && typeof idx === "string")
|
|
5188
|
-
idx = Number(idx);
|
|
5189
|
-
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
5190
|
-
}
|
|
5191
|
-
|
|
5192
|
-
// ../../node_modules/yaml/browser/dist/schema/common/seq.js
|
|
5193
|
-
var seq = {
|
|
5194
|
-
collection: "seq",
|
|
5195
|
-
default: true,
|
|
5196
|
-
nodeClass: YAMLSeq,
|
|
5197
|
-
tag: "tag:yaml.org,2002:seq",
|
|
5198
|
-
resolve(seq2, onError) {
|
|
5199
|
-
if (!isSeq(seq2))
|
|
5200
|
-
onError("Expected a sequence for this tag");
|
|
5201
|
-
return seq2;
|
|
5202
|
-
},
|
|
5203
|
-
createNode: (schema4, obj, ctx) => YAMLSeq.from(schema4, obj, ctx)
|
|
5204
|
-
};
|
|
5205
|
-
|
|
5206
|
-
// ../../node_modules/yaml/browser/dist/schema/json/schema.js
|
|
5207
|
-
function intIdentify(value) {
|
|
5208
|
-
return typeof value === "bigint" || Number.isInteger(value);
|
|
5209
|
-
}
|
|
5210
|
-
var stringifyJSON = ({ value }) => JSON.stringify(value);
|
|
5211
|
-
var jsonScalars = [
|
|
5212
|
-
{
|
|
5213
|
-
identify: (value) => typeof value === "string",
|
|
5214
|
-
default: true,
|
|
5215
|
-
tag: "tag:yaml.org,2002:str",
|
|
5216
|
-
resolve: (str) => str,
|
|
5217
|
-
stringify: stringifyJSON
|
|
5218
|
-
},
|
|
5219
|
-
{
|
|
5220
|
-
identify: (value) => value == null,
|
|
5221
|
-
createNode: () => new Scalar(null),
|
|
5222
|
-
default: true,
|
|
5223
|
-
tag: "tag:yaml.org,2002:null",
|
|
5224
|
-
test: /^null$/,
|
|
5225
|
-
resolve: () => null,
|
|
5226
|
-
stringify: stringifyJSON
|
|
5227
|
-
},
|
|
5228
|
-
{
|
|
5229
|
-
identify: (value) => typeof value === "boolean",
|
|
5230
|
-
default: true,
|
|
5231
|
-
tag: "tag:yaml.org,2002:bool",
|
|
5232
|
-
test: /^true$|^false$/,
|
|
5233
|
-
resolve: (str) => str === "true",
|
|
5234
|
-
stringify: stringifyJSON
|
|
5235
|
-
},
|
|
5236
|
-
{
|
|
5237
|
-
identify: intIdentify,
|
|
5238
|
-
default: true,
|
|
5239
|
-
tag: "tag:yaml.org,2002:int",
|
|
5240
|
-
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
5241
|
-
resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),
|
|
5242
|
-
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
5243
|
-
},
|
|
5244
|
-
{
|
|
5245
|
-
identify: (value) => typeof value === "number",
|
|
5246
|
-
default: true,
|
|
5247
|
-
tag: "tag:yaml.org,2002:float",
|
|
5248
|
-
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
5249
|
-
resolve: (str) => parseFloat(str),
|
|
5250
|
-
stringify: stringifyJSON
|
|
5251
|
-
}
|
|
5252
|
-
];
|
|
5253
|
-
var jsonError = {
|
|
5254
|
-
default: true,
|
|
5255
|
-
tag: "",
|
|
5256
|
-
test: /^/,
|
|
5257
|
-
resolve(str, onError) {
|
|
5258
|
-
onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
|
|
5259
|
-
return str;
|
|
5260
|
-
}
|
|
5261
|
-
};
|
|
5262
|
-
var schema = [map, seq].concat(jsonScalars, jsonError);
|
|
5263
|
-
|
|
5264
|
-
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
5265
|
-
function createPairs(schema4, iterable, ctx) {
|
|
5266
|
-
const { replacer } = ctx;
|
|
5267
|
-
const pairs2 = new YAMLSeq(schema4);
|
|
5268
|
-
pairs2.tag = "tag:yaml.org,2002:pairs";
|
|
5269
|
-
let i = 0;
|
|
5270
|
-
if (iterable && Symbol.iterator in Object(iterable))
|
|
5271
|
-
for (let it of iterable) {
|
|
5272
|
-
if (typeof replacer === "function")
|
|
5273
|
-
it = replacer.call(iterable, String(i++), it);
|
|
5274
|
-
let key, value;
|
|
5275
|
-
if (Array.isArray(it)) {
|
|
5276
|
-
if (it.length === 2) {
|
|
5277
|
-
key = it[0];
|
|
5278
|
-
value = it[1];
|
|
5279
|
-
} else
|
|
5280
|
-
throw new TypeError(`Expected [key, value] tuple: ${it}`);
|
|
5281
|
-
} else if (it && it instanceof Object) {
|
|
5282
|
-
const keys = Object.keys(it);
|
|
5283
|
-
if (keys.length === 1) {
|
|
5284
|
-
key = keys[0];
|
|
5285
|
-
value = it[key];
|
|
5286
|
-
} else {
|
|
5287
|
-
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
5288
|
-
}
|
|
5289
|
-
} else {
|
|
5290
|
-
key = it;
|
|
5291
|
-
}
|
|
5292
|
-
pairs2.items.push(createPair(key, value, ctx));
|
|
5293
|
-
}
|
|
5294
|
-
return pairs2;
|
|
5295
|
-
}
|
|
5296
|
-
|
|
5297
|
-
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
|
|
5298
|
-
var YAMLOMap = class _YAMLOMap extends YAMLSeq {
|
|
5299
|
-
constructor() {
|
|
5300
|
-
super();
|
|
5301
|
-
this.add = YAMLMap.prototype.add.bind(this);
|
|
5302
|
-
this.delete = YAMLMap.prototype.delete.bind(this);
|
|
5303
|
-
this.get = YAMLMap.prototype.get.bind(this);
|
|
5304
|
-
this.has = YAMLMap.prototype.has.bind(this);
|
|
5305
|
-
this.set = YAMLMap.prototype.set.bind(this);
|
|
5306
|
-
this.tag = _YAMLOMap.tag;
|
|
5307
|
-
}
|
|
5308
|
-
/**
|
|
5309
|
-
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
5310
|
-
* but TypeScript won't allow widening the signature of a child method.
|
|
5311
|
-
*/
|
|
5312
|
-
toJSON(_, ctx) {
|
|
5313
|
-
if (!ctx)
|
|
5314
|
-
return super.toJSON(_);
|
|
5315
|
-
const map2 = /* @__PURE__ */ new Map();
|
|
5316
|
-
if (ctx?.onCreate)
|
|
5317
|
-
ctx.onCreate(map2);
|
|
5318
|
-
for (const pair of this.items) {
|
|
5319
|
-
let key, value;
|
|
5320
|
-
if (isPair(pair)) {
|
|
5321
|
-
key = toJS(pair.key, "", ctx);
|
|
5322
|
-
value = toJS(pair.value, key, ctx);
|
|
5323
|
-
} else {
|
|
5324
|
-
key = toJS(pair, "", ctx);
|
|
5325
|
-
}
|
|
5326
|
-
if (map2.has(key))
|
|
5327
|
-
throw new Error("Ordered maps must not include duplicate keys");
|
|
5328
|
-
map2.set(key, value);
|
|
5329
|
-
}
|
|
5330
|
-
return map2;
|
|
5331
|
-
}
|
|
5332
|
-
static from(schema4, iterable, ctx) {
|
|
5333
|
-
const pairs2 = createPairs(schema4, iterable, ctx);
|
|
5334
|
-
const omap2 = new this();
|
|
5335
|
-
omap2.items = pairs2.items;
|
|
5336
|
-
return omap2;
|
|
5337
|
-
}
|
|
5338
|
-
};
|
|
5339
|
-
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
5340
|
-
|
|
5341
|
-
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
|
|
5342
|
-
var YAMLSet = class _YAMLSet extends YAMLMap {
|
|
5343
|
-
constructor(schema4) {
|
|
5344
|
-
super(schema4);
|
|
5345
|
-
this.tag = _YAMLSet.tag;
|
|
5346
|
-
}
|
|
5347
|
-
add(key) {
|
|
5348
|
-
let pair;
|
|
5349
|
-
if (isPair(key))
|
|
5350
|
-
pair = key;
|
|
5351
|
-
else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
|
|
5352
|
-
pair = new Pair(key.key, null);
|
|
5353
|
-
else
|
|
5354
|
-
pair = new Pair(key, null);
|
|
5355
|
-
const prev = findPair(this.items, pair.key);
|
|
5356
|
-
if (!prev)
|
|
5357
|
-
this.items.push(pair);
|
|
5358
|
-
}
|
|
5359
|
-
/**
|
|
5360
|
-
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
5361
|
-
* Otherwise, returns the value of that Pair's key.
|
|
5362
|
-
*/
|
|
5363
|
-
get(key, keepPair) {
|
|
5364
|
-
const pair = findPair(this.items, key);
|
|
5365
|
-
return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
5366
|
-
}
|
|
5367
|
-
set(key, value) {
|
|
5368
|
-
if (typeof value !== "boolean")
|
|
5369
|
-
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
|
|
5370
|
-
const prev = findPair(this.items, key);
|
|
5371
|
-
if (prev && !value) {
|
|
5372
|
-
this.items.splice(this.items.indexOf(prev), 1);
|
|
5373
|
-
} else if (!prev && value) {
|
|
5374
|
-
this.items.push(new Pair(key));
|
|
5375
|
-
}
|
|
5376
|
-
}
|
|
5377
|
-
toJSON(_, ctx) {
|
|
5378
|
-
return super.toJSON(_, ctx, Set);
|
|
5379
|
-
}
|
|
5380
|
-
toString(ctx, onComment, onChompKeep) {
|
|
5381
|
-
if (!ctx)
|
|
5382
|
-
return JSON.stringify(this);
|
|
5383
|
-
if (this.hasAllNullValues(true))
|
|
5384
|
-
return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
|
|
5385
|
-
else
|
|
5386
|
-
throw new Error("Set items must all have null values");
|
|
5387
|
-
}
|
|
5388
|
-
static from(schema4, iterable, ctx) {
|
|
5389
|
-
const { replacer } = ctx;
|
|
5390
|
-
const set2 = new this(schema4);
|
|
5391
|
-
if (iterable && Symbol.iterator in Object(iterable))
|
|
5392
|
-
for (let value of iterable) {
|
|
5393
|
-
if (typeof replacer === "function")
|
|
5394
|
-
value = replacer.call(iterable, value, value);
|
|
5395
|
-
set2.items.push(createPair(value, null, ctx));
|
|
5396
|
-
}
|
|
5397
|
-
return set2;
|
|
5398
|
-
}
|
|
5399
|
-
};
|
|
5400
|
-
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
5401
|
-
|
|
5402
|
-
// ../../node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
5403
|
-
function parseSexagesimal(str, asBigInt) {
|
|
5404
|
-
const sign = str[0];
|
|
5405
|
-
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
5406
|
-
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
5407
|
-
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
5408
|
-
return sign === "-" ? num(-1) * res : res;
|
|
5409
|
-
}
|
|
5410
|
-
var timestamp = {
|
|
5411
|
-
identify: (value) => value instanceof Date,
|
|
5412
|
-
default: true,
|
|
5413
|
-
tag: "tag:yaml.org,2002:timestamp",
|
|
5414
|
-
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
|
|
5415
|
-
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
5416
|
-
// assumed to be 00:00:00Z (start of day, UTC).
|
|
5417
|
-
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
5418
|
-
resolve(str) {
|
|
5419
|
-
const match = str.match(timestamp.test);
|
|
5420
|
-
if (!match)
|
|
5421
|
-
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
5422
|
-
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
5423
|
-
const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0;
|
|
5424
|
-
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
|
|
5425
|
-
const tz = match[8];
|
|
5426
|
-
if (tz && tz !== "Z") {
|
|
5427
|
-
let d = parseSexagesimal(tz, false);
|
|
5428
|
-
if (Math.abs(d) < 30)
|
|
5429
|
-
d *= 60;
|
|
5430
|
-
date -= 6e4 * d;
|
|
5431
|
-
}
|
|
5432
|
-
return new Date(date);
|
|
5433
|
-
},
|
|
5434
|
-
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
5435
|
-
};
|
|
5436
|
-
|
|
5437
|
-
// ../../node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
5438
|
-
var BREAK2 = Symbol("break visit");
|
|
5439
|
-
var SKIP2 = Symbol("skip children");
|
|
5440
|
-
var REMOVE2 = Symbol("remove item");
|
|
5441
|
-
function visit2(cst, visitor) {
|
|
5442
|
-
if ("type" in cst && cst.type === "document")
|
|
5443
|
-
cst = { start: cst.start, value: cst.value };
|
|
5444
|
-
_visit(Object.freeze([]), cst, visitor);
|
|
5445
|
-
}
|
|
5446
|
-
visit2.BREAK = BREAK2;
|
|
5447
|
-
visit2.SKIP = SKIP2;
|
|
5448
|
-
visit2.REMOVE = REMOVE2;
|
|
5449
|
-
visit2.itemAtPath = (cst, path10) => {
|
|
5450
|
-
let item = cst;
|
|
5451
|
-
for (const [field, index] of path10) {
|
|
5452
|
-
const tok = item?.[field];
|
|
5453
|
-
if (tok && "items" in tok) {
|
|
5454
|
-
item = tok.items[index];
|
|
5455
|
-
} else
|
|
5456
|
-
return void 0;
|
|
5457
|
-
}
|
|
5458
|
-
return item;
|
|
5459
|
-
};
|
|
5460
|
-
visit2.parentCollection = (cst, path10) => {
|
|
5461
|
-
const parent = visit2.itemAtPath(cst, path10.slice(0, -1));
|
|
5462
|
-
const field = path10[path10.length - 1][0];
|
|
5463
|
-
const coll = parent?.[field];
|
|
5464
|
-
if (coll && "items" in coll)
|
|
5465
|
-
return coll;
|
|
5466
|
-
throw new Error("Parent collection not found");
|
|
5467
|
-
};
|
|
5468
|
-
function _visit(path10, item, visitor) {
|
|
5469
|
-
let ctrl = visitor(item, path10);
|
|
5470
|
-
if (typeof ctrl === "symbol")
|
|
5471
|
-
return ctrl;
|
|
5472
|
-
for (const field of ["key", "value"]) {
|
|
5473
|
-
const token = item[field];
|
|
5474
|
-
if (token && "items" in token) {
|
|
5475
|
-
for (let i = 0; i < token.items.length; ++i) {
|
|
5476
|
-
const ci = _visit(Object.freeze(path10.concat([[field, i]])), token.items[i], visitor);
|
|
5477
|
-
if (typeof ci === "number")
|
|
5478
|
-
i = ci - 1;
|
|
5479
|
-
else if (ci === BREAK2)
|
|
5480
|
-
return BREAK2;
|
|
5481
|
-
else if (ci === REMOVE2) {
|
|
5482
|
-
token.items.splice(i, 1);
|
|
5483
|
-
i -= 1;
|
|
5484
|
-
}
|
|
5485
|
-
}
|
|
5486
|
-
if (typeof ctrl === "function" && field === "key")
|
|
5487
|
-
ctrl = ctrl(item, path10);
|
|
5488
|
-
}
|
|
5489
|
-
}
|
|
5490
|
-
return typeof ctrl === "function" ? ctrl(item, path10) : ctrl;
|
|
5491
|
-
}
|
|
5492
|
-
|
|
5493
|
-
// ../../node_modules/yaml/browser/dist/parse/lexer.js
|
|
5494
|
-
var hexDigits = new Set("0123456789ABCDEFabcdef");
|
|
5495
|
-
var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
5496
|
-
var flowIndicatorChars = new Set(",[]{}");
|
|
5497
|
-
var invalidAnchorChars = new Set(" ,[]{}\n\r ");
|
|
5498
|
-
|
|
5499
3234
|
// cli/commands/nodeRepoFileReader.ts
|
|
5500
3235
|
var import_node_fs13 = require("node:fs");
|
|
5501
3236
|
|
|
@@ -6661,7 +4396,7 @@ function formatSemanticTree(nodes, opts = {}) {
|
|
|
6661
4396
|
const testIDRegex = opts.testIdLike ? globRegex(opts.testIdLike) : null;
|
|
6662
4397
|
const onlyRegex = opts.onlyGlob ? globRegex(opts.onlyGlob) : null;
|
|
6663
4398
|
const lines = [];
|
|
6664
|
-
const
|
|
4399
|
+
const visit = (node, indent) => {
|
|
6665
4400
|
const joined = [node.role, node.label, node.text, node.testID].filter((value) => typeof value === "string").join(" ");
|
|
6666
4401
|
const matches = (!filter || joined.toLowerCase().includes(filter)) && (!testIDRegex || testIDRegex.test(node.testID ?? "")) && (!onlyRegex || onlyRegex.test(joined));
|
|
6667
4402
|
if (matches) {
|
|
@@ -6685,7 +4420,7 @@ function formatSemanticTree(nodes, opts = {}) {
|
|
|
6685
4420
|
if (node.pressable) parts.push("(tap)");
|
|
6686
4421
|
lines.push(`${" ".repeat(indent + 1)}${parts.join(" ")}`);
|
|
6687
4422
|
}
|
|
6688
|
-
for (const child of node.children ?? [])
|
|
4423
|
+
for (const child of node.children ?? []) visit(child, indent + 1);
|
|
6689
4424
|
};
|
|
6690
4425
|
let roots = nodes;
|
|
6691
4426
|
if (opts.subtreeRoot) {
|
|
@@ -6700,7 +4435,7 @@ function formatSemanticTree(nodes, opts = {}) {
|
|
|
6700
4435
|
if (!found) return `__SUBTREE_NOT_FOUND__:${opts.subtreeRoot}`;
|
|
6701
4436
|
roots = [found];
|
|
6702
4437
|
}
|
|
6703
|
-
for (const root of roots)
|
|
4438
|
+
for (const root of roots) visit(root, 0);
|
|
6704
4439
|
return lines.join("\n");
|
|
6705
4440
|
}
|
|
6706
4441
|
async function inspectDescribe(bridge, dumpOpts) {
|
|
@@ -7117,7 +4852,7 @@ async function inspectAccessibilityTree(bridge) {
|
|
|
7117
4852
|
if (!isPeachAccessibilityTree(tree))
|
|
7118
4853
|
throw new Error("engine returned an invalid accessibility snapshot");
|
|
7119
4854
|
const nodes = [];
|
|
7120
|
-
const
|
|
4855
|
+
const visit = (node) => {
|
|
7121
4856
|
if (node.isAccessibilityElement) {
|
|
7122
4857
|
nodes.push({
|
|
7123
4858
|
nodeId: node.nodeId,
|
|
@@ -7140,9 +4875,9 @@ async function inspectAccessibilityTree(bridge) {
|
|
|
7140
4875
|
});
|
|
7141
4876
|
if (node.platform === "ios") return;
|
|
7142
4877
|
}
|
|
7143
|
-
for (const child of node.children)
|
|
4878
|
+
for (const child of node.children) visit(child);
|
|
7144
4879
|
};
|
|
7145
|
-
for (const root of tree)
|
|
4880
|
+
for (const root of tree) visit(root);
|
|
7146
4881
|
return nodes;
|
|
7147
4882
|
}
|
|
7148
4883
|
function resolveFindMode(q) {
|
|
@@ -8859,9 +6594,9 @@ function decodePngDataUrl(dataUrl) {
|
|
|
8859
6594
|
);
|
|
8860
6595
|
}
|
|
8861
6596
|
const base64 = dataUrl.slice("data:image/png;base64,".length);
|
|
8862
|
-
const
|
|
8863
|
-
const bytes = new Uint8Array(
|
|
8864
|
-
for (let i = 0; i <
|
|
6597
|
+
const binary = atob(base64);
|
|
6598
|
+
const bytes = new Uint8Array(binary.length);
|
|
6599
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
8865
6600
|
return { dataUrl, bytes };
|
|
8866
6601
|
}
|
|
8867
6602
|
var TARGET_SEARCH_PARAMS = [
|