@stencil/core 4.43.2-dev.1773120108.778b0cd → 4.43.2-dev.1773293109.9080c9d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/index.cjs +363 -154
- package/cli/index.js +363 -154
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +2270 -2061
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +346 -137
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +423 -214
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +395 -186
- package/internal/package.json +1 -1
- package/internal/testing/index.js +410 -201
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/index.js +341 -132
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +44 -46
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +419 -210
- package/testing/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Runner v4.43.2-dev.
|
|
2
|
+
Stencil Hydrate Runner v4.43.2-dev.1773293109.9080c9d | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -1330,11 +1330,11 @@ var fromCodePoint = (
|
|
|
1330
1330
|
}
|
|
1331
1331
|
);
|
|
1332
1332
|
function replaceCodePoint(codePoint) {
|
|
1333
|
-
var
|
|
1333
|
+
var _a3;
|
|
1334
1334
|
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
|
|
1335
1335
|
return 65533;
|
|
1336
1336
|
}
|
|
1337
|
-
return (
|
|
1337
|
+
return (_a3 = decodeMap.get(codePoint)) !== null && _a3 !== void 0 ? _a3 : codePoint;
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
1340
|
// node_modules/entities/lib/esm/decode.js
|
|
@@ -1531,9 +1531,9 @@ var EntityDecoder = class {
|
|
|
1531
1531
|
* @returns The number of characters that were consumed.
|
|
1532
1532
|
*/
|
|
1533
1533
|
emitNumericEntity(lastCp, expectedLength) {
|
|
1534
|
-
var
|
|
1534
|
+
var _a3;
|
|
1535
1535
|
if (this.consumed <= expectedLength) {
|
|
1536
|
-
(
|
|
1536
|
+
(_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
|
1537
1537
|
return 0;
|
|
1538
1538
|
}
|
|
1539
1539
|
if (lastCp === CharCodes.SEMI) {
|
|
@@ -1593,11 +1593,11 @@ var EntityDecoder = class {
|
|
|
1593
1593
|
* @returns The number of characters consumed.
|
|
1594
1594
|
*/
|
|
1595
1595
|
emitNotTerminatedNamedEntity() {
|
|
1596
|
-
var
|
|
1596
|
+
var _a3;
|
|
1597
1597
|
const { result, decodeTree } = this;
|
|
1598
1598
|
const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
|
|
1599
1599
|
this.emitNamedEntityData(result, valueLength, this.consumed);
|
|
1600
|
-
(
|
|
1600
|
+
(_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.missingSemicolonAfterCharacterReference();
|
|
1601
1601
|
return this.consumed;
|
|
1602
1602
|
}
|
|
1603
1603
|
/**
|
|
@@ -1625,7 +1625,7 @@ var EntityDecoder = class {
|
|
|
1625
1625
|
* @returns The number of characters consumed.
|
|
1626
1626
|
*/
|
|
1627
1627
|
end() {
|
|
1628
|
-
var
|
|
1628
|
+
var _a3;
|
|
1629
1629
|
switch (this.state) {
|
|
1630
1630
|
case EntityDecoderState.NamedEntity: {
|
|
1631
1631
|
return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
@@ -1638,7 +1638,7 @@ var EntityDecoder = class {
|
|
|
1638
1638
|
return this.emitNumericEntity(0, 3);
|
|
1639
1639
|
}
|
|
1640
1640
|
case EntityDecoderState.NumericStart: {
|
|
1641
|
-
(
|
|
1641
|
+
(_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);
|
|
1642
1642
|
return 0;
|
|
1643
1643
|
}
|
|
1644
1644
|
case EntityDecoderState.EntityStart: {
|
|
@@ -2119,8 +2119,8 @@ var TAG_NAME_TO_ID = /* @__PURE__ */ new Map([
|
|
|
2119
2119
|
[TAG_NAMES.XMP, TAG_ID.XMP]
|
|
2120
2120
|
]);
|
|
2121
2121
|
function getTagID(tagName) {
|
|
2122
|
-
var
|
|
2123
|
-
return (
|
|
2122
|
+
var _a3;
|
|
2123
|
+
return (_a3 = TAG_NAME_TO_ID.get(tagName)) !== null && _a3 !== void 0 ? _a3 : TAG_ID.UNKNOWN;
|
|
2124
2124
|
}
|
|
2125
2125
|
var $ = TAG_ID;
|
|
2126
2126
|
var SPECIAL_ELEMENTS = {
|
|
@@ -2387,8 +2387,8 @@ var Tokenizer = class {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
//Errors
|
|
2389
2389
|
_err(code, cpOffset = 0) {
|
|
2390
|
-
var
|
|
2391
|
-
(_b = (
|
|
2390
|
+
var _a3, _b;
|
|
2391
|
+
(_b = (_a3 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a3, this.preprocessor.getError(code, cpOffset));
|
|
2392
2392
|
}
|
|
2393
2393
|
// NOTE: `offset` may never run across line boundaries.
|
|
2394
2394
|
getCurrentLocation(offset) {
|
|
@@ -2530,13 +2530,13 @@ var Tokenizer = class {
|
|
|
2530
2530
|
this.currentLocation = this.getCurrentLocation(0);
|
|
2531
2531
|
}
|
|
2532
2532
|
_leaveAttrName() {
|
|
2533
|
-
var
|
|
2533
|
+
var _a3;
|
|
2534
2534
|
var _b;
|
|
2535
2535
|
const token = this.currentToken;
|
|
2536
2536
|
if (getTokenAttr(token, this.currentAttr.name) === null) {
|
|
2537
2537
|
token.attrs.push(this.currentAttr);
|
|
2538
2538
|
if (token.location && this.currentLocation) {
|
|
2539
|
-
const attrLocations = (
|
|
2539
|
+
const attrLocations = (_a3 = (_b = token.location).attrs) !== null && _a3 !== void 0 ? _a3 : _b.attrs = /* @__PURE__ */ Object.create(null);
|
|
2540
2540
|
attrLocations[this.currentAttr.name] = this.currentLocation;
|
|
2541
2541
|
this._leaveAttrValue();
|
|
2542
2542
|
}
|
|
@@ -5884,10 +5884,10 @@ var Parser = class {
|
|
|
5884
5884
|
//Errors
|
|
5885
5885
|
/** @internal */
|
|
5886
5886
|
_err(token, code, beforeToken) {
|
|
5887
|
-
var
|
|
5887
|
+
var _a3;
|
|
5888
5888
|
if (!this.onParseError)
|
|
5889
5889
|
return;
|
|
5890
|
-
const loc = (
|
|
5890
|
+
const loc = (_a3 = token.location) !== null && _a3 !== void 0 ? _a3 : BASE_LOC;
|
|
5891
5891
|
const err2 = {
|
|
5892
5892
|
code,
|
|
5893
5893
|
startLine: loc.startLine,
|
|
@@ -5902,18 +5902,18 @@ var Parser = class {
|
|
|
5902
5902
|
//Stack events
|
|
5903
5903
|
/** @internal */
|
|
5904
5904
|
onItemPush(node, tid, isTop) {
|
|
5905
|
-
var
|
|
5906
|
-
(_b = (
|
|
5905
|
+
var _a3, _b;
|
|
5906
|
+
(_b = (_a3 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a3, node);
|
|
5907
5907
|
if (isTop && this.openElements.stackTop > 0)
|
|
5908
5908
|
this._setContextModes(node, tid);
|
|
5909
5909
|
}
|
|
5910
5910
|
/** @internal */
|
|
5911
5911
|
onItemPop(node, isTop) {
|
|
5912
|
-
var
|
|
5912
|
+
var _a3, _b;
|
|
5913
5913
|
if (this.options.sourceCodeLocationInfo) {
|
|
5914
5914
|
this._setEndLocation(node, this.currentToken);
|
|
5915
5915
|
}
|
|
5916
|
-
(_b = (
|
|
5916
|
+
(_b = (_a3 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a3, node, this.openElements.current);
|
|
5917
5917
|
if (isTop) {
|
|
5918
5918
|
let current;
|
|
5919
5919
|
let currentTagId;
|
|
@@ -7987,9 +7987,9 @@ function eofInBody(p, token) {
|
|
|
7987
7987
|
}
|
|
7988
7988
|
}
|
|
7989
7989
|
function endTagInText(p, token) {
|
|
7990
|
-
var
|
|
7990
|
+
var _a3;
|
|
7991
7991
|
if (token.tagID === TAG_ID.SCRIPT) {
|
|
7992
|
-
(
|
|
7992
|
+
(_a3 = p.scriptHandler) === null || _a3 === void 0 ? void 0 : _a3.call(p, p.openElements.current);
|
|
7993
7993
|
}
|
|
7994
7994
|
p.openElements.pop();
|
|
7995
7995
|
p.insertionMode = p.originalInsertionMode;
|
|
@@ -8651,7 +8651,7 @@ function startTagAfterBody(p, token) {
|
|
|
8651
8651
|
}
|
|
8652
8652
|
}
|
|
8653
8653
|
function endTagAfterBody(p, token) {
|
|
8654
|
-
var
|
|
8654
|
+
var _a3;
|
|
8655
8655
|
if (token.tagID === TAG_ID.HTML) {
|
|
8656
8656
|
if (!p.fragmentContext) {
|
|
8657
8657
|
p.insertionMode = InsertionMode.AFTER_AFTER_BODY;
|
|
@@ -8659,7 +8659,7 @@ function endTagAfterBody(p, token) {
|
|
|
8659
8659
|
if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) {
|
|
8660
8660
|
p._setEndLocation(p.openElements.items[0], token);
|
|
8661
8661
|
const bodyElement = p.openElements.items[1];
|
|
8662
|
-
if (bodyElement && !((
|
|
8662
|
+
if (bodyElement && !((_a3 = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a3 === void 0 ? void 0 : _a3.endTag)) {
|
|
8663
8663
|
p._setEndLocation(bodyElement, token);
|
|
8664
8664
|
}
|
|
8665
8665
|
}
|
|
@@ -10523,7 +10523,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
10523
10523
|
}
|
|
10524
10524
|
var shadowRootTag = "mock:shadow-root";
|
|
10525
10525
|
function* streamToHtml(node, opts, output) {
|
|
10526
|
-
var
|
|
10526
|
+
var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
10527
10527
|
const isShadowRoot = node.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */;
|
|
10528
10528
|
if (node.nodeType === 1 /* ELEMENT_NODE */ || isShadowRoot) {
|
|
10529
10529
|
const tagName = isShadowRoot ? shadowRootTag : getTagName(node);
|
|
@@ -10532,7 +10532,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
10532
10532
|
}
|
|
10533
10533
|
const ignoreTag = opts.excludeTags != null && opts.excludeTags.includes(tagName);
|
|
10534
10534
|
if (ignoreTag === false) {
|
|
10535
|
-
const isWithinWhitespaceSensitiveNode = opts.newLines || ((
|
|
10535
|
+
const isWithinWhitespaceSensitiveNode = opts.newLines || ((_a3 = opts.indentSpaces) != null ? _a3 : 0) > 0 ? isWithinWhitespaceSensitive(node) : false;
|
|
10536
10536
|
if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
|
|
10537
10537
|
yield "\n";
|
|
10538
10538
|
output.currentLineWidth = 0;
|
|
@@ -11102,8 +11102,8 @@ var MockNode2 = class {
|
|
|
11102
11102
|
return null;
|
|
11103
11103
|
}
|
|
11104
11104
|
get nodeValue() {
|
|
11105
|
-
var
|
|
11106
|
-
return (
|
|
11105
|
+
var _a3;
|
|
11106
|
+
return (_a3 = this._nodeValue) != null ? _a3 : "";
|
|
11107
11107
|
}
|
|
11108
11108
|
set nodeValue(value) {
|
|
11109
11109
|
this._nodeValue = value;
|
|
@@ -11163,8 +11163,8 @@ var MockNode2 = class {
|
|
|
11163
11163
|
return null;
|
|
11164
11164
|
}
|
|
11165
11165
|
get textContent() {
|
|
11166
|
-
var
|
|
11167
|
-
return (
|
|
11166
|
+
var _a3;
|
|
11167
|
+
return (_a3 = this._nodeValue) != null ? _a3 : "";
|
|
11168
11168
|
}
|
|
11169
11169
|
set textContent(value) {
|
|
11170
11170
|
this._nodeValue = String(value);
|
|
@@ -11223,9 +11223,9 @@ var MockElement = class extends MockNode2 {
|
|
|
11223
11223
|
addEventListener(this, type, handler);
|
|
11224
11224
|
}
|
|
11225
11225
|
attachShadow(_opts) {
|
|
11226
|
-
var
|
|
11226
|
+
var _a3;
|
|
11227
11227
|
const shadowRoot = this.ownerDocument.createDocumentFragment();
|
|
11228
|
-
shadowRoot.delegatesFocus = (
|
|
11228
|
+
shadowRoot.delegatesFocus = (_a3 = _opts.delegatesFocus) != null ? _a3 : false;
|
|
11229
11229
|
this.shadowRoot = shadowRoot;
|
|
11230
11230
|
return shadowRoot;
|
|
11231
11231
|
}
|
|
@@ -11401,8 +11401,8 @@ var MockElement = class extends MockNode2 {
|
|
|
11401
11401
|
});
|
|
11402
11402
|
}
|
|
11403
11403
|
set innerHTML(html) {
|
|
11404
|
-
var
|
|
11405
|
-
if (NON_ESCAPABLE_CONTENT.has((
|
|
11404
|
+
var _a3;
|
|
11405
|
+
if (NON_ESCAPABLE_CONTENT.has((_a3 = this.nodeName) != null ? _a3 : "") === true) {
|
|
11406
11406
|
setTextContent(this, html);
|
|
11407
11407
|
} else {
|
|
11408
11408
|
for (let i = this.childNodes.length - 1; i >= 0; i--) {
|
|
@@ -11645,8 +11645,8 @@ var MockElement = class extends MockNode2 {
|
|
|
11645
11645
|
this.setAttributeNS(null, "tabindex", value);
|
|
11646
11646
|
}
|
|
11647
11647
|
get tagName() {
|
|
11648
|
-
var
|
|
11649
|
-
return (
|
|
11648
|
+
var _a3;
|
|
11649
|
+
return (_a3 = this.nodeName) != null ? _a3 : "";
|
|
11650
11650
|
}
|
|
11651
11651
|
set tagName(value) {
|
|
11652
11652
|
this.nodeName = value;
|
|
@@ -11868,11 +11868,11 @@ function getElementsByClassName(elm, classNames, foundElms) {
|
|
|
11868
11868
|
}
|
|
11869
11869
|
}
|
|
11870
11870
|
function getElementsByTagName(elm, tagName, foundElms) {
|
|
11871
|
-
var
|
|
11871
|
+
var _a3;
|
|
11872
11872
|
const children = elm.children;
|
|
11873
11873
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
11874
11874
|
const childElm = children[i];
|
|
11875
|
-
if (tagName === "*" || ((
|
|
11875
|
+
if (tagName === "*" || ((_a3 = childElm.nodeName) != null ? _a3 : "").toLowerCase() === tagName) {
|
|
11876
11876
|
foundElms.push(childElm);
|
|
11877
11877
|
}
|
|
11878
11878
|
getElementsByTagName(childElm, tagName, foundElms);
|
|
@@ -11909,8 +11909,8 @@ var MockHTMLElement = class extends MockElement {
|
|
|
11909
11909
|
super(ownerDocument, typeof nodeName === "string" ? nodeName.toUpperCase() : null);
|
|
11910
11910
|
}
|
|
11911
11911
|
get tagName() {
|
|
11912
|
-
var
|
|
11913
|
-
return (
|
|
11912
|
+
var _a3;
|
|
11913
|
+
return (_a3 = this.nodeName) != null ? _a3 : "";
|
|
11914
11914
|
}
|
|
11915
11915
|
set tagName(value) {
|
|
11916
11916
|
this.nodeName = value;
|
|
@@ -12368,10 +12368,10 @@ var MockLabelElement = class extends MockHTMLElement {
|
|
|
12368
12368
|
this.setAttributeNS(null, "for", value);
|
|
12369
12369
|
}
|
|
12370
12370
|
get control() {
|
|
12371
|
-
var
|
|
12371
|
+
var _a3, _b;
|
|
12372
12372
|
const forAttr = this.htmlFor;
|
|
12373
12373
|
if (forAttr) {
|
|
12374
|
-
return (_b = (
|
|
12374
|
+
return (_b = (_a3 = this.ownerDocument) == null ? void 0 : _a3.getElementById(forAttr)) != null ? _b : null;
|
|
12375
12375
|
}
|
|
12376
12376
|
const labelableSelector = 'button, input:not([type="hidden"]), meter, output, progress, select, textarea';
|
|
12377
12377
|
return this.querySelector(labelableSelector);
|
|
@@ -15181,8 +15181,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
|
15181
15181
|
};
|
|
15182
15182
|
|
|
15183
15183
|
// node_modules/minimatch/dist/esm/ast.js
|
|
15184
|
+
var _a2;
|
|
15184
15185
|
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
15185
15186
|
var isExtglobType = (c) => types.has(c);
|
|
15187
|
+
var isExtglobAST = (c) => isExtglobType(c.type);
|
|
15188
|
+
var adoptionMap = /* @__PURE__ */ new Map([
|
|
15189
|
+
["!", ["@"]],
|
|
15190
|
+
["?", ["?", "@"]],
|
|
15191
|
+
["@", ["@"]],
|
|
15192
|
+
["*", ["*", "+", "?", "@"]],
|
|
15193
|
+
["+", ["+", "@"]]
|
|
15194
|
+
]);
|
|
15195
|
+
var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
|
|
15196
|
+
["!", ["?"]],
|
|
15197
|
+
["@", ["?"]],
|
|
15198
|
+
["+", ["?", "*"]]
|
|
15199
|
+
]);
|
|
15200
|
+
var adoptionAnyMap = /* @__PURE__ */ new Map([
|
|
15201
|
+
["!", ["?", "@"]],
|
|
15202
|
+
["?", ["?", "@"]],
|
|
15203
|
+
["@", ["?", "@"]],
|
|
15204
|
+
["*", ["*", "+", "?", "@"]],
|
|
15205
|
+
["+", ["+", "@", "?", "*"]]
|
|
15206
|
+
]);
|
|
15207
|
+
var usurpMap = /* @__PURE__ */ new Map([
|
|
15208
|
+
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
15209
|
+
["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
|
|
15210
|
+
["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
|
|
15211
|
+
["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
|
|
15212
|
+
]);
|
|
15186
15213
|
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
15187
15214
|
var startNoDot = "(?!\\.)";
|
|
15188
15215
|
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
@@ -15192,8 +15219,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
|
15192
15219
|
var qmark = "[^/]";
|
|
15193
15220
|
var star = qmark + "*?";
|
|
15194
15221
|
var starNoEmpty = qmark + "+?";
|
|
15195
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
15196
|
-
var
|
|
15222
|
+
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
|
|
15223
|
+
var AST = class {
|
|
15197
15224
|
constructor(type, parent, options = {}) {
|
|
15198
15225
|
__privateAdd(this, _AST_instances);
|
|
15199
15226
|
__publicField(this, "type");
|
|
@@ -15246,44 +15273,44 @@ var _AST = class _AST {
|
|
|
15246
15273
|
for (const p of parts) {
|
|
15247
15274
|
if (p === "")
|
|
15248
15275
|
continue;
|
|
15249
|
-
if (typeof p !== "string" && !(p instanceof
|
|
15276
|
+
if (typeof p !== "string" && !(p instanceof _a2 && __privateGet(p, _parent) === this)) {
|
|
15250
15277
|
throw new Error("invalid part: " + p);
|
|
15251
15278
|
}
|
|
15252
15279
|
__privateGet(this, _parts).push(p);
|
|
15253
15280
|
}
|
|
15254
15281
|
}
|
|
15255
15282
|
toJSON() {
|
|
15256
|
-
var
|
|
15283
|
+
var _a3;
|
|
15257
15284
|
const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
|
|
15258
15285
|
if (this.isStart() && !this.type)
|
|
15259
15286
|
ret.unshift([]);
|
|
15260
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((
|
|
15287
|
+
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!")) {
|
|
15261
15288
|
ret.push({});
|
|
15262
15289
|
}
|
|
15263
15290
|
return ret;
|
|
15264
15291
|
}
|
|
15265
15292
|
isStart() {
|
|
15266
|
-
var
|
|
15293
|
+
var _a3;
|
|
15267
15294
|
if (__privateGet(this, _root) === this)
|
|
15268
15295
|
return true;
|
|
15269
|
-
if (!((
|
|
15296
|
+
if (!((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.isStart()))
|
|
15270
15297
|
return false;
|
|
15271
15298
|
if (__privateGet(this, _parentIndex) === 0)
|
|
15272
15299
|
return true;
|
|
15273
15300
|
const p = __privateGet(this, _parent);
|
|
15274
15301
|
for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
|
|
15275
15302
|
const pp = __privateGet(p, _parts)[i];
|
|
15276
|
-
if (!(pp instanceof
|
|
15303
|
+
if (!(pp instanceof _a2 && pp.type === "!")) {
|
|
15277
15304
|
return false;
|
|
15278
15305
|
}
|
|
15279
15306
|
}
|
|
15280
15307
|
return true;
|
|
15281
15308
|
}
|
|
15282
15309
|
isEnd() {
|
|
15283
|
-
var
|
|
15310
|
+
var _a3, _b, _c;
|
|
15284
15311
|
if (__privateGet(this, _root) === this)
|
|
15285
15312
|
return true;
|
|
15286
|
-
if (((
|
|
15313
|
+
if (((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!")
|
|
15287
15314
|
return true;
|
|
15288
15315
|
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
15289
15316
|
return false;
|
|
@@ -15299,16 +15326,16 @@ var _AST = class _AST {
|
|
|
15299
15326
|
this.push(part.clone(this));
|
|
15300
15327
|
}
|
|
15301
15328
|
clone(parent) {
|
|
15302
|
-
const c = new
|
|
15329
|
+
const c = new _a2(this.type, parent);
|
|
15303
15330
|
for (const p of __privateGet(this, _parts)) {
|
|
15304
15331
|
c.copyIn(p);
|
|
15305
15332
|
}
|
|
15306
15333
|
return c;
|
|
15307
15334
|
}
|
|
15308
15335
|
static fromGlob(pattern, options = {}) {
|
|
15309
|
-
var
|
|
15310
|
-
const ast = new
|
|
15311
|
-
__privateMethod(
|
|
15336
|
+
var _a3;
|
|
15337
|
+
const ast = new _a2(null, void 0, options);
|
|
15338
|
+
__privateMethod(_a3 = _a2, _AST_static, parseAST_fn).call(_a3, pattern, ast, 0, options, 0);
|
|
15312
15339
|
return ast;
|
|
15313
15340
|
}
|
|
15314
15341
|
// returns the regular expression if there's magic, or the unescaped
|
|
@@ -15401,15 +15428,17 @@ var _AST = class _AST {
|
|
|
15401
15428
|
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
15402
15429
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
15403
15430
|
toRegExpSource(allowDot) {
|
|
15404
|
-
var
|
|
15431
|
+
var _a3;
|
|
15405
15432
|
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
15406
|
-
if (__privateGet(this, _root) === this)
|
|
15433
|
+
if (__privateGet(this, _root) === this) {
|
|
15434
|
+
__privateMethod(this, _AST_instances, flatten_fn).call(this);
|
|
15407
15435
|
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
15408
|
-
|
|
15436
|
+
}
|
|
15437
|
+
if (!isExtglobAST(this)) {
|
|
15409
15438
|
const noEmpty = this.isStart() && this.isEnd();
|
|
15410
15439
|
const src = __privateGet(this, _parts).map((p) => {
|
|
15411
|
-
var
|
|
15412
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(
|
|
15440
|
+
var _a4;
|
|
15441
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a4 = _a2, _AST_static, parseGlob_fn).call(_a4, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
15413
15442
|
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
15414
15443
|
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
15415
15444
|
return re;
|
|
@@ -15432,7 +15461,7 @@ var _AST = class _AST {
|
|
|
15432
15461
|
}
|
|
15433
15462
|
}
|
|
15434
15463
|
let end = "";
|
|
15435
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((
|
|
15464
|
+
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!") {
|
|
15436
15465
|
end = "(?:$|\\/)";
|
|
15437
15466
|
}
|
|
15438
15467
|
const final2 = start2 + src + end;
|
|
@@ -15448,9 +15477,10 @@ var _AST = class _AST {
|
|
|
15448
15477
|
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
15449
15478
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
15450
15479
|
const s = this.toString();
|
|
15451
|
-
|
|
15452
|
-
|
|
15453
|
-
|
|
15480
|
+
const me = this;
|
|
15481
|
+
__privateSet(me, _parts, [s]);
|
|
15482
|
+
me.type = null;
|
|
15483
|
+
__privateSet(me, _hasMagic, void 0);
|
|
15454
15484
|
return [s, unescape(this.toString()), false, false];
|
|
15455
15485
|
}
|
|
15456
15486
|
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
@@ -15519,8 +15549,9 @@ fillNegs_fn = function() {
|
|
|
15519
15549
|
return this;
|
|
15520
15550
|
};
|
|
15521
15551
|
_AST_static = new WeakSet();
|
|
15522
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
15523
|
-
var
|
|
15552
|
+
parseAST_fn = function(str, ast, pos, opt, extDepth) {
|
|
15553
|
+
var _a3, _b, _c, _d, _e;
|
|
15554
|
+
const maxDepth = (_a3 = opt.maxExtglobRecursion) != null ? _a3 : 2;
|
|
15524
15555
|
let escaping = false;
|
|
15525
15556
|
let inBrace = false;
|
|
15526
15557
|
let braceStart = -1;
|
|
@@ -15552,11 +15583,12 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
15552
15583
|
acc2 += c;
|
|
15553
15584
|
continue;
|
|
15554
15585
|
}
|
|
15555
|
-
|
|
15586
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
|
|
15587
|
+
if (doRecurse) {
|
|
15556
15588
|
ast.push(acc2);
|
|
15557
15589
|
acc2 = "";
|
|
15558
|
-
const ext2 = new
|
|
15559
|
-
i2 = __privateMethod(
|
|
15590
|
+
const ext2 = new _a2(c, ast);
|
|
15591
|
+
i2 = __privateMethod(_b = _a2, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
|
|
15560
15592
|
ast.push(ext2);
|
|
15561
15593
|
continue;
|
|
15562
15594
|
}
|
|
@@ -15566,7 +15598,7 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
15566
15598
|
return i2;
|
|
15567
15599
|
}
|
|
15568
15600
|
let i = pos + 1;
|
|
15569
|
-
let part = new
|
|
15601
|
+
let part = new _a2(null, ast);
|
|
15570
15602
|
const parts = [];
|
|
15571
15603
|
let acc = "";
|
|
15572
15604
|
while (i < str.length) {
|
|
@@ -15593,19 +15625,22 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
15593
15625
|
acc += c;
|
|
15594
15626
|
continue;
|
|
15595
15627
|
}
|
|
15596
|
-
|
|
15628
|
+
const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
15629
|
+
(extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
|
|
15630
|
+
if (doRecurse) {
|
|
15631
|
+
const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
|
|
15597
15632
|
part.push(acc);
|
|
15598
15633
|
acc = "";
|
|
15599
|
-
const ext2 = new
|
|
15634
|
+
const ext2 = new _a2(c, part);
|
|
15600
15635
|
part.push(ext2);
|
|
15601
|
-
i = __privateMethod(
|
|
15636
|
+
i = __privateMethod(_e = _a2, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
|
|
15602
15637
|
continue;
|
|
15603
15638
|
}
|
|
15604
15639
|
if (c === "|") {
|
|
15605
15640
|
part.push(acc);
|
|
15606
15641
|
acc = "";
|
|
15607
15642
|
parts.push(part);
|
|
15608
|
-
part = new
|
|
15643
|
+
part = new _a2(null, ast);
|
|
15609
15644
|
continue;
|
|
15610
15645
|
}
|
|
15611
15646
|
if (c === ")") {
|
|
@@ -15624,6 +15659,100 @@ parseAST_fn = function(str, ast, pos, opt) {
|
|
|
15624
15659
|
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
15625
15660
|
return i;
|
|
15626
15661
|
};
|
|
15662
|
+
canAdoptWithSpace_fn = function(child) {
|
|
15663
|
+
return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
|
|
15664
|
+
};
|
|
15665
|
+
canAdopt_fn = function(child, map2 = adoptionMap) {
|
|
15666
|
+
if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
|
|
15667
|
+
return false;
|
|
15668
|
+
}
|
|
15669
|
+
const gc = __privateGet(child, _parts)[0];
|
|
15670
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
15671
|
+
return false;
|
|
15672
|
+
}
|
|
15673
|
+
return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
|
|
15674
|
+
};
|
|
15675
|
+
canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
|
|
15676
|
+
var _a3;
|
|
15677
|
+
return !!((_a3 = map2.get(this.type)) == null ? void 0 : _a3.includes(c));
|
|
15678
|
+
};
|
|
15679
|
+
adoptWithSpace_fn = function(child, index) {
|
|
15680
|
+
const gc = __privateGet(child, _parts)[0];
|
|
15681
|
+
const blank = new _a2(null, gc, this.options);
|
|
15682
|
+
__privateGet(blank, _parts).push("");
|
|
15683
|
+
gc.push(blank);
|
|
15684
|
+
__privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
|
|
15685
|
+
};
|
|
15686
|
+
adopt_fn = function(child, index) {
|
|
15687
|
+
const gc = __privateGet(child, _parts)[0];
|
|
15688
|
+
__privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
|
|
15689
|
+
for (const p of __privateGet(gc, _parts)) {
|
|
15690
|
+
if (typeof p === "object")
|
|
15691
|
+
__privateSet(p, _parent, this);
|
|
15692
|
+
}
|
|
15693
|
+
__privateSet(this, _toString, void 0);
|
|
15694
|
+
};
|
|
15695
|
+
canUsurpType_fn = function(c) {
|
|
15696
|
+
const m = usurpMap.get(this.type);
|
|
15697
|
+
return !!(m == null ? void 0 : m.has(c));
|
|
15698
|
+
};
|
|
15699
|
+
canUsurp_fn = function(child) {
|
|
15700
|
+
if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
|
|
15701
|
+
return false;
|
|
15702
|
+
}
|
|
15703
|
+
const gc = __privateGet(child, _parts)[0];
|
|
15704
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
15705
|
+
return false;
|
|
15706
|
+
}
|
|
15707
|
+
return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
|
|
15708
|
+
};
|
|
15709
|
+
usurp_fn = function(child) {
|
|
15710
|
+
const m = usurpMap.get(this.type);
|
|
15711
|
+
const gc = __privateGet(child, _parts)[0];
|
|
15712
|
+
const nt = m == null ? void 0 : m.get(gc.type);
|
|
15713
|
+
if (!nt)
|
|
15714
|
+
return false;
|
|
15715
|
+
__privateSet(this, _parts, __privateGet(gc, _parts));
|
|
15716
|
+
for (const p of __privateGet(this, _parts)) {
|
|
15717
|
+
if (typeof p === "object")
|
|
15718
|
+
__privateSet(p, _parent, this);
|
|
15719
|
+
}
|
|
15720
|
+
this.type = nt;
|
|
15721
|
+
__privateSet(this, _toString, void 0);
|
|
15722
|
+
__privateSet(this, _emptyExt, false);
|
|
15723
|
+
};
|
|
15724
|
+
flatten_fn = function() {
|
|
15725
|
+
var _a3, _b;
|
|
15726
|
+
if (!isExtglobAST(this)) {
|
|
15727
|
+
for (const p of __privateGet(this, _parts)) {
|
|
15728
|
+
if (typeof p === "object")
|
|
15729
|
+
__privateMethod(_a3 = p, _AST_instances, flatten_fn).call(_a3);
|
|
15730
|
+
}
|
|
15731
|
+
} else {
|
|
15732
|
+
let iterations = 0;
|
|
15733
|
+
let done = false;
|
|
15734
|
+
do {
|
|
15735
|
+
done = true;
|
|
15736
|
+
for (let i = 0; i < __privateGet(this, _parts).length; i++) {
|
|
15737
|
+
const c = __privateGet(this, _parts)[i];
|
|
15738
|
+
if (typeof c === "object") {
|
|
15739
|
+
__privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
|
|
15740
|
+
if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
|
|
15741
|
+
done = false;
|
|
15742
|
+
__privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
|
|
15743
|
+
} else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
|
|
15744
|
+
done = false;
|
|
15745
|
+
__privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
|
|
15746
|
+
} else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
|
|
15747
|
+
done = false;
|
|
15748
|
+
__privateMethod(this, _AST_instances, usurp_fn).call(this, c);
|
|
15749
|
+
}
|
|
15750
|
+
}
|
|
15751
|
+
}
|
|
15752
|
+
} while (!done && ++iterations < 10);
|
|
15753
|
+
}
|
|
15754
|
+
__privateSet(this, _toString, void 0);
|
|
15755
|
+
};
|
|
15627
15756
|
partsToRegExp_fn = function(dot) {
|
|
15628
15757
|
return __privateGet(this, _parts).map((p) => {
|
|
15629
15758
|
if (typeof p === "string") {
|
|
@@ -15638,11 +15767,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
15638
15767
|
let escaping = false;
|
|
15639
15768
|
let re = "";
|
|
15640
15769
|
let uflag = false;
|
|
15770
|
+
let inStar = false;
|
|
15641
15771
|
for (let i = 0; i < glob.length; i++) {
|
|
15642
15772
|
const c = glob.charAt(i);
|
|
15643
15773
|
if (escaping) {
|
|
15644
15774
|
escaping = false;
|
|
15645
15775
|
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
15776
|
+
inStar = false;
|
|
15646
15777
|
continue;
|
|
15647
15778
|
}
|
|
15648
15779
|
if (c === "\\") {
|
|
@@ -15660,16 +15791,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
15660
15791
|
uflag = uflag || needUflag;
|
|
15661
15792
|
i += consumed - 1;
|
|
15662
15793
|
hasMagic = hasMagic || magic;
|
|
15794
|
+
inStar = false;
|
|
15663
15795
|
continue;
|
|
15664
15796
|
}
|
|
15665
15797
|
}
|
|
15666
15798
|
if (c === "*") {
|
|
15667
|
-
if (
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15799
|
+
if (inStar)
|
|
15800
|
+
continue;
|
|
15801
|
+
inStar = true;
|
|
15802
|
+
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
|
|
15671
15803
|
hasMagic = true;
|
|
15672
15804
|
continue;
|
|
15805
|
+
} else {
|
|
15806
|
+
inStar = false;
|
|
15673
15807
|
}
|
|
15674
15808
|
if (c === "?") {
|
|
15675
15809
|
re += qmark;
|
|
@@ -15680,8 +15814,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
|
15680
15814
|
}
|
|
15681
15815
|
return [re, unescape(glob), !!hasMagic, uflag];
|
|
15682
15816
|
};
|
|
15683
|
-
__privateAdd(
|
|
15684
|
-
|
|
15817
|
+
__privateAdd(AST, _AST_static);
|
|
15818
|
+
_a2 = AST;
|
|
15685
15819
|
|
|
15686
15820
|
// node_modules/minimatch/dist/esm/escape.js
|
|
15687
15821
|
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
@@ -15820,28 +15954,33 @@ var match = (list, pattern, options = {}) => {
|
|
|
15820
15954
|
minimatch.match = match;
|
|
15821
15955
|
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
15822
15956
|
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
15957
|
+
var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
|
|
15823
15958
|
var Minimatch = class {
|
|
15824
|
-
options;
|
|
15825
|
-
set;
|
|
15826
|
-
pattern;
|
|
15827
|
-
windowsPathsNoEscape;
|
|
15828
|
-
nonegate;
|
|
15829
|
-
negate;
|
|
15830
|
-
comment;
|
|
15831
|
-
empty;
|
|
15832
|
-
preserveMultipleSlashes;
|
|
15833
|
-
partial;
|
|
15834
|
-
globSet;
|
|
15835
|
-
globParts;
|
|
15836
|
-
nocase;
|
|
15837
|
-
isWindows;
|
|
15838
|
-
platform;
|
|
15839
|
-
windowsNoMagicRoot;
|
|
15840
|
-
regexp;
|
|
15841
15959
|
constructor(pattern, options = {}) {
|
|
15960
|
+
__privateAdd(this, _Minimatch_instances);
|
|
15961
|
+
__publicField(this, "options");
|
|
15962
|
+
__publicField(this, "set");
|
|
15963
|
+
__publicField(this, "pattern");
|
|
15964
|
+
__publicField(this, "windowsPathsNoEscape");
|
|
15965
|
+
__publicField(this, "nonegate");
|
|
15966
|
+
__publicField(this, "negate");
|
|
15967
|
+
__publicField(this, "comment");
|
|
15968
|
+
__publicField(this, "empty");
|
|
15969
|
+
__publicField(this, "preserveMultipleSlashes");
|
|
15970
|
+
__publicField(this, "partial");
|
|
15971
|
+
__publicField(this, "globSet");
|
|
15972
|
+
__publicField(this, "globParts");
|
|
15973
|
+
__publicField(this, "nocase");
|
|
15974
|
+
__publicField(this, "isWindows");
|
|
15975
|
+
__publicField(this, "platform");
|
|
15976
|
+
__publicField(this, "windowsNoMagicRoot");
|
|
15977
|
+
__publicField(this, "maxGlobstarRecursion");
|
|
15978
|
+
__publicField(this, "regexp");
|
|
15979
|
+
var _a3;
|
|
15842
15980
|
assertValidPattern(pattern);
|
|
15843
15981
|
options = options || {};
|
|
15844
15982
|
this.options = options;
|
|
15983
|
+
this.maxGlobstarRecursion = (_a3 = options.maxGlobstarRecursion) != null ? _a3 : 200;
|
|
15845
15984
|
this.pattern = pattern;
|
|
15846
15985
|
this.platform = options.platform || defaultPlatform;
|
|
15847
15986
|
this.isWindows = this.platform === "win32";
|
|
@@ -16109,10 +16248,11 @@ var Minimatch = class {
|
|
|
16109
16248
|
for (let i = 0; i < globParts.length - 1; i++) {
|
|
16110
16249
|
for (let j = i + 1; j < globParts.length; j++) {
|
|
16111
16250
|
const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
16112
|
-
if (
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
|
|
16251
|
+
if (matched) {
|
|
16252
|
+
globParts[i] = [];
|
|
16253
|
+
globParts[j] = matched;
|
|
16254
|
+
break;
|
|
16255
|
+
}
|
|
16116
16256
|
}
|
|
16117
16257
|
}
|
|
16118
16258
|
return globParts.filter((gs) => gs.length);
|
|
@@ -16173,7 +16313,8 @@ var Minimatch = class {
|
|
|
16173
16313
|
// out of pattern, then that's fine, as long as all
|
|
16174
16314
|
// the parts match.
|
|
16175
16315
|
matchOne(file, pattern, partial = false) {
|
|
16176
|
-
|
|
16316
|
+
let fileStartIndex = 0;
|
|
16317
|
+
let patternStartIndex = 0;
|
|
16177
16318
|
if (this.isWindows) {
|
|
16178
16319
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
16179
16320
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -16182,14 +16323,14 @@ var Minimatch = class {
|
|
|
16182
16323
|
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
16183
16324
|
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
16184
16325
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
16185
|
-
const [fd, pd] = [
|
|
16326
|
+
const [fd, pd] = [
|
|
16327
|
+
file[fdi],
|
|
16328
|
+
pattern[pdi]
|
|
16329
|
+
];
|
|
16186
16330
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
16187
16331
|
pattern[pdi] = fd;
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
} else if (fdi > pdi) {
|
|
16191
|
-
file = file.slice(fdi);
|
|
16192
|
-
}
|
|
16332
|
+
patternStartIndex = pdi;
|
|
16333
|
+
fileStartIndex = fdi;
|
|
16193
16334
|
}
|
|
16194
16335
|
}
|
|
16195
16336
|
}
|
|
@@ -16197,71 +16338,10 @@ var Minimatch = class {
|
|
|
16197
16338
|
if (optimizationLevel >= 2) {
|
|
16198
16339
|
file = this.levelTwoFileOptimize(file);
|
|
16199
16340
|
}
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
16203
|
-
this.debug("matchOne loop");
|
|
16204
|
-
var p = pattern[pi];
|
|
16205
|
-
var f = file[fi];
|
|
16206
|
-
this.debug(pattern, p, f);
|
|
16207
|
-
if (p === false) {
|
|
16208
|
-
return false;
|
|
16209
|
-
}
|
|
16210
|
-
if (p === GLOBSTAR) {
|
|
16211
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
16212
|
-
var fr = fi;
|
|
16213
|
-
var pr = pi + 1;
|
|
16214
|
-
if (pr === pl) {
|
|
16215
|
-
this.debug("** at the end");
|
|
16216
|
-
for (; fi < fl; fi++) {
|
|
16217
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
16218
|
-
return false;
|
|
16219
|
-
}
|
|
16220
|
-
return true;
|
|
16221
|
-
}
|
|
16222
|
-
while (fr < fl) {
|
|
16223
|
-
var swallowee = file[fr];
|
|
16224
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
16225
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
16226
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
16227
|
-
return true;
|
|
16228
|
-
} else {
|
|
16229
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
16230
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
16231
|
-
break;
|
|
16232
|
-
}
|
|
16233
|
-
this.debug("globstar swallow a segment, and continue");
|
|
16234
|
-
fr++;
|
|
16235
|
-
}
|
|
16236
|
-
}
|
|
16237
|
-
if (partial) {
|
|
16238
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
16239
|
-
if (fr === fl) {
|
|
16240
|
-
return true;
|
|
16241
|
-
}
|
|
16242
|
-
}
|
|
16243
|
-
return false;
|
|
16244
|
-
}
|
|
16245
|
-
let hit;
|
|
16246
|
-
if (typeof p === "string") {
|
|
16247
|
-
hit = f === p;
|
|
16248
|
-
this.debug("string match", p, f, hit);
|
|
16249
|
-
} else {
|
|
16250
|
-
hit = p.test(f);
|
|
16251
|
-
this.debug("pattern match", p, f, hit);
|
|
16252
|
-
}
|
|
16253
|
-
if (!hit)
|
|
16254
|
-
return false;
|
|
16255
|
-
}
|
|
16256
|
-
if (fi === fl && pi === pl) {
|
|
16257
|
-
return true;
|
|
16258
|
-
} else if (fi === fl) {
|
|
16259
|
-
return partial;
|
|
16260
|
-
} else if (pi === pl) {
|
|
16261
|
-
return fi === fl - 1 && file[fi] === "";
|
|
16262
|
-
} else {
|
|
16263
|
-
throw new Error("wtf?");
|
|
16341
|
+
if (pattern.includes(GLOBSTAR)) {
|
|
16342
|
+
return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
16264
16343
|
}
|
|
16344
|
+
return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
16265
16345
|
}
|
|
16266
16346
|
braceExpand() {
|
|
16267
16347
|
return braceExpand(this.pattern, this.options);
|
|
@@ -16400,6 +16480,135 @@ var Minimatch = class {
|
|
|
16400
16480
|
return minimatch.defaults(def).Minimatch;
|
|
16401
16481
|
}
|
|
16402
16482
|
};
|
|
16483
|
+
_Minimatch_instances = new WeakSet();
|
|
16484
|
+
matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
|
|
16485
|
+
const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
|
|
16486
|
+
const lastgs = pattern.lastIndexOf(GLOBSTAR);
|
|
16487
|
+
const [head, body, tail] = partial ? [
|
|
16488
|
+
pattern.slice(patternIndex, firstgs),
|
|
16489
|
+
pattern.slice(firstgs + 1),
|
|
16490
|
+
[]
|
|
16491
|
+
] : [
|
|
16492
|
+
pattern.slice(patternIndex, firstgs),
|
|
16493
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
16494
|
+
pattern.slice(lastgs + 1)
|
|
16495
|
+
];
|
|
16496
|
+
if (head.length) {
|
|
16497
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
16498
|
+
if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
|
|
16499
|
+
return false;
|
|
16500
|
+
fileIndex += head.length;
|
|
16501
|
+
}
|
|
16502
|
+
let fileTailMatch = 0;
|
|
16503
|
+
if (tail.length) {
|
|
16504
|
+
if (tail.length + fileIndex > file.length)
|
|
16505
|
+
return false;
|
|
16506
|
+
let tailStart = file.length - tail.length;
|
|
16507
|
+
if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
|
|
16508
|
+
fileTailMatch = tail.length;
|
|
16509
|
+
} else {
|
|
16510
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
|
|
16511
|
+
return false;
|
|
16512
|
+
}
|
|
16513
|
+
tailStart--;
|
|
16514
|
+
if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
|
|
16515
|
+
return false;
|
|
16516
|
+
fileTailMatch = tail.length + 1;
|
|
16517
|
+
}
|
|
16518
|
+
}
|
|
16519
|
+
if (!body.length) {
|
|
16520
|
+
let sawSome = !!fileTailMatch;
|
|
16521
|
+
for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
|
|
16522
|
+
const f = String(file[i2]);
|
|
16523
|
+
sawSome = true;
|
|
16524
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
16525
|
+
return false;
|
|
16526
|
+
}
|
|
16527
|
+
}
|
|
16528
|
+
return partial || sawSome;
|
|
16529
|
+
}
|
|
16530
|
+
const bodySegments = [[[], 0]];
|
|
16531
|
+
let currentBody = bodySegments[0];
|
|
16532
|
+
let nonGsParts = 0;
|
|
16533
|
+
const nonGsPartsSums = [0];
|
|
16534
|
+
for (const b of body) {
|
|
16535
|
+
if (b === GLOBSTAR) {
|
|
16536
|
+
nonGsPartsSums.push(nonGsParts);
|
|
16537
|
+
currentBody = [[], 0];
|
|
16538
|
+
bodySegments.push(currentBody);
|
|
16539
|
+
} else {
|
|
16540
|
+
currentBody[0].push(b);
|
|
16541
|
+
nonGsParts++;
|
|
16542
|
+
}
|
|
16543
|
+
}
|
|
16544
|
+
let i = bodySegments.length - 1;
|
|
16545
|
+
const fileLength = file.length - fileTailMatch;
|
|
16546
|
+
for (const b of bodySegments) {
|
|
16547
|
+
b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
16548
|
+
}
|
|
16549
|
+
return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
16550
|
+
};
|
|
16551
|
+
matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
16552
|
+
const bs = bodySegments[bodyIndex];
|
|
16553
|
+
if (!bs) {
|
|
16554
|
+
for (let i = fileIndex; i < file.length; i++) {
|
|
16555
|
+
sawTail = true;
|
|
16556
|
+
const f = file[i];
|
|
16557
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
16558
|
+
return false;
|
|
16559
|
+
}
|
|
16560
|
+
}
|
|
16561
|
+
return sawTail;
|
|
16562
|
+
}
|
|
16563
|
+
const [body, after] = bs;
|
|
16564
|
+
while (fileIndex <= after) {
|
|
16565
|
+
const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
16566
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
16567
|
+
const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
16568
|
+
if (sub !== false)
|
|
16569
|
+
return sub;
|
|
16570
|
+
}
|
|
16571
|
+
const f = file[fileIndex];
|
|
16572
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
16573
|
+
return false;
|
|
16574
|
+
}
|
|
16575
|
+
fileIndex++;
|
|
16576
|
+
}
|
|
16577
|
+
return partial || null;
|
|
16578
|
+
};
|
|
16579
|
+
matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
|
|
16580
|
+
let fi;
|
|
16581
|
+
let pi;
|
|
16582
|
+
let pl;
|
|
16583
|
+
let fl;
|
|
16584
|
+
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
16585
|
+
this.debug("matchOne loop");
|
|
16586
|
+
let p = pattern[pi];
|
|
16587
|
+
let f = file[fi];
|
|
16588
|
+
this.debug(pattern, p, f);
|
|
16589
|
+
if (p === false || p === GLOBSTAR)
|
|
16590
|
+
return false;
|
|
16591
|
+
let hit;
|
|
16592
|
+
if (typeof p === "string") {
|
|
16593
|
+
hit = f === p;
|
|
16594
|
+
this.debug("string match", p, f, hit);
|
|
16595
|
+
} else {
|
|
16596
|
+
hit = p.test(f);
|
|
16597
|
+
this.debug("pattern match", p, f, hit);
|
|
16598
|
+
}
|
|
16599
|
+
if (!hit)
|
|
16600
|
+
return false;
|
|
16601
|
+
}
|
|
16602
|
+
if (fi === fl && pi === pl) {
|
|
16603
|
+
return true;
|
|
16604
|
+
} else if (fi === fl) {
|
|
16605
|
+
return partial;
|
|
16606
|
+
} else if (pi === pl) {
|
|
16607
|
+
return fi === fl - 1 && file[fi] === "";
|
|
16608
|
+
} else {
|
|
16609
|
+
throw new Error("wtf?");
|
|
16610
|
+
}
|
|
16611
|
+
};
|
|
16403
16612
|
minimatch.AST = AST;
|
|
16404
16613
|
minimatch.Minimatch = Minimatch;
|
|
16405
16614
|
minimatch.escape = escape;
|
|
@@ -16470,7 +16679,7 @@ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") ||
|
|
|
16470
16679
|
|
|
16471
16680
|
// src/compiler/html/canonical-link.ts
|
|
16472
16681
|
var updateCanonicalLink = (doc, href) => {
|
|
16473
|
-
var
|
|
16682
|
+
var _a3;
|
|
16474
16683
|
let canonicalLinkElm = doc.head.querySelector('link[rel="canonical"]');
|
|
16475
16684
|
if (typeof href === "string") {
|
|
16476
16685
|
if (canonicalLinkElm == null) {
|
|
@@ -16483,7 +16692,7 @@ var updateCanonicalLink = (doc, href) => {
|
|
|
16483
16692
|
if (canonicalLinkElm != null) {
|
|
16484
16693
|
const existingHref = canonicalLinkElm.getAttribute("href");
|
|
16485
16694
|
if (!existingHref) {
|
|
16486
|
-
(
|
|
16695
|
+
(_a3 = canonicalLinkElm.parentNode) == null ? void 0 : _a3.removeChild(canonicalLinkElm);
|
|
16487
16696
|
}
|
|
16488
16697
|
}
|
|
16489
16698
|
}
|
|
@@ -16995,7 +17204,7 @@ var serializeCss = (stylesheet, serializeOpts) => {
|
|
|
16995
17204
|
return out.join("");
|
|
16996
17205
|
};
|
|
16997
17206
|
var serializeCssVisitNode = (opts, node, index, len) => {
|
|
16998
|
-
var
|
|
17207
|
+
var _a3;
|
|
16999
17208
|
const nodeType = node.type;
|
|
17000
17209
|
if (nodeType === 4 /* Declaration */) {
|
|
17001
17210
|
return serializeCssDeclaration(node, index, len);
|
|
@@ -17004,7 +17213,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
17004
17213
|
return serializeCssRule(opts, node);
|
|
17005
17214
|
}
|
|
17006
17215
|
if (nodeType === 1 /* Comment */) {
|
|
17007
|
-
if (((
|
|
17216
|
+
if (((_a3 = node.comment) == null ? void 0 : _a3[0]) === "!") {
|
|
17008
17217
|
return `/*${node.comment}*/`;
|
|
17009
17218
|
} else {
|
|
17010
17219
|
return "";
|
|
@@ -17052,10 +17261,10 @@ var serializeCssVisitNode = (opts, node, index, len) => {
|
|
|
17052
17261
|
return "";
|
|
17053
17262
|
};
|
|
17054
17263
|
var serializeCssRule = (opts, node) => {
|
|
17055
|
-
var
|
|
17264
|
+
var _a3, _b;
|
|
17056
17265
|
const decls = node.declarations;
|
|
17057
17266
|
const usedSelectors = opts.usedSelectors;
|
|
17058
|
-
const selectors = (_b = (
|
|
17267
|
+
const selectors = (_b = (_a3 = node.selectors) == null ? void 0 : _a3.slice()) != null ? _b : [];
|
|
17059
17268
|
const hasDecls = decls != null && decls.length > 0;
|
|
17060
17269
|
const hasNestedRules = node.rules != null && node.rules.length > 0;
|
|
17061
17270
|
if (!hasDecls && !hasNestedRules) {
|
|
@@ -17159,8 +17368,8 @@ var serializeCssKeyframes = (opts, node) => {
|
|
|
17159
17368
|
return "@" + (node.vendor || "") + "keyframes " + node.name + "{" + keyframesCss + "}";
|
|
17160
17369
|
};
|
|
17161
17370
|
var serializeCssKeyframe = (opts, node) => {
|
|
17162
|
-
var
|
|
17163
|
-
return ((_b = (
|
|
17371
|
+
var _a3, _b;
|
|
17372
|
+
return ((_b = (_a3 = node.values) == null ? void 0 : _a3.join(",")) != null ? _b : "") + "{" + serializeCssMapVisit(opts, node.declarations) + "}";
|
|
17164
17373
|
};
|
|
17165
17374
|
var serializeCssFontFace = (opts, node) => {
|
|
17166
17375
|
const fontCss = serializeCssMapVisit(opts, node.declarations);
|
|
@@ -17184,8 +17393,8 @@ var serializeCssContainer = (opts, node) => {
|
|
|
17184
17393
|
return "@container " + removeMediaWhitespace(node.media) + "{" + containerCss + "}";
|
|
17185
17394
|
};
|
|
17186
17395
|
var serializeCssPage = (opts, node) => {
|
|
17187
|
-
var
|
|
17188
|
-
const sel = (_b = (
|
|
17396
|
+
var _a3, _b;
|
|
17397
|
+
const sel = (_b = (_a3 = node.selectors) == null ? void 0 : _a3.join(", ")) != null ? _b : "";
|
|
17189
17398
|
return "@page " + sel + "{" + serializeCssMapVisit(opts, node.declarations) + "}";
|
|
17190
17399
|
};
|
|
17191
17400
|
var serializeCssDocument = (opts, node) => {
|
|
@@ -17232,10 +17441,10 @@ var removeSelectorWhitespace = (selector) => {
|
|
|
17232
17441
|
return rtn;
|
|
17233
17442
|
};
|
|
17234
17443
|
var removeMediaWhitespace = (media) => {
|
|
17235
|
-
var
|
|
17444
|
+
var _a3;
|
|
17236
17445
|
let rtn = "";
|
|
17237
17446
|
let char = "";
|
|
17238
|
-
media = (
|
|
17447
|
+
media = (_a3 = media == null ? void 0 : media.trim()) != null ? _a3 : "";
|
|
17239
17448
|
for (let i = 0, l = media.length; i < l; i++) {
|
|
17240
17449
|
char = media[i];
|
|
17241
17450
|
if (CSS_WS_REG.test(char)) {
|