@stencil/core 4.22.3 → 4.23.0
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 +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +1610 -30
- 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 +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +1213 -1019
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1213 -1019
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +41 -35
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +13 -0
- package/internal/stencil-public-docs.d.ts +8 -0
- package/internal/testing/index.js +1215 -1021
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +15 -9
- package/mock-doc/index.js +15 -9
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +13 -13
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +11 -3
- package/testing/package.json +1 -1
package/compiler/stencil.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Compiler v4.
|
|
2
|
+
Stencil Compiler v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __create = Object.create;
|
|
@@ -217235,6 +217235,1523 @@ export {${name} as __module}`;
|
|
|
217235
217235
|
}
|
|
217236
217236
|
});
|
|
217237
217237
|
|
|
217238
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/lib/constants.js
|
|
217239
|
+
var require_constants2 = __commonJS({
|
|
217240
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
217241
|
+
"use strict";
|
|
217242
|
+
var WIN_SLASH = "\\\\/";
|
|
217243
|
+
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
217244
|
+
var DOT_LITERAL = "\\.";
|
|
217245
|
+
var PLUS_LITERAL = "\\+";
|
|
217246
|
+
var QMARK_LITERAL = "\\?";
|
|
217247
|
+
var SLASH_LITERAL = "\\/";
|
|
217248
|
+
var ONE_CHAR = "(?=.)";
|
|
217249
|
+
var QMARK = "[^/]";
|
|
217250
|
+
var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
|
217251
|
+
var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
|
217252
|
+
var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
|
217253
|
+
var NO_DOT = `(?!${DOT_LITERAL})`;
|
|
217254
|
+
var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
|
|
217255
|
+
var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
|
|
217256
|
+
var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
|
217257
|
+
var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
|
217258
|
+
var STAR = `${QMARK}*?`;
|
|
217259
|
+
var SEP = "/";
|
|
217260
|
+
var POSIX_CHARS = {
|
|
217261
|
+
DOT_LITERAL,
|
|
217262
|
+
PLUS_LITERAL,
|
|
217263
|
+
QMARK_LITERAL,
|
|
217264
|
+
SLASH_LITERAL,
|
|
217265
|
+
ONE_CHAR,
|
|
217266
|
+
QMARK,
|
|
217267
|
+
END_ANCHOR,
|
|
217268
|
+
DOTS_SLASH,
|
|
217269
|
+
NO_DOT,
|
|
217270
|
+
NO_DOTS,
|
|
217271
|
+
NO_DOT_SLASH,
|
|
217272
|
+
NO_DOTS_SLASH,
|
|
217273
|
+
QMARK_NO_DOT,
|
|
217274
|
+
STAR,
|
|
217275
|
+
START_ANCHOR,
|
|
217276
|
+
SEP
|
|
217277
|
+
};
|
|
217278
|
+
var WINDOWS_CHARS = {
|
|
217279
|
+
...POSIX_CHARS,
|
|
217280
|
+
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
|
217281
|
+
QMARK: WIN_NO_SLASH,
|
|
217282
|
+
STAR: `${WIN_NO_SLASH}*?`,
|
|
217283
|
+
DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
|
|
217284
|
+
NO_DOT: `(?!${DOT_LITERAL})`,
|
|
217285
|
+
NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
217286
|
+
NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
|
|
217287
|
+
NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
|
|
217288
|
+
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
|
217289
|
+
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
|
217290
|
+
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
|
|
217291
|
+
SEP: "\\"
|
|
217292
|
+
};
|
|
217293
|
+
var POSIX_REGEX_SOURCE = {
|
|
217294
|
+
alnum: "a-zA-Z0-9",
|
|
217295
|
+
alpha: "a-zA-Z",
|
|
217296
|
+
ascii: "\\x00-\\x7F",
|
|
217297
|
+
blank: " \\t",
|
|
217298
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
217299
|
+
digit: "0-9",
|
|
217300
|
+
graph: "\\x21-\\x7E",
|
|
217301
|
+
lower: "a-z",
|
|
217302
|
+
print: "\\x20-\\x7E ",
|
|
217303
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
217304
|
+
space: " \\t\\r\\n\\v\\f",
|
|
217305
|
+
upper: "A-Z",
|
|
217306
|
+
word: "A-Za-z0-9_",
|
|
217307
|
+
xdigit: "A-Fa-f0-9"
|
|
217308
|
+
};
|
|
217309
|
+
module2.exports = {
|
|
217310
|
+
MAX_LENGTH: 1024 * 64,
|
|
217311
|
+
POSIX_REGEX_SOURCE,
|
|
217312
|
+
// regular expressions
|
|
217313
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
217314
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
217315
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
217316
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
217317
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
217318
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
217319
|
+
// Replace globs with equivalent patterns to reduce parsing time.
|
|
217320
|
+
REPLACEMENTS: {
|
|
217321
|
+
"***": "*",
|
|
217322
|
+
"**/**": "**",
|
|
217323
|
+
"**/**/**": "**"
|
|
217324
|
+
},
|
|
217325
|
+
// Digits
|
|
217326
|
+
CHAR_0: 48,
|
|
217327
|
+
/* 0 */
|
|
217328
|
+
CHAR_9: 57,
|
|
217329
|
+
/* 9 */
|
|
217330
|
+
// Alphabet chars.
|
|
217331
|
+
CHAR_UPPERCASE_A: 65,
|
|
217332
|
+
/* A */
|
|
217333
|
+
CHAR_LOWERCASE_A: 97,
|
|
217334
|
+
/* a */
|
|
217335
|
+
CHAR_UPPERCASE_Z: 90,
|
|
217336
|
+
/* Z */
|
|
217337
|
+
CHAR_LOWERCASE_Z: 122,
|
|
217338
|
+
/* z */
|
|
217339
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
217340
|
+
/* ( */
|
|
217341
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
217342
|
+
/* ) */
|
|
217343
|
+
CHAR_ASTERISK: 42,
|
|
217344
|
+
/* * */
|
|
217345
|
+
// Non-alphabetic chars.
|
|
217346
|
+
CHAR_AMPERSAND: 38,
|
|
217347
|
+
/* & */
|
|
217348
|
+
CHAR_AT: 64,
|
|
217349
|
+
/* @ */
|
|
217350
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
217351
|
+
/* \ */
|
|
217352
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
217353
|
+
/* \r */
|
|
217354
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
217355
|
+
/* ^ */
|
|
217356
|
+
CHAR_COLON: 58,
|
|
217357
|
+
/* : */
|
|
217358
|
+
CHAR_COMMA: 44,
|
|
217359
|
+
/* , */
|
|
217360
|
+
CHAR_DOT: 46,
|
|
217361
|
+
/* . */
|
|
217362
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
217363
|
+
/* " */
|
|
217364
|
+
CHAR_EQUAL: 61,
|
|
217365
|
+
/* = */
|
|
217366
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
217367
|
+
/* ! */
|
|
217368
|
+
CHAR_FORM_FEED: 12,
|
|
217369
|
+
/* \f */
|
|
217370
|
+
CHAR_FORWARD_SLASH: 47,
|
|
217371
|
+
/* / */
|
|
217372
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
217373
|
+
/* ` */
|
|
217374
|
+
CHAR_HASH: 35,
|
|
217375
|
+
/* # */
|
|
217376
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
217377
|
+
/* - */
|
|
217378
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
217379
|
+
/* < */
|
|
217380
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
217381
|
+
/* { */
|
|
217382
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
217383
|
+
/* [ */
|
|
217384
|
+
CHAR_LINE_FEED: 10,
|
|
217385
|
+
/* \n */
|
|
217386
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
217387
|
+
/* \u00A0 */
|
|
217388
|
+
CHAR_PERCENT: 37,
|
|
217389
|
+
/* % */
|
|
217390
|
+
CHAR_PLUS: 43,
|
|
217391
|
+
/* + */
|
|
217392
|
+
CHAR_QUESTION_MARK: 63,
|
|
217393
|
+
/* ? */
|
|
217394
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
217395
|
+
/* > */
|
|
217396
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
217397
|
+
/* } */
|
|
217398
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
217399
|
+
/* ] */
|
|
217400
|
+
CHAR_SEMICOLON: 59,
|
|
217401
|
+
/* ; */
|
|
217402
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
217403
|
+
/* ' */
|
|
217404
|
+
CHAR_SPACE: 32,
|
|
217405
|
+
/* */
|
|
217406
|
+
CHAR_TAB: 9,
|
|
217407
|
+
/* \t */
|
|
217408
|
+
CHAR_UNDERSCORE: 95,
|
|
217409
|
+
/* _ */
|
|
217410
|
+
CHAR_VERTICAL_LINE: 124,
|
|
217411
|
+
/* | */
|
|
217412
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
217413
|
+
/* \uFEFF */
|
|
217414
|
+
/**
|
|
217415
|
+
* Create EXTGLOB_CHARS
|
|
217416
|
+
*/
|
|
217417
|
+
extglobChars(chars3) {
|
|
217418
|
+
return {
|
|
217419
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${chars3.STAR})` },
|
|
217420
|
+
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
217421
|
+
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
217422
|
+
"*": { type: "star", open: "(?:", close: ")*" },
|
|
217423
|
+
"@": { type: "at", open: "(?:", close: ")" }
|
|
217424
|
+
};
|
|
217425
|
+
},
|
|
217426
|
+
/**
|
|
217427
|
+
* Create GLOB_CHARS
|
|
217428
|
+
*/
|
|
217429
|
+
globChars(win322) {
|
|
217430
|
+
return win322 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
217431
|
+
}
|
|
217432
|
+
};
|
|
217433
|
+
}
|
|
217434
|
+
});
|
|
217435
|
+
|
|
217436
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/lib/utils.js
|
|
217437
|
+
var require_utils2 = __commonJS({
|
|
217438
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
217439
|
+
"use strict";
|
|
217440
|
+
var {
|
|
217441
|
+
REGEX_BACKSLASH,
|
|
217442
|
+
REGEX_REMOVE_BACKSLASH,
|
|
217443
|
+
REGEX_SPECIAL_CHARS,
|
|
217444
|
+
REGEX_SPECIAL_CHARS_GLOBAL
|
|
217445
|
+
} = require_constants2();
|
|
217446
|
+
exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
217447
|
+
exports2.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
217448
|
+
exports2.isRegexChar = (str) => str.length === 1 && exports2.hasRegexChars(str);
|
|
217449
|
+
exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
217450
|
+
exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
217451
|
+
exports2.isWindows = () => {
|
|
217452
|
+
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
217453
|
+
const platform = navigator.platform.toLowerCase();
|
|
217454
|
+
return platform === "win32" || platform === "windows";
|
|
217455
|
+
}
|
|
217456
|
+
if (typeof process !== "undefined" && process.platform) {
|
|
217457
|
+
return process.platform === "win32";
|
|
217458
|
+
}
|
|
217459
|
+
return false;
|
|
217460
|
+
};
|
|
217461
|
+
exports2.removeBackslashes = (str) => {
|
|
217462
|
+
return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => {
|
|
217463
|
+
return match2 === "\\" ? "" : match2;
|
|
217464
|
+
});
|
|
217465
|
+
};
|
|
217466
|
+
exports2.escapeLast = (input, char, lastIdx) => {
|
|
217467
|
+
const idx = input.lastIndexOf(char, lastIdx);
|
|
217468
|
+
if (idx === -1) return input;
|
|
217469
|
+
if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1);
|
|
217470
|
+
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
217471
|
+
};
|
|
217472
|
+
exports2.removePrefix = (input, state = {}) => {
|
|
217473
|
+
let output = input;
|
|
217474
|
+
if (output.startsWith("./")) {
|
|
217475
|
+
output = output.slice(2);
|
|
217476
|
+
state.prefix = "./";
|
|
217477
|
+
}
|
|
217478
|
+
return output;
|
|
217479
|
+
};
|
|
217480
|
+
exports2.wrapOutput = (input, state = {}, options = {}) => {
|
|
217481
|
+
const prepend3 = options.contains ? "" : "^";
|
|
217482
|
+
const append4 = options.contains ? "" : "$";
|
|
217483
|
+
let output = `${prepend3}(?:${input})${append4}`;
|
|
217484
|
+
if (state.negated === true) {
|
|
217485
|
+
output = `(?:^(?!${output}).*$)`;
|
|
217486
|
+
}
|
|
217487
|
+
return output;
|
|
217488
|
+
};
|
|
217489
|
+
exports2.basename = (path6, { windows } = {}) => {
|
|
217490
|
+
const segs = path6.split(windows ? /[\\/]/ : "/");
|
|
217491
|
+
const last = segs[segs.length - 1];
|
|
217492
|
+
if (last === "") {
|
|
217493
|
+
return segs[segs.length - 2];
|
|
217494
|
+
}
|
|
217495
|
+
return last;
|
|
217496
|
+
};
|
|
217497
|
+
}
|
|
217498
|
+
});
|
|
217499
|
+
|
|
217500
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/lib/scan.js
|
|
217501
|
+
var require_scan2 = __commonJS({
|
|
217502
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/lib/scan.js"(exports2, module2) {
|
|
217503
|
+
"use strict";
|
|
217504
|
+
var utils = require_utils2();
|
|
217505
|
+
var {
|
|
217506
|
+
CHAR_ASTERISK,
|
|
217507
|
+
/* * */
|
|
217508
|
+
CHAR_AT,
|
|
217509
|
+
/* @ */
|
|
217510
|
+
CHAR_BACKWARD_SLASH,
|
|
217511
|
+
/* \ */
|
|
217512
|
+
CHAR_COMMA,
|
|
217513
|
+
/* , */
|
|
217514
|
+
CHAR_DOT,
|
|
217515
|
+
/* . */
|
|
217516
|
+
CHAR_EXCLAMATION_MARK,
|
|
217517
|
+
/* ! */
|
|
217518
|
+
CHAR_FORWARD_SLASH,
|
|
217519
|
+
/* / */
|
|
217520
|
+
CHAR_LEFT_CURLY_BRACE,
|
|
217521
|
+
/* { */
|
|
217522
|
+
CHAR_LEFT_PARENTHESES,
|
|
217523
|
+
/* ( */
|
|
217524
|
+
CHAR_LEFT_SQUARE_BRACKET,
|
|
217525
|
+
/* [ */
|
|
217526
|
+
CHAR_PLUS,
|
|
217527
|
+
/* + */
|
|
217528
|
+
CHAR_QUESTION_MARK,
|
|
217529
|
+
/* ? */
|
|
217530
|
+
CHAR_RIGHT_CURLY_BRACE,
|
|
217531
|
+
/* } */
|
|
217532
|
+
CHAR_RIGHT_PARENTHESES,
|
|
217533
|
+
/* ) */
|
|
217534
|
+
CHAR_RIGHT_SQUARE_BRACKET
|
|
217535
|
+
/* ] */
|
|
217536
|
+
} = require_constants2();
|
|
217537
|
+
var isPathSeparator = (code) => {
|
|
217538
|
+
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
217539
|
+
};
|
|
217540
|
+
var depth = (token) => {
|
|
217541
|
+
if (token.isPrefix !== true) {
|
|
217542
|
+
token.depth = token.isGlobstar ? Infinity : 1;
|
|
217543
|
+
}
|
|
217544
|
+
};
|
|
217545
|
+
var scan = (input, options) => {
|
|
217546
|
+
const opts = options || {};
|
|
217547
|
+
const length3 = input.length - 1;
|
|
217548
|
+
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
|
217549
|
+
const slashes = [];
|
|
217550
|
+
const tokens = [];
|
|
217551
|
+
const parts = [];
|
|
217552
|
+
let str = input;
|
|
217553
|
+
let index2 = -1;
|
|
217554
|
+
let start = 0;
|
|
217555
|
+
let lastIndex = 0;
|
|
217556
|
+
let isBrace = false;
|
|
217557
|
+
let isBracket = false;
|
|
217558
|
+
let isGlob2 = false;
|
|
217559
|
+
let isExtglob = false;
|
|
217560
|
+
let isGlobstar = false;
|
|
217561
|
+
let braceEscaped = false;
|
|
217562
|
+
let backslashes = false;
|
|
217563
|
+
let negated = false;
|
|
217564
|
+
let negatedExtglob = false;
|
|
217565
|
+
let finished = false;
|
|
217566
|
+
let braces = 0;
|
|
217567
|
+
let prev;
|
|
217568
|
+
let code;
|
|
217569
|
+
let token = { value: "", depth: 0, isGlob: false };
|
|
217570
|
+
const eos = () => index2 >= length3;
|
|
217571
|
+
const peek = () => str.charCodeAt(index2 + 1);
|
|
217572
|
+
const advance3 = () => {
|
|
217573
|
+
prev = code;
|
|
217574
|
+
return str.charCodeAt(++index2);
|
|
217575
|
+
};
|
|
217576
|
+
while (index2 < length3) {
|
|
217577
|
+
code = advance3();
|
|
217578
|
+
let next;
|
|
217579
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
217580
|
+
backslashes = token.backslashes = true;
|
|
217581
|
+
code = advance3();
|
|
217582
|
+
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
217583
|
+
braceEscaped = true;
|
|
217584
|
+
}
|
|
217585
|
+
continue;
|
|
217586
|
+
}
|
|
217587
|
+
if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
|
|
217588
|
+
braces++;
|
|
217589
|
+
while (eos() !== true && (code = advance3())) {
|
|
217590
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
217591
|
+
backslashes = token.backslashes = true;
|
|
217592
|
+
advance3();
|
|
217593
|
+
continue;
|
|
217594
|
+
}
|
|
217595
|
+
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
217596
|
+
braces++;
|
|
217597
|
+
continue;
|
|
217598
|
+
}
|
|
217599
|
+
if (braceEscaped !== true && code === CHAR_DOT && (code = advance3()) === CHAR_DOT) {
|
|
217600
|
+
isBrace = token.isBrace = true;
|
|
217601
|
+
isGlob2 = token.isGlob = true;
|
|
217602
|
+
finished = true;
|
|
217603
|
+
if (scanToEnd === true) {
|
|
217604
|
+
continue;
|
|
217605
|
+
}
|
|
217606
|
+
break;
|
|
217607
|
+
}
|
|
217608
|
+
if (braceEscaped !== true && code === CHAR_COMMA) {
|
|
217609
|
+
isBrace = token.isBrace = true;
|
|
217610
|
+
isGlob2 = token.isGlob = true;
|
|
217611
|
+
finished = true;
|
|
217612
|
+
if (scanToEnd === true) {
|
|
217613
|
+
continue;
|
|
217614
|
+
}
|
|
217615
|
+
break;
|
|
217616
|
+
}
|
|
217617
|
+
if (code === CHAR_RIGHT_CURLY_BRACE) {
|
|
217618
|
+
braces--;
|
|
217619
|
+
if (braces === 0) {
|
|
217620
|
+
braceEscaped = false;
|
|
217621
|
+
isBrace = token.isBrace = true;
|
|
217622
|
+
finished = true;
|
|
217623
|
+
break;
|
|
217624
|
+
}
|
|
217625
|
+
}
|
|
217626
|
+
}
|
|
217627
|
+
if (scanToEnd === true) {
|
|
217628
|
+
continue;
|
|
217629
|
+
}
|
|
217630
|
+
break;
|
|
217631
|
+
}
|
|
217632
|
+
if (code === CHAR_FORWARD_SLASH) {
|
|
217633
|
+
slashes.push(index2);
|
|
217634
|
+
tokens.push(token);
|
|
217635
|
+
token = { value: "", depth: 0, isGlob: false };
|
|
217636
|
+
if (finished === true) continue;
|
|
217637
|
+
if (prev === CHAR_DOT && index2 === start + 1) {
|
|
217638
|
+
start += 2;
|
|
217639
|
+
continue;
|
|
217640
|
+
}
|
|
217641
|
+
lastIndex = index2 + 1;
|
|
217642
|
+
continue;
|
|
217643
|
+
}
|
|
217644
|
+
if (opts.noext !== true) {
|
|
217645
|
+
const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK;
|
|
217646
|
+
if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
|
|
217647
|
+
isGlob2 = token.isGlob = true;
|
|
217648
|
+
isExtglob = token.isExtglob = true;
|
|
217649
|
+
finished = true;
|
|
217650
|
+
if (code === CHAR_EXCLAMATION_MARK && index2 === start) {
|
|
217651
|
+
negatedExtglob = true;
|
|
217652
|
+
}
|
|
217653
|
+
if (scanToEnd === true) {
|
|
217654
|
+
while (eos() !== true && (code = advance3())) {
|
|
217655
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
217656
|
+
backslashes = token.backslashes = true;
|
|
217657
|
+
code = advance3();
|
|
217658
|
+
continue;
|
|
217659
|
+
}
|
|
217660
|
+
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
217661
|
+
isGlob2 = token.isGlob = true;
|
|
217662
|
+
finished = true;
|
|
217663
|
+
break;
|
|
217664
|
+
}
|
|
217665
|
+
}
|
|
217666
|
+
continue;
|
|
217667
|
+
}
|
|
217668
|
+
break;
|
|
217669
|
+
}
|
|
217670
|
+
}
|
|
217671
|
+
if (code === CHAR_ASTERISK) {
|
|
217672
|
+
if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
|
|
217673
|
+
isGlob2 = token.isGlob = true;
|
|
217674
|
+
finished = true;
|
|
217675
|
+
if (scanToEnd === true) {
|
|
217676
|
+
continue;
|
|
217677
|
+
}
|
|
217678
|
+
break;
|
|
217679
|
+
}
|
|
217680
|
+
if (code === CHAR_QUESTION_MARK) {
|
|
217681
|
+
isGlob2 = token.isGlob = true;
|
|
217682
|
+
finished = true;
|
|
217683
|
+
if (scanToEnd === true) {
|
|
217684
|
+
continue;
|
|
217685
|
+
}
|
|
217686
|
+
break;
|
|
217687
|
+
}
|
|
217688
|
+
if (code === CHAR_LEFT_SQUARE_BRACKET) {
|
|
217689
|
+
while (eos() !== true && (next = advance3())) {
|
|
217690
|
+
if (next === CHAR_BACKWARD_SLASH) {
|
|
217691
|
+
backslashes = token.backslashes = true;
|
|
217692
|
+
advance3();
|
|
217693
|
+
continue;
|
|
217694
|
+
}
|
|
217695
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
217696
|
+
isBracket = token.isBracket = true;
|
|
217697
|
+
isGlob2 = token.isGlob = true;
|
|
217698
|
+
finished = true;
|
|
217699
|
+
break;
|
|
217700
|
+
}
|
|
217701
|
+
}
|
|
217702
|
+
if (scanToEnd === true) {
|
|
217703
|
+
continue;
|
|
217704
|
+
}
|
|
217705
|
+
break;
|
|
217706
|
+
}
|
|
217707
|
+
if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index2 === start) {
|
|
217708
|
+
negated = token.negated = true;
|
|
217709
|
+
start++;
|
|
217710
|
+
continue;
|
|
217711
|
+
}
|
|
217712
|
+
if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
|
|
217713
|
+
isGlob2 = token.isGlob = true;
|
|
217714
|
+
if (scanToEnd === true) {
|
|
217715
|
+
while (eos() !== true && (code = advance3())) {
|
|
217716
|
+
if (code === CHAR_LEFT_PARENTHESES) {
|
|
217717
|
+
backslashes = token.backslashes = true;
|
|
217718
|
+
code = advance3();
|
|
217719
|
+
continue;
|
|
217720
|
+
}
|
|
217721
|
+
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
217722
|
+
finished = true;
|
|
217723
|
+
break;
|
|
217724
|
+
}
|
|
217725
|
+
}
|
|
217726
|
+
continue;
|
|
217727
|
+
}
|
|
217728
|
+
break;
|
|
217729
|
+
}
|
|
217730
|
+
if (isGlob2 === true) {
|
|
217731
|
+
finished = true;
|
|
217732
|
+
if (scanToEnd === true) {
|
|
217733
|
+
continue;
|
|
217734
|
+
}
|
|
217735
|
+
break;
|
|
217736
|
+
}
|
|
217737
|
+
}
|
|
217738
|
+
if (opts.noext === true) {
|
|
217739
|
+
isExtglob = false;
|
|
217740
|
+
isGlob2 = false;
|
|
217741
|
+
}
|
|
217742
|
+
let base2 = str;
|
|
217743
|
+
let prefix = "";
|
|
217744
|
+
let glob = "";
|
|
217745
|
+
if (start > 0) {
|
|
217746
|
+
prefix = str.slice(0, start);
|
|
217747
|
+
str = str.slice(start);
|
|
217748
|
+
lastIndex -= start;
|
|
217749
|
+
}
|
|
217750
|
+
if (base2 && isGlob2 === true && lastIndex > 0) {
|
|
217751
|
+
base2 = str.slice(0, lastIndex);
|
|
217752
|
+
glob = str.slice(lastIndex);
|
|
217753
|
+
} else if (isGlob2 === true) {
|
|
217754
|
+
base2 = "";
|
|
217755
|
+
glob = str;
|
|
217756
|
+
} else {
|
|
217757
|
+
base2 = str;
|
|
217758
|
+
}
|
|
217759
|
+
if (base2 && base2 !== "" && base2 !== "/" && base2 !== str) {
|
|
217760
|
+
if (isPathSeparator(base2.charCodeAt(base2.length - 1))) {
|
|
217761
|
+
base2 = base2.slice(0, -1);
|
|
217762
|
+
}
|
|
217763
|
+
}
|
|
217764
|
+
if (opts.unescape === true) {
|
|
217765
|
+
if (glob) glob = utils.removeBackslashes(glob);
|
|
217766
|
+
if (base2 && backslashes === true) {
|
|
217767
|
+
base2 = utils.removeBackslashes(base2);
|
|
217768
|
+
}
|
|
217769
|
+
}
|
|
217770
|
+
const state = {
|
|
217771
|
+
prefix,
|
|
217772
|
+
input,
|
|
217773
|
+
start,
|
|
217774
|
+
base: base2,
|
|
217775
|
+
glob,
|
|
217776
|
+
isBrace,
|
|
217777
|
+
isBracket,
|
|
217778
|
+
isGlob: isGlob2,
|
|
217779
|
+
isExtglob,
|
|
217780
|
+
isGlobstar,
|
|
217781
|
+
negated,
|
|
217782
|
+
negatedExtglob
|
|
217783
|
+
};
|
|
217784
|
+
if (opts.tokens === true) {
|
|
217785
|
+
state.maxDepth = 0;
|
|
217786
|
+
if (!isPathSeparator(code)) {
|
|
217787
|
+
tokens.push(token);
|
|
217788
|
+
}
|
|
217789
|
+
state.tokens = tokens;
|
|
217790
|
+
}
|
|
217791
|
+
if (opts.parts === true || opts.tokens === true) {
|
|
217792
|
+
let prevIndex;
|
|
217793
|
+
for (let idx = 0; idx < slashes.length; idx++) {
|
|
217794
|
+
const n3 = prevIndex ? prevIndex + 1 : start;
|
|
217795
|
+
const i = slashes[idx];
|
|
217796
|
+
const value = input.slice(n3, i);
|
|
217797
|
+
if (opts.tokens) {
|
|
217798
|
+
if (idx === 0 && start !== 0) {
|
|
217799
|
+
tokens[idx].isPrefix = true;
|
|
217800
|
+
tokens[idx].value = prefix;
|
|
217801
|
+
} else {
|
|
217802
|
+
tokens[idx].value = value;
|
|
217803
|
+
}
|
|
217804
|
+
depth(tokens[idx]);
|
|
217805
|
+
state.maxDepth += tokens[idx].depth;
|
|
217806
|
+
}
|
|
217807
|
+
if (idx !== 0 || value !== "") {
|
|
217808
|
+
parts.push(value);
|
|
217809
|
+
}
|
|
217810
|
+
prevIndex = i;
|
|
217811
|
+
}
|
|
217812
|
+
if (prevIndex && prevIndex + 1 < input.length) {
|
|
217813
|
+
const value = input.slice(prevIndex + 1);
|
|
217814
|
+
parts.push(value);
|
|
217815
|
+
if (opts.tokens) {
|
|
217816
|
+
tokens[tokens.length - 1].value = value;
|
|
217817
|
+
depth(tokens[tokens.length - 1]);
|
|
217818
|
+
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
217819
|
+
}
|
|
217820
|
+
}
|
|
217821
|
+
state.slashes = slashes;
|
|
217822
|
+
state.parts = parts;
|
|
217823
|
+
}
|
|
217824
|
+
return state;
|
|
217825
|
+
};
|
|
217826
|
+
module2.exports = scan;
|
|
217827
|
+
}
|
|
217828
|
+
});
|
|
217829
|
+
|
|
217830
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/lib/parse.js
|
|
217831
|
+
var require_parse2 = __commonJS({
|
|
217832
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/lib/parse.js"(exports2, module2) {
|
|
217833
|
+
"use strict";
|
|
217834
|
+
var constants = require_constants2();
|
|
217835
|
+
var utils = require_utils2();
|
|
217836
|
+
var {
|
|
217837
|
+
MAX_LENGTH,
|
|
217838
|
+
POSIX_REGEX_SOURCE,
|
|
217839
|
+
REGEX_NON_SPECIAL_CHARS,
|
|
217840
|
+
REGEX_SPECIAL_CHARS_BACKREF,
|
|
217841
|
+
REPLACEMENTS
|
|
217842
|
+
} = constants;
|
|
217843
|
+
var expandRange = (args, options) => {
|
|
217844
|
+
if (typeof options.expandRange === "function") {
|
|
217845
|
+
return options.expandRange(...args, options);
|
|
217846
|
+
}
|
|
217847
|
+
args.sort();
|
|
217848
|
+
const value = `[${args.join("-")}]`;
|
|
217849
|
+
try {
|
|
217850
|
+
new RegExp(value);
|
|
217851
|
+
} catch (ex) {
|
|
217852
|
+
return args.map((v) => utils.escapeRegex(v)).join("..");
|
|
217853
|
+
}
|
|
217854
|
+
return value;
|
|
217855
|
+
};
|
|
217856
|
+
var syntaxError = (type, char) => {
|
|
217857
|
+
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
217858
|
+
};
|
|
217859
|
+
var parse5 = (input, options) => {
|
|
217860
|
+
if (typeof input !== "string") {
|
|
217861
|
+
throw new TypeError("Expected a string");
|
|
217862
|
+
}
|
|
217863
|
+
input = REPLACEMENTS[input] || input;
|
|
217864
|
+
const opts = { ...options };
|
|
217865
|
+
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
217866
|
+
let len = input.length;
|
|
217867
|
+
if (len > max) {
|
|
217868
|
+
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
217869
|
+
}
|
|
217870
|
+
const bos = { type: "bos", value: "", output: opts.prepend || "" };
|
|
217871
|
+
const tokens = [bos];
|
|
217872
|
+
const capture = opts.capture ? "" : "?:";
|
|
217873
|
+
const PLATFORM_CHARS = constants.globChars(opts.windows);
|
|
217874
|
+
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
|
217875
|
+
const {
|
|
217876
|
+
DOT_LITERAL,
|
|
217877
|
+
PLUS_LITERAL,
|
|
217878
|
+
SLASH_LITERAL,
|
|
217879
|
+
ONE_CHAR,
|
|
217880
|
+
DOTS_SLASH,
|
|
217881
|
+
NO_DOT,
|
|
217882
|
+
NO_DOT_SLASH,
|
|
217883
|
+
NO_DOTS_SLASH,
|
|
217884
|
+
QMARK,
|
|
217885
|
+
QMARK_NO_DOT,
|
|
217886
|
+
STAR,
|
|
217887
|
+
START_ANCHOR
|
|
217888
|
+
} = PLATFORM_CHARS;
|
|
217889
|
+
const globstar = (opts2) => {
|
|
217890
|
+
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
217891
|
+
};
|
|
217892
|
+
const nodot = opts.dot ? "" : NO_DOT;
|
|
217893
|
+
const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
|
|
217894
|
+
let star3 = opts.bash === true ? globstar(opts) : STAR;
|
|
217895
|
+
if (opts.capture) {
|
|
217896
|
+
star3 = `(${star3})`;
|
|
217897
|
+
}
|
|
217898
|
+
if (typeof opts.noext === "boolean") {
|
|
217899
|
+
opts.noextglob = opts.noext;
|
|
217900
|
+
}
|
|
217901
|
+
const state = {
|
|
217902
|
+
input,
|
|
217903
|
+
index: -1,
|
|
217904
|
+
start: 0,
|
|
217905
|
+
dot: opts.dot === true,
|
|
217906
|
+
consumed: "",
|
|
217907
|
+
output: "",
|
|
217908
|
+
prefix: "",
|
|
217909
|
+
backtrack: false,
|
|
217910
|
+
negated: false,
|
|
217911
|
+
brackets: 0,
|
|
217912
|
+
braces: 0,
|
|
217913
|
+
parens: 0,
|
|
217914
|
+
quotes: 0,
|
|
217915
|
+
globstar: false,
|
|
217916
|
+
tokens
|
|
217917
|
+
};
|
|
217918
|
+
input = utils.removePrefix(input, state);
|
|
217919
|
+
len = input.length;
|
|
217920
|
+
const extglobs = [];
|
|
217921
|
+
const braces = [];
|
|
217922
|
+
const stack = [];
|
|
217923
|
+
let prev = bos;
|
|
217924
|
+
let value;
|
|
217925
|
+
const eos = () => state.index === len - 1;
|
|
217926
|
+
const peek = state.peek = (n3 = 1) => input[state.index + n3];
|
|
217927
|
+
const advance3 = state.advance = () => input[++state.index] || "";
|
|
217928
|
+
const remaining = () => input.slice(state.index + 1);
|
|
217929
|
+
const consume = (value2 = "", num = 0) => {
|
|
217930
|
+
state.consumed += value2;
|
|
217931
|
+
state.index += num;
|
|
217932
|
+
};
|
|
217933
|
+
const append4 = (token) => {
|
|
217934
|
+
state.output += token.output != null ? token.output : token.value;
|
|
217935
|
+
consume(token.value);
|
|
217936
|
+
};
|
|
217937
|
+
const negate = () => {
|
|
217938
|
+
let count = 1;
|
|
217939
|
+
while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
|
|
217940
|
+
advance3();
|
|
217941
|
+
state.start++;
|
|
217942
|
+
count++;
|
|
217943
|
+
}
|
|
217944
|
+
if (count % 2 === 0) {
|
|
217945
|
+
return false;
|
|
217946
|
+
}
|
|
217947
|
+
state.negated = true;
|
|
217948
|
+
state.start++;
|
|
217949
|
+
return true;
|
|
217950
|
+
};
|
|
217951
|
+
const increment = (type) => {
|
|
217952
|
+
state[type]++;
|
|
217953
|
+
stack.push(type);
|
|
217954
|
+
};
|
|
217955
|
+
const decrement = (type) => {
|
|
217956
|
+
state[type]--;
|
|
217957
|
+
stack.pop();
|
|
217958
|
+
};
|
|
217959
|
+
const push2 = (tok) => {
|
|
217960
|
+
if (prev.type === "globstar") {
|
|
217961
|
+
const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
|
|
217962
|
+
const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
|
|
217963
|
+
if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
|
|
217964
|
+
state.output = state.output.slice(0, -prev.output.length);
|
|
217965
|
+
prev.type = "star";
|
|
217966
|
+
prev.value = "*";
|
|
217967
|
+
prev.output = star3;
|
|
217968
|
+
state.output += prev.output;
|
|
217969
|
+
}
|
|
217970
|
+
}
|
|
217971
|
+
if (extglobs.length && tok.type !== "paren") {
|
|
217972
|
+
extglobs[extglobs.length - 1].inner += tok.value;
|
|
217973
|
+
}
|
|
217974
|
+
if (tok.value || tok.output) append4(tok);
|
|
217975
|
+
if (prev && prev.type === "text" && tok.type === "text") {
|
|
217976
|
+
prev.output = (prev.output || prev.value) + tok.value;
|
|
217977
|
+
prev.value += tok.value;
|
|
217978
|
+
return;
|
|
217979
|
+
}
|
|
217980
|
+
tok.prev = prev;
|
|
217981
|
+
tokens.push(tok);
|
|
217982
|
+
prev = tok;
|
|
217983
|
+
};
|
|
217984
|
+
const extglobOpen = (type, value2) => {
|
|
217985
|
+
const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
|
|
217986
|
+
token.prev = prev;
|
|
217987
|
+
token.parens = state.parens;
|
|
217988
|
+
token.output = state.output;
|
|
217989
|
+
const output = (opts.capture ? "(" : "") + token.open;
|
|
217990
|
+
increment("parens");
|
|
217991
|
+
push2({ type, value: value2, output: state.output ? "" : ONE_CHAR });
|
|
217992
|
+
push2({ type: "paren", extglob: true, value: advance3(), output });
|
|
217993
|
+
extglobs.push(token);
|
|
217994
|
+
};
|
|
217995
|
+
const extglobClose = (token) => {
|
|
217996
|
+
let output = token.close + (opts.capture ? ")" : "");
|
|
217997
|
+
let rest;
|
|
217998
|
+
if (token.type === "negate") {
|
|
217999
|
+
let extglobStar = star3;
|
|
218000
|
+
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
|
|
218001
|
+
extglobStar = globstar(opts);
|
|
218002
|
+
}
|
|
218003
|
+
if (extglobStar !== star3 || eos() || /^\)+$/.test(remaining())) {
|
|
218004
|
+
output = token.close = `)$))${extglobStar}`;
|
|
218005
|
+
}
|
|
218006
|
+
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
218007
|
+
const expression = parse5(rest, { ...options, fastpaths: false }).output;
|
|
218008
|
+
output = token.close = `)${expression})${extglobStar})`;
|
|
218009
|
+
}
|
|
218010
|
+
if (token.prev.type === "bos") {
|
|
218011
|
+
state.negatedExtglob = true;
|
|
218012
|
+
}
|
|
218013
|
+
}
|
|
218014
|
+
push2({ type: "paren", extglob: true, value, output });
|
|
218015
|
+
decrement("parens");
|
|
218016
|
+
};
|
|
218017
|
+
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
218018
|
+
let backslashes = false;
|
|
218019
|
+
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars3, first, rest, index2) => {
|
|
218020
|
+
if (first === "\\") {
|
|
218021
|
+
backslashes = true;
|
|
218022
|
+
return m;
|
|
218023
|
+
}
|
|
218024
|
+
if (first === "?") {
|
|
218025
|
+
if (esc) {
|
|
218026
|
+
return esc + first + (rest ? QMARK.repeat(rest.length) : "");
|
|
218027
|
+
}
|
|
218028
|
+
if (index2 === 0) {
|
|
218029
|
+
return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
|
|
218030
|
+
}
|
|
218031
|
+
return QMARK.repeat(chars3.length);
|
|
218032
|
+
}
|
|
218033
|
+
if (first === ".") {
|
|
218034
|
+
return DOT_LITERAL.repeat(chars3.length);
|
|
218035
|
+
}
|
|
218036
|
+
if (first === "*") {
|
|
218037
|
+
if (esc) {
|
|
218038
|
+
return esc + first + (rest ? star3 : "");
|
|
218039
|
+
}
|
|
218040
|
+
return star3;
|
|
218041
|
+
}
|
|
218042
|
+
return esc ? m : `\\${m}`;
|
|
218043
|
+
});
|
|
218044
|
+
if (backslashes === true) {
|
|
218045
|
+
if (opts.unescape === true) {
|
|
218046
|
+
output = output.replace(/\\/g, "");
|
|
218047
|
+
} else {
|
|
218048
|
+
output = output.replace(/\\+/g, (m) => {
|
|
218049
|
+
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
218050
|
+
});
|
|
218051
|
+
}
|
|
218052
|
+
}
|
|
218053
|
+
if (output === input && opts.contains === true) {
|
|
218054
|
+
state.output = input;
|
|
218055
|
+
return state;
|
|
218056
|
+
}
|
|
218057
|
+
state.output = utils.wrapOutput(output, state, options);
|
|
218058
|
+
return state;
|
|
218059
|
+
}
|
|
218060
|
+
while (!eos()) {
|
|
218061
|
+
value = advance3();
|
|
218062
|
+
if (value === "\0") {
|
|
218063
|
+
continue;
|
|
218064
|
+
}
|
|
218065
|
+
if (value === "\\") {
|
|
218066
|
+
const next = peek();
|
|
218067
|
+
if (next === "/" && opts.bash !== true) {
|
|
218068
|
+
continue;
|
|
218069
|
+
}
|
|
218070
|
+
if (next === "." || next === ";") {
|
|
218071
|
+
continue;
|
|
218072
|
+
}
|
|
218073
|
+
if (!next) {
|
|
218074
|
+
value += "\\";
|
|
218075
|
+
push2({ type: "text", value });
|
|
218076
|
+
continue;
|
|
218077
|
+
}
|
|
218078
|
+
const match2 = /^\\+/.exec(remaining());
|
|
218079
|
+
let slashes = 0;
|
|
218080
|
+
if (match2 && match2[0].length > 2) {
|
|
218081
|
+
slashes = match2[0].length;
|
|
218082
|
+
state.index += slashes;
|
|
218083
|
+
if (slashes % 2 !== 0) {
|
|
218084
|
+
value += "\\";
|
|
218085
|
+
}
|
|
218086
|
+
}
|
|
218087
|
+
if (opts.unescape === true) {
|
|
218088
|
+
value = advance3();
|
|
218089
|
+
} else {
|
|
218090
|
+
value += advance3();
|
|
218091
|
+
}
|
|
218092
|
+
if (state.brackets === 0) {
|
|
218093
|
+
push2({ type: "text", value });
|
|
218094
|
+
continue;
|
|
218095
|
+
}
|
|
218096
|
+
}
|
|
218097
|
+
if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
|
|
218098
|
+
if (opts.posix !== false && value === ":") {
|
|
218099
|
+
const inner = prev.value.slice(1);
|
|
218100
|
+
if (inner.includes("[")) {
|
|
218101
|
+
prev.posix = true;
|
|
218102
|
+
if (inner.includes(":")) {
|
|
218103
|
+
const idx = prev.value.lastIndexOf("[");
|
|
218104
|
+
const pre = prev.value.slice(0, idx);
|
|
218105
|
+
const rest2 = prev.value.slice(idx + 2);
|
|
218106
|
+
const posix3 = POSIX_REGEX_SOURCE[rest2];
|
|
218107
|
+
if (posix3) {
|
|
218108
|
+
prev.value = pre + posix3;
|
|
218109
|
+
state.backtrack = true;
|
|
218110
|
+
advance3();
|
|
218111
|
+
if (!bos.output && tokens.indexOf(prev) === 1) {
|
|
218112
|
+
bos.output = ONE_CHAR;
|
|
218113
|
+
}
|
|
218114
|
+
continue;
|
|
218115
|
+
}
|
|
218116
|
+
}
|
|
218117
|
+
}
|
|
218118
|
+
}
|
|
218119
|
+
if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") {
|
|
218120
|
+
value = `\\${value}`;
|
|
218121
|
+
}
|
|
218122
|
+
if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
|
|
218123
|
+
value = `\\${value}`;
|
|
218124
|
+
}
|
|
218125
|
+
if (opts.posix === true && value === "!" && prev.value === "[") {
|
|
218126
|
+
value = "^";
|
|
218127
|
+
}
|
|
218128
|
+
prev.value += value;
|
|
218129
|
+
append4({ value });
|
|
218130
|
+
continue;
|
|
218131
|
+
}
|
|
218132
|
+
if (state.quotes === 1 && value !== '"') {
|
|
218133
|
+
value = utils.escapeRegex(value);
|
|
218134
|
+
prev.value += value;
|
|
218135
|
+
append4({ value });
|
|
218136
|
+
continue;
|
|
218137
|
+
}
|
|
218138
|
+
if (value === '"') {
|
|
218139
|
+
state.quotes = state.quotes === 1 ? 0 : 1;
|
|
218140
|
+
if (opts.keepQuotes === true) {
|
|
218141
|
+
push2({ type: "text", value });
|
|
218142
|
+
}
|
|
218143
|
+
continue;
|
|
218144
|
+
}
|
|
218145
|
+
if (value === "(") {
|
|
218146
|
+
increment("parens");
|
|
218147
|
+
push2({ type: "paren", value });
|
|
218148
|
+
continue;
|
|
218149
|
+
}
|
|
218150
|
+
if (value === ")") {
|
|
218151
|
+
if (state.parens === 0 && opts.strictBrackets === true) {
|
|
218152
|
+
throw new SyntaxError(syntaxError("opening", "("));
|
|
218153
|
+
}
|
|
218154
|
+
const extglob = extglobs[extglobs.length - 1];
|
|
218155
|
+
if (extglob && state.parens === extglob.parens + 1) {
|
|
218156
|
+
extglobClose(extglobs.pop());
|
|
218157
|
+
continue;
|
|
218158
|
+
}
|
|
218159
|
+
push2({ type: "paren", value, output: state.parens ? ")" : "\\)" });
|
|
218160
|
+
decrement("parens");
|
|
218161
|
+
continue;
|
|
218162
|
+
}
|
|
218163
|
+
if (value === "[") {
|
|
218164
|
+
if (opts.nobracket === true || !remaining().includes("]")) {
|
|
218165
|
+
if (opts.nobracket !== true && opts.strictBrackets === true) {
|
|
218166
|
+
throw new SyntaxError(syntaxError("closing", "]"));
|
|
218167
|
+
}
|
|
218168
|
+
value = `\\${value}`;
|
|
218169
|
+
} else {
|
|
218170
|
+
increment("brackets");
|
|
218171
|
+
}
|
|
218172
|
+
push2({ type: "bracket", value });
|
|
218173
|
+
continue;
|
|
218174
|
+
}
|
|
218175
|
+
if (value === "]") {
|
|
218176
|
+
if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
|
|
218177
|
+
push2({ type: "text", value, output: `\\${value}` });
|
|
218178
|
+
continue;
|
|
218179
|
+
}
|
|
218180
|
+
if (state.brackets === 0) {
|
|
218181
|
+
if (opts.strictBrackets === true) {
|
|
218182
|
+
throw new SyntaxError(syntaxError("opening", "["));
|
|
218183
|
+
}
|
|
218184
|
+
push2({ type: "text", value, output: `\\${value}` });
|
|
218185
|
+
continue;
|
|
218186
|
+
}
|
|
218187
|
+
decrement("brackets");
|
|
218188
|
+
const prevValue = prev.value.slice(1);
|
|
218189
|
+
if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) {
|
|
218190
|
+
value = `/${value}`;
|
|
218191
|
+
}
|
|
218192
|
+
prev.value += value;
|
|
218193
|
+
append4({ value });
|
|
218194
|
+
if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
|
|
218195
|
+
continue;
|
|
218196
|
+
}
|
|
218197
|
+
const escaped = utils.escapeRegex(prev.value);
|
|
218198
|
+
state.output = state.output.slice(0, -prev.value.length);
|
|
218199
|
+
if (opts.literalBrackets === true) {
|
|
218200
|
+
state.output += escaped;
|
|
218201
|
+
prev.value = escaped;
|
|
218202
|
+
continue;
|
|
218203
|
+
}
|
|
218204
|
+
prev.value = `(${capture}${escaped}|${prev.value})`;
|
|
218205
|
+
state.output += prev.value;
|
|
218206
|
+
continue;
|
|
218207
|
+
}
|
|
218208
|
+
if (value === "{" && opts.nobrace !== true) {
|
|
218209
|
+
increment("braces");
|
|
218210
|
+
const open = {
|
|
218211
|
+
type: "brace",
|
|
218212
|
+
value,
|
|
218213
|
+
output: "(",
|
|
218214
|
+
outputIndex: state.output.length,
|
|
218215
|
+
tokensIndex: state.tokens.length
|
|
218216
|
+
};
|
|
218217
|
+
braces.push(open);
|
|
218218
|
+
push2(open);
|
|
218219
|
+
continue;
|
|
218220
|
+
}
|
|
218221
|
+
if (value === "}") {
|
|
218222
|
+
const brace = braces[braces.length - 1];
|
|
218223
|
+
if (opts.nobrace === true || !brace) {
|
|
218224
|
+
push2({ type: "text", value, output: value });
|
|
218225
|
+
continue;
|
|
218226
|
+
}
|
|
218227
|
+
let output = ")";
|
|
218228
|
+
if (brace.dots === true) {
|
|
218229
|
+
const arr = tokens.slice();
|
|
218230
|
+
const range = [];
|
|
218231
|
+
for (let i = arr.length - 1; i >= 0; i--) {
|
|
218232
|
+
tokens.pop();
|
|
218233
|
+
if (arr[i].type === "brace") {
|
|
218234
|
+
break;
|
|
218235
|
+
}
|
|
218236
|
+
if (arr[i].type !== "dots") {
|
|
218237
|
+
range.unshift(arr[i].value);
|
|
218238
|
+
}
|
|
218239
|
+
}
|
|
218240
|
+
output = expandRange(range, opts);
|
|
218241
|
+
state.backtrack = true;
|
|
218242
|
+
}
|
|
218243
|
+
if (brace.comma !== true && brace.dots !== true) {
|
|
218244
|
+
const out = state.output.slice(0, brace.outputIndex);
|
|
218245
|
+
const toks = state.tokens.slice(brace.tokensIndex);
|
|
218246
|
+
brace.value = brace.output = "\\{";
|
|
218247
|
+
value = output = "\\}";
|
|
218248
|
+
state.output = out;
|
|
218249
|
+
for (const t of toks) {
|
|
218250
|
+
state.output += t.output || t.value;
|
|
218251
|
+
}
|
|
218252
|
+
}
|
|
218253
|
+
push2({ type: "brace", value, output });
|
|
218254
|
+
decrement("braces");
|
|
218255
|
+
braces.pop();
|
|
218256
|
+
continue;
|
|
218257
|
+
}
|
|
218258
|
+
if (value === "|") {
|
|
218259
|
+
if (extglobs.length > 0) {
|
|
218260
|
+
extglobs[extglobs.length - 1].conditions++;
|
|
218261
|
+
}
|
|
218262
|
+
push2({ type: "text", value });
|
|
218263
|
+
continue;
|
|
218264
|
+
}
|
|
218265
|
+
if (value === ",") {
|
|
218266
|
+
let output = value;
|
|
218267
|
+
const brace = braces[braces.length - 1];
|
|
218268
|
+
if (brace && stack[stack.length - 1] === "braces") {
|
|
218269
|
+
brace.comma = true;
|
|
218270
|
+
output = "|";
|
|
218271
|
+
}
|
|
218272
|
+
push2({ type: "comma", value, output });
|
|
218273
|
+
continue;
|
|
218274
|
+
}
|
|
218275
|
+
if (value === "/") {
|
|
218276
|
+
if (prev.type === "dot" && state.index === state.start + 1) {
|
|
218277
|
+
state.start = state.index + 1;
|
|
218278
|
+
state.consumed = "";
|
|
218279
|
+
state.output = "";
|
|
218280
|
+
tokens.pop();
|
|
218281
|
+
prev = bos;
|
|
218282
|
+
continue;
|
|
218283
|
+
}
|
|
218284
|
+
push2({ type: "slash", value, output: SLASH_LITERAL });
|
|
218285
|
+
continue;
|
|
218286
|
+
}
|
|
218287
|
+
if (value === ".") {
|
|
218288
|
+
if (state.braces > 0 && prev.type === "dot") {
|
|
218289
|
+
if (prev.value === ".") prev.output = DOT_LITERAL;
|
|
218290
|
+
const brace = braces[braces.length - 1];
|
|
218291
|
+
prev.type = "dots";
|
|
218292
|
+
prev.output += value;
|
|
218293
|
+
prev.value += value;
|
|
218294
|
+
brace.dots = true;
|
|
218295
|
+
continue;
|
|
218296
|
+
}
|
|
218297
|
+
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
|
|
218298
|
+
push2({ type: "text", value, output: DOT_LITERAL });
|
|
218299
|
+
continue;
|
|
218300
|
+
}
|
|
218301
|
+
push2({ type: "dot", value, output: DOT_LITERAL });
|
|
218302
|
+
continue;
|
|
218303
|
+
}
|
|
218304
|
+
if (value === "?") {
|
|
218305
|
+
const isGroup = prev && prev.value === "(";
|
|
218306
|
+
if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
218307
|
+
extglobOpen("qmark", value);
|
|
218308
|
+
continue;
|
|
218309
|
+
}
|
|
218310
|
+
if (prev && prev.type === "paren") {
|
|
218311
|
+
const next = peek();
|
|
218312
|
+
let output = value;
|
|
218313
|
+
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
218314
|
+
output = `\\${value}`;
|
|
218315
|
+
}
|
|
218316
|
+
push2({ type: "text", value, output });
|
|
218317
|
+
continue;
|
|
218318
|
+
}
|
|
218319
|
+
if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
|
|
218320
|
+
push2({ type: "qmark", value, output: QMARK_NO_DOT });
|
|
218321
|
+
continue;
|
|
218322
|
+
}
|
|
218323
|
+
push2({ type: "qmark", value, output: QMARK });
|
|
218324
|
+
continue;
|
|
218325
|
+
}
|
|
218326
|
+
if (value === "!") {
|
|
218327
|
+
if (opts.noextglob !== true && peek() === "(") {
|
|
218328
|
+
if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
|
|
218329
|
+
extglobOpen("negate", value);
|
|
218330
|
+
continue;
|
|
218331
|
+
}
|
|
218332
|
+
}
|
|
218333
|
+
if (opts.nonegate !== true && state.index === 0) {
|
|
218334
|
+
negate();
|
|
218335
|
+
continue;
|
|
218336
|
+
}
|
|
218337
|
+
}
|
|
218338
|
+
if (value === "+") {
|
|
218339
|
+
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
218340
|
+
extglobOpen("plus", value);
|
|
218341
|
+
continue;
|
|
218342
|
+
}
|
|
218343
|
+
if (prev && prev.value === "(" || opts.regex === false) {
|
|
218344
|
+
push2({ type: "plus", value, output: PLUS_LITERAL });
|
|
218345
|
+
continue;
|
|
218346
|
+
}
|
|
218347
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
|
|
218348
|
+
push2({ type: "plus", value });
|
|
218349
|
+
continue;
|
|
218350
|
+
}
|
|
218351
|
+
push2({ type: "plus", value: PLUS_LITERAL });
|
|
218352
|
+
continue;
|
|
218353
|
+
}
|
|
218354
|
+
if (value === "@") {
|
|
218355
|
+
if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
218356
|
+
push2({ type: "at", extglob: true, value, output: "" });
|
|
218357
|
+
continue;
|
|
218358
|
+
}
|
|
218359
|
+
push2({ type: "text", value });
|
|
218360
|
+
continue;
|
|
218361
|
+
}
|
|
218362
|
+
if (value !== "*") {
|
|
218363
|
+
if (value === "$" || value === "^") {
|
|
218364
|
+
value = `\\${value}`;
|
|
218365
|
+
}
|
|
218366
|
+
const match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
218367
|
+
if (match2) {
|
|
218368
|
+
value += match2[0];
|
|
218369
|
+
state.index += match2[0].length;
|
|
218370
|
+
}
|
|
218371
|
+
push2({ type: "text", value });
|
|
218372
|
+
continue;
|
|
218373
|
+
}
|
|
218374
|
+
if (prev && (prev.type === "globstar" || prev.star === true)) {
|
|
218375
|
+
prev.type = "star";
|
|
218376
|
+
prev.star = true;
|
|
218377
|
+
prev.value += value;
|
|
218378
|
+
prev.output = star3;
|
|
218379
|
+
state.backtrack = true;
|
|
218380
|
+
state.globstar = true;
|
|
218381
|
+
consume(value);
|
|
218382
|
+
continue;
|
|
218383
|
+
}
|
|
218384
|
+
let rest = remaining();
|
|
218385
|
+
if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
|
|
218386
|
+
extglobOpen("star", value);
|
|
218387
|
+
continue;
|
|
218388
|
+
}
|
|
218389
|
+
if (prev.type === "star") {
|
|
218390
|
+
if (opts.noglobstar === true) {
|
|
218391
|
+
consume(value);
|
|
218392
|
+
continue;
|
|
218393
|
+
}
|
|
218394
|
+
const prior = prev.prev;
|
|
218395
|
+
const before = prior.prev;
|
|
218396
|
+
const isStart = prior.type === "slash" || prior.type === "bos";
|
|
218397
|
+
const afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
218398
|
+
if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
|
|
218399
|
+
push2({ type: "star", value, output: "" });
|
|
218400
|
+
continue;
|
|
218401
|
+
}
|
|
218402
|
+
const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
|
|
218403
|
+
const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
|
|
218404
|
+
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
|
|
218405
|
+
push2({ type: "star", value, output: "" });
|
|
218406
|
+
continue;
|
|
218407
|
+
}
|
|
218408
|
+
while (rest.slice(0, 3) === "/**") {
|
|
218409
|
+
const after = input[state.index + 4];
|
|
218410
|
+
if (after && after !== "/") {
|
|
218411
|
+
break;
|
|
218412
|
+
}
|
|
218413
|
+
rest = rest.slice(3);
|
|
218414
|
+
consume("/**", 3);
|
|
218415
|
+
}
|
|
218416
|
+
if (prior.type === "bos" && eos()) {
|
|
218417
|
+
prev.type = "globstar";
|
|
218418
|
+
prev.value += value;
|
|
218419
|
+
prev.output = globstar(opts);
|
|
218420
|
+
state.output = prev.output;
|
|
218421
|
+
state.globstar = true;
|
|
218422
|
+
consume(value);
|
|
218423
|
+
continue;
|
|
218424
|
+
}
|
|
218425
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
|
|
218426
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
218427
|
+
prior.output = `(?:${prior.output}`;
|
|
218428
|
+
prev.type = "globstar";
|
|
218429
|
+
prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
|
|
218430
|
+
prev.value += value;
|
|
218431
|
+
state.globstar = true;
|
|
218432
|
+
state.output += prior.output + prev.output;
|
|
218433
|
+
consume(value);
|
|
218434
|
+
continue;
|
|
218435
|
+
}
|
|
218436
|
+
if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
|
|
218437
|
+
const end = rest[1] !== void 0 ? "|$" : "";
|
|
218438
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
218439
|
+
prior.output = `(?:${prior.output}`;
|
|
218440
|
+
prev.type = "globstar";
|
|
218441
|
+
prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
|
|
218442
|
+
prev.value += value;
|
|
218443
|
+
state.output += prior.output + prev.output;
|
|
218444
|
+
state.globstar = true;
|
|
218445
|
+
consume(value + advance3());
|
|
218446
|
+
push2({ type: "slash", value: "/", output: "" });
|
|
218447
|
+
continue;
|
|
218448
|
+
}
|
|
218449
|
+
if (prior.type === "bos" && rest[0] === "/") {
|
|
218450
|
+
prev.type = "globstar";
|
|
218451
|
+
prev.value += value;
|
|
218452
|
+
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
|
|
218453
|
+
state.output = prev.output;
|
|
218454
|
+
state.globstar = true;
|
|
218455
|
+
consume(value + advance3());
|
|
218456
|
+
push2({ type: "slash", value: "/", output: "" });
|
|
218457
|
+
continue;
|
|
218458
|
+
}
|
|
218459
|
+
state.output = state.output.slice(0, -prev.output.length);
|
|
218460
|
+
prev.type = "globstar";
|
|
218461
|
+
prev.output = globstar(opts);
|
|
218462
|
+
prev.value += value;
|
|
218463
|
+
state.output += prev.output;
|
|
218464
|
+
state.globstar = true;
|
|
218465
|
+
consume(value);
|
|
218466
|
+
continue;
|
|
218467
|
+
}
|
|
218468
|
+
const token = { type: "star", value, output: star3 };
|
|
218469
|
+
if (opts.bash === true) {
|
|
218470
|
+
token.output = ".*?";
|
|
218471
|
+
if (prev.type === "bos" || prev.type === "slash") {
|
|
218472
|
+
token.output = nodot + token.output;
|
|
218473
|
+
}
|
|
218474
|
+
push2(token);
|
|
218475
|
+
continue;
|
|
218476
|
+
}
|
|
218477
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
|
|
218478
|
+
token.output = value;
|
|
218479
|
+
push2(token);
|
|
218480
|
+
continue;
|
|
218481
|
+
}
|
|
218482
|
+
if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
|
|
218483
|
+
if (prev.type === "dot") {
|
|
218484
|
+
state.output += NO_DOT_SLASH;
|
|
218485
|
+
prev.output += NO_DOT_SLASH;
|
|
218486
|
+
} else if (opts.dot === true) {
|
|
218487
|
+
state.output += NO_DOTS_SLASH;
|
|
218488
|
+
prev.output += NO_DOTS_SLASH;
|
|
218489
|
+
} else {
|
|
218490
|
+
state.output += nodot;
|
|
218491
|
+
prev.output += nodot;
|
|
218492
|
+
}
|
|
218493
|
+
if (peek() !== "*") {
|
|
218494
|
+
state.output += ONE_CHAR;
|
|
218495
|
+
prev.output += ONE_CHAR;
|
|
218496
|
+
}
|
|
218497
|
+
}
|
|
218498
|
+
push2(token);
|
|
218499
|
+
}
|
|
218500
|
+
while (state.brackets > 0) {
|
|
218501
|
+
if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
218502
|
+
state.output = utils.escapeLast(state.output, "[");
|
|
218503
|
+
decrement("brackets");
|
|
218504
|
+
}
|
|
218505
|
+
while (state.parens > 0) {
|
|
218506
|
+
if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
|
|
218507
|
+
state.output = utils.escapeLast(state.output, "(");
|
|
218508
|
+
decrement("parens");
|
|
218509
|
+
}
|
|
218510
|
+
while (state.braces > 0) {
|
|
218511
|
+
if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
|
|
218512
|
+
state.output = utils.escapeLast(state.output, "{");
|
|
218513
|
+
decrement("braces");
|
|
218514
|
+
}
|
|
218515
|
+
if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) {
|
|
218516
|
+
push2({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` });
|
|
218517
|
+
}
|
|
218518
|
+
if (state.backtrack === true) {
|
|
218519
|
+
state.output = "";
|
|
218520
|
+
for (const token of state.tokens) {
|
|
218521
|
+
state.output += token.output != null ? token.output : token.value;
|
|
218522
|
+
if (token.suffix) {
|
|
218523
|
+
state.output += token.suffix;
|
|
218524
|
+
}
|
|
218525
|
+
}
|
|
218526
|
+
}
|
|
218527
|
+
return state;
|
|
218528
|
+
};
|
|
218529
|
+
parse5.fastpaths = (input, options) => {
|
|
218530
|
+
const opts = { ...options };
|
|
218531
|
+
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
218532
|
+
const len = input.length;
|
|
218533
|
+
if (len > max) {
|
|
218534
|
+
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
218535
|
+
}
|
|
218536
|
+
input = REPLACEMENTS[input] || input;
|
|
218537
|
+
const {
|
|
218538
|
+
DOT_LITERAL,
|
|
218539
|
+
SLASH_LITERAL,
|
|
218540
|
+
ONE_CHAR,
|
|
218541
|
+
DOTS_SLASH,
|
|
218542
|
+
NO_DOT,
|
|
218543
|
+
NO_DOTS,
|
|
218544
|
+
NO_DOTS_SLASH,
|
|
218545
|
+
STAR,
|
|
218546
|
+
START_ANCHOR
|
|
218547
|
+
} = constants.globChars(opts.windows);
|
|
218548
|
+
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
218549
|
+
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
218550
|
+
const capture = opts.capture ? "" : "?:";
|
|
218551
|
+
const state = { negated: false, prefix: "" };
|
|
218552
|
+
let star3 = opts.bash === true ? ".*?" : STAR;
|
|
218553
|
+
if (opts.capture) {
|
|
218554
|
+
star3 = `(${star3})`;
|
|
218555
|
+
}
|
|
218556
|
+
const globstar = (opts2) => {
|
|
218557
|
+
if (opts2.noglobstar === true) return star3;
|
|
218558
|
+
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
218559
|
+
};
|
|
218560
|
+
const create = (str) => {
|
|
218561
|
+
switch (str) {
|
|
218562
|
+
case "*":
|
|
218563
|
+
return `${nodot}${ONE_CHAR}${star3}`;
|
|
218564
|
+
case ".*":
|
|
218565
|
+
return `${DOT_LITERAL}${ONE_CHAR}${star3}`;
|
|
218566
|
+
case "*.*":
|
|
218567
|
+
return `${nodot}${star3}${DOT_LITERAL}${ONE_CHAR}${star3}`;
|
|
218568
|
+
case "*/*":
|
|
218569
|
+
return `${nodot}${star3}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star3}`;
|
|
218570
|
+
case "**":
|
|
218571
|
+
return nodot + globstar(opts);
|
|
218572
|
+
case "**/*":
|
|
218573
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star3}`;
|
|
218574
|
+
case "**/*.*":
|
|
218575
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star3}${DOT_LITERAL}${ONE_CHAR}${star3}`;
|
|
218576
|
+
case "**/.*":
|
|
218577
|
+
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star3}`;
|
|
218578
|
+
default: {
|
|
218579
|
+
const match2 = /^(.*?)\.(\w+)$/.exec(str);
|
|
218580
|
+
if (!match2) return;
|
|
218581
|
+
const source2 = create(match2[1]);
|
|
218582
|
+
if (!source2) return;
|
|
218583
|
+
return source2 + DOT_LITERAL + match2[2];
|
|
218584
|
+
}
|
|
218585
|
+
}
|
|
218586
|
+
};
|
|
218587
|
+
const output = utils.removePrefix(input, state);
|
|
218588
|
+
let source = create(output);
|
|
218589
|
+
if (source && opts.strictSlashes !== true) {
|
|
218590
|
+
source += `${SLASH_LITERAL}?`;
|
|
218591
|
+
}
|
|
218592
|
+
return source;
|
|
218593
|
+
};
|
|
218594
|
+
module2.exports = parse5;
|
|
218595
|
+
}
|
|
218596
|
+
});
|
|
218597
|
+
|
|
218598
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/lib/picomatch.js
|
|
218599
|
+
var require_picomatch3 = __commonJS({
|
|
218600
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
218601
|
+
"use strict";
|
|
218602
|
+
var scan = require_scan2();
|
|
218603
|
+
var parse5 = require_parse2();
|
|
218604
|
+
var utils = require_utils2();
|
|
218605
|
+
var constants = require_constants2();
|
|
218606
|
+
var isObject4 = (val) => val && typeof val === "object" && !Array.isArray(val);
|
|
218607
|
+
var picomatch = (glob, options, returnState = false) => {
|
|
218608
|
+
if (Array.isArray(glob)) {
|
|
218609
|
+
const fns = glob.map((input) => picomatch(input, options, returnState));
|
|
218610
|
+
const arrayMatcher = (str) => {
|
|
218611
|
+
for (const isMatch of fns) {
|
|
218612
|
+
const state2 = isMatch(str);
|
|
218613
|
+
if (state2) return state2;
|
|
218614
|
+
}
|
|
218615
|
+
return false;
|
|
218616
|
+
};
|
|
218617
|
+
return arrayMatcher;
|
|
218618
|
+
}
|
|
218619
|
+
const isState = isObject4(glob) && glob.tokens && glob.input;
|
|
218620
|
+
if (glob === "" || typeof glob !== "string" && !isState) {
|
|
218621
|
+
throw new TypeError("Expected pattern to be a non-empty string");
|
|
218622
|
+
}
|
|
218623
|
+
const opts = options || {};
|
|
218624
|
+
const posix3 = opts.windows;
|
|
218625
|
+
const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
218626
|
+
const state = regex.state;
|
|
218627
|
+
delete regex.state;
|
|
218628
|
+
let isIgnored = () => false;
|
|
218629
|
+
if (opts.ignore) {
|
|
218630
|
+
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
218631
|
+
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
218632
|
+
}
|
|
218633
|
+
const matcher = (input, returnObject = false) => {
|
|
218634
|
+
const { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix: posix3 });
|
|
218635
|
+
const result2 = { glob, state, regex, posix: posix3, input, output, match: match2, isMatch };
|
|
218636
|
+
if (typeof opts.onResult === "function") {
|
|
218637
|
+
opts.onResult(result2);
|
|
218638
|
+
}
|
|
218639
|
+
if (isMatch === false) {
|
|
218640
|
+
result2.isMatch = false;
|
|
218641
|
+
return returnObject ? result2 : false;
|
|
218642
|
+
}
|
|
218643
|
+
if (isIgnored(input)) {
|
|
218644
|
+
if (typeof opts.onIgnore === "function") {
|
|
218645
|
+
opts.onIgnore(result2);
|
|
218646
|
+
}
|
|
218647
|
+
result2.isMatch = false;
|
|
218648
|
+
return returnObject ? result2 : false;
|
|
218649
|
+
}
|
|
218650
|
+
if (typeof opts.onMatch === "function") {
|
|
218651
|
+
opts.onMatch(result2);
|
|
218652
|
+
}
|
|
218653
|
+
return returnObject ? result2 : true;
|
|
218654
|
+
};
|
|
218655
|
+
if (returnState) {
|
|
218656
|
+
matcher.state = state;
|
|
218657
|
+
}
|
|
218658
|
+
return matcher;
|
|
218659
|
+
};
|
|
218660
|
+
picomatch.test = (input, regex, options, { glob, posix: posix3 } = {}) => {
|
|
218661
|
+
if (typeof input !== "string") {
|
|
218662
|
+
throw new TypeError("Expected input to be a string");
|
|
218663
|
+
}
|
|
218664
|
+
if (input === "") {
|
|
218665
|
+
return { isMatch: false, output: "" };
|
|
218666
|
+
}
|
|
218667
|
+
const opts = options || {};
|
|
218668
|
+
const format = opts.format || (posix3 ? utils.toPosixSlashes : null);
|
|
218669
|
+
let match2 = input === glob;
|
|
218670
|
+
let output = match2 && format ? format(input) : input;
|
|
218671
|
+
if (match2 === false) {
|
|
218672
|
+
output = format ? format(input) : input;
|
|
218673
|
+
match2 = output === glob;
|
|
218674
|
+
}
|
|
218675
|
+
if (match2 === false || opts.capture === true) {
|
|
218676
|
+
if (opts.matchBase === true || opts.basename === true) {
|
|
218677
|
+
match2 = picomatch.matchBase(input, regex, options, posix3);
|
|
218678
|
+
} else {
|
|
218679
|
+
match2 = regex.exec(output);
|
|
218680
|
+
}
|
|
218681
|
+
}
|
|
218682
|
+
return { isMatch: Boolean(match2), match: match2, output };
|
|
218683
|
+
};
|
|
218684
|
+
picomatch.matchBase = (input, glob, options) => {
|
|
218685
|
+
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
218686
|
+
return regex.test(utils.basename(input));
|
|
218687
|
+
};
|
|
218688
|
+
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
218689
|
+
picomatch.parse = (pattern, options) => {
|
|
218690
|
+
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
218691
|
+
return parse5(pattern, { ...options, fastpaths: false });
|
|
218692
|
+
};
|
|
218693
|
+
picomatch.scan = (input, options) => scan(input, options);
|
|
218694
|
+
picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
|
|
218695
|
+
if (returnOutput === true) {
|
|
218696
|
+
return state.output;
|
|
218697
|
+
}
|
|
218698
|
+
const opts = options || {};
|
|
218699
|
+
const prepend3 = opts.contains ? "" : "^";
|
|
218700
|
+
const append4 = opts.contains ? "" : "$";
|
|
218701
|
+
let source = `${prepend3}(?:${state.output})${append4}`;
|
|
218702
|
+
if (state && state.negated === true) {
|
|
218703
|
+
source = `^(?!${source}).*$`;
|
|
218704
|
+
}
|
|
218705
|
+
const regex = picomatch.toRegex(source, options);
|
|
218706
|
+
if (returnState === true) {
|
|
218707
|
+
regex.state = state;
|
|
218708
|
+
}
|
|
218709
|
+
return regex;
|
|
218710
|
+
};
|
|
218711
|
+
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
218712
|
+
if (!input || typeof input !== "string") {
|
|
218713
|
+
throw new TypeError("Expected a non-empty string");
|
|
218714
|
+
}
|
|
218715
|
+
let parsed = { negated: false, fastpaths: true };
|
|
218716
|
+
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
218717
|
+
parsed.output = parse5.fastpaths(input, options);
|
|
218718
|
+
}
|
|
218719
|
+
if (!parsed.output) {
|
|
218720
|
+
parsed = parse5(input, options);
|
|
218721
|
+
}
|
|
218722
|
+
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
218723
|
+
};
|
|
218724
|
+
picomatch.toRegex = (source, options) => {
|
|
218725
|
+
try {
|
|
218726
|
+
const opts = options || {};
|
|
218727
|
+
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
218728
|
+
} catch (err2) {
|
|
218729
|
+
if (options && options.debug === true) throw err2;
|
|
218730
|
+
return /$^/;
|
|
218731
|
+
}
|
|
218732
|
+
};
|
|
218733
|
+
picomatch.constants = constants;
|
|
218734
|
+
module2.exports = picomatch;
|
|
218735
|
+
}
|
|
218736
|
+
});
|
|
218737
|
+
|
|
218738
|
+
// node_modules/@rollup/pluginutils/node_modules/picomatch/index.js
|
|
218739
|
+
var require_picomatch4 = __commonJS({
|
|
218740
|
+
"node_modules/@rollup/pluginutils/node_modules/picomatch/index.js"(exports2, module2) {
|
|
218741
|
+
"use strict";
|
|
218742
|
+
var pico = require_picomatch3();
|
|
218743
|
+
var utils = require_utils2();
|
|
218744
|
+
function picomatch(glob, options, returnState = false) {
|
|
218745
|
+
if (options && (options.windows === null || options.windows === void 0)) {
|
|
218746
|
+
options = { ...options, windows: utils.isWindows() };
|
|
218747
|
+
}
|
|
218748
|
+
return pico(glob, options, returnState);
|
|
218749
|
+
}
|
|
218750
|
+
Object.assign(picomatch, pico);
|
|
218751
|
+
module2.exports = picomatch;
|
|
218752
|
+
}
|
|
218753
|
+
});
|
|
218754
|
+
|
|
217238
218755
|
// node_modules/builtin-modules/index.js
|
|
217239
218756
|
var require_builtin_modules = __commonJS({
|
|
217240
218757
|
"node_modules/builtin-modules/index.js"(exports2, module2) {
|
|
@@ -236637,7 +238154,7 @@ module.exports = __toCommonJS(compiler_exports);
|
|
|
236637
238154
|
var import_typescript69 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
236638
238155
|
|
|
236639
238156
|
// src/version.ts
|
|
236640
|
-
var buildId = "
|
|
238157
|
+
var buildId = "1733951986";
|
|
236641
238158
|
var minfyJsId = "terser5.31.1_7";
|
|
236642
238159
|
var optimizeCssId = "autoprefixer10.4.19_postcss8.4.38_7";
|
|
236643
238160
|
var parse5Version = "7.1.2";
|
|
@@ -236645,8 +238162,8 @@ var rollupVersion = "2.56.3";
|
|
|
236645
238162
|
var jqueryVersion = "4.0.0-pre";
|
|
236646
238163
|
var terserVersion = "5.31.1";
|
|
236647
238164
|
var typescriptVersion = "5.5.4";
|
|
236648
|
-
var vermoji = "\u{
|
|
236649
|
-
var version = "4.
|
|
238165
|
+
var vermoji = "\u{1F423}";
|
|
238166
|
+
var version = "4.23.0";
|
|
236650
238167
|
var versions = {
|
|
236651
238168
|
stencil: version,
|
|
236652
238169
|
parse5: parse5Version,
|
|
@@ -236772,6 +238289,12 @@ var formatFlags = (compilerProperty) => {
|
|
|
236772
238289
|
if (compilerProperty.reflect) {
|
|
236773
238290
|
type |= 512 /* ReflectAttr */;
|
|
236774
238291
|
}
|
|
238292
|
+
if (compilerProperty.getter) {
|
|
238293
|
+
type |= 2048 /* Getter */;
|
|
238294
|
+
}
|
|
238295
|
+
if (compilerProperty.setter) {
|
|
238296
|
+
type |= 4096 /* Setter */;
|
|
238297
|
+
}
|
|
236775
238298
|
return type;
|
|
236776
238299
|
};
|
|
236777
238300
|
var formatAttrName = (compilerProperty) => {
|
|
@@ -240654,7 +242177,7 @@ function walk(ast, { enter, leave }) {
|
|
|
240654
242177
|
}
|
|
240655
242178
|
|
|
240656
242179
|
// node_modules/@rollup/pluginutils/dist/es/index.js
|
|
240657
|
-
var import_picomatch = __toESM(
|
|
242180
|
+
var import_picomatch = __toESM(require_picomatch4(), 1);
|
|
240658
242181
|
var addExtension = function addExtension2(filename, ext2 = ".js") {
|
|
240659
242182
|
let result2 = `${filename}`;
|
|
240660
242183
|
if (!(0, import_path8.extname)(filename))
|
|
@@ -240729,7 +242252,7 @@ var attachScopes = function attachScopes2(ast, propertyName = "scope") {
|
|
|
240729
242252
|
walk(ast, {
|
|
240730
242253
|
enter(n3, parent) {
|
|
240731
242254
|
const node = n3;
|
|
240732
|
-
if (/(Function|Class)Declaration/.test(node.type)) {
|
|
242255
|
+
if (/(?:Function|Class)Declaration/.test(node.type)) {
|
|
240733
242256
|
scope.addDeclaration(node, false, false);
|
|
240734
242257
|
}
|
|
240735
242258
|
if (node.type === "VariableDeclaration") {
|
|
@@ -240751,7 +242274,7 @@ var attachScopes = function attachScopes2(ast, propertyName = "scope") {
|
|
|
240751
242274
|
newScope.addDeclaration(func, false, false);
|
|
240752
242275
|
}
|
|
240753
242276
|
}
|
|
240754
|
-
if (/For(In|Of)?Statement/.test(node.type)) {
|
|
242277
|
+
if (/For(?:In|Of)?Statement/.test(node.type)) {
|
|
240755
242278
|
newScope = new Scope({
|
|
240756
242279
|
parent: scope,
|
|
240757
242280
|
block: true
|
|
@@ -240796,8 +242319,9 @@ function ensureArray(thing) {
|
|
|
240796
242319
|
return [];
|
|
240797
242320
|
return [thing];
|
|
240798
242321
|
}
|
|
242322
|
+
var normalizePathRegExp = new RegExp(`\\${import_path8.win32.sep}`, "g");
|
|
240799
242323
|
var normalizePath2 = function normalizePath3(filename) {
|
|
240800
|
-
return filename.
|
|
242324
|
+
return filename.replace(normalizePathRegExp, import_path8.posix.sep);
|
|
240801
242325
|
};
|
|
240802
242326
|
function getMatcherString(id, resolutionBase) {
|
|
240803
242327
|
if (resolutionBase === false || (0, import_path8.isAbsolute)(id) || id.startsWith("**")) {
|
|
@@ -240818,10 +242342,12 @@ var createFilter = function createFilter2(include, exclude, options) {
|
|
|
240818
242342
|
};
|
|
240819
242343
|
const includeMatchers = ensureArray(include).map(getMatcher);
|
|
240820
242344
|
const excludeMatchers = ensureArray(exclude).map(getMatcher);
|
|
242345
|
+
if (!includeMatchers.length && !excludeMatchers.length)
|
|
242346
|
+
return (id) => typeof id === "string" && !id.includes("\0");
|
|
240821
242347
|
return function result2(id) {
|
|
240822
242348
|
if (typeof id !== "string")
|
|
240823
242349
|
return false;
|
|
240824
|
-
if (
|
|
242350
|
+
if (id.includes("\0"))
|
|
240825
242351
|
return false;
|
|
240826
242352
|
const pathId = normalizePath2(id);
|
|
240827
242353
|
for (let i = 0; i < excludeMatchers.length; ++i) {
|
|
@@ -240923,7 +242449,7 @@ var dataToEsm = function dataToEsm2(data2, options = {}) {
|
|
|
240923
242449
|
}
|
|
240924
242450
|
let maxUnderbarPrefixLength = 0;
|
|
240925
242451
|
for (const key of Object.keys(data2)) {
|
|
240926
|
-
const underbarPrefixLength = (_b = (_a =
|
|
242452
|
+
const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0;
|
|
240927
242453
|
if (underbarPrefixLength > maxUnderbarPrefixLength) {
|
|
240928
242454
|
maxUnderbarPrefixLength = underbarPrefixLength;
|
|
240929
242455
|
}
|
|
@@ -258699,7 +260225,8 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
258699
260225
|
"appendChildSlotFix",
|
|
258700
260226
|
"slotChildNodesFix",
|
|
258701
260227
|
"cloneNodeFix",
|
|
258702
|
-
"scopedSlotTextContentFix"
|
|
260228
|
+
"scopedSlotTextContentFix",
|
|
260229
|
+
"experimentalScopedSlotChanges"
|
|
258703
260230
|
];
|
|
258704
260231
|
const conflictingFlags = possibleFlags.filter((flag) => validatedConfig.extras[flag] === false);
|
|
258705
260232
|
if (conflictingFlags.length > 0) {
|
|
@@ -258716,13 +260243,14 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
258716
260243
|
validatedConfig.extras.cloneNodeFix = true;
|
|
258717
260244
|
validatedConfig.extras.slotChildNodesFix = true;
|
|
258718
260245
|
validatedConfig.extras.scopedSlotTextContentFix = true;
|
|
260246
|
+
validatedConfig.extras.experimentalScopedSlotChanges = true;
|
|
258719
260247
|
} else {
|
|
258720
260248
|
validatedConfig.extras.appendChildSlotFix = !!validatedConfig.extras.appendChildSlotFix;
|
|
258721
260249
|
validatedConfig.extras.cloneNodeFix = !!validatedConfig.extras.cloneNodeFix;
|
|
258722
260250
|
validatedConfig.extras.slotChildNodesFix = !!validatedConfig.extras.slotChildNodesFix;
|
|
258723
260251
|
validatedConfig.extras.scopedSlotTextContentFix = !!validatedConfig.extras.scopedSlotTextContentFix;
|
|
260252
|
+
validatedConfig.extras.experimentalScopedSlotChanges = !!validatedConfig.extras.experimentalScopedSlotChanges;
|
|
258724
260253
|
}
|
|
258725
|
-
validatedConfig.extras.experimentalScopedSlotChanges = !!validatedConfig.extras.experimentalScopedSlotChanges;
|
|
258726
260254
|
setBooleanConfig(
|
|
258727
260255
|
validatedConfig,
|
|
258728
260256
|
"sourceMap",
|
|
@@ -259084,7 +260612,9 @@ var getRealProperties = (properties) => {
|
|
|
259084
260612
|
deprecation: getDocsDeprecationText(member2.docs.tags),
|
|
259085
260613
|
values: parseTypeIntoValues(member2.complexType.resolved),
|
|
259086
260614
|
optional: member2.optional,
|
|
259087
|
-
required: member2.required
|
|
260615
|
+
required: member2.required,
|
|
260616
|
+
getter: member2.getter,
|
|
260617
|
+
setter: member2.setter
|
|
259088
260618
|
}));
|
|
259089
260619
|
};
|
|
259090
260620
|
var getVirtualProperties = (virtualProps) => {
|
|
@@ -259100,7 +260630,9 @@ var getVirtualProperties = (virtualProps) => {
|
|
|
259100
260630
|
deprecation: void 0,
|
|
259101
260631
|
values: parseTypeIntoValues(member2.type),
|
|
259102
260632
|
optional: true,
|
|
259103
|
-
required: false
|
|
260633
|
+
required: false,
|
|
260634
|
+
getter: void 0,
|
|
260635
|
+
setter: void 0
|
|
259104
260636
|
}));
|
|
259105
260637
|
};
|
|
259106
260638
|
var parseTypeIntoValues = (type) => {
|
|
@@ -260205,14 +261737,22 @@ function getType(cmpMethod, typeImportData, componentSourcePath) {
|
|
|
260205
261737
|
// src/compiler/types/generate-prop-types.ts
|
|
260206
261738
|
var generatePropTypes = (cmpMeta, typeImportData) => {
|
|
260207
261739
|
return [
|
|
260208
|
-
...cmpMeta.properties.map((cmpProp) =>
|
|
260209
|
-
|
|
260210
|
-
|
|
260211
|
-
|
|
260212
|
-
|
|
260213
|
-
|
|
260214
|
-
|
|
260215
|
-
|
|
261740
|
+
...cmpMeta.properties.map((cmpProp) => {
|
|
261741
|
+
let doc = getTextDocs(cmpProp.docs);
|
|
261742
|
+
if (cmpProp.getter && !cmpProp.setter && !(doc == null ? void 0 : doc.match("@readonly"))) {
|
|
261743
|
+
cmpProp.docs = cmpProp.docs || { tags: [], text: "" };
|
|
261744
|
+
cmpProp.docs.tags = [...cmpProp.docs.tags || [], { name: "readonly", text: "" }];
|
|
261745
|
+
doc = getTextDocs(cmpProp.docs);
|
|
261746
|
+
}
|
|
261747
|
+
return {
|
|
261748
|
+
name: cmpProp.name,
|
|
261749
|
+
type: getType2(cmpProp, typeImportData, cmpMeta.sourceFilePath),
|
|
261750
|
+
optional: cmpProp.optional,
|
|
261751
|
+
required: cmpProp.required,
|
|
261752
|
+
internal: cmpProp.internal,
|
|
261753
|
+
jsdoc: doc
|
|
261754
|
+
};
|
|
261755
|
+
}),
|
|
260216
261756
|
...cmpMeta.virtualProperties.map((cmpProp) => ({
|
|
260217
261757
|
name: cmpProp.name,
|
|
260218
261758
|
type: cmpProp.type,
|
|
@@ -262581,13 +264121,13 @@ var validateMethods = (diagnostics, members) => {
|
|
|
262581
264121
|
// src/compiler/transformers/decorators-to-static/prop-decorator.ts
|
|
262582
264122
|
var import_typescript51 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
262583
264123
|
var propDecoratorsToStatic = (diagnostics, decoratedProps, typeChecker, program, newMembers, decoratorName) => {
|
|
262584
|
-
const properties = decoratedProps.filter(import_typescript51.default.isPropertyDeclaration).map((prop) => parsePropDecorator(diagnostics, typeChecker, program, prop, decoratorName)).filter((prop) => prop != null);
|
|
264124
|
+
const properties = decoratedProps.filter((prop) => import_typescript51.default.isPropertyDeclaration(prop) || import_typescript51.default.isGetAccessor(prop)).map((prop) => parsePropDecorator(diagnostics, typeChecker, program, prop, decoratorName, newMembers)).filter((prop) => prop != null);
|
|
262585
264125
|
if (properties.length > 0) {
|
|
262586
264126
|
newMembers.push(createStaticGetter("properties", import_typescript51.default.factory.createObjectLiteralExpression(properties, true)));
|
|
262587
264127
|
}
|
|
262588
264128
|
};
|
|
262589
|
-
var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName) => {
|
|
262590
|
-
var _a;
|
|
264129
|
+
var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName, newMembers) => {
|
|
264130
|
+
var _a, _b;
|
|
262591
264131
|
const propDecorator = (_a = retrieveTsDecorators(prop)) == null ? void 0 : _a.find(isDecoratorNamed(decoratorName));
|
|
262592
264132
|
if (propDecorator == null) {
|
|
262593
264133
|
return null;
|
|
@@ -262610,21 +264150,40 @@ var parsePropDecorator = (diagnostics, typeChecker, program, prop, decoratorName
|
|
|
262610
264150
|
const symbol = typeChecker.getSymbolAtLocation(prop.name);
|
|
262611
264151
|
const type = typeChecker.getTypeAtLocation(prop);
|
|
262612
264152
|
const typeStr = propTypeFromTSType(type);
|
|
264153
|
+
const foundSetter = import_typescript51.default.isGetAccessor(prop) ? findSetter(propName, newMembers) : null;
|
|
262613
264154
|
const propMeta = {
|
|
262614
264155
|
type: typeStr,
|
|
262615
264156
|
mutable: !!propOptions.mutable,
|
|
262616
264157
|
complexType: getComplexType2(typeChecker, prop, type, program),
|
|
262617
264158
|
required: prop.exclamationToken !== void 0 && propName !== "mode",
|
|
262618
264159
|
optional: prop.questionToken !== void 0,
|
|
262619
|
-
docs: serializeSymbol(typeChecker, symbol)
|
|
264160
|
+
docs: serializeSymbol(typeChecker, symbol),
|
|
264161
|
+
getter: import_typescript51.default.isGetAccessor(prop),
|
|
264162
|
+
setter: !!foundSetter
|
|
262620
264163
|
};
|
|
262621
264164
|
if (typeStr !== "unknown") {
|
|
262622
264165
|
propMeta.attribute = getAttributeName(propName, propOptions);
|
|
262623
264166
|
propMeta.reflect = getReflect(diagnostics, propDecorator, propOptions);
|
|
262624
264167
|
}
|
|
262625
|
-
|
|
262626
|
-
|
|
262627
|
-
|
|
264168
|
+
if (import_typescript51.default.isPropertyDeclaration(prop) && prop.initializer) {
|
|
264169
|
+
propMeta.defaultValue = prop.initializer.getText();
|
|
264170
|
+
} else if (import_typescript51.default.isGetAccessorDeclaration(prop)) {
|
|
264171
|
+
const returnStatement = (_b = prop.body) == null ? void 0 : _b.statements.find((st) => import_typescript51.default.isReturnStatement(st));
|
|
264172
|
+
const returnExpression = returnStatement.expression;
|
|
264173
|
+
if (returnExpression && import_typescript51.default.isLiteralExpression(returnExpression)) {
|
|
264174
|
+
propMeta.defaultValue = returnExpression.getText();
|
|
264175
|
+
} else if (returnExpression && import_typescript51.default.isPropertyAccessExpression(returnExpression)) {
|
|
264176
|
+
const nameToFind = returnExpression.name.getText();
|
|
264177
|
+
const foundProp = findGetProp(nameToFind, newMembers);
|
|
264178
|
+
if (foundProp && foundProp.initializer) {
|
|
264179
|
+
propMeta.defaultValue = foundProp.initializer.getText();
|
|
264180
|
+
if (propMeta.type === "unknown") {
|
|
264181
|
+
const type2 = typeChecker.getTypeAtLocation(foundProp);
|
|
264182
|
+
propMeta.type = propTypeFromTSType(type2);
|
|
264183
|
+
propMeta.complexType = getComplexType2(typeChecker, foundProp, type2, program);
|
|
264184
|
+
}
|
|
264185
|
+
}
|
|
264186
|
+
}
|
|
262628
264187
|
}
|
|
262629
264188
|
const staticProp = import_typescript51.default.factory.createPropertyAssignment(
|
|
262630
264189
|
import_typescript51.default.factory.createStringLiteral(propName),
|
|
@@ -262731,6 +264290,12 @@ var isAny = (t) => {
|
|
|
262731
264290
|
}
|
|
262732
264291
|
return false;
|
|
262733
264292
|
};
|
|
264293
|
+
var findSetter = (propName, members) => {
|
|
264294
|
+
return members.find((m) => import_typescript51.default.isSetAccessor(m) && m.name.getText() === propName);
|
|
264295
|
+
};
|
|
264296
|
+
var findGetProp = (propName, members) => {
|
|
264297
|
+
return members.find((m) => import_typescript51.default.isPropertyDeclaration(m) && m.name.getText() === propName);
|
|
264298
|
+
};
|
|
262734
264299
|
|
|
262735
264300
|
// src/compiler/transformers/decorators-to-static/state-decorator.ts
|
|
262736
264301
|
var import_typescript52 = __toESM(require_typescript_5_5_4_bundle_cache_min());
|
|
@@ -262889,6 +264454,19 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap)
|
|
|
262889
264454
|
member2.type,
|
|
262890
264455
|
member2.body
|
|
262891
264456
|
);
|
|
264457
|
+
} else if (import_typescript54.default.isGetAccessor(member2)) {
|
|
264458
|
+
return import_typescript54.default.factory.updateGetAccessorDeclaration(
|
|
264459
|
+
member2,
|
|
264460
|
+
import_typescript54.default.canHaveModifiers(member2) ? import_typescript54.default.getModifiers(member2) : void 0,
|
|
264461
|
+
member2.name,
|
|
264462
|
+
member2.parameters,
|
|
264463
|
+
member2.type,
|
|
264464
|
+
member2.body
|
|
264465
|
+
);
|
|
264466
|
+
} else if (import_typescript54.default.isSetAccessor(member2)) {
|
|
264467
|
+
const err2 = buildError(diagnostics);
|
|
264468
|
+
err2.messageText = "A get accessor should be decorated before a set accessor";
|
|
264469
|
+
augmentDiagnosticWithNode(err2, member2);
|
|
262892
264470
|
} else if (import_typescript54.default.isPropertyDeclaration(member2)) {
|
|
262893
264471
|
if (shouldInitializeInConstructor(member2, importAliasMap)) {
|
|
262894
264472
|
return member2;
|
|
@@ -263313,7 +264891,9 @@ var parseStaticProps = (staticMembers) => {
|
|
|
263313
264891
|
defaultValue: val.defaultValue,
|
|
263314
264892
|
complexType: val.complexType,
|
|
263315
264893
|
docs: val.docs,
|
|
263316
|
-
internal: isInternal(val.docs)
|
|
264894
|
+
internal: isInternal(val.docs),
|
|
264895
|
+
getter: !!val.getter,
|
|
264896
|
+
setter: !!val.setter
|
|
263317
264897
|
};
|
|
263318
264898
|
});
|
|
263319
264899
|
};
|