@arcgis/create 6.0.0-next.4 → 6.0.0-next.40
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/README.md +1 -0
- package/dist/init.js +896 -871
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { EventEmitter as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { EventEmitter as Aa } from "node:events";
|
|
2
|
+
import Kt from "node:child_process";
|
|
3
|
+
import we from "node:path";
|
|
4
4
|
import nt from "node:fs";
|
|
5
5
|
import q, { stdout as Ln, stdin as ho } from "node:process";
|
|
6
6
|
import { stripVTControlCharacters as po, styleText as oe } from "node:util";
|
|
7
7
|
import * as st from "node:readline";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import La from "node:readline";
|
|
9
|
+
import Zn, { ReadStream as es } from "node:tty";
|
|
10
|
+
import Oa from "node:os";
|
|
11
11
|
import se from "fs/promises";
|
|
12
|
-
import
|
|
12
|
+
import Me from "path";
|
|
13
13
|
import Ee from "process";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
14
|
+
import $a from "child_process";
|
|
15
|
+
import _a, { promisify as Na } from "util";
|
|
16
|
+
import Pa from "node:url";
|
|
17
|
+
import Ia from "url";
|
|
18
|
+
import Ta from "node:module";
|
|
19
|
+
import ka from "buffer";
|
|
20
20
|
class Ot extends Error {
|
|
21
21
|
/**
|
|
22
22
|
* Constructs the CommanderError class
|
|
@@ -37,7 +37,7 @@ class mo extends Ot {
|
|
|
37
37
|
super(1, "commander.invalidArgument", t), Error.captureStackTrace(this, this.constructor), this.name = this.constructor.name;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
class
|
|
40
|
+
class xa {
|
|
41
41
|
/**
|
|
42
42
|
* Initialize a new command argument with the given name and description.
|
|
43
43
|
* The default is that the argument is required, and you can explicitly
|
|
@@ -129,7 +129,7 @@ function go(e) {
|
|
|
129
129
|
const t = e.name() + (e.variadic === !0 ? "..." : "");
|
|
130
130
|
return e.required ? "<" + t + ">" : "[" + t + "]";
|
|
131
131
|
}
|
|
132
|
-
class
|
|
132
|
+
class Ma {
|
|
133
133
|
constructor() {
|
|
134
134
|
this.helpWidth = void 0, this.minWidthToWrap = 40, this.sortSubcommands = !1, this.sortOptions = !1, this.showGlobalOptions = !1;
|
|
135
135
|
}
|
|
@@ -176,9 +176,9 @@ class xa {
|
|
|
176
176
|
if (l && !l.hidden) {
|
|
177
177
|
const p = l.short && t._findOption(l.short), s = l.long && t._findOption(l.long);
|
|
178
178
|
!p && !s ? i.push(l) : l.long && !s ? i.push(
|
|
179
|
-
t.createOption(l.long, l.description)
|
|
179
|
+
t.createOption(l.long, l.description).helpGroup(l.helpGroupHeading)
|
|
180
180
|
) : l.short && !p && i.push(
|
|
181
|
-
t.createOption(l.short, l.description)
|
|
181
|
+
t.createOption(l.short, l.description).helpGroup(l.helpGroupHeading)
|
|
182
182
|
);
|
|
183
183
|
}
|
|
184
184
|
return this.sortOptions && i.sort(this.compareOptions), i;
|
|
@@ -598,7 +598,7 @@ ${c}`);
|
|
|
598
598
|
`);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
class
|
|
601
|
+
class Nt {
|
|
602
602
|
/**
|
|
603
603
|
* Initialize a new `Option` with the given `flags` and `description`.
|
|
604
604
|
*
|
|
@@ -606,8 +606,8 @@ class es {
|
|
|
606
606
|
* @param {string} [description]
|
|
607
607
|
*/
|
|
608
608
|
constructor(t, i) {
|
|
609
|
-
this.flags = t, this.description = i || "", this.required = t.includes("<"), this.optional = t.includes("["), this.variadic =
|
|
610
|
-
const l =
|
|
609
|
+
this.flags = t, this.description = i || "", this.required = t.includes("<"), this.optional = t.includes("["), this.variadic = new RegExp("\\p{ID_Continue}\\.\\.\\.[>\\]]$", "u").test(t), this.mandatory = !1;
|
|
610
|
+
const l = Da(t);
|
|
611
611
|
this.short = l.shortFlag, this.long = l.longFlag, this.negate = !1, this.long && (this.negate = this.long.startsWith("--no-")), this.defaultValue = void 0, this.defaultValueDescription = void 0, this.presetArg = void 0, this.envVar = void 0, this.parseArg = void 0, this.hidden = !1, this.argChoices = void 0, this.conflictsWith = [], this.implied = void 0, this.helpGroupHeading = void 0;
|
|
612
612
|
}
|
|
613
613
|
/**
|
|
@@ -801,7 +801,7 @@ class Ra {
|
|
|
801
801
|
function ts(e) {
|
|
802
802
|
return e.split("-").reduce((t, i) => t + i[0].toUpperCase() + i.slice(1));
|
|
803
803
|
}
|
|
804
|
-
function
|
|
804
|
+
function Da(e) {
|
|
805
805
|
let t, i;
|
|
806
806
|
const l = /^-[^-]$/, p = /^--[^-]/, s = e.split(/[ |,]+/).concat("guard");
|
|
807
807
|
if (l.test(s[0]) && (t = s.shift()), p.test(s[0]) && (i = s.shift()), !t && l.test(s[0]) && (t = s.shift()), !t && p.test(s[0]) && (t = i, i = s.shift()), s[0].startsWith("-")) {
|
|
@@ -823,7 +823,7 @@ function Ma(e) {
|
|
|
823
823
|
return { shortFlag: t, longFlag: i };
|
|
824
824
|
}
|
|
825
825
|
const yo = 3;
|
|
826
|
-
function
|
|
826
|
+
function Fa(e, t) {
|
|
827
827
|
if (Math.abs(e.length - t.length) > yo)
|
|
828
828
|
return Math.max(e.length, t.length);
|
|
829
829
|
const i = [];
|
|
@@ -854,13 +854,13 @@ function is(e, t) {
|
|
|
854
854
|
const s = 0.4;
|
|
855
855
|
return t.forEach((c) => {
|
|
856
856
|
if (c.length <= 1) return;
|
|
857
|
-
const h =
|
|
857
|
+
const h = Fa(e, c), o = Math.max(e.length, c.length);
|
|
858
858
|
(o - h) / o > s && (h < p ? (p = h, l = [c]) : h === p && l.push(c));
|
|
859
859
|
}), l.sort((c, h) => c.localeCompare(h)), i && (l = l.map((c) => `--${c}`)), l.length > 1 ? `
|
|
860
860
|
(Did you mean one of ${l.join(", ")}?)` : l.length === 1 ? `
|
|
861
861
|
(Did you mean ${l[0]}?)` : "";
|
|
862
862
|
}
|
|
863
|
-
class
|
|
863
|
+
class Tt extends Aa {
|
|
864
864
|
/**
|
|
865
865
|
* Initialize a new `Command`.
|
|
866
866
|
*
|
|
@@ -939,7 +939,7 @@ class It extends Ca {
|
|
|
939
939
|
* @return {Command} new command
|
|
940
940
|
*/
|
|
941
941
|
createCommand(t) {
|
|
942
|
-
return new
|
|
942
|
+
return new Tt(t);
|
|
943
943
|
}
|
|
944
944
|
/**
|
|
945
945
|
* You can customise the help with a subclass of Help by overriding createHelp,
|
|
@@ -948,7 +948,7 @@ class It extends Ca {
|
|
|
948
948
|
* @return {Help}
|
|
949
949
|
*/
|
|
950
950
|
createHelp() {
|
|
951
|
-
return Object.assign(new
|
|
951
|
+
return Object.assign(new Ma(), this.configureHelp());
|
|
952
952
|
}
|
|
953
953
|
/**
|
|
954
954
|
* You can customise the help by overriding Help properties using configureHelp(),
|
|
@@ -1032,7 +1032,7 @@ class It extends Ca {
|
|
|
1032
1032
|
* @return {Argument} new argument
|
|
1033
1033
|
*/
|
|
1034
1034
|
createArgument(t, i) {
|
|
1035
|
-
return new
|
|
1035
|
+
return new xa(t, i);
|
|
1036
1036
|
}
|
|
1037
1037
|
/**
|
|
1038
1038
|
* Define argument syntax for command.
|
|
@@ -1196,7 +1196,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1196
1196
|
* @return {Option} new option
|
|
1197
1197
|
*/
|
|
1198
1198
|
createOption(t, i) {
|
|
1199
|
-
return new
|
|
1199
|
+
return new Nt(t, i);
|
|
1200
1200
|
}
|
|
1201
1201
|
/**
|
|
1202
1202
|
* Wrap parseArgs to catch 'commander.invalidArgument'.
|
|
@@ -1283,7 +1283,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1283
1283
|
* @private
|
|
1284
1284
|
*/
|
|
1285
1285
|
_optionEx(t, i, l, p, s) {
|
|
1286
|
-
if (typeof i == "object" && i instanceof
|
|
1286
|
+
if (typeof i == "object" && i instanceof Nt)
|
|
1287
1287
|
throw new Error(
|
|
1288
1288
|
"To add an Option object use addOption() instead of option() or requiredOption()"
|
|
1289
1289
|
);
|
|
@@ -1475,7 +1475,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1475
1475
|
getOptionValueSourceWithGlobals(t) {
|
|
1476
1476
|
let i;
|
|
1477
1477
|
return this._getCommandAndAncestors().forEach((l) => {
|
|
1478
|
-
l.
|
|
1478
|
+
Object.hasOwn(l._optionValueSources, t) && (i = l.getOptionValueSource(t));
|
|
1479
1479
|
}), i;
|
|
1480
1480
|
}
|
|
1481
1481
|
/**
|
|
@@ -1631,9 +1631,9 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1631
1631
|
i = i.slice();
|
|
1632
1632
|
const l = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1633
1633
|
function p(n, u) {
|
|
1634
|
-
const a =
|
|
1634
|
+
const a = we.resolve(n, u);
|
|
1635
1635
|
if (nt.existsSync(a)) return a;
|
|
1636
|
-
if (l.includes(
|
|
1636
|
+
if (l.includes(we.extname(u))) return;
|
|
1637
1637
|
const r = l.find(
|
|
1638
1638
|
(f) => nt.existsSync(`${a}${f}`)
|
|
1639
1639
|
);
|
|
@@ -1648,17 +1648,17 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1648
1648
|
} catch {
|
|
1649
1649
|
n = this._scriptPath;
|
|
1650
1650
|
}
|
|
1651
|
-
c =
|
|
1652
|
-
|
|
1651
|
+
c = we.resolve(
|
|
1652
|
+
we.dirname(n),
|
|
1653
1653
|
c
|
|
1654
1654
|
);
|
|
1655
1655
|
}
|
|
1656
1656
|
if (c) {
|
|
1657
1657
|
let n = p(c, s);
|
|
1658
1658
|
if (!n && !t._executableFile && this._scriptPath) {
|
|
1659
|
-
const u =
|
|
1659
|
+
const u = we.basename(
|
|
1660
1660
|
this._scriptPath,
|
|
1661
|
-
|
|
1661
|
+
we.extname(this._scriptPath)
|
|
1662
1662
|
);
|
|
1663
1663
|
u !== this._name && (n = p(
|
|
1664
1664
|
c,
|
|
@@ -1667,13 +1667,13 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1667
1667
|
}
|
|
1668
1668
|
s = n || s;
|
|
1669
1669
|
}
|
|
1670
|
-
const h = l.includes(
|
|
1670
|
+
const h = l.includes(we.extname(s));
|
|
1671
1671
|
let o;
|
|
1672
|
-
q.platform !== "win32" ? h ? (i.unshift(s), i = ns(q.execArgv).concat(i), o =
|
|
1672
|
+
q.platform !== "win32" ? h ? (i.unshift(s), i = ns(q.execArgv).concat(i), o = Kt.spawn(q.argv[0], i, { stdio: "inherit" })) : o = Kt.spawn(s, i, { stdio: "inherit" }) : (this._checkForMissingExecutable(
|
|
1673
1673
|
s,
|
|
1674
1674
|
c,
|
|
1675
1675
|
t._name
|
|
1676
|
-
), i.unshift(s), i = ns(q.execArgv).concat(i), o =
|
|
1676
|
+
), i.unshift(s), i = ns(q.execArgv).concat(i), o = Kt.spawn(q.execPath, i, { stdio: "inherit" })), o.killed || ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"].forEach((u) => {
|
|
1677
1677
|
q.on(u, () => {
|
|
1678
1678
|
o.killed === !1 && o.exitCode === null && o.kill(u);
|
|
1679
1679
|
});
|
|
@@ -1948,7 +1948,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
1948
1948
|
function s(n) {
|
|
1949
1949
|
return n.length > 1 && n[0] === "-";
|
|
1950
1950
|
}
|
|
1951
|
-
const c = (n) => /^-(\d+|\d*\.\d+)(
|
|
1951
|
+
const c = (n) => /^-(\d+|\d*\.\d+)([eE][+-]?\d+)?$/.test(n) ? !this._getCommandAndAncestors().some(
|
|
1952
1952
|
(u) => u.options.map((a) => a.short).some((a) => /^-\d$/.test(a))
|
|
1953
1953
|
) : !1;
|
|
1954
1954
|
let h = null, o = null, m = 0;
|
|
@@ -2308,7 +2308,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
2308
2308
|
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
2309
2309
|
*
|
|
2310
2310
|
* @example
|
|
2311
|
-
* program.commandsGroup('Development Commands:);
|
|
2311
|
+
* program.commandsGroup('Development Commands:');
|
|
2312
2312
|
* program.command('watch')...
|
|
2313
2313
|
* program.command('lint')...
|
|
2314
2314
|
* ...
|
|
@@ -2362,7 +2362,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
2362
2362
|
* @return {Command}
|
|
2363
2363
|
*/
|
|
2364
2364
|
nameFromFilename(t) {
|
|
2365
|
-
return this._name =
|
|
2365
|
+
return this._name = we.basename(t, we.extname(t)), this;
|
|
2366
2366
|
}
|
|
2367
2367
|
/**
|
|
2368
2368
|
* Get or set the directory for searching for executable subcommands of this command.
|
|
@@ -2439,7 +2439,7 @@ Expecting one of '${l.join("', '")}'`);
|
|
|
2439
2439
|
* Pass in false to disable the built-in help option.
|
|
2440
2440
|
*
|
|
2441
2441
|
* @example
|
|
2442
|
-
* program.helpOption('-?, --help' 'show help'); // customise
|
|
2442
|
+
* program.helpOption('-?, --help', 'show help'); // customise
|
|
2443
2443
|
* program.helpOption(false); // disable
|
|
2444
2444
|
*
|
|
2445
2445
|
* @param {(string | boolean)} flags
|
|
@@ -2530,7 +2530,11 @@ function ns(e) {
|
|
|
2530
2530
|
if (!t.startsWith("--inspect"))
|
|
2531
2531
|
return t;
|
|
2532
2532
|
let i, l = "127.0.0.1", p = "9229", s;
|
|
2533
|
-
return (s = t.match(/^(--inspect(-brk
|
|
2533
|
+
return (s = t.match(/^(--inspect(-brk|-wait)?)$/)) !== null ? i = s[1] : (s = t.match(
|
|
2534
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+)$/
|
|
2535
|
+
)) !== null ? (i = s[1], /^\d+$/.test(s[3]) ? p = s[3] : l = s[3]) : (s = t.match(
|
|
2536
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+):(\d+)$/
|
|
2537
|
+
)) !== null && (i = s[1], l = s[3], p = s[4]), i && p !== "0" ? `${i}=${l}:${parseInt(p) + 1}` : t;
|
|
2534
2538
|
});
|
|
2535
2539
|
}
|
|
2536
2540
|
function ss() {
|
|
@@ -2539,74 +2543,91 @@ function ss() {
|
|
|
2539
2543
|
if (q.env.FORCE_COLOR || q.env.CLICOLOR_FORCE !== void 0)
|
|
2540
2544
|
return !0;
|
|
2541
2545
|
}
|
|
2542
|
-
new
|
|
2543
|
-
const
|
|
2544
|
-
version:
|
|
2545
|
-
},
|
|
2546
|
+
new Tt();
|
|
2547
|
+
const Ba = "1.0.0-0", Ga = {
|
|
2548
|
+
version: Ba
|
|
2549
|
+
}, bo = [
|
|
2546
2550
|
{
|
|
2547
2551
|
folder: "js-maps-sdk-react",
|
|
2548
|
-
label: "react"
|
|
2552
|
+
label: "react",
|
|
2553
|
+
description: "This React template includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, TypeScript, and optional OAuth."
|
|
2549
2554
|
},
|
|
2550
2555
|
{
|
|
2551
2556
|
folder: "js-maps-sdk-vite",
|
|
2552
|
-
label: "vite"
|
|
2557
|
+
label: "vite",
|
|
2558
|
+
description: "This Vite template includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, TypeScript, and optional OAuth."
|
|
2553
2559
|
},
|
|
2554
2560
|
{
|
|
2555
2561
|
folder: "js-maps-sdk-cdn",
|
|
2556
|
-
label: "cdn"
|
|
2562
|
+
label: "cdn",
|
|
2563
|
+
description: "This CDN template includes the core API, Map components, Charts components, Calcite, vanilla JavaScript, and an optional OAuth example. It loads the SDK's prebuilt distribution from the ArcGIS CDN without a build step."
|
|
2557
2564
|
},
|
|
2558
2565
|
{
|
|
2559
2566
|
folder: "js-maps-sdk-vue",
|
|
2560
|
-
label: "vue"
|
|
2567
|
+
label: "vue",
|
|
2568
|
+
description: "This Vue template includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, and optional OAuth."
|
|
2561
2569
|
},
|
|
2562
2570
|
{
|
|
2563
2571
|
folder: "js-maps-sdk-astro",
|
|
2564
|
-
label: "astro"
|
|
2572
|
+
label: "astro",
|
|
2573
|
+
description: "This Astro template for content-driven applications includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, TypeScript, and optional OAuth."
|
|
2565
2574
|
},
|
|
2566
2575
|
{
|
|
2567
2576
|
folder: "js-maps-sdk-angular",
|
|
2568
|
-
label: "angular"
|
|
2577
|
+
label: "angular",
|
|
2578
|
+
description: "This Angular template includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, TypeScript, and optional OAuth."
|
|
2569
2579
|
},
|
|
2570
2580
|
{
|
|
2571
2581
|
folder: "js-maps-sdk-node",
|
|
2572
|
-
label: "node"
|
|
2582
|
+
label: "node",
|
|
2583
|
+
description: "This Node.js template includes examples of geometry projection, making HTTP requests, and loading a WebMap using the core API and ES Modules.."
|
|
2573
2584
|
},
|
|
2574
2585
|
{
|
|
2575
2586
|
folder: "js-maps-sdk-webpack",
|
|
2576
|
-
label: "webpack"
|
|
2587
|
+
label: "webpack",
|
|
2588
|
+
description: "This Webpack template includes preconfigured SDK essentials such as the core API, Map components, Charts components, Calcite, vanilla JavaScript, and optional OAuth."
|
|
2577
2589
|
},
|
|
2578
2590
|
{
|
|
2579
2591
|
folder: "ai-components-custom-agent-hil-react",
|
|
2580
|
-
label: "ai-components-custom-agent-hil-react (beta)"
|
|
2592
|
+
label: "ai-components-custom-agent-hil-react (beta)",
|
|
2593
|
+
description: "This React template includes the SDK's AI components (beta), Map components, the Core API, Calcite, and a custom LangGraph agent that asks for approval before saving a road maintenance report to a feature layer."
|
|
2581
2594
|
},
|
|
2582
2595
|
{
|
|
2583
2596
|
folder: "ai-components-custom-agent-tools-react",
|
|
2584
|
-
label: "ai-components-custom-agent-tools-react (beta)"
|
|
2597
|
+
label: "ai-components-custom-agent-tools-react (beta)",
|
|
2598
|
+
description: "This React template includes the SDK's AI components (beta), Map components, the Core API, Calcite, and a custom LangGraph agent that calls an ArcGIS network service to calculate drive-time service areas from chat requests."
|
|
2585
2599
|
},
|
|
2586
2600
|
{
|
|
2587
2601
|
folder: "ai-components-agent-utils-hil-react",
|
|
2588
|
-
label: "ai-components-agent-utils-hil-react (beta)"
|
|
2602
|
+
label: "ai-components-agent-utils-hil-react (beta)",
|
|
2603
|
+
description: "This React template includes the SDK's AI components (beta), Map components, the Core API, and Calcite. It demonstrates the SDK's agent utilities with a workflow that requests approval before saving a road maintenance report, plus navigation and data-exploration agents."
|
|
2589
2604
|
},
|
|
2590
2605
|
{
|
|
2591
2606
|
folder: "ai-components-agent-utils-tools-react",
|
|
2592
|
-
label: "ai-components-agent-utils-tools-react (beta)"
|
|
2607
|
+
label: "ai-components-agent-utils-tools-react (beta)",
|
|
2608
|
+
description: "This React template includes the SDK's AI components (beta), Map components, the Core API, and Calcite. It demonstrates the SDK's agent utilities with an LLM agent and middleware that calls an ArcGIS network service to calculate travel-mode service areas."
|
|
2593
2609
|
},
|
|
2594
2610
|
{
|
|
2595
|
-
folder: "coding-components-react"
|
|
2611
|
+
folder: "coding-components-react",
|
|
2612
|
+
description: "This React template includes Coding components, an Arcade editor configured for the popup profile, and Core API test data loaded from a WebMap."
|
|
2596
2613
|
},
|
|
2597
2614
|
{
|
|
2598
|
-
folder: "coding-components-vite"
|
|
2615
|
+
folder: "coding-components-vite",
|
|
2616
|
+
description: "This Vanilla JavaScript Vite template includes Coding components, an Arcade editor configured for the labeling profile, and a Core API feature layer."
|
|
2599
2617
|
},
|
|
2600
2618
|
{
|
|
2601
|
-
folder: "coding-components-angular"
|
|
2619
|
+
folder: "coding-components-angular",
|
|
2620
|
+
description: "This Angular template includes Coding components, a TypeScript Arcade editor configured for the popup profile, and Core API test data loaded from a WebMap."
|
|
2602
2621
|
},
|
|
2603
2622
|
{
|
|
2604
|
-
folder: "disconnected-environment"
|
|
2623
|
+
folder: "disconnected-environment",
|
|
2624
|
+
description: "This disconnected Vite template includes an Arcade editor, map, and chart using an in-memory feature layer. It bundles the Core API, Map, Charts, Coding, and Common components, and Calcite assets locally, so SDK asset requests are served locally instead of being sent to js.arcgis.com."
|
|
2605
2625
|
},
|
|
2606
2626
|
{
|
|
2607
|
-
folder: "geometry-operator-worker"
|
|
2627
|
+
folder: "geometry-operator-worker",
|
|
2628
|
+
description: "This Vite template includes Map components and the Core API. It demonstrates geometry operators in a web worker to query nearby rivers, create buffers, and measure their length."
|
|
2608
2629
|
}
|
|
2609
|
-
], On = "lumina-components", qa = "js-maps-sdk-cdn",
|
|
2630
|
+
], On = "lumina-components", qa = "js-maps-sdk-cdn", $n = {
|
|
2610
2631
|
webGisSdk: "web-gis-sdk"
|
|
2611
2632
|
}, kt = {
|
|
2612
2633
|
codeSample: "CODE_SAMPLE",
|
|
@@ -2617,7 +2638,7 @@ function ja(e, t) {
|
|
|
2617
2638
|
return {
|
|
2618
2639
|
handlerType: kt.appSample,
|
|
2619
2640
|
repo: "Esri/jsapi-resources",
|
|
2620
|
-
domain:
|
|
2641
|
+
domain: $n.webGisSdk,
|
|
2621
2642
|
templatePath: i,
|
|
2622
2643
|
filesPath: i,
|
|
2623
2644
|
...t ? { customName: t } : {}
|
|
@@ -2625,7 +2646,7 @@ function ja(e, t) {
|
|
|
2625
2646
|
}
|
|
2626
2647
|
function Ua() {
|
|
2627
2648
|
const e = {};
|
|
2628
|
-
for (const t of
|
|
2649
|
+
for (const t of bo) {
|
|
2629
2650
|
const { folder: i } = t, l = i;
|
|
2630
2651
|
if (e[l])
|
|
2631
2652
|
throw new Error(`Template registry collision detected for "${l}".`);
|
|
@@ -2638,23 +2659,23 @@ function Ua() {
|
|
|
2638
2659
|
excludedFromPrompts: !0
|
|
2639
2660
|
}, e;
|
|
2640
2661
|
}
|
|
2641
|
-
const Ha = Ua(), Ce = Object.entries(Ha),
|
|
2642
|
-
[
|
|
2662
|
+
const Ha = Ua(), Ce = Object.entries(Ha), vo = {
|
|
2663
|
+
[$n.webGisSdk]: {}
|
|
2643
2664
|
};
|
|
2644
2665
|
for (const [e, t] of Ce)
|
|
2645
|
-
t.handlerType === kt.appSample && (
|
|
2646
|
-
const
|
|
2666
|
+
t.handlerType === kt.appSample && (vo[t.domain][e] = t.templatePath);
|
|
2667
|
+
const So = "github.com", _n = "main", Nn = Object.fromEntries(
|
|
2647
2668
|
Ce.map(([e, t]) => [e, t.repo])
|
|
2648
2669
|
), Va = Object.fromEntries(
|
|
2649
2670
|
Ce.map(([e, t]) => [e, t.filesPath])
|
|
2650
2671
|
), Wa = Object.fromEntries(
|
|
2651
2672
|
Ce.map(([e, t]) => [e, t.handlerType])
|
|
2652
|
-
), Ya = Object.fromEntries(
|
|
2653
|
-
Ce.filter(([, e]) => !!e.excludedFromPrompts).map(([e]) => [e, !0])
|
|
2654
2673
|
), Ka = Object.fromEntries(
|
|
2674
|
+
Ce.filter(([, e]) => !!e.excludedFromPrompts).map(([e]) => [e, !0])
|
|
2675
|
+
), Ya = Object.fromEntries(
|
|
2655
2676
|
Ce.map(([e, t]) => [e, t.customName ?? e])
|
|
2656
2677
|
);
|
|
2657
|
-
function
|
|
2678
|
+
function Pn(e) {
|
|
2658
2679
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2659
2680
|
}
|
|
2660
2681
|
var rt = { exports: {} }, rs;
|
|
@@ -2720,10 +2741,10 @@ function Ja() {
|
|
|
2720
2741
|
return rt.exports = c(), rt.exports.createColors = c, rt.exports;
|
|
2721
2742
|
}
|
|
2722
2743
|
var za = /* @__PURE__ */ Ja();
|
|
2723
|
-
const x = /* @__PURE__ */
|
|
2724
|
-
var
|
|
2744
|
+
const x = /* @__PURE__ */ Pn(za);
|
|
2745
|
+
var Yt, os;
|
|
2725
2746
|
function Xa() {
|
|
2726
|
-
if (os) return
|
|
2747
|
+
if (os) return Yt;
|
|
2727
2748
|
os = 1;
|
|
2728
2749
|
const e = "\x1B", t = `${e}[`, i = "\x07", l = {
|
|
2729
2750
|
to(c, h) {
|
|
@@ -2761,7 +2782,7 @@ function Xa() {
|
|
|
2761
2782
|
return c && (h += l.left), h;
|
|
2762
2783
|
}
|
|
2763
2784
|
};
|
|
2764
|
-
return
|
|
2785
|
+
return Yt = { cursor: l, scroll: p, erase: s, beep: i }, Yt;
|
|
2765
2786
|
}
|
|
2766
2787
|
var ne = Xa();
|
|
2767
2788
|
function $t(e, t, i) {
|
|
@@ -2771,66 +2792,66 @@ function $t(e, t, i) {
|
|
|
2771
2792
|
}
|
|
2772
2793
|
const Qa = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, Za = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, el = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Jt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, ot = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, at = /\t{1,1000}/y, zt = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu"), lt = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, tl = new RegExp("\\p{M}+", "gu"), il = { limit: 1 / 0, ellipsis: "" }, wo = (e, t = {}, i = {}) => {
|
|
2773
2794
|
const l = t.limit ?? 1 / 0, p = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (p ? wo(p, il, i).width : 0), c = i.ansiWidth ?? 0, h = i.controlWidth ?? 0, o = i.tabWidth ?? 8, m = i.ambiguousWidth ?? 1, n = i.emojiWidth ?? 2, u = i.fullWidthWidth ?? 2, a = i.regularWidth ?? 1, r = i.wideWidth ?? 2;
|
|
2774
|
-
let f = 0, d = 0, g = e.length, y = 0, v = !1,
|
|
2795
|
+
let f = 0, d = 0, g = e.length, y = 0, v = !1, w = g, b = Math.max(0, l - s), S = 0, L = 0, O = 0, $ = 0;
|
|
2775
2796
|
e: for (; ; ) {
|
|
2776
|
-
if (L >
|
|
2777
|
-
const _ = e.slice(
|
|
2797
|
+
if (L > S || d >= g && d > f) {
|
|
2798
|
+
const _ = e.slice(S, L) || e.slice(f, d);
|
|
2778
2799
|
y = 0;
|
|
2779
2800
|
for (const P of _.replaceAll(tl, "")) {
|
|
2780
2801
|
const I = P.codePointAt(0) || 0;
|
|
2781
|
-
if (Za(I) ? $ = u : el(I) ? $ = r : m !== a && Qa(I) ? $ = m : $ = a, O + $ > b && (
|
|
2802
|
+
if (Za(I) ? $ = u : el(I) ? $ = r : m !== a && Qa(I) ? $ = m : $ = a, O + $ > b && (w = Math.min(w, Math.max(S, f) + y)), O + $ > l) {
|
|
2782
2803
|
v = !0;
|
|
2783
2804
|
break e;
|
|
2784
2805
|
}
|
|
2785
2806
|
y += P.length, O += $;
|
|
2786
2807
|
}
|
|
2787
|
-
|
|
2808
|
+
S = L = 0;
|
|
2788
2809
|
}
|
|
2789
2810
|
if (d >= g) break;
|
|
2790
2811
|
if (lt.lastIndex = d, lt.test(e)) {
|
|
2791
|
-
if (y = lt.lastIndex - d, $ = y * a, O + $ > b && (
|
|
2812
|
+
if (y = lt.lastIndex - d, $ = y * a, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / a))), O + $ > l) {
|
|
2792
2813
|
v = !0;
|
|
2793
2814
|
break;
|
|
2794
2815
|
}
|
|
2795
|
-
O += $,
|
|
2816
|
+
O += $, S = f, L = d, d = f = lt.lastIndex;
|
|
2796
2817
|
continue;
|
|
2797
2818
|
}
|
|
2798
2819
|
if (Jt.lastIndex = d, Jt.test(e)) {
|
|
2799
|
-
if (O + c > b && (
|
|
2820
|
+
if (O + c > b && (w = Math.min(w, d)), O + c > l) {
|
|
2800
2821
|
v = !0;
|
|
2801
2822
|
break;
|
|
2802
2823
|
}
|
|
2803
|
-
O += c,
|
|
2824
|
+
O += c, S = f, L = d, d = f = Jt.lastIndex;
|
|
2804
2825
|
continue;
|
|
2805
2826
|
}
|
|
2806
2827
|
if (ot.lastIndex = d, ot.test(e)) {
|
|
2807
|
-
if (y = ot.lastIndex - d, $ = y * h, O + $ > b && (
|
|
2828
|
+
if (y = ot.lastIndex - d, $ = y * h, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / h))), O + $ > l) {
|
|
2808
2829
|
v = !0;
|
|
2809
2830
|
break;
|
|
2810
2831
|
}
|
|
2811
|
-
O += $,
|
|
2832
|
+
O += $, S = f, L = d, d = f = ot.lastIndex;
|
|
2812
2833
|
continue;
|
|
2813
2834
|
}
|
|
2814
2835
|
if (at.lastIndex = d, at.test(e)) {
|
|
2815
|
-
if (y = at.lastIndex - d, $ = y * o, O + $ > b && (
|
|
2836
|
+
if (y = at.lastIndex - d, $ = y * o, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / o))), O + $ > l) {
|
|
2816
2837
|
v = !0;
|
|
2817
2838
|
break;
|
|
2818
2839
|
}
|
|
2819
|
-
O += $,
|
|
2840
|
+
O += $, S = f, L = d, d = f = at.lastIndex;
|
|
2820
2841
|
continue;
|
|
2821
2842
|
}
|
|
2822
2843
|
if (zt.lastIndex = d, zt.test(e)) {
|
|
2823
|
-
if (O + n > b && (
|
|
2844
|
+
if (O + n > b && (w = Math.min(w, d)), O + n > l) {
|
|
2824
2845
|
v = !0;
|
|
2825
2846
|
break;
|
|
2826
2847
|
}
|
|
2827
|
-
O += n,
|
|
2848
|
+
O += n, S = f, L = d, d = f = zt.lastIndex;
|
|
2828
2849
|
continue;
|
|
2829
2850
|
}
|
|
2830
2851
|
d += 1;
|
|
2831
2852
|
}
|
|
2832
|
-
return { width: v ? b : O, index: v ?
|
|
2833
|
-
}, nl = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, Je = (e, t = {}) => wo(e, nl, t).width, xt = "\x1B",
|
|
2853
|
+
return { width: v ? b : O, index: v ? w : g, truncated: v, ellipsed: v && l >= s };
|
|
2854
|
+
}, nl = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, Je = (e, t = {}) => wo(e, nl, t).width, xt = "\x1B", Eo = "", sl = 39, In = "\x07", Co = "[", rl = "]", Ao = "m", Tn = `${rl}8;;`, as = new RegExp(`(?:\\${Co}(?<code>\\d+)m|\\${Tn}(?<uri>.*)${In})`, "y"), ol = (e) => {
|
|
2834
2855
|
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
2835
2856
|
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
2836
2857
|
if (e === 1 || e === 2) return 22;
|
|
@@ -2840,12 +2861,12 @@ const Qa = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170
|
|
|
2840
2861
|
if (e === 8) return 28;
|
|
2841
2862
|
if (e === 9) return 29;
|
|
2842
2863
|
if (e === 0) return 0;
|
|
2843
|
-
}, ls = (e) => `${xt}${
|
|
2864
|
+
}, ls = (e) => `${xt}${Co}${e}${Ao}`, cs = (e) => `${xt}${Tn}${e}${In}`, al = (e) => e.map((t) => Je(t)), Xt = (e, t, i) => {
|
|
2844
2865
|
const l = t[Symbol.iterator]();
|
|
2845
2866
|
let p = !1, s = !1, c = e.at(-1), h = c === void 0 ? 0 : Je(c), o = l.next(), m = l.next(), n = 0;
|
|
2846
2867
|
for (; !o.done; ) {
|
|
2847
2868
|
const u = o.value, a = Je(u);
|
|
2848
|
-
h + a <= i ? e[e.length - 1] += u : (e.push(u), h = 0), (u === xt || u ===
|
|
2869
|
+
h + a <= i ? e[e.length - 1] += u : (e.push(u), h = 0), (u === xt || u === Eo) && (p = !0, s = t.startsWith(Tn, n + 1)), p ? s ? u === In && (p = !1, s = !1) : u === Ao && (p = !1) : (h += a, h === i && !m.done && (e.push(""), h = 0)), o = m, m = l.next(), n += u.length;
|
|
2849
2870
|
}
|
|
2850
2871
|
c = e.at(-1), !h && c !== void 0 && c.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
2851
2872
|
}, ll = (e) => {
|
|
@@ -2885,7 +2906,7 @@ const Qa = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170
|
|
|
2885
2906
|
let u = n.next(), a = n.next(), r = 0;
|
|
2886
2907
|
for (; !u.done; ) {
|
|
2887
2908
|
const f = u.value, d = a.value;
|
|
2888
|
-
if (l += f, f === xt || f ===
|
|
2909
|
+
if (l += f, f === xt || f === Eo) {
|
|
2889
2910
|
as.lastIndex = r + 1;
|
|
2890
2911
|
const y = as.exec(m)?.groups;
|
|
2891
2912
|
if (y?.code !== void 0) {
|
|
@@ -2908,9 +2929,9 @@ function gn(e, t, i) {
|
|
|
2908
2929
|
`);
|
|
2909
2930
|
}
|
|
2910
2931
|
const ul = ["up", "down", "left", "right", "space", "enter", "cancel"], ye = { actions: new Set(ul), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: !0 };
|
|
2911
|
-
function
|
|
2932
|
+
function kn(e, t) {
|
|
2912
2933
|
if (typeof e == "string") return ye.aliases.get(e) === t;
|
|
2913
|
-
for (const i of e) if (i !== void 0 &&
|
|
2934
|
+
for (const i of e) if (i !== void 0 && kn(i, t)) return !0;
|
|
2914
2935
|
return !1;
|
|
2915
2936
|
}
|
|
2916
2937
|
function fl(e, t) {
|
|
@@ -2922,7 +2943,7 @@ function fl(e, t) {
|
|
|
2922
2943
|
return { lines: s, numLinesBefore: i.length, numLinesAfter: l.length, numLines: p };
|
|
2923
2944
|
}
|
|
2924
2945
|
const hl = globalThis.process.platform.startsWith("win"), yn = /* @__PURE__ */ Symbol("clack:cancel");
|
|
2925
|
-
function
|
|
2946
|
+
function Lo(e) {
|
|
2926
2947
|
return e === yn;
|
|
2927
2948
|
}
|
|
2928
2949
|
function ct(e, t) {
|
|
@@ -2931,10 +2952,10 @@ function ct(e, t) {
|
|
|
2931
2952
|
}
|
|
2932
2953
|
function pl({ input: e = ho, output: t = Ln, overwrite: i = !0, hideCursor: l = !0 } = {}) {
|
|
2933
2954
|
const p = st.createInterface({ input: e, output: t, prompt: "", tabSize: 1 });
|
|
2934
|
-
st.emitKeypressEvents(e, p), e instanceof
|
|
2955
|
+
st.emitKeypressEvents(e, p), e instanceof es && e.isTTY && e.setRawMode(!0);
|
|
2935
2956
|
const s = (c, { name: h, sequence: o }) => {
|
|
2936
2957
|
const m = String(c);
|
|
2937
|
-
if (
|
|
2958
|
+
if (kn([m, h, o], "cancel")) {
|
|
2938
2959
|
l && t.write(ne.cursor.show), process.exit(0);
|
|
2939
2960
|
return;
|
|
2940
2961
|
}
|
|
@@ -2947,17 +2968,17 @@ function pl({ input: e = ho, output: t = Ln, overwrite: i = !0, hideCursor: l =
|
|
|
2947
2968
|
});
|
|
2948
2969
|
};
|
|
2949
2970
|
return l && t.write(ne.cursor.hide), e.once("keypress", s), () => {
|
|
2950
|
-
e.off("keypress", s), l && t.write(ne.cursor.show), e instanceof
|
|
2971
|
+
e.off("keypress", s), l && t.write(ne.cursor.show), e instanceof es && e.isTTY && !hl && e.setRawMode(!1), p.terminal = !1, p.close();
|
|
2951
2972
|
};
|
|
2952
2973
|
}
|
|
2953
|
-
const
|
|
2974
|
+
const xn = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80, Oo = (e) => "rows" in e && typeof e.rows == "number" ? e.rows : 20;
|
|
2954
2975
|
function Qt(e, t, i, l = i) {
|
|
2955
|
-
const p =
|
|
2976
|
+
const p = xn(e ?? Ln);
|
|
2956
2977
|
return gn(t, p - i.length, { hard: !0, trim: !1 }).split(`
|
|
2957
2978
|
`).map((s, c) => `${c === 0 ? l : i}${s}`).join(`
|
|
2958
2979
|
`);
|
|
2959
2980
|
}
|
|
2960
|
-
let
|
|
2981
|
+
let Mn = class {
|
|
2961
2982
|
input;
|
|
2962
2983
|
output;
|
|
2963
2984
|
_abortSignal;
|
|
@@ -3002,7 +3023,7 @@ let xn = class {
|
|
|
3002
3023
|
this.state = "cancel", this.close();
|
|
3003
3024
|
}, { once: !0 });
|
|
3004
3025
|
}
|
|
3005
|
-
this.rl =
|
|
3026
|
+
this.rl = La.createInterface({ input: this.input, tabSize: 2, prompt: "", escapeCodeTimeout: 50, terminal: !0 }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, !0), this.input.on("keypress", this.onKeypress), ct(this.input, !0), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
|
|
3006
3027
|
this.output.write(ne.cursor.show), this.output.off("resize", this.render), ct(this.input, !1), t(this.value);
|
|
3007
3028
|
}), this.once("cancel", () => {
|
|
3008
3029
|
this.output.write(ne.cursor.show), this.output.off("resize", this.render), ct(this.input, !1), t(yn);
|
|
@@ -3029,7 +3050,7 @@ let xn = class {
|
|
|
3029
3050
|
}
|
|
3030
3051
|
this.state !== "error" && (this.state = "submit");
|
|
3031
3052
|
}
|
|
3032
|
-
|
|
3053
|
+
kn([t, i?.name, i?.sequence], "cancel") && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
|
|
3033
3054
|
}
|
|
3034
3055
|
close() {
|
|
3035
3056
|
this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
|
|
@@ -3045,7 +3066,7 @@ let xn = class {
|
|
|
3045
3066
|
if (t !== this._prevFrame) {
|
|
3046
3067
|
if (this.state === "initial") this.output.write(ne.cursor.hide);
|
|
3047
3068
|
else {
|
|
3048
|
-
const i = fl(this._prevFrame, t), l =
|
|
3069
|
+
const i = fl(this._prevFrame, t), l = Oo(this.output);
|
|
3049
3070
|
if (this.restoreCursor(), i) {
|
|
3050
3071
|
const p = Math.max(0, i.numLinesAfter - l), s = Math.max(0, i.numLinesBefore - l);
|
|
3051
3072
|
let c = i.lines.find((h) => h >= p);
|
|
@@ -3078,7 +3099,7 @@ let xn = class {
|
|
|
3078
3099
|
this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
|
|
3079
3100
|
}
|
|
3080
3101
|
}
|
|
3081
|
-
}, dl = class extends
|
|
3102
|
+
}, dl = class extends Mn {
|
|
3082
3103
|
_mask = "•";
|
|
3083
3104
|
get cursor() {
|
|
3084
3105
|
return this._cursor;
|
|
@@ -3102,7 +3123,7 @@ let xn = class {
|
|
|
3102
3123
|
});
|
|
3103
3124
|
}
|
|
3104
3125
|
};
|
|
3105
|
-
class ml extends
|
|
3126
|
+
class ml extends Mn {
|
|
3106
3127
|
options;
|
|
3107
3128
|
cursor = 0;
|
|
3108
3129
|
get _selectedValue() {
|
|
@@ -3129,7 +3150,7 @@ class ml extends xn {
|
|
|
3129
3150
|
});
|
|
3130
3151
|
}
|
|
3131
3152
|
}
|
|
3132
|
-
let gl = class extends
|
|
3153
|
+
let gl = class extends Mn {
|
|
3133
3154
|
get userInputWithCursor() {
|
|
3134
3155
|
if (this.state === "submit") return this.userInput;
|
|
3135
3156
|
const t = this.userInput;
|
|
@@ -3151,15 +3172,15 @@ let gl = class extends xn {
|
|
|
3151
3172
|
function yl() {
|
|
3152
3173
|
return q.platform !== "win32" ? q.env.TERM !== "linux" : !!q.env.CI || !!q.env.WT_SESSION || !!q.env.TERMINUS_SUBLIME || q.env.ConEmuTask === "{cmd::Cmder}" || q.env.TERM_PROGRAM === "Terminus-Sublime" || q.env.TERM_PROGRAM === "vscode" || q.env.TERM === "xterm-256color" || q.env.TERM === "alacritty" || q.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
3153
3174
|
}
|
|
3154
|
-
const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t, vl = fe("◆", "*"),
|
|
3175
|
+
const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t, vl = fe("◆", "*"), $o = fe("■", "x"), _o = fe("▲", "x"), Rn = fe("◇", "o"), Sl = fe("┌", "T"), J = fe("│", "|"), Le = fe("└", "—"), wl = fe("●", ">"), us = fe("○", " "), El = fe("▪", "•"), Cl = fe("●", "•"), Al = fe("◆", "*"), Ll = fe("▲", "!"), Ol = fe("■", "x"), Dn = (e) => {
|
|
3155
3176
|
switch (e) {
|
|
3156
3177
|
case "initial":
|
|
3157
3178
|
case "active":
|
|
3158
3179
|
return x.cyan(vl);
|
|
3159
3180
|
case "cancel":
|
|
3160
|
-
return x.red(
|
|
3181
|
+
return x.red($o);
|
|
3161
3182
|
case "error":
|
|
3162
|
-
return x.yellow(
|
|
3183
|
+
return x.yellow(_o);
|
|
3163
3184
|
case "submit":
|
|
3164
3185
|
return x.green(Rn);
|
|
3165
3186
|
}
|
|
@@ -3175,68 +3196,68 @@ const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t
|
|
|
3175
3196
|
case "submit":
|
|
3176
3197
|
return x.green(J);
|
|
3177
3198
|
}
|
|
3178
|
-
}, _l = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, Nl = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, Pl = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Zt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, ut = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ft = /\t{1,1000}/y, ei = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu"), ht = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Il = new RegExp("\\p{M}+", "gu"), Tl = { limit: 1 / 0, ellipsis: "" },
|
|
3179
|
-
const l = t.limit ?? 1 / 0, p = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (p ?
|
|
3180
|
-
let f = 0, d = 0, g = e.length, y = 0, v = !1,
|
|
3199
|
+
}, _l = (e) => e === 161 || e === 164 || e === 167 || e === 168 || e === 170 || e === 173 || e === 174 || e >= 176 && e <= 180 || e >= 182 && e <= 186 || e >= 188 && e <= 191 || e === 198 || e === 208 || e === 215 || e === 216 || e >= 222 && e <= 225 || e === 230 || e >= 232 && e <= 234 || e === 236 || e === 237 || e === 240 || e === 242 || e === 243 || e >= 247 && e <= 250 || e === 252 || e === 254 || e === 257 || e === 273 || e === 275 || e === 283 || e === 294 || e === 295 || e === 299 || e >= 305 && e <= 307 || e === 312 || e >= 319 && e <= 322 || e === 324 || e >= 328 && e <= 331 || e === 333 || e === 338 || e === 339 || e === 358 || e === 359 || e === 363 || e === 462 || e === 464 || e === 466 || e === 468 || e === 470 || e === 472 || e === 474 || e === 476 || e === 593 || e === 609 || e === 708 || e === 711 || e >= 713 && e <= 715 || e === 717 || e === 720 || e >= 728 && e <= 731 || e === 733 || e === 735 || e >= 768 && e <= 879 || e >= 913 && e <= 929 || e >= 931 && e <= 937 || e >= 945 && e <= 961 || e >= 963 && e <= 969 || e === 1025 || e >= 1040 && e <= 1103 || e === 1105 || e === 8208 || e >= 8211 && e <= 8214 || e === 8216 || e === 8217 || e === 8220 || e === 8221 || e >= 8224 && e <= 8226 || e >= 8228 && e <= 8231 || e === 8240 || e === 8242 || e === 8243 || e === 8245 || e === 8251 || e === 8254 || e === 8308 || e === 8319 || e >= 8321 && e <= 8324 || e === 8364 || e === 8451 || e === 8453 || e === 8457 || e === 8467 || e === 8470 || e === 8481 || e === 8482 || e === 8486 || e === 8491 || e === 8531 || e === 8532 || e >= 8539 && e <= 8542 || e >= 8544 && e <= 8555 || e >= 8560 && e <= 8569 || e === 8585 || e >= 8592 && e <= 8601 || e === 8632 || e === 8633 || e === 8658 || e === 8660 || e === 8679 || e === 8704 || e === 8706 || e === 8707 || e === 8711 || e === 8712 || e === 8715 || e === 8719 || e === 8721 || e === 8725 || e === 8730 || e >= 8733 && e <= 8736 || e === 8739 || e === 8741 || e >= 8743 && e <= 8748 || e === 8750 || e >= 8756 && e <= 8759 || e === 8764 || e === 8765 || e === 8776 || e === 8780 || e === 8786 || e === 8800 || e === 8801 || e >= 8804 && e <= 8807 || e === 8810 || e === 8811 || e === 8814 || e === 8815 || e === 8834 || e === 8835 || e === 8838 || e === 8839 || e === 8853 || e === 8857 || e === 8869 || e === 8895 || e === 8978 || e >= 9312 && e <= 9449 || e >= 9451 && e <= 9547 || e >= 9552 && e <= 9587 || e >= 9600 && e <= 9615 || e >= 9618 && e <= 9621 || e === 9632 || e === 9633 || e >= 9635 && e <= 9641 || e === 9650 || e === 9651 || e === 9654 || e === 9655 || e === 9660 || e === 9661 || e === 9664 || e === 9665 || e >= 9670 && e <= 9672 || e === 9675 || e >= 9678 && e <= 9681 || e >= 9698 && e <= 9701 || e === 9711 || e === 9733 || e === 9734 || e === 9737 || e === 9742 || e === 9743 || e === 9756 || e === 9758 || e === 9792 || e === 9794 || e === 9824 || e === 9825 || e >= 9827 && e <= 9829 || e >= 9831 && e <= 9834 || e === 9836 || e === 9837 || e === 9839 || e === 9886 || e === 9887 || e === 9919 || e >= 9926 && e <= 9933 || e >= 9935 && e <= 9939 || e >= 9941 && e <= 9953 || e === 9955 || e === 9960 || e === 9961 || e >= 9963 && e <= 9969 || e === 9972 || e >= 9974 && e <= 9977 || e === 9979 || e === 9980 || e === 9982 || e === 9983 || e === 10045 || e >= 10102 && e <= 10111 || e >= 11094 && e <= 11097 || e >= 12872 && e <= 12879 || e >= 57344 && e <= 63743 || e >= 65024 && e <= 65039 || e === 65533 || e >= 127232 && e <= 127242 || e >= 127248 && e <= 127277 || e >= 127280 && e <= 127337 || e >= 127344 && e <= 127373 || e === 127375 || e === 127376 || e >= 127387 && e <= 127404 || e >= 917760 && e <= 917999 || e >= 983040 && e <= 1048573 || e >= 1048576 && e <= 1114109, Nl = (e) => e === 12288 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510, Pl = (e) => e >= 4352 && e <= 4447 || e === 8986 || e === 8987 || e === 9001 || e === 9002 || e >= 9193 && e <= 9196 || e === 9200 || e === 9203 || e === 9725 || e === 9726 || e === 9748 || e === 9749 || e >= 9800 && e <= 9811 || e === 9855 || e === 9875 || e === 9889 || e === 9898 || e === 9899 || e === 9917 || e === 9918 || e === 9924 || e === 9925 || e === 9934 || e === 9940 || e === 9962 || e === 9970 || e === 9971 || e === 9973 || e === 9978 || e === 9981 || e === 9989 || e === 9994 || e === 9995 || e === 10024 || e === 10060 || e === 10062 || e >= 10067 && e <= 10069 || e === 10071 || e >= 10133 && e <= 10135 || e === 10160 || e === 10175 || e === 11035 || e === 11036 || e === 11088 || e === 11093 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12287 || e >= 12289 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12591 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12771 || e >= 12783 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 94176 && e <= 94180 || e === 94192 || e === 94193 || e >= 94208 && e <= 100343 || e >= 100352 && e <= 101589 || e >= 101632 && e <= 101640 || e >= 110576 && e <= 110579 || e >= 110581 && e <= 110587 || e === 110589 || e === 110590 || e >= 110592 && e <= 110882 || e === 110898 || e >= 110928 && e <= 110930 || e === 110933 || e >= 110948 && e <= 110951 || e >= 110960 && e <= 111355 || e === 126980 || e === 127183 || e === 127374 || e >= 127377 && e <= 127386 || e >= 127488 && e <= 127490 || e >= 127504 && e <= 127547 || e >= 127552 && e <= 127560 || e === 127568 || e === 127569 || e >= 127584 && e <= 127589 || e >= 127744 && e <= 127776 || e >= 127789 && e <= 127797 || e >= 127799 && e <= 127868 || e >= 127870 && e <= 127891 || e >= 127904 && e <= 127946 || e >= 127951 && e <= 127955 || e >= 127968 && e <= 127984 || e === 127988 || e >= 127992 && e <= 128062 || e === 128064 || e >= 128066 && e <= 128252 || e >= 128255 && e <= 128317 || e >= 128331 && e <= 128334 || e >= 128336 && e <= 128359 || e === 128378 || e === 128405 || e === 128406 || e === 128420 || e >= 128507 && e <= 128591 || e >= 128640 && e <= 128709 || e === 128716 || e >= 128720 && e <= 128722 || e >= 128725 && e <= 128727 || e >= 128732 && e <= 128735 || e === 128747 || e === 128748 || e >= 128756 && e <= 128764 || e >= 128992 && e <= 129003 || e === 129008 || e >= 129292 && e <= 129338 || e >= 129340 && e <= 129349 || e >= 129351 && e <= 129535 || e >= 129648 && e <= 129660 || e >= 129664 && e <= 129672 || e >= 129680 && e <= 129725 || e >= 129727 && e <= 129733 || e >= 129742 && e <= 129755 || e >= 129760 && e <= 129768 || e >= 129776 && e <= 129784 || e >= 131072 && e <= 196605 || e >= 196608 && e <= 262141, Zt = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y, ut = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y, ft = /\t{1,1000}/y, ei = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu"), ht = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y, Il = new RegExp("\\p{M}+", "gu"), Tl = { limit: 1 / 0, ellipsis: "" }, No = (e, t = {}, i = {}) => {
|
|
3200
|
+
const l = t.limit ?? 1 / 0, p = t.ellipsis ?? "", s = t?.ellipsisWidth ?? (p ? No(p, Tl, i).width : 0), c = i.ansiWidth ?? 0, h = i.controlWidth ?? 0, o = i.tabWidth ?? 8, m = i.ambiguousWidth ?? 1, n = i.emojiWidth ?? 2, u = i.fullWidthWidth ?? 2, a = i.regularWidth ?? 1, r = i.wideWidth ?? 2;
|
|
3201
|
+
let f = 0, d = 0, g = e.length, y = 0, v = !1, w = g, b = Math.max(0, l - s), S = 0, L = 0, O = 0, $ = 0;
|
|
3181
3202
|
e: for (; ; ) {
|
|
3182
|
-
if (L >
|
|
3183
|
-
const _ = e.slice(
|
|
3203
|
+
if (L > S || d >= g && d > f) {
|
|
3204
|
+
const _ = e.slice(S, L) || e.slice(f, d);
|
|
3184
3205
|
y = 0;
|
|
3185
3206
|
for (const P of _.replaceAll(Il, "")) {
|
|
3186
3207
|
const I = P.codePointAt(0) || 0;
|
|
3187
|
-
if (Nl(I) ? $ = u : Pl(I) ? $ = r : m !== a && _l(I) ? $ = m : $ = a, O + $ > b && (
|
|
3208
|
+
if (Nl(I) ? $ = u : Pl(I) ? $ = r : m !== a && _l(I) ? $ = m : $ = a, O + $ > b && (w = Math.min(w, Math.max(S, f) + y)), O + $ > l) {
|
|
3188
3209
|
v = !0;
|
|
3189
3210
|
break e;
|
|
3190
3211
|
}
|
|
3191
3212
|
y += P.length, O += $;
|
|
3192
3213
|
}
|
|
3193
|
-
|
|
3214
|
+
S = L = 0;
|
|
3194
3215
|
}
|
|
3195
3216
|
if (d >= g) break;
|
|
3196
3217
|
if (ht.lastIndex = d, ht.test(e)) {
|
|
3197
|
-
if (y = ht.lastIndex - d, $ = y * a, O + $ > b && (
|
|
3218
|
+
if (y = ht.lastIndex - d, $ = y * a, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / a))), O + $ > l) {
|
|
3198
3219
|
v = !0;
|
|
3199
3220
|
break;
|
|
3200
3221
|
}
|
|
3201
|
-
O += $,
|
|
3222
|
+
O += $, S = f, L = d, d = f = ht.lastIndex;
|
|
3202
3223
|
continue;
|
|
3203
3224
|
}
|
|
3204
3225
|
if (Zt.lastIndex = d, Zt.test(e)) {
|
|
3205
|
-
if (O + c > b && (
|
|
3226
|
+
if (O + c > b && (w = Math.min(w, d)), O + c > l) {
|
|
3206
3227
|
v = !0;
|
|
3207
3228
|
break;
|
|
3208
3229
|
}
|
|
3209
|
-
O += c,
|
|
3230
|
+
O += c, S = f, L = d, d = f = Zt.lastIndex;
|
|
3210
3231
|
continue;
|
|
3211
3232
|
}
|
|
3212
3233
|
if (ut.lastIndex = d, ut.test(e)) {
|
|
3213
|
-
if (y = ut.lastIndex - d, $ = y * h, O + $ > b && (
|
|
3234
|
+
if (y = ut.lastIndex - d, $ = y * h, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / h))), O + $ > l) {
|
|
3214
3235
|
v = !0;
|
|
3215
3236
|
break;
|
|
3216
3237
|
}
|
|
3217
|
-
O += $,
|
|
3238
|
+
O += $, S = f, L = d, d = f = ut.lastIndex;
|
|
3218
3239
|
continue;
|
|
3219
3240
|
}
|
|
3220
3241
|
if (ft.lastIndex = d, ft.test(e)) {
|
|
3221
|
-
if (y = ft.lastIndex - d, $ = y * o, O + $ > b && (
|
|
3242
|
+
if (y = ft.lastIndex - d, $ = y * o, O + $ > b && (w = Math.min(w, d + Math.floor((b - O) / o))), O + $ > l) {
|
|
3222
3243
|
v = !0;
|
|
3223
3244
|
break;
|
|
3224
3245
|
}
|
|
3225
|
-
O += $,
|
|
3246
|
+
O += $, S = f, L = d, d = f = ft.lastIndex;
|
|
3226
3247
|
continue;
|
|
3227
3248
|
}
|
|
3228
3249
|
if (ei.lastIndex = d, ei.test(e)) {
|
|
3229
|
-
if (O + n > b && (
|
|
3250
|
+
if (O + n > b && (w = Math.min(w, d)), O + n > l) {
|
|
3230
3251
|
v = !0;
|
|
3231
3252
|
break;
|
|
3232
3253
|
}
|
|
3233
|
-
O += n,
|
|
3254
|
+
O += n, S = f, L = d, d = f = ei.lastIndex;
|
|
3234
3255
|
continue;
|
|
3235
3256
|
}
|
|
3236
3257
|
d += 1;
|
|
3237
3258
|
}
|
|
3238
|
-
return { width: v ? b : O, index: v ?
|
|
3239
|
-
}, kl = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, ze = (e, t = {}) =>
|
|
3259
|
+
return { width: v ? b : O, index: v ? w : g, truncated: v, ellipsed: v && l >= s };
|
|
3260
|
+
}, kl = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 }, ze = (e, t = {}) => No(e, kl, t).width, Mt = "\x1B", Po = "", xl = 39, Fn = "\x07", Io = "[", Ml = "]", To = "m", Bn = `${Ml}8;;`, fs = new RegExp(`(?:\\${Io}(?<code>\\d+)m|\\${Bn}(?<uri>.*)${Fn})`, "y"), Rl = (e) => {
|
|
3240
3261
|
if (e >= 30 && e <= 37 || e >= 90 && e <= 97) return 39;
|
|
3241
3262
|
if (e >= 40 && e <= 47 || e >= 100 && e <= 107) return 49;
|
|
3242
3263
|
if (e === 1 || e === 2) return 22;
|
|
@@ -3246,12 +3267,12 @@ const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t
|
|
|
3246
3267
|
if (e === 8) return 28;
|
|
3247
3268
|
if (e === 9) return 29;
|
|
3248
3269
|
if (e === 0) return 0;
|
|
3249
|
-
}, hs = (e) => `${
|
|
3270
|
+
}, hs = (e) => `${Mt}${Io}${e}${To}`, ps = (e) => `${Mt}${Bn}${e}${Fn}`, Dl = (e) => e.map((t) => ze(t)), ti = (e, t, i) => {
|
|
3250
3271
|
const l = t[Symbol.iterator]();
|
|
3251
3272
|
let p = !1, s = !1, c = e.at(-1), h = c === void 0 ? 0 : ze(c), o = l.next(), m = l.next(), n = 0;
|
|
3252
3273
|
for (; !o.done; ) {
|
|
3253
3274
|
const u = o.value, a = ze(u);
|
|
3254
|
-
h + a <= i ? e[e.length - 1] += u : (e.push(u), h = 0), (u ===
|
|
3275
|
+
h + a <= i ? e[e.length - 1] += u : (e.push(u), h = 0), (u === Mt || u === Po) && (p = !0, s = t.startsWith(Bn, n + 1)), p ? s ? u === Fn && (p = !1, s = !1) : u === To && (p = !1) : (h += a, h === i && !m.done && (e.push(""), h = 0)), o = m, m = l.next(), n += u.length;
|
|
3255
3276
|
}
|
|
3256
3277
|
c = e.at(-1), !h && c !== void 0 && c.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
|
|
3257
3278
|
}, Fl = (e) => {
|
|
@@ -3291,7 +3312,7 @@ const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t
|
|
|
3291
3312
|
let u = n.next(), a = n.next(), r = 0;
|
|
3292
3313
|
for (; !u.done; ) {
|
|
3293
3314
|
const f = u.value, d = a.value;
|
|
3294
|
-
if (l += f, f ===
|
|
3315
|
+
if (l += f, f === Mt || f === Po) {
|
|
3295
3316
|
fs.lastIndex = r + 1;
|
|
3296
3317
|
const y = fs.exec(m)?.groups;
|
|
3297
3318
|
if (y?.code !== void 0) {
|
|
@@ -3299,7 +3320,7 @@ const bn = yl(), bl = () => process.env.CI === "true", fe = (e, t) => bn ? e : t
|
|
|
3299
3320
|
p = v === xl ? void 0 : v;
|
|
3300
3321
|
} else y?.uri !== void 0 && (s = y.uri.length === 0 ? void 0 : y.uri);
|
|
3301
3322
|
}
|
|
3302
|
-
const g = p ?
|
|
3323
|
+
const g = p ? Rl(p) : void 0;
|
|
3303
3324
|
d === `
|
|
3304
3325
|
` ? (s && (l += ps("")), p && g && (l += hs(g))) : f === `
|
|
3305
3326
|
` && (p && g && (l += hs(p)), s && (l += ps(s))), r += f.length, u = a, a = n.next();
|
|
@@ -3321,21 +3342,21 @@ const Gl = (e, t, i, l, p) => {
|
|
|
3321
3342
|
}
|
|
3322
3343
|
return { lineCount: s, removals: c };
|
|
3323
3344
|
}, ql = (e) => {
|
|
3324
|
-
const { cursor: t, options: i, style: l } = e, p = e.output ?? process.stdout, s =
|
|
3345
|
+
const { cursor: t, options: i, style: l } = e, p = e.output ?? process.stdout, s = xn(p), c = e.columnPadding ?? 0, h = e.rowPadding ?? 4, o = s - c, m = Oo(p), n = x.dim("..."), u = e.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(m - h, 0), r = Math.max(Math.min(u, a), 5);
|
|
3325
3346
|
let f = 0;
|
|
3326
3347
|
t >= r - 3 && (f = Math.max(Math.min(t - r + 3, i.length - r), 0));
|
|
3327
3348
|
let d = r < i.length && f > 0, g = r < i.length && f + r < i.length;
|
|
3328
3349
|
const y = Math.min(f + r, i.length), v = [];
|
|
3329
|
-
let
|
|
3330
|
-
d &&
|
|
3331
|
-
const b = f + (d ? 1 : 0),
|
|
3332
|
-
for (let O = b; O <
|
|
3350
|
+
let w = 0;
|
|
3351
|
+
d && w++, g && w++;
|
|
3352
|
+
const b = f + (d ? 1 : 0), S = y - (g ? 1 : 0);
|
|
3353
|
+
for (let O = b; O < S; O++) {
|
|
3333
3354
|
const $ = vn(l(i[O], O === t), o, { hard: !0, trim: !1 }).split(`
|
|
3334
3355
|
`);
|
|
3335
|
-
v.push($),
|
|
3356
|
+
v.push($), w += $.length;
|
|
3336
3357
|
}
|
|
3337
|
-
if (
|
|
3338
|
-
let O = 0, $ = 0, _ =
|
|
3358
|
+
if (w > a) {
|
|
3359
|
+
let O = 0, $ = 0, _ = w;
|
|
3339
3360
|
const P = t - b, I = (B, F) => Gl(v, _, B, F, a);
|
|
3340
3361
|
d ? ({ lineCount: _, removals: O } = I(0, P), _ > a && ({ lineCount: _, removals: $ } = I(P + 1, v.length))) : ({ lineCount: _, removals: $ } = I(P + 1, v.length), _ > a && ({ lineCount: _, removals: O } = I(0, P))), O > 0 && (d = !0, v.splice(0, O)), $ > 0 && (g = !0, v.splice(v.length - $, $));
|
|
3341
3362
|
}
|
|
@@ -3349,7 +3370,7 @@ const Gl = (e, t, i, l, p) => {
|
|
|
3349
3370
|
const s = e[p], c = await s({ results: i })?.catch((h) => {
|
|
3350
3371
|
throw h;
|
|
3351
3372
|
});
|
|
3352
|
-
if (typeof t?.onCancel == "function" &&
|
|
3373
|
+
if (typeof t?.onCancel == "function" && Lo(c)) {
|
|
3353
3374
|
i[p] = "canceled", t.onCancel({ results: i });
|
|
3354
3375
|
continue;
|
|
3355
3376
|
}
|
|
@@ -3381,21 +3402,21 @@ const Gl = (e, t, i, l, p) => {
|
|
|
3381
3402
|
Ae.warn(e, t);
|
|
3382
3403
|
}, error: (e, t) => {
|
|
3383
3404
|
Ae.message(e, { ...t, symbol: x.red(Ol) });
|
|
3384
|
-
} },
|
|
3405
|
+
} }, ko = (e = "", t) => {
|
|
3385
3406
|
process.stdout.write(`${x.gray(Le)} ${x.red(e)}
|
|
3386
3407
|
|
|
3387
3408
|
`);
|
|
3388
3409
|
}, Ul = (e = "", t) => {
|
|
3389
|
-
process.stdout.write(`${x.gray(
|
|
3410
|
+
process.stdout.write(`${x.gray(Sl)} ${e}
|
|
3390
3411
|
`);
|
|
3391
|
-
},
|
|
3412
|
+
}, Gn = (e = "", t) => {
|
|
3392
3413
|
process.stdout.write(`${x.gray(J)}
|
|
3393
3414
|
${x.gray(Le)} ${e}
|
|
3394
3415
|
|
|
3395
3416
|
`);
|
|
3396
3417
|
}, Hl = (e) => new dl({ validate: e.validate, mask: e.mask ?? El, signal: e.signal, input: e.input, output: e.output, render() {
|
|
3397
3418
|
const t = e.withGuide ?? ye.withGuide, i = `${t ? `${x.gray(J)}
|
|
3398
|
-
` : ""}${
|
|
3419
|
+
` : ""}${Dn(this.state)} ${e.message}
|
|
3399
3420
|
`, l = this.userInputWithCursor, p = this.masked;
|
|
3400
3421
|
switch (this.state) {
|
|
3401
3422
|
case "error": {
|
|
@@ -3424,13 +3445,13 @@ ${c}
|
|
|
3424
3445
|
} }).prompt(), Vl = x.magenta, Wl = ({ indicator: e = "dots", onCancel: t, output: i = process.stdout, cancelMessage: l, errorMessage: p, frames: s = bn ? ["◒", "◐", "◓", "◑"] : ["•", "o", "O", "0"], delay: c = bn ? 80 : 120, signal: h, ...o } = {}) => {
|
|
3425
3446
|
const m = bl();
|
|
3426
3447
|
let n, u, a = !1, r = !1, f = "", d, g = performance.now();
|
|
3427
|
-
const y =
|
|
3428
|
-
const
|
|
3429
|
-
r = D === 1, a && (F(
|
|
3430
|
-
}, b = () =>
|
|
3431
|
-
process.on("uncaughtExceptionMonitor", b), process.on("unhandledRejection", b), process.on("SIGINT",
|
|
3448
|
+
const y = xn(i), v = o?.styleFrame ?? Vl, w = (D) => {
|
|
3449
|
+
const R = D > 1 ? p ?? ye.messages.error : l ?? ye.messages.cancel;
|
|
3450
|
+
r = D === 1, a && (F(R, D), r && typeof t == "function" && t());
|
|
3451
|
+
}, b = () => w(2), S = () => w(1), L = () => {
|
|
3452
|
+
process.on("uncaughtExceptionMonitor", b), process.on("unhandledRejection", b), process.on("SIGINT", S), process.on("SIGTERM", S), process.on("exit", w), h && h.addEventListener("abort", S);
|
|
3432
3453
|
}, O = () => {
|
|
3433
|
-
process.removeListener("uncaughtExceptionMonitor", b), process.removeListener("unhandledRejection", b), process.removeListener("SIGINT",
|
|
3454
|
+
process.removeListener("uncaughtExceptionMonitor", b), process.removeListener("unhandledRejection", b), process.removeListener("SIGINT", S), process.removeListener("SIGTERM", S), process.removeListener("exit", w), h && h.removeEventListener("abort", S);
|
|
3434
3455
|
}, $ = () => {
|
|
3435
3456
|
if (d === void 0) return;
|
|
3436
3457
|
m && i.write(`
|
|
@@ -3439,30 +3460,30 @@ ${c}
|
|
|
3439
3460
|
`);
|
|
3440
3461
|
D.length > 1 && i.write(ne.cursor.up(D.length - 1)), i.write(ne.cursor.to(0)), i.write(ne.erase.down());
|
|
3441
3462
|
}, _ = (D) => D.replace(/\.+$/, ""), P = (D) => {
|
|
3442
|
-
const
|
|
3463
|
+
const R = (performance.now() - D) / 1e3, G = Math.floor(R / 60), T = Math.floor(R % 60);
|
|
3443
3464
|
return G > 0 ? `[${G}m ${T}s]` : `[${T}s]`;
|
|
3444
3465
|
}, I = o.withGuide ?? ye.withGuide, B = (D = "") => {
|
|
3445
3466
|
a = !0, n = pl({ output: i }), f = _(D), g = performance.now(), I && i.write(`${x.gray(J)}
|
|
3446
3467
|
`);
|
|
3447
|
-
let
|
|
3468
|
+
let R = 0, G = 0;
|
|
3448
3469
|
L(), u = setInterval(() => {
|
|
3449
3470
|
if (m && f === d) return;
|
|
3450
3471
|
$(), d = f;
|
|
3451
|
-
const T = v(s[
|
|
3452
|
-
let
|
|
3453
|
-
if (m)
|
|
3454
|
-
else if (e === "timer")
|
|
3472
|
+
const T = v(s[R]);
|
|
3473
|
+
let K;
|
|
3474
|
+
if (m) K = `${T} ${f}...`;
|
|
3475
|
+
else if (e === "timer") K = `${T} ${f} ${P(g)}`;
|
|
3455
3476
|
else {
|
|
3456
3477
|
const U = ".".repeat(Math.floor(G)).slice(0, 3);
|
|
3457
|
-
|
|
3478
|
+
K = `${T} ${f}${U}`;
|
|
3458
3479
|
}
|
|
3459
|
-
const j = vn(
|
|
3460
|
-
i.write(j),
|
|
3480
|
+
const j = vn(K, y, { hard: !0, trim: !1 });
|
|
3481
|
+
i.write(j), R = R + 1 < s.length ? R + 1 : 0, G = G < 4 ? G + 0.125 : 0;
|
|
3461
3482
|
}, c);
|
|
3462
|
-
}, F = (D = "",
|
|
3483
|
+
}, F = (D = "", R = 0, G = !1) => {
|
|
3463
3484
|
if (!a) return;
|
|
3464
3485
|
a = !1, clearInterval(u), $();
|
|
3465
|
-
const T =
|
|
3486
|
+
const T = R === 0 ? x.green(Rn) : R === 1 ? x.red($o) : x.red(_o);
|
|
3466
3487
|
f = D ?? f, G || (e === "timer" ? i.write(`${T} ${f} ${P(g)}
|
|
3467
3488
|
`) : i.write(`${T} ${f}
|
|
3468
3489
|
`)), O(), n();
|
|
@@ -3475,7 +3496,7 @@ ${c}
|
|
|
3475
3496
|
}, pt = (e, t) => e.includes(`
|
|
3476
3497
|
`) ? e.split(`
|
|
3477
3498
|
`).map((i) => t(i)).join(`
|
|
3478
|
-
`) : t(e),
|
|
3499
|
+
`) : t(e), Kl = (e) => {
|
|
3479
3500
|
const t = (i, l) => {
|
|
3480
3501
|
const p = i.label ?? String(i.value);
|
|
3481
3502
|
switch (l) {
|
|
@@ -3484,7 +3505,7 @@ ${c}
|
|
|
3484
3505
|
case "selected":
|
|
3485
3506
|
return `${pt(p, x.dim)}`;
|
|
3486
3507
|
case "active":
|
|
3487
|
-
return `${x.green(
|
|
3508
|
+
return `${x.green(wl)} ${p}${i.hint ? ` ${x.dim(`(${i.hint})`)}` : ""}`;
|
|
3488
3509
|
case "cancelled":
|
|
3489
3510
|
return `${pt(p, (s) => x.strikethrough(x.dim(s)))}`;
|
|
3490
3511
|
default:
|
|
@@ -3492,7 +3513,7 @@ ${c}
|
|
|
3492
3513
|
}
|
|
3493
3514
|
};
|
|
3494
3515
|
return new ml({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
|
|
3495
|
-
const i = e.withGuide ?? ye.withGuide, l = `${
|
|
3516
|
+
const i = e.withGuide ?? ye.withGuide, l = `${Dn(this.state)} `, p = `${$l(this.state)} `, s = Qt(e.output, e.message, p, l), c = `${i ? `${x.gray(J)}
|
|
3496
3517
|
` : ""}${s}
|
|
3497
3518
|
`;
|
|
3498
3519
|
switch (this.state) {
|
|
@@ -3517,9 +3538,9 @@ ${o}
|
|
|
3517
3538
|
} }).prompt();
|
|
3518
3539
|
};
|
|
3519
3540
|
`${x.gray(J)}`;
|
|
3520
|
-
const
|
|
3541
|
+
const Yl = (e) => new gl({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
|
|
3521
3542
|
const t = e?.withGuide ?? ye.withGuide, i = `${`${t ? `${x.gray(J)}
|
|
3522
|
-
` : ""}${
|
|
3543
|
+
` : ""}${Dn(this.state)} `}${e.message}
|
|
3523
3544
|
`, l = e.placeholder ? x.inverse(e.placeholder[0]) + x.dim(e.placeholder.slice(1)) : x.inverse(x.hidden("_")), p = this.userInput ? this.userInputWithCursor : l, s = this.value ?? "";
|
|
3524
3545
|
switch (this.state) {
|
|
3525
3546
|
case "error": {
|
|
@@ -3691,8 +3712,8 @@ function me(e, t = globalThis.Deno ? globalThis.Deno.args : q.argv) {
|
|
|
3691
3712
|
return l !== -1 && (p === -1 || l < p);
|
|
3692
3713
|
}
|
|
3693
3714
|
const { env: X } = q;
|
|
3694
|
-
let
|
|
3695
|
-
me("no-color") || me("no-colors") || me("color=false") || me("color=never") ?
|
|
3715
|
+
let Pt;
|
|
3716
|
+
me("no-color") || me("no-colors") || me("color=false") || me("color=never") ? Pt = 0 : (me("color") || me("colors") || me("color=true") || me("color=always")) && (Pt = 1);
|
|
3696
3717
|
function Ql() {
|
|
3697
3718
|
if ("FORCE_COLOR" in X)
|
|
3698
3719
|
return X.FORCE_COLOR === "true" ? 1 : X.FORCE_COLOR === "false" ? 0 : X.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(X.FORCE_COLOR, 10), 3);
|
|
@@ -3707,8 +3728,8 @@ function Zl(e) {
|
|
|
3707
3728
|
}
|
|
3708
3729
|
function ec(e, { streamIsTTY: t, sniffFlags: i = !0 } = {}) {
|
|
3709
3730
|
const l = Ql();
|
|
3710
|
-
l !== void 0 && (
|
|
3711
|
-
const p = i ?
|
|
3731
|
+
l !== void 0 && (Pt = l);
|
|
3732
|
+
const p = i ? Pt : l;
|
|
3712
3733
|
if (p === 0)
|
|
3713
3734
|
return 0;
|
|
3714
3735
|
if (i) {
|
|
@@ -3725,7 +3746,7 @@ function ec(e, { streamIsTTY: t, sniffFlags: i = !0 } = {}) {
|
|
|
3725
3746
|
if (X.TERM === "dumb")
|
|
3726
3747
|
return s;
|
|
3727
3748
|
if (q.platform === "win32") {
|
|
3728
|
-
const c =
|
|
3749
|
+
const c = Oa.release().split(".");
|
|
3729
3750
|
return Number(c[0]) >= 10 && Number(c[2]) >= 10586 ? Number(c[2]) >= 14931 ? 3 : 2 : 1;
|
|
3730
3751
|
}
|
|
3731
3752
|
if ("CI" in X)
|
|
@@ -3753,8 +3774,8 @@ function ys(e, t = {}) {
|
|
|
3753
3774
|
return Zl(i);
|
|
3754
3775
|
}
|
|
3755
3776
|
const tc = {
|
|
3756
|
-
stdout: ys({ isTTY:
|
|
3757
|
-
stderr: ys({ isTTY:
|
|
3777
|
+
stdout: ys({ isTTY: Zn.isatty(1) }),
|
|
3778
|
+
stderr: ys({ isTTY: Zn.isatty(2) })
|
|
3758
3779
|
};
|
|
3759
3780
|
function ic(e, t, i) {
|
|
3760
3781
|
let l = e.indexOf(t);
|
|
@@ -3778,7 +3799,7 @@ function nc(e, t, i, l) {
|
|
|
3778
3799
|
} while (l !== -1);
|
|
3779
3800
|
return s += e.slice(p), s;
|
|
3780
3801
|
}
|
|
3781
|
-
const { stdout: bs, stderr: vs } = tc,
|
|
3802
|
+
const { stdout: bs, stderr: vs } = tc, Sn = /* @__PURE__ */ Symbol("GENERATOR"), Re = /* @__PURE__ */ Symbol("STYLER"), Xe = /* @__PURE__ */ Symbol("IS_EMPTY"), Ss = [
|
|
3782
3803
|
"ansi",
|
|
3783
3804
|
"ansi",
|
|
3784
3805
|
"ansi256",
|
|
@@ -3799,24 +3820,24 @@ Object.setPrototypeOf(Qe.prototype, Function.prototype);
|
|
|
3799
3820
|
for (const [e, t] of Object.entries(be))
|
|
3800
3821
|
De[e] = {
|
|
3801
3822
|
get() {
|
|
3802
|
-
const i =
|
|
3823
|
+
const i = It(this, En(t.open, t.close, this[Re]), this[Xe]);
|
|
3803
3824
|
return Object.defineProperty(this, e, { value: i }), i;
|
|
3804
3825
|
}
|
|
3805
3826
|
};
|
|
3806
3827
|
De.visible = {
|
|
3807
3828
|
get() {
|
|
3808
|
-
const e =
|
|
3829
|
+
const e = It(this, this[Re], !0);
|
|
3809
3830
|
return Object.defineProperty(this, "visible", { value: e }), e;
|
|
3810
3831
|
}
|
|
3811
3832
|
};
|
|
3812
|
-
const
|
|
3833
|
+
const wn = (e, t, i, ...l) => e === "rgb" ? t === "ansi16m" ? be[i].ansi16m(...l) : t === "ansi256" ? be[i].ansi256(be.rgbToAnsi256(...l)) : be[i].ansi(be.rgbToAnsi(...l)) : e === "hex" ? wn("rgb", t, i, ...be.hexToRgb(...l)) : be[i][e](...l), oc = ["rgb", "hex", "ansi256"];
|
|
3813
3834
|
for (const e of oc) {
|
|
3814
3835
|
De[e] = {
|
|
3815
3836
|
get() {
|
|
3816
3837
|
const { level: i } = this;
|
|
3817
3838
|
return function(...l) {
|
|
3818
|
-
const p = En(
|
|
3819
|
-
return
|
|
3839
|
+
const p = En(wn(e, Ss[i], "color", ...l), be.color.close, this[Re]);
|
|
3840
|
+
return It(this, p, this[Xe]);
|
|
3820
3841
|
};
|
|
3821
3842
|
}
|
|
3822
3843
|
};
|
|
@@ -3825,8 +3846,8 @@ for (const e of oc) {
|
|
|
3825
3846
|
get() {
|
|
3826
3847
|
const { level: i } = this;
|
|
3827
3848
|
return function(...l) {
|
|
3828
|
-
const p = En(
|
|
3829
|
-
return
|
|
3849
|
+
const p = En(wn(e, Ss[i], "bgColor", ...l), be.bgColor.close, this[Re]);
|
|
3850
|
+
return It(this, p, this[Xe]);
|
|
3830
3851
|
};
|
|
3831
3852
|
}
|
|
3832
3853
|
};
|
|
@@ -3837,10 +3858,10 @@ const ac = Object.defineProperties(() => {
|
|
|
3837
3858
|
level: {
|
|
3838
3859
|
enumerable: !0,
|
|
3839
3860
|
get() {
|
|
3840
|
-
return this[
|
|
3861
|
+
return this[Sn].level;
|
|
3841
3862
|
},
|
|
3842
3863
|
set(e) {
|
|
3843
|
-
this[
|
|
3864
|
+
this[Sn].level = e;
|
|
3844
3865
|
}
|
|
3845
3866
|
}
|
|
3846
3867
|
}), En = (e, t, i) => {
|
|
@@ -3852,13 +3873,13 @@ const ac = Object.defineProperties(() => {
|
|
|
3852
3873
|
closeAll: p,
|
|
3853
3874
|
parent: i
|
|
3854
3875
|
};
|
|
3855
|
-
},
|
|
3876
|
+
}, It = (e, t, i) => {
|
|
3856
3877
|
const l = (...p) => lc(l, p.length === 1 ? "" + p[0] : p.join(" "));
|
|
3857
|
-
return Object.setPrototypeOf(l, ac), l[
|
|
3878
|
+
return Object.setPrototypeOf(l, ac), l[Sn] = e, l[Re] = t, l[Xe] = i, l;
|
|
3858
3879
|
}, lc = (e, t) => {
|
|
3859
3880
|
if (e.level <= 0 || !t)
|
|
3860
3881
|
return e[Xe] ? "" : t;
|
|
3861
|
-
let i = e[
|
|
3882
|
+
let i = e[Re];
|
|
3862
3883
|
if (i === void 0)
|
|
3863
3884
|
return t;
|
|
3864
3885
|
const { openAll: l, closeAll: p } = i;
|
|
@@ -3870,11 +3891,11 @@ const ac = Object.defineProperties(() => {
|
|
|
3870
3891
|
return s !== -1 && (t = nc(t, p, l, s)), l + t + p;
|
|
3871
3892
|
};
|
|
3872
3893
|
Object.defineProperties(Qe.prototype, De);
|
|
3873
|
-
const
|
|
3894
|
+
const xo = Qe();
|
|
3874
3895
|
Qe({ level: vs ? vs.level : 0 });
|
|
3875
|
-
var _t = { exports: {} }, cc = _t.exports,
|
|
3896
|
+
var _t = { exports: {} }, cc = _t.exports, ws;
|
|
3876
3897
|
function uc() {
|
|
3877
|
-
return
|
|
3898
|
+
return ws || (ws = 1, (function(e, t) {
|
|
3878
3899
|
(function(i, l) {
|
|
3879
3900
|
e.exports = l();
|
|
3880
3901
|
})(cc, (function() {
|
|
@@ -3919,8 +3940,8 @@ function uc() {
|
|
|
3919
3940
|
return (A.r * 299 + A.g * 587 + A.b * 114) / 1e3;
|
|
3920
3941
|
},
|
|
3921
3942
|
getLuminance: function() {
|
|
3922
|
-
var A = this.toRgb(), C, N,
|
|
3923
|
-
return C = A.r / 255, N = A.g / 255,
|
|
3943
|
+
var A = this.toRgb(), C, N, M, k, V, Y;
|
|
3944
|
+
return C = A.r / 255, N = A.g / 255, M = A.b / 255, C <= 0.03928 ? k = C / 12.92 : k = Math.pow((C + 0.055) / 1.055, 2.4), N <= 0.03928 ? V = N / 12.92 : V = Math.pow((N + 0.055) / 1.055, 2.4), M <= 0.03928 ? Y = M / 12.92 : Y = Math.pow((M + 0.055) / 1.055, 2.4), 0.2126 * k + 0.7152 * V + 0.0722 * Y;
|
|
3924
3945
|
},
|
|
3925
3946
|
setAlpha: function(A) {
|
|
3926
3947
|
return this._a = D(A), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
@@ -3935,8 +3956,8 @@ function uc() {
|
|
|
3935
3956
|
};
|
|
3936
3957
|
},
|
|
3937
3958
|
toHsvString: function() {
|
|
3938
|
-
var A = n(this._r, this._g, this._b), C = Math.round(A.h * 360), N = Math.round(A.s * 100),
|
|
3939
|
-
return this._a == 1 ? "hsv(" + C + ", " + N + "%, " +
|
|
3959
|
+
var A = n(this._r, this._g, this._b), C = Math.round(A.h * 360), N = Math.round(A.s * 100), M = Math.round(A.v * 100);
|
|
3960
|
+
return this._a == 1 ? "hsv(" + C + ", " + N + "%, " + M + "%)" : "hsva(" + C + ", " + N + "%, " + M + "%, " + this._roundA + ")";
|
|
3940
3961
|
},
|
|
3941
3962
|
toHsl: function() {
|
|
3942
3963
|
var A = o(this._r, this._g, this._b);
|
|
@@ -3948,8 +3969,8 @@ function uc() {
|
|
|
3948
3969
|
};
|
|
3949
3970
|
},
|
|
3950
3971
|
toHslString: function() {
|
|
3951
|
-
var A = o(this._r, this._g, this._b), C = Math.round(A.h * 360), N = Math.round(A.s * 100),
|
|
3952
|
-
return this._a == 1 ? "hsl(" + C + ", " + N + "%, " +
|
|
3972
|
+
var A = o(this._r, this._g, this._b), C = Math.round(A.h * 360), N = Math.round(A.s * 100), M = Math.round(A.l * 100);
|
|
3973
|
+
return this._a == 1 ? "hsl(" + C + ", " + N + "%, " + M + "%)" : "hsla(" + C + ", " + N + "%, " + M + "%, " + this._roundA + ")";
|
|
3953
3974
|
},
|
|
3954
3975
|
toHex: function(A) {
|
|
3955
3976
|
return a(this._r, this._g, this._b, A);
|
|
@@ -3976,30 +3997,30 @@ function uc() {
|
|
|
3976
3997
|
},
|
|
3977
3998
|
toPercentageRgb: function() {
|
|
3978
3999
|
return {
|
|
3979
|
-
r: Math.round(
|
|
3980
|
-
g: Math.round(
|
|
3981
|
-
b: Math.round(
|
|
4000
|
+
r: Math.round(R(this._r, 255) * 100) + "%",
|
|
4001
|
+
g: Math.round(R(this._g, 255) * 100) + "%",
|
|
4002
|
+
b: Math.round(R(this._b, 255) * 100) + "%",
|
|
3982
4003
|
a: this._a
|
|
3983
4004
|
};
|
|
3984
4005
|
},
|
|
3985
4006
|
toPercentageRgbString: function() {
|
|
3986
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
4007
|
+
return this._a == 1 ? "rgb(" + Math.round(R(this._r, 255) * 100) + "%, " + Math.round(R(this._g, 255) * 100) + "%, " + Math.round(R(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(R(this._r, 255) * 100) + "%, " + Math.round(R(this._g, 255) * 100) + "%, " + Math.round(R(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
3987
4008
|
},
|
|
3988
4009
|
toName: function() {
|
|
3989
4010
|
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : B[a(this._r, this._g, this._b, !0)] || !1;
|
|
3990
4011
|
},
|
|
3991
4012
|
toFilter: function(A) {
|
|
3992
|
-
var C = "#" + f(this._r, this._g, this._b, this._a), N = C,
|
|
4013
|
+
var C = "#" + f(this._r, this._g, this._b, this._a), N = C, M = this._gradientType ? "GradientType = 1, " : "";
|
|
3993
4014
|
if (A) {
|
|
3994
4015
|
var k = s(A);
|
|
3995
4016
|
N = "#" + f(k._r, k._g, k._b, k._a);
|
|
3996
4017
|
}
|
|
3997
|
-
return "progid:DXImageTransform.Microsoft.gradient(" +
|
|
4018
|
+
return "progid:DXImageTransform.Microsoft.gradient(" + M + "startColorstr=" + C + ",endColorstr=" + N + ")";
|
|
3998
4019
|
},
|
|
3999
4020
|
toString: function(A) {
|
|
4000
4021
|
var C = !!A;
|
|
4001
4022
|
A = A || this._format;
|
|
4002
|
-
var N = !1,
|
|
4023
|
+
var N = !1, M = this._a < 1 && this._a >= 0, k = !C && M && (A === "hex" || A === "hex6" || A === "hex3" || A === "hex4" || A === "hex8" || A === "name");
|
|
4003
4024
|
return k ? A === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (A === "rgb" && (N = this.toRgbString()), A === "prgb" && (N = this.toPercentageRgbString()), (A === "hex" || A === "hex6") && (N = this.toHexString()), A === "hex3" && (N = this.toHexString(!0)), A === "hex4" && (N = this.toHex8String(!0)), A === "hex8" && (N = this.toHex8String()), A === "name" && (N = this.toName()), A === "hsl" && (N = this.toHslString()), A === "hsv" && (N = this.toHsvString()), N || this.toHexString());
|
|
4004
4025
|
},
|
|
4005
4026
|
clone: function() {
|
|
@@ -4013,7 +4034,7 @@ function uc() {
|
|
|
4013
4034
|
return this._applyModification(v, arguments);
|
|
4014
4035
|
},
|
|
4015
4036
|
brighten: function() {
|
|
4016
|
-
return this._applyModification(
|
|
4037
|
+
return this._applyModification(w, arguments);
|
|
4017
4038
|
},
|
|
4018
4039
|
darken: function() {
|
|
4019
4040
|
return this._applyModification(b, arguments);
|
|
@@ -4028,7 +4049,7 @@ function uc() {
|
|
|
4028
4049
|
return this._applyModification(y, arguments);
|
|
4029
4050
|
},
|
|
4030
4051
|
spin: function() {
|
|
4031
|
-
return this._applyModification(
|
|
4052
|
+
return this._applyModification(S, arguments);
|
|
4032
4053
|
},
|
|
4033
4054
|
_applyCombination: function(A, C) {
|
|
4034
4055
|
return A.apply(null, [this].concat([].slice.call(C)));
|
|
@@ -4069,10 +4090,10 @@ function uc() {
|
|
|
4069
4090
|
r: 0,
|
|
4070
4091
|
g: 0,
|
|
4071
4092
|
b: 0
|
|
4072
|
-
}, C = 1, N = null,
|
|
4073
|
-
return typeof E == "string" && (E =
|
|
4093
|
+
}, C = 1, N = null, M = null, k = null, V = !1, Y = !1;
|
|
4094
|
+
return typeof E == "string" && (E = Ea(E)), i(E) == "object" && (Se(E.r) && Se(E.g) && Se(E.b) ? (A = h(E.r, E.g, E.b), V = !0, Y = String(E.r).substr(-1) === "%" ? "prgb" : "rgb") : Se(E.h) && Se(E.s) && Se(E.v) ? (N = ie(E.s), M = ie(E.v), A = u(E.h, N, M), V = !0, Y = "hsv") : Se(E.h) && Se(E.s) && Se(E.l) && (N = ie(E.s), k = ie(E.l), A = m(E.h, N, k), V = !0, Y = "hsl"), E.hasOwnProperty("a") && (C = E.a)), C = D(C), {
|
|
4074
4095
|
ok: V,
|
|
4075
|
-
format: E.format ||
|
|
4096
|
+
format: E.format || Y,
|
|
4076
4097
|
r: Math.min(255, Math.max(A.r, 0)),
|
|
4077
4098
|
g: Math.min(255, Math.max(A.g, 0)),
|
|
4078
4099
|
b: Math.min(255, Math.max(A.b, 0)),
|
|
@@ -4081,19 +4102,19 @@ function uc() {
|
|
|
4081
4102
|
}
|
|
4082
4103
|
function h(E, A, C) {
|
|
4083
4104
|
return {
|
|
4084
|
-
r:
|
|
4085
|
-
g:
|
|
4086
|
-
b:
|
|
4105
|
+
r: R(E, 255) * 255,
|
|
4106
|
+
g: R(A, 255) * 255,
|
|
4107
|
+
b: R(C, 255) * 255
|
|
4087
4108
|
};
|
|
4088
4109
|
}
|
|
4089
4110
|
function o(E, A, C) {
|
|
4090
|
-
E =
|
|
4091
|
-
var N = Math.max(E, A, C),
|
|
4092
|
-
if (N ==
|
|
4111
|
+
E = R(E, 255), A = R(A, 255), C = R(C, 255);
|
|
4112
|
+
var N = Math.max(E, A, C), M = Math.min(E, A, C), k, V, Y = (N + M) / 2;
|
|
4113
|
+
if (N == M)
|
|
4093
4114
|
k = V = 0;
|
|
4094
4115
|
else {
|
|
4095
|
-
var Z = N -
|
|
4096
|
-
switch (V =
|
|
4116
|
+
var Z = N - M;
|
|
4117
|
+
switch (V = Y > 0.5 ? Z / (2 - N - M) : Z / (N + M), N) {
|
|
4097
4118
|
case E:
|
|
4098
4119
|
k = (A - C) / Z + (A < C ? 6 : 0);
|
|
4099
4120
|
break;
|
|
@@ -4109,31 +4130,31 @@ function uc() {
|
|
|
4109
4130
|
return {
|
|
4110
4131
|
h: k,
|
|
4111
4132
|
s: V,
|
|
4112
|
-
l:
|
|
4133
|
+
l: Y
|
|
4113
4134
|
};
|
|
4114
4135
|
}
|
|
4115
4136
|
function m(E, A, C) {
|
|
4116
|
-
var N,
|
|
4117
|
-
E =
|
|
4137
|
+
var N, M, k;
|
|
4138
|
+
E = R(E, 360), A = R(A, 100), C = R(C, 100);
|
|
4118
4139
|
function V(de, Fe, ge) {
|
|
4119
4140
|
return ge < 0 && (ge += 1), ge > 1 && (ge -= 1), ge < 1 / 6 ? de + (Fe - de) * 6 * ge : ge < 1 / 2 ? Fe : ge < 2 / 3 ? de + (Fe - de) * (2 / 3 - ge) * 6 : de;
|
|
4120
4141
|
}
|
|
4121
4142
|
if (A === 0)
|
|
4122
|
-
N =
|
|
4143
|
+
N = M = k = C;
|
|
4123
4144
|
else {
|
|
4124
|
-
var
|
|
4125
|
-
N = V(Z,
|
|
4145
|
+
var Y = C < 0.5 ? C * (1 + A) : C + A - C * A, Z = 2 * C - Y;
|
|
4146
|
+
N = V(Z, Y, E + 1 / 3), M = V(Z, Y, E), k = V(Z, Y, E - 1 / 3);
|
|
4126
4147
|
}
|
|
4127
4148
|
return {
|
|
4128
4149
|
r: N * 255,
|
|
4129
|
-
g:
|
|
4150
|
+
g: M * 255,
|
|
4130
4151
|
b: k * 255
|
|
4131
4152
|
};
|
|
4132
4153
|
}
|
|
4133
4154
|
function n(E, A, C) {
|
|
4134
|
-
E =
|
|
4135
|
-
var N = Math.max(E, A, C),
|
|
4136
|
-
if (V = N === 0 ? 0 : Z / N, N ==
|
|
4155
|
+
E = R(E, 255), A = R(A, 255), C = R(C, 255);
|
|
4156
|
+
var N = Math.max(E, A, C), M = Math.min(E, A, C), k, V, Y = N, Z = N - M;
|
|
4157
|
+
if (V = N === 0 ? 0 : Z / N, N == M)
|
|
4137
4158
|
k = 0;
|
|
4138
4159
|
else {
|
|
4139
4160
|
switch (N) {
|
|
@@ -4152,12 +4173,12 @@ function uc() {
|
|
|
4152
4173
|
return {
|
|
4153
4174
|
h: k,
|
|
4154
4175
|
s: V,
|
|
4155
|
-
v:
|
|
4176
|
+
v: Y
|
|
4156
4177
|
};
|
|
4157
4178
|
}
|
|
4158
4179
|
function u(E, A, C) {
|
|
4159
|
-
E =
|
|
4160
|
-
var N = Math.floor(E),
|
|
4180
|
+
E = R(E, 360) * 6, A = R(A, 100), C = R(C, 100);
|
|
4181
|
+
var N = Math.floor(E), M = E - N, k = C * (1 - A), V = C * (1 - M * A), Y = C * (1 - (1 - M) * A), Z = N % 6, de = [C, V, k, k, Y, C][Z], Fe = [Y, C, C, V, k, k][Z], ge = [k, k, Y, C, C, V][Z];
|
|
4161
4182
|
return {
|
|
4162
4183
|
r: de * 255,
|
|
4163
4184
|
g: Fe * 255,
|
|
@@ -4165,16 +4186,16 @@ function uc() {
|
|
|
4165
4186
|
};
|
|
4166
4187
|
}
|
|
4167
4188
|
function a(E, A, C, N) {
|
|
4168
|
-
var
|
|
4169
|
-
return N &&
|
|
4189
|
+
var M = [U(Math.round(E).toString(16)), U(Math.round(A).toString(16)), U(Math.round(C).toString(16))];
|
|
4190
|
+
return N && M[0].charAt(0) == M[0].charAt(1) && M[1].charAt(0) == M[1].charAt(1) && M[2].charAt(0) == M[2].charAt(1) ? M[0].charAt(0) + M[1].charAt(0) + M[2].charAt(0) : M.join("");
|
|
4170
4191
|
}
|
|
4171
|
-
function r(E, A, C, N,
|
|
4192
|
+
function r(E, A, C, N, M) {
|
|
4172
4193
|
var k = [U(Math.round(E).toString(16)), U(Math.round(A).toString(16)), U(Math.round(C).toString(16)), U(ve(N))];
|
|
4173
|
-
return
|
|
4194
|
+
return M && k[0].charAt(0) == k[0].charAt(1) && k[1].charAt(0) == k[1].charAt(1) && k[2].charAt(0) == k[2].charAt(1) && k[3].charAt(0) == k[3].charAt(1) ? k[0].charAt(0) + k[1].charAt(0) + k[2].charAt(0) + k[3].charAt(0) : k.join("");
|
|
4174
4195
|
}
|
|
4175
4196
|
function f(E, A, C, N) {
|
|
4176
|
-
var
|
|
4177
|
-
return
|
|
4197
|
+
var M = [U(ve(N)), U(Math.round(E).toString(16)), U(Math.round(A).toString(16)), U(Math.round(C).toString(16))];
|
|
4198
|
+
return M.join("");
|
|
4178
4199
|
}
|
|
4179
4200
|
s.equals = function(E, A) {
|
|
4180
4201
|
return !E || !A ? !1 : s(E).toRgbString() == s(A).toRgbString();
|
|
@@ -4203,7 +4224,7 @@ function uc() {
|
|
|
4203
4224
|
var C = s(E).toHsl();
|
|
4204
4225
|
return C.l += A / 100, C.l = G(C.l), s(C);
|
|
4205
4226
|
}
|
|
4206
|
-
function
|
|
4227
|
+
function w(E, A) {
|
|
4207
4228
|
A = A === 0 ? 0 : A || 10;
|
|
4208
4229
|
var C = s(E).toRgb();
|
|
4209
4230
|
return C.r = Math.max(0, Math.min(255, C.r - Math.round(255 * -(A / 100)))), C.g = Math.max(0, Math.min(255, C.g - Math.round(255 * -(A / 100)))), C.b = Math.max(0, Math.min(255, C.b - Math.round(255 * -(A / 100)))), s(C);
|
|
@@ -4213,7 +4234,7 @@ function uc() {
|
|
|
4213
4234
|
var C = s(E).toHsl();
|
|
4214
4235
|
return C.l -= A / 100, C.l = G(C.l), s(C);
|
|
4215
4236
|
}
|
|
4216
|
-
function
|
|
4237
|
+
function S(E, A) {
|
|
4217
4238
|
var C = s(E).toHsl(), N = (C.h + A) % 360;
|
|
4218
4239
|
return C.h = N < 0 ? 360 + N : N, s(C);
|
|
4219
4240
|
}
|
|
@@ -4224,9 +4245,9 @@ function uc() {
|
|
|
4224
4245
|
function O(E, A) {
|
|
4225
4246
|
if (isNaN(A) || A <= 0)
|
|
4226
4247
|
throw new Error("Argument to polyad must be a positive number");
|
|
4227
|
-
for (var C = s(E).toHsl(), N = [s(E)],
|
|
4248
|
+
for (var C = s(E).toHsl(), N = [s(E)], M = 360 / A, k = 1; k < A; k++)
|
|
4228
4249
|
N.push(s({
|
|
4229
|
-
h: (C.h + k *
|
|
4250
|
+
h: (C.h + k * M) % 360,
|
|
4230
4251
|
s: C.s,
|
|
4231
4252
|
l: C.l
|
|
4232
4253
|
}));
|
|
@@ -4246,36 +4267,36 @@ function uc() {
|
|
|
4246
4267
|
}
|
|
4247
4268
|
function _(E, A, C) {
|
|
4248
4269
|
A = A || 6, C = C || 30;
|
|
4249
|
-
var N = s(E).toHsl(),
|
|
4250
|
-
for (N.h = (N.h - (
|
|
4251
|
-
N.h = (N.h +
|
|
4270
|
+
var N = s(E).toHsl(), M = 360 / C, k = [s(E)];
|
|
4271
|
+
for (N.h = (N.h - (M * A >> 1) + 720) % 360; --A; )
|
|
4272
|
+
N.h = (N.h + M) % 360, k.push(s(N));
|
|
4252
4273
|
return k;
|
|
4253
4274
|
}
|
|
4254
4275
|
function P(E, A) {
|
|
4255
4276
|
A = A || 6;
|
|
4256
|
-
for (var C = s(E).toHsv(), N = C.h,
|
|
4277
|
+
for (var C = s(E).toHsv(), N = C.h, M = C.s, k = C.v, V = [], Y = 1 / A; A--; )
|
|
4257
4278
|
V.push(s({
|
|
4258
4279
|
h: N,
|
|
4259
|
-
s:
|
|
4280
|
+
s: M,
|
|
4260
4281
|
v: k
|
|
4261
|
-
})), k = (k +
|
|
4282
|
+
})), k = (k + Y) % 1;
|
|
4262
4283
|
return V;
|
|
4263
4284
|
}
|
|
4264
4285
|
s.mix = function(E, A, C) {
|
|
4265
4286
|
C = C === 0 ? 0 : C || 50;
|
|
4266
|
-
var N = s(E).toRgb(),
|
|
4267
|
-
r: (
|
|
4268
|
-
g: (
|
|
4269
|
-
b: (
|
|
4270
|
-
a: (
|
|
4287
|
+
var N = s(E).toRgb(), M = s(A).toRgb(), k = C / 100, V = {
|
|
4288
|
+
r: (M.r - N.r) * k + N.r,
|
|
4289
|
+
g: (M.g - N.g) * k + N.g,
|
|
4290
|
+
b: (M.b - N.b) * k + N.b,
|
|
4291
|
+
a: (M.a - N.a) * k + N.a
|
|
4271
4292
|
};
|
|
4272
4293
|
return s(V);
|
|
4273
4294
|
}, s.readability = function(E, A) {
|
|
4274
4295
|
var C = s(E), N = s(A);
|
|
4275
4296
|
return (Math.max(C.getLuminance(), N.getLuminance()) + 0.05) / (Math.min(C.getLuminance(), N.getLuminance()) + 0.05);
|
|
4276
4297
|
}, s.isReadable = function(E, A, C) {
|
|
4277
|
-
var N = s.readability(E, A),
|
|
4278
|
-
switch (k = !1,
|
|
4298
|
+
var N = s.readability(E, A), M, k;
|
|
4299
|
+
switch (k = !1, M = Ca(C), M.level + M.size) {
|
|
4279
4300
|
case "AAsmall":
|
|
4280
4301
|
case "AAAlarge":
|
|
4281
4302
|
k = N >= 4.5;
|
|
@@ -4289,12 +4310,12 @@ function uc() {
|
|
|
4289
4310
|
}
|
|
4290
4311
|
return k;
|
|
4291
4312
|
}, s.mostReadable = function(E, A, C) {
|
|
4292
|
-
var N = null,
|
|
4293
|
-
C = C || {}, V = C.includeFallbackColors,
|
|
4313
|
+
var N = null, M = 0, k, V, Y, Z;
|
|
4314
|
+
C = C || {}, V = C.includeFallbackColors, Y = C.level, Z = C.size;
|
|
4294
4315
|
for (var de = 0; de < A.length; de++)
|
|
4295
|
-
k = s.readability(E, A[de]), k >
|
|
4316
|
+
k = s.readability(E, A[de]), k > M && (M = k, N = s(A[de]));
|
|
4296
4317
|
return s.isReadable(E, N, {
|
|
4297
|
-
level:
|
|
4318
|
+
level: Y,
|
|
4298
4319
|
size: Z
|
|
4299
4320
|
}) || !V ? N : (C.includeFallbackColors = !1, s.mostReadable(E, ["#fff", "#000"], C));
|
|
4300
4321
|
};
|
|
@@ -4458,8 +4479,8 @@ function uc() {
|
|
|
4458
4479
|
function D(E) {
|
|
4459
4480
|
return E = parseFloat(E), (isNaN(E) || E < 0 || E > 1) && (E = 1), E;
|
|
4460
4481
|
}
|
|
4461
|
-
function
|
|
4462
|
-
|
|
4482
|
+
function R(E, A) {
|
|
4483
|
+
K(E) && (E = "100%");
|
|
4463
4484
|
var C = j(E);
|
|
4464
4485
|
return E = Math.min(A, Math.max(0, parseFloat(E))), C && (E = parseInt(E * A, 10) / 100), Math.abs(E - A) < 1e-6 ? 1 : E % A / parseFloat(A);
|
|
4465
4486
|
}
|
|
@@ -4469,7 +4490,7 @@ function uc() {
|
|
|
4469
4490
|
function T(E) {
|
|
4470
4491
|
return parseInt(E, 16);
|
|
4471
4492
|
}
|
|
4472
|
-
function
|
|
4493
|
+
function K(E) {
|
|
4473
4494
|
return typeof E == "string" && E.indexOf(".") != -1 && parseFloat(E) === 1;
|
|
4474
4495
|
}
|
|
4475
4496
|
function j(E) {
|
|
@@ -4488,25 +4509,25 @@ function uc() {
|
|
|
4488
4509
|
return T(E) / 255;
|
|
4489
4510
|
}
|
|
4490
4511
|
var ce = (function() {
|
|
4491
|
-
var E = "[-\\+]?\\d+%?", A = "[-\\+]?\\d*\\.\\d+%?", C = "(?:" + A + ")|(?:" + E + ")", N = "[\\s|\\(]+(" + C + ")[,|\\s]+(" + C + ")[,|\\s]+(" + C + ")\\s*\\)?",
|
|
4512
|
+
var E = "[-\\+]?\\d+%?", A = "[-\\+]?\\d*\\.\\d+%?", C = "(?:" + A + ")|(?:" + E + ")", N = "[\\s|\\(]+(" + C + ")[,|\\s]+(" + C + ")[,|\\s]+(" + C + ")\\s*\\)?", M = "[\\s|\\(]+(" + C + ")[,|\\s]+(" + C + ")[,|\\s]+(" + C + ")[,|\\s]+(" + C + ")\\s*\\)?";
|
|
4492
4513
|
return {
|
|
4493
4514
|
CSS_UNIT: new RegExp(C),
|
|
4494
4515
|
rgb: new RegExp("rgb" + N),
|
|
4495
|
-
rgba: new RegExp("rgba" +
|
|
4516
|
+
rgba: new RegExp("rgba" + M),
|
|
4496
4517
|
hsl: new RegExp("hsl" + N),
|
|
4497
|
-
hsla: new RegExp("hsla" +
|
|
4518
|
+
hsla: new RegExp("hsla" + M),
|
|
4498
4519
|
hsv: new RegExp("hsv" + N),
|
|
4499
|
-
hsva: new RegExp("hsva" +
|
|
4520
|
+
hsva: new RegExp("hsva" + M),
|
|
4500
4521
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
4501
4522
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
4502
4523
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
4503
4524
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
4504
4525
|
};
|
|
4505
4526
|
})();
|
|
4506
|
-
function
|
|
4527
|
+
function Se(E) {
|
|
4507
4528
|
return !!ce.CSS_UNIT.exec(E);
|
|
4508
4529
|
}
|
|
4509
|
-
function
|
|
4530
|
+
function Ea(E) {
|
|
4510
4531
|
E = E.replace(l, "").replace(p, "").toLowerCase();
|
|
4511
4532
|
var A = !1;
|
|
4512
4533
|
if (I[E])
|
|
@@ -4571,7 +4592,7 @@ function uc() {
|
|
|
4571
4592
|
format: A ? "name" : "hex"
|
|
4572
4593
|
} : !1;
|
|
4573
4594
|
}
|
|
4574
|
-
function
|
|
4595
|
+
function Ca(E) {
|
|
4575
4596
|
var A, C;
|
|
4576
4597
|
return E = E || {
|
|
4577
4598
|
level: "AA",
|
|
@@ -4623,11 +4644,11 @@ function fc() {
|
|
|
4623
4644
|
g = r === "long" && b || r === "short" && !b;
|
|
4624
4645
|
}
|
|
4625
4646
|
const y = l(f, d, a);
|
|
4626
|
-
let v = [n.color],
|
|
4627
|
-
f.h <= d.h && !g || f.h >= d.h && g ?
|
|
4647
|
+
let v = [n.color], w;
|
|
4648
|
+
f.h <= d.h && !g || f.h >= d.h && g ? w = d.h - f.h : g ? w = 360 - d.h + f.h : w = 360 - f.h + d.h, y.h = Math.pow(-1, g ? 1 : 0) * Math.abs(w) / a;
|
|
4628
4649
|
for (let b = 1; b < a; b++) {
|
|
4629
|
-
const
|
|
4630
|
-
v.push(e(
|
|
4650
|
+
const S = p(y, f, b, i);
|
|
4651
|
+
v.push(e(S));
|
|
4631
4652
|
}
|
|
4632
4653
|
return v;
|
|
4633
4654
|
}
|
|
@@ -4658,7 +4679,7 @@ function fc() {
|
|
|
4658
4679
|
if (u < 0 || u > 1)
|
|
4659
4680
|
throw new Error("Position must be between 0 and 1");
|
|
4660
4681
|
let f, d;
|
|
4661
|
-
for (let v = 0,
|
|
4682
|
+
for (let v = 0, w = n.length; v < w - 1; v++)
|
|
4662
4683
|
if (u >= n[v].pos && u < n[v + 1].pos) {
|
|
4663
4684
|
f = n[v], d = n[v + 1];
|
|
4664
4685
|
break;
|
|
@@ -4682,12 +4703,12 @@ function fc() {
|
|
|
4682
4703
|
if (a ^ v)
|
|
4683
4704
|
throw new Error("Cannot mix positionned and not posionned color stops");
|
|
4684
4705
|
if (v) {
|
|
4685
|
-
const
|
|
4686
|
-
if (!
|
|
4706
|
+
const w = g.color !== void 0;
|
|
4707
|
+
if (!w && (d || y === 0 || y === r - 1))
|
|
4687
4708
|
throw new Error("Cannot define two consecutive position-only stops");
|
|
4688
|
-
if (d = !
|
|
4689
|
-
color:
|
|
4690
|
-
colorLess: !
|
|
4709
|
+
if (d = !w, g = {
|
|
4710
|
+
color: w ? e(g.color) : null,
|
|
4711
|
+
colorLess: !w,
|
|
4691
4712
|
pos: g.pos
|
|
4692
4713
|
}, g.pos < 0 || g.pos > 1)
|
|
4693
4714
|
throw new Error("Color stops positions must be between 0 and 1");
|
|
@@ -4819,12 +4840,12 @@ function fc() {
|
|
|
4819
4840
|
}, ni;
|
|
4820
4841
|
}
|
|
4821
4842
|
var hc = fc();
|
|
4822
|
-
const Cs = /* @__PURE__ */
|
|
4843
|
+
const Cs = /* @__PURE__ */ Pn(hc), ae = (...e) => {
|
|
4823
4844
|
let t, i;
|
|
4824
4845
|
if (e.length === 0)
|
|
4825
4846
|
throw new Error("Missing gradient colors");
|
|
4826
4847
|
if (Array.isArray(e[0]))
|
|
4827
|
-
t = Cs(e[0]), i =
|
|
4848
|
+
t = Cs(e[0]), i = qn(e[1]);
|
|
4828
4849
|
else {
|
|
4829
4850
|
if (e.length === 1)
|
|
4830
4851
|
throw new Error(`Expected an array of colors, received ${JSON.stringify(e[0])}`);
|
|
@@ -4832,28 +4853,28 @@ const Cs = /* @__PURE__ */ Nn(hc), ae = (...e) => {
|
|
|
4832
4853
|
}
|
|
4833
4854
|
const l = (p, s) => pc(p ? p.toString() : "", t, s ?? i);
|
|
4834
4855
|
return l.multiline = (p, s) => dc(p ? p.toString() : "", t, s ?? i), l;
|
|
4835
|
-
},
|
|
4856
|
+
}, Mo = (e, t, i) => t.interpolation?.toLowerCase() === "hsv" ? e.hsv(i, t.hsvSpin?.toLowerCase() || !1) : e.rgb(i);
|
|
4836
4857
|
function pc(e, t, i) {
|
|
4837
|
-
const l =
|
|
4858
|
+
const l = qn(i), p = Math.max(e.replace(/\s/g, "").length, t.stops.length), s = Mo(t, l, p);
|
|
4838
4859
|
let c = "";
|
|
4839
4860
|
for (const h of e)
|
|
4840
|
-
c += h.match(/\s/g) ? h :
|
|
4861
|
+
c += h.match(/\s/g) ? h : xo.hex(s.shift()?.toHex() || "#000")(h);
|
|
4841
4862
|
return c;
|
|
4842
4863
|
}
|
|
4843
4864
|
function dc(e, t, i) {
|
|
4844
|
-
const l =
|
|
4845
|
-
`), s = Math.max(...p.map((o) => o.length), t.stops.length), c =
|
|
4865
|
+
const l = qn(i), p = e.split(`
|
|
4866
|
+
`), s = Math.max(...p.map((o) => o.length), t.stops.length), c = Mo(t, l, s), h = [];
|
|
4846
4867
|
for (const o of p) {
|
|
4847
4868
|
const m = c.slice(0);
|
|
4848
4869
|
let n = "";
|
|
4849
4870
|
for (const u of o)
|
|
4850
|
-
n +=
|
|
4871
|
+
n += xo.hex(m.shift()?.toHex() || "#000")(u);
|
|
4851
4872
|
h.push(n);
|
|
4852
4873
|
}
|
|
4853
4874
|
return h.join(`
|
|
4854
4875
|
`);
|
|
4855
4876
|
}
|
|
4856
|
-
function
|
|
4877
|
+
function qn(e) {
|
|
4857
4878
|
const t = { interpolation: "rgb", hsvSpin: "short", ...e };
|
|
4858
4879
|
if (e !== void 0 && typeof e != "object")
|
|
4859
4880
|
throw new TypeError(`Expected \`options\` to be an \`object\`, got \`${typeof e}\``);
|
|
@@ -4885,15 +4906,15 @@ function pe(e) {
|
|
|
4885
4906
|
const t = (i) => ae(...e.colors)(i, e.options);
|
|
4886
4907
|
return t.multiline = (i = "") => ae(...e.colors).multiline(i, e.options), t;
|
|
4887
4908
|
}
|
|
4888
|
-
const mc = pe(he.atlas), gc = pe(he.cristal), yc = pe(he.teen), bc = pe(he.mind), vc = pe(he.morning), Cn = pe(he.vice),
|
|
4909
|
+
const mc = pe(he.atlas), gc = pe(he.cristal), yc = pe(he.teen), bc = pe(he.mind), vc = pe(he.morning), Cn = pe(he.vice), Sc = pe(he.passion), wc = pe(he.fruit), Ec = pe(he.instagram), Cc = pe(he.retro), Ac = pe(he.summer), Lc = pe(he.rainbow), Oc = pe(he.pastel);
|
|
4889
4910
|
ae.atlas = mc;
|
|
4890
4911
|
ae.cristal = gc;
|
|
4891
4912
|
ae.teen = yc;
|
|
4892
4913
|
ae.mind = bc;
|
|
4893
4914
|
ae.morning = vc;
|
|
4894
4915
|
ae.vice = Cn;
|
|
4895
|
-
ae.passion =
|
|
4896
|
-
ae.fruit =
|
|
4916
|
+
ae.passion = Sc;
|
|
4917
|
+
ae.fruit = wc;
|
|
4897
4918
|
ae.instagram = Ec;
|
|
4898
4919
|
ae.retro = Cc;
|
|
4899
4920
|
ae.summer = Ac;
|
|
@@ -4903,8 +4924,8 @@ const $c = "my-arcgis-app";
|
|
|
4903
4924
|
function Ro() {
|
|
4904
4925
|
Ul("initialize a new arcgis project");
|
|
4905
4926
|
}
|
|
4906
|
-
async function
|
|
4907
|
-
return await
|
|
4927
|
+
async function Do() {
|
|
4928
|
+
return await Yl({
|
|
4908
4929
|
message: "What is the name of your project?",
|
|
4909
4930
|
initialValue: "",
|
|
4910
4931
|
placeholder: $c,
|
|
@@ -4915,17 +4936,17 @@ async function Mo() {
|
|
|
4915
4936
|
});
|
|
4916
4937
|
}
|
|
4917
4938
|
async function _c() {
|
|
4918
|
-
const e = Ce.map(([t]) => t).filter((t) => !
|
|
4919
|
-
return await
|
|
4939
|
+
const e = Ce.map(([t]) => t).filter((t) => !Ka[t]).map((t) => ({ value: t, label: Ya[t] }));
|
|
4940
|
+
return await Kl({
|
|
4920
4941
|
message: "Which template would you like to use?",
|
|
4921
4942
|
options: e
|
|
4922
4943
|
});
|
|
4923
4944
|
}
|
|
4924
4945
|
function An() {
|
|
4925
|
-
|
|
4946
|
+
Gn(oe("greenBright", "Your new project is ready!"));
|
|
4926
4947
|
}
|
|
4927
4948
|
function Nc() {
|
|
4928
|
-
|
|
4949
|
+
Gn(
|
|
4929
4950
|
oe(
|
|
4930
4951
|
"greenBright",
|
|
4931
4952
|
`The starter is pre-configured to use pnpm.
|
|
@@ -4953,12 +4974,12 @@ async function Pc(e) {
|
|
|
4953
4974
|
});
|
|
4954
4975
|
}
|
|
4955
4976
|
var si, As;
|
|
4956
|
-
function
|
|
4977
|
+
function Fo() {
|
|
4957
4978
|
return As || (As = 1, si = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
4958
4979
|
}), si;
|
|
4959
4980
|
}
|
|
4960
4981
|
var ri, Ls;
|
|
4961
|
-
function
|
|
4982
|
+
function Bo() {
|
|
4962
4983
|
if (Ls) return ri;
|
|
4963
4984
|
Ls = 1;
|
|
4964
4985
|
const e = "2.0.0", t = 256, i = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
@@ -4989,7 +5010,7 @@ function Ic() {
|
|
|
4989
5010
|
MAX_SAFE_COMPONENT_LENGTH: i,
|
|
4990
5011
|
MAX_SAFE_BUILD_LENGTH: l,
|
|
4991
5012
|
MAX_LENGTH: p
|
|
4992
|
-
} =
|
|
5013
|
+
} = Bo(), s = Fo();
|
|
4993
5014
|
t = e.exports = {};
|
|
4994
5015
|
const c = t.re = [], h = t.safeRe = [], o = t.src = [], m = t.safeSrc = [], n = t.t = {};
|
|
4995
5016
|
let u = 0;
|
|
@@ -5002,8 +5023,8 @@ function Ic() {
|
|
|
5002
5023
|
g = g.split(`${y}*`).join(`${y}{0,${v}}`).split(`${y}+`).join(`${y}{1,${v}}`);
|
|
5003
5024
|
return g;
|
|
5004
5025
|
}, d = (g, y, v) => {
|
|
5005
|
-
const
|
|
5006
|
-
s(g, b, y), n[g] = b, o[b] = y, m[b] =
|
|
5026
|
+
const w = f(y), b = u++;
|
|
5027
|
+
s(g, b, y), n[g] = b, o[b] = y, m[b] = w, c[b] = new RegExp(y, v ? "g" : void 0), h[b] = new RegExp(w, v ? "g" : void 0);
|
|
5007
5028
|
};
|
|
5008
5029
|
d("NUMERICIDENTIFIER", "0|[1-9]\\d*"), d("NUMERICIDENTIFIERLOOSE", "\\d+"), d("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${a}*`), d("MAINVERSION", `(${o[n.NUMERICIDENTIFIER]})\\.(${o[n.NUMERICIDENTIFIER]})\\.(${o[n.NUMERICIDENTIFIER]})`), d("MAINVERSIONLOOSE", `(${o[n.NUMERICIDENTIFIERLOOSE]})\\.(${o[n.NUMERICIDENTIFIERLOOSE]})\\.(${o[n.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASEIDENTIFIER", `(?:${o[n.NONNUMERICIDENTIFIER]}|${o[n.NUMERICIDENTIFIER]})`), d("PRERELEASEIDENTIFIERLOOSE", `(?:${o[n.NONNUMERICIDENTIFIER]}|${o[n.NUMERICIDENTIFIERLOOSE]})`), d("PRERELEASE", `(?:-(${o[n.PRERELEASEIDENTIFIER]}(?:\\.${o[n.PRERELEASEIDENTIFIER]})*))`), d("PRERELEASELOOSE", `(?:-?(${o[n.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[n.PRERELEASEIDENTIFIERLOOSE]})*))`), d("BUILDIDENTIFIER", `${a}+`), d("BUILD", `(?:\\+(${o[n.BUILDIDENTIFIER]}(?:\\.${o[n.BUILDIDENTIFIER]})*))`), d("FULLPLAIN", `v?${o[n.MAINVERSION]}${o[n.PRERELEASE]}?${o[n.BUILD]}?`), d("FULL", `^${o[n.FULLPLAIN]}$`), d("LOOSEPLAIN", `[v=\\s]*${o[n.MAINVERSIONLOOSE]}${o[n.PRERELEASELOOSE]}?${o[n.BUILD]}?`), d("LOOSE", `^${o[n.LOOSEPLAIN]}$`), d("GTLT", "((?:<|>)?=?)"), d("XRANGEIDENTIFIERLOOSE", `${o[n.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), d("XRANGEIDENTIFIER", `${o[n.NUMERICIDENTIFIER]}|x|X|\\*`), d("XRANGEPLAIN", `[v=\\s]*(${o[n.XRANGEIDENTIFIER]})(?:\\.(${o[n.XRANGEIDENTIFIER]})(?:\\.(${o[n.XRANGEIDENTIFIER]})(?:${o[n.PRERELEASE]})?${o[n.BUILD]}?)?)?`), d("XRANGEPLAINLOOSE", `[v=\\s]*(${o[n.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[n.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[n.XRANGEIDENTIFIERLOOSE]})(?:${o[n.PRERELEASELOOSE]})?${o[n.BUILD]}?)?)?`), d("XRANGE", `^${o[n.GTLT]}\\s*${o[n.XRANGEPLAIN]}$`), d("XRANGELOOSE", `^${o[n.GTLT]}\\s*${o[n.XRANGEPLAINLOOSE]}$`), d("COERCEPLAIN", `(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`), d("COERCE", `${o[n.COERCEPLAIN]}(?:$|[^\\d])`), d("COERCEFULL", o[n.COERCEPLAIN] + `(?:${o[n.PRERELEASE]})?(?:${o[n.BUILD]})?(?:$|[^\\d])`), d("COERCERTL", o[n.COERCE], !0), d("COERCERTLFULL", o[n.COERCEFULL], !0), d("LONETILDE", "(?:~>?)"), d("TILDETRIM", `(\\s*)${o[n.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", d("TILDE", `^${o[n.LONETILDE]}${o[n.XRANGEPLAIN]}$`), d("TILDELOOSE", `^${o[n.LONETILDE]}${o[n.XRANGEPLAINLOOSE]}$`), d("LONECARET", "(?:\\^)"), d("CARETTRIM", `(\\s*)${o[n.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", d("CARET", `^${o[n.LONECARET]}${o[n.XRANGEPLAIN]}$`), d("CARETLOOSE", `^${o[n.LONECARET]}${o[n.XRANGEPLAINLOOSE]}$`), d("COMPARATORLOOSE", `^${o[n.GTLT]}\\s*(${o[n.LOOSEPLAIN]})$|^$`), d("COMPARATOR", `^${o[n.GTLT]}\\s*(${o[n.FULLPLAIN]})$|^$`), d("COMPARATORTRIM", `(\\s*)${o[n.GTLT]}\\s*(${o[n.LOOSEPLAIN]}|${o[n.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", d("HYPHENRANGE", `^\\s*(${o[n.XRANGEPLAIN]})\\s+-\\s+(${o[n.XRANGEPLAIN]})\\s*$`), d("HYPHENRANGELOOSE", `^\\s*(${o[n.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[n.XRANGEPLAINLOOSE]})\\s*$`), d("STAR", "(<|>)?=?\\s*\\*"), d("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), d("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
5009
5030
|
})(dt, dt.exports)), dt.exports;
|
|
@@ -5034,7 +5055,7 @@ var li, Ns;
|
|
|
5034
5055
|
function xc() {
|
|
5035
5056
|
if (Ns) return li;
|
|
5036
5057
|
Ns = 1;
|
|
5037
|
-
const e =
|
|
5058
|
+
const e = Fo(), { MAX_LENGTH: t, MAX_SAFE_INTEGER: i } = Bo(), { safeRe: l, t: p } = Ic(), s = Tc(), { compareIdentifiers: c } = kc(), h = (m, n) => {
|
|
5038
5059
|
const u = n.split(".");
|
|
5039
5060
|
if (u.length > m.length)
|
|
5040
5061
|
return !1;
|
|
@@ -5204,7 +5225,7 @@ function xc() {
|
|
|
5204
5225
|
return li = o, li;
|
|
5205
5226
|
}
|
|
5206
5227
|
var ci, Ps;
|
|
5207
|
-
function
|
|
5228
|
+
function Go() {
|
|
5208
5229
|
if (Ps) return ci;
|
|
5209
5230
|
Ps = 1;
|
|
5210
5231
|
const e = xc();
|
|
@@ -5221,26 +5242,26 @@ function Bo() {
|
|
|
5221
5242
|
}, ci;
|
|
5222
5243
|
}
|
|
5223
5244
|
var ui, Is;
|
|
5224
|
-
function
|
|
5245
|
+
function Mc() {
|
|
5225
5246
|
if (Is) return ui;
|
|
5226
5247
|
Is = 1;
|
|
5227
|
-
const e =
|
|
5248
|
+
const e = Go();
|
|
5228
5249
|
return ui = (i, l) => {
|
|
5229
5250
|
const p = e(i, l);
|
|
5230
5251
|
return p ? p.version : null;
|
|
5231
5252
|
}, ui;
|
|
5232
5253
|
}
|
|
5233
5254
|
var fi, Ts;
|
|
5234
|
-
function
|
|
5255
|
+
function Rc() {
|
|
5235
5256
|
if (Ts) return fi;
|
|
5236
5257
|
Ts = 1;
|
|
5237
|
-
const e =
|
|
5258
|
+
const e = Go();
|
|
5238
5259
|
return fi = (i, l) => {
|
|
5239
5260
|
const p = e(i.trim().replace(/^[=v]+/, ""), l);
|
|
5240
5261
|
return p ? p.version : null;
|
|
5241
5262
|
}, fi;
|
|
5242
5263
|
}
|
|
5243
|
-
const
|
|
5264
|
+
const qo = /* @__PURE__ */ JSON.parse('["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRWD","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","metamail","mpi-permissive","mpich2","mplus","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]'), Dc = [
|
|
5244
5265
|
"AGPL-1.0",
|
|
5245
5266
|
"AGPL-3.0",
|
|
5246
5267
|
"BSD-2-Clause-FreeBSD",
|
|
@@ -5339,7 +5360,7 @@ var hi, ks;
|
|
|
5339
5360
|
function Bc() {
|
|
5340
5361
|
if (ks) return hi;
|
|
5341
5362
|
ks = 1;
|
|
5342
|
-
var e = [].concat(
|
|
5363
|
+
var e = [].concat(qo).concat(Dc), t = Fc;
|
|
5343
5364
|
return hi = function(i) {
|
|
5344
5365
|
var l = 0;
|
|
5345
5366
|
function p() {
|
|
@@ -5477,13 +5498,13 @@ function Gc() {
|
|
|
5477
5498
|
if (v) {
|
|
5478
5499
|
if (!s(d))
|
|
5479
5500
|
return v;
|
|
5480
|
-
var
|
|
5481
|
-
if (!
|
|
5501
|
+
var w = y();
|
|
5502
|
+
if (!w)
|
|
5482
5503
|
throw new Error("Expected expression");
|
|
5483
5504
|
return {
|
|
5484
5505
|
left: v,
|
|
5485
5506
|
conjunction: d.toLowerCase(),
|
|
5486
|
-
right:
|
|
5507
|
+
right: w
|
|
5487
5508
|
};
|
|
5488
5509
|
}
|
|
5489
5510
|
};
|
|
@@ -5494,20 +5515,20 @@ function Gc() {
|
|
|
5494
5515
|
return f;
|
|
5495
5516
|
}), pi;
|
|
5496
5517
|
}
|
|
5497
|
-
var di,
|
|
5498
|
-
function
|
|
5499
|
-
if (
|
|
5500
|
-
|
|
5518
|
+
var di, Ms;
|
|
5519
|
+
function jo() {
|
|
5520
|
+
if (Ms) return di;
|
|
5521
|
+
Ms = 1;
|
|
5501
5522
|
var e = Bc(), t = Gc();
|
|
5502
5523
|
return di = function(i) {
|
|
5503
5524
|
return t(e(i));
|
|
5504
5525
|
}, di;
|
|
5505
5526
|
}
|
|
5506
|
-
var mi,
|
|
5527
|
+
var mi, Rs;
|
|
5507
5528
|
function qc() {
|
|
5508
|
-
if (
|
|
5509
|
-
|
|
5510
|
-
var e =
|
|
5529
|
+
if (Rs) return mi;
|
|
5530
|
+
Rs = 1;
|
|
5531
|
+
var e = jo(), t = qo;
|
|
5511
5532
|
function i(y) {
|
|
5512
5533
|
try {
|
|
5513
5534
|
return e(y), !0;
|
|
@@ -5516,8 +5537,8 @@ function qc() {
|
|
|
5516
5537
|
}
|
|
5517
5538
|
}
|
|
5518
5539
|
function l(y, v) {
|
|
5519
|
-
var
|
|
5520
|
-
return
|
|
5540
|
+
var w = v[0].length - y[0].length;
|
|
5541
|
+
return w !== 0 ? w : y[0].toUpperCase().localeCompare(v[0].toUpperCase());
|
|
5521
5542
|
}
|
|
5522
5543
|
var p = [
|
|
5523
5544
|
["APGL", "AGPL"],
|
|
@@ -5668,8 +5689,8 @@ function qc() {
|
|
|
5668
5689
|
var v = /^(.*)-\d+\.\d+$/.exec(y);
|
|
5669
5690
|
return v ? [v[0], v[1]] : [y, null];
|
|
5670
5691
|
}).reduce(function(y, v) {
|
|
5671
|
-
var
|
|
5672
|
-
return y[
|
|
5692
|
+
var w = v[1];
|
|
5693
|
+
return y[w] = y[w] || [], y[w].push(v[0]), y;
|
|
5673
5694
|
}, {}), m = Object.keys(o).map(function(v) {
|
|
5674
5695
|
return [v, o[v]];
|
|
5675
5696
|
}).filter(function(v) {
|
|
@@ -5714,24 +5735,24 @@ function qc() {
|
|
|
5714
5735
|
["ZLIB", "Zlib"]
|
|
5715
5736
|
].concat(m).sort(l), u = 0, a = 1, r = function(y) {
|
|
5716
5737
|
for (var v = 0; v < h.length; v++) {
|
|
5717
|
-
var
|
|
5718
|
-
if (
|
|
5719
|
-
return
|
|
5738
|
+
var w = h[v](y).trim();
|
|
5739
|
+
if (w !== y && i(w))
|
|
5740
|
+
return w;
|
|
5720
5741
|
}
|
|
5721
5742
|
return null;
|
|
5722
5743
|
}, f = function(y) {
|
|
5723
|
-
for (var v = y.toUpperCase(),
|
|
5724
|
-
var b = n[
|
|
5744
|
+
for (var v = y.toUpperCase(), w = 0; w < n.length; w++) {
|
|
5745
|
+
var b = n[w];
|
|
5725
5746
|
if (v.indexOf(b[u]) > -1)
|
|
5726
5747
|
return b[a];
|
|
5727
5748
|
}
|
|
5728
5749
|
return null;
|
|
5729
5750
|
}, d = function(y, v) {
|
|
5730
|
-
for (var
|
|
5731
|
-
var b = p[
|
|
5732
|
-
if (y.indexOf(
|
|
5751
|
+
for (var w = 0; w < p.length; w++) {
|
|
5752
|
+
var b = p[w], S = b[s];
|
|
5753
|
+
if (y.indexOf(S) > -1) {
|
|
5733
5754
|
var L = y.replace(
|
|
5734
|
-
|
|
5755
|
+
S,
|
|
5735
5756
|
b[c]
|
|
5736
5757
|
), O = v(L);
|
|
5737
5758
|
if (O !== null)
|
|
@@ -5742,12 +5763,12 @@ function qc() {
|
|
|
5742
5763
|
};
|
|
5743
5764
|
mi = function(y, v) {
|
|
5744
5765
|
v = v || {};
|
|
5745
|
-
var
|
|
5766
|
+
var w = v.upgrade === void 0 ? !0 : !!v.upgrade;
|
|
5746
5767
|
function b($) {
|
|
5747
|
-
return
|
|
5768
|
+
return w ? g($) : $;
|
|
5748
5769
|
}
|
|
5749
|
-
var
|
|
5750
|
-
if (!
|
|
5770
|
+
var S = typeof y == "string" && y.trim().length !== 0;
|
|
5771
|
+
if (!S)
|
|
5751
5772
|
throw Error("Invalid argument. Expected non-empty string.");
|
|
5752
5773
|
if (y = y.trim(), i(y))
|
|
5753
5774
|
return b(y);
|
|
@@ -5785,7 +5806,7 @@ var gi, Ds;
|
|
|
5785
5806
|
function jc() {
|
|
5786
5807
|
if (Ds) return gi;
|
|
5787
5808
|
Ds = 1;
|
|
5788
|
-
var e =
|
|
5809
|
+
var e = jo(), t = qc(), i = 'license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"', l = /^SEE LICEN[CS]E IN (.+)$/;
|
|
5789
5810
|
function p(c, h) {
|
|
5790
5811
|
return h.slice(0, c.length) === c;
|
|
5791
5812
|
}
|
|
@@ -5987,9 +6008,9 @@ function Uc() {
|
|
|
5987
6008
|
#b;
|
|
5988
6009
|
#l;
|
|
5989
6010
|
#v;
|
|
5990
|
-
#w;
|
|
5991
|
-
#d;
|
|
5992
6011
|
#S;
|
|
6012
|
+
#d;
|
|
6013
|
+
#w;
|
|
5993
6014
|
#O;
|
|
5994
6015
|
#h;
|
|
5995
6016
|
/**
|
|
@@ -6004,7 +6025,7 @@ function Uc() {
|
|
|
6004
6025
|
static unsafeExposeInternals(r) {
|
|
6005
6026
|
return {
|
|
6006
6027
|
// properties
|
|
6007
|
-
starts: r.#
|
|
6028
|
+
starts: r.#S,
|
|
6008
6029
|
ttls: r.#d,
|
|
6009
6030
|
sizes: r.#v,
|
|
6010
6031
|
keyMap: r.#r,
|
|
@@ -6075,7 +6096,7 @@ function Uc() {
|
|
|
6075
6096
|
return this.#g;
|
|
6076
6097
|
}
|
|
6077
6098
|
constructor(r) {
|
|
6078
|
-
const { max: f = 0, ttl: d, ttlResolution: g = 1, ttlAutopurge: y, updateAgeOnGet: v, updateAgeOnHas:
|
|
6099
|
+
const { max: f = 0, ttl: d, ttlResolution: g = 1, ttlAutopurge: y, updateAgeOnGet: v, updateAgeOnHas: w, allowStale: b, dispose: S, disposeAfter: L, noDisposeOnSet: O, noUpdateTTL: $, maxSize: _ = 0, maxEntrySize: P = 0, sizeCalculation: I, fetchMethod: B, memoMethod: F, noDeleteOnFetchRejection: D, noDeleteOnStaleGet: R, allowStaleOnFetchRejection: G, allowStaleOnFetchAbort: T, ignoreFetchAbort: K } = r;
|
|
6079
6100
|
if (f !== 0 && !h(f))
|
|
6080
6101
|
throw new TypeError("max option must be a nonnegative integer");
|
|
6081
6102
|
const j = f ? o(f) : Array;
|
|
@@ -6091,17 +6112,17 @@ function Uc() {
|
|
|
6091
6112
|
throw new TypeError("memoMethod must be a function if defined");
|
|
6092
6113
|
if (this.#I = F, B !== void 0 && typeof B != "function")
|
|
6093
6114
|
throw new TypeError("fetchMethod must be a function if specified");
|
|
6094
|
-
if (this.#P = B, this.#O = !!B, this.#r = /* @__PURE__ */ new Map(), this.#n = new Array(f).fill(void 0), this.#e = new Array(f).fill(void 0), this.#f = new j(f), this.#p = new j(f), this.#u = 0, this.#a = 0, this.#b = n.create(f), this.#o = 0, this.#y = 0, typeof
|
|
6115
|
+
if (this.#P = B, this.#O = !!B, this.#r = /* @__PURE__ */ new Map(), this.#n = new Array(f).fill(void 0), this.#e = new Array(f).fill(void 0), this.#f = new j(f), this.#p = new j(f), this.#u = 0, this.#a = 0, this.#b = n.create(f), this.#o = 0, this.#y = 0, typeof S == "function" && (this.#t = S), typeof L == "function" ? (this.#g = L, this.#l = []) : (this.#g = void 0, this.#l = void 0), this.#w = !!this.#t, this.#h = !!this.#g, this.noDisposeOnSet = !!O, this.noUpdateTTL = !!$, this.noDeleteOnFetchRejection = !!D, this.allowStaleOnFetchRejection = !!G, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!K, this.maxEntrySize !== 0) {
|
|
6095
6116
|
if (this.#c !== 0 && !h(this.#c))
|
|
6096
6117
|
throw new TypeError("maxSize must be a positive integer if specified");
|
|
6097
6118
|
if (!h(this.maxEntrySize))
|
|
6098
6119
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
6099
6120
|
this.#q();
|
|
6100
6121
|
}
|
|
6101
|
-
if (this.allowStale = !!b, this.noDeleteOnStaleGet = !!
|
|
6122
|
+
if (this.allowStale = !!b, this.noDeleteOnStaleGet = !!R, this.updateAgeOnGet = !!v, this.updateAgeOnHas = !!w, this.ttlResolution = h(g) || g === 0 ? g : 1, this.ttlAutopurge = !!y, this.ttl = d || 0, this.ttl) {
|
|
6102
6123
|
if (!h(this.ttl))
|
|
6103
6124
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
6104
|
-
this.#
|
|
6125
|
+
this.#M();
|
|
6105
6126
|
}
|
|
6106
6127
|
if (this.#s === 0 && this.ttl === 0 && this.#c === 0)
|
|
6107
6128
|
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
@@ -6117,10 +6138,10 @@ function Uc() {
|
|
|
6117
6138
|
getRemainingTTL(r) {
|
|
6118
6139
|
return this.#r.has(r) ? 1 / 0 : 0;
|
|
6119
6140
|
}
|
|
6120
|
-
#
|
|
6141
|
+
#M() {
|
|
6121
6142
|
const r = new m(this.#s), f = new m(this.#s);
|
|
6122
|
-
this.#d = r, this.#
|
|
6123
|
-
if (f[y] = v !== 0 ?
|
|
6143
|
+
this.#d = r, this.#S = f, this.#R = (y, v, w = e.now()) => {
|
|
6144
|
+
if (f[y] = v !== 0 ? w : 0, r[y] = v, v !== 0 && this.ttlAutopurge) {
|
|
6124
6145
|
const b = setTimeout(() => {
|
|
6125
6146
|
this.#m(y) && this.#A(this.#n[y], "expire");
|
|
6126
6147
|
}, v + 1);
|
|
@@ -6130,12 +6151,12 @@ function Uc() {
|
|
|
6130
6151
|
f[y] = r[y] !== 0 ? e.now() : 0;
|
|
6131
6152
|
}, this.#L = (y, v) => {
|
|
6132
6153
|
if (r[v]) {
|
|
6133
|
-
const
|
|
6134
|
-
if (!
|
|
6154
|
+
const w = r[v], b = f[v];
|
|
6155
|
+
if (!w || !b)
|
|
6135
6156
|
return;
|
|
6136
|
-
y.ttl =
|
|
6137
|
-
const
|
|
6138
|
-
y.remainingTTL =
|
|
6157
|
+
y.ttl = w, y.start = b, y.now = d || g();
|
|
6158
|
+
const S = y.now - b;
|
|
6159
|
+
y.remainingTTL = w - S;
|
|
6139
6160
|
}
|
|
6140
6161
|
};
|
|
6141
6162
|
let d = 0;
|
|
@@ -6152,14 +6173,14 @@ function Uc() {
|
|
|
6152
6173
|
const v = this.#r.get(y);
|
|
6153
6174
|
if (v === void 0)
|
|
6154
6175
|
return 0;
|
|
6155
|
-
const
|
|
6156
|
-
if (!
|
|
6176
|
+
const w = r[v], b = f[v];
|
|
6177
|
+
if (!w || !b)
|
|
6157
6178
|
return 1 / 0;
|
|
6158
|
-
const
|
|
6159
|
-
return
|
|
6179
|
+
const S = (d || g()) - b;
|
|
6180
|
+
return w - S;
|
|
6160
6181
|
}, this.#m = (y) => {
|
|
6161
|
-
const v = f[y],
|
|
6162
|
-
return !!
|
|
6182
|
+
const v = f[y], w = r[y];
|
|
6183
|
+
return !!w && !!v && (d || g()) - v > w;
|
|
6163
6184
|
};
|
|
6164
6185
|
}
|
|
6165
6186
|
// conditionally set private methods related to TTL
|
|
@@ -6167,7 +6188,7 @@ function Uc() {
|
|
|
6167
6188
|
};
|
|
6168
6189
|
#L = () => {
|
|
6169
6190
|
};
|
|
6170
|
-
#
|
|
6191
|
+
#R = () => {
|
|
6171
6192
|
};
|
|
6172
6193
|
/* c8 ignore stop */
|
|
6173
6194
|
#m = () => !1;
|
|
@@ -6357,10 +6378,10 @@ function Uc() {
|
|
|
6357
6378
|
if (g === void 0)
|
|
6358
6379
|
return;
|
|
6359
6380
|
const y = { value: g };
|
|
6360
|
-
if (this.#d && this.#
|
|
6361
|
-
const v = this.#d[f],
|
|
6362
|
-
if (v &&
|
|
6363
|
-
const b = v - (e.now() -
|
|
6381
|
+
if (this.#d && this.#S) {
|
|
6382
|
+
const v = this.#d[f], w = this.#S[f];
|
|
6383
|
+
if (v && w) {
|
|
6384
|
+
const b = v - (e.now() - w);
|
|
6364
6385
|
y.ttl = b, y.start = Date.now();
|
|
6365
6386
|
}
|
|
6366
6387
|
}
|
|
@@ -6386,10 +6407,10 @@ function Uc() {
|
|
|
6386
6407
|
if (y === void 0 || d === void 0)
|
|
6387
6408
|
continue;
|
|
6388
6409
|
const v = { value: y };
|
|
6389
|
-
if (this.#d && this.#
|
|
6410
|
+
if (this.#d && this.#S) {
|
|
6390
6411
|
v.ttl = this.#d[f];
|
|
6391
|
-
const
|
|
6392
|
-
v.start = Math.floor(Date.now() -
|
|
6412
|
+
const w = e.now() - this.#S[f];
|
|
6413
|
+
v.start = Math.floor(Date.now() - w);
|
|
6393
6414
|
}
|
|
6394
6415
|
this.#v && (v.size = this.#v[f]), r.unshift([d, v]);
|
|
6395
6416
|
}
|
|
@@ -6447,14 +6468,14 @@ function Uc() {
|
|
|
6447
6468
|
set(r, f, d = {}) {
|
|
6448
6469
|
if (f === void 0)
|
|
6449
6470
|
return this.delete(r), this;
|
|
6450
|
-
const { ttl: g = this.ttl, start: y, noDisposeOnSet: v = this.noDisposeOnSet, sizeCalculation:
|
|
6451
|
-
let { noUpdateTTL:
|
|
6452
|
-
const L = this.#D(r, f, d.size || 0,
|
|
6471
|
+
const { ttl: g = this.ttl, start: y, noDisposeOnSet: v = this.noDisposeOnSet, sizeCalculation: w = this.sizeCalculation, status: b } = d;
|
|
6472
|
+
let { noUpdateTTL: S = this.noUpdateTTL } = d;
|
|
6473
|
+
const L = this.#D(r, f, d.size || 0, w);
|
|
6453
6474
|
if (this.maxEntrySize && L > this.maxEntrySize)
|
|
6454
6475
|
return b && (b.set = "miss", b.maxEntrySizeExceeded = !0), this.#A(r, "set"), this;
|
|
6455
6476
|
let O = this.#o === 0 ? void 0 : this.#r.get(r);
|
|
6456
6477
|
if (O === void 0)
|
|
6457
|
-
O = this.#o === 0 ? this.#a : this.#b.length !== 0 ? this.#b.pop() : this.#o === this.#s ? this.#k(!1) : this.#o, this.#n[O] = r, this.#e[O] = f, this.#r.set(r, O), this.#f[this.#a] = O, this.#p[O] = this.#a, this.#a = O, this.#o++, this.#T(O, L, b), b && (b.set = "add"),
|
|
6478
|
+
O = this.#o === 0 ? this.#a : this.#b.length !== 0 ? this.#b.pop() : this.#o === this.#s ? this.#k(!1) : this.#o, this.#n[O] = r, this.#e[O] = f, this.#r.set(r, O), this.#f[this.#a] = O, this.#p[O] = this.#a, this.#a = O, this.#o++, this.#T(O, L, b), b && (b.set = "add"), S = !1;
|
|
6458
6479
|
else {
|
|
6459
6480
|
this.#N(O);
|
|
6460
6481
|
const $ = this.#e[O];
|
|
@@ -6462,8 +6483,8 @@ function Uc() {
|
|
|
6462
6483
|
if (this.#O && this.#i($)) {
|
|
6463
6484
|
$.__abortController.abort(new Error("replaced"));
|
|
6464
6485
|
const { __staleWhileFetching: _ } = $;
|
|
6465
|
-
_ !== void 0 && !v && (this.#
|
|
6466
|
-
} else v || (this.#
|
|
6486
|
+
_ !== void 0 && !v && (this.#w && this.#t?.(_, r, "set"), this.#h && this.#l?.push([_, r, "set"]));
|
|
6487
|
+
} else v || (this.#w && this.#t?.($, r, "set"), this.#h && this.#l?.push([$, r, "set"]));
|
|
6467
6488
|
if (this.#_(O), this.#T(O, L, b), this.#e[O] = f, b) {
|
|
6468
6489
|
b.set = "replace";
|
|
6469
6490
|
const _ = $ && this.#i($) ? $.__staleWhileFetching : $;
|
|
@@ -6471,7 +6492,7 @@ function Uc() {
|
|
|
6471
6492
|
}
|
|
6472
6493
|
} else b && (b.set = "update");
|
|
6473
6494
|
}
|
|
6474
|
-
if (g !== 0 && !this.#d && this.#
|
|
6495
|
+
if (g !== 0 && !this.#d && this.#M(), this.#d && (S || this.#R(O, g, y), b && this.#L(b, O)), !v && this.#h && this.#l) {
|
|
6475
6496
|
const $ = this.#l;
|
|
6476
6497
|
let _;
|
|
6477
6498
|
for (; _ = $?.shift(); )
|
|
@@ -6504,7 +6525,7 @@ function Uc() {
|
|
|
6504
6525
|
}
|
|
6505
6526
|
#k(r) {
|
|
6506
6527
|
const f = this.#u, d = this.#n[f], g = this.#e[f];
|
|
6507
|
-
return this.#O && this.#i(g) ? g.__abortController.abort(new Error("evicted")) : (this.#
|
|
6528
|
+
return this.#O && this.#i(g) ? g.__abortController.abort(new Error("evicted")) : (this.#w || this.#h) && (this.#w && this.#t?.(g, d, "evict"), this.#h && this.#l?.push([g, d, "evict"])), this.#_(f), r && (this.#n[f] = void 0, this.#e[f] = void 0, this.#b.push(f)), this.#o === 1 ? (this.#u = this.#a = 0, this.#b.length = 0) : this.#u = this.#f[f], this.#r.delete(d), this.#o--, f;
|
|
6508
6529
|
}
|
|
6509
6530
|
/**
|
|
6510
6531
|
* Check if a key is in the cache, without updating the recency of use.
|
|
@@ -6552,34 +6573,34 @@ function Uc() {
|
|
|
6552
6573
|
const y = f === void 0 ? void 0 : this.#e[f];
|
|
6553
6574
|
if (this.#i(y))
|
|
6554
6575
|
return y;
|
|
6555
|
-
const v = new p(), { signal:
|
|
6556
|
-
|
|
6576
|
+
const v = new p(), { signal: w } = d;
|
|
6577
|
+
w?.addEventListener("abort", () => v.abort(w.reason), {
|
|
6557
6578
|
signal: v.signal
|
|
6558
6579
|
});
|
|
6559
6580
|
const b = {
|
|
6560
6581
|
signal: v.signal,
|
|
6561
6582
|
options: d,
|
|
6562
6583
|
context: g
|
|
6563
|
-
},
|
|
6584
|
+
}, S = (I, B = !1) => {
|
|
6564
6585
|
const { aborted: F } = v.signal, D = d.ignoreFetchAbort && I !== void 0;
|
|
6565
6586
|
if (d.status && (F && !B ? (d.status.fetchAborted = !0, d.status.fetchError = v.signal.reason, D && (d.status.fetchAbortIgnored = !0)) : d.status.fetchResolved = !0), F && !D && !B)
|
|
6566
6587
|
return O(v.signal.reason);
|
|
6567
|
-
const
|
|
6568
|
-
return this.#e[f] === _ && (I === void 0 ?
|
|
6588
|
+
const R = _;
|
|
6589
|
+
return this.#e[f] === _ && (I === void 0 ? R.__staleWhileFetching ? this.#e[f] = R.__staleWhileFetching : this.#A(r, "fetch") : (d.status && (d.status.fetchUpdated = !0), this.set(r, I, b.options))), I;
|
|
6569
6590
|
}, L = (I) => (d.status && (d.status.fetchRejected = !0, d.status.fetchError = I), O(I)), O = (I) => {
|
|
6570
|
-
const { aborted: B } = v.signal, F = B && d.allowStaleOnFetchAbort, D = F || d.allowStaleOnFetchRejection,
|
|
6571
|
-
if (this.#e[f] === _ && (!
|
|
6591
|
+
const { aborted: B } = v.signal, F = B && d.allowStaleOnFetchAbort, D = F || d.allowStaleOnFetchRejection, R = D || d.noDeleteOnFetchRejection, G = _;
|
|
6592
|
+
if (this.#e[f] === _ && (!R || G.__staleWhileFetching === void 0 ? this.#A(r, "fetch") : F || (this.#e[f] = G.__staleWhileFetching)), D)
|
|
6572
6593
|
return d.status && G.__staleWhileFetching !== void 0 && (d.status.returnedStale = !0), G.__staleWhileFetching;
|
|
6573
6594
|
if (G.__returned === G)
|
|
6574
6595
|
throw I;
|
|
6575
6596
|
}, $ = (I, B) => {
|
|
6576
6597
|
const F = this.#P?.(r, y, b);
|
|
6577
6598
|
F && F instanceof Promise && F.then((D) => I(D === void 0 ? void 0 : D), B), v.signal.addEventListener("abort", () => {
|
|
6578
|
-
(!d.ignoreFetchAbort || d.allowStaleOnFetchAbort) && (I(void 0), d.allowStaleOnFetchAbort && (I = (D) =>
|
|
6599
|
+
(!d.ignoreFetchAbort || d.allowStaleOnFetchAbort) && (I(void 0), d.allowStaleOnFetchAbort && (I = (D) => S(D, !0)));
|
|
6579
6600
|
});
|
|
6580
6601
|
};
|
|
6581
6602
|
d.status && (d.status.fetchDispatched = !0);
|
|
6582
|
-
const _ = new Promise($).then(
|
|
6603
|
+
const _ = new Promise($).then(S, L), P = Object.assign(_, {
|
|
6583
6604
|
__abortController: v,
|
|
6584
6605
|
__staleWhileFetching: y,
|
|
6585
6606
|
__returned: void 0
|
|
@@ -6600,9 +6621,9 @@ function Uc() {
|
|
|
6600
6621
|
noDeleteOnStaleGet: y = this.noDeleteOnStaleGet,
|
|
6601
6622
|
// set options
|
|
6602
6623
|
ttl: v = this.ttl,
|
|
6603
|
-
noDisposeOnSet:
|
|
6624
|
+
noDisposeOnSet: w = this.noDisposeOnSet,
|
|
6604
6625
|
size: b = 0,
|
|
6605
|
-
sizeCalculation:
|
|
6626
|
+
sizeCalculation: S = this.sizeCalculation,
|
|
6606
6627
|
noUpdateTTL: L = this.noUpdateTTL,
|
|
6607
6628
|
// fetch exclusive options
|
|
6608
6629
|
noDeleteOnFetchRejection: O = this.noDeleteOnFetchRejection,
|
|
@@ -6621,14 +6642,14 @@ function Uc() {
|
|
|
6621
6642
|
noDeleteOnStaleGet: y,
|
|
6622
6643
|
status: F
|
|
6623
6644
|
});
|
|
6624
|
-
const
|
|
6645
|
+
const R = {
|
|
6625
6646
|
allowStale: d,
|
|
6626
6647
|
updateAgeOnGet: g,
|
|
6627
6648
|
noDeleteOnStaleGet: y,
|
|
6628
6649
|
ttl: v,
|
|
6629
|
-
noDisposeOnSet:
|
|
6650
|
+
noDisposeOnSet: w,
|
|
6630
6651
|
size: b,
|
|
6631
|
-
sizeCalculation:
|
|
6652
|
+
sizeCalculation: S,
|
|
6632
6653
|
noUpdateTTL: L,
|
|
6633
6654
|
noDeleteOnFetchRejection: O,
|
|
6634
6655
|
allowStaleOnFetchRejection: $,
|
|
@@ -6640,7 +6661,7 @@ function Uc() {
|
|
|
6640
6661
|
let G = this.#r.get(r);
|
|
6641
6662
|
if (G === void 0) {
|
|
6642
6663
|
F && (F.fetch = "miss");
|
|
6643
|
-
const T = this.#x(r, G,
|
|
6664
|
+
const T = this.#x(r, G, R, I);
|
|
6644
6665
|
return T.__returned = T;
|
|
6645
6666
|
} else {
|
|
6646
6667
|
const T = this.#e[G];
|
|
@@ -6648,11 +6669,11 @@ function Uc() {
|
|
|
6648
6669
|
const ve = d && T.__staleWhileFetching !== void 0;
|
|
6649
6670
|
return F && (F.fetch = "inflight", ve && (F.returnedStale = !0)), ve ? T.__staleWhileFetching : T.__returned = T;
|
|
6650
6671
|
}
|
|
6651
|
-
const
|
|
6652
|
-
if (!B && !
|
|
6672
|
+
const K = this.#m(G);
|
|
6673
|
+
if (!B && !K)
|
|
6653
6674
|
return F && (F.fetch = "hit"), this.#N(G), g && this.#$(G), F && this.#L(F, G), T;
|
|
6654
|
-
const j = this.#x(r, G,
|
|
6655
|
-
return F && (F.fetch =
|
|
6675
|
+
const j = this.#x(r, G, R, I), ie = j.__staleWhileFetching !== void 0 && d;
|
|
6676
|
+
return F && (F.fetch = K ? "stale" : "refresh", ie && K && (F.returnedStale = !0)), ie ? j.__staleWhileFetching : j.__returned = j;
|
|
6656
6677
|
}
|
|
6657
6678
|
}
|
|
6658
6679
|
async forceFetch(r, f = {}) {
|
|
@@ -6665,10 +6686,10 @@ function Uc() {
|
|
|
6665
6686
|
const d = this.#I;
|
|
6666
6687
|
if (!d)
|
|
6667
6688
|
throw new Error("no memoMethod provided to constructor");
|
|
6668
|
-
const { context: g, forceRefresh: y, ...v } = f,
|
|
6669
|
-
if (!y &&
|
|
6670
|
-
return
|
|
6671
|
-
const b = d(r,
|
|
6689
|
+
const { context: g, forceRefresh: y, ...v } = f, w = this.get(r, v);
|
|
6690
|
+
if (!y && w !== void 0)
|
|
6691
|
+
return w;
|
|
6692
|
+
const b = d(r, w, {
|
|
6672
6693
|
options: v,
|
|
6673
6694
|
context: g
|
|
6674
6695
|
});
|
|
@@ -6681,10 +6702,10 @@ function Uc() {
|
|
|
6681
6702
|
* If the key is not found, get() will return `undefined`.
|
|
6682
6703
|
*/
|
|
6683
6704
|
get(r, f = {}) {
|
|
6684
|
-
const { allowStale: d = this.allowStale, updateAgeOnGet: g = this.updateAgeOnGet, noDeleteOnStaleGet: y = this.noDeleteOnStaleGet, status: v } = f,
|
|
6685
|
-
if (
|
|
6686
|
-
const b = this.#e[
|
|
6687
|
-
return v && this.#L(v,
|
|
6705
|
+
const { allowStale: d = this.allowStale, updateAgeOnGet: g = this.updateAgeOnGet, noDeleteOnStaleGet: y = this.noDeleteOnStaleGet, status: v } = f, w = this.#r.get(r);
|
|
6706
|
+
if (w !== void 0) {
|
|
6707
|
+
const b = this.#e[w], S = this.#i(b);
|
|
6708
|
+
return v && this.#L(v, w), this.#m(w) ? (v && (v.get = "stale"), S ? (v && d && b.__staleWhileFetching !== void 0 && (v.returnedStale = !0), d ? b.__staleWhileFetching : void 0) : (y || this.#A(r, "expire"), v && d && (v.returnedStale = !0), d ? b : void 0)) : (v && (v.get = "hit"), S ? b.__staleWhileFetching : (this.#N(w), g && this.#$(w), b));
|
|
6688
6709
|
} else v && (v.get = "miss");
|
|
6689
6710
|
}
|
|
6690
6711
|
#B(r, f) {
|
|
@@ -6711,15 +6732,15 @@ function Uc() {
|
|
|
6711
6732
|
else {
|
|
6712
6733
|
this.#_(g);
|
|
6713
6734
|
const y = this.#e[g];
|
|
6714
|
-
if (this.#i(y) ? y.__abortController.abort(new Error("deleted")) : (this.#
|
|
6735
|
+
if (this.#i(y) ? y.__abortController.abort(new Error("deleted")) : (this.#w || this.#h) && (this.#w && this.#t?.(y, r, f), this.#h && this.#l?.push([y, r, f])), this.#r.delete(r), this.#n[g] = void 0, this.#e[g] = void 0, g === this.#a)
|
|
6715
6736
|
this.#a = this.#p[g];
|
|
6716
6737
|
else if (g === this.#u)
|
|
6717
6738
|
this.#u = this.#f[g];
|
|
6718
6739
|
else {
|
|
6719
6740
|
const v = this.#p[g];
|
|
6720
6741
|
this.#f[v] = this.#f[g];
|
|
6721
|
-
const
|
|
6722
|
-
this.#p[
|
|
6742
|
+
const w = this.#f[g];
|
|
6743
|
+
this.#p[w] = this.#p[g];
|
|
6723
6744
|
}
|
|
6724
6745
|
this.#o--, this.#b.push(g);
|
|
6725
6746
|
}
|
|
@@ -6745,10 +6766,10 @@ function Uc() {
|
|
|
6745
6766
|
d.__abortController.abort(new Error("deleted"));
|
|
6746
6767
|
else {
|
|
6747
6768
|
const g = this.#n[f];
|
|
6748
|
-
this.#
|
|
6769
|
+
this.#w && this.#t?.(d, g, r), this.#h && this.#l?.push([d, g, r]);
|
|
6749
6770
|
}
|
|
6750
6771
|
}
|
|
6751
|
-
if (this.#r.clear(), this.#e.fill(void 0), this.#n.fill(void 0), this.#d && this.#
|
|
6772
|
+
if (this.#r.clear(), this.#e.fill(void 0), this.#n.fill(void 0), this.#d && this.#S && (this.#d.fill(0), this.#S.fill(0)), this.#v && this.#v.fill(0), this.#u = 0, this.#a = 0, this.#b.length = 0, this.#y = 0, this.#o = 0, this.#h && this.#l) {
|
|
6752
6773
|
const f = this.#l;
|
|
6753
6774
|
let d;
|
|
6754
6775
|
for (; d = f?.shift(); )
|
|
@@ -6877,10 +6898,10 @@ function Hc() {
|
|
|
6877
6898
|
return yi = p, yi;
|
|
6878
6899
|
}
|
|
6879
6900
|
var bi, Gs;
|
|
6880
|
-
function
|
|
6901
|
+
function Uo() {
|
|
6881
6902
|
if (Gs) return bi;
|
|
6882
6903
|
Gs = 1;
|
|
6883
|
-
const e =
|
|
6904
|
+
const e = Ia, t = (s, c, h) => {
|
|
6884
6905
|
const o = s.indexOf(h);
|
|
6885
6906
|
return s.lastIndexOf(c, o > -1 ? o : 1 / 0);
|
|
6886
6907
|
}, i = (s) => {
|
|
@@ -6907,7 +6928,7 @@ var vi, qs;
|
|
|
6907
6928
|
function Vc() {
|
|
6908
6929
|
if (qs) return vi;
|
|
6909
6930
|
qs = 1;
|
|
6910
|
-
const e =
|
|
6931
|
+
const e = Uo(), t = (i) => {
|
|
6911
6932
|
const l = i.indexOf("#"), p = i.indexOf("/"), s = i.indexOf("/", p + 1), c = i.indexOf(":"), h = /\s/.exec(i), o = i.indexOf("@"), m = !h || l > -1 && h.index > l, n = o === -1 || l > -1 && o > l, u = c === -1 || l > -1 && c > l, a = s === -1 || l > -1 && s > l, r = p > 0, f = l > -1 ? i[l - 1] !== "/" : !i.endsWith("/"), d = !i.startsWith(".");
|
|
6912
6933
|
return m && r && f && d && n && u && a;
|
|
6913
6934
|
};
|
|
@@ -6929,8 +6950,8 @@ function Vc() {
|
|
|
6929
6950
|
let y = h.pathname.startsWith("/") ? h.pathname.slice(1) : h.pathname;
|
|
6930
6951
|
const v = y.indexOf("@");
|
|
6931
6952
|
v > -1 && (y = y.slice(v + 1));
|
|
6932
|
-
const
|
|
6933
|
-
|
|
6953
|
+
const w = y.lastIndexOf("/");
|
|
6954
|
+
w > -1 ? (f = decodeURIComponent(y.slice(0, w)), f || (f = null), d = decodeURIComponent(y.slice(w + 1))) : d = decodeURIComponent(y), d.endsWith(".git") && (d = d.slice(0, -4)), h.hash && (r = decodeURIComponent(h.hash.slice(1))), g = "shortcut";
|
|
6934
6955
|
} else {
|
|
6935
6956
|
if (!u.protocols.includes(h.protocol))
|
|
6936
6957
|
return;
|
|
@@ -6947,11 +6968,11 @@ function Vc() {
|
|
|
6947
6968
|
return [n, f, a, d, r, g, l];
|
|
6948
6969
|
}, vi;
|
|
6949
6970
|
}
|
|
6950
|
-
var
|
|
6971
|
+
var Si, js;
|
|
6951
6972
|
function Wc() {
|
|
6952
|
-
if (js) return
|
|
6973
|
+
if (js) return Si;
|
|
6953
6974
|
js = 1;
|
|
6954
|
-
const { LRUCache: e } = /* @__PURE__ */ Uc(), t = Hc(), i = Vc(), l =
|
|
6975
|
+
const { LRUCache: e } = /* @__PURE__ */ Uc(), t = Hc(), i = Vc(), l = Uo(), p = new e({ max: 1e3 });
|
|
6955
6976
|
function s(h) {
|
|
6956
6977
|
try {
|
|
6957
6978
|
const {
|
|
@@ -7084,12 +7105,12 @@ function Wc() {
|
|
|
7084
7105
|
}
|
|
7085
7106
|
for (const [h, o] of Object.entries(t))
|
|
7086
7107
|
c.addHost(h, o);
|
|
7087
|
-
return
|
|
7108
|
+
return Si = c, Si;
|
|
7088
7109
|
}
|
|
7089
|
-
var
|
|
7090
|
-
function
|
|
7091
|
-
if (Us) return
|
|
7092
|
-
Us = 1,
|
|
7110
|
+
var wi, Us;
|
|
7111
|
+
function Kc() {
|
|
7112
|
+
if (Us) return wi;
|
|
7113
|
+
Us = 1, wi = e;
|
|
7093
7114
|
function e(t) {
|
|
7094
7115
|
if (!t || t === "ERROR: No README data found!")
|
|
7095
7116
|
return;
|
|
@@ -7104,10 +7125,10 @@ function Yc() {
|
|
|
7104
7125
|
p++;
|
|
7105
7126
|
return t.slice(i, p).join(" ").trim();
|
|
7106
7127
|
}
|
|
7107
|
-
return
|
|
7128
|
+
return wi;
|
|
7108
7129
|
}
|
|
7109
|
-
const
|
|
7110
|
-
topLevel:
|
|
7130
|
+
const Yc = { dependancies: "dependencies", dependecies: "dependencies", depdenencies: "dependencies", devEependencies: "devDependencies", depends: "dependencies", "dev-dependencies": "devDependencies", devDependences: "devDependencies", devDepenencies: "devDependencies", devdependencies: "devDependencies", repostitory: "repository", repo: "repository", prefereGlobal: "preferGlobal", hompage: "homepage", hampage: "homepage", autohr: "author", autor: "author", contributers: "contributors", publicationConfig: "publishConfig", script: "scripts" }, Jc = { web: "url", name: "url" }, zc = { server: "start", tests: "test" }, Xc = {
|
|
7131
|
+
topLevel: Yc,
|
|
7111
7132
|
bugs: Jc,
|
|
7112
7133
|
script: zc
|
|
7113
7134
|
};
|
|
@@ -7115,7 +7136,7 @@ var Ei, Hs;
|
|
|
7115
7136
|
function Qc() {
|
|
7116
7137
|
if (Hs) return Ei;
|
|
7117
7138
|
Hs = 1;
|
|
7118
|
-
var { URL: e } =
|
|
7139
|
+
var { URL: e } = Pa, t = Mc(), i = Rc(), l = jc(), p = Wc(), { isBuiltin: s } = Ta, c = ["dependencies", "devDependencies", "optionalDependencies"], h = Kc(), o = Xc, m = (b) => b.includes("@") && b.indexOf("@") < b.lastIndexOf(".");
|
|
7119
7140
|
Ei = {
|
|
7120
7141
|
// default warning function
|
|
7121
7142
|
warn: function() {
|
|
@@ -7127,16 +7148,16 @@ function Qc() {
|
|
|
7127
7148
|
type: "git",
|
|
7128
7149
|
url: b.repository
|
|
7129
7150
|
});
|
|
7130
|
-
var
|
|
7131
|
-
if (
|
|
7132
|
-
var L = p.fromUrl(
|
|
7133
|
-
L && (
|
|
7151
|
+
var S = b.repository.url || "";
|
|
7152
|
+
if (S) {
|
|
7153
|
+
var L = p.fromUrl(S);
|
|
7154
|
+
L && (S = b.repository.url = L.getDefaultRepresentation() === "shortcut" ? L.https() : L.toString());
|
|
7134
7155
|
}
|
|
7135
|
-
|
|
7156
|
+
S.match(/github.com\/[^/]+\/[^/]+\.git\.git$/) && this.warn("brokenGitUrl", S);
|
|
7136
7157
|
},
|
|
7137
7158
|
fixTypos: function(b) {
|
|
7138
|
-
Object.keys(o.topLevel).forEach(function(
|
|
7139
|
-
Object.prototype.hasOwnProperty.call(b,
|
|
7159
|
+
Object.keys(o.topLevel).forEach(function(S) {
|
|
7160
|
+
Object.prototype.hasOwnProperty.call(b, S) && this.warn("typo", S, o.topLevel[S]);
|
|
7140
7161
|
}, this);
|
|
7141
7162
|
},
|
|
7142
7163
|
fixScriptsField: function(b) {
|
|
@@ -7145,44 +7166,44 @@ function Qc() {
|
|
|
7145
7166
|
this.warn("nonObjectScripts"), delete b.scripts;
|
|
7146
7167
|
return;
|
|
7147
7168
|
}
|
|
7148
|
-
Object.keys(b.scripts).forEach(function(
|
|
7149
|
-
typeof b.scripts[
|
|
7169
|
+
Object.keys(b.scripts).forEach(function(S) {
|
|
7170
|
+
typeof b.scripts[S] != "string" ? (this.warn("nonStringScript"), delete b.scripts[S]) : o.script[S] && !b.scripts[o.script[S]] && this.warn("typo", S, o.script[S], "scripts");
|
|
7150
7171
|
}, this);
|
|
7151
7172
|
}
|
|
7152
7173
|
},
|
|
7153
7174
|
fixFilesField: function(b) {
|
|
7154
|
-
var
|
|
7155
|
-
|
|
7175
|
+
var S = b.files;
|
|
7176
|
+
S && !Array.isArray(S) ? (this.warn("nonArrayFiles"), delete b.files) : b.files && (b.files = b.files.filter(function(L) {
|
|
7156
7177
|
return !L || typeof L != "string" ? (this.warn("invalidFilename", L), !1) : !0;
|
|
7157
7178
|
}, this));
|
|
7158
7179
|
},
|
|
7159
7180
|
fixBinField: function(b) {
|
|
7160
7181
|
if (b.bin && typeof b.bin == "string") {
|
|
7161
|
-
var
|
|
7162
|
-
(L = b.name.match(/^@[^/]+[/](.*)$/)) ?
|
|
7182
|
+
var S = {}, L;
|
|
7183
|
+
(L = b.name.match(/^@[^/]+[/](.*)$/)) ? S[L[1]] = b.bin : S[b.name] = b.bin, b.bin = S;
|
|
7163
7184
|
}
|
|
7164
7185
|
},
|
|
7165
7186
|
fixManField: function(b) {
|
|
7166
7187
|
b.man && typeof b.man == "string" && (b.man = [b.man]);
|
|
7167
7188
|
},
|
|
7168
7189
|
fixBundleDependenciesField: function(b) {
|
|
7169
|
-
var
|
|
7170
|
-
b[
|
|
7190
|
+
var S = "bundledDependencies", L = "bundleDependencies";
|
|
7191
|
+
b[S] && !b[L] && (b[L] = b[S], delete b[S]), b[L] && !Array.isArray(b[L]) ? (this.warn("nonArrayBundleDependencies"), delete b[L]) : b[L] && (b[L] = b[L].filter(function(O) {
|
|
7171
7192
|
return !O || typeof O != "string" ? (this.warn("nonStringBundleDependency", O), !1) : (b.dependencies || (b.dependencies = {}), Object.prototype.hasOwnProperty.call(b.dependencies, O) || (this.warn("nonDependencyBundleDependency", O), b.dependencies[O] = "*"), !0);
|
|
7172
7193
|
}, this));
|
|
7173
7194
|
},
|
|
7174
7195
|
fixDependencies: function(b) {
|
|
7175
|
-
v(b, this.warn), g(b, this.warn), this.fixBundleDependenciesField(b), ["dependencies", "devDependencies"].forEach(function(
|
|
7176
|
-
if (
|
|
7177
|
-
if (!b[
|
|
7178
|
-
this.warn("nonObjectDependencies",
|
|
7196
|
+
v(b, this.warn), g(b, this.warn), this.fixBundleDependenciesField(b), ["dependencies", "devDependencies"].forEach(function(S) {
|
|
7197
|
+
if (S in b) {
|
|
7198
|
+
if (!b[S] || typeof b[S] != "object") {
|
|
7199
|
+
this.warn("nonObjectDependencies", S), delete b[S];
|
|
7179
7200
|
return;
|
|
7180
7201
|
}
|
|
7181
|
-
Object.keys(b[
|
|
7182
|
-
var O = b[
|
|
7183
|
-
typeof O != "string" && (this.warn("nonStringDependency", L, JSON.stringify(O)), delete b[
|
|
7184
|
-
var $ = p.fromUrl(b[
|
|
7185
|
-
$ && (b[
|
|
7202
|
+
Object.keys(b[S]).forEach(function(L) {
|
|
7203
|
+
var O = b[S][L];
|
|
7204
|
+
typeof O != "string" && (this.warn("nonStringDependency", L, JSON.stringify(O)), delete b[S][L]);
|
|
7205
|
+
var $ = p.fromUrl(b[S][L]);
|
|
7206
|
+
$ && (b[S][L] = $.toString());
|
|
7186
7207
|
}, this);
|
|
7187
7208
|
}
|
|
7188
7209
|
}, this);
|
|
@@ -7191,12 +7212,12 @@ function Qc() {
|
|
|
7191
7212
|
b.modules && (this.warn("deprecatedModules"), delete b.modules);
|
|
7192
7213
|
},
|
|
7193
7214
|
fixKeywordsField: function(b) {
|
|
7194
|
-
typeof b.keywords == "string" && (b.keywords = b.keywords.split(/,\s+/)), b.keywords && !Array.isArray(b.keywords) ? (delete b.keywords, this.warn("nonArrayKeywords")) : b.keywords && (b.keywords = b.keywords.filter(function(
|
|
7195
|
-
return typeof
|
|
7215
|
+
typeof b.keywords == "string" && (b.keywords = b.keywords.split(/,\s+/)), b.keywords && !Array.isArray(b.keywords) ? (delete b.keywords, this.warn("nonArrayKeywords")) : b.keywords && (b.keywords = b.keywords.filter(function(S) {
|
|
7216
|
+
return typeof S != "string" || !S ? (this.warn("nonStringKeyword"), !1) : !0;
|
|
7196
7217
|
}, this));
|
|
7197
7218
|
},
|
|
7198
|
-
fixVersionField: function(b,
|
|
7199
|
-
var L = !
|
|
7219
|
+
fixVersionField: function(b, S) {
|
|
7220
|
+
var L = !S;
|
|
7200
7221
|
if (!b.version)
|
|
7201
7222
|
return b.version = "", !0;
|
|
7202
7223
|
if (!t(b.version, L))
|
|
@@ -7206,16 +7227,16 @@ function Qc() {
|
|
|
7206
7227
|
fixPeople: function(b) {
|
|
7207
7228
|
r(b, f), r(b, d);
|
|
7208
7229
|
},
|
|
7209
|
-
fixNameField: function(b,
|
|
7210
|
-
typeof
|
|
7211
|
-
var L =
|
|
7230
|
+
fixNameField: function(b, S) {
|
|
7231
|
+
typeof S == "boolean" ? S = { strict: S } : typeof S > "u" && (S = {});
|
|
7232
|
+
var L = S.strict;
|
|
7212
7233
|
if (!b.name && !L) {
|
|
7213
7234
|
b.name = "";
|
|
7214
7235
|
return;
|
|
7215
7236
|
}
|
|
7216
7237
|
if (typeof b.name != "string")
|
|
7217
7238
|
throw new Error("name field must be a string.");
|
|
7218
|
-
L || (b.name = b.name.trim()), a(b.name, L,
|
|
7239
|
+
L || (b.name = b.name.trim()), a(b.name, L, S.allowLegacyCase), s(b.name) && this.warn("conflictingName", b.name);
|
|
7219
7240
|
},
|
|
7220
7241
|
fixDescriptionField: function(b) {
|
|
7221
7242
|
b.description && typeof b.description != "string" && (this.warn("nonStringDescription"), delete b.description), b.readme && !b.description && (b.description = h(b.readme)), b.description === void 0 && delete b.description, b.description || this.warn("missingDescription");
|
|
@@ -7225,13 +7246,13 @@ function Qc() {
|
|
|
7225
7246
|
},
|
|
7226
7247
|
fixBugsField: function(b) {
|
|
7227
7248
|
if (!b.bugs && b.repository && b.repository.url) {
|
|
7228
|
-
var
|
|
7229
|
-
|
|
7249
|
+
var S = p.fromUrl(b.repository.url);
|
|
7250
|
+
S && S.bugs() && (b.bugs = { url: S.bugs() });
|
|
7230
7251
|
} else if (b.bugs) {
|
|
7231
7252
|
if (typeof b.bugs == "string")
|
|
7232
7253
|
m(b.bugs) ? b.bugs = { email: b.bugs } : e.canParse(b.bugs) ? b.bugs = { url: b.bugs } : this.warn("nonEmailUrlBugsString");
|
|
7233
7254
|
else {
|
|
7234
|
-
|
|
7255
|
+
w(b.bugs, this.warn);
|
|
7235
7256
|
var L = b.bugs;
|
|
7236
7257
|
b.bugs = {}, L.url && (e.canParse(L.url) ? b.bugs.url = L.url : this.warn("nonUrlBugsUrlField")), L.email && (typeof L.email == "string" && m(L.email) ? b.bugs.email = L.email : this.warn("nonEmailBugsEmailField"));
|
|
7237
7258
|
}
|
|
@@ -7240,8 +7261,8 @@ function Qc() {
|
|
|
7240
7261
|
},
|
|
7241
7262
|
fixHomepageField: function(b) {
|
|
7242
7263
|
if (!b.homepage && b.repository && b.repository.url) {
|
|
7243
|
-
var
|
|
7244
|
-
|
|
7264
|
+
var S = p.fromUrl(b.repository.url);
|
|
7265
|
+
S && S.docs() && (b.homepage = S.docs());
|
|
7245
7266
|
}
|
|
7246
7267
|
if (b.homepage) {
|
|
7247
7268
|
if (typeof b.homepage != "string")
|
|
@@ -7250,60 +7271,60 @@ function Qc() {
|
|
|
7250
7271
|
}
|
|
7251
7272
|
},
|
|
7252
7273
|
fixLicenseField: function(b) {
|
|
7253
|
-
const
|
|
7254
|
-
if (!
|
|
7274
|
+
const S = b.license || b.licence;
|
|
7275
|
+
if (!S)
|
|
7255
7276
|
return this.warn("missingLicense");
|
|
7256
|
-
if (typeof
|
|
7277
|
+
if (typeof S != "string" || S.length < 1 || S.trim() === "")
|
|
7257
7278
|
return this.warn("invalidLicense");
|
|
7258
|
-
if (!l(
|
|
7279
|
+
if (!l(S).validForNewPackages)
|
|
7259
7280
|
return this.warn("invalidLicense");
|
|
7260
7281
|
}
|
|
7261
7282
|
};
|
|
7262
7283
|
function n(b) {
|
|
7263
7284
|
if (b.charAt(0) !== "@")
|
|
7264
7285
|
return !1;
|
|
7265
|
-
var
|
|
7266
|
-
return
|
|
7286
|
+
var S = b.slice(1).split("/");
|
|
7287
|
+
return S.length !== 2 ? !1 : S[0] && S[1] && S[0] === encodeURIComponent(S[0]) && S[1] === encodeURIComponent(S[1]);
|
|
7267
7288
|
}
|
|
7268
7289
|
function u(b) {
|
|
7269
7290
|
return !b.match(/[/@\s+%:]/) && b === encodeURIComponent(b);
|
|
7270
7291
|
}
|
|
7271
|
-
function a(b,
|
|
7272
|
-
if (b.charAt(0) === "." || !(n(b) || u(b)) ||
|
|
7292
|
+
function a(b, S, L) {
|
|
7293
|
+
if (b.charAt(0) === "." || !(n(b) || u(b)) || S && !L && b !== b.toLowerCase() || b.toLowerCase() === "node_modules" || b.toLowerCase() === "favicon.ico")
|
|
7273
7294
|
throw new Error("Invalid name: " + JSON.stringify(b));
|
|
7274
7295
|
}
|
|
7275
|
-
function r(b,
|
|
7276
|
-
return b.author && (b.author =
|
|
7277
|
-
Array.isArray(b[L]) && (b[L] = b[L].map(
|
|
7296
|
+
function r(b, S) {
|
|
7297
|
+
return b.author && (b.author = S(b.author)), ["maintainers", "contributors"].forEach(function(L) {
|
|
7298
|
+
Array.isArray(b[L]) && (b[L] = b[L].map(S));
|
|
7278
7299
|
}), b;
|
|
7279
7300
|
}
|
|
7280
7301
|
function f(b) {
|
|
7281
7302
|
if (typeof b == "string")
|
|
7282
7303
|
return b;
|
|
7283
|
-
var
|
|
7284
|
-
return
|
|
7304
|
+
var S = b.name || "", L = b.url || b.web, O = L ? " (" + L + ")" : "", $ = b.email || b.mail, _ = $ ? " <" + $ + ">" : "";
|
|
7305
|
+
return S + _ + O;
|
|
7285
7306
|
}
|
|
7286
7307
|
function d(b) {
|
|
7287
7308
|
if (typeof b != "string")
|
|
7288
7309
|
return b;
|
|
7289
|
-
var
|
|
7290
|
-
return
|
|
7310
|
+
var S = b.match(/^([^(<]+)/), L = b.match(/\(([^()]+)\)/), O = b.match(/<([^<>]+)>/), $ = {};
|
|
7311
|
+
return S && S[0].trim() && ($.name = S[0].trim()), O && ($.email = O[1]), L && ($.url = L[1]), $;
|
|
7291
7312
|
}
|
|
7292
7313
|
function g(b) {
|
|
7293
|
-
var
|
|
7294
|
-
if (
|
|
7314
|
+
var S = b.optionalDependencies;
|
|
7315
|
+
if (S) {
|
|
7295
7316
|
var L = b.dependencies || {};
|
|
7296
|
-
Object.keys(
|
|
7297
|
-
L[O] =
|
|
7317
|
+
Object.keys(S).forEach(function(O) {
|
|
7318
|
+
L[O] = S[O];
|
|
7298
7319
|
}), b.dependencies = L;
|
|
7299
7320
|
}
|
|
7300
7321
|
}
|
|
7301
|
-
function y(b,
|
|
7322
|
+
function y(b, S, L) {
|
|
7302
7323
|
if (!b)
|
|
7303
7324
|
return {};
|
|
7304
7325
|
if (typeof b == "string" && (b = b.trim().split(/[\n\r\s\t ,]+/)), !Array.isArray(b))
|
|
7305
7326
|
return b;
|
|
7306
|
-
L("deprecatedArrayDependencies",
|
|
7327
|
+
L("deprecatedArrayDependencies", S);
|
|
7307
7328
|
var O = {};
|
|
7308
7329
|
return b.filter(function($) {
|
|
7309
7330
|
return typeof $ == "string";
|
|
@@ -7313,19 +7334,19 @@ function Qc() {
|
|
|
7313
7334
|
P = P.trim(), P = P.replace(/^@/, ""), O[_] = P;
|
|
7314
7335
|
}), O;
|
|
7315
7336
|
}
|
|
7316
|
-
function v(b,
|
|
7337
|
+
function v(b, S) {
|
|
7317
7338
|
c.forEach(function(L) {
|
|
7318
|
-
b[L] && (b[L] = y(b[L], L,
|
|
7339
|
+
b[L] && (b[L] = y(b[L], L, S));
|
|
7319
7340
|
});
|
|
7320
7341
|
}
|
|
7321
|
-
function
|
|
7342
|
+
function w(b, S) {
|
|
7322
7343
|
b && Object.keys(b).forEach(function(L) {
|
|
7323
|
-
o.bugs[L] && (
|
|
7344
|
+
o.bugs[L] && (S("typo", L, o.bugs[L], "bugs"), b[o.bugs[L]] = b[L], delete b[L]);
|
|
7324
7345
|
});
|
|
7325
7346
|
}
|
|
7326
7347
|
return Ei;
|
|
7327
7348
|
}
|
|
7328
|
-
const Zc = "'repositories' (plural) Not supported. Please pick one as the 'repository' field", eu = "No repository field.", tu = "Probably broken git url: %s", iu = "scripts must be an object", nu = "script values must be string commands", su = "Invalid 'files' member", ru = "Invalid filename in 'files' list: %s", ou = "Invalid 'bundleDependencies' list. Must be array of package names", au = "Invalid bundleDependencies member: %s", lu = "Non-dependency in bundleDependencies: %s", cu = "%s field must be an object", uu = "Invalid dependency: %s %s", fu = "specifying %s as array is deprecated", hu = "modules field is deprecated", pu = "keywords should be an array of strings", du = "keywords should be an array of strings", mu = "%s is also the name of a node core module.", gu = "'description' field should be a string", yu = "No description", bu = "No README data", vu = "No license field.",
|
|
7349
|
+
const Zc = "'repositories' (plural) Not supported. Please pick one as the 'repository' field", eu = "No repository field.", tu = "Probably broken git url: %s", iu = "scripts must be an object", nu = "script values must be string commands", su = "Invalid 'files' member", ru = "Invalid filename in 'files' list: %s", ou = "Invalid 'bundleDependencies' list. Must be array of package names", au = "Invalid bundleDependencies member: %s", lu = "Non-dependency in bundleDependencies: %s", cu = "%s field must be an object", uu = "Invalid dependency: %s %s", fu = "specifying %s as array is deprecated", hu = "modules field is deprecated", pu = "keywords should be an array of strings", du = "keywords should be an array of strings", mu = "%s is also the name of a node core module.", gu = "'description' field should be a string", yu = "No description", bu = "No README data", vu = "No license field.", Su = "Bug string field must be url, email, or {email,url}", wu = "bugs.url field must be a string url. Deleted.", Eu = "bugs.email field must be a string email. Deleted.", Cu = "Normalized value of bugs field is an empty object. Deleted.", Au = "homepage field must be a string url. Deleted.", Lu = "license should be a valid SPDX license expression", Ou = "%s should probably be %s.", $u = {
|
|
7329
7350
|
repositories: Zc,
|
|
7330
7351
|
missingRepository: eu,
|
|
7331
7352
|
brokenGitUrl: tu,
|
|
@@ -7347,8 +7368,8 @@ const Zc = "'repositories' (plural) Not supported. Please pick one as the 'repos
|
|
|
7347
7368
|
missingDescription: yu,
|
|
7348
7369
|
missingReadme: bu,
|
|
7349
7370
|
missingLicense: vu,
|
|
7350
|
-
nonEmailUrlBugsString:
|
|
7351
|
-
nonUrlBugsUrlField:
|
|
7371
|
+
nonEmailUrlBugsString: Su,
|
|
7372
|
+
nonUrlBugsUrlField: wu,
|
|
7352
7373
|
nonEmailBugsEmailField: Eu,
|
|
7353
7374
|
emptyNormalizedBugs: Cu,
|
|
7354
7375
|
nonUrlHomepage: Au,
|
|
@@ -7359,7 +7380,7 @@ var Ci, Vs;
|
|
|
7359
7380
|
function _u() {
|
|
7360
7381
|
if (Vs) return Ci;
|
|
7361
7382
|
Vs = 1;
|
|
7362
|
-
var e =
|
|
7383
|
+
var e = _a, t = $u;
|
|
7363
7384
|
Ci = function() {
|
|
7364
7385
|
var l = Array.prototype.slice.call(arguments, 0), p = l.shift();
|
|
7365
7386
|
if (p === "typo")
|
|
@@ -7411,11 +7432,11 @@ function Nu() {
|
|
|
7411
7432
|
return Ai;
|
|
7412
7433
|
}
|
|
7413
7434
|
var Pu = Nu();
|
|
7414
|
-
const Iu = /* @__PURE__ */
|
|
7415
|
-
var W = {}, Li = {}, Oi = {}, te = {},
|
|
7435
|
+
const Iu = /* @__PURE__ */ Pn(Pu);
|
|
7436
|
+
var W = {}, Li = {}, Oi = {}, te = {}, Ks;
|
|
7416
7437
|
function H() {
|
|
7417
|
-
if (
|
|
7418
|
-
|
|
7438
|
+
if (Ks) return te;
|
|
7439
|
+
Ks = 1;
|
|
7419
7440
|
const e = /* @__PURE__ */ Symbol.for("yaml.alias"), t = /* @__PURE__ */ Symbol.for("yaml.document"), i = /* @__PURE__ */ Symbol.for("yaml.map"), l = /* @__PURE__ */ Symbol.for("yaml.pair"), p = /* @__PURE__ */ Symbol.for("yaml.scalar"), s = /* @__PURE__ */ Symbol.for("yaml.seq"), c = /* @__PURE__ */ Symbol.for("yaml.node.type"), h = (g) => !!g && typeof g == "object" && g[c] === e, o = (g) => !!g && typeof g == "object" && g[c] === t, m = (g) => !!g && typeof g == "object" && g[c] === i, n = (g) => !!g && typeof g == "object" && g[c] === l, u = (g) => !!g && typeof g == "object" && g[c] === p, a = (g) => !!g && typeof g == "object" && g[c] === s;
|
|
7420
7441
|
function r(g) {
|
|
7421
7442
|
if (g && typeof g == "object")
|
|
@@ -7440,10 +7461,10 @@ function H() {
|
|
|
7440
7461
|
const d = (g) => (u(g) || r(g)) && !!g.anchor;
|
|
7441
7462
|
return te.ALIAS = e, te.DOC = t, te.MAP = i, te.NODE_TYPE = c, te.PAIR = l, te.SCALAR = p, te.SEQ = s, te.hasAnchor = d, te.isAlias = h, te.isCollection = r, te.isDocument = o, te.isMap = m, te.isNode = f, te.isPair = n, te.isScalar = u, te.isSeq = a, te;
|
|
7442
7463
|
}
|
|
7443
|
-
var mt = {},
|
|
7444
|
-
function
|
|
7445
|
-
if (
|
|
7446
|
-
|
|
7464
|
+
var mt = {}, Ys;
|
|
7465
|
+
function Rt() {
|
|
7466
|
+
if (Ys) return mt;
|
|
7467
|
+
Ys = 1;
|
|
7447
7468
|
var e = H();
|
|
7448
7469
|
const t = /* @__PURE__ */ Symbol("break visit"), i = /* @__PURE__ */ Symbol("skip children"), l = /* @__PURE__ */ Symbol("remove node");
|
|
7449
7470
|
function p(u, a) {
|
|
@@ -7563,10 +7584,10 @@ function Mt() {
|
|
|
7563
7584
|
return mt.visit = p, mt.visitAsync = c, mt;
|
|
7564
7585
|
}
|
|
7565
7586
|
var Js;
|
|
7566
|
-
function
|
|
7587
|
+
function Ho() {
|
|
7567
7588
|
if (Js) return Oi;
|
|
7568
7589
|
Js = 1;
|
|
7569
|
-
var e = H(), t =
|
|
7590
|
+
var e = H(), t = Rt();
|
|
7570
7591
|
const i = {
|
|
7571
7592
|
"!": "%21",
|
|
7572
7593
|
",": "%2C",
|
|
@@ -7686,10 +7707,10 @@ function Uo() {
|
|
|
7686
7707
|
return p.defaultYaml = { explicit: !1, version: "1.2" }, p.defaultTags = { "!!": "tag:yaml.org,2002:" }, Oi.Directives = p, Oi;
|
|
7687
7708
|
}
|
|
7688
7709
|
var $i = {}, _i = {}, Pe = {}, zs;
|
|
7689
|
-
function
|
|
7710
|
+
function jn() {
|
|
7690
7711
|
if (zs) return Pe;
|
|
7691
7712
|
zs = 1;
|
|
7692
|
-
var e = H(), t =
|
|
7713
|
+
var e = H(), t = Rt();
|
|
7693
7714
|
function i(c) {
|
|
7694
7715
|
if (/[\x00-\x19\s,[\]{}]/.test(c)) {
|
|
7695
7716
|
const o = `Anchor must not contain whitespace or control characters: ${JSON.stringify(c)}`;
|
|
@@ -7743,7 +7764,7 @@ function qn() {
|
|
|
7743
7764
|
return Pe.anchorIsValid = i, Pe.anchorNames = l, Pe.createNodeAnchors = s, Pe.findNewAnchor = p, Pe;
|
|
7744
7765
|
}
|
|
7745
7766
|
var Ni = {}, Pi = {}, Xs;
|
|
7746
|
-
function
|
|
7767
|
+
function Vo() {
|
|
7747
7768
|
if (Xs) return Pi;
|
|
7748
7769
|
Xs = 1;
|
|
7749
7770
|
function e(t, i, l, p) {
|
|
@@ -7795,10 +7816,10 @@ function Oe() {
|
|
|
7795
7816
|
return Ii.toJS = t, Ii;
|
|
7796
7817
|
}
|
|
7797
7818
|
var Zs;
|
|
7798
|
-
function
|
|
7819
|
+
function Un() {
|
|
7799
7820
|
if (Zs) return Ni;
|
|
7800
7821
|
Zs = 1;
|
|
7801
|
-
var e =
|
|
7822
|
+
var e = Vo(), t = H(), i = Oe();
|
|
7802
7823
|
class l {
|
|
7803
7824
|
constructor(s) {
|
|
7804
7825
|
Object.defineProperty(this, t.NODE_TYPE, { value: s });
|
|
@@ -7832,7 +7853,7 @@ var er;
|
|
|
7832
7853
|
function Dt() {
|
|
7833
7854
|
if (er) return _i;
|
|
7834
7855
|
er = 1;
|
|
7835
|
-
var e =
|
|
7856
|
+
var e = jn(), t = Rt(), i = H(), l = Un(), p = Oe();
|
|
7836
7857
|
let s = class extends l.NodeBase {
|
|
7837
7858
|
constructor(o) {
|
|
7838
7859
|
super(i.ALIAS), this.source = o, Object.defineProperty(this, "tag", {
|
|
@@ -7917,7 +7938,7 @@ var Ge = {}, Ti = {}, gt = {}, tr;
|
|
|
7917
7938
|
function ee() {
|
|
7918
7939
|
if (tr) return gt;
|
|
7919
7940
|
tr = 1;
|
|
7920
|
-
var e = H(), t =
|
|
7941
|
+
var e = H(), t = Un(), i = Oe();
|
|
7921
7942
|
const l = (s) => !s || typeof s != "function" && typeof s != "object";
|
|
7922
7943
|
let p = class extends t.NodeBase {
|
|
7923
7944
|
constructor(c) {
|
|
@@ -7978,10 +7999,10 @@ function Ft() {
|
|
|
7978
7999
|
return Ti.createNode = s, Ti;
|
|
7979
8000
|
}
|
|
7980
8001
|
var nr;
|
|
7981
|
-
function
|
|
8002
|
+
function Hn() {
|
|
7982
8003
|
if (nr) return Ge;
|
|
7983
8004
|
nr = 1;
|
|
7984
|
-
var e = Ft(), t = H(), i =
|
|
8005
|
+
var e = Ft(), t = H(), i = Un();
|
|
7985
8006
|
function l(c, h, o) {
|
|
7986
8007
|
let m = o;
|
|
7987
8008
|
for (let n = h.length - 1; n >= 0; --n) {
|
|
@@ -8129,11 +8150,11 @@ function Tu() {
|
|
|
8129
8150
|
const f = [], d = {};
|
|
8130
8151
|
let g = m - c.length;
|
|
8131
8152
|
typeof o == "number" && (o > m - Math.max(2, n) ? f.push(0) : g = m - o);
|
|
8132
|
-
let y, v,
|
|
8153
|
+
let y, v, w = !1, b = -1, S = -1, L = -1;
|
|
8133
8154
|
h === t && (b = p(s, b, c.length), b !== -1 && (g = b + r));
|
|
8134
8155
|
for (let $; $ = s[b += 1]; ) {
|
|
8135
8156
|
if (h === i && $ === "\\") {
|
|
8136
|
-
switch (
|
|
8157
|
+
switch (S = b, s[b + 1]) {
|
|
8137
8158
|
case "x":
|
|
8138
8159
|
b += 3;
|
|
8139
8160
|
break;
|
|
@@ -8163,17 +8184,17 @@ function Tu() {
|
|
|
8163
8184
|
f.push(y), g = y + r, y = void 0;
|
|
8164
8185
|
else if (h === i) {
|
|
8165
8186
|
for (; v === " " || v === " "; )
|
|
8166
|
-
v = $, $ = s[b += 1],
|
|
8167
|
-
const _ = b > L + 1 ? b - 2 :
|
|
8187
|
+
v = $, $ = s[b += 1], w = !0;
|
|
8188
|
+
const _ = b > L + 1 ? b - 2 : S - 1;
|
|
8168
8189
|
if (d[_])
|
|
8169
8190
|
return s;
|
|
8170
8191
|
f.push(_), d[_] = !0, g = _ + r, y = void 0;
|
|
8171
8192
|
} else
|
|
8172
|
-
|
|
8193
|
+
w = !0;
|
|
8173
8194
|
}
|
|
8174
8195
|
v = $;
|
|
8175
8196
|
}
|
|
8176
|
-
if (
|
|
8197
|
+
if (w && a && a(), f.length === 0)
|
|
8177
8198
|
return s;
|
|
8178
8199
|
u && u();
|
|
8179
8200
|
let O = s.slice(0, f[0]);
|
|
@@ -8232,13 +8253,13 @@ function Gt() {
|
|
|
8232
8253
|
if (r.options.doubleQuotedAsJSON)
|
|
8233
8254
|
return f;
|
|
8234
8255
|
const { implicitKey: d } = r, g = r.options.doubleQuotedMinMultiLineLength, y = r.indent || (l(a) ? " " : "");
|
|
8235
|
-
let v = "",
|
|
8236
|
-
for (let b = 0,
|
|
8237
|
-
if (
|
|
8256
|
+
let v = "", w = 0;
|
|
8257
|
+
for (let b = 0, S = f[b]; S; S = f[++b])
|
|
8258
|
+
if (S === " " && f[b + 1] === "\\" && f[b + 2] === "n" && (v += f.slice(w, b) + "\\ ", b += 1, w = b, S = "\\"), S === "\\")
|
|
8238
8259
|
switch (f[b + 1]) {
|
|
8239
8260
|
case "u":
|
|
8240
8261
|
{
|
|
8241
|
-
v += f.slice(
|
|
8262
|
+
v += f.slice(w, b);
|
|
8242
8263
|
const L = f.substr(b + 2, 4);
|
|
8243
8264
|
switch (L) {
|
|
8244
8265
|
case "0000":
|
|
@@ -8268,25 +8289,25 @@ function Gt() {
|
|
|
8268
8289
|
default:
|
|
8269
8290
|
L.substr(0, 2) === "00" ? v += "\\x" + L.substr(2) : v += f.substr(b, 6);
|
|
8270
8291
|
}
|
|
8271
|
-
b += 5,
|
|
8292
|
+
b += 5, w = b + 1;
|
|
8272
8293
|
}
|
|
8273
8294
|
break;
|
|
8274
8295
|
case "n":
|
|
8275
8296
|
if (d || f[b + 2] === '"' || f.length < g)
|
|
8276
8297
|
b += 1;
|
|
8277
8298
|
else {
|
|
8278
|
-
for (v += f.slice(
|
|
8299
|
+
for (v += f.slice(w, b) + `
|
|
8279
8300
|
|
|
8280
8301
|
`; f[b + 2] === "\\" && f[b + 3] === "n" && f[b + 4] !== '"'; )
|
|
8281
8302
|
v += `
|
|
8282
8303
|
`, b += 2;
|
|
8283
|
-
v += y, f[b + 2] === " " && (v += "\\"), b += 1,
|
|
8304
|
+
v += y, f[b + 2] === " " && (v += "\\"), b += 1, w = b + 1;
|
|
8284
8305
|
}
|
|
8285
8306
|
break;
|
|
8286
8307
|
default:
|
|
8287
8308
|
b += 1;
|
|
8288
8309
|
}
|
|
8289
|
-
return v =
|
|
8310
|
+
return v = w ? v + f.slice(w) : f, d ? v : t.foldFlowLines(v, y, t.FOLD_QUOTED, i(r, !1));
|
|
8290
8311
|
}
|
|
8291
8312
|
function c(a, r) {
|
|
8292
8313
|
if (r.options.singleQuote === !1 || r.implicitKey && a.includes(`
|
|
@@ -8317,10 +8338,10 @@ ${f}`) + "'";
|
|
|
8317
8338
|
o = /\n+(?!\n|$)/g;
|
|
8318
8339
|
}
|
|
8319
8340
|
function m({ comment: a, type: r, value: f }, d, g, y) {
|
|
8320
|
-
const { blockQuote: v, commentString:
|
|
8341
|
+
const { blockQuote: v, commentString: w, lineWidth: b } = d.options;
|
|
8321
8342
|
if (!v || /\n[\t ]+$/.test(f))
|
|
8322
8343
|
return h(f, d);
|
|
8323
|
-
const
|
|
8344
|
+
const S = d.indent || (d.forceBlockIndent || l(f) ? " " : ""), L = v === "literal" ? !0 : v === "folded" || r === e.Scalar.BLOCK_FOLDED ? !1 : r === e.Scalar.BLOCK_LITERAL ? !0 : !p(f, b, S.length);
|
|
8324
8345
|
if (!f)
|
|
8325
8346
|
return L ? `|
|
|
8326
8347
|
` : `>
|
|
@@ -8336,7 +8357,7 @@ ${f}`) + "'";
|
|
|
8336
8357
|
const P = _.indexOf(`
|
|
8337
8358
|
`);
|
|
8338
8359
|
P === -1 ? O = "-" : f === _ || P !== _.length - 1 ? (O = "+", y && y()) : O = "", _ && (f = f.slice(0, -_.length), _[_.length - 1] === `
|
|
8339
|
-
` && (_ = _.slice(0, -1)), _ = _.replace(o, `$&${
|
|
8360
|
+
` && (_ = _.slice(0, -1)), _ = _.replace(o, `$&${S}`));
|
|
8340
8361
|
let I = !1, B, F = -1;
|
|
8341
8362
|
for (B = 0; B < f.length; ++B) {
|
|
8342
8363
|
const T = f[B];
|
|
@@ -8349,39 +8370,39 @@ ${f}`) + "'";
|
|
|
8349
8370
|
break;
|
|
8350
8371
|
}
|
|
8351
8372
|
let D = f.substring(0, F < B ? F + 1 : B);
|
|
8352
|
-
D && (f = f.substring(D.length), D = D.replace(/\n+/g, `$&${
|
|
8353
|
-
let G = (I ?
|
|
8354
|
-
if (a && (G += " " +
|
|
8373
|
+
D && (f = f.substring(D.length), D = D.replace(/\n+/g, `$&${S}`));
|
|
8374
|
+
let G = (I ? S ? "2" : "1" : "") + O;
|
|
8375
|
+
if (a && (G += " " + w(a.replace(/ ?[\r\n]+/g, " ")), g && g()), !L) {
|
|
8355
8376
|
const T = f.replace(/\n+/g, `
|
|
8356
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${
|
|
8357
|
-
let
|
|
8377
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${S}`);
|
|
8378
|
+
let K = !1;
|
|
8358
8379
|
const j = i(d, !0);
|
|
8359
8380
|
v !== "folded" && r !== e.Scalar.BLOCK_FOLDED && (j.onOverflow = () => {
|
|
8360
|
-
|
|
8381
|
+
K = !0;
|
|
8361
8382
|
});
|
|
8362
|
-
const U = t.foldFlowLines(`${D}${T}${_}`,
|
|
8363
|
-
if (!
|
|
8383
|
+
const U = t.foldFlowLines(`${D}${T}${_}`, S, t.FOLD_BLOCK, j);
|
|
8384
|
+
if (!K)
|
|
8364
8385
|
return `>${G}
|
|
8365
|
-
${
|
|
8386
|
+
${S}${U}`;
|
|
8366
8387
|
}
|
|
8367
|
-
return f = f.replace(/\n+/g, `$&${
|
|
8368
|
-
${
|
|
8388
|
+
return f = f.replace(/\n+/g, `$&${S}`), `|${G}
|
|
8389
|
+
${S}${D}${f}${_}`;
|
|
8369
8390
|
}
|
|
8370
8391
|
function n(a, r, f, d) {
|
|
8371
|
-
const { type: g, value: y } = a, { actualString: v, implicitKey:
|
|
8372
|
-
if (
|
|
8392
|
+
const { type: g, value: y } = a, { actualString: v, implicitKey: w, indent: b, indentStep: S, inFlow: L } = r;
|
|
8393
|
+
if (w && y.includes(`
|
|
8373
8394
|
`) || L && /[[\]{},]/.test(y))
|
|
8374
8395
|
return h(y, r);
|
|
8375
8396
|
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(y))
|
|
8376
|
-
return
|
|
8397
|
+
return w || L || !y.includes(`
|
|
8377
8398
|
`) ? h(y, r) : m(a, r, f, d);
|
|
8378
|
-
if (!
|
|
8399
|
+
if (!w && !L && g !== e.Scalar.PLAIN && y.includes(`
|
|
8379
8400
|
`))
|
|
8380
8401
|
return m(a, r, f, d);
|
|
8381
8402
|
if (l(y)) {
|
|
8382
8403
|
if (b === "")
|
|
8383
8404
|
return r.forceBlockIndent = !0, m(a, r, f, d);
|
|
8384
|
-
if (
|
|
8405
|
+
if (w && b === S)
|
|
8385
8406
|
return h(y, r);
|
|
8386
8407
|
}
|
|
8387
8408
|
const O = y.replace(/\n+/g, `$&
|
|
@@ -8391,12 +8412,12 @@ ${b}`);
|
|
|
8391
8412
|
if (P.some($) || _?.some($))
|
|
8392
8413
|
return h(y, r);
|
|
8393
8414
|
}
|
|
8394
|
-
return
|
|
8415
|
+
return w ? O : t.foldFlowLines(O, b, t.FOLD_FLOW, i(r, !1));
|
|
8395
8416
|
}
|
|
8396
8417
|
function u(a, r, f, d) {
|
|
8397
8418
|
const { implicitKey: g, inFlow: y } = r, v = typeof a.value == "string" ? a : Object.assign({}, a, { value: String(a.value) });
|
|
8398
|
-
let { type:
|
|
8399
|
-
|
|
8419
|
+
let { type: w } = a;
|
|
8420
|
+
w !== e.Scalar.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(v.value) && (w = e.Scalar.QUOTE_DOUBLE);
|
|
8400
8421
|
const b = (L) => {
|
|
8401
8422
|
switch (L) {
|
|
8402
8423
|
case e.Scalar.BLOCK_FOLDED:
|
|
@@ -8412,13 +8433,13 @@ ${b}`);
|
|
|
8412
8433
|
return null;
|
|
8413
8434
|
}
|
|
8414
8435
|
};
|
|
8415
|
-
let
|
|
8416
|
-
if (
|
|
8436
|
+
let S = b(w);
|
|
8437
|
+
if (S === null) {
|
|
8417
8438
|
const { defaultKeyType: L, defaultStringType: O } = r.options, $ = g && L || O;
|
|
8418
|
-
if (
|
|
8439
|
+
if (S = b($), S === null)
|
|
8419
8440
|
throw new Error(`Unsupported default string type ${$}`);
|
|
8420
8441
|
}
|
|
8421
|
-
return
|
|
8442
|
+
return S;
|
|
8422
8443
|
}
|
|
8423
8444
|
return xi.stringifyString = u, xi;
|
|
8424
8445
|
}
|
|
@@ -8426,7 +8447,7 @@ var ar;
|
|
|
8426
8447
|
function qt() {
|
|
8427
8448
|
if (ar) return bt;
|
|
8428
8449
|
ar = 1;
|
|
8429
|
-
var e =
|
|
8450
|
+
var e = jn(), t = H(), i = Bt(), l = Gt();
|
|
8430
8451
|
function p(o, m) {
|
|
8431
8452
|
const n = Object.assign({
|
|
8432
8453
|
blockQuote: !0,
|
|
@@ -8543,21 +8564,21 @@ function ku() {
|
|
|
8543
8564
|
implicitKey: !v && (g || !n),
|
|
8544
8565
|
indent: a + r
|
|
8545
8566
|
});
|
|
8546
|
-
let
|
|
8547
|
-
if (!v && !h.inFlow &&
|
|
8567
|
+
let w = !1, b = !1, S = i.stringify(s, h, () => w = !0, () => b = !0);
|
|
8568
|
+
if (!v && !h.inFlow && S.length > 1024) {
|
|
8548
8569
|
if (g)
|
|
8549
8570
|
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
8550
8571
|
v = !0;
|
|
8551
8572
|
}
|
|
8552
8573
|
if (h.inFlow) {
|
|
8553
8574
|
if (n || c == null)
|
|
8554
|
-
return
|
|
8575
|
+
return w && o && o(), S === "" ? "?" : v ? `? ${S}` : S;
|
|
8555
8576
|
} else if (n && !g || c == null && v)
|
|
8556
|
-
return
|
|
8557
|
-
|
|
8558
|
-
${a}:`) : (
|
|
8577
|
+
return S = `? ${S}`, y && !w ? S += l.lineComment(S, h.indent, f(y)) : b && m && m(), S;
|
|
8578
|
+
w && (y = null), v ? (y && (S += l.lineComment(S, h.indent, f(y))), S = `? ${S}
|
|
8579
|
+
${a}:`) : (S = `${S}:`, y && (S += l.lineComment(S, h.indent, f(y))));
|
|
8559
8580
|
let L, O, $;
|
|
8560
|
-
e.isNode(c) ? (L = !!c.spaceBefore, O = c.commentBefore, $ = c.comment) : (L = !1, O = null, $ = null, c && typeof c == "object" && (c = u.createNode(c))), h.implicitKey = !1, !v && !y && e.isScalar(c) && (h.indentAtStart =
|
|
8581
|
+
e.isNode(c) ? (L = !!c.spaceBefore, O = c.commentBefore, $ = c.comment) : (L = !1, O = null, $ = null, c && typeof c == "object" && (c = u.createNode(c))), h.implicitKey = !1, !v && !y && e.isScalar(c) && (h.indentAtStart = S.length + 1), b = !1, !d && r.length >= 2 && !h.inFlow && !v && e.isSeq(c) && !c.flow && !c.tag && !c.anchor && (h.indent = h.indent.substring(2));
|
|
8561
8582
|
let _ = !1;
|
|
8562
8583
|
const P = i.stringify(c, h, () => _ = !0, () => b = !0);
|
|
8563
8584
|
let I = " ";
|
|
@@ -8575,8 +8596,8 @@ ${l.indentComment(B, h.indent)}`;
|
|
|
8575
8596
|
${h.indent}`;
|
|
8576
8597
|
} else if (!v && e.isCollection(c)) {
|
|
8577
8598
|
const B = P[0], F = P.indexOf(`
|
|
8578
|
-
`), D = F !== -1,
|
|
8579
|
-
if (D || !
|
|
8599
|
+
`), D = F !== -1, R = h.inFlow ?? c.flow ?? c.items.length === 0;
|
|
8600
|
+
if (D || !R) {
|
|
8580
8601
|
let G = !1;
|
|
8581
8602
|
if (D && (B === "&" || B === "!")) {
|
|
8582
8603
|
let T = P.indexOf(" ");
|
|
@@ -8587,12 +8608,12 @@ ${h.indent}`);
|
|
|
8587
8608
|
}
|
|
8588
8609
|
} else (P === "" || P[0] === `
|
|
8589
8610
|
`) && (I = "");
|
|
8590
|
-
return
|
|
8611
|
+
return S += I + P, h.inFlow ? _ && o && o() : $ && !_ ? S += l.lineComment(S, h.indent, f($)) : b && m && m(), S;
|
|
8591
8612
|
}
|
|
8592
8613
|
return ki.stringifyPair = p, ki;
|
|
8593
8614
|
}
|
|
8594
|
-
var
|
|
8595
|
-
function
|
|
8615
|
+
var Mi = {}, vt = {}, cr;
|
|
8616
|
+
function Wo() {
|
|
8596
8617
|
if (cr) return vt;
|
|
8597
8618
|
cr = 1;
|
|
8598
8619
|
var e = Ee;
|
|
@@ -8605,7 +8626,7 @@ function Vo() {
|
|
|
8605
8626
|
return vt.debug = t, vt.warn = i, vt;
|
|
8606
8627
|
}
|
|
8607
8628
|
var je = {}, ur;
|
|
8608
|
-
function
|
|
8629
|
+
function Vn() {
|
|
8609
8630
|
if (ur) return je;
|
|
8610
8631
|
ur = 1;
|
|
8611
8632
|
var e = H(), t = ee();
|
|
@@ -8650,10 +8671,10 @@ function Hn() {
|
|
|
8650
8671
|
return je.addMergeToJSMap = s, je.isMergeKey = p, je.merge = l, je;
|
|
8651
8672
|
}
|
|
8652
8673
|
var fr;
|
|
8653
|
-
function
|
|
8654
|
-
if (fr) return
|
|
8674
|
+
function Ko() {
|
|
8675
|
+
if (fr) return Mi;
|
|
8655
8676
|
fr = 1;
|
|
8656
|
-
var e =
|
|
8677
|
+
var e = Wo(), t = Vn(), i = qt(), l = H(), p = Oe();
|
|
8657
8678
|
function s(h, o, { key: m, value: n }) {
|
|
8658
8679
|
if (l.isNode(m) && m.addToJSMap)
|
|
8659
8680
|
m.addToJSMap(h, o, n);
|
|
@@ -8697,13 +8718,13 @@ function Wo() {
|
|
|
8697
8718
|
}
|
|
8698
8719
|
return JSON.stringify(o);
|
|
8699
8720
|
}
|
|
8700
|
-
return
|
|
8721
|
+
return Mi.addPairToJSMap = s, Mi;
|
|
8701
8722
|
}
|
|
8702
8723
|
var hr;
|
|
8703
8724
|
function $e() {
|
|
8704
8725
|
if (hr) return yt;
|
|
8705
8726
|
hr = 1;
|
|
8706
|
-
var e = Ft(), t = ku(), i =
|
|
8727
|
+
var e = Ft(), t = ku(), i = Ko(), l = H();
|
|
8707
8728
|
function p(c, h, o) {
|
|
8708
8729
|
const m = e.createNode(c, void 0, o), n = e.createNode(h, void 0, o);
|
|
8709
8730
|
return new s(m, n);
|
|
@@ -8726,8 +8747,8 @@ function $e() {
|
|
|
8726
8747
|
};
|
|
8727
8748
|
return yt.Pair = s, yt.createPair = p, yt;
|
|
8728
8749
|
}
|
|
8729
|
-
var
|
|
8730
|
-
function
|
|
8750
|
+
var Ri = {}, Di = {}, St = {}, Fi = {}, pr;
|
|
8751
|
+
function Jo() {
|
|
8731
8752
|
if (pr) return Fi;
|
|
8732
8753
|
pr = 1;
|
|
8733
8754
|
var e = H(), t = qt(), i = Bt();
|
|
@@ -8737,27 +8758,27 @@ function Ko() {
|
|
|
8737
8758
|
function p({ comment: h, items: o }, m, { blockItemPrefix: n, flowChars: u, itemIndent: a, onChompKeep: r, onComment: f }) {
|
|
8738
8759
|
const { indent: d, options: { commentString: g } } = m, y = Object.assign({}, m, { indent: a, type: null });
|
|
8739
8760
|
let v = !1;
|
|
8740
|
-
const
|
|
8741
|
-
for (let
|
|
8742
|
-
const L = o[
|
|
8761
|
+
const w = [];
|
|
8762
|
+
for (let S = 0; S < o.length; ++S) {
|
|
8763
|
+
const L = o[S];
|
|
8743
8764
|
let O = null;
|
|
8744
8765
|
if (e.isNode(L))
|
|
8745
|
-
!v && L.spaceBefore &&
|
|
8766
|
+
!v && L.spaceBefore && w.push(""), c(m, w, L.commentBefore, v), L.comment && (O = L.comment);
|
|
8746
8767
|
else if (e.isPair(L)) {
|
|
8747
8768
|
const _ = e.isNode(L.key) ? L.key : null;
|
|
8748
|
-
_ && (!v && _.spaceBefore &&
|
|
8769
|
+
_ && (!v && _.spaceBefore && w.push(""), c(m, w, _.commentBefore, v));
|
|
8749
8770
|
}
|
|
8750
8771
|
v = !1;
|
|
8751
8772
|
let $ = t.stringify(L, y, () => O = null, () => v = !0);
|
|
8752
|
-
O && ($ += i.lineComment($, a, g(O))), v && O && (v = !1),
|
|
8773
|
+
O && ($ += i.lineComment($, a, g(O))), v && O && (v = !1), w.push(n + $);
|
|
8753
8774
|
}
|
|
8754
8775
|
let b;
|
|
8755
|
-
if (
|
|
8776
|
+
if (w.length === 0)
|
|
8756
8777
|
b = u.start + u.end;
|
|
8757
8778
|
else {
|
|
8758
|
-
b =
|
|
8759
|
-
for (let
|
|
8760
|
-
const L = S
|
|
8779
|
+
b = w[0];
|
|
8780
|
+
for (let S = 1; S < w.length; ++S) {
|
|
8781
|
+
const L = w[S];
|
|
8761
8782
|
b += L ? `
|
|
8762
8783
|
${d}${L}` : `
|
|
8763
8784
|
`;
|
|
@@ -8776,8 +8797,8 @@ ${d}${L}` : `
|
|
|
8776
8797
|
});
|
|
8777
8798
|
let g = !1, y = 0;
|
|
8778
8799
|
const v = [];
|
|
8779
|
-
for (let
|
|
8780
|
-
const L = h[
|
|
8800
|
+
for (let S = 0; S < h.length; ++S) {
|
|
8801
|
+
const L = h[S];
|
|
8781
8802
|
let O = null;
|
|
8782
8803
|
if (e.isNode(L))
|
|
8783
8804
|
L.spaceBefore && v.push(""), c(o, v, L.commentBefore, !1), L.comment && (O = L.comment);
|
|
@@ -8790,25 +8811,25 @@ ${d}${L}` : `
|
|
|
8790
8811
|
O && (g = !0);
|
|
8791
8812
|
let $ = t.stringify(L, d, () => O = null);
|
|
8792
8813
|
g || (g = v.length > y || $.includes(`
|
|
8793
|
-
`)),
|
|
8814
|
+
`)), S < h.length - 1 ? $ += "," : o.options.trailingComma && (o.options.lineWidth > 0 && (g || (g = v.reduce((_, P) => _ + P.length + 2, 2) + ($.length + 2) > o.options.lineWidth)), g && ($ += ",")), O && ($ += i.lineComment($, n, f(O))), v.push($), y = v.length;
|
|
8794
8815
|
}
|
|
8795
|
-
const { start:
|
|
8816
|
+
const { start: w, end: b } = m;
|
|
8796
8817
|
if (v.length === 0)
|
|
8797
|
-
return
|
|
8818
|
+
return w + b;
|
|
8798
8819
|
if (!g) {
|
|
8799
|
-
const
|
|
8800
|
-
g = o.options.lineWidth > 0 &&
|
|
8820
|
+
const S = v.reduce((L, O) => L + O.length + 2, 2);
|
|
8821
|
+
g = o.options.lineWidth > 0 && S > o.options.lineWidth;
|
|
8801
8822
|
}
|
|
8802
8823
|
if (g) {
|
|
8803
|
-
let
|
|
8824
|
+
let S = w;
|
|
8804
8825
|
for (const L of v)
|
|
8805
|
-
|
|
8826
|
+
S += L ? `
|
|
8806
8827
|
${a}${u}${L}` : `
|
|
8807
8828
|
`;
|
|
8808
|
-
return `${
|
|
8829
|
+
return `${S}
|
|
8809
8830
|
${u}${b}`;
|
|
8810
8831
|
} else
|
|
8811
|
-
return `${
|
|
8832
|
+
return `${w}${r}${v.join(" ")}${r}${b}`;
|
|
8812
8833
|
}
|
|
8813
8834
|
function c({ indent: h, options: { commentString: o } }, m, n, u) {
|
|
8814
8835
|
if (n && u && (n = n.replace(/^\n+/, "")), n) {
|
|
@@ -8820,9 +8841,9 @@ ${u}${b}`;
|
|
|
8820
8841
|
}
|
|
8821
8842
|
var dr;
|
|
8822
8843
|
function _e() {
|
|
8823
|
-
if (dr) return
|
|
8844
|
+
if (dr) return St;
|
|
8824
8845
|
dr = 1;
|
|
8825
|
-
var e =
|
|
8846
|
+
var e = Jo(), t = Ko(), i = Hn(), l = H(), p = $e(), s = ee();
|
|
8826
8847
|
function c(o, m) {
|
|
8827
8848
|
const n = l.isScalar(m) ? m.value : m;
|
|
8828
8849
|
for (const u of o)
|
|
@@ -8917,7 +8938,7 @@ function _e() {
|
|
|
8917
8938
|
});
|
|
8918
8939
|
}
|
|
8919
8940
|
};
|
|
8920
|
-
return
|
|
8941
|
+
return St.YAMLMap = h, St.findPair = c, St;
|
|
8921
8942
|
}
|
|
8922
8943
|
var mr;
|
|
8923
8944
|
function Ze() {
|
|
@@ -8940,7 +8961,7 @@ var Bi = {}, Gi = {}, gr;
|
|
|
8940
8961
|
function Ne() {
|
|
8941
8962
|
if (gr) return Gi;
|
|
8942
8963
|
gr = 1;
|
|
8943
|
-
var e = Ft(), t =
|
|
8964
|
+
var e = Ft(), t = Jo(), i = Hn(), l = H(), p = ee(), s = Oe();
|
|
8944
8965
|
let c = class extends i.Collection {
|
|
8945
8966
|
static get tagName() {
|
|
8946
8967
|
return "tag:yaml.org,2002:seq";
|
|
@@ -9065,8 +9086,8 @@ function jt() {
|
|
|
9065
9086
|
};
|
|
9066
9087
|
return qi.string = t, qi;
|
|
9067
9088
|
}
|
|
9068
|
-
var
|
|
9069
|
-
function
|
|
9089
|
+
var wt = {}, ji = {}, vr;
|
|
9090
|
+
function Wn() {
|
|
9070
9091
|
if (vr) return ji;
|
|
9071
9092
|
vr = 1;
|
|
9072
9093
|
var e = ee();
|
|
@@ -9081,10 +9102,10 @@ function Vn() {
|
|
|
9081
9102
|
};
|
|
9082
9103
|
return ji.nullTag = t, ji;
|
|
9083
9104
|
}
|
|
9084
|
-
var Ui = {},
|
|
9085
|
-
function
|
|
9086
|
-
if (
|
|
9087
|
-
|
|
9105
|
+
var Ui = {}, Sr;
|
|
9106
|
+
function zo() {
|
|
9107
|
+
if (Sr) return Ui;
|
|
9108
|
+
Sr = 1;
|
|
9088
9109
|
var e = ee();
|
|
9089
9110
|
const t = {
|
|
9090
9111
|
identify: (i) => typeof i == "boolean",
|
|
@@ -9103,10 +9124,10 @@ function Jo() {
|
|
|
9103
9124
|
};
|
|
9104
9125
|
return Ui.boolTag = t, Ui;
|
|
9105
9126
|
}
|
|
9106
|
-
var Ue = {}, Hi = {},
|
|
9127
|
+
var Ue = {}, Hi = {}, wr;
|
|
9107
9128
|
function tt() {
|
|
9108
|
-
if (
|
|
9109
|
-
|
|
9129
|
+
if (wr) return Hi;
|
|
9130
|
+
wr = 1;
|
|
9110
9131
|
function e({ format: t, minFractionDigits: i, tag: l, value: p }) {
|
|
9111
9132
|
if (typeof p == "bigint")
|
|
9112
9133
|
return String(p);
|
|
@@ -9126,7 +9147,7 @@ function tt() {
|
|
|
9126
9147
|
return Hi.stringifyNumber = e, Hi;
|
|
9127
9148
|
}
|
|
9128
9149
|
var Er;
|
|
9129
|
-
function
|
|
9150
|
+
function Xo() {
|
|
9130
9151
|
if (Er) return Ue;
|
|
9131
9152
|
Er = 1;
|
|
9132
9153
|
var e = ee(), t = tt();
|
|
@@ -9162,7 +9183,7 @@ function zo() {
|
|
|
9162
9183
|
return Ue.float = p, Ue.floatExp = l, Ue.floatNaN = i, Ue;
|
|
9163
9184
|
}
|
|
9164
9185
|
var He = {}, Cr;
|
|
9165
|
-
function
|
|
9186
|
+
function Qo() {
|
|
9166
9187
|
if (Cr) return He;
|
|
9167
9188
|
Cr = 1;
|
|
9168
9189
|
var e = tt();
|
|
@@ -9201,7 +9222,7 @@ var Vi = {}, Ar;
|
|
|
9201
9222
|
function xu() {
|
|
9202
9223
|
if (Ar) return Vi;
|
|
9203
9224
|
Ar = 1;
|
|
9204
|
-
var e = Ze(), t =
|
|
9225
|
+
var e = Ze(), t = Wn(), i = et(), l = jt(), p = zo(), s = Xo(), c = Qo();
|
|
9205
9226
|
const h = [
|
|
9206
9227
|
e.map,
|
|
9207
9228
|
i.seq,
|
|
@@ -9218,7 +9239,7 @@ function xu() {
|
|
|
9218
9239
|
return Vi.schema = h, Vi;
|
|
9219
9240
|
}
|
|
9220
9241
|
var Wi = {}, Lr;
|
|
9221
|
-
function
|
|
9242
|
+
function Mu() {
|
|
9222
9243
|
if (Lr) return Wi;
|
|
9223
9244
|
Lr = 1;
|
|
9224
9245
|
var e = ee(), t = Ze(), i = et();
|
|
@@ -9276,11 +9297,11 @@ function Ru() {
|
|
|
9276
9297
|
}, h = [t.map, i.seq].concat(s, c);
|
|
9277
9298
|
return Wi.schema = h, Wi;
|
|
9278
9299
|
}
|
|
9279
|
-
var
|
|
9280
|
-
function
|
|
9281
|
-
if (Or) return
|
|
9300
|
+
var Ki = {}, Or;
|
|
9301
|
+
function Zo() {
|
|
9302
|
+
if (Or) return Ki;
|
|
9282
9303
|
Or = 1;
|
|
9283
|
-
var e =
|
|
9304
|
+
var e = ka, t = ee(), i = Gt();
|
|
9284
9305
|
const l = {
|
|
9285
9306
|
identify: (p) => p instanceof Uint8Array,
|
|
9286
9307
|
// Buffer inherits from Uint8Array
|
|
@@ -9329,10 +9350,10 @@ function Qo() {
|
|
|
9329
9350
|
return i.stringifyString({ comment: p, type: s, value: u }, h, o, m);
|
|
9330
9351
|
}
|
|
9331
9352
|
};
|
|
9332
|
-
return
|
|
9353
|
+
return Ki.binary = l, Ki;
|
|
9333
9354
|
}
|
|
9334
9355
|
var Et = {}, Ve = {}, $r;
|
|
9335
|
-
function
|
|
9356
|
+
function Kn() {
|
|
9336
9357
|
if ($r) return Ve;
|
|
9337
9358
|
$r = 1;
|
|
9338
9359
|
var e = H(), t = $e(), i = ee(), l = Ne();
|
|
@@ -9394,10 +9415,10 @@ ${a.comment}` : n.comment;
|
|
|
9394
9415
|
return Ve.createPairs = s, Ve.pairs = c, Ve.resolvePairs = p, Ve;
|
|
9395
9416
|
}
|
|
9396
9417
|
var _r;
|
|
9397
|
-
function
|
|
9418
|
+
function ea() {
|
|
9398
9419
|
if (_r) return Et;
|
|
9399
9420
|
_r = 1;
|
|
9400
|
-
var e = H(), t = Oe(), i = _e(), l = Ne(), p =
|
|
9421
|
+
var e = H(), t = Oe(), i = _e(), l = Ne(), p = Kn();
|
|
9401
9422
|
class s extends l.YAMLSeq {
|
|
9402
9423
|
constructor() {
|
|
9403
9424
|
super(), this.add = i.YAMLMap.prototype.add.bind(this), this.delete = i.YAMLMap.prototype.delete.bind(this), this.get = i.YAMLMap.prototype.get.bind(this), this.has = i.YAMLMap.prototype.has.bind(this), this.set = i.YAMLMap.prototype.set.bind(this), this.tag = s.tag;
|
|
@@ -9441,8 +9462,8 @@ function Zo() {
|
|
|
9441
9462
|
};
|
|
9442
9463
|
return Et.YAMLOMap = s, Et.omap = c, Et;
|
|
9443
9464
|
}
|
|
9444
|
-
var
|
|
9445
|
-
function
|
|
9465
|
+
var Yi = {}, Ct = {}, Nr;
|
|
9466
|
+
function Ru() {
|
|
9446
9467
|
if (Nr) return Ct;
|
|
9447
9468
|
Nr = 1;
|
|
9448
9469
|
var e = ee();
|
|
@@ -9575,7 +9596,7 @@ function Fu() {
|
|
|
9575
9596
|
return Te.int = c, Te.intBin = p, Te.intHex = h, Te.intOct = s, Te;
|
|
9576
9597
|
}
|
|
9577
9598
|
var At = {}, Tr;
|
|
9578
|
-
function
|
|
9599
|
+
function ta() {
|
|
9579
9600
|
if (Tr) return At;
|
|
9580
9601
|
Tr = 1;
|
|
9581
9602
|
var e = H(), t = $e(), i = _e();
|
|
@@ -9639,9 +9660,9 @@ function ea() {
|
|
|
9639
9660
|
};
|
|
9640
9661
|
return At.YAMLSet = l, At.set = p, At;
|
|
9641
9662
|
}
|
|
9642
|
-
var
|
|
9643
|
-
function
|
|
9644
|
-
if (kr) return
|
|
9663
|
+
var Ke = {}, kr;
|
|
9664
|
+
function ia() {
|
|
9665
|
+
if (kr) return Ke;
|
|
9645
9666
|
kr = 1;
|
|
9646
9667
|
var e = tt();
|
|
9647
9668
|
function t(c, h) {
|
|
@@ -9698,13 +9719,13 @@ function ta() {
|
|
|
9698
9719
|
},
|
|
9699
9720
|
stringify: ({ value: c }) => c?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
9700
9721
|
};
|
|
9701
|
-
return
|
|
9722
|
+
return Ke.floatTime = p, Ke.intTime = l, Ke.timestamp = s, Ke;
|
|
9702
9723
|
}
|
|
9703
9724
|
var xr;
|
|
9704
9725
|
function Bu() {
|
|
9705
|
-
if (xr) return
|
|
9726
|
+
if (xr) return Yi;
|
|
9706
9727
|
xr = 1;
|
|
9707
|
-
var e = Ze(), t =
|
|
9728
|
+
var e = Ze(), t = Wn(), i = et(), l = jt(), p = Zo(), s = Ru(), c = Du(), h = Fu(), o = Vn(), m = ea(), n = Kn(), u = ta(), a = ia();
|
|
9708
9729
|
const r = [
|
|
9709
9730
|
e.map,
|
|
9710
9731
|
i.seq,
|
|
@@ -9728,13 +9749,13 @@ function Bu() {
|
|
|
9728
9749
|
a.floatTime,
|
|
9729
9750
|
a.timestamp
|
|
9730
9751
|
];
|
|
9731
|
-
return
|
|
9752
|
+
return Yi.schema = r, Yi;
|
|
9732
9753
|
}
|
|
9733
|
-
var
|
|
9754
|
+
var Mr;
|
|
9734
9755
|
function Gu() {
|
|
9735
|
-
if (
|
|
9736
|
-
|
|
9737
|
-
var e = Ze(), t =
|
|
9756
|
+
if (Mr) return wt;
|
|
9757
|
+
Mr = 1;
|
|
9758
|
+
var e = Ze(), t = Wn(), i = et(), l = jt(), p = zo(), s = Xo(), c = Qo(), h = xu(), o = Mu(), m = Zo(), n = Vn(), u = ea(), a = Kn(), r = Bu(), f = ta(), d = ia();
|
|
9738
9759
|
const g = /* @__PURE__ */ new Map([
|
|
9739
9760
|
["core", h.schema],
|
|
9740
9761
|
["failsafe", [e.map, i.seq, l.string]],
|
|
@@ -9768,8 +9789,8 @@ function Gu() {
|
|
|
9768
9789
|
"tag:yaml.org,2002:set": f.set,
|
|
9769
9790
|
"tag:yaml.org,2002:timestamp": d.timestamp
|
|
9770
9791
|
};
|
|
9771
|
-
function
|
|
9772
|
-
const O = g.get(
|
|
9792
|
+
function w(b, S, L) {
|
|
9793
|
+
const O = g.get(S);
|
|
9773
9794
|
if (O && !b)
|
|
9774
9795
|
return L && !O.includes(n.merge) ? O.concat(n.merge) : O.slice();
|
|
9775
9796
|
let $ = O;
|
|
@@ -9778,7 +9799,7 @@ function Gu() {
|
|
|
9778
9799
|
$ = [];
|
|
9779
9800
|
else {
|
|
9780
9801
|
const _ = Array.from(g.keys()).filter((P) => P !== "yaml11").map((P) => JSON.stringify(P)).join(", ");
|
|
9781
|
-
throw new Error(`Unknown schema "${
|
|
9802
|
+
throw new Error(`Unknown schema "${S}"; use one of ${_} or define customTags array`);
|
|
9782
9803
|
}
|
|
9783
9804
|
if (Array.isArray(b))
|
|
9784
9805
|
for (const _ of b)
|
|
@@ -9793,24 +9814,24 @@ function Gu() {
|
|
|
9793
9814
|
return _.includes(I) || _.push(I), _;
|
|
9794
9815
|
}, []);
|
|
9795
9816
|
}
|
|
9796
|
-
return
|
|
9817
|
+
return wt.coreKnownTags = v, wt.getTags = w, wt;
|
|
9797
9818
|
}
|
|
9798
|
-
var
|
|
9799
|
-
function
|
|
9800
|
-
if (
|
|
9801
|
-
|
|
9819
|
+
var Rr;
|
|
9820
|
+
function sa() {
|
|
9821
|
+
if (Rr) return Ri;
|
|
9822
|
+
Rr = 1;
|
|
9802
9823
|
var e = H(), t = Ze(), i = et(), l = jt(), p = Gu();
|
|
9803
9824
|
const s = (h, o) => h.key < o.key ? -1 : h.key > o.key ? 1 : 0;
|
|
9804
|
-
let c = class
|
|
9825
|
+
let c = class na {
|
|
9805
9826
|
constructor({ compat: o, customTags: m, merge: n, resolveKnownTags: u, schema: a, sortMapEntries: r, toStringDefaults: f }) {
|
|
9806
9827
|
this.compat = Array.isArray(o) ? p.getTags(o, "compat") : o ? p.getTags(null, o) : null, this.name = typeof a == "string" && a || "core", this.knownTags = u ? p.coreKnownTags : {}, this.tags = p.getTags(m, this.name, n), this.toStringOptions = f ?? null, Object.defineProperty(this, e.MAP, { value: t.map }), Object.defineProperty(this, e.SCALAR, { value: l.string }), Object.defineProperty(this, e.SEQ, { value: i.seq }), this.sortMapEntries = typeof r == "function" ? r : r === !0 ? s : null;
|
|
9807
9828
|
}
|
|
9808
9829
|
clone() {
|
|
9809
|
-
const o = Object.create(
|
|
9830
|
+
const o = Object.create(na.prototype, Object.getOwnPropertyDescriptors(this));
|
|
9810
9831
|
return o.tags = this.tags.slice(), o;
|
|
9811
9832
|
}
|
|
9812
9833
|
};
|
|
9813
|
-
return
|
|
9834
|
+
return Ri.Schema = c, Ri;
|
|
9814
9835
|
}
|
|
9815
9836
|
var Ji = {}, Dr;
|
|
9816
9837
|
function qu() {
|
|
@@ -9866,8 +9887,8 @@ var Fr;
|
|
|
9866
9887
|
function Ut() {
|
|
9867
9888
|
if (Fr) return $i;
|
|
9868
9889
|
Fr = 1;
|
|
9869
|
-
var e = Dt(), t =
|
|
9870
|
-
let u = class
|
|
9890
|
+
var e = Dt(), t = Hn(), i = H(), l = $e(), p = Oe(), s = sa(), c = qu(), h = jn(), o = Vo(), m = Ft(), n = Ho();
|
|
9891
|
+
let u = class ra {
|
|
9871
9892
|
constructor(f, d, g) {
|
|
9872
9893
|
this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, i.NODE_TYPE, { value: i.DOC });
|
|
9873
9894
|
let y = null;
|
|
@@ -9883,8 +9904,8 @@ function Ut() {
|
|
|
9883
9904
|
version: "1.2"
|
|
9884
9905
|
}, g);
|
|
9885
9906
|
this.options = v;
|
|
9886
|
-
let { version:
|
|
9887
|
-
g?._directives ? (this.directives = g._directives.atDocument(), this.directives.yaml.explicit && (
|
|
9907
|
+
let { version: w } = v;
|
|
9908
|
+
g?._directives ? (this.directives = g._directives.atDocument(), this.directives.yaml.explicit && (w = this.directives.yaml.version)) : this.directives = new n.Directives({ version: w }), this.setSchema(w, g), this.contents = f === void 0 ? null : this.createNode(f, y, g);
|
|
9888
9909
|
}
|
|
9889
9910
|
/**
|
|
9890
9911
|
* Create a deep copy of this Document and its contents.
|
|
@@ -9892,7 +9913,7 @@ function Ut() {
|
|
|
9892
9913
|
* Custom Node values that inherit from `Object` still refer to their original instances.
|
|
9893
9914
|
*/
|
|
9894
9915
|
clone() {
|
|
9895
|
-
const f = Object.create(
|
|
9916
|
+
const f = Object.create(ra.prototype, {
|
|
9896
9917
|
[i.NODE_TYPE]: { value: i.DOC }
|
|
9897
9918
|
});
|
|
9898
9919
|
return f.commentBefore = this.commentBefore, f.comment = this.comment, f.errors = this.errors.slice(), f.warnings = this.warnings.slice(), f.options = Object.assign({}, this.options), this.directives && (f.directives = this.directives.clone()), f.schema = this.schema.clone(), f.contents = i.isNode(this.contents) ? this.contents.clone(f.schema) : this.contents, this.range && (f.range = this.range.slice()), f;
|
|
@@ -9927,16 +9948,16 @@ function Ut() {
|
|
|
9927
9948
|
if (typeof d == "function")
|
|
9928
9949
|
f = d.call({ "": f }, "", f), y = d;
|
|
9929
9950
|
else if (Array.isArray(d)) {
|
|
9930
|
-
const F = (
|
|
9951
|
+
const F = (R) => typeof R == "number" || R instanceof String || R instanceof Number, D = d.filter(F).map(String);
|
|
9931
9952
|
D.length > 0 && (d = d.concat(D)), y = d;
|
|
9932
9953
|
} else g === void 0 && d && (g = d, d = void 0);
|
|
9933
|
-
const { aliasDuplicateObjects: v, anchorPrefix:
|
|
9954
|
+
const { aliasDuplicateObjects: v, anchorPrefix: w, flow: b, keepUndefined: S, onTagObj: L, tag: O } = g ?? {}, { onAnchor: $, setAnchors: _, sourceObjects: P } = h.createNodeAnchors(
|
|
9934
9955
|
this,
|
|
9935
9956
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
9936
|
-
|
|
9957
|
+
w || "a"
|
|
9937
9958
|
), I = {
|
|
9938
9959
|
aliasDuplicateObjects: v ?? !0,
|
|
9939
|
-
keepUndefined:
|
|
9960
|
+
keepUndefined: S ?? !1,
|
|
9940
9961
|
onAnchor: $,
|
|
9941
9962
|
onTagObj: L,
|
|
9942
9963
|
replacer: y,
|
|
@@ -10043,7 +10064,7 @@ function Ut() {
|
|
|
10043
10064
|
throw new Error("With a null YAML version, the { schema: Schema } option is required");
|
|
10044
10065
|
}
|
|
10045
10066
|
// json & jsonArg are only used from toJSON()
|
|
10046
|
-
toJS({ json: f, jsonArg: d, mapAsMap: g, maxAliasCount: y, onAnchor: v, reviver:
|
|
10067
|
+
toJS({ json: f, jsonArg: d, mapAsMap: g, maxAliasCount: y, onAnchor: v, reviver: w } = {}) {
|
|
10047
10068
|
const b = {
|
|
10048
10069
|
anchors: /* @__PURE__ */ new Map(),
|
|
10049
10070
|
doc: this,
|
|
@@ -10051,11 +10072,11 @@ function Ut() {
|
|
|
10051
10072
|
mapAsMap: g === !0,
|
|
10052
10073
|
mapKeyWarned: !1,
|
|
10053
10074
|
maxAliasCount: typeof y == "number" ? y : 100
|
|
10054
|
-
},
|
|
10075
|
+
}, S = p.toJS(this.contents, d ?? "", b);
|
|
10055
10076
|
if (typeof v == "function")
|
|
10056
10077
|
for (const { count: L, res: O } of b.anchors.values())
|
|
10057
10078
|
v(O, L);
|
|
10058
|
-
return typeof
|
|
10079
|
+
return typeof w == "function" ? o.applyReviver(w, { "": S }, "", S) : S;
|
|
10059
10080
|
}
|
|
10060
10081
|
/**
|
|
10061
10082
|
* A JSON representation of the document `contents`.
|
|
@@ -10138,7 +10159,7 @@ function Vt() {
|
|
|
10138
10159
|
if (Gr) return Zi;
|
|
10139
10160
|
Gr = 1;
|
|
10140
10161
|
function e(t, { flow: i, indicator: l, next: p, offset: s, onError: c, parentIndent: h, startOnNewline: o }) {
|
|
10141
|
-
let m = !1, n = o, u = o, a = "", r = "", f = !1, d = !1, g = null, y = null, v = null,
|
|
10162
|
+
let m = !1, n = o, u = o, a = "", r = "", f = !1, d = !1, g = null, y = null, v = null, w = null, b = null, S = null, L = null;
|
|
10142
10163
|
for (const _ of t)
|
|
10143
10164
|
switch (d && (_.type !== "space" && _.type !== "newline" && _.type !== "comma" && c(_.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), d = !1), g && (n && _.type !== "comment" && _.type !== "newline" && c(g, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), g = null), _.type) {
|
|
10144
10165
|
case "space":
|
|
@@ -10151,7 +10172,7 @@ function Vt() {
|
|
|
10151
10172
|
break;
|
|
10152
10173
|
}
|
|
10153
10174
|
case "newline":
|
|
10154
|
-
n ? a ? a += _.source : (!
|
|
10175
|
+
n ? a ? a += _.source : (!S || l !== "seq-item-ind") && (m = !0) : r += _.source, n = !0, f = !0, (y || v) && (w = _), u = !0;
|
|
10155
10176
|
break;
|
|
10156
10177
|
case "anchor":
|
|
10157
10178
|
y && c(_, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), _.source.endsWith(":") && c(_.offset + _.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), y = _, L ?? (L = _.offset), n = !1, u = !1, d = !0;
|
|
@@ -10161,7 +10182,7 @@ function Vt() {
|
|
|
10161
10182
|
break;
|
|
10162
10183
|
}
|
|
10163
10184
|
case l:
|
|
10164
|
-
(y || v) && c(_, "BAD_PROP_ORDER", `Anchors and tags must be after the ${_.source} indicator`),
|
|
10185
|
+
(y || v) && c(_, "BAD_PROP_ORDER", `Anchors and tags must be after the ${_.source} indicator`), S && c(_, "UNEXPECTED_TOKEN", `Unexpected ${_.source} in ${i ?? "collection"}`), S = _, n = l === "seq-item-ind" || l === "explicit-key-ind", u = !1;
|
|
10165
10186
|
break;
|
|
10166
10187
|
case "comma":
|
|
10167
10188
|
if (i) {
|
|
@@ -10175,13 +10196,13 @@ function Vt() {
|
|
|
10175
10196
|
const O = t[t.length - 1], $ = O ? O.offset + O.source.length : s;
|
|
10176
10197
|
return d && p && p.type !== "space" && p.type !== "newline" && p.type !== "comma" && (p.type !== "scalar" || p.source !== "") && c(p.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), g && (n && g.indent <= h || p?.type === "block-map" || p?.type === "block-seq") && c(g, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
|
|
10177
10198
|
comma: b,
|
|
10178
|
-
found:
|
|
10199
|
+
found: S,
|
|
10179
10200
|
spaceBefore: m,
|
|
10180
10201
|
comment: a,
|
|
10181
10202
|
hasNewline: f,
|
|
10182
10203
|
anchor: y,
|
|
10183
10204
|
tag: v,
|
|
10184
|
-
newlineAfterProp:
|
|
10205
|
+
newlineAfterProp: w,
|
|
10185
10206
|
end: $,
|
|
10186
10207
|
start: L ?? $
|
|
10187
10208
|
};
|
|
@@ -10230,7 +10251,7 @@ function Yn() {
|
|
|
10230
10251
|
return en.containsNewline = e, en;
|
|
10231
10252
|
}
|
|
10232
10253
|
var tn = {}, jr;
|
|
10233
|
-
function
|
|
10254
|
+
function oa() {
|
|
10234
10255
|
if (jr) return tn;
|
|
10235
10256
|
jr = 1;
|
|
10236
10257
|
var e = Yn();
|
|
@@ -10243,7 +10264,7 @@ function ra() {
|
|
|
10243
10264
|
return tn.flowIndentCheck = t, tn;
|
|
10244
10265
|
}
|
|
10245
10266
|
var nn = {}, Ur;
|
|
10246
|
-
function
|
|
10267
|
+
function aa() {
|
|
10247
10268
|
if (Ur) return nn;
|
|
10248
10269
|
Ur = 1;
|
|
10249
10270
|
var e = H();
|
|
@@ -10260,33 +10281,33 @@ var Hr;
|
|
|
10260
10281
|
function ju() {
|
|
10261
10282
|
if (Hr) return Qi;
|
|
10262
10283
|
Hr = 1;
|
|
10263
|
-
var e = $e(), t = _e(), i = Vt(), l = Yn(), p =
|
|
10284
|
+
var e = $e(), t = _e(), i = Vt(), l = Yn(), p = oa(), s = aa();
|
|
10264
10285
|
const c = "All mapping items must start at the same column";
|
|
10265
10286
|
function h({ composeNode: o, composeEmptyNode: m }, n, u, a, r) {
|
|
10266
10287
|
const f = r?.nodeClass ?? t.YAMLMap, d = new f(n.schema);
|
|
10267
10288
|
n.atRoot && (n.atRoot = !1);
|
|
10268
10289
|
let g = u.offset, y = null;
|
|
10269
10290
|
for (const v of u.items) {
|
|
10270
|
-
const { start:
|
|
10291
|
+
const { start: w, key: b, sep: S, value: L } = v, O = i.resolveProps(w, {
|
|
10271
10292
|
indicator: "explicit-key-ind",
|
|
10272
|
-
next: b ??
|
|
10293
|
+
next: b ?? S?.[0],
|
|
10273
10294
|
offset: g,
|
|
10274
10295
|
onError: a,
|
|
10275
10296
|
parentIndent: u.indent,
|
|
10276
10297
|
startOnNewline: !0
|
|
10277
10298
|
}), $ = !O.found;
|
|
10278
10299
|
if ($) {
|
|
10279
|
-
if (b && (b.type === "block-seq" ? a(g, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in b && b.indent !== u.indent && a(g, "BAD_INDENT", c)), !O.anchor && !O.tag && !
|
|
10300
|
+
if (b && (b.type === "block-seq" ? a(g, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in b && b.indent !== u.indent && a(g, "BAD_INDENT", c)), !O.anchor && !O.tag && !S) {
|
|
10280
10301
|
y = O.end, O.comment && (d.comment ? d.comment += `
|
|
10281
10302
|
` + O.comment : d.comment = O.comment);
|
|
10282
10303
|
continue;
|
|
10283
10304
|
}
|
|
10284
|
-
(O.newlineAfterProp || l.containsNewline(b)) && a(b ??
|
|
10305
|
+
(O.newlineAfterProp || l.containsNewline(b)) && a(b ?? w[w.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
|
|
10285
10306
|
} else O.found?.indent !== u.indent && a(g, "BAD_INDENT", c);
|
|
10286
10307
|
n.atKey = !0;
|
|
10287
|
-
const _ = O.end, P = b ? o(n, b, O, a) : m(n, _,
|
|
10308
|
+
const _ = O.end, P = b ? o(n, b, O, a) : m(n, _, w, null, O, a);
|
|
10288
10309
|
n.schema.compat && p.flowIndentCheck(u.indent, b, a), n.atKey = !1, s.mapIncludes(n, d.items, P) && a(_, "DUPLICATE_KEY", "Map keys must be unique");
|
|
10289
|
-
const I = i.resolveProps(
|
|
10310
|
+
const I = i.resolveProps(S ?? [], {
|
|
10290
10311
|
indicator: "map-value-ind",
|
|
10291
10312
|
next: L,
|
|
10292
10313
|
offset: P.range[2],
|
|
@@ -10296,7 +10317,7 @@ function ju() {
|
|
|
10296
10317
|
});
|
|
10297
10318
|
if (g = I.end, I.found) {
|
|
10298
10319
|
$ && (L?.type === "block-map" && !I.hasNewline && a(g, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && O.start < I.found.offset - 1024 && a(P.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
|
|
10299
|
-
const B = L ? o(n, L, I, a) : m(n, g,
|
|
10320
|
+
const B = L ? o(n, L, I, a) : m(n, g, S, null, I, a);
|
|
10300
10321
|
n.schema.compat && p.flowIndentCheck(u.indent, L, a), g = B.range[2];
|
|
10301
10322
|
const F = new e.Pair(P, B);
|
|
10302
10323
|
n.options.keepSourceTokens && (F.srcToken = v), d.items.push(F);
|
|
@@ -10315,7 +10336,7 @@ var sn = {}, Vr;
|
|
|
10315
10336
|
function Uu() {
|
|
10316
10337
|
if (Vr) return sn;
|
|
10317
10338
|
Vr = 1;
|
|
10318
|
-
var e = Ne(), t = Vt(), i =
|
|
10339
|
+
var e = Ne(), t = Vt(), i = oa();
|
|
10319
10340
|
function l({ composeNode: p, composeEmptyNode: s }, c, h, o, m) {
|
|
10320
10341
|
const n = m?.nodeClass ?? e.YAMLSeq, u = new n(c.schema);
|
|
10321
10342
|
c.atRoot && (c.atRoot = !1), c.atKey && (c.atKey = !1);
|
|
@@ -10376,30 +10397,30 @@ function it() {
|
|
|
10376
10397
|
}
|
|
10377
10398
|
return on.resolveEnd = e, on;
|
|
10378
10399
|
}
|
|
10379
|
-
var
|
|
10400
|
+
var Kr;
|
|
10380
10401
|
function Hu() {
|
|
10381
|
-
if (
|
|
10382
|
-
|
|
10383
|
-
var e = H(), t = $e(), i = _e(), l = Ne(), p = it(), s = Vt(), c = Yn(), h =
|
|
10402
|
+
if (Kr) return rn;
|
|
10403
|
+
Kr = 1;
|
|
10404
|
+
var e = H(), t = $e(), i = _e(), l = Ne(), p = it(), s = Vt(), c = Yn(), h = aa();
|
|
10384
10405
|
const o = "Block collections are not allowed within flow collections", m = (u) => u && (u.type === "block-map" || u.type === "block-seq");
|
|
10385
10406
|
function n({ composeNode: u, composeEmptyNode: a }, r, f, d, g) {
|
|
10386
|
-
const y = f.start.source === "{", v = y ? "flow map" : "flow sequence",
|
|
10407
|
+
const y = f.start.source === "{", v = y ? "flow map" : "flow sequence", w = g?.nodeClass ?? (y ? i.YAMLMap : l.YAMLSeq), b = new w(r.schema);
|
|
10387
10408
|
b.flow = !0;
|
|
10388
|
-
const
|
|
10389
|
-
|
|
10409
|
+
const S = r.atRoot;
|
|
10410
|
+
S && (r.atRoot = !1), r.atKey && (r.atKey = !1);
|
|
10390
10411
|
let L = f.offset + f.start.source.length;
|
|
10391
10412
|
for (let I = 0; I < f.items.length; ++I) {
|
|
10392
|
-
const B = f.items[I], { start: F, key: D, sep:
|
|
10413
|
+
const B = f.items[I], { start: F, key: D, sep: R, value: G } = B, T = s.resolveProps(F, {
|
|
10393
10414
|
flow: v,
|
|
10394
10415
|
indicator: "explicit-key-ind",
|
|
10395
|
-
next: D ??
|
|
10416
|
+
next: D ?? R?.[0],
|
|
10396
10417
|
offset: L,
|
|
10397
10418
|
onError: d,
|
|
10398
10419
|
parentIndent: f.indent,
|
|
10399
10420
|
startOnNewline: !1
|
|
10400
10421
|
});
|
|
10401
10422
|
if (!T.found) {
|
|
10402
|
-
if (!T.anchor && !T.tag && !
|
|
10423
|
+
if (!T.anchor && !T.tag && !R && !G) {
|
|
10403
10424
|
I === 0 && T.comma ? d(T.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${v}`) : I < f.items.length - 1 && d(T.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${v}`), T.comment && (b.comment ? b.comment += `
|
|
10404
10425
|
` + T.comment : b.comment = T.comment), L = T.end;
|
|
10405
10426
|
continue;
|
|
@@ -10414,32 +10435,32 @@ function Hu() {
|
|
|
10414
10435
|
if (I === 0)
|
|
10415
10436
|
T.comma && d(T.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${v}`);
|
|
10416
10437
|
else if (T.comma || d(T.start, "MISSING_CHAR", `Missing , between ${v} items`), T.comment) {
|
|
10417
|
-
let
|
|
10438
|
+
let K = "";
|
|
10418
10439
|
e: for (const j of F)
|
|
10419
10440
|
switch (j.type) {
|
|
10420
10441
|
case "comma":
|
|
10421
10442
|
case "space":
|
|
10422
10443
|
break;
|
|
10423
10444
|
case "comment":
|
|
10424
|
-
|
|
10445
|
+
K = j.source.substring(1);
|
|
10425
10446
|
break e;
|
|
10426
10447
|
default:
|
|
10427
10448
|
break e;
|
|
10428
10449
|
}
|
|
10429
|
-
if (
|
|
10450
|
+
if (K) {
|
|
10430
10451
|
let j = b.items[b.items.length - 1];
|
|
10431
10452
|
e.isPair(j) && (j = j.value ?? j.key), j.comment ? j.comment += `
|
|
10432
|
-
` +
|
|
10453
|
+
` + K : j.comment = K, T.comment = T.comment.substring(K.length + 1);
|
|
10433
10454
|
}
|
|
10434
10455
|
}
|
|
10435
|
-
if (!y && !
|
|
10436
|
-
const
|
|
10437
|
-
b.items.push(
|
|
10456
|
+
if (!y && !R && !T.found) {
|
|
10457
|
+
const K = G ? u(r, G, T, d) : a(r, T.end, R, null, T, d);
|
|
10458
|
+
b.items.push(K), L = K.range[2], m(G) && d(K.range, "BLOCK_IN_FLOW", o);
|
|
10438
10459
|
} else {
|
|
10439
10460
|
r.atKey = !0;
|
|
10440
|
-
const
|
|
10461
|
+
const K = T.end, j = D ? u(r, D, T, d) : a(r, K, F, null, T, d);
|
|
10441
10462
|
m(D) && d(j.range, "BLOCK_IN_FLOW", o), r.atKey = !1;
|
|
10442
|
-
const U = s.resolveProps(
|
|
10463
|
+
const U = s.resolveProps(R ?? [], {
|
|
10443
10464
|
flow: v,
|
|
10444
10465
|
indicator: "map-value-ind",
|
|
10445
10466
|
next: G,
|
|
@@ -10450,8 +10471,8 @@ function Hu() {
|
|
|
10450
10471
|
});
|
|
10451
10472
|
if (U.found) {
|
|
10452
10473
|
if (!y && !T.found && r.options.strict) {
|
|
10453
|
-
if (
|
|
10454
|
-
for (const le of
|
|
10474
|
+
if (R)
|
|
10475
|
+
for (const le of R) {
|
|
10455
10476
|
if (le === U.found)
|
|
10456
10477
|
break;
|
|
10457
10478
|
if (le.type === "newline") {
|
|
@@ -10462,13 +10483,13 @@ function Hu() {
|
|
|
10462
10483
|
T.start < U.found.offset - 1024 && d(U.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
|
|
10463
10484
|
}
|
|
10464
10485
|
} else G && ("source" in G && G.source?.[0] === ":" ? d(G, "MISSING_CHAR", `Missing space after : in ${v}`) : d(U.start, "MISSING_CHAR", `Missing , or : between ${v} items`));
|
|
10465
|
-
const ie = G ? u(r, G, U, d) : U.found ? a(r, U.end,
|
|
10486
|
+
const ie = G ? u(r, G, U, d) : U.found ? a(r, U.end, R, null, U, d) : null;
|
|
10466
10487
|
ie ? m(G) && d(ie.range, "BLOCK_IN_FLOW", o) : U.comment && (j.comment ? j.comment += `
|
|
10467
10488
|
` + U.comment : j.comment = U.comment);
|
|
10468
10489
|
const ve = new t.Pair(j, ie);
|
|
10469
10490
|
if (r.options.keepSourceTokens && (ve.srcToken = B), y) {
|
|
10470
10491
|
const le = b;
|
|
10471
|
-
h.mapIncludes(r, le.items, j) && d(
|
|
10492
|
+
h.mapIncludes(r, le.items, j) && d(K, "DUPLICATE_KEY", "Map keys must be unique"), le.items.push(ve);
|
|
10472
10493
|
} else {
|
|
10473
10494
|
const le = new i.YAMLMap(r.schema);
|
|
10474
10495
|
le.flow = !0, le.items.push(ve);
|
|
@@ -10483,8 +10504,8 @@ function Hu() {
|
|
|
10483
10504
|
if ($?.source === O)
|
|
10484
10505
|
P = $.offset + $.source.length;
|
|
10485
10506
|
else {
|
|
10486
|
-
const I = v[0].toUpperCase() + v.substring(1), B =
|
|
10487
|
-
d(L,
|
|
10507
|
+
const I = v[0].toUpperCase() + v.substring(1), B = S ? `${I} must end with a ${O}` : `${I} in block collection must be sufficiently indented and end with a ${O}`;
|
|
10508
|
+
d(L, S ? "MISSING_CHAR" : "BAD_INDENT", B), $ && $.source.length !== 1 && _.unshift($);
|
|
10488
10509
|
}
|
|
10489
10510
|
if (_.length > 0) {
|
|
10490
10511
|
const I = p.resolveEnd(_, P, r.options.strict, d);
|
|
@@ -10496,39 +10517,39 @@ function Hu() {
|
|
|
10496
10517
|
}
|
|
10497
10518
|
return rn.resolveFlowCollection = n, rn;
|
|
10498
10519
|
}
|
|
10499
|
-
var
|
|
10520
|
+
var Yr;
|
|
10500
10521
|
function Vu() {
|
|
10501
|
-
if (
|
|
10502
|
-
|
|
10522
|
+
if (Yr) return Xi;
|
|
10523
|
+
Yr = 1;
|
|
10503
10524
|
var e = H(), t = ee(), i = _e(), l = Ne(), p = ju(), s = Uu(), c = Hu();
|
|
10504
10525
|
function h(m, n, u, a, r, f) {
|
|
10505
10526
|
const d = u.type === "block-map" ? p.resolveBlockMap(m, n, u, a, f) : u.type === "block-seq" ? s.resolveBlockSeq(m, n, u, a, f) : c.resolveFlowCollection(m, n, u, a, f), g = d.constructor;
|
|
10506
10527
|
return r === "!" || r === g.tagName ? (d.tag = g.tagName, d) : (r && (d.tag = r), d);
|
|
10507
10528
|
}
|
|
10508
10529
|
function o(m, n, u, a, r) {
|
|
10509
|
-
const f = a.tag, d = f ? n.directives.tagName(f.source, (
|
|
10530
|
+
const f = a.tag, d = f ? n.directives.tagName(f.source, (S) => r(f, "TAG_RESOLVE_FAILED", S)) : null;
|
|
10510
10531
|
if (u.type === "block-seq") {
|
|
10511
|
-
const { anchor:
|
|
10532
|
+
const { anchor: S, newlineAfterProp: L } = a, O = S && f ? S.offset > f.offset ? S : f : S ?? f;
|
|
10512
10533
|
O && (!L || L.offset < O.offset) && r(O, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
10513
10534
|
}
|
|
10514
10535
|
const g = u.type === "block-map" ? "map" : u.type === "block-seq" ? "seq" : u.start.source === "{" ? "map" : "seq";
|
|
10515
10536
|
if (!f || !d || d === "!" || d === i.YAMLMap.tagName && g === "map" || d === l.YAMLSeq.tagName && g === "seq")
|
|
10516
10537
|
return h(m, n, u, r, d);
|
|
10517
|
-
let y = n.schema.tags.find((
|
|
10538
|
+
let y = n.schema.tags.find((S) => S.tag === d && S.collection === g);
|
|
10518
10539
|
if (!y) {
|
|
10519
|
-
const
|
|
10520
|
-
if (
|
|
10521
|
-
n.schema.tags.push(Object.assign({},
|
|
10540
|
+
const S = n.schema.knownTags[d];
|
|
10541
|
+
if (S?.collection === g)
|
|
10542
|
+
n.schema.tags.push(Object.assign({}, S, { default: !1 })), y = S;
|
|
10522
10543
|
else
|
|
10523
|
-
return
|
|
10544
|
+
return S ? r(f, "BAD_COLLECTION_TYPE", `${S.tag} used for ${g} collection, but expects ${S.collection ?? "scalar"}`, !0) : r(f, "TAG_RESOLVE_FAILED", `Unresolved tag: ${d}`, !0), h(m, n, u, r, d);
|
|
10524
10545
|
}
|
|
10525
|
-
const v = h(m, n, u, r, d, y),
|
|
10546
|
+
const v = h(m, n, u, r, d, y), w = y.resolve?.(v, (S) => r(f, "TAG_RESOLVE_FAILED", S), n.options) ?? v, b = e.isNode(w) ? w : new t.Scalar(w);
|
|
10526
10547
|
return b.range = v.range, b.tag = d, y?.format && (b.format = y.format), b;
|
|
10527
10548
|
}
|
|
10528
10549
|
return Xi.composeCollection = o, Xi;
|
|
10529
10550
|
}
|
|
10530
10551
|
var an = {}, ln = {}, Jr;
|
|
10531
|
-
function
|
|
10552
|
+
function la() {
|
|
10532
10553
|
if (Jr) return ln;
|
|
10533
10554
|
Jr = 1;
|
|
10534
10555
|
var e = ee();
|
|
@@ -10538,62 +10559,62 @@ function aa() {
|
|
|
10538
10559
|
return { value: "", type: null, comment: "", range: [h, h, h] };
|
|
10539
10560
|
const m = o.mode === ">" ? e.Scalar.BLOCK_FOLDED : e.Scalar.BLOCK_LITERAL, n = s.source ? l(s.source) : [];
|
|
10540
10561
|
let u = n.length;
|
|
10541
|
-
for (let
|
|
10542
|
-
const b = n[
|
|
10562
|
+
for (let w = n.length - 1; w >= 0; --w) {
|
|
10563
|
+
const b = n[w][1];
|
|
10543
10564
|
if (b === "" || b === "\r")
|
|
10544
|
-
u =
|
|
10565
|
+
u = w;
|
|
10545
10566
|
else
|
|
10546
10567
|
break;
|
|
10547
10568
|
}
|
|
10548
10569
|
if (u === 0) {
|
|
10549
|
-
const
|
|
10570
|
+
const w = o.chomp === "+" && n.length > 0 ? `
|
|
10550
10571
|
`.repeat(Math.max(1, n.length - 1)) : "";
|
|
10551
10572
|
let b = h + o.length;
|
|
10552
|
-
return s.source && (b += s.source.length), { value:
|
|
10573
|
+
return s.source && (b += s.source.length), { value: w, type: m, comment: o.comment, range: [h, b, b] };
|
|
10553
10574
|
}
|
|
10554
10575
|
let a = s.indent + o.indent, r = s.offset + o.length, f = 0;
|
|
10555
|
-
for (let
|
|
10556
|
-
const [b,
|
|
10557
|
-
if (
|
|
10576
|
+
for (let w = 0; w < u; ++w) {
|
|
10577
|
+
const [b, S] = n[w];
|
|
10578
|
+
if (S === "" || S === "\r")
|
|
10558
10579
|
o.indent === 0 && b.length > a && (a = b.length);
|
|
10559
10580
|
else {
|
|
10560
|
-
b.length < a && c(r + b.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), o.indent === 0 && (a = b.length), f =
|
|
10581
|
+
b.length < a && c(r + b.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), o.indent === 0 && (a = b.length), f = w, a === 0 && !p.atRoot && c(r, "BAD_INDENT", "Block scalar values in collections must be indented");
|
|
10561
10582
|
break;
|
|
10562
10583
|
}
|
|
10563
|
-
r += b.length +
|
|
10584
|
+
r += b.length + S.length + 1;
|
|
10564
10585
|
}
|
|
10565
|
-
for (let
|
|
10566
|
-
n[
|
|
10586
|
+
for (let w = n.length - 1; w >= u; --w)
|
|
10587
|
+
n[w][0].length > a && (u = w + 1);
|
|
10567
10588
|
let d = "", g = "", y = !1;
|
|
10568
|
-
for (let
|
|
10569
|
-
d += n[
|
|
10589
|
+
for (let w = 0; w < f; ++w)
|
|
10590
|
+
d += n[w][0].slice(a) + `
|
|
10570
10591
|
`;
|
|
10571
|
-
for (let
|
|
10572
|
-
let [b,
|
|
10573
|
-
r += b.length +
|
|
10574
|
-
const L =
|
|
10575
|
-
if (L && (
|
|
10592
|
+
for (let w = f; w < u; ++w) {
|
|
10593
|
+
let [b, S] = n[w];
|
|
10594
|
+
r += b.length + S.length + 1;
|
|
10595
|
+
const L = S[S.length - 1] === "\r";
|
|
10596
|
+
if (L && (S = S.slice(0, -1)), S && b.length < a) {
|
|
10576
10597
|
const $ = `Block scalar lines must not be less indented than their ${o.indent ? "explicit indentation indicator" : "first line"}`;
|
|
10577
|
-
c(r -
|
|
10598
|
+
c(r - S.length - (L ? 2 : 1), "BAD_INDENT", $), b = "";
|
|
10578
10599
|
}
|
|
10579
|
-
m === e.Scalar.BLOCK_LITERAL ? (d += g + b.slice(a) +
|
|
10580
|
-
`) : b.length > a ||
|
|
10600
|
+
m === e.Scalar.BLOCK_LITERAL ? (d += g + b.slice(a) + S, g = `
|
|
10601
|
+
`) : b.length > a || S[0] === " " ? (g === " " ? g = `
|
|
10581
10602
|
` : !y && g === `
|
|
10582
10603
|
` && (g = `
|
|
10583
10604
|
|
|
10584
|
-
`), d += g + b.slice(a) +
|
|
10585
|
-
`, y = !0) :
|
|
10605
|
+
`), d += g + b.slice(a) + S, g = `
|
|
10606
|
+
`, y = !0) : S === "" ? g === `
|
|
10586
10607
|
` ? d += `
|
|
10587
10608
|
` : g = `
|
|
10588
|
-
` : (d += g +
|
|
10609
|
+
` : (d += g + S, g = " ", y = !1);
|
|
10589
10610
|
}
|
|
10590
10611
|
switch (o.chomp) {
|
|
10591
10612
|
case "-":
|
|
10592
10613
|
break;
|
|
10593
10614
|
case "+":
|
|
10594
|
-
for (let
|
|
10615
|
+
for (let w = u; w < n.length; ++w)
|
|
10595
10616
|
d += `
|
|
10596
|
-
` + n[
|
|
10617
|
+
` + n[w][0].slice(a);
|
|
10597
10618
|
d[d.length - 1] !== `
|
|
10598
10619
|
` && (d += `
|
|
10599
10620
|
`);
|
|
@@ -10640,8 +10661,8 @@ function aa() {
|
|
|
10640
10661
|
default: {
|
|
10641
10662
|
const v = `Unexpected token in block scalar header: ${y.type}`;
|
|
10642
10663
|
h(y, "UNEXPECTED_TOKEN", v);
|
|
10643
|
-
const
|
|
10644
|
-
|
|
10664
|
+
const w = y.source;
|
|
10665
|
+
w && typeof w == "string" && (d += w.length);
|
|
10645
10666
|
}
|
|
10646
10667
|
}
|
|
10647
10668
|
}
|
|
@@ -10656,23 +10677,23 @@ function aa() {
|
|
|
10656
10677
|
return ln.resolveBlockScalar = t, ln;
|
|
10657
10678
|
}
|
|
10658
10679
|
var cn = {}, zr;
|
|
10659
|
-
function
|
|
10680
|
+
function ca() {
|
|
10660
10681
|
if (zr) return cn;
|
|
10661
10682
|
zr = 1;
|
|
10662
10683
|
var e = ee(), t = it();
|
|
10663
10684
|
function i(n, u, a) {
|
|
10664
10685
|
const { offset: r, type: f, source: d, end: g } = n;
|
|
10665
10686
|
let y, v;
|
|
10666
|
-
const
|
|
10687
|
+
const w = (L, O, $) => a(r + L, O, $);
|
|
10667
10688
|
switch (f) {
|
|
10668
10689
|
case "scalar":
|
|
10669
|
-
y = e.Scalar.PLAIN, v = l(d,
|
|
10690
|
+
y = e.Scalar.PLAIN, v = l(d, w);
|
|
10670
10691
|
break;
|
|
10671
10692
|
case "single-quoted-scalar":
|
|
10672
|
-
y = e.Scalar.QUOTE_SINGLE, v = p(d,
|
|
10693
|
+
y = e.Scalar.QUOTE_SINGLE, v = p(d, w);
|
|
10673
10694
|
break;
|
|
10674
10695
|
case "double-quoted-scalar":
|
|
10675
|
-
y = e.Scalar.QUOTE_DOUBLE, v = c(d,
|
|
10696
|
+
y = e.Scalar.QUOTE_DOUBLE, v = c(d, w);
|
|
10676
10697
|
break;
|
|
10677
10698
|
/* istanbul ignore next should not happen */
|
|
10678
10699
|
default:
|
|
@@ -10683,12 +10704,12 @@ function la() {
|
|
|
10683
10704
|
range: [r, r + d.length, r + d.length]
|
|
10684
10705
|
};
|
|
10685
10706
|
}
|
|
10686
|
-
const b = r + d.length,
|
|
10707
|
+
const b = r + d.length, S = t.resolveEnd(g, b, u, a);
|
|
10687
10708
|
return {
|
|
10688
10709
|
value: v,
|
|
10689
10710
|
type: y,
|
|
10690
|
-
comment:
|
|
10691
|
-
range: [r, b,
|
|
10711
|
+
comment: S.comment,
|
|
10712
|
+
range: [r, b, S.offset]
|
|
10692
10713
|
};
|
|
10693
10714
|
}
|
|
10694
10715
|
function l(n, u) {
|
|
@@ -10842,18 +10863,18 @@ var Xr;
|
|
|
10842
10863
|
function Wu() {
|
|
10843
10864
|
if (Xr) return an;
|
|
10844
10865
|
Xr = 1;
|
|
10845
|
-
var e = H(), t = ee(), i =
|
|
10866
|
+
var e = H(), t = ee(), i = la(), l = ca();
|
|
10846
10867
|
function p(h, o, m, n) {
|
|
10847
10868
|
const { value: u, type: a, comment: r, range: f } = o.type === "block-scalar" ? i.resolveBlockScalar(h, o, n) : l.resolveFlowScalar(o, h.options.strict, n), d = m ? h.directives.tagName(m.source, (v) => n(m, "TAG_RESOLVE_FAILED", v)) : null;
|
|
10848
10869
|
let g;
|
|
10849
10870
|
h.options.stringKeys && h.atKey ? g = h.schema[e.SCALAR] : d ? g = s(h.schema, u, d, m, n) : o.type === "scalar" ? g = c(h, u, o, n) : g = h.schema[e.SCALAR];
|
|
10850
10871
|
let y;
|
|
10851
10872
|
try {
|
|
10852
|
-
const v = g.resolve(u, (
|
|
10873
|
+
const v = g.resolve(u, (w) => n(m ?? o, "TAG_RESOLVE_FAILED", w), h.options);
|
|
10853
10874
|
y = e.isScalar(v) ? v : new t.Scalar(v);
|
|
10854
10875
|
} catch (v) {
|
|
10855
|
-
const
|
|
10856
|
-
n(m ?? o, "TAG_RESOLVE_FAILED",
|
|
10876
|
+
const w = v instanceof Error ? v.message : String(v);
|
|
10877
|
+
n(m ?? o, "TAG_RESOLVE_FAILED", w), y = new t.Scalar(u);
|
|
10857
10878
|
}
|
|
10858
10879
|
return y.range = f, y.source = u, a && (y.type = a), d && (y.tag = d), g.format && (y.format = g.format), r && (y.comment = r), y;
|
|
10859
10880
|
}
|
|
@@ -10887,7 +10908,7 @@ function Wu() {
|
|
|
10887
10908
|
return an.composeScalar = p, an;
|
|
10888
10909
|
}
|
|
10889
10910
|
var un = {}, Qr;
|
|
10890
|
-
function
|
|
10911
|
+
function Ku() {
|
|
10891
10912
|
if (Qr) return un;
|
|
10892
10913
|
Qr = 1;
|
|
10893
10914
|
function e(t, i, l) {
|
|
@@ -10912,49 +10933,49 @@ function Yu() {
|
|
|
10912
10933
|
return un.emptyScalarPosition = e, un;
|
|
10913
10934
|
}
|
|
10914
10935
|
var Zr;
|
|
10915
|
-
function
|
|
10936
|
+
function Yu() {
|
|
10916
10937
|
if (Zr) return Lt;
|
|
10917
10938
|
Zr = 1;
|
|
10918
|
-
var e = Dt(), t = H(), i = Vu(), l = Wu(), p = it(), s =
|
|
10939
|
+
var e = Dt(), t = H(), i = Vu(), l = Wu(), p = it(), s = Ku();
|
|
10919
10940
|
const c = { composeNode: h, composeEmptyNode: o };
|
|
10920
10941
|
function h(n, u, a, r) {
|
|
10921
10942
|
const f = n.atKey, { spaceBefore: d, comment: g, anchor: y, tag: v } = a;
|
|
10922
|
-
let
|
|
10943
|
+
let w, b = !0;
|
|
10923
10944
|
switch (u.type) {
|
|
10924
10945
|
case "alias":
|
|
10925
|
-
|
|
10946
|
+
w = m(n, u, r), (y || v) && r(u, "ALIAS_PROPS", "An alias node must not specify any properties");
|
|
10926
10947
|
break;
|
|
10927
10948
|
case "scalar":
|
|
10928
10949
|
case "single-quoted-scalar":
|
|
10929
10950
|
case "double-quoted-scalar":
|
|
10930
10951
|
case "block-scalar":
|
|
10931
|
-
|
|
10952
|
+
w = l.composeScalar(n, u, v, r), y && (w.anchor = y.source.substring(1));
|
|
10932
10953
|
break;
|
|
10933
10954
|
case "block-map":
|
|
10934
10955
|
case "block-seq":
|
|
10935
10956
|
case "flow-collection":
|
|
10936
10957
|
try {
|
|
10937
|
-
|
|
10938
|
-
} catch (
|
|
10939
|
-
const L =
|
|
10958
|
+
w = i.composeCollection(c, n, u, a, r), y && (w.anchor = y.source.substring(1));
|
|
10959
|
+
} catch (S) {
|
|
10960
|
+
const L = S instanceof Error ? S.message : String(S);
|
|
10940
10961
|
r(u, "RESOURCE_EXHAUSTION", L);
|
|
10941
10962
|
}
|
|
10942
10963
|
break;
|
|
10943
10964
|
default: {
|
|
10944
|
-
const
|
|
10945
|
-
r(u, "UNEXPECTED_TOKEN",
|
|
10965
|
+
const S = u.type === "error" ? u.message : `Unsupported token (type: ${u.type})`;
|
|
10966
|
+
r(u, "UNEXPECTED_TOKEN", S), b = !1;
|
|
10946
10967
|
}
|
|
10947
10968
|
}
|
|
10948
|
-
return
|
|
10969
|
+
return w ?? (w = o(n, u.offset, void 0, null, a, r)), y && w.anchor === "" && r(y, "BAD_ALIAS", "Anchor cannot be an empty string"), f && n.options.stringKeys && (!t.isScalar(w) || typeof w.value != "string" || w.tag && w.tag !== "tag:yaml.org,2002:str") && r(v ?? u, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), d && (w.spaceBefore = !0), g && (u.type === "scalar" && u.source === "" ? w.comment = g : w.commentBefore = g), n.options.keepSourceTokens && b && (w.srcToken = u), w;
|
|
10949
10970
|
}
|
|
10950
|
-
function o(n, u, a, r, { spaceBefore: f, comment: d, anchor: g, tag: y, end: v },
|
|
10971
|
+
function o(n, u, a, r, { spaceBefore: f, comment: d, anchor: g, tag: y, end: v }, w) {
|
|
10951
10972
|
const b = {
|
|
10952
10973
|
type: "scalar",
|
|
10953
10974
|
offset: s.emptyScalarPosition(u, a, r),
|
|
10954
10975
|
indent: -1,
|
|
10955
10976
|
source: ""
|
|
10956
|
-
},
|
|
10957
|
-
return g && (
|
|
10977
|
+
}, S = l.composeScalar(n, b, y, w);
|
|
10978
|
+
return g && (S.anchor = g.source.substring(1), S.anchor === "" && w(g, "BAD_ALIAS", "Anchor cannot be an empty string")), f && (S.spaceBefore = !0), d && (S.comment = d, S.range[2] = v), S;
|
|
10958
10979
|
}
|
|
10959
10980
|
function m({ options: n }, { offset: u, source: a, end: r }, f) {
|
|
10960
10981
|
const d = new e.Alias(a.substring(1));
|
|
@@ -10968,7 +10989,7 @@ var eo;
|
|
|
10968
10989
|
function Ju() {
|
|
10969
10990
|
if (eo) return zi;
|
|
10970
10991
|
eo = 1;
|
|
10971
|
-
var e = Ut(), t =
|
|
10992
|
+
var e = Ut(), t = Yu(), i = it(), l = Vt();
|
|
10972
10993
|
function p(s, c, { offset: h, start: o, value: m, end: n }, u) {
|
|
10973
10994
|
const a = Object.assign({ _directives: c }, s), r = new e.Document(void 0, a), f = {
|
|
10974
10995
|
atKey: !1,
|
|
@@ -10991,10 +11012,10 @@ function Ju() {
|
|
|
10991
11012
|
return zi.composeDoc = p, zi;
|
|
10992
11013
|
}
|
|
10993
11014
|
var to;
|
|
10994
|
-
function
|
|
11015
|
+
function ua() {
|
|
10995
11016
|
if (to) return Li;
|
|
10996
11017
|
to = 1;
|
|
10997
|
-
var e = Ee, t =
|
|
11018
|
+
var e = Ee, t = Ho(), i = Ut(), l = Ht(), p = H(), s = Ju(), c = it();
|
|
10998
11019
|
function h(n) {
|
|
10999
11020
|
if (typeof n == "number")
|
|
11000
11021
|
return [n, n + 1];
|
|
@@ -11147,11 +11168,11 @@ ${a.comment}` : a.comment;
|
|
|
11147
11168
|
}
|
|
11148
11169
|
return Li.Composer = m, Li;
|
|
11149
11170
|
}
|
|
11150
|
-
var re = {},
|
|
11171
|
+
var re = {}, Ye = {}, io;
|
|
11151
11172
|
function zu() {
|
|
11152
|
-
if (io) return
|
|
11173
|
+
if (io) return Ye;
|
|
11153
11174
|
io = 1;
|
|
11154
|
-
var e =
|
|
11175
|
+
var e = la(), t = ca(), i = Ht(), l = Gt();
|
|
11155
11176
|
function p(n, u = !0, a) {
|
|
11156
11177
|
if (n) {
|
|
11157
11178
|
const r = (f, d, g) => {
|
|
@@ -11185,13 +11206,13 @@ function zu() {
|
|
|
11185
11206
|
switch (y[0]) {
|
|
11186
11207
|
case "|":
|
|
11187
11208
|
case ">": {
|
|
11188
|
-
const
|
|
11189
|
-
`), b = y.substring(0,
|
|
11209
|
+
const w = y.indexOf(`
|
|
11210
|
+
`), b = y.substring(0, w), S = y.substring(w + 1) + `
|
|
11190
11211
|
`, L = [
|
|
11191
11212
|
{ type: "block-scalar-header", offset: d, indent: r, source: b }
|
|
11192
11213
|
];
|
|
11193
11214
|
return o(L, v) || L.push({ type: "newline", offset: -1, indent: r, source: `
|
|
11194
|
-
` }), { type: "block-scalar", offset: d, indent: r, props: L, source:
|
|
11215
|
+
` }), { type: "block-scalar", offset: d, indent: r, props: L, source: S };
|
|
11195
11216
|
}
|
|
11196
11217
|
case '"':
|
|
11197
11218
|
return { type: "double-quoted-scalar", offset: d, indent: r, source: y, end: v };
|
|
@@ -11212,10 +11233,10 @@ function zu() {
|
|
|
11212
11233
|
g = "QUOTE_DOUBLE";
|
|
11213
11234
|
break;
|
|
11214
11235
|
case "block-scalar": {
|
|
11215
|
-
const
|
|
11216
|
-
if (
|
|
11236
|
+
const w = n.props[0];
|
|
11237
|
+
if (w.type !== "block-scalar-header")
|
|
11217
11238
|
throw new Error("Invalid block scalar header");
|
|
11218
|
-
g =
|
|
11239
|
+
g = w.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
|
|
11219
11240
|
break;
|
|
11220
11241
|
}
|
|
11221
11242
|
default:
|
|
@@ -11306,7 +11327,7 @@ function zu() {
|
|
|
11306
11327
|
}
|
|
11307
11328
|
}
|
|
11308
11329
|
}
|
|
11309
|
-
return
|
|
11330
|
+
return Ye.createScalarToken = s, Ye.resolveAsScalar = p, Ye.setScalarValue = c, Ye;
|
|
11310
11331
|
}
|
|
11311
11332
|
var fn = {}, no;
|
|
11312
11333
|
function Xu() {
|
|
@@ -11412,7 +11433,7 @@ function Qu() {
|
|
|
11412
11433
|
return hn.visit = l, hn;
|
|
11413
11434
|
}
|
|
11414
11435
|
var ro;
|
|
11415
|
-
function
|
|
11436
|
+
function Jn() {
|
|
11416
11437
|
if (ro) return re;
|
|
11417
11438
|
ro = 1;
|
|
11418
11439
|
var e = zu(), t = Xu(), i = Qu();
|
|
@@ -11495,10 +11516,10 @@ function Kn() {
|
|
|
11495
11516
|
return re.createScalarToken = e.createScalarToken, re.resolveAsScalar = e.resolveAsScalar, re.setScalarValue = e.setScalarValue, re.stringify = t.stringify, re.visit = i.visit, re.BOM = l, re.DOCUMENT = p, re.FLOW_END = s, re.SCALAR = c, re.isCollection = h, re.isScalar = o, re.prettyToken = m, re.tokenType = n, re;
|
|
11496
11517
|
}
|
|
11497
11518
|
var pn = {}, oo;
|
|
11498
|
-
function
|
|
11519
|
+
function fa() {
|
|
11499
11520
|
if (oo) return pn;
|
|
11500
11521
|
oo = 1;
|
|
11501
|
-
var e =
|
|
11522
|
+
var e = Jn();
|
|
11502
11523
|
function t(o) {
|
|
11503
11524
|
switch (o) {
|
|
11504
11525
|
case void 0:
|
|
@@ -11940,7 +11961,7 @@ function ua() {
|
|
|
11940
11961
|
return pn.Lexer = h, pn;
|
|
11941
11962
|
}
|
|
11942
11963
|
var dn = {}, ao;
|
|
11943
|
-
function
|
|
11964
|
+
function ha() {
|
|
11944
11965
|
if (ao) return dn;
|
|
11945
11966
|
ao = 1;
|
|
11946
11967
|
class e {
|
|
@@ -11963,10 +11984,10 @@ function fa() {
|
|
|
11963
11984
|
return dn.LineCounter = e, dn;
|
|
11964
11985
|
}
|
|
11965
11986
|
var mn = {}, lo;
|
|
11966
|
-
function
|
|
11987
|
+
function pa() {
|
|
11967
11988
|
if (lo) return mn;
|
|
11968
11989
|
lo = 1;
|
|
11969
|
-
var e = Ee, t =
|
|
11990
|
+
var e = Ee, t = Jn(), i = fa();
|
|
11970
11991
|
function l(u, a) {
|
|
11971
11992
|
for (let r = 0; r < u.length; ++r)
|
|
11972
11993
|
if (u[r].type === a)
|
|
@@ -12323,15 +12344,15 @@ function ha() {
|
|
|
12323
12344
|
if (d && r.sep && !r.value) {
|
|
12324
12345
|
const y = [];
|
|
12325
12346
|
for (let v = 0; v < r.sep.length; ++v) {
|
|
12326
|
-
const
|
|
12327
|
-
switch (
|
|
12347
|
+
const w = r.sep[v];
|
|
12348
|
+
switch (w.type) {
|
|
12328
12349
|
case "newline":
|
|
12329
12350
|
y.push(v);
|
|
12330
12351
|
break;
|
|
12331
12352
|
case "space":
|
|
12332
12353
|
break;
|
|
12333
12354
|
case "comment":
|
|
12334
|
-
|
|
12355
|
+
w.indent > a.indent && (y.length = 0);
|
|
12335
12356
|
break;
|
|
12336
12357
|
default:
|
|
12337
12358
|
y.length = 0;
|
|
@@ -12365,12 +12386,12 @@ function ha() {
|
|
|
12365
12386
|
items: [{ start: g, key: null, sep: [this.sourceToken] }]
|
|
12366
12387
|
});
|
|
12367
12388
|
else if (s(r.key) && !l(r.sep, "newline")) {
|
|
12368
|
-
const y = h(r.start), v = r.key,
|
|
12369
|
-
|
|
12389
|
+
const y = h(r.start), v = r.key, w = r.sep;
|
|
12390
|
+
w.push(this.sourceToken), delete r.key, delete r.sep, this.stack.push({
|
|
12370
12391
|
type: "block-map",
|
|
12371
12392
|
offset: this.offset,
|
|
12372
12393
|
indent: this.indent,
|
|
12373
|
-
items: [{ start: y, key: v, sep:
|
|
12394
|
+
items: [{ start: y, key: v, sep: w }]
|
|
12374
12395
|
});
|
|
12375
12396
|
} else g.length > 0 ? r.sep = r.sep.concat(g, this.sourceToken) : r.sep.push(this.sourceToken);
|
|
12376
12397
|
else if (l(r.start, "newline"))
|
|
@@ -12626,7 +12647,7 @@ var xe = {}, co;
|
|
|
12626
12647
|
function Zu() {
|
|
12627
12648
|
if (co) return xe;
|
|
12628
12649
|
co = 1;
|
|
12629
|
-
var e =
|
|
12650
|
+
var e = ua(), t = Ut(), i = Ht(), l = Wo(), p = H(), s = ha(), c = pa();
|
|
12630
12651
|
function h(a) {
|
|
12631
12652
|
const r = a.prettyErrors !== !1;
|
|
12632
12653
|
return { lineCounter: a.lineCounter || r && new s.LineCounter() || null, prettyErrors: r };
|
|
@@ -12634,18 +12655,18 @@ function Zu() {
|
|
|
12634
12655
|
function o(a, r = {}) {
|
|
12635
12656
|
const { lineCounter: f, prettyErrors: d } = h(r), g = new c.Parser(f?.addNewLine), y = new e.Composer(r), v = Array.from(y.compose(g.parse(a)));
|
|
12636
12657
|
if (d && f)
|
|
12637
|
-
for (const
|
|
12638
|
-
|
|
12658
|
+
for (const w of v)
|
|
12659
|
+
w.errors.forEach(i.prettifyError(a, f)), w.warnings.forEach(i.prettifyError(a, f));
|
|
12639
12660
|
return v.length > 0 ? v : Object.assign([], { empty: !0 }, y.streamInfo());
|
|
12640
12661
|
}
|
|
12641
12662
|
function m(a, r = {}) {
|
|
12642
12663
|
const { lineCounter: f, prettyErrors: d } = h(r), g = new c.Parser(f?.addNewLine), y = new e.Composer(r);
|
|
12643
12664
|
let v = null;
|
|
12644
|
-
for (const
|
|
12665
|
+
for (const w of y.compose(g.parse(a), !0, a.length))
|
|
12645
12666
|
if (!v)
|
|
12646
|
-
v =
|
|
12667
|
+
v = w;
|
|
12647
12668
|
else if (v.options.logLevel !== "silent") {
|
|
12648
|
-
v.errors.push(new i.YAMLParseError(
|
|
12669
|
+
v.errors.push(new i.YAMLParseError(w.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
|
|
12649
12670
|
break;
|
|
12650
12671
|
}
|
|
12651
12672
|
return d && f && (v.errors.forEach(i.prettifyError(a, f)), v.warnings.forEach(i.prettifyError(a, f))), v;
|
|
@@ -12682,10 +12703,10 @@ var uo;
|
|
|
12682
12703
|
function ef() {
|
|
12683
12704
|
if (uo) return W;
|
|
12684
12705
|
uo = 1;
|
|
12685
|
-
var e =
|
|
12706
|
+
var e = ua(), t = Ut(), i = sa(), l = Ht(), p = Dt(), s = H(), c = $e(), h = ee(), o = _e(), m = Ne(), n = Jn(), u = fa(), a = ha(), r = pa(), f = Zu(), d = Rt();
|
|
12686
12707
|
return W.Composer = e.Composer, W.Document = t.Document, W.Schema = i.Schema, W.YAMLError = l.YAMLError, W.YAMLParseError = l.YAMLParseError, W.YAMLWarning = l.YAMLWarning, W.Alias = p.Alias, W.isAlias = s.isAlias, W.isCollection = s.isCollection, W.isDocument = s.isDocument, W.isMap = s.isMap, W.isNode = s.isNode, W.isPair = s.isPair, W.isScalar = s.isScalar, W.isSeq = s.isSeq, W.Pair = c.Pair, W.Scalar = h.Scalar, W.YAMLMap = o.YAMLMap, W.YAMLSeq = m.YAMLSeq, W.CST = n, W.Lexer = u.Lexer, W.LineCounter = a.LineCounter, W.Parser = r.Parser, W.parse = f.parse, W.parseAllDocuments = f.parseAllDocuments, W.parseDocument = f.parseDocument, W.stringify = f.stringify, W.visit = d.visit, W.visitAsync = d.visitAsync, W;
|
|
12687
12708
|
}
|
|
12688
|
-
var
|
|
12709
|
+
var da = ef();
|
|
12689
12710
|
const Q = {
|
|
12690
12711
|
missingGit: "Git is required to fetch templates, but it is not installed or not available on PATH. Please install Git and try again.",
|
|
12691
12712
|
missingTemplate: [
|
|
@@ -12699,7 +12720,6 @@ const Q = {
|
|
|
12699
12720
|
].join(""),
|
|
12700
12721
|
missingHost: "Host option is required for the lumina-components template.",
|
|
12701
12722
|
invalidCodeSampleTemplate: "Template option is required for code sample initialization.",
|
|
12702
|
-
invalidDomain: (e) => `Invalid domain: ${e ?? "(none)"}`,
|
|
12703
12723
|
invalidTemplate: (e) => `Invalid template: ${e ?? "(none)"}`,
|
|
12704
12724
|
invalidOption: (e) => `Invalid option: ${e}`,
|
|
12705
12725
|
templateNotAvailable: (e, t) => `Template "${e}" is not available for domain "${t}"`,
|
|
@@ -12727,7 +12747,7 @@ function fo(e) {
|
|
|
12727
12747
|
Q.missingHost,
|
|
12728
12748
|
Q.invalidCodeSampleTemplate,
|
|
12729
12749
|
Q.generic
|
|
12730
|
-
], i = ['Directory "', "Invalid
|
|
12750
|
+
], i = ['Directory "', "Invalid template", "Invalid option", 'Template "'], l = (p) => t.includes(p) || i.some((s) => p.startsWith(s));
|
|
12731
12751
|
if (e instanceof Error) {
|
|
12732
12752
|
const p = e.message || "Unknown error";
|
|
12733
12753
|
return l(p) ? p : Q.generic;
|
|
@@ -12740,12 +12760,12 @@ function fo(e) {
|
|
|
12740
12760
|
return String(e);
|
|
12741
12761
|
}
|
|
12742
12762
|
}
|
|
12743
|
-
function
|
|
12763
|
+
function zn(e) {
|
|
12744
12764
|
return {
|
|
12745
12765
|
name: e.name,
|
|
12746
12766
|
shouldCleanup: !1,
|
|
12747
12767
|
async doCleanup(i) {
|
|
12748
|
-
if (
|
|
12768
|
+
if (Gn(oe("bgRed", fo(i))), this.shouldCleanup && this.name)
|
|
12749
12769
|
try {
|
|
12750
12770
|
await uf(this.name);
|
|
12751
12771
|
} catch (l) {
|
|
@@ -12756,16 +12776,16 @@ function Jn(e) {
|
|
|
12756
12776
|
}
|
|
12757
12777
|
};
|
|
12758
12778
|
}
|
|
12759
|
-
const ue =
|
|
12760
|
-
async function
|
|
12779
|
+
const ue = Na($a.exec), Wt = (e) => typeof e == "object" && e !== null && "code" in e;
|
|
12780
|
+
async function ma() {
|
|
12761
12781
|
try {
|
|
12762
12782
|
await ue("git --version");
|
|
12763
12783
|
} catch {
|
|
12764
12784
|
throw new Error(Q.missingGit);
|
|
12765
12785
|
}
|
|
12766
12786
|
}
|
|
12767
|
-
async function nf(e, t, i, l =
|
|
12768
|
-
await
|
|
12787
|
+
async function nf(e, t, i, l = _n) {
|
|
12788
|
+
await ma();
|
|
12769
12789
|
const p = Ee.cwd();
|
|
12770
12790
|
try {
|
|
12771
12791
|
await se.mkdir(e);
|
|
@@ -12780,13 +12800,13 @@ async function nf(e, t, i, l = $n) {
|
|
|
12780
12800
|
} catch {
|
|
12781
12801
|
throw new Error(Q.missingTemplate);
|
|
12782
12802
|
}
|
|
12783
|
-
await
|
|
12803
|
+
await ga(i, "."), await se.rm(".git", { recursive: !0, force: !0 });
|
|
12784
12804
|
} finally {
|
|
12785
12805
|
Ee.chdir(p);
|
|
12786
12806
|
}
|
|
12787
12807
|
}
|
|
12788
|
-
async function sf(e, t, i, l =
|
|
12789
|
-
await
|
|
12808
|
+
async function sf(e, t, i, l = _n) {
|
|
12809
|
+
await ma();
|
|
12790
12810
|
const p = Ee.cwd();
|
|
12791
12811
|
let s = { catalog: {}, version: "" };
|
|
12792
12812
|
try {
|
|
@@ -12805,10 +12825,10 @@ async function sf(e, t, i, l = $n) {
|
|
|
12805
12825
|
const [{ stdout: c }, { stdout: h }] = await Promise.all([
|
|
12806
12826
|
ue("git show FETCH_HEAD:pnpm-workspace.yaml"),
|
|
12807
12827
|
ue("git show FETCH_HEAD:package.json")
|
|
12808
|
-
]), o =
|
|
12828
|
+
]), o = da.parse(c), m = JSON.parse(h);
|
|
12809
12829
|
if (!m.version)
|
|
12810
12830
|
throw new Error("Root package.json does not have a version defined");
|
|
12811
|
-
s = { catalog: o.catalog ?? {}, version: m.version }, await
|
|
12831
|
+
s = { catalog: o.catalog ?? {}, version: m.version }, await ga(i, "."), await se.rm(".git", { recursive: !0, force: !0 });
|
|
12812
12832
|
} finally {
|
|
12813
12833
|
Ee.chdir(p);
|
|
12814
12834
|
}
|
|
@@ -12824,15 +12844,15 @@ function rf(e, t) {
|
|
|
12824
12844
|
}
|
|
12825
12845
|
});
|
|
12826
12846
|
}
|
|
12827
|
-
async function
|
|
12847
|
+
async function ga(e, t) {
|
|
12828
12848
|
if (!(e === "." || e === "" || ["./", "/"].includes(e.split("/")[0]))) {
|
|
12829
|
-
if (
|
|
12849
|
+
if (Me.isAbsolute(e))
|
|
12830
12850
|
throw new Error(Q.generic);
|
|
12831
12851
|
try {
|
|
12832
12852
|
const i = await se.readdir(e);
|
|
12833
12853
|
await Promise.all(
|
|
12834
12854
|
i.map(async (p) => {
|
|
12835
|
-
const s =
|
|
12855
|
+
const s = Me.join(e, p), c = Me.join(t, p);
|
|
12836
12856
|
await se.rename(s, c);
|
|
12837
12857
|
})
|
|
12838
12858
|
);
|
|
@@ -12843,21 +12863,21 @@ async function ma(e, t) {
|
|
|
12843
12863
|
}
|
|
12844
12864
|
}
|
|
12845
12865
|
}
|
|
12846
|
-
async function
|
|
12847
|
-
const t = await se.readFile(
|
|
12866
|
+
async function ya(e) {
|
|
12867
|
+
const t = await se.readFile(Me.join(e, "package.json"), "utf-8"), i = JSON.parse(t), l = i._id, p = i.readme;
|
|
12848
12868
|
return Iu(i, (c) => {
|
|
12849
12869
|
console.error(c);
|
|
12850
12870
|
}), l || delete i._id, p || delete i.readme, i;
|
|
12851
12871
|
}
|
|
12852
12872
|
async function of(e, t) {
|
|
12853
|
-
await se.writeFile(
|
|
12873
|
+
await se.writeFile(Me.join(e, "package.json"), JSON.stringify(t, null, 2));
|
|
12854
12874
|
}
|
|
12855
12875
|
async function af(e, t) {
|
|
12856
12876
|
const i = {
|
|
12857
12877
|
...t ? { overrides: t } : {},
|
|
12858
12878
|
minimumReleaseAgeExclude: ["@arcgis/*", "@esri/*"]
|
|
12859
12879
|
};
|
|
12860
|
-
await se.writeFile(
|
|
12880
|
+
await se.writeFile(Me.join(e, "pnpm-workspace.yaml"), da.stringify(i));
|
|
12861
12881
|
}
|
|
12862
12882
|
function lf(e) {
|
|
12863
12883
|
return e.scripts?.start ? "start" : "dev";
|
|
@@ -12871,18 +12891,12 @@ const cf = (e) => {
|
|
|
12871
12891
|
case "name":
|
|
12872
12892
|
t.name = e.name;
|
|
12873
12893
|
break;
|
|
12874
|
-
case "domain": {
|
|
12875
|
-
if (!e.domain || !Object.values(Tt).includes(e.domain))
|
|
12876
|
-
throw new Error(Q.invalidDomain(e.domain));
|
|
12877
|
-
t.domain = e.domain;
|
|
12878
|
-
break;
|
|
12879
|
-
}
|
|
12880
12894
|
case "template": {
|
|
12881
12895
|
const p = e.template;
|
|
12882
12896
|
if (!p)
|
|
12883
12897
|
return;
|
|
12884
12898
|
const s = mf(p);
|
|
12885
|
-
if (!s || !
|
|
12899
|
+
if (!s || !Nn[s])
|
|
12886
12900
|
throw new Error(`Invalid template: ${p}`);
|
|
12887
12901
|
t.template = s;
|
|
12888
12902
|
break;
|
|
@@ -12910,8 +12924,8 @@ async function uf(e) {
|
|
|
12910
12924
|
}
|
|
12911
12925
|
}
|
|
12912
12926
|
async function ff(e, t) {
|
|
12913
|
-
const i =
|
|
12914
|
-
let l =
|
|
12927
|
+
const i = Nn[e];
|
|
12928
|
+
let l = So;
|
|
12915
12929
|
t.host && (l = t.host);
|
|
12916
12930
|
const p = `git@${l}:${i}.git`;
|
|
12917
12931
|
try {
|
|
@@ -12921,9 +12935,9 @@ async function ff(e, t) {
|
|
|
12921
12935
|
}
|
|
12922
12936
|
return !0;
|
|
12923
12937
|
}
|
|
12924
|
-
function
|
|
12925
|
-
const i =
|
|
12926
|
-
let l =
|
|
12938
|
+
function ba(e, t) {
|
|
12939
|
+
const i = Nn[e];
|
|
12940
|
+
let l = So;
|
|
12927
12941
|
t.host && (l = t.host);
|
|
12928
12942
|
const p = t.ssh ? "git@" : "https://", s = t.accessToken ? `${t.accessToken}@` : "", c = t.ssh ? ":" : "/";
|
|
12929
12943
|
return `${p}${s}${l}${c}${i}`;
|
|
@@ -12939,7 +12953,7 @@ function hf(e, t) {
|
|
|
12939
12953
|
});
|
|
12940
12954
|
}
|
|
12941
12955
|
function pf(e, t) {
|
|
12942
|
-
const i =
|
|
12956
|
+
const i = vo[e];
|
|
12943
12957
|
if (t === On)
|
|
12944
12958
|
throw new Error(Q.templateNotAvailable(t, e));
|
|
12945
12959
|
const l = i[t];
|
|
@@ -12947,10 +12961,10 @@ function pf(e, t) {
|
|
|
12947
12961
|
throw new Error(Q.templateNotAvailable(t, e));
|
|
12948
12962
|
return l;
|
|
12949
12963
|
}
|
|
12950
|
-
function
|
|
12964
|
+
function Xn(e) {
|
|
12951
12965
|
return e.trim().toLowerCase();
|
|
12952
12966
|
}
|
|
12953
|
-
function
|
|
12967
|
+
function va(e, t, i) {
|
|
12954
12968
|
if (!t)
|
|
12955
12969
|
return;
|
|
12956
12970
|
const l = e.get(t);
|
|
@@ -12960,17 +12974,17 @@ function ba(e, t, i) {
|
|
|
12960
12974
|
}
|
|
12961
12975
|
l !== i && e.set(t, null);
|
|
12962
12976
|
}
|
|
12963
|
-
const
|
|
12977
|
+
const Qn = /* @__PURE__ */ new Map(), df = Ce.map(([e]) => e);
|
|
12964
12978
|
for (const e of df)
|
|
12965
|
-
|
|
12979
|
+
va(Qn, Xn(e), e);
|
|
12966
12980
|
for (const [e, t] of Ce)
|
|
12967
|
-
t.customName &&
|
|
12981
|
+
t.customName && va(Qn, Xn(t.customName), e);
|
|
12968
12982
|
function mf(e) {
|
|
12969
|
-
const t =
|
|
12983
|
+
const t = Xn(e), i = Qn.get(t);
|
|
12970
12984
|
if (i && i !== null)
|
|
12971
12985
|
return i;
|
|
12972
12986
|
}
|
|
12973
|
-
async function
|
|
12987
|
+
async function Sa(e, t, i) {
|
|
12974
12988
|
const { startMsg: l, successMsg: p, failureMsg: s } = e, c = Wl();
|
|
12975
12989
|
c.start(l);
|
|
12976
12990
|
try {
|
|
@@ -12980,19 +12994,19 @@ async function va(e, t, i) {
|
|
|
12980
12994
|
}
|
|
12981
12995
|
}
|
|
12982
12996
|
async function gf(e) {
|
|
12983
|
-
const t =
|
|
12997
|
+
const t = zn(e);
|
|
12984
12998
|
try {
|
|
12985
12999
|
Ro();
|
|
12986
13000
|
const i = await jl(
|
|
12987
13001
|
{
|
|
12988
|
-
projectName: e.name ? async () => await Promise.resolve(e.name) :
|
|
13002
|
+
projectName: e.name ? async () => await Promise.resolve(e.name) : Do,
|
|
12989
13003
|
projectTemplate: e.template ? async () => await Promise.resolve(e.template) : _c
|
|
12990
13004
|
},
|
|
12991
13005
|
{
|
|
12992
13006
|
// On Cancel callback that wraps the group
|
|
12993
13007
|
// So if the user cancels one of the prompts in the group this function will be called
|
|
12994
13008
|
onCancel: () => {
|
|
12995
|
-
|
|
13009
|
+
ko("Operation cancelled."), process.exit(0);
|
|
12996
13010
|
}
|
|
12997
13011
|
}
|
|
12998
13012
|
);
|
|
@@ -13005,8 +13019,8 @@ async function gf(e) {
|
|
|
13005
13019
|
}
|
|
13006
13020
|
t.shouldCleanup = !0;
|
|
13007
13021
|
}
|
|
13008
|
-
const l = pf(
|
|
13009
|
-
if (await
|
|
13022
|
+
const l = pf($n.webGisSdk, i.projectTemplate), p = ba(i.projectTemplate, e);
|
|
13023
|
+
if (await Sa(
|
|
13010
13024
|
{
|
|
13011
13025
|
startMsg: "Downloading project template...",
|
|
13012
13026
|
successMsg: "Project template downloaded successfully",
|
|
@@ -13029,7 +13043,7 @@ async function gf(e) {
|
|
|
13029
13043
|
Happy mapping!`));
|
|
13030
13044
|
return;
|
|
13031
13045
|
}
|
|
13032
|
-
const s = await
|
|
13046
|
+
const s = await ya(i.projectName), c = lf(s);
|
|
13033
13047
|
An(), console.log(oe("magenta", `To get started, run the following commands:
|
|
13034
13048
|
`)), console.log(oe("grey", `$ cd ${i.projectName}`)), console.log(oe("grey", "$ npm install")), console.log(oe("grey", `$ npm run ${c}`)), console.log(Cn(`
|
|
13035
13049
|
|
|
@@ -13039,29 +13053,29 @@ Happy mapping!`));
|
|
|
13039
13053
|
}
|
|
13040
13054
|
}
|
|
13041
13055
|
async function yf(e) {
|
|
13042
|
-
const { template: t, branch: i =
|
|
13056
|
+
const { template: t, branch: i = _n } = e, l = zn(e);
|
|
13043
13057
|
try {
|
|
13044
13058
|
if (!t || t !== On)
|
|
13045
13059
|
throw new Error(Q.invalidCodeSampleTemplate);
|
|
13046
13060
|
if (!e.host)
|
|
13047
13061
|
throw new Error(Q.missingHost);
|
|
13048
13062
|
Ro();
|
|
13049
|
-
const p = e.name ?? await
|
|
13050
|
-
if (
|
|
13063
|
+
const p = e.name ?? await Do();
|
|
13064
|
+
if (Lo(p) && (ko("Operation cancelled."), process.exit(0)), l.name = p, process.env.NODE_ENV !== "test") {
|
|
13051
13065
|
try {
|
|
13052
13066
|
throw await se.stat(p), new Error(Q.folderAlreadyExists(p));
|
|
13053
|
-
} catch (
|
|
13054
|
-
if (!(
|
|
13055
|
-
throw
|
|
13067
|
+
} catch (S) {
|
|
13068
|
+
if (!(S && typeof S == "object" && "code" in S && S.code === "ENOENT"))
|
|
13069
|
+
throw S;
|
|
13056
13070
|
}
|
|
13057
13071
|
l.shouldCleanup = !0;
|
|
13058
13072
|
}
|
|
13059
13073
|
const s = Va[t], c = await ff(t, e);
|
|
13060
13074
|
let h = "";
|
|
13061
13075
|
c || (h = await Pc(e.host));
|
|
13062
|
-
const o =
|
|
13076
|
+
const o = ba(t, { ...e, ssh: c, accessToken: h });
|
|
13063
13077
|
let m = {}, n = "";
|
|
13064
|
-
await
|
|
13078
|
+
await Sa(
|
|
13065
13079
|
{
|
|
13066
13080
|
startMsg: "Downloading project template...",
|
|
13067
13081
|
successMsg: "Project template downloaded successfully",
|
|
@@ -13075,12 +13089,12 @@ async function yf(e) {
|
|
|
13075
13089
|
s,
|
|
13076
13090
|
i
|
|
13077
13091
|
));
|
|
13078
|
-
} catch (
|
|
13079
|
-
throw
|
|
13092
|
+
} catch (S) {
|
|
13093
|
+
throw S;
|
|
13080
13094
|
}
|
|
13081
13095
|
},
|
|
13082
|
-
(
|
|
13083
|
-
throw
|
|
13096
|
+
(S) => {
|
|
13097
|
+
throw S;
|
|
13084
13098
|
}
|
|
13085
13099
|
);
|
|
13086
13100
|
const {
|
|
@@ -13088,7 +13102,7 @@ async function yf(e) {
|
|
|
13088
13102
|
version: a,
|
|
13089
13103
|
"acme:scripts": r,
|
|
13090
13104
|
...f
|
|
13091
|
-
} = await
|
|
13105
|
+
} = await ya(p), d = n.split(".").slice(0, 2), g = i.includes("release"), y = g ? `~${d.join(".")}.0` : `>=${d.join(".")}.0-next <${d[0]}.${Number.parseInt(d[1]) + 1}.0`, v = f.files, w = g ? void 0 : {
|
|
13092
13106
|
"@esri/calcite-components>@arcgis/lumina": y,
|
|
13093
13107
|
"@esri/calcite-components>@arcgis/toolkit": y
|
|
13094
13108
|
}, b = {
|
|
@@ -13099,30 +13113,41 @@ async function yf(e) {
|
|
|
13099
13113
|
...f,
|
|
13100
13114
|
...v ? { files: v } : {}
|
|
13101
13115
|
};
|
|
13102
|
-
rf(m, b), hf(y, b), await of(p, b), await af(p,
|
|
13116
|
+
rf(m, b), hf(y, b), await of(p, b), await af(p, w), An(), Nc(), console.log(oe("magenta", `To get started, run the following commands:
|
|
13103
13117
|
`)), console.log(oe("grey", `$ cd ${p}`)), console.log(oe("grey", "$ pnpm install")), console.log(oe("grey", "$ pnpm start"));
|
|
13104
13118
|
} catch (p) {
|
|
13105
13119
|
await l.doCleanup(p);
|
|
13106
13120
|
}
|
|
13107
13121
|
}
|
|
13108
13122
|
const wa = (e) => {
|
|
13109
|
-
const t = new
|
|
13110
|
-
|
|
13123
|
+
const t = new Tt();
|
|
13124
|
+
e?.exitOverride && t.exitOverride(), e?.suppressOutput && t.configureOutput({
|
|
13111
13125
|
writeOut: () => "",
|
|
13112
13126
|
writeErr: () => ""
|
|
13113
|
-
}), t.version(
|
|
13114
|
-
|
|
13127
|
+
}), t.version(Ga.version);
|
|
13128
|
+
const i = t.option("-n, --name <name>", "Name of the project").option("-t, --template <template>", "Template to use").addOption(new Nt("--host <host>", "Host to use for the source control repository").hideHelp()).addOption(new Nt("--branch <branch>", "Branch to checkout in the source control repository").hideHelp());
|
|
13129
|
+
return t.addHelpText(
|
|
13130
|
+
"after",
|
|
13131
|
+
[
|
|
13132
|
+
"",
|
|
13133
|
+
"Available templates:",
|
|
13134
|
+
"",
|
|
13135
|
+
...bo.flatMap(({ folder: l, description: p }) => [l, ` ${p}`, ""])
|
|
13136
|
+
].join(`
|
|
13137
|
+
`)
|
|
13138
|
+
), t.command("init", { isDefault: !0 }).description("Initialize a new ArcGIS project").action(async () => {
|
|
13139
|
+
let l;
|
|
13115
13140
|
try {
|
|
13116
|
-
|
|
13117
|
-
} catch (
|
|
13118
|
-
await
|
|
13141
|
+
l = cf(i.opts());
|
|
13142
|
+
} catch (p) {
|
|
13143
|
+
await zn({}).doCleanup(p);
|
|
13119
13144
|
return;
|
|
13120
13145
|
}
|
|
13121
|
-
if (
|
|
13122
|
-
await yf(
|
|
13146
|
+
if (l.template && Wa[l.template] === kt.codeSample) {
|
|
13147
|
+
await yf(l);
|
|
13123
13148
|
return;
|
|
13124
13149
|
}
|
|
13125
|
-
await gf(
|
|
13150
|
+
await gf(l);
|
|
13126
13151
|
}), t;
|
|
13127
13152
|
};
|
|
13128
13153
|
let bf = {
|